webpackJsonp([1],[,function(e,t,n){e.exports=n(1797)()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1794),a=i(r),o=n(903),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){"use strict";function i(){return r.a.t.apply(r.a,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(509)},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(7),a=n(14),o=n(3).default;e.exports=i},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(297),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(304),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(1944),a=i(r),o=n(1948),s=i(o),l=n(304),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(1820),r=(n(976),n(1823));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(1606)},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){p[e]=i(t,n);var r=h[e];r&&(delete h[e],r.resolve(p[e]))}function a(e){for(var t in e){var n=e[t],i=void 0,a=void 0;Array.isArray(n)?(i=n[0],a=n[1]):i=n,r(t,i,a)}}
function o(e){return s(e)?u.a.Deferred().resolve(p[e]).promise():(h[e]||(h[e]=u.a.Deferred()),h[e].promise())}function s(e){return p.hasOwnProperty(e)}function l(e){return p[e]}t.b=a,t.d=o,t.a=s,t.c=l;var c=n(13),u=n.n(c),d=n(7),p=(n.n(d),n(36),{}),h={}},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(1506),l=n.n(s),c=n(6),u=n.n(c),d=n(7),p=n.n(d),h=n(63),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(304),r=n.n(i),a=n(53),o=n.n(a),s=n(173),l=n.n(s),c=n(77),u=n(13),d=n.n(u),p=n(7),h=n.n(p),f=n(18),v=n(36),g=n(29),m=n(19),y=n(15),b=n(503),I=n(16),S=n(57),M=n(65),D=n(912),C=(n(506),n(63)),O=n(35),P=/^change:([\w]+)$/,j=c.c.Model.extend({mixins:[b.a],name:"AbstractModel",responseType:M.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!==c.c.Model.prototype.initialize&&(n=this.initialize,this.initialize=function(){}),h.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 c.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(y.a)("appModel")){var o=Object(y.c)("appModel");if(o.has("entities")){var s=o.get("entities").get(this.entityType),l=this.entityID(e),u=s.get(l);u&&(a=u.get("model"))}}return a?(this.uninitialize(),i||(this.mergeStrategy&&(a.isMergingAttributes=!0),t.parse?e=a.parse(e):h.a.extend(e,a._getRelations(this.syncedRelations,e)),a.set(e),a.isMergingAttributes=!1),h.a.each(this.getContext(),function(e){a.setContext(e,this[e]||a[e])},this),
t.collection&&(a.collection=t.collection),a.updateEntity(),a):i?{}:(c.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){S.a.get("shouldCreateStateTree")&&this.entityID&&(this.state=this.toState()),this._initRelations(e),this._initDerived(e),this._initState()},_initRelations:function(e){this._relationListeners={}
;var t=h.a.extend({},this.sessionRelations,this.syncedRelations);h.a.each(t,function(e,t){this._initRelation(e,t);var n=h.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&&h.a.has(this._relationListeners,t)&&(a.off("all",this._relationListeners[t]),this._relationListeners[t]=null),o&&this._forwardRelationEvents(r,t)},_initDerived:function(){h.a.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){S.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=h.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=h.a.extend({},this.sessionRelations,this.syncedRelations);h.a.each(r,function(n,i){var r=this.get(i);r&&r.setContext(e,t)},this)}}},getScopedKey:function(e){
return null!=e&&h.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(v.a)(this.entityType,this.name+" requires an `entityType`"),f.a.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this}))},toState:function(){var e=(this.name,o()(this.attributes)),t=h.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 c.c.Collection?i.map(function(e){return Object(D.a)(h.a.result(e,"defaults"),e.toJSON(t))}):Object(D.a)(h.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&&h.a.has(i,s),u=r&&h.a.has(r,s),p=t.syncedOnly&&(!n||!h.a.has(n,s));l||u||p||(o[s]=a[s])}var f=d.a.extend(!0,{},o);return t.excludeDefaults&&(f=Object(D.a)(h.a.result(this,"defaults"),f)),t.syncedOnly||h.a.each(i,e,this),h.a.each(r,e,this),f},clone:function(){var e=h.a.extend(h.a.pick(this,this.getContext()),{
skipCache:!0});return new this.constructor(this.toJSON(),e)||null},copy:function(e){Object(v.a)(e instanceof this.constructor,"Only a model of the same type may be copied");var t=e.toJSON();return h.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 h.a.each(this.attributes,function(e,n){this.derivedAttrs&&h.a.has(this.derivedAttrs,n)||(t[n]=void 0)},this),
h.a.extend(t,this._getRelations(this.sessionRelations,{},{reset:!0}),this._getRelations(this.syncedRelations,{},{reset:!0}),h.a.result(this,"defaults"),e),this.set(t)},set:function(e,t,n){var i;h.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)),c.c.Model.prototype.set.call(this,i,n),r&&(this.isMergingAttributes=!1),this},hasAttr:function(e){
var t=this.sessionAttrs&&h.a.has(this.sessionAttrs,e),n=this.syncedAttrs&&h.a.has(this.syncedAttrs,e);return!(!t&&!n)},hasRelation:function(e){var t=this.sessionRelations&&h.a.has(this.sessionRelations,e),n=this.syncedRelations&&h.a.has(this.syncedRelations,e);return!(!t&&!n)},hasDerived:function(e){return!(!this.derivedAttrs||!h.a.has(this.derivedAttrs,e))},validate:function(e,t){
var n=h.a.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),i=this._validateTypes(e,n);return i&&Object(v.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=h.a.result(this,"responseType");return h.a.isString(n)&&(t=!0,h.a.isFunction(this.augmentResponseText)&&(n=this.augmentResponseText(n,i)),n=i.parse(n)),
i===M.a.json&&n.MediaContainer&&(n=n.MediaContainer),h.a.isFunction(this.augmentResponse)&&(n=this.augmentResponse(n,i)),t&&this.rootPropertyName&&h.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={};h.a.each(this.sessionAttrs,function(e,t){h.a.has(i,t)&&(r[t]=i[t])}),h.a.each(this.syncedAttrs,function(e,t){if(h.a.has(i,t)){var a,o=e;o.typeName||(o=e.type,a=h.a.omit(e,"type")),
r[t]=null==i[t]?i[t]:o.parse(i[t],a)}else this.has(t)&&(n||(n=h.a.result(this,"defaults")),r[t]=n&&h.a.has(n,t)?n[t]:void 0)},this);var a=h.a.extend({},t,{parse:!0});return h.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=h.a.extend({save:!0},n),o=h.a.extend(this.getSaveParams(i),a.data);if(h.a.isEmpty(o))return a.success&&a.success(this),d.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)},c.c.Model.prototype.save.call(this,i,a)},sync:function(e,t,n){var i=n?h.a.clone(n):{};if("create"===e||"update"===e){var r=i.data,a=i.url||h.a.result(this,"saveUrl")||h.a.result(this,"syncUrl")||h.a.result(this,"url");i.url=m.join(a,r),i.data=""}return c.c.Model.prototype.sync.call(this,e,t,i)},getSaveParams:function(e){var t=this._getSaveAttrs(e);return h.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,u;h.a.has(i,"type")?(c=i.type,u=h.a.omit(i,"type")):c=i,r=c.stringify(r,u)}return e[a]=r,e},{},this)},startCapturingChangeEvents:function(){
if(this.releaseCapturedChangeEvents)return void Object(v.a)(!1,this.name+" is already capturing events");var e=this.set,t=[],n=h.a.clone(this.attributes);this.set=function(n,i,a){var o,s=h.a.extend({},a,{silent:!0});return"object"===(void 0===n?"undefined":r()(n))?(o=n,a=i):(o={})[n]=i,h.a.each(o,function(n,i){this.get(i)!==n&&(t.push({key:i,value:n}),e.call(this,i,n,s))},this),h.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,h.a.each(t,function(e){this.trigger("change:"+e.key,this,e.value)},this),this._changing=!1,h.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?h.a.reduce(e,function(e,n,i){return e[i]=t(i,this.get(i),n),e},{},this):e},_resolveRelationDefinition:function(e){return h.a.isFunction(e)?e.call(this):e},_getRelations:function(e,t,n){
t||(t={}),n||(n={});var i={};return h.a.each(e,function(e,r){var a=this._resolveRelationDefinition(e),o=a.relationClass;Object(v.a)(o,this.name+" requires a `relationClass` for the "+r+" relation");var s=r;n.parse&&!h.a.has(t,r)&&h.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 u=n.reset?null:this.get(r),d=u instanceof o,p=o.prototype instanceof c.c.Collection;if(p?l=C.a.parseArray(l):l||(l={}),
d&&!p&&(n.parse&&(l=u.parse(l)),d=u.id===l[u.idAttribute||"id"]),d){u.isMergingAttributes=this.isMergingAttributes;var f=a.setOptions;h.a.isFunction(f)&&(f=f.call(this,n)),p?u.set(l,h.a.extend({parse:n.parse,remove:!this.isMergingAttributes},f)):u.set(l,h.a.extend({merge:!0},f)),u.isMergingAttributes=!1}else{var g={parse:n.parse};if(h.a.each(this.getContext(),function(e){g[e]=this[e]},this),!p){var m=a.attrs;h.a.isFunction(m)&&(m=m.call(this,t)),l=h.a.extend({},l,m)}var y=a.options
;h.a.isFunction(y)&&(y=y.call(this,t)),h.a.extend(g,{parent:this},y),u=new o(l,g)}i[r]=u},this),i},_forwardRelationEvents:function(e,t){function n(){var n=arguments[0];if("change"!==n){if("statechange"===n)return void(this.shouldUpdateRelationState.apply(this,h.a.rest(arguments,1))&&O.b(this.updateState,this));var r=h.a.toArray(arguments);r[0]="change:"+t+"."+n,this.trigger.apply(this,r),h.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(v.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),h.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:h.a.bind(this._setDerived,this,n,e)};h.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=h.a.reduce(e,function(e,t,n){return e[n]={definition:this.syncedAttrs[n],value:t},e},{},this);else{var n=h.a.extend({},this.syncedAttrs,this.syncedRelations);t=h.a.reduce(n,function(e,t,n){var i=this._resolveRelationDefinition(t),r=i.save
;return h.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=h.a.reduce(n,function(n,i){if(this.hasDerived(i))return n;if(!h.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?I.a.instanceOf(s):s.prototype instanceof c.c.Collection?I.a.oneOfType(I.a.array,I.a.object):I.a.object:o.type?o.type:o;var u=r.validate;return u?u(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 g.a.warn("Unable to handle",e)
;var i=e.match(P);if(i){var r=i[1];t.get(r)!==this.state[r]&&(n&&n.updateEntity&&n.updateEntity(),O.b(this.updateState,this))}}});t.a=j},function(e,t,n){"use strict";var i=n(75),r=n(94),a=i.a.extend({mixins:r.a});t.a=new a},function(e,t,n){"use strict";function i(e){return String(e).replace(/^\/|\/$/g,"")}function r(e){return e?g.a.first(/[^\/\\]+$/.exec(e))||e:""}function a(e,t){return f.a.stringify(e,p()({arrayFormat:"repeat"},t))}function o(e,t){return f.a.parse(e,t)}function s(e,t){m.href=e
;var n=g.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.params={},n.origin||(n.origin=n.protocol+"//"+n.host),n}function l(e,t,n){g.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),g.a.isString(t)?o(t):t));else{var d=g.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(297),u=n.n(c),d=n(6),p=n.n(d),h=n(643),f=n.n(h),v=n(7),g=n.n(v),m=(n(36),
document.createElement("a")),y=/^([^\?#]*)(?:\?([^#]*))?(#.*)?/,b=/([^\?]*)\??(.*)()/},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(122),m=n.n(g),y=n(324),b=n(49),I=(n(52),n(27)),S=n(36),M=n(205),D=n(1955),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(S.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(M.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.role,p=(e.onPress,
o()(e,["className","to","kind","size","isSelected","isDisabled","component","allowFocusOnPress","highlightActiveRoute","role","onPress"])),h=this.state,f=h.isActive,g=h.isFocused,m={},b=c;return n&&(b="a",m.href=n),m.role=d||(n?"link":"button"),m.className=(t||"")+" "+(C.a.link||"")+" "+(C.a[i]||"")+" "+(a&&C.a[a]||"")+" "+(s&&C.a.isSelected||"")+" "+(f&&y.a||"")+" "+(g&&y.f||"")+" "+(l&&y.b||"")+" "+(u&&this._isActiveRoute()&&C.a.isActiveRoute||""||""),
"button"!==b&&"input"!==b||(m.type=p.type||"button",m.disabled=l),v.a.createElement(b,r()({},p,m,{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onTouchCancel:this.onTouchCancel,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onMouseLeave:this.onMouseLeave,onClick:this.onClick,onFocus:this.onFocus,onBlur:this.onBlur}))},t}(f.Component);O.defaultProps={component:"button",kind:b.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1,
highlightActiveRoute:!1},t.a=O},function(e,t,n){"use strict";var i=n(173),r=n.n(i),a=n(77),o=n(907),s=n.n(o),l=n(7),c=n.n(l),u=n(36),d=n(29);n(1492),n(1493),n(1494);s.a.isNodeAttached=function(e){return a.c.$.contains(document.documentElement,e)};var p=c.a.clone(s.a.View.prototype),h=c.a.clone(s.a.CollectionView.prototype),f=c.a.clone(s.a.Region.prototype),v=c.a.clone(s.a.Region),g=c.a.clone(s.a.Layout.prototype),m={constructor:function(){this.wrapAfterRender(),
p.constructor.apply(this,arguments),this.listenViewEvents()},listenViewEvents:function(){var e=this;this.stopListeningViewEvents();var t=c.a.result(this,"viewEvents");t&&(this._viewEventsListeners=c.a.mapObject(t,function(t){return c.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
;c.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)(c.a.isFunction(e),"`whenRendered` must be called with a single function"),c.a.bind(function(){if(!this.isClosed){var t=c.a.toArray(arguments),n=c.a.bind(function(){this.isRendered&&!this.isClosed&&e.apply(this,t)},this);if(this.isRendered)return void c.a.defer(n);this.listenToOnce(this,"render",function(){
c.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?c.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(),c.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 c.a.values(this.children._views)}},b={constructor:function(){h.constructor.apply(this,arguments)}},I={append:function(e,t,n){var i=e.isClosed||c.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),s.a.triggerMethod.call(this,"show",e),
s.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(s.a.isNodeAttached(t.get(0))){var n=c.a.union([e],c.a.result(e,"_getNestedViews")||[]);c.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=c.a.mapObject(e,function(e){return c.a.isString(e)?{_parentView:t,selector:e}:c.a.defaults(e,{_parentView:t})});return g._buildRegions.call(this,n)},_getImmediateChildren:function(){return c.a.chain(this.regionManager._regions).values().pluck("currentView").compact().value()}}
;c.a.extend(s.a.View.prototype,m),c.a.extend(s.a.ItemView.prototype,m),c.a.extend(s.a.CollectionView.prototype,m,y),c.a.extend(s.a.CompositeView.prototype,m,b),c.a.extend(s.a.Region.prototype,I),c.a.extend(s.a.Region,S),c.a.extend(s.a.Layout.prototype,M),s.a.extend=a.c.Model.extend,s.a.Controller.extend=s.a.extend,s.a.Region.extend=s.a.extend,s.a.Application.extend=s.a.extend,s.a.Module.extend=s.a.extend,s.a.View.extend=s.a.extend,s.a.ItemView.extend=s.a.extend,
s.a.CollectionView.extend=s.a.extend,s.a.CompositeView.extend=s.a.extend,s.a.Layout.extend=s.a.extend,t.a=s.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(5),a=(n.n(r),n(115))},function(e,t,n){"use strict";var i=n(226);n.d(t,"a",function(){return i});var r=n(49);n.d(t,"b",function(){return r});var a=n(52);n.d(t,"e",function(){return a});var o=n(54);n.d(t,"d",function(){
return o});var s=n(710);n.d(t,"f",function(){return s});var l=n(1973);n.d(t,"c",function(){return l})},function(e,t,n){"use strict";var i=n(173),r=(n.n(i),n(77)),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=(n(36),n(19)),u=n(503),d=n(57),p=n(65),h=(n(506),n(35)),f=r.c.Collection.extend({mixins:[u.a],responseType:p.a.xml,instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],_context:["parent"],cache:null,cacheKey:function(){return l.a.result(this,"url")},
constructor:function(e,t){t||(t={}),l.a.each(this.getContext(),function(e){var n=t[e];void 0!==n&&this.setContext(e,n)},this);var n=l.a.result(this,"instanceOptions");if(l.a.each(n,function(e){l.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(o.a.Deferred().resolve().promise()),
!this.cache||this.skipCache)return r.c.Collection.prototype.constructor.apply(this,arguments),void this._initState();this.initialize.apply(this,arguments);var i=this.cache.getItemCacheKey(this),a=this.cache.get(i);return this.uninitialize(),a||(t.onlyIfCached?{}:(r.c.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,i)))},uninitialize:function(){this.stopListening()},_initState:function(){
d.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=l.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),r.c.sync.apply(this,arguments)},
syncUrl:function(){var e="";if(this.url&&(e=l.a.result(this,"url")),this.path&&(e=c.join([e,l.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(l.a.isString(t)){var n=l.a.result(this,"responseType");l.a.isFunction(this.augmentResponseText)&&(t=this.augmentResponseText(t,n)),
t=n.parse(t),n===p.a.json&&t.MediaContainer&&(t=t.MediaContainer)}if(l.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=l.a.result(this,"instanceOptions"),n=l.a.extend(l.a.pick(this,t),l.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=l.a.map(e,function(e){return e.clone()});return this.clone(t)},clear:function(e){e=l.a.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)},getSaveParams:function(){return this.map(function(e){return e.getSaveParams()})},onCollectionChange:function(){h.b(this.updateState,this)},onStateChange:function(e,t,n){e!==this&&this.shouldUpdateModelState(e,t,n)&&h.b(this.updateState,this)}});t.a=f
},function(e,t,n){"use strict";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){"use strict";function i(e){var t=O.get(e);if(t&&t.child)return O.get(t.child)}function r(e){var t=O.get(e);if(t){var n=t.child;return null==n?t:r(n)}}function a(e){var t=O.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=O.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=O.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 P}),n.d(t,"q",function(){return j}),n.d(t,"n",function(){return T}),t.o=i,t.p=r,t.s=a,t.r=o,t.u=s,t.t=l;var c=n(3),u=n(262),d=n(58),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=["id","typeString"],O=Object(u.a)(C,[{id:1,typeString:p,title:function(){return Object(c.default)("Movie")},plural:function(){
return Object(c.default)("Movies")},mediaType:d.d},{id:2,typeString:h,title:function(){return Object(c.default)("Show")},plural:function(){return Object(c.default)("Shows")},mediaType:d.b,child:f},{id:3,typeString:f,title:function(){return Object(c.default)("Season")},plural:function(){return Object(c.default)("Seasons")},mediaType:d.b,parent:h,child:v},{id:4,typeString:v,title:function(){return Object(c.default)("Episode")},plural:function(){return Object(c.default)("Episodes")},mediaType:d.d,
parent:f},{id:5,typeString:"trailer",title:function(){return Object(c.default)("Trailer")},plural:function(){return Object(c.default)("Trailers")},mediaType:d.d},{id:6,typeString:"comic",title:function(){return Object(c.default)("Comic")},plural:function(){return Object(c.default)("Comics")},mediaType:d.c},{id:7,typeString:"person",title:function(){return Object(c.default)("Person")},plural:function(){return Object(c.default)("People")},mediaType:d.b},{id:8,typeString:g,title:function(){
return Object(c.default)("Artist")},plural:function(){return Object(c.default)("Artists")},mediaType:d.b,child:m},{id:9,typeString:m,title:function(){return Object(c.default)("Album")},plural:function(){return Object(c.default)("Albums")},mediaType:d.b,parent:g,child:y},{id:10,typeString:y,title:function(){return Object(c.default)("Track")},plural:function(){return Object(c.default)("Tracks")},mediaType:d.a,parent:m},{id:11,typeString:"picture",title:function(){
return Object(c.default)("Picture")},plural:function(){return Object(c.default)("Pictures")},mediaType:d.c},{id:12,typeString:b,title:function(){return Object(c.default)("Clip")},plural:function(){return Object(c.default)("Clips")},mediaType:d.d},{id:13,typeString:I,title:function(){return Object(c.default)("Photo")},plural:function(){return Object(c.default)("Photos")},mediaType:d.c,parent:S},{id:14,typeString:S,title:function(){return Object(c.default)("Photo Album")},plural:function(){
return Object(c.default)("Photo Albums")},mediaType:d.b,child:I},{id:15,typeString:M,title:function(){return Object(c.default)("Playlist")},plural:function(){return Object(c.default)("Playlists")},mediaType:d.b,parent:S},{id:16,typeString:"playlistFolder",title:function(){return Object(c.default)("Playlist")},plural:function(){return Object(c.default)("Playlists")},mediaType:d.b,child:M},{id:18,typeString:D,title:function(){return Object(c.default)("Collection")},plural:function(){
return Object(c.default)("Collections")},mediaType:d.b},{id:1001,typeString:"userPlaylistItem",title:function(){return Object(c.default)("Clip")},plural:function(){return Object(c.default)("Clips")},mediaType:d.d}]),P=O.contains,j=O.get,T=O.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(225),a=!1},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(7),a=n(14);e.exports=i},function(e,t,n){"use strict";var i=n(173),r=n.n(i),a=n(1462),o=n.n(a),s=n(1466),l=n.n(s),c=n(53),u=n.n(c),d=n(18),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=/%[sdifo]/g,v=/(error|exception)\]$/i,g={"%s":function(e){return e},"%d":function(e){return l()(e,10)},"%f":function(e){return o()(e)},"%o":function(e){return 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,"D",function(){return i}),
n.d(t,"x",function(){return r}),n.d(t,"F",function(){return a}),n.d(t,"S",function(){return o}),n.d(t,"O",function(){return s}),n.d(t,"W",function(){return l}),n.d(t,"U",function(){return c}),n.d(t,"J",function(){return u}),n.d(t,"M",function(){return d}),n.d(t,"a",function(){return p}),n.d(t,"Q",function(){return h}),n.d(t,"R",function(){return f}),n.d(t,"v",function(){return v}),n.d(t,"_1",function(){return g}),n.d(t,"_2",function(){return m}),n.d(t,"Z",function(){return y}),
n.d(t,"y",function(){return b}),n.d(t,"_6",function(){return I}),n.d(t,"K",function(){return S}),n.d(t,"L",function(){return M}),n.d(t,"_3",function(){return D}),n.d(t,"w",function(){return C}),n.d(t,"_5",function(){return O}),n.d(t,"E",function(){return P}),n.d(t,"X",function(){return j}),n.d(t,"_0",function(){return T}),n.d(t,"Y",function(){return w}),n.d(t,"B",function(){return E}),n.d(t,"C",function(){return x}),n.d(t,"A",function(){return A}),n.d(t,"z",function(){return N}),
n.d(t,"_4",function(){return L}),n.d(t,"I",function(){return k}),n.d(t,"b",function(){return _}),n.d(t,"c",function(){return R}),n.d(t,"o",function(){return z}),n.d(t,"n",function(){return U}),n.d(t,"g",function(){return B}),n.d(t,"p",function(){return F}),n.d(t,"e",function(){return V}),n.d(t,"j",function(){return H}),n.d(t,"i",function(){return Q}),n.d(t,"d",function(){return Y}),n.d(t,"l",function(){return G}),n.d(t,"k",function(){return W}),n.d(t,"h",function(){return K}),
n.d(t,"t",function(){return q}),n.d(t,"u",function(){return Z}),n.d(t,"s",function(){return X}),n.d(t,"f",function(){return J}),n.d(t,"q",function(){return $}),n.d(t,"r",function(){return ee}),n.d(t,"m",function(){return te}),n.d(t,"P",function(){return ne}),n.d(t,"V",function(){return ie}),n.d(t,"N",function(){return re}),n.d(t,"H",function(){return ae}),n.d(t,"G",function(){return oe}),n.d(t,"T",function(){return se})
;var i="home",r="discover",a="library",o="preplay",s="playlists",l="searchResults",c="quickSearchResults",u="metadataList",d="player",p="account",h="plexpass",f="plexpassLite",v="cpms",g="signIn",m="signOut",y="setupWizard",b="downloads",I="unclaimedServer",S="metadataSettings",M="nowPlaying",D="status",C="devices",O="subtitles",P="homeUsers",j="settings",T="sharing",w="settingsSidebar",E="dvrSettings",x="dvrSetup",A="dvrManageChannels",N="dvrDeviceSettings",L="subscriptions",k="manageSubscription",_="airingDetails",R="channelsGrid",z="confirmMarkAsWatched",U="confirmMarkAsUnwatched",B="confirmDelete",F="confirmOptimizeDatabase",V="confirmCleanBundles",H="confirmEmptyTrash",Q="confirmDeleteServer",Y="confirmAnalyzeLibrary",G="confirmForceRefreshLibrary",W="confirmEmptyTrashLibrary",K="confirmDeleteLibrary",q="confirmRemoveWebhook",Z="confirmUnlinkOauthProvider",X="confirmRemoveDVR",J="confirmClosePlayer",$="confirmPlayback",ee="confirmRemoteToLocalPlayback",te="confirmLocalToRemotePlayback",ne="playVersion",ie="resumePlayback",re="playerError",ae="liveTVPlayerConflict",oe="liveTVJoinSession",se="settings"
},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({},e,{loadingLabel:Object(c.default)("Loading")}))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(326),c=n(3);i.defaultProps=l.a.defaultProps,t.a=i},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,"k",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}),n.d(t,"j",function(){return v});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",v="recommended";r.a.oneOf(["discover",a,"metadataList","timeline",o,s,"postPlayPrevious","postPlayNext",l,c,u,d,p,h,f,v])},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(){return Object(r.createSelector)(function(e,t){return t.serverEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(5),a=(n.n(r),n(163))},function(e,t,n){"use strict";function i(){g&&(g=clearTimeout(g))}function r(){m&&(m=clearTimeout(m))}function a(){var e=y;if(y=null,r(),e){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?(u.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(c.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(36),u=n(29),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";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(29),a="`assert` requires an error message argument";t.a=i},function(e,t,n){"use strict";function i(e){return e?{entityID:e.entityID,id:e.id,parentID:e.parentID,identifier:e.identifier,
metricsIdentifier:e.metricsIdentifier,isLibraryProvider:e.isLibraryProvider,isPopulated:!!e.isPopulated,epgSource:e.epgSource,title:e.title,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===l.b.ACTIONS){var i={type:l.b.ACTIONS};i=t.actions.reduce(function(e,t){return e[t.id]=t,e},i),n=i}return e[t.type]=n,e},{})}:null}function r(){return Object(s.createSelector)(function(e,t){return e.entities.providers[t]},i)}
function a(e,t){var n=t.providerEntityID,i=u[n];return i||(i=Object(c.a)(r(),function(e){return e}),u[n]=i),i(e,n)}function o(e,t){var n=t.metadataItemEntityID,i=e.entities.metadataItems[n],r=i&&i.providerEntityID;if(r)return a(e,{providerEntityID:r})}t.b=i,t.a=a,t.c=o;var s=n(5),l=(n.n(s),n(60)),c=n(276),u={}},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(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(36);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(36),o=n(29),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";n.d(t,"d",function(){return i}),n.d(t,"a",function(){return r}),
n.d(t,"g",function(){return a}),n.d(t,"h",function(){return o}),n.d(t,"i",function(){return s}),n.d(t,"j",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"l",function(){return u}),n.d(t,"e",function(){return d}),n.d(t,"f",function(){return p}),n.d(t,"b",function(){return h}),n.d(t,"c",function(){return f})
;var i="com.plexapp.plugins.library",r="tv.plex.providers.channel",a="tv.plex.provider.news",o="tv.plex.provider.news-stage",s="tv.plex.provider.podcasts",l="tv.plex.provider.podcasts-stage",c="tv.plex.provider.webshows",u="tv.plex.provider.webshows-stage",d="tv.plex.provider.music",p="tv.plex.provider.music-stage",h="tv.plex.providers.epg",f=/(tv\.plex\.providers\.epg)\./},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(49),p=n(52),h=n(20),f=n(1956),v=n.n(f);i.defaultProps={kind:d.DEFAULT,size:p.MEDIUM},t.a=i},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){var i=n(374),r=n(1026);e.exports=i({},r,{signInFormSectionWidth:"320px",sliderTrackSize:"60px",sliderThumbSize:"12px",serverMenuItemHeight:"60px",sourceMenuItemHeight:"65px",sourceMenuItemGutter:"25px",
posterCenterCircleSize:"42px",posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",posterIconPadding:"20px",listButtonHeight:"40px",hubCellHeaderBottomPadding:"5px",hubCellHeaderTopPadding:"25px",pagePadding:"60px",typeFirstPageHeaderHeight:"80px",recordingPriorityPaneWidth:"360px",recordingPriorityPaneBorderWidth:"4px",recordingPriorityDragHandleWidth:"62px",channelGridRowHeight:"60px",channelGridTitleColumnWidth:"130px",channelGridChannelColumnWidth:"250px",
channelGridChannelOverflowWidth:"100px",channelGridChannelIconWidth:"80px",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:"100px",playerControlsMinWidth:"640px",playerControlsNarrowHeight:"140px",playerControlsNarrowBreakpoint:"960px",playerControlsPosterHeight:"80px",playerControlsPosterLeftGutter:"8px",playerControlsPosterBottomGutter:"8px",playerControlsNarrowPosterBottomGutter:"48px",playerControlsContentSpacing:"20px",
playerControlsSquarePosterWidth:"80px",playerControlsLandscapePosterWidth:Math.round(16/9*80)+"px",playerInfoBarHeight:"45px",playerTopControlsHeight:"60px",playerSideControlsWidth:"100px",playerIconButtonSize:"30px",playerIconButtonSpacing:"5px",playerVolumeSliderWidth:"32px",playerVolumeSliderHeight:"60px",seekBarHeight:"4px",seekBarTooltipMarginBottom:"4px",seekBarTooltipHeight:"23px",seekBarTooltipSmallWidth:"60px",seekBarTooltipLargeWidth:"90px",playQueueItemHeight:"68px",
playQueueMoveButtonWidth:"54px",playQueueSidePadding:"60px",lyricsLineHeight:"30px",lyricsLineWidth:"640px",playlistItemCardWidth:"64px",playlistBadgeSize:"30px",navigationIconSize:"20px",typeSidebarWidth:"60px",typeSidebarExpandedWidth:"260px",typeSidebarLeftGutter:"20px",typeSidebarItemHeight:"41px",homeServerListItemHeight:"40px",serverSelectMenuWidth:"260px",heroBadgeHeight:"90px",heroPageMinHeight:"600px"})},function(e,t,n){"use strict";function i(){return"id-"+r++}t.a=i;var r=0
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(21),o=n(0),s=(n.n(o),n(122)),l=n.n(s),c=n(11),u=n(15),d=a.a.Layout.extend({template:function(){return""},mountReact:function(){var e=Object(u.c)("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(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";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){return e?{entityID:e.entityID,machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,sourceTitle:e.sourceTitle,allowSync:e.allowSync,allowMediaDeletion:e.allowMediaDeletion,backgroundProcessing:e.backgroundProcessing,transcoderVideo:e.transcoderVideo,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,isCloud:e.isCloud,livetv:e.livetv,ownerId:e.ownerId
}:null}function r(){return Object(s.createSelector)(function(e,t){return e.entities.servers[t]},i)}function a(e,t){var n=t.serverEntityID,i=c[n];return i||(i=Object(l.a)(r(),function(e){return e}),c[n]=i),i(e,n)}function o(e,t){var n=t.metadataItemEntityID,i=e.entities.metadataItems[n],r=i&&i.serverEntityID;if(r)return a(e,{serverEntityID:r})}t.b=i,t.a=a,t.c=o;var s=n(5),l=(n.n(s),n(156)),c={}},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(5),a=(n.n(r),n(132))},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){e.exports={default:n(1470),__esModule:!0}},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(){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.displayName="ConnectWithMetrics("+Object(h.a)(t)+")",n.contextTypes={metricsPage:c.a.string.isRequired,metricsContext:c.a.string},n}}t.a=i;var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=n.n(l),u=n(0),d=n.n(u),p=n(11),h=n(166)},function(e,t,n){"use strict";function i(e){return Math.min(window.innerHeight-2*_,e.maxHeight)}
var r=n(6),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(1021),y=n(71),b=n(452),I=n(380),S=n(269),M=n(453),D=n(45),C=n(711),O=n(54),P=n(27),j=n(454),T=n.n(j),w=n(1026),E=n.n(w),x=n(325),A=n(2197),N=n(2199),L=n.n(N),k=Object(S.a)(T.a.menuSpeed),_=parseInt(E.a.menuPadding,10),R={appear:L.a.enter,appearActive:L.a.enterActive,enter:L.a.enter,enterActive:L.a.enterActive,leave:L.a.leave,leaveActive:L.a.leaveActive},z=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===x.j?M.e(e):t===x.e&&(e.preventDefault(),e.stopPropagation(),a.props.onMenuClose(),M.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(D.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(P.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(){M.f(document.getElementById(this._menuID)),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(C.a)(n,function(t){
var n=Object(I.a)(d,t.props.onPress);return g.a.cloneElement(t,{onPress:n,onMenuEnable:e.onMenuEnable,onMenuDisable:e.onMenuDisable})});return s()(m.a,{className:L.a.menuPortal,target:r,options:o,isOpen:l,closeTimeout:k},void 0,s()(b.a,{id:this._menuID,transitionName:R,transitionAppearTimeout:k,transitionEnterTimeout:k,transitionLeaveTimeout:k},void 0,l&&s()(A.a,{className:i,size:u,isDisabled:this.state.isDisabled},void 0,g.a.createElement(y.a,a()({},c,{style:{maxHeight:p}}),h))))},t
}(v.Component);z.defaultProps={maxHeight:600,scrollerProps:{className:L.a.menuScroller,scrollDirection:O.VERTICAL,autoScroll:!0}},t.a=z},function(e,t,n){"use strict";var i=n(77),r=n(7),a=n.n(r),o=n(1518).default,s=i.c.Model.extend({defaults:a.a.extend({allowFlash:!1,allowServerUpdates:!1,testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowMediaServerRelayConnections:!1,allowLoopbackDiscovery:!1,allowSSO:!1,allowMixedContent:!1,
allowBaseImagePreloading:!0,allowBaseImageBlobs:!0,heartbeatInterval:1e4,allowManualServers:!1,allowCloudSyncServers:!1,allowMobileServers:!1,allowMultiTrackAudio:!1,maximumConcurrentConnectionTests:5,shouldCreateFlexModels:!1,shouldCreateStateTree:!1,requiresSignIn:!0,requiresPlexPass:!1,myPlexAccessToken:null,alerts:null,continueUrl:null,primaryServer:null,shouldCreateNewSessionWhenSeekingLiveTV:!1,shouldPreferInsecureLocalConnections:!1,shouldRequestHTMLFromCloudProvider:!1,
allowLiveTVPlayback:!0},o,window.PLEXWEB)}),l=new s;t.a=l},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(262),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){
var t=e.children,n=e.className,i=e.innerClassName,r=e.scrollDirection,o=c()(e,["children","className","innerClassName","scrollDirection"]),l=r!==f.NONE;return n||(n=l?g.a.modalScroller:g.a.modalBody),p.a.createElement(h.a,a()({className:n,scrollDirection:r,autoScroll:!0},o),l?s()("div",{className:i},void 0,t):t)}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(71),f=n(54),v=n(1977),g=n.n(v);i.defaultProps={innerClassName:g.a.innerModalBody},t.a=i
},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c});var i=n(17),r=n(16),a=n(1597),o=n(937),s=n(1602),l={ACTION:"action",ACTIONS:"actions",CONTENT:"content",IMAGE_TRANSCODER:"imagetranscoder",SUBSCRIBE:"subscribe",SEARCH:"search",MATCH:"match",METADATA:"metadata",PLAY_QUEUE:"playqueue",PLAYLIST:"playlist",PROMOTED:"promoted",RATE:"rate",MANAGE:"manage",SETTINGS:"settings",TIMELINE:"timeline"},c={UNIVERSAL:"universal"},u=i.a.extend({
name:"ProviderFeatureModel",context:["server","provider"],sessionAttrs:{isSettingsPending:r.a.boolean,isSettingsPopulated:r.a.boolean,settingsError:r.a.object},syncedAttrs:{id:r.a.string,key:r.a.string,reverseKey:r.a.string,scrobbleKey:r.a.string,unscrobbleKey:r.a.string,type:r.a.string,flavor:r.a.string,automaticLibraryFolders:r.a.boolean,public:r.a.boolean},syncedRelations:{directories:{relationClass:s.a,rootPropertyName:"Directory",deferred:!0},settings:{relationClass:o.default,
rootPropertyName:"Setting",deferred:!0},actions:{relationClass:a.a,rootPropertyName:"Action",deferred:!0,setOptions:{remove:!1}}},defaults:{isSettingsPending:!0,isSettingsPopulated:!1}});t.a=u},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(85),l=n(1610),c=n.n(l),u=s.a.extend({className:"confirm-modal modal modal-sm fade",template:c.a,ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:o.a.extend({
"click .confirm-btn":"onConfirm"},s.a.prototype.events),whitelistedOptions:["title","message","confirmLabel","cancelLabel","hasDanger","hideCancel"],initialize:function(e){s.a.prototype.initialize.apply(this,arguments),this.async=e.async,this.data=o.a.pick(e,this.whitelistedOptions),this.promise=r.a.Deferred()},serializeData:function(){return o.a.defaults(this.data,{confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){s.a.prototype.onRender.apply(this,arguments),
setTimeout(o.a.bind(function(){this.ui.confirmBtn.focus()},this),this.focusDelay)},onHide:function(e){s.a.prototype.onHide.apply(this,arguments),this.promise.reject()},onConfirm:function(e){if(e.preventDefault(),this.options.requireDoubleConfirm&&!this.hasConfirmedOnce){this.hasConfirmedOnce=!0;var t=this.options.doubleConfirmMessage,n=this.options.doubleConfirmLabel;return t&&this.ui.doubleConfirmMessage.text(t),void(n&&this.ui.confirmLabel.text(n))}this.promise.resolve(),
this.async?this.ui.confirmBtn.addClass("active"):this.hide()}});t.a=u},function(e,t,n){"use strict";function i(e,t){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";var i=n(7),r=n.n(i),a=n(653),o=n(504),s=n(1510),l=n(1511),c=n(364),u=n(1512),d=n(1514),p=n(910),h=n(1515),f=n(505),v=n(1516),g=n(1517),m=n(911),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";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(27),v=(n(36),n(2231)),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 P=parseInt(M.paddingTop,10)||0,j=parseInt(M.paddingBottom,10)||0;D.height=S?m-P-j: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";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(7),a=n.n(r),o=n(63),s={xml:i("xml",{accept:"application/xml"}),json:i("json",{accept:"application/json"}),text:i("text")
};t.a=s},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(I.a)(e,b.m,n)}function a(e,t){var n=t.serverEntityID;return Object(I.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(I.a)(e,b.k,n)}function l(e,t){var n=t.providerEntityID;return Object(I.b)(e,b.k,n)}function c(e,t){var n=t.libraryEntityID;return Object(I.a)(e,b.c,n)}function u(e,t){
var n=t.hubEntityID;return Object(I.a)(e,b.b,n)}function d(e,t){var n=t.metadataListEntityID;return Object(I.a)(e,b.h,n)}function p(e,t){var n=t.metadataListEntityID;return Object(I.b)(e,b.h,n)}function h(e,t){var n=t.metadataItemEntityID;return Object(I.a)(e,b.g,n)}function f(e,t){var n=t.metadataItemEntityID;return Object(I.b)(e,b.g,n)}function v(e,t){var n=t.mediaSubscriptionEntityID;return Object(I.a)(e,b.e,n)}function g(e,t){var n=t.liveTVSessionEntityID;return Object(I.a)(e,b.d,n)}
function m(e,t){var n=t.playQueueItemEntityID;return Object(I.a)(e,b.j,n)}function y(e,t){var n=t.playlistItemEntityID;return Object(I.a)(e,b.i,n)}t.l=i,t.k=r,t.p=a,t.j=o,t.i=s,t.o=l,t.b=c,t.a=u,t.f=d,t.n=p,t.e=h,t.m=f,t.d=v,t.c=g,t.g=m,t.h=y;var b=n(43),I=n(656)},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(1799)),c=n.n(l);i.defaultProps={className:c.a.container},t.a=i
},function(e,t,n){"use strict";n.d(t,"m",function(){return y}),n.d(t,"c",function(){return b}),n.d(t,"b",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,"g",function(){return C}),n.d(t,"f",function(){return O}),n.d(t,"n",function(){return P}),n.d(t,"k",function(){return j}),n.d(t,"l",function(){return T}),n.d(t,"d",function(){return w}),n.d(t,"e",function(){return E}),n.d(t,"a",function(){return x})
;var i,r=n(6),a=n.n(r),o=n(7),s=n.n(o),l=n(39),c=n(18),u=n(29),d=n(15),p=n(203),h=n(687),f=n(688),v=n(1732),g=n(1733),m=n(1734),y=(Object(l.a)("app/saveSettings"),
Object(l.a)("app/saveLastTypeSource")),b=Object(l.a)("app/downloadServer"),I=Object(l.a)("app/discoverServers"),S=Object(l.a)("app/redirectToRoute"),M=Object(l.a)("app/redirectToHttp"),D=Object(l.a)("app/redirectToUrl"),C=Object(l.a)("app/redirectToHash"),O=Object(l.a)("app/preferInsecure"),P=Object(l.a)("app/switchAppLayout"),j=Object(l.a)("app/saveSettings",function(e){return{name:"deviceSettings",settings:e}}),T=Object(l.a)("app/saveSettings",function(e){return{name:"experienceSettings",
settings:e}}),w=Object(l.a)("app/toggleFullscreen",function(e){return{isFullscreen:!0}}),E=Object(l.a)("app/toggleFullscreen",function(e){return{isFullscreen:!1}}),x=a()({},p.d,(i={},i["app/saveSettings"]=function(e,t){var n=t.name,i=t.settings,r=e.get(n),o=a()({},i,{isSaving:!0,saveError:null});r.save(o).then(function(){r.set({isSaving:!1})},function(e){var t=e&&e.message||"";r.set({isSaving:!1,saveError:{message:t}})})},i["app/saveLastTypeSource"]=function(e,t,n){
var i,r=e.get("experienceSettings").get("lastTypeSource"),o=t.navigationType,s=t.machineIdentifier,l=t.providerIdentifier,c=t.directoryKey,u=a()({},r,(i={},i[o]={machineIdentifier:s,providerIdentifier:l,directoryKey:c},i));n(T({lastTypeSource:u}))},i["app/downloadServer"]=function(e,t){var n=new m.a({downloadType:t});c.a.trigger("show:modal",n)},i["app/discoverServers"]=function(e){c.a.trigger("discover:servers")},i[p.c]=function(e,t){var n=t.machineIdentifier
;e.get("servers").findServer(n).then(function(t){e.set({primaryServer:t,isWaitingForPrimaryServer:!1})},function(){u.a.warn("Unable to set primary server to:",n)})},i[p.b]=function(e){e.set({primaryServer:null,isWaitingForPrimaryServer:!0})},i[p.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(S({route:"needsUpdate",options:{serverID:i,replace:!0}}));else if(t.get("isPrimaryEligible")){
if(e.get("primaryServer")!==t){var r=t.toJSON();Object(d.c)("metrics").trackEvent({event:"client:selectserver",properties:a()({serverType:Object(f.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(S({route:"dashboard"}))}).fail(function(){n(S({route:"dashboard"}))})},i["app/redirectToRoute"]=function(e,t){var n=t.route,i=t.options;s.a.defer(function(){
c.a.trigger("navigate",n,i)})},i["app/redirectToHttp"]=function(){Object(g.a)()},i["app/redirectToUrl"]=function(e,t){var n=t.url;window.location.href=n},i["app/redirectToHash"]=function(e,t){var n=t.hash;window.location.hash=n},i["app/preferInsecure"]=function(){window.localStorage.setItem("preferInsecure","1")},i["app/switchAppLayout"]=function(){Object(v.a)("tv")},i["app/toggleFullscreen"]=function(e,t){var n=t.isFullscreen;e.get("isFullscreen")!==n&&e.set("isFullscreen",n)},i))
},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===ee)return n.apply(void 0,arguments);v.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 F}),n.d(t,"n",function(){return V}),n.d(t,"o",function(){
return H}),n.d(t,"p",function(){return Q}),n.d(t,"j",function(){return Y}),n.d(t,"i",function(){return G}),n.d(t,"h",function(){return W}),n.d(t,"k",function(){return K}),n.d(t,"e",function(){return q}),n.d(t,"d",function(){return Z}),n.d(t,"f",function(){return X}),n.d(t,"l",function(){return J}),n.d(t,"q",function(){return $}),n.d(t,"g",function(){return te})
;var a,o=n(6),s=n.n(o),l=n(12),c=n.n(l),u=n(13),d=n.n(u),p=n(7),h=n.n(p),f=n(39),v=n(29),g=n(19),m=n(15),y=n(92),b=n(672),I=n(991),S=n(993),M=n(377),D=n(378),C=n(705),O=n(532),P=n(376),j=n(534),T=n(76),w=n(190),E=n(99),x=n(1906),A=n(66),N=n(177),L=n(35),k=n(3),_=n(26),R=n(153),z="ui/player/playerLifecycle/startPlayback",U="ui/player/playerLifecycle/queuePlayback",B="ui/player/playerLifecycle/endPlayback",F=Object(f.a)(z),V=Object(f.a)("ui/player/playerLifecycle/startPrimaryExtraPlayback"),H=Object(f.a)("ui/player/playerLifecycle/startRadioPlayback"),Q=Object(f.a)("ui/player/playerLifecycle/startRelatedMixPlayback"),Y=Object(f.a)("ui/player/playerLifecycle/startExistingPlayQueuePlayback"),G=Object(f.a)("ui/player/playerLifecycle/queueRelatedMixPlayback"),W=Object(f.a)(U),K=Object(f.a)("ui/player/playerLifecycle/startLegacyChannelPlayback"),q=Object(f.a)("ui/player/playerControls/clearPlayerConfirmPlaybackPayload"),Z=Object(f.a)("ui/player/playerControls/clearPlayerConfirmOffsetPayload"),X=Object(f.a)(B),J=Object(f.a)(z,function(e){
var t=e.options,n=void 0===t?{}:t,i=c()(e,["options"]);return s()({},i,{metricsAction:T.H,options:s()({},n,{playAll:!0})})}),$=Object(f.a)(z,function(e){var t=e.options,n=void 0===t?{}:t,i=c()(e,["options"]);return s()({},i,{metricsAction:T.T,options:s()({},n,{shuffle:!0})})}),ee=void 0,te=(a={},a[z]=function(e,t,n){
var i=t.metadataItemEntityID,a=t.liveTVSessionEntityID,o=t.confirmPlayback,l=t.confirmOffset,c=t.startOffsetMilliseconds,u=void 0===c?null:c,d=t.startMediaIndex,p=void 0===d?null:d,h=t.openState,f=void 0===h?w.a:h,v=t.isPaused,g=void 0!==v&&v,y=t.extrasPrefixCount,b=t.playbackStartTime,O=void 0===b?Date.now():b,P=t.metricsPage,j=t.metricsContext,R=Object(C.a)(e,t),z=Object(M.a)(R),U=E.c(z),B=Object(N.c)(e,U),F=B.get("playQueue"),V=R.metadataItemModel,H=R.serverModel?R.serverModel.entityID():t.serverEntityID,Q=R.providerModel?R.providerModel.entityID():t.providerEntityID
;if(!F||!V||F.get("playQueueSelectedMetadataItemID")!==V.get("ratingKey")){if(!o&&F&&F.get("playQueueVersion")>1)return void B.set("confirmPlaybackPayload",t);var Y={serverEntityID:H,providerEntityID:Q,isOpen:!0,openState:f,isPlayQueueLoading:!0,isMediaLoading:!0,isPaused:g,startOffsetMilliseconds:u,startMediaIndex:p,playbackStartTime:O,metricsPage:P,metricsContext:j};if(a&&(Y.liveTVSession=A.c(e,{liveTVSessionEntityID:a})),V&&Object(x.a)(V)&&(Y.startMetadataItemEntityID=i),
!l&&V&&V.get("viewOffset")&&(Y.confirmOffsetPayload=t),Object(L.a)(function(){B.restoreDefaults(Y)}),!Y.confirmOffsetPayload){var G=!(u||!V||V.get("type")!==_.f),W=Object(I.a)(s()({},R,{extrasPrefixCount:G?y:void 0,playQueueModel:Object(S.a)(s()({},R,{playQueueType:z}))}));ee=W,W.done(r(W,B,function(t){B.set({isPlayQueueLoading:!1,playQueue:t}),Object(D.a)(e).startPlayback(B)})).fail(r(W,B,function(){B.restoreDefaults({hasError:!0,
errorMessage:Object(k.default)("An error occurred loading items to play.")})}));var K=t.metricsProperties||{};Object(m.c)("metrics").trackClick(s()({page:t.metricsPage,action:t.metricsAction||T.G,type:z,context:j},K))}}},a["ui/player/playerLifecycle/startPrimaryExtraPlayback"]=function(e,t,n){var i=t.options||{},r=A.e(e,t);n(F(s()({},t,{metadataItemEntityID:null,metricsAction:T.J,options:s()({},i,{metadataItemKey:r.get("primaryExtraKey"),type:"video"})})))},
a["ui/player/playerLifecycle/startRelatedMixPlayback"]=function(e,t,n){var r=t.options||{},a=A.e(e,t),o=i(a);n(F({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsAction:T.K,options:s()({},r,{type:Object(M.a)({metadataItemModel:a}),containerKey:o.get("containerKey")})}))},a["ui/player/playerLifecycle/startRadioPlayback"]=function(e,t,n){var i=A.e(e,t),r=i.get("stations");r.length&&n(F({metricsAction:T.K,
serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:r.at(0).entityID(),options:{type:Object(M.a)({metadataItemModel:i})}}))},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=E.c(r),d=A.i(e,t),p=Object(N.c)(e,u),h=Object(S.a)({providerModel:d,playQueueID:a,
playQueueType:r});return p.set({serverEntityID:n,providerEntityID:i,isOpen:!0,openState:w.a,isPlayQueueLoading:!0,isMediaLoading:!0,startOffsetMilliseconds:s,startMediaIndex:c}),Object(P.a)(h).done(function(){p.set({playQueue:h,isPlayQueueLoading:!1}),O.startPlayback(p)}).fail(function(){p.restoreDefaults({hasError:!0,errorMessage:Object(k.default)("An error occurred loading items to play.")})})},a["ui/player/playerLifecycle/queueRelatedMixPlayback"]=function(e,t,n){var r=A.e(e,t),a=i(r);n(W({
serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage,metricsAction:T.L,listType:Object(M.a)({metadataItemModel:r}),options:{next:!0,containerKey:g.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=h.a.omit(r.toJSON(),"id","sourceTitle","recommender","message","isUserPlaylistItem","children"),d=new b.a({},{server:i}),p=new y.a(u,{server:i,provider:d,channel:r.channel,containerKey:r.containerKey});e.set({legacyChannelProvider:d,legacyChannelMetadataItem:p}),n(F(s()({serverEntityID:i.entityID(),providerEntityID:d.entityID(),metadataItemEntityID:p.entityID(),
options:o},l)))},a[U]=function(e,t,n){var i=t.startOffsetMilliseconds,a=void 0===i?null:i,o=t.openState,l=void 0===o?w.a:o,c=Object(C.a)(e,t),u=Object(M.a)(c),d=E.c(u),p=Object(N.c)(e,d),h=!!c.playQueueID,f=c.serverModel?c.serverModel.entityID():t.serverEntityID,v=c.providerModel?c.providerModel.entityID():t.providerEntityID,g=p.get("playQueue"),y=!1;if(g&&p.get("providerEntityID")){var b=A.i(e,{providerEntityID:p.get("providerEntityID")
}),O=p.get("providerEntityID")===v,x=g.get("isUniversal"),_=b.server.get("isFullOwnedServer");y=O||x&&_}if(y)Object(I.a)(s()({},c,{playQueueModel:g})).done(Object(j.a)(p,function(){Object(D.a)(e).refreshRemotePlayQueue(p)})).fail(Object(j.a)(p,function(){p.set({hasError:!0,errorMessage:Object(k.default)("An error occurred loading items into the play queue.")})}));else{Object(L.a)(function(){p.restoreDefaults({serverEntityID:f,providerEntityID:v,isOpen:!0,openState:l,isPlayQueueLoading:!0,
isMediaLoading:!0,isPaused:!c.next,repeatAll:!!c.playQueueRepeat,startOffsetMilliseconds:a})}),g=Object(S.a)(s()({},c,{playQueueType:u}));var z=h?Object(P.a)(g):Object(I.a)(s()({},c,{next:!1,playQueueModel:g}));ee=z,z.done(r(z,p,function(t){p.set({isPlayQueueLoading:!1,playQueue:t}),Object(D.a)(e).startPlayback(p,h)})).fail(r(z,p,function(){n(Object(R.l)()),h?p.restoreDefaults():p.restoreDefaults({hasError:!0,errorMessage:Object(k.default)("An error occurred loading items to play.")})}))}
var U=c.next?T.I:T.b,B=t.metricsProperties||{};Object(m.c)("metrics").trackClick(s()({page:t.metricsPage,action:t.metricsAction||U,type:u},B))},a["ui/player/playerControls/clearPlayerConfirmPlaybackPayload"]=function(e,t){var n=t.playerType,i=(t.openState,Object(N.c)(e,n));Object(L.a)(function(){i.set("confirmPlaybackPayload",null)})},a["ui/player/playerControls/clearPlayerConfirmOffsetPayload"]=function(e,t){var n=t.playerType,i=(t.openState,Object(N.c)(e,n));Object(L.a)(function(){
i.restoreDefaults()})},a[B]=function(e,t,n){var i=t.playerType,r=Object(N.c)(e,i),a=Object(D.a)(e),o=r.get("liveTVSession");if(Object(L.a)(function(){n(Object(R.l)()),a.endPlayback(r),e.get("legacyChannelProvider")&&(e.unset("legacyChannelProvider"),e.unset("legacyChannelMetadataItem"))}),o){var s=g.join(["/media/subscriptions",o.id]);d.a.ajax(o.server.getXHROptions(s,{method:"DELETE"}))}},a)},function(e,t,n){"use strict";function i(e){return e.experienceSettings}t.a=i},function(e,t,n){
"use strict";var i=n(6),r=n.n(i),a=n(12),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(538),f=n.n(h),v=n(1007),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=n.n(y),I=n(711),S=n(54),M=(n(451),n(27)),D=n(1976),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.onScroll=function(e){if(e.target===r._scrollerRef.current){var t=e.target.scrollTop,n=e.target.scrollLeft,i=t!==r._currentScrollTop,a=n!==r._currentScrollLeft;(i||a)&&r._setScrollPosition({
scrollTop:t,scrollLeft:n}),r.props.onScroll&&r.props.onScroll(e)}},r.onScrollPositionChange=function(){r._animationFrameID=null,r.props.onScrollPositionChange({scrollTop:r._currentScrollTop,scrollLeft:r._currentScrollLeft})},r.onScrollTimeout=function(){r.setState({isScrolling:!1})},r.onScrollToUpdate=function(){r._updateScrollPosition(r._scrollToPosition),r.props.onScrollToUpdate&&r.props.onScrollToUpdate(r._scrollToPosition)},r.onScrollToComplete=function(){r._scrollToTween=null,
r._scrollToPosition=null,r.props.onScrollToComplete&&r.props.onScrollToComplete()},r.state={isScrolling:!1},r._scrollerRef=n.forwardedRef||b.a.createRef(),r._currentScrollTop=0,r._currentScrollLeft=0,r}return p()(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,i=this._scrollerRef.current;null!=t&&(i.scrollTop=t),null!=n&&(i.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:g.a.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={};var s=this._scrollerRef.current;i&&(o.scrollTop=Math.min(t,s.scrollHeight-s.clientHeight),this._scrollToPosition.scrollTop=s.scrollTop),
r&&(o.scrollLeft=Math.min(n,s.scrollWidth-s.clientWidth),this._scrollToPosition.scrollLeft=s.scrollLeft),this._cancelScrollTo(),this._scrollToTween=f.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.className,i=t.children,a=t.scrollDirection,s=t.autoScroll,l=t.compactScroller,c=t.enableChildrenProps,u=t.onScroll,d=t.onScrollPositionChange,p=(t.forwardedRef,t.smoothScroll,t.restoreScroll,t.smoothScrollDuration,t.scrollTop,t.scrollLeft,t.isScrollingTimeout,t.onScrollToUpdate,t.onScrollToComplete,
o()(t,["className","children","scrollDirection","autoScroll","compactScroller","enableChildrenProps","onScroll","onScrollPositionChange","forwardedRef","smoothScroll","restoreScroll","smoothScrollDuration","scrollTop","scrollLeft","isScrollingTimeout","onScrollToUpdate","onScrollToComplete"]));return b.a.createElement("div",r()({className:(n||"")+" "+(C.a.scroller||"")+" "+(C.a[a]||"")+" "+(s&&C.a.auto||"")+" "+(l&&C.a.compactScroller||""||""),ref:this._scrollerRef,onScroll:d?this.onScroll:u
},p),c?Object(I.a)(i,function(t){return b.a.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):i)},t}(y.Component);O.defaultProps={scrollDirection:S.VERTICAL,autoScroll:!1,smoothScroll:!0,restoreScroll:!1,smoothScrollDuration:400,enableChildrenProps:!1,isScrollingTimeout:100},t.a=b.a.forwardRef(function(e,t){return b.a.createElement(O,r()({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.separator;return a()("span",{className:t},void 0,n)}n.d(t,"a",function(){return u});var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2087)),c=n.n(l),u="\u2014";i.defaultProps={className:c.a.separator,separator:u},t.b=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,v=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(h.a,a()({className:m.a.emptyPage},b),s()("div",{className:t},void 0,!!d&&s()(f.a,{name:d,className:(m.a[u]||"")+" "+(n||"")
}),!!v&&s()("div",{className:i},void 0,v),!!g&&s()("div",{className:r},void 0,g),l),!!y&&s()("div",{className:o},void 0,y))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(71),f=n(25),v=n(23),g=n(2190),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:v.b.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){return e.ui.multiSelect
}t.a=i},function(e,t,n){"use strict";function i(){a.a.isFunction(this.initialize)&&this.initialize.apply(this,arguments)}var r=n(7),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";n.d(t,"g",function(){return i}),n.d(t,"n",function(){return r}),n.d(t,"U",function(){return a}),n.d(t,"j",function(){return o}),n.d(t,"P",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"y",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"G",function(){return d}),n.d(t,"T",function(){return p}),n.d(t,"H",function(){return h}),n.d(t,"J",function(){return f}),
n.d(t,"K",function(){return v}),n.d(t,"L",function(){return g}),n.d(t,"I",function(){return m}),n.d(t,"b",function(){return y}),n.d(t,"q",function(){return b}),n.d(t,"A",function(){return I}),n.d(t,"z",function(){return S}),n.d(t,"N",function(){return M}),n.d(t,"c",function(){return D}),n.d(t,"t",function(){return C}),n.d(t,"Y",function(){return O}),n.d(t,"B",function(){return P}),n.d(t,"V",function(){return j}),n.d(t,"X",function(){return T}),n.d(t,"D",function(){return w}),
n.d(t,"o",function(){return E}),n.d(t,"k",function(){return x}),n.d(t,"w",function(){return A}),n.d(t,"M",function(){return N}),n.d(t,"R",function(){return L}),n.d(t,"u",function(){return k}),n.d(t,"C",function(){return _}),n.d(t,"Q",function(){return R}),n.d(t,"E",function(){return z}),n.d(t,"h",function(){return U}),n.d(t,"s",function(){return B}),n.d(t,"m",function(){return F}),n.d(t,"a",function(){return V}),n.d(t,"S",function(){return H}),n.d(t,"Z",function(){return Q}),
n.d(t,"f",function(){return Y}),n.d(t,"v",function(){return G}),n.d(t,"r",function(){return W}),n.d(t,"d",function(){return K}),n.d(t,"l",function(){return q}),n.d(t,"p",function(){return Z}),n.d(t,"F",function(){return X}),n.d(t,"O",function(){return J}),n.d(t,"W",function(){return $}),n.d(t,"x",function(){return ee})
;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="edit",I="markAsWatched",S="markAsUnwatched",M="refresh",D="analyze",C="fixMatch",O="unmatch",P="merge",j="splitApart",T="sync",w="optimize",E="download",x="delete",A="getInfo",N="rate",L="selectStream",k="follow",_="mute",R="selectServer",z="optimizeDatabase",U="cleanBundles",B="emptyTrash",F="deleteServer",V="addLibrary",H="shareLibrary",Q="updateLibrary",Y="cancelLibraryUpdate",G="forceRefreshLibrary",W="editLibrary",K="analyzeLibrary",q="deleteLibrary",Z="downloadServer",X="optOutMetrics",J="remoteAccess",$="subscribe",ee="gift"
},function(e,t,n){"use strict";function i(e){var t={},n=p.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(6),o=n.n(a),s=n(12),l=n.n(s),c=n(362),u=n.n(c),d=n(7),p=n.n(d),h=n(75),f=n(19),v=n(1489),g=3e4,m=6e4,y=u.a.noConflict(),b=y.sync;y.sync=function(e,t,n){
var a=n.url,s=n.data,c=n.headers,u=l()(n,["url","data","headers"]),d=u.server||t.server||t,h=r(t,u),v=a||p.a.result(t,"syncUrl")||p.a.result(t,"url"),y=p.a.isObject(s)?f.stringifyParams(s):s,I=!!y&&y.indexOf("checkFiles=1")>-1,S=I||d.get("isPersonalCloudServer"),M=o()({data:y,dataType:"text",processData:!1,headers:p.a.extend(i(t),c),timeout:S?m:g},u);return p.a.isFunction(h.getXHROptions)?(M=h.getXHROptions(v,M),"cloudsync"===d.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)}},p.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(e){var t=e.children,n=s()(e,["children"]);return u.a.createElement("div",a()({className:p.a.modalHeader},n),t)}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(1978),p=n.n(d);t.a=i},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(5);n.n(r)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i="myPlex",r="node"},function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"d",function(){return r}),n.d(t,"e",function(){return a}),
n.d(t,"f",function(){return o}),n.d(t,"g",function(){return s}),n.d(t,"o",function(){return l}),n.d(t,"n",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"l",function(){return d}),n.d(t,"m",function(){return p}),n.d(t,"b",function(){return h}),n.d(t,"h",function(){return f}),n.d(t,"k",function(){return v}),n.d(t,"j",function(){return g}),n.d(t,"a",function(){return m})
;var i="32cc8bf5-b425-4582-a52d-71b4f1cf436b",r="b2403ac6-4885-4971-8b96-59353fd87c72",a="de789b83-9c5e-4472-bccf-791c69e67500",o="9eaa5152-320b-48e6-9d47-9492ba5e5b54",s="64ed42f8-259d-4957-8530-0fff2d846cd0",l="7c4200b1-a2ab-4803-adcd-6c36b22a9269",c="6f82ca43-6117-4e55-ae0e-5ea3b3e99a96",u="96cac76e-c5bc-4596-87eb-4fdfef9aaa11",d="4b522f91-ae89-4f62-af9c-76f44d8ef61c",p="d14556be-ae6d-4407-89d0-b83953f4789a",h="ef3cb855-8236-45c9-9afa-83e9c954001b",f="740a75d2-6dba-4317-ba68-ed3d619d4c7a",v="bb50c92f-b412-44fe-8d8a-b1684f212a44",g="300231e0-69aa-4dce-97f4-52d8c00e3e8c",m="43725019-9122-4a6d-bc50-bca06a411b7a"
},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(455),p=n.n(d);i.defaultProps={className:p.a.modalFooter},t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(12),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(29),y=n(203),b=n(333),I=n(184),S=n(2209),M={dispatchChangeBackground:b.a,dispatchResetBackground:b.c,dispatchGarbageCollectEntities:y.g},D=r()(I.a,{}),C=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.state={hasError:!1},r}return p()(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.componentDidCatch=function(e){m.a.error(e.stack),this.setState({hasError:!0})},t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeBackground,e.dispatchResetBackground,e.dispatchGarbageCollectEntities,e.disableBackgroundPreset,e.allowBackgroundLightPreset,
o()(e,["dispatchChangeBackground","dispatchResetBackground","dispatchGarbageCollectEntities","disableBackgroundPreset","allowBackgroundLightPreset"]));return this.state.hasError?D:v.a.createElement(S.a,t)},t}(f.Component);C.defaultProps={disableBackgroundPreset:!1,allowBackgroundLightPreset:!1},t.a=Object(g.b)(null,M)(C)},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(39),r=n(111),a=Object(i.a)(r.G),o=Object(i.a)(r._0),s=Object(i.a)(r.v),l=Object(i.a)(r.b),c=Object(i.a)(r.c),u=Object(i.a)(r._8),d=Object(i.a)(r.J),p=Object(i.a)(r.K)
},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=0,u=[],d=a.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",s.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()),r()(":focus").blur())},onHide:function(e){this.isHidden=!0,s.a.each(this.panes,function(e,t){var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(s.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(21),r=n(7),a=n.n(r),o=i.a.CollectionView.extend({appendHtml:function(e,t,n){return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):i.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[a.a.first(a.a.keys(e))];a.a.defer(a.a.bind(function(){this.itemWidth=t.$el.outerWidth(!0),this.itemHeight=t.$el.outerHeight(!0),this.itemMarginRight=parseInt(t.$el.css("margin-right"),10),this.itemMarginBottom=parseInt(t.$el.css("margin-bottom"),10),this.triggerMethod("measure",this)},this))}},getViewForModel:function(e){var t=this.children._indexByModel[e.cid];return this.children._views[t]},reorder:function(){
var e=this.children,t=this.collection.models,n=a.a.map(t,function(t,n){var i=e.findByModel(t);return i._index=n,i.el});this.$el.append(n)},onCollectionRendered:function(){this.measure&&this.measureList()}});t.a=o},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";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";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,n){"use strict";var i=n(47),r=function(){var e=document.createElement("canvas");return!!(e&&e.getContext&&e.getContext("2d"))}(),a={isHostedHttps:"https:"===window.location.protocol,hasConsole:!!(window.console&&window.console.log&&window.console.log.call),hasWebSocket:!!window.WebSocket,hasEventSource:!!window.EventSource,
hasReplaceState:!(!window.history||!window.history.replaceState),hasFileUpload:!!(window.File&&window.FileList&&window.FileReader),hasMediaSource:!(!window.MediaSource&&!window.WebKitMediaSource),hasObjectUrl:function(){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:r,hasWebGL:function(){if(!r)return!1;var e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");return!!t&&t instanceof window.WebGLRenderingContext}(),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=a},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(7),o=n.n(a),s=n(654),l=n.n(s),c=n(29),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"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(19),l=n(17),c=n(16),u=n(65),d=n(1566),p=n(308),h=n(260),f=n(927),v=n(510),g=n(309),m=n(261),y=n(928),b=n(1567),I=n(91),S=n(121),M=n(63),D=n(38),C=n(43),O=n(3),P=n(26),j=n(151),T=n(1570),w=n(1572),E=n(1574),x=n(1576),A=l.a.extend({name:"MetadataModel",context:["server","provider","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],
responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:C.g,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,t=void 0;if(e.source){var n=Object(y.a)(e.source),i=n.serverIdentifier;i!==this.server.get("machineIdentifier")&&(t=Object(D.a)(C.m,i))}return Object(D.a)(this.entityType,e.key||this.cid,t,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new h.a,mergeStrategy:x.a,
responseType:function(){var e=this.get("key");return e&&e.indexOf("/system/services/url/lookup")>-1?u.a.xml:Object(v.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")&&!this.server.supports("truePlaylistsPath")?"/library/metadata/"+this.get("ratingKey"):o.a.result(this,"url")},cacheKey:function(e){this.channel&&(e=this.normalizeChannelKey(e))
;var t=this.extractChildrenKey(e.key);return e.source&&(t.key=e.source+t.key),this.server&&this.server.getScopedKey(t.key)},sessionAttrs:{isPreFetched:c.a.boolean,isStreamChangeInProgress:c.a.boolean,metadataState:c.a.string,mediaState:c.a.string,indirectHttpHeaders:c.a.object,isSettingsUpdating:c.a.boolean,settingsUpdateError:c.a.object,viewCountIncrementedByPlayQueueItemID:c.a.string},syncedAttrs:{elementName:c.a.string,ratingKey:c.a.string,parentRatingKey:c.a.string,
grandparentRatingKey:c.a.string,key:c.a.string,childrenKey:c.a.string,parentKey:c.a.string,grandparentKey:c.a.string,primaryExtraKey:c.a.string,augmentationKey:c.a.string,guid:c.a.string,source:c.a.string,attribution:c.a.string,librarySectionID:c.a.string,librarySectionTitle:c.a.string,librarySectionUUID:c.a.string,librarySectionKey:c.a.string,type:c.a.string,subtype:c.a.string,title:c.a.string,titleSort:c.a.string,originalTitle:c.a.string,parentTitle:c.a.string,grandparentTitle:c.a.string,
year:c.a.string,minYear:c.a.string,maxYear:c.a.string,tagline:c.a.string,summary:c.a.string,studio:c.a.string,contentRating:c.a.string,originallyAvailableAt:c.a.string,thumb:c.a.string,parentThumb:c.a.string,grandparentThumb:c.a.string,banner:c.a.string,art:c.a.string,parentArt:c.a.string,grandparentArt:c.a.string,hero:c.a.string,theme:c.a.string,parentTheme:c.a.string,grandparentTheme:c.a.string,chapterSource:c.a.string,ratingImage:c.a.string,audienceRating:c.a.float,
audienceRatingImage:c.a.string,rating:c.a.float,userRating:c.a.float,playbackSpeed:c.a.float,index:c.a.integer,parentIndex:c.a.integer,absoluteIndex:c.a.integer,duration:c.a.integer,viewOffset:c.a.integer,viewCount:c.a.integer,childCount:c.a.integer,leafCount:c.a.integer,viewedLeafCount:c.a.integer,ratingCount:c.a.integer,mediaCount:c.a.integer,mediaCountOptimized:c.a.integer,extraType:c.a.integer,lastViewedAt:c.a.integer,addedAt:c.a.integer,updatedAt:c.a.integer,deletedAt:c.a.integer,
Geolocation:c.a.object,url:c.a.string,playlistID:c.a.integer,playlistType:c.a.string,specialPlaylistType:c.a.string,radio:c.a.boolean,smart:c.a.boolean,readOnly:c.a.boolean,icon:c.a.string,composite:c.a.string,durationInSeconds:c.a.integer,skipChildren:c.a.boolean,skipParent:c.a.boolean,skipDetails:c.a.boolean,subscriptionID:c.a.string,saved:c.a.boolean,grandparentSubscriptionID:c.a.string,subscriptionType:c.a.string,grandparentSubscriptionType:c.a.string,Channel:c.a.array,Topic:c.a.array,
onAir:c.a.boolean,Media:c.a.array,Collection:c.a.array,Director:c.a.array,Producer:c.a.array,Writer:c.a.array,Genre:c.a.array,Mood:c.a.array,Country:c.a.array,Label:c.a.array,Role:c.a.array,Location:c.a.array,Tag:c.a.array,Autotag:c.a.array},sessionRelations:{children:function(){return{relationClass:n(107).default}}},syncedRelations:{chapters:{relationClass:T.a,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:E.a,rootPropertyName:"Overlay",deferred:!0},preferences:{
relationClass:p.a,rootPropertyName:"Preferences",deferred:!0},onDeck:function(){return{relationClass:A,rootPropertyName:"OnDeck",deferred:!0}},related:function(){var e={skipCache:!0};return this.relatedOptions&&o.a.extend(e,this.relatedOptions),{relationClass:n(221).default,rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(107).default,rootPropertyName:"PopularLeaves",deferred:!0}},extras:function(){return{relationClass:n(107).default,
rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:s.join([e.key,"extras"])}}}},concerts:{relationClass:w.a,rootPropertyName:"Concert",deferred:!0},stations:function(){return{relationClass:n(311).default,rootPropertyName:"Stations",deferred:!0}},transcodeSession:{relationClass:d.a,rootPropertyName:"TranscodeSession",deferred:!0}},derivedAttrs:{identifier:function(){return this.identifier},serverEntityID:function(){if(!this.state)return null;var e=this.get("source")
;if(e){var t=Object(y.a)(e),n=t.serverIdentifier;return Object(D.a)(C.m,n)}return this.server?this.server.entityID():null},providerEntityID:function(){if(!this.state)return null;var e=this.get("source");if(e){var t=Object(y.a)(e),n=t.providerIdentifier;return Object(D.a)(C.k,n,this.get("serverEntityID"))}return this.provider?this.provider.entityID():null},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")===P.i&&!this.get("radio")},isFolder:function(){return/\/folder\?parent\=/.test(this.get("key"))},isExtra:function(){return!!this.get("extraType")},isPremium:function(){var e=this.get("Media")||[];return o.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=o.a.first(o.a.first(t).Part),i=n&&n.key;if(i)return function(){var t=s.join(i,{download:1});return e.server.resolveUrl(t,{appendToken:!0})}}}},defaults:{isStreamChangeInProgress:!1,isSettingsUpdating:!1,settingsUpdateError:null,rating:0,onAir:!1,skipDetails:!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=o.a.extend({},this._populatedParams,e.data)),e.usePopulatedParams&&(e.data=this._populatedParams),l.a.prototype.fetch.call(this,e)},augmentResponseText:function(e,t){return t===u.a.xml?Object(S.b)(e):e},augmentResponse:function(e,t){var n=this,i=e[this.rootPropertyName];i&&(Array.isArray(i)&&(i=i[0]),i.attribution=e.attribution,i.librarySectionID=e.librarySectionID,i.librarySectionTitle=e.librarySectionTitle,i.librarySectionUUID=e.librarySectionUUID,
i.augmentationKey=e.augmentationKey),this.responseContext.forEach(function(t){var r=e[t]||i&&i[t];void 0!==r&&n.setContext(t,r)});var r=i||e,a=r.Related,s=r.OnDeck,l=r.Preferences,c=this.extractChildrenKey(r.key);return c.childrenKey&&(r.childrenKey=c.childrenKey,r.key=c.key),r.Media=this.convertMediaItems(r.Media),r.Channel=this.convertChannelItems(r.Channel),r.Topic=this.convertTopicItems(r.Topic),a&&(r.RelatedHubs=o.a.compact([].concat(a.Hub,a.Directory))),s&&(r.OnDeck=s.Metadata),
l&&(r.Preferences=l.Setting),this.normalize(r)},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=s.join(e,{includeRelated:1})),this.get("children").set("containerKey",e))},convertMediaItems:function(e){var t=M.a.parseArray(e);return o.a.each(t,function(e){I.a.parseBoolean(e,["indirect","optimizedForStreaming","premium","premiere","selected"]),
I.a.parseInteger(e,["id","duration","width","height","bitrate","audioChannels","proxyType","beginsAt","endsAt","beginOffset","startOffsetSeconds","endOffsetSeconds"]),null==e.id&&null==e.uuid&&(e.uuid=e.container+"-"+e.protocol+"-"+e.audioCodec),I.a.parseArray(e,"Part"),o.a.each(e.Part,function(e){null!=e.exists&&(e.exists=M.a.parseBoolean(e.exists)),null!=e.accessible&&(e.accessible=M.a.parseBoolean(e.accessible)),I.a.parseInteger(e,["id","duration","size"]),
I.a.parseBoolean(e,"optimizedForStreaming"),I.a.parseEncodedString(e,"file"),I.a.parseArray(e,"Stream"),o.a.each(e.Stream,function(e){I.a.parseBoolean(e,["anamorphic","selected","default","forced","timed","cabac","hasScalingMatrix","headerStripping"]),I.a.parseInteger(e,["id","index","streamType","duration","width","height","bitrate","bitDepth","level","refFrames","samplingRate","channels","minLines"]),I.a.parseFloat(e,"frameRate")})})}),this.addNoneSubtitlesStreams(t)},
convertChannelItems:function(e){var t=M.a.parseArray(e);return o.a.each(t,function(e){I.a.parseBoolean(e,["followed","muted"])}),t},convertTopicItems:function(e){var t=M.a.parseArray(e);return o.a.each(t,function(e){I.a.parseBoolean(e,["followed","muted"])}),t},addNoneSubtitlesStreams:function(e){var t=j.a.get("subtitles");return o.a.each(e,function(e){var n=o.a.first(e.Part);if(n&&n.Stream&&Object(g.a)(e)){var i=Object(m.a)(e,{streamType:t.id});if(!i.find(function(e){return e.id===f.a})){
var r=i.find(function(e){return e.selected}),a={id:0,streamType:t.id,language:Object(O.default)("None")};r||(a.selected=!0),n.Stream.unshift(a)}}}),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(P.q)(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=r.a.Deferred()
;if(!e||!t)return i.reject(this).promise();if(!e.indirect)return i.resolve(this).promise();if(t.postURL){var a=o.a.find([this.server,this.server.parent.get("primaryServer")],function(e){return e&&e.get("isConnected")&&e.get("isFullServer")});if(a)return this.resolvePostUrl(e,t,a)}var s=t.key;this.server.get("isCloud")&&(s=this.server.swizzleNodeUrl(s));var l=r.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,a=r.a.Deferred(),o=t.key,l=t.postURL,c=n.getXHROptions("/system/proxy");c.headers=c.headers||{},c.headers["X-Plex-Url"]=l;var u=r.a.ajax(c);return u=u.then(function(e,t,n){var a=s.join(o,{postURL:l});i.server.get("isCloud")&&(a=i.server.swizzleNodeUrl(a));var c=i.server.getXHROptions(a);return c.type="POST",c.headers=c.headers||{},c.data=n.getAllResponseHeaders()+"\r\n"+e,r.a.ajax(c)}),u.done(function(n,r,o){
i.mergeIndirectResponse(n,e,t)?a.resolve(i):a.reject(i)}),u.fail(function(){a.reject(i)}),a.promise()},mergeIndirectResponse:function(e,t,n){var i=M.a.parseXML(Object(S.b)(e));if(!(i&&i.Metadata&&i.Metadata.Media&&i.Metadata.Media.Part))return!1;var r=o.a.first(this.convertMediaItems(i.Metadata.Media)),a=M.a.parseArray(r.Part),s=o.a.first(a);if(!r||!s)return!1;if(r.indirect=!1,o.a.extend(t,o.a.omit(r,"Part")),o.a.extend(n,s),a.length>1){var l;(l=t.Part).push.apply(l,a.slice(1))}
if(i.httpHeaders){for(var c,u=new RegExp("([^=]+)=([^&]+)&?","g"),d={};c=u.exec(i.httpHeaders);)c[1]in d?(Array.isArray(d[c[1]])||(d[c[1]]=[d[c[1]]]),d[c[1]].push(c[2])):d[c[1]]=c[2];this.set("indirectHttpHeaders",d)}return!0},batchAdd:function(e,t,n){var i=o.a.map(e,function(e){return e.get("ratingKey")}),a=s.join(["/library/metadata",i.join(","),t,"add"],{tag:n}),l=this.server.getXHROptions(a,{type:"PUT"});return r.a.ajax(l)},getDownloadUrl:function(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.get("Media")[e];if(t){var n=o.a.first(t.Part),i=n&&n.key;if(i){var r=s.join(i,{download:1});return this.server.resolveUrl(r,{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=o.a.first(t.Part);if(n)return n.file}},getLocation:function(){var e=this.get("Location");return e.length?o.a.first(e).path:this.getFilepath()},
getMediaKey:function(){var e=o.a.first(this.get("Media"));if(e){var t=o.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(b.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=A},function(e,t,n){"use strict";var i=n(1),r=n.n(i),a=r.a.shape({key:r.a.string,
hubKey:r.a.string,title:r.a.string,icon:r.a.string,type:r.a.string,subtype:r.a.string,agent:r.a.string,updatedAt:r.a.number,scannedAt:r.a.number,context:r.a.string});t.a=a},function(e,t,n){"use strict";var i=n(304),r=n.n(i),a=n(7),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){return s.a.createElement(l.a,a()({iconComponent:c.a},e))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(1980),c=n(25);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(3037)),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&&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(65)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return a});var i="news",r="podcast",a="webshow"},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(239),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";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,"r",function(){return m}),n.d(t,"n",function(){return y}),n.d(t,"d",function(){return b}),n.d(t,"o",function(){return I}),n.d(t,"s",function(){return S}),n.d(t,"i",function(){return M}),n.d(t,"p",function(){return D
}),n.d(t,"j",function(){return C}),n.d(t,"f",function(){return O}),n.d(t,"e",function(){return P}),n.d(t,"h",function(){return j}),n.d(t,"l",function(){return T}),n.d(t,"g",function(){return w}),n.d(t,"k",function(){return E}),n.d(t,"m",function(){return x})
;var i,r=n(6),a=n.n(r),o=n(39),s=n(18),l=n(109),c=n(223),u=n(2005),d=n(66),p=n(35),h="server/confirmRelayConnection",f="server/updateActivity",v="server/finishActivity",g=Object(o.a)("server/testServer"),m=Object(o.a)("server/testServers"),y=Object(o.a)("server/setRelayReminder"),b=Object(o.a)(h),I=Object(o.a)("server/startActivity"),S=Object(o.a)(f),M=Object(o.a)(v),D=Object(o.a)("server/startSyntheticActivity"),C=Object(o.a)("server/finishSyntheticActivity"),O=Object(o.a)("server/eventConnectionOpen"),P=Object(o.a)("server/eventConnectionClose"),j=Object(o.a)("server/fetchProviders"),T=Object(o.a)("server/populateProviders"),w=Object(o.a)("server/fetchLibraries"),E=Object(o.a)("server/populateLibraries"),x=(i={},
i["server/setRelayReminder"]=function(e,t){var n=e.get("experienceSettings"),i=n.get("relayReminders"),r=i[t]||{};i[t]=Object(u.a)(r.times),n.save("relayReminders",a()({},i))},i[h]=function(e,t){},i["server/startActivity"]=function(e,t,n){var i=Object(d.j)(e,t),r=t.activity;i.get("activities").add([r],{parse:!0}),r.synthetic||n(C({serverEntityID:t.serverEntityID,activityType:r.type}))},i[f]=function(e,t){Object(d.j)(e,t).get("activities").add([t.activity],{parse:!0,merge:!0})},
i[v]=function(e,t){Object(d.j)(e,t).get("activities").remove(t.activity.uuid)},i["server/startSyntheticActivity"]=function(e,t,n){Object(p.a)(function(){n(I({serverEntityID:t.serverEntityID,activity:{type:t.activityType,synthetic:!0,uuid:t.activityType+"-"+Date.now()}}))})},i["server/finishSyntheticActivity"]=function(e,t){var n=Object(d.j)(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(d.k)(e,t),i=Object(d.j)(e,t),r=i.get("activities");n.set("hasEventConnection",!0),n.get("isFullOwnedServer")&&r.fetch()},i["server/eventConnectionClose"]=function(e,t){Object(d.k)(e,t).set("hasEventConnection",!1)},i["server/fetchProviders"]=Object(l.a)({key:"providers",getModel:d.k}),i["server/populateProviders"]=Object(c.a)({key:"providers",fetchActionType:"server/fetchProviders",getModel:d.k}),i["server/fetchLibraries"]=Object(l.a)({key:"libraries",getModel:d.j}),
i["server/populateLibraries"]=Object(c.a)({key:"libraries",fetchActionType:"server/fetchLibraries",getModel:d.j}),i["server/testServer"]=function(e,t){var n=Object(d.k)(e,t);s.a.trigger("test:server",n)},i["server/testServers"]=function(){s.a.trigger("test:servers")},i)},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(d.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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(20),p=n(49),h=n(2200),f=n.n(h);i.defaultProps={kind:p.DEFAULT,isDisabled:!1},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(2216)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderRight},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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(2222),c=n(3),u=n(25);i.defaultProps={iconComponent:u.a},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(2884)),c=n.n(l);i.defaultProps={className:c.a.leftTitle},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){var n=e.exports={version:"2.5.4"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=n.n(i),a=n(19),o=n(17),s=n(16),l=n(310),c=n(65),u=n(510),d=n(121),p=n(63),h=n(38),f=n(43),v=n(311),g=o.a.extend({
mixins:[l.a],name:"MetadataListModel",context:["server","provider","section","metadataItem","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","excludeFields","excludeElements","excludeAllLeaves","includeRelated","includeCollections"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:f.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state
;return Object(h.a)(this.entityType,e.containerKey||e.key||this.cid,(this.provider||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?a.join(e,t):e},sessionAttrs:{isMetadataList:s.a.boolean,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:{key:s.a.string,librarySectionID:s.a.string,totalSize:s.a.integer,
viewGroup:s.a.string,title:s.a.string,thumb:s.a.string,art:s.a.string,banner:s.a.string,theme:s.a.string,allowSync:s.a.boolean},syncedRelations:{metadataItems:{relationClass:v.default,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===c.a.xml?Object(d.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=p.a.parseArray(e.Metadata),a=p.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)),a&&this._totalSizeAdjustment&&(e.totalSize=a-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 F}),n.d(t,"a",function(){return V});var i=n(6),r=n.n(i),a=n(12),o=n.n(a),s=n(77),l=n(7),c=n.n(l),u=n(90),d=n(36),p=n(29),h=n(19),f=n(15),v=n(430),g=n(40),m=n(17),y=n(657),b=n(16),I=n(57),S=n(1581),M=n(671),D=n(658),C=n(432),O=n(935),P=n(260),j=n(440),T=n(97),w=n(316),E=n(38),x=n(43),A=n(673),N=n(439),L=n(515),k=n(306),_=n(175),R={PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",
UNAUTHORIZED:"unauthorized"},z={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},U={SECONDARY:"secondary"},B=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],F="ok",V="none",H=m.a.extend({mixins:[D.a],name:"ServerModel",entityType:x.m,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(E.a)(this.entityType,e.machineIdentifier||this.cid)},
idAttribute:"machineIdentifier",connectionTestTimeout:1e4,responseType:function(){return Object(T.a)(this)},mergeStrategy:C.a,cache:new P.a,persistInCache:!0,sessionAttrs:{connectionTestResult:b.a.oneOf(R.PENDING,R.CONNECTED,R.UNAVAILABLE,R.UNAUTHORIZED).isRequired,promiseState:b.a.oneOf(z.PENDING,z.RESOLVED,z.REJECTED).isRequired,sections:b.a.instanceOf(M.a).isRequired,playlists:b.a.instanceOf(S.a).isRequired,isShared:b.a.boolean.isRequired,isBundled:b.a.boolean.isRequired,
isCloud:b.a.boolean.isRequired,isMerged:b.a.boolean.isRequired,isInstallingServerUpdate:b.a.boolean.isRequired,superToken:b.a.string,accessToken:b.a.string,sourceTitle:b.a.string,publicAddressMatches:b.a.boolean,httpsRequired:b.a.boolean,presence:b.a.boolean,home:b.a.boolean,synced:b.a.boolean,createdAt:b.a.integer,lastSeenAt:b.a.integer,ownerId:b.a.integer,hasEventConnection:b.a.boolean,serverClass:b.a.oneOf(U.SECONDARY),onlyXML:b.a.boolean,isProvidersPending:b.a.boolean.isRequired,
isProvidersPopulated:b.a.boolean.isRequired,providersError:b.a.object},sessionRelations:{activeConnection:{relationClass:k.a,deferred:!0},connections:{relationClass:L.b,options:function(){return{server:this}}}},syncedRelations:{providers:{relationClass:O.a,rootPropertyName:"MediaProvider",options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:b.a.string,friendlyName:b.a.string,startState:b.a.string,version:b.a.string,platform:b.a.string,platformVersion:b.a.string,
sync:b.a.boolean,backgroundProcessing:b.a.boolean,multiuser:b.a.boolean,transcoderLyrics:b.a.boolean,myPlex:b.a.boolean,myPlexMappingState:b.a.string,myPlexSigninState:b.a.oneOf(F,V,"invalid"),myPlexSubscription:b.a.boolean,myPlexUsername:b.a.string,transcoderPhoto:b.a.boolean,transcoderAudio:b.a.boolean,transcoderVideo:b.a.boolean,transcoderVideoRemuxOnly:b.a.boolean,transcoderSubtitles:b.a.boolean,transcoderActiveVideoSessions:b.a.integer,allowMediaDeletion:b.a.boolean,
allowCameraUpload:b.a.boolean,allowChannelAccess:b.a.boolean,allowSync:b.a.boolean,diagnostics:b.a.list,companionProxy:b.a.boolean,updater:b.a.boolean,isDesktop:b.a.boolean,photoAutoTag:b.a.boolean,itemClusters:b.a.boolean,updatedAt:b.a.integer,countryCode:b.a.string,ownerFeatures:b.a.list,mediaProviders:b.a.integer,maxUploadBitrate:b.a.integer,maxUploadBitrateReason:b.a.string,maxUploadBitrateReasonMessage:b.a.string,streamingBrainABRVersion:b.a.integer,livetv:b.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(A.a)(this.get("version"))},isConnected:function(){return this.get("connectionTestResult")===R.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===R.UNAVAILABLE},isUnauthorized:function(){
return this.get("connectionTestResult")===R.UNAUTHORIZED},isPending:function(){return this.get("promiseState")===z.PENDING},isPrivateConnection:function(){var e=this.get("activeConnection");return!(!e||!e.get("isPrivate"))},isResolved:function(){return this.get("promiseState")===z.RESOLVED},isRejected:function(){return this.get("promiseState")===z.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")===U.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!(!I.a.get("allowCloudSyncServers")&&this.get("isCloudSyncServer"))&&(!(!I.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")===F: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")===R.PENDING?null:this.get("isConnected")},available:function(){return this.get("connectionTestResult")===R.PENDING?null:!this.get("isUnavailable")},authorized:function(){return this.get("connectionTestResult")===R.PENDING?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{connectionTestResult:R.PENDING,promiseState:z.PENDING,sections:new M.a([],{server:this}),playlists:new S.a({},{server:this}),
isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1,isInstallingServerUpdate:!1,hasEventConnection:!1,sync:!1,backgroundProcessing:!1,allowChannelAccess:!1,updater:!0,ownerFeatures:[],isProvidersPending:!0,isProvidersPopulated:!1,providersError:null}},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=c.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 m.a.prototype.updateEntity.apply(this,arguments)},fetch:function(){
return s.c.Model.prototype.fetch.apply(this,arguments)},resolveUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Object(N.a)(e))return e;var n=void 0;n=t.useRelativeUrl?this.get("isMobileServer")?"http://127.0.0.1:"+this.getLoopbackPort()+"/":"":t.baseUrl||this.url(t.connection);var i=this.get("accessToken"),r=c.a.extend({},t.params);return t.appendHeaders&&c.a.defaults(r,this.getHeaders()),t.appendToken&&i&&(r["X-Plex-Token"]=i),h.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=t.baseUrl,a=o()(t,["headers","baseUrl"]);return r()({url:this.resolveUrl(e,{baseUrl:i}),dataType:"text",headers:c.a.extend(this.getHeaders(),n),allowHeadersInUrl:!0,allowBlacklistedMethodHeaders:this.supports("allowBlacklistedMethodHeaders")},a)},getHeaders:function(){
var e=v.a.getInstance(),t=c.a.clone(e),n=this.get("accessToken");n&&(t["X-Plex-Token"]=n);var i=Object(f.c)("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 k.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(p.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")===z.REJECTED&&this._reset(),g.a.execute("testServerConnection",t).done(this.onConnectionTestSuccess.bind(this)).fail(this.onConnectionTestError.bind(this))},abortAllConnectionTests:function(){var e=this,t=this.get("connections");Object(p.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}
;g.a.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this;if(this._identityPromise)return this._identityPromise;var n=g.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");p.a.warn("[Identity] %s and %s (cached) collide",e,i),
n.get("isConnected")||!this.get("isConnected")?(Object(p.a)("[Identity] Merging %s into %s (cached)",e,i),n.merge(this)):(Object(p.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),I.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")&&B.indexOf(e)>-1},supports:function(e){var t=this.get(e);if(c.a.isBoolean(t))return t;var n=_.a[e]
;return null!=n&&this.isVersionOrNewer(n)},isVersionOrNewer:function(e){var t=this.get("shortVersion");return!e||Object(w.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(u.a.isHostedHttps&&!I.a.get("allowMixedContent"))return!1
;var e=Object(f.c)("appModel").get("settings"),t=e.get("allowHttpFallback"),n=t===j.a.ALWAYS,i=t===j.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",z.PENDING),this._resetPopulate(),this.releaseCapturedChangeEvents()},_resolve:function(e){var t=c.a.extend({connectionTestResult:R.CONNECTED,promiseState:z.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),I.a.get("shouldCreateStateTree")&&this.updateState(),this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections")
;t.hasOnlyFailedConnections()&&p.a.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?R.UNAUTHORIZED:R.UNAVAILABLE,i=c.a.extend({connectionTestResult:n,promiseState:z.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")&&p.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this._resolve(r()({activeConnection:t},t.get("serverAttrs"))),
I.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(p.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(p.a)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),r.id)}else p.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:R,promiseStates:z,serverClasses:U});Object(y.a)(H,function(){return{relationClass:Object(f.c)("ServerFlexModel"),options:{server:this}}}),t.c=H},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.getModel
;return Object(l.a)(a()({},e,{fetch:function(e,i){var r=n(e,i);return(t?r.get(t):r).fetch(i.options).then(null,function(e,t){return s.a.Deferred().reject(t).promise()})}}))}t.a=i;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(957)},function(e,t,n){"use strict";function i(e){return e}var r=n(53);n.n(r),n(36),n(431);t.a=i},function(e,t,n){"use strict";n.d(t,"z",function(){return i}),n.d(t,"n",function(){return r}),n.d(t,"t",function(){return a}),n.d(t,"Q",function(){return o}),n.d(t,"D",function(){
return s}),n.d(t,"A",function(){return l}),n.d(t,"C",function(){return c}),n.d(t,"B",function(){return u}),n.d(t,"o",function(){return d}),n.d(t,"L",function(){return p}),n.d(t,"q",function(){return h}),n.d(t,"N",function(){return f}),n.d(t,"u",function(){return v}),n.d(t,"R",function(){return g}),n.d(t,"_5",function(){return m}),n.d(t,"h",function(){return y}),n.d(t,"p",function(){return b}),n.d(t,"M",function(){return I}),n.d(t,"_1",function(){return S}),n.d(t,"_6",function(){return M}),
n.d(t,"i",function(){return D}),n.d(t,"H",function(){return C}),n.d(t,"f",function(){return O}),n.d(t,"x",function(){return P}),n.d(t,"T",function(){return j}),n.d(t,"Z",function(){return T}),n.d(t,"k",function(){return w}),n.d(t,"l",function(){return E}),n.d(t,"_2",function(){return x}),n.d(t,"_3",function(){return A}),n.d(t,"_4",function(){return N}),n.d(t,"_9",function(){return L}),n.d(t,"m",function(){return k}),n.d(t,"_10",function(){return _}),n.d(t,"U",function(){return R}),
n.d(t,"g",function(){return z}),n.d(t,"O",function(){return U}),n.d(t,"r",function(){return B}),n.d(t,"y",function(){return F}),n.d(t,"G",function(){return V}),n.d(t,"_0",function(){return H}),n.d(t,"v",function(){return Q}),n.d(t,"b",function(){return Y}),n.d(t,"c",function(){return G}),n.d(t,"_8",function(){return W}),n.d(t,"J",function(){return K}),n.d(t,"K",function(){return q}),n.d(t,"S",function(){return Z}),n.d(t,"w",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,"Y",function(){return te}),n.d(t,"F",function(){return ne}),n.d(t,"E",function(){return ie}),n.d(t,"s",function(){return re}),n.d(t,"P",function(){return ae}),n.d(t,"X",function(){return oe}),n.d(t,"_7",function(){return se}),n.d(t,"j",function(){return le}),n.d(t,"I",function(){return ce}),n.d(t,"V",function(){return ue}),n.d(t,"W",function(){return de})
;var i="INIT_DISCOVER_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",P="FETCH_TIMELINE_DETAILS",j="POPULATE_TIMELINE_DETAILS",T="RESET_EPG_SETTINGS",w="FETCH_EPG_COUNTRIES",E="FETCH_EPG_LANGUAGES",x="SELECT_EPG_COUNTRY",A="SELECT_EPG_LANGUAGE",N="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",F="INDICATE_INTEREST_IN_PERSONAL_CLOUD_SERVER",V="INIT_QUICK_SEARCH",H="RESET_QUICK_SEARCH",Q="FETCH_QUICK_SEARCH",Y="CHANGE_SEARCH_QUERY",G="CHANGE_SEARCH_SETTINGS",W="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"
},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(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2011),u=n.n(c);i.defaultProps={className:u.a.buttonBar},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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(73),c=n(2191),u=n.n(c);t.a=i},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(12),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(20),m=n(207),y=n(710),b=n(2213),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.hasLabel,
e.tooltipAttachment),s=e.hideOnPress,l=e.onPress,c=o()(e,["children","tooltip","className","hasLabel","tooltipAttachment","hideOnPress","onPress"]);return v.a.createElement(m.a,r()({className:i,"aria-label":n,component:g.a,tooltip:n,tooltipClassName:I.a[a],hideOnPress:s,onPress:l},c),t)},t}(f.Component);S.defaultProps={className:I.a.toolbarButton,tooltipAttachment:y.BOTTOM_CENTER},t.a=S},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){
return e.metadataItems});t.a=a},function(e,t,n){"use strict";function i(e,t){var n=t.searchResultEntityID;return Object(r.a)(e,a.SEARCH_RESULT,n)}t.g=i;var r=n(656),a=n(224),o=n(66);n.d(t,"a",function(){return o.a}),n.d(t,"b",function(){return o.b}),n.d(t,"c",function(){return o.e}),n.d(t,"d",function(){return o.f}),n.d(t,"e",function(){return o.h}),n.d(t,"f",function(){return o.i}),n.d(t,"h",function(){return o.j}),n.d(t,"i",function(){return o.k}),n.d(t,"j",function(){return o.m}),
n.d(t,"k",function(){return o.o}),n.d(t,"l",function(){return o.p})},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1959),p=n(270);t.a=i},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(273),b=n(20),I=n(226),S=n(2219),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(y.a,r()({className:n,"data-qa-id":"typeDropdownButton",isSelected:u,isDisabled:d,direction:c?I.UP:I.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.metadataListEntityID},a.a,function(e,t){return t[e]})}t.a=i;var r=n(5),a=(n.n(r),n(2562))},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(S.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(b.a)(e)+")",s.WrappedComponent=e,
Object(y.b)(function(e){return a})(s)}var a=n(6),o=n.n(a),s=n(12),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(166),I=(n(36),n(431),n(156)),S=n(35);t.a=r},function(e,t,n){"use strict";function i(e,t){var n=t&&t.includeDirectories,i=n?["Directory"].concat(o):o,s=Object(a.a)(e,i,"Metadata");return n?s:Object(r.a)(s)}n.d(t,"a",function(){return o});var r=n(1568),a=n(1569),o=["Video","Track","Photo","Playlist"];t.b=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";function i(e){return s.a.createElement(l.a,a()({},e,{loadingLabel:Object(c.default)("Loading")}))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(716),c=n(3);i.defaultProps=l.a.defaultProps,t.a=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,t,n){if(n)switch(n){case s.i:switch(e){case"genre":case"channel":return c}break;case s.h:switch(e){case"episode":return u}break;case s.a:case s.d:return u;case s.e:switch(e){case"movie":case"episode":case"userPlaylistItem":return u}break;case s.g:case s.f:switch(e){case"episode":return u}}switch(t){case o.b:
case o.c:switch(e){case"show":return c;case"episode":return u}}switch(e){case"movie":case"show":case"season":case"episode":return l;case"artist":case"album":case"track":case"photo":case"photoalbum":return c;case"clip":return u;case"collection":return l;case"extra":case"musicVideo":return u;case"mixed":return l;case"genre":case"channel":return u;default:return c}}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 l}),n.d(t,"a",function(){return u}),t.c=i,t.e=r,t.d=a;var o=n(98),s=n(32),l=1/1.5,c=1,u=16/9},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(P.a)(),Object(S.a)(),O.a,M.a,function(e,t,n){var i=I.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)})}var r=n(12),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(6),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(5),b=(n.n(y),n(7)),I=n.n(b),S=n(119),M=n(70),D=n(35),C=n(135),O=n(74),P=n(1103),j={dispatchPopulateMetadataList:C.f,dispatchPopulateMetadataListRange:C.g,dispatchDeselectAllMetadataListItems:C.a,dispatchResetMetadataList:C.i},T=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(D.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 g.a.createElement(t,h()({},n,{onPageRequest:this.onPageRequest}))},t}(v.Component);T.defaultProps={disableReloadThreshold:!1,shouldResetOnUnmount:!1},t.a=Object(m.b)(i,j)(T)},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=r+e;t.repeat&&(o=Object(a.a)(r,e,t.length));var s=i[o];return s&&n[s]}})}var r=n(5),a=(n.n(r),n(2634)),o=n(1116),s=n(769);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(3040)),c=n.n(l);i.defaultProps={className:c.a.divider},t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"d",function(){return s}),
n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"e",function(){return u});var i=n(3),r=n(262),a=n(26),o="movies",s="tv",l="music",c="photos",u="videos",d=["key","typeID","typeString","rootTypeString"],p=Object(r.a)(d,[{key:o,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:s,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:l,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:c,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:u,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.f=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}),n.d(t,"d",function(){return p});var i,r=n(6),a=n.n(r),o=n(39),s=n(18),l=n(263),c="ui/repopulatePage",u=Object(o.a)(c),d=Object(o.a)("ui/toggleExpandableSidebar"),p=a()({},l.d,(i={},i[l.a]=function(e,t){s.a.trigger("show:alert",t)},i["ui/toggleExpandableSidebar"]=function(e){var t=e.get("experienceSettings");t.save("isSidebarExpandable",!t.get("isSidebarExpandable"))},i))},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(178)),a=Object(i.createSelector)(r.a,function(e){return e.providers});t.a=a},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(552)},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(2215)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderLeft},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(c.c)("metrics").trackClick(o()({page:t,action:e,context:g.e},n))}n.d(t,"f",function(){return S}),n.d(t,"g",function(){return M}),n.d(t,"h",function(){return D}),n.d(t,"l",function(){return C}),n.d(t,"e",function(){return O}),n.d(t,"j",function(){return P}),n.d(t,"b",function(){return j}),n.d(t,"k",function(){return T}),n.d(t,"c",function(){return w}),n.d(t,"a",function(){return E}),n.d(t,"i",function(){return x}),n.d(t,"d",function(){return A})
;var r,a=n(6),o=n.n(a),s=n(39),l=n(18),c=n(15),u=n(40),d=n(109),p=n(223),h=n(1101),f=n(1102),v=n(76),g=n(123),m=n(341),y=n(116),b=n(556),I="metadata/metadataList/fetchMetadataList",S=(Object(s.a)(I),
Object(s.a)("metadata/metadataList/populateMetadataList")),M=Object(s.a)("metadata/metadataList/populateMetadataListRange"),D=Object(s.a)("metadata/metadataList/repopulateMetadataListRange"),C=Object(s.a)("metadata/metadataList/syncMetadataList"),O=Object(s.a)("metadata/metadataList/optimizeMetadataList"),P=Object(s.a)("metadata/metadataList/selectMetadataListItem"),j=Object(s.a)("metadata/metadataList/deselectMetadataListItem"),T=Object(s.a)("metadata/metadataList/selectMetadataListItems"),w=Object(s.a)("metadata/metadataList/deselectMetadataListItems"),E=Object(s.a)("metadata/metadataList/deselectAllMetadataListItems"),x=Object(s.a)("metadata/metadataList/resetMetadataList"),A=(r={},
r[I]=Object(d.a)({getModel:y.d}),r["metadata/metadataList/populateMetadataList"]=Object(p.a)({fetchActionType:I,getModel:y.d}),r["metadata/metadataList/populateMetadataListRange"]=Object(h.a)({getModel:y.d}),r["metadata/metadataList/repopulateMetadataListRange"]=Object(f.a)({getModel:y.d}),r["metadata/metadataList/syncMetadataList"]=function(e,t){var n=Object(y.d)(e,t);u.a.execute("showSyncModal",{item:n}),i(v.X,t.metricsPage,t.metricsProperties)},
r["metadata/metadataList/optimizeMetadataList"]=function(e,t){var n=Object(y.d)(e,t),r=new b.a({item:n});l.a.trigger("show:modal",r),i(v.D,t.metricsPage,t.metricsProperties)},r["metadata/metadataList/selectMetadataListItem"]=function(e,t,n){var i=t.id,r=t.type,a=t.isRangeSelect,o=Object(y.d)(e,t),s=Object(y.c)(e,{metadataItemEntityID:i}),l=o.getCollection();s&&n(Object(m.q)({type:r,model:s,collection:l,isRangeSelect:a}))},r["metadata/metadataList/deselectMetadataListItem"]=function(e,t,n){
var i=Object(y.c)(e,{metadataItemEntityID:t.id});i&&n(Object(m.f)([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(y.j)(e,{metadataItemEntityID:n});return i&&t.push({id:i&&i.id,type:r,model:i}),t},[]);n(Object(m.r)(a))},r["metadata/metadataList/deselectMetadataListItems"]=function(e,t,n){var i=t.ids.reduce(function(t,n){var i=Object(y.j)(e,{metadataItemEntityID:n});return i&&t.push({id:i&&i.id}),t},[])
;n(Object(m.f)(i))},r["metadata/metadataList/deselectAllMetadataListItems"]=function(e,t,n){var i=Object(y.d)(e,t),r=i.getCollection();n(Object(m.e)(r))},r["metadata/metadataList/resetMetadataList"]=function(e,t){var n=Object(y.d)(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,t,n){return Math.max(0,Math.min(t-M.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,"y",function(){return U}),n.d(t,"A",function(){return B}),n.d(t,"B",function(){return F}),n.d(t,"x",function(){return V}),n.d(t,"z",function(){return H}),n.d(t,"i",function(){return Q}),n.d(t,"t",function(){return Y}),n.d(t,"u",function(){return G}),n.d(t,"m",function(){return W}),n.d(t,"p",function(){return K}),n.d(t,"q",function(){return q}),n.d(t,"r",function(){return Z}),
n.d(t,"s",function(){return X}),n.d(t,"h",function(){return J}),n.d(t,"w",function(){return $}),n.d(t,"v",function(){return ee}),n.d(t,"e",function(){return te}),n.d(t,"f",function(){return ne}),n.d(t,"g",function(){return ie}),n.d(t,"d",function(){return re}),n.d(t,"o",function(){return ae}),n.d(t,"k",function(){return oe}),n.d(t,"j",function(){return se}),n.d(t,"l",function(){return le})
;var r,a=n(6),o=n.n(a),s=n(39),l=n(2644),c=n(770),u=n(2645),d=n(378),p=n(2646),h=n(773),f=n(2647),v=n(771),g=n(2648),m=n(376),y=n(2649),b=n(706),I=n(534),S=n(231),M=n(321),D=n(2651),C=n(772),O=n(2652),P=n(66),j=n(177),T=n(35),w=n(153),E="ui/player/playerMedia/updatePlayerPosition",x="ui/player/playerMedia/togglePlayPause",A="ui/player/playerMedia/seek",N="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(s.a)("ui/player/playerMedia/sendTimeline"),U=Object(s.a)("ui/player/playerMedia/updatePlayerDuration"),B=Object(s.a)(E),F=Object(s.a)("ui/player/playerMedia/updatePlayerSeekRange"),V=Object(s.a)("ui/player/playerMedia/updatePlayerBuffering"),H=(Object(s.a)("ui/player/playerMedia/updatePlayerLoading"),
Object(s.a)("ui/player/playerMedia/updatePlayerError")),Q=Object(s.a)("ui/player/playerMedia/clearPlayerError"),Y=Object(s.a)("ui/player/playerMedia/tickPlayer"),G=Object(s.a)(x),W=Object(s.a)(A),K=(Object(s.a)("ui/player/playerMedia/transcodeSeek"),
Object(s.a)(N)),q=Object(s.a)("ui/player/playerMedia/skipForward"),Z=Object(s.a)(L),X=Object(s.a)("ui/player/playerMedia/stepForward"),J=Object(s.a)(k),$=Object(s.a)("ui/player/playerSettings/togglePlayerSettingsState"),ee=Object(s.a)("ui/player/playerSettings/togglePlayerChaptersState"),te=Object(s.a)(_),ne=Object(s.a)(R),ie=Object(s.a)("ui/player/playerSettings/changeSubtitleSize"),re=Object(s.a)("ui/player/playerMedia/changePlaybackSpeed"),ae=Object(s.a)("ui/player/playerMedia/setPlaybackTime"),oe=Object(s.a)(x,function(e){
return o()({},e,{shouldPlay:!0})}),se=Object(s.a)(x,function(e){return o()({},e,{shouldPause:!0})}),le=(Object(s.a)(k,function(e){return o()({},e,{delta:D.a})}),Object(s.a)(k,function(e){return o()({},e,{delta:-D.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(j.c)(e,i),u=P.i(e,{providerEntityID:r}),d=P.g(e,t),p={state:Object(h.a)(c),playbackSessionID:v.a}
;Object(y.a)(u,d,o()({},p,l)).done(Object(I.a)(c,function(e){n(Object(w.n)({playerType:i}));var t=e.bandwidthTimeline,r=e.captureBuffer,o=e.transcodeSession;c.set("bandwidthTimeline",t);var s=c.get("liveTVSession");o?(n(F({playerType:i,seekStartSeconds:o.seekStartSeconds,seekEndSeconds:o.seekEndSeconds})),s&&o.startedAt&&s.set({startedAt:o.startedAt,captureBuffer:r})):r&&(n(F({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")===d.get("playQueueItemID")&&Object(m.a)(l).done(Object(I.a)(c,function(){n(Object(w.n)({playerType:i}))})),e.terminationCode&&(n(Object(w.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(j.c)(e,n),a=Object(c.a)(r),o=a.get("metadataItem"),s=Object(l.a)(r);if(s){
var u=o.get("Media")[s.mediaIndex],d=Object(C.a)(u),p=!!d&&"vbr"===d.bitrateMode,h=i>0&&!p,f=h?i:u.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(j.c)(e,n);Object(T.a)(function(){var e={positionSeconds:i},t=r.get("lastSeekPositionSeconds");null!==t&&i>t&&(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(j.c)(e,n).set({seekStartSeconds:i,seekEndSeconds:r})},r["ui/player/playerMedia/updatePlayerBuffering"]=function(e,t){var n=t.playerType,i=t.isBuffering;Object(j.c)(e,n).set({isBuffering:i})},r["ui/player/playerMedia/updatePlayerLoading"]=function(e,t){var n=t.playerType,i=t.isMediaLoading;Object(j.c)(e,n).set({isMediaLoading:i})},r["ui/player/playerMedia/updatePlayerError"]=function(e,t){Object(j.c)(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(j.c)(e,n);Object(T.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(j.c)(e,i),o=a.get("playQueue"),s=Object(l.a)(a);if(s){
var c=a.get("isPaused"),u=!(r%10),d=!(r%30);if(u){var p=o.get("playQueueSelectedItemID"),h=o.get("playQueueItems").get(p);n(z({playerType:i,providerEntityID:a.get("providerEntityID"),playQueueItemEntityID:h.entityID(),options:{playbackTime:a.get("playbackTime"),positionSeconds:a.get("positionSeconds"),durationSeconds:a.get("durationSeconds"),mediaIndex:s.mediaIndex,partIndex:s.partIndex,partCount:s.partCount}}))}if(d&&c&&s.transcodeSessionID){var f=s.transcodeServerEntityID,v=P.k(e,{
serverEntityID:f});Object(g.a)(v,s.transcodeSessionID)}}},r[x]=function(e,t){var n=t.playerType,i=t.shouldPlay,r=t.shouldPause,a=t.isApplicationInitiated,o=Object(j.c)(e,n),s=o.get("isPaused"),l=Object(d.a)(e),c=void 0;if(o.get("isPostPlayVisible"))return void Object(T.a)(function(){o.set({isPostPlayVisible:!1}),l.playNextItem(o,!0)});c=i?"play":r?"pause":s?"play":"pause",s&&"pause"===c||!s&&"play"===c||Object(T.a)(function(){l[c](o,a)})},r[A]=function(e,t){
var n=t.playerType,i=t.positionSeconds,r=Object(j.c)(e,n),a=Object(d.a)(e);Object(T.a)(function(){a.seek(r,i)})},r["ui/player/playerMedia/transcodeSeek"]=function(e,t){var n,i=t.playerType,r=t.positionSeconds,a=Object(j.c)(e,i),s=Object(l.a)(a);if(s){var u=Object(c.a)(a),d=u.entityID(),p=o()({},s,{url:Object(f.a)(s.url,r)});a.set({currentDecision:p,decisions:o()({},a.get("decisions"),(n={},n[d]=p,n))})}},r[N]=function(e,t){
var n=t.playerType,r=Object(j.c)(e,n),a=Object(d.a)(e),o=i(r.get("positionSeconds"),r.get("durationSeconds"),-M.c);Object(T.a)(function(){a.seek(r,o)})},r["ui/player/playerMedia/skipForward"]=function(e,t){var n=t.playerType,r=Object(j.c)(e,n),a=Object(d.a)(e),o=r.get("positionSeconds"),s=r.get("durationSeconds");if(s-o>M.b){var l=i(o,s,M.d);Object(T.a)(function(){a.seek(r,l)})}},r[L]=function(e,t){
var n=t.playerType,r=Object(j.c)(e,n),a=Object(d.a)(e),o=Object(c.a)(r),s=o.get("metadataItem"),l=s.get("chapters"),u=r.get("positionSeconds"),h=r.get("durationSeconds"),f=void 0;f=l&&l.length?Object(p.a)(l,u):i(u,h,-M.e),Object(T.a)(function(){a.seek(r,f)})},r["ui/player/playerMedia/stepForward"]=function(e,t){var n=t.playerType,r=Object(j.c)(e,n),a=Object(d.a)(e),o=Object(c.a)(r),s=o.get("metadataItem"),l=s.get("chapters"),p=r.get("positionSeconds"),h=r.get("durationSeconds"),f=void 0
;l&&l.length?f=Object(u.a)(l,p):h-p>M.b&&(f=i(p,h,M.f)),null!=f&&Object(T.a)(function(){a.seek(r,f)})},r[k]=function(e,t){var n=t.playerType,i=t.volume,r=t.delta,a=Object(O.a)(e),o=r?a+r:i;if((o=Math.max(0,Math.min(100,o)))!==a){var s=Object(j.c)(e,n),l=e.get("experienceSettings"),c=Object(d.a)(e);Object(T.a)(function(){c.changeVolume(s,l,o)})}},r["ui/player/playerSettings/togglePlayerSettingsState"]=function(e,t){var n=t.playerType,i=Object(j.c)(e,n),r=i.get("isSettingsVisible")
;Object(T.a)(function(){i.set(Object(b.a)(i,r,{isSettingsVisible:!r,isChaptersVisible:!1,isPlayQueueVisible:!1,isLyricsVisible:!1}))})},r["ui/player/playerSettings/togglePlayerChaptersState"]=function(e,t){var n=t.playerType,i=Object(j.c)(e,n),r=i.get("isChaptersVisible");Object(T.a)(function(){i.set(Object(b.a)(i,r,{isSettingsVisible:!1,isChaptersVisible:!r,isPlayQueueVisible:!1,isLyricsVisible:!1}))})},r[_]=function(e,t){var n=t.playerType,i=t.qualityIndex,r=Object(j.c)(e,n)
;Object(d.a)(e).changeQualityIndex(r,i)},r[R]=function(e,t,n){var i=t.playerType,r=t.streamTypeString,a=t.streamID,o=Object(j.c)(e,i),s=Object(c.a)(o),l=s.get("metadataItem"),u=Object(d.a)(e);n(Object(S.e)({metadataItemEntityID:l.entityID(),mediaIndex:o.get("mediaIndex"),streamTypeString:r,streamID:a})),u.changeStream(o,r,a)},r["ui/player/playerSettings/changeSubtitleSize"]=function(e,t){var n=t.playerType,i=t.subtitleSize,r=Object(j.c)(e,n),a=e.get("experienceSettings")
;Object(d.a)(e).changeSubtitleSize(r,a,i)},r["ui/player/playerMedia/changePlaybackSpeed"]=function(e,t){var n=t.playerType,i=t.playbackSpeed,r=Object(j.c)(e,n),a=Object(d.a)(e),o=Math.round(10*i)/10;a.changePlaybackSpeed(r,o)},r["ui/player/playerMedia/setPlaybackTime"]=function(e,t,n){var i=t.playerType,r=t.playbackTime;Object(j.c)(e,i).set("playbackTime",r)},r)},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(6),a=n.n(r),o=n(12),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(166),y=n(27),b=n(2717),I=n.n(b);t.a=i},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(6),a=n.n(r),o=n(0),s=n.n(o)},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(2885)),c=n.n(l);i.defaultProps={className:c.a.primaryTitle},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(h.a,a()({className:v.a.pageContent},i),s()("div",{className:n},void 0,t))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(1053),f=n(3174),v=n.n(f);i.defaultProps={innerClassName:v.a.innerPageContent},t.a=i},function(e,t,n){
"use strict";var i=n(7),r=n.n(i),a=n(949),o=n(518),s=r.a.extend({},o.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"),o=t.get("transcoderVideoRemuxOnly"),s=this.getMaximumResolution(e);if(!i||o||!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(a.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(a.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){
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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2009),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,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments[4];if(e&&t&&n){var c=Object(o.a)(e,t),u=encodeURIComponent(n),d=(i={},i[a.c]="album",i[a.d]="playlist",i[a.a]="playlist",i),p=l?d[l]:"details",h="#!"+c+"/"+p+"?key="+u;return r.join(h,s)}}t.a=i;var r=n(19),a=n(58),o=n(552)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.dangerouslySetInnerHTML,i=e.children,r=i?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(3041)),c=n(3043),u=n.n(c);i.defaultProps={className:u.a.summary},t.a=i},function(e,t,n){"use strict";function i(e){return{onServerMenuOpen:function(){e(Object(c.b)()),e(Object(o.a)())}}}var r=n(11),a=n(5),o=(n.n(a),n(265)),s=n(338),l=n(603),c=n(68),u=n(3182),d=Object(a.createStructuredSelector)({primaryServerEntityID:function(e){return e.primaryServer},
serverEntityIDs:function(e){return e.servers},providerEntityIDs:Object(s.a)("providers"),canProvisionPersonalCloudServer:l.a}),p=Object(r.b)(d,i)(u.a);t.a=p},function(e,t,n){"use strict";var i=n(6),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(5),g=(n.n(v),n(70)),m=n(35),y=(n(32),n(68)),b=n(606),I=n(3272),S=Object(v.createSelector)(g.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(m.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(m.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.l})(M)},function(e,t,n){"use strict";function i(e){
var t=e.type,n=e.subtype,i=e.height,r=e.posterWidth,a=e.posterTop,o=e.pageHeight,s=e.scrollTop,l=Object(u.d)(r,t,n,c.h),d=a+i-s,p=o+m-l;return Math.min(Math.max(d,a),p)}function r(e){var t=e.children,n=e.serverEntityID,r=e.providerEntityID,a=e.metadataItemEntityID,s=e.showPoster,l=e.posterType,c=e.attribution,d=e.metadataKey,p=e.type,m=e.subtype,I=e.thumb,S=e.art,M=e.hero,D=e.pageWidth,C=e.pageHeight,O=e.scrollTop,P=e.posterWidth,j=e.posterTop,T=!!S,w=!T&&!!M,E=j,x=void 0
;return T&&(x=Math.min(Math.round(D/u.a),C-y),E=i({type:p,subtype:m,height:x,posterWidth:P,posterTop:j,pageHeight:C,scrollTop:O})),w&&(E=i({type:p,subtype:m,height:b,posterWidth:P,posterTop:j,pageHeight:C,scrollTop:O})),o()("div",{},void 0,T&&o()(h.a,{serverEntityID:n,providerEntityID:r,width:D,height:x,url:S}),w&&o()(f.a,{width:D,height:b,url:M}),c&&o()(c,{providerEntityID:r,pageHeight:C,posterTop:j}),s&&o()(g.a,{serverEntityID:n,providerEntityID:r,metadataItemEntityID:a,metadataKey:d,type:p,
subtype:m,posterType:l,pageHeight:C,posterWidth:P,posterTop:E,posterUrl:I}),s?o()(v.a,{posterWidth:P},void 0,t):o()("div",{},void 0,t))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(32)),u=n(126),d=n(44),p=n.n(d),h=n(3723),f=n(3725),v=n(3727),g=n(3729),m=parseInt(p.a.pageHeaderHeight,10),y=246,b=290;r.defaultProps={showPoster:!0},t.a=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(3732)),c=n.n(l);i.defaultProps={className:c.a.innerContent},t.a=i},,function(e,t,n){var i=n(201),r=n(106),a=n(635),o=n(359),s=n(302),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(3),r=n(262),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";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";n.d(t,"b",function(){return m}),n.d(t,"a",function(){return y}),n.d(t,"h",function(){return b}),n.d(t,"i",function(){return I}),n.d(t,"f",function(){return S}),n.d(t,"g",function(){return M}),n.d(t,"u",function(){return D}),n.d(t,"p",function(){return C}),n.d(t,"t",function(){return O}),n.d(t,"o",function(){return P}),n.d(t,"q",function(){return j}),n.d(t,"s",function(){return T}),n.d(t,"r",function(){return w}),
n.d(t,"d",function(){return E}),n.d(t,"e",function(){return x}),n.d(t,"k",function(){return A}),n.d(t,"c",function(){return N}),n.d(t,"n",function(){return L}),n.d(t,"l",function(){return k}),n.d(t,"m",function(){return _}),n.d(t,"j",function(){return R})
;var i,r=n(39),a=n(29),o=n(19),s=n(378),l=n(376),c=n(706),u=n(534),d=n(321),p=n(41),h=n(66),f=n(177),v=n(35),g=n(69),m="ui/player/playQueue/savePlayQueueState",y="ui/player/playQueue/removePlayQueueState",b=Object(r.a)("ui/player/playQueue/playNextItem"),I=Object(r.a)("ui/player/playQueue/playPreviousItem"),S=Object(r.a)("ui/player/playQueue/playItemByIndex"),M=Object(r.a)("ui/player/playQueue/playItemByKey"),D=(Object(r.a)("ui/player/playQueue/playItemByID"),
Object(r.a)("ui/player/playQueue/toggleShuffle")),C=Object(r.a)("ui/player/playQueue/setRepeat"),O=Object(r.a)("ui/player/playQueue/toggleRepeat"),P=Object(r.a)("ui/player/playQueue/setAutoPlay"),j=Object(r.a)("ui/player/playQueue/showPostPlay"),T=Object(r.a)("ui/player/playQueue/togglePlayerPlayQueueState"),w=Object(r.a)("ui/player/playQueue/togglePlayerLyricsState"),E=Object(r.a)("ui/player/playQueue/fetchPlayQueueItemLyrics"),x=Object(r.a)("ui/player/playQueue/movePlayQueueItem"),A=Object(r.a)("ui/player/playQueue/removePlayQueueItem"),N=Object(r.a)("ui/player/playQueue/fetchPlayQueue"),L=Object(r.a)(m),k=Object(r.a)(y),_=Object(r.a)("ui/player/playQueue/restorePlayQueue"),R=(i={},
i["ui/player/playQueue/playNextItem"]=function(e,t){var n=t.playerType,i=t.isApplicationInitiated,r=Object(f.c)(e,n),a=Object(s.a)(e);Object(v.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(f.c)(e,n),r=Object(s.a)(e);Object(v.a)(function(){i.set({isPostPlayVisible:!1}),i.get("positionSeconds")>d.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(f.c)(e,n),a=Object(s.a)(e);Object(v.a)(function(){a.playItem(r,i)})},i["ui/player/playQueue/playItemByKey"]=function(e,t,n){var i=t.playerType,r=t.key,o=Object(f.c)(e,i),s=o.get("playQueue"),l=s.get("playQueueItems"),c=l.find(function(e){return r===e.get("metadataItem").get("key")});if(c){var u=l.indexOf(c);n(S({playerType:i,index:u}))}else a.a.warn('[Player] Unable to play unknown key "'+r+'"')},
i["ui/player/playQueue/playItemByID"]=function(e,t,n){var i=t.playerType,r=t.playQueueItemID,o=Object(f.c)(e,i),s=o.get("playQueue"),l=s.get("playQueueItems"),c=l.get(r);if(c){var u=l.indexOf(c);n(S({playerType:i,index:u}))}else a.a.warn('[Player] Unable to play unknown PlayQueueItemID "'+r+'"')},i["ui/player/playQueue/toggleShuffle"]=function(e,t,n){var i=t.playerType,r=Object(f.c)(e,i),a=r.get("playQueue");Object(v.a)(function(){var t=a.get("playQueueShuffled"),o=!t
;a.set("playQueueShuffled",o);var c=o?"shuffle":"unshuffle";Object(l.a)(a,{urlPath:c,type:"PUT"}).done(Object(u.a)(r,function(){var t=Object(s.a)(e);n(L({playerType:i})),t.refreshRemotePlayQueue(r)})).fail(Object(u.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(f.c)(e,i),c=o.get("playQueue"),d=Object(s.a)(e);Object(v.a)(function(){d.setRepeat(o,{repeatAll:r||a,repeatOne:a}),
Object(l.a)(c).done(Object(u.a)(o,function(){n(L({playerType:i}))})).fail(Object(u.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(f.c)(e,i),a=r.get("repeatAll"),o=r.get("repeatOne");n(C({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(f.c)(e,n),a=e.get("experienceSettings")
;Object(s.a)(e).changeAutoPlay(r,a,i)},i["ui/player/playQueue/showPostPlay"]=function(e,t,n){var i=t.playerType,r=Object(f.c)(e,i),a=Object(s.a)(e),o=r.get("playQueue"),l=Object(f.a)(r,o.get("currentIndex")),c=l.get("postPlay"),d=o.provider.id,h=function(){r.set({isSettingsVisible:!1,isChaptersVisible:!1,isPostPlayLoading:!1,isPostPlayVisible:!0}),a.pause(r,!0)};r.set({isPostPlayLoading:!0}),d===p.d?c.fetch().then(Object(u.a)(r,function(){var e=c.findWhere({upNext:!0});e&&c.remove(e),h()
}),Object(u.a)(r,h)):setTimeout(Object(u.a)(r,h),0)},i["ui/player/playQueue/togglePlayerPlayQueueState"]=function(e,t){var n=t.playerType,i=Object(f.c)(e,n),r=i.get("isPlayQueueVisible");Object(v.a)(function(){i.set(Object(c.a)(i,r,{isSettingsVisible:!1,isChaptersVisible:!1,isPlayQueueVisible:!r,isLyricsVisible:!1}))})},i["ui/player/playQueue/togglePlayerLyricsState"]=function(e,t){var n=t.playerType,i=Object(f.c)(e,n),r=i.get("isLyricsVisible");Object(v.a)(function(){i.set(Object(c.a)(i,r,{
isSettingsVisible:!1,isChaptersVisible:!1,isPlayQueueVisible:!1,isLyricsVisible:!r}))})},i["ui/player/playQueue/fetchPlayQueueItemLyrics"]=function(e,t,n){var i=t.streamID,r=Object(h.g)(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,a=t.moveIndex,c=Object(f.c)(e,i),d=c.get("playQueue"),p=Object(h.g)(e,{
playQueueItemEntityID:r}),g=d.get("playQueueItems"),m=g.indexOf(p);if(m!==a&&m!==a-1){var y=a>m?a-1:a,b=a>0?g.at(a-1).id:void 0,I=o.join(["items",p.id,"move"]),S={after:b};Object(v.a)(function(){g.remove(p),g.add(p,{at:y}),Object(l.a)(d,{urlPath:I,params:S,type:"PUT"}).done(Object(u.a)(c,function(){var t=Object(s.a)(e);n(L({playerType:i})),t.refreshRemotePlayQueue(c)})).fail(Object(u.a)(c,function(){g.indexOf(p)===y&&(g.remove(p),g.add(p,{at:m}))}))})}},
i["ui/player/playQueue/removePlayQueueItem"]=function(e,t,n){var i=t.playerType,r=t.playQueueItemEntityID,a=Object(f.c)(e,i),c=a.get("playQueue"),d=c.get("playQueueItems"),p=Object(h.g)(e,{playQueueItemEntityID:r}),g=d.indexOf(p),m=o.join(["items",p.id]);Object(v.a)(function(){d.remove(p),Object(l.a)(c,{urlPath:m,type:"DELETE"}).done(Object(u.a)(a,function(){var t=Object(s.a)(e);n(L({playerType:i})),t.refreshRemotePlayQueue(a)})).fail(Object(u.a)(a,function(){d.add(p,{at:g})}))})},
i["ui/player/playQueue/fetchPlayQueue"]=function(e,t){var n=t.playerType,i=Object(f.c)(e,n),r=i.get("playQueue");Object(l.a)(r)},i[m]=function(e,t){t.playerType},i[y]=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(g.h)(u))},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){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(L.i)(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=b.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(w.a)(e)})}),g}function u(e,t){var n=Object(L.i)(e,t),r=t.enabled,a=b.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 F}),n.d(t,"A",function(){return V}),n.d(t,"p",function(){return H}),n.d(t,"o",function(){return Q}),n.d(t,"y",function(){return Y}),n.d(t,"c",function(){return G}),n.d(t,"s",function(){return W}),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(53),h=n.n(p),f=n(6),v=n.n(f),g=n(13),m=n.n(g),y=n(39),b=n(19),I=n(77),S=n(164),M=n(308),D=n(110),C=n(109),O=n(100),P=n(241),j=n(63),T=n(3),w=n(152),E=n(327),x=n(1014),A=n(542),N=n(68),L=n(116),k=Object(y.a)("CLEAR_DVR_SETUP"),_=Object(y.a)("DVR_SETUP_NEXT_STEP"),R=Object(y.a)("DVR_SETUP_PREVIOUS_STEP"),z=Object(y.a)("FETCH_DEVICES"),U=Object(y.a)("DISCOVER_DEVICES"),B=Object(y.a)("ADD_DEVICE"),F=Object(y.a)("SELECT_DEVICE"),V=Object(y.a)("SELECT_DEVICE_SOURCE"),H=Object(y.a)("FETCH_DEVICE_DETAILS"),Q=Object(y.a)("FETCH_DEVICE_CHANNELS"),Y=Object(y.a)("SCAN_DEVICE_CHANNELS"),G=Object(y.a)("CANCEL_SCAN_DEVICE_CHANNELS"),W=Object(y.a)("FIND_BEST_EPG_LINEUP"),K=Object(y.a)("SELECT_EPG_LINEUP"),q=Object(y.a)("CLEAR_CHANNEL_MAP_ERROR"),Z=Object(y.a)("SAVE_CHANNEL_MAP"),X=Object(y.a)("CLEAR_CHANNEL_MAPPINGS_SAVE_ERROR"),J=Object(y.a)("SAVE_DVR"),$=Object(y.a)("ADD_DVR_DEVICE"),ee=Object(y.a)("REMOVE_DVR_DEVICE"),te=Object(y.a)("SAVE_DVR_SETTINGS"),ne=Object(y.a)("CLEAR_DVR_SETTINGS_SAVE_ERROR"),ie=Object(y.a)("SAVE_DEVICE_SETTINGS"),re=Object(y.a)("CLEAR_DEVICE_SETTINGS_SAVE_ERROR"),ae=Object(y.a)("CLEAR_DEVICE_SCAN_PREFS"),oe=Object(y.a)("SET_DVR_DEVICE_ENABLED"),se=Object(y.a)("FETCH_LINEUP_CHANNELS",function(e){
var t=b.join("/livetv/epg/channels",{lineup:e.lineupUUID});return v()({options:{url:t,timeout:I.b}},e)}),le=Object(y.a)("FETCH_CHANNEL_MAP",function(e){var t=b.join("/livetv/epg/channelmap",{device:e.deviceUUID,lineup:e.lineupUUID});return v()({options:{url:t}},e)}),ce=Object(D.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 A.b.DEVICE:
n.get("selectedDevice").get("unsupported")?r.step=A.b.UNSUPPORTED_DEVICE:r.step=A.b.DEVICE_CHANNELS;break;case A.b.UNSUPPORTED_DEVICE:r.step=A.b.DEVICE_CHANNELS;break;case A.b.DEVICE_CHANNELS:t.dvrID?(r.selectedLineupUUID=a(e,t).get("lineup"),r.step=A.b.CHANNEL_MAPPING):r.step=A.b.EPG;break;case A.b.EPG:n.get("selectedLineupUUID")?r.step=A.b.CHANNEL_MAPPING:r.step=A.b.EPG_MAPPING;break;case A.b.EPG_MAPPING:r.step=A.b.CHANNEL_MAPPING;break;case A.b.CHANNEL_MAPPING:r.step=A.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 A.b.UNSUPPORTED_DEVICE:r.step=A.b.DEVICE;break;case A.b.DEVICE_CHANNELS:r.hasScannedChannels=!1,r.step=A.b.DEVICE;break;case A.b.EPG:r.step=A.b.DEVICE_CHANNELS;break;case A.b.CHANNEL_MAPPING:t.dvrID?r.step=A.b.DEVICE_CHANNELS:r.step=A.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")===E.b.ALIVE});1===e.length&&n(F({serverEntityID:t.serverEntityID,deviceID:e[0].id}))}).fail(function(e,t){r.set({isDevicesPending:!1,devicesError:Object(w.a)(t)})})},d.DISCOVER_DEVICES=function(e,t,n){
var r=Object(L.i)(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")===E.b.ALIVE});a.get("setupErrorMessages").remove("discoverDevices"),1===o.length&&n(F({serverEntityID:t.serverEntityID,deviceID:o[0].id})),a.set("isDiscoveringDevices",!1)
}).fail(function(e){a.get("setupErrorMessages").add({id:"discoverDevices",message:Object(P.a)(e,Object(T.default)("There was a problem discovering devices"))}),a.set("isDiscoveringDevices",!1)}))},d.ADD_DEVICE=function(e,t,n){var r=Object(L.i)(e,t),a=i(e),o=b.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=j.a.parseXML(e),s=o&&o.message||Object(T.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(P.a)(e,Object(T.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(P.a)(e,Object(T.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=b.join(["/media/grabbers/devices",r.get("key"),"channels"]);r.set("isChannelsPending",!0);var s={url:a,timeout:I.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(P.a)(e,Object(T.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(L.i)(e,t),l=o(e,t),c=s(e,t),u=l.get("selectedSource")||l.get("source"),d=t.prefs,p=t.network,h=b.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 M.a(e,{parse:!0});r.set("scanPrefs",s)}}).fail(function(e){r.get("setupErrorMessages").add({id:"scanDeviceChannels",message:Object(P.a)(e,Object(T.default)("There was a problem scanning channels"))})})},d.CANCEL_SCAN_DEVICE_CHANNELS=function(e,t,n){var r=i(e),a=Object(L.i)(e,t),o=t.deviceID;if(!o)throw new Error("A device ID is required to cancel a channel scan.");var s=b.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(P.a)(e,Object(T.default)("There was a problem canceling the current channel scan"))})})},d.FIND_BEST_EPG_LINEUP=function(e,t,n){var r=Object(L.i)(e,t),a=i(e),o=a.get("selectedDevice"),s=a.get("epgSettings").get("lineupGroup"),l=b.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(P.a)(e,Object(T.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(C.a)({key:"lineupChannels",getModel:i}),d.FETCH_CHANNEL_MAP=function(e,t){var n=i(e,t),r=n.get("channelMappings"),a=v()({timeout:I.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(w.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(H(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(L.i)(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=b.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(N.l)({hasDismissedDVRUpsell:!0})),n(_({serverEntityID:o})),n(Object(O.h)({serverEntityID:o}))}).fail(function(e){
a.get("setupErrorMessages").add({id:"saveDVR",message:Object(P.a)(e,Object(T.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(L.i)(e,t),i=b.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(O.h)({serverEntityID:o}))}).fail(function(e){r.get("setupErrorMessages").add({id:"addDVRDevice",message:Object(P.a)(e,Object(T.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(L.i)(e,t),r=a(e,t),o=t.deviceID,s=b.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(L.i)(e,t),i=a(e,t),r=t.prefs,o=b.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(w.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(L.i)(e,t),i=o(e,t),r=t.prefs,a=b.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(w.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[O.b]=function(e,t,n){var r=i(e);if(r){var a=r.get("selectedDevice"),o=t.activity
;if(!a||o.type!==S.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 x.a(s,{parse:!0});r.set("scanNetworks",l)}else r.set("hasScannedChannels",!0)}},d))},function(e,t,n){"use strict"
;var i=n(5),r=(n.n(i),n(225)),a=Object(i.createSelectorCreator)(i.defaultMemoize,r.a);t.a=a},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(6),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(42),m=n(59),y=n(82),b=n(112),I=n(78),S=n(27),M=n(15),D=n(76),C=n(3),O=n(539),P=n(124),j=n(117),T=n(95),w=n(23),E=n(2088),x=n.n(E),A=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onCancel=function(){
Object(M.c)("metrics").trackClick(o()({},r.props.metricsProperties,{page:r.props.metricsPage,action:D.e})),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(S.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,S=e.onConfirm,M=!!d,E=n||M&&!this.state.isAccordGiven;return r()(j.a,{size:w.e.SMALL,isOpen:i,metricsPage:a,metricsProperties:s,onModalClose:this.onCancel},void 0,r()(T.a,{onModalClose:this.onCancel},void 0,r()(I.a,{},void 0,c),r()(m.a,{className:x.a.confirmBody
},void 0,u,M&&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()(y.a,{},void 0,r()(b.a,{},void 0,!f&&r()(g.a,{className:x.a.cancelButton,kind:w.b.DEFAULT,isDisabled:t,onPress:this.onCancel},void 0,h||Object(C.default)("Cancel")),v.a.createElement(O.a,o()({},s,{action:D.j}),r()(P.a,{className:x.a.confirmButton,"data-autofocus":!0,kind:l,isDisabled:E,isSpinning:n,onPress:S
},void 0,p||Object(C.default)("OK")))))))},t}(f.Component);A.defaultProps={isConfirmButtonSpinning:!1,kind:w.b.PRIMARY},t.a=A},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(5),a=(n.n(r),n(79))},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(13),a=n.n(r);t.a=i},function(e,t,n){"use strict"
;var i=n(304),r=n.n(i),a=n(77),o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(36),d=n(19),p=n(503),h=n(260),f=n(91),v=a.c.Model.extend({mixins:[p.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 a.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)?c.a.each(e,function(e,t){c.a.isUndefined(i.get(t))&&!c.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")?{}:(a.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 c.a.isObject(e)?e:f.a.parseXML(e)},parse:function(e,t){var n=this.convert(e);return this.whitelistedAttrs&&(n=c.a.pick(n,this.whitelistedAttrs)),n},save:function(e,t,n){var i,o,l,u=this.attributes;null==e||"object"===(void 0===e?"undefined":r()(e))?(i=e,n=t):(i={})[e]=t,n=c.a.extend({validate:!0},n);var p=this.getSaveParams(i,n);if(c.a.extend(p,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=c.a.extend({},u,i)),
c.a.isEmpty(p)&&!n.force)return n.success&&n.success(this),s.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=c.a.extend(i||{},t)),c.a.isObject(t)&&!h.set(t,n))return!1;h.cache.store(h)}f&&f(h,e,n),h.trigger("sync",h,e,n)},a.c.wrapError(this,n),"patch"===(o=this.isNew()?"create":n.patch?"patch":"update")&&(n.attrs=i);var v=c.a.result(this,"saveUrl")||c.a.result(this,"url")
;return c.a.isEmpty(p)||(n.url=d.join(v,p)),n.data="",l=this.sync(o,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&&c.a.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},restoreDefaults:function(e){var t=c.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(u.a)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,i,a){var o;"object"===(void 0===n?"undefined":r()(n))?(o=n,a=i):(o={})[n]=i;var s=c.a.extend({},a,{silent:!0}),l=e.call(this,o,s);return c.a.extend(t,this.changed),l},this.releaseCapturedChangeEvents=function(){c.a.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),
c.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}}});v.extend=function(){var e=a.c.Model.extend.apply(this,arguments);return e.prototype.cache=new h.a,e},t.a=v},function(e,t,n){"use strict";function i(e,t){r.a.trigger("navigate",e,t)}t.a=i;var r=n(18)},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";var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.servers});t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return o})
;var i=n(17),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",BACKUP_DATABASE:"general.db.backup",OPTIMIZE_DATABASE:"general.db.optimize",CLEAN_BUNDLES:"general.bundle.clean",LIBRARY_DELETE:"library.delete",LIBRARY_REFRESH_ITEMS:"library.refresh.items",MEDIA_GENERATE_BIF:"media.generate.bif",SUBTITLE_DOWNLOAD:"subtitle.download"
},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){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(m.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(C.a)(e.initialValue)&&Object(C.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)?b.a.isEqual(e.initialValue,t):null==t)?r.value:t,o=this.calculateErrors(a,n,e);b.a.isEqual(r.value,a)&&b.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 g.a.createElement(e,s()({},i,{showErrors:!!r||u,errors:r?n:c,value:l,onChange:this.onChange,
onBlur:this.onBlur}))},n}(v.Component);return t.displayName="FormInput("+Object(I.a)(e)+")",t.WrappedComponent=e,t.contextTypes={formStore:S.a},t.defaultProps={validations:[],errors:[]},t}var r=n(12),a=n.n(r),o=n(6),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(528),y=(n.n(m),n(7)),b=n.n(y),I=n(166),S=n(715),M=n(225),D=n(27),C=(n(36),n(431)),O=n(181);t.a=i},function(e,t,n){"use strict";function i(e){return e.displayName||e.name||"Component"}t.a=i
},function(e,t,n){"use strict";function i(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(p.c)("metrics").trackClick(o()({page:n,action:e,type:t.get("type")},i))}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"ANALYZE_METADATA_ITEM",function(){return N}),n.d(t,"DELETE_METADATA_ITEM",function(){return L}),n.d(t,"DELETE_METADATA_ITEM_VERSION",function(){return k}),n.d(t,"DOWNLOAD_METADATA_ITEM_VERSION",function(){return _}),
n.d(t,"EDIT_METADATA_ITEM",function(){return R}),n.d(t,"FIX_METADATA_ITEM_MATCH",function(){return z}),n.d(t,"GET_METADATA_ITEM_INFO",function(){return U}),n.d(t,"UPDATE_METADATA_ITEM_PLAYED_STATUS",function(){return B}),n.d(t,"OPTIMIZE_METADATA_ITEM",function(){return F}),n.d(t,"RATE_METADATA_ITEM",function(){return V}),n.d(t,"REFRESH_METADATA_ITEM",function(){return H}),n.d(t,"SPLIT_METADATA_ITEM_APART",function(){return Q}),n.d(t,"SYNC_METADATA_ITEM",function(){return Y}),
n.d(t,"UNMATCH_METADATA_ITEM",function(){return G}),n.d(t,"CHANGE_METADATA_ITEM_FIELD",function(){return W}),n.d(t,"UPDATE_METADATA_ITEM_REFRESHING_STATE",function(){return K}),n.d(t,"UPDATE_METADATA_SETTINGS",function(){return q}),n.d(t,"CLEAR_METADATA_SETTINGS_ERROR",function(){return Z}),n.d(t,"analyzeMetadataItem",function(){return X}),n.d(t,"deleteMetadataItem",function(){return J}),n.d(t,"deleteMetadataItemVersion",function(){return $}),n.d(t,"downloadMetadataItemVersion",function(){
return ee}),n.d(t,"editMetadataItem",function(){return te}),n.d(t,"fixMetadataItemMatch",function(){return ne}),n.d(t,"getMetadataItemInfo",function(){return ie}),n.d(t,"updateMetadataItemPlayedStatus",function(){return re}),n.d(t,"optimizeMetadataItem",function(){return ae}),n.d(t,"rateMetadataItem",function(){return oe}),n.d(t,"refreshMetadataItem",function(){return se}),n.d(t,"splitMetadataItemApart",function(){return le}),n.d(t,"syncMetadataItem",function(){return ce}),
n.d(t,"unmatchMetadataItem",function(){return ue}),n.d(t,"changeMetadataItemField",function(){return de}),n.d(t,"updateMetadataItemRefreshingState",function(){return pe}),n.d(t,"updateMetadataSettings",function(){return he}),n.d(t,"clearMetadataSettingsError",function(){return fe}),n.d(t,"favoriteMetadataItem",function(){return ve}),n.d(t,"unfavoriteMetadataItem",function(){return ge}),n.d(t,"markMetadataItemUnplayed",function(){return me}),n.d(t,"markMetadataItemPlayed",function(){return ye}),
n.d(t,"metadataActionHandlers",function(){return be})
;var r,a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(39),u=n(18),d=n(19),p=n(15),h=n(40),f=n(1083),v=n(1084),g=n(1085),m=n(2483),y=n(1087),b=n(231),I=n(263),S=n(76),M=n(564),D=n(3),C=n(131),O=n(116),P=n(2484),j=n(1088),T=n(2528),w=n(2529),E=n(433),x=n(709),A=n(556),N="metadata/analyzeMetadataItem",L="metadata/deleteMetadataItem",k="metadata/deleteMetadataItemVersion",_="metadata/downloadMetadataItemVersion",R="metadata/editMetadataItem",z="metadata/fixMetadataItemMatch",U="metadata/getMetadataItemInfo",B="metadata/updateMetadataItemPlayedStatus",F="metadata/optimizeMetadataItem",V="metadata/rateMetadataItem",H="metadata/refreshMetadataItem",Q="metadata/splitMetadataItemApart",Y="metadata/syncMetadataItem",G="metadata/unmatchMetadataItem",W="metadata/changeMetadataItemField",K="metadata/updateMetadataItemRefreshingState",q="metadata/UPDATE_METADATA_SETTINGS",Z="CLEAR_METADATA_SETTINGS_ERROR",X=Object(c.a)(N),J=Object(c.a)(L),$=Object(c.a)(k),ee=Object(c.a)(_),te=Object(c.a)(R),ne=Object(c.a)(z),ie=Object(c.a)(U),re=Object(c.a)(B),ae=Object(c.a)(F),oe=Object(c.a)(V),se=Object(c.a)(H),le=Object(c.a)(Q),ce=Object(c.a)(Y),ue=Object(c.a)(G),de=Object(c.a)(W),pe=Object(c.a)(K),he=Object(c.a)(q),fe=Object(c.a)(Z),ve=Object(c.a)(V,function(e){
return o()({},e,{rating:M.a})}),ge=Object(c.a)(V,function(e){return o()({},e,{rating:M.b})}),me=Object(c.a)(B,function(e){return o()({},e,{played:!1})}),ye=Object(c.a)(B,function(e){return o()({},e,{played:!0})}),be=o()({},b.b,(r={},r[N]=function(e,t,n){var i=Object(O.c)(e,t),r=t.metricsPage,a={allowMetrics:!!r,metricsProperties:{page:r}};Object(f.a)(i,a).fail(function(e){n(Object(I.c)(Object(D.default)("There was a problem analyzing this item.")))})},r[_]=function(e,t){
var n=Object(O.c)(e,t),i=new P.a({model:n});u.a.trigger("show:modal",i)},r[L]=function(e,t){var n=Object(O.c)(e,t),r=t.options||{},a=n.get("isPlaylist")?"deletePlaylist":"deleteItems";h.a.execute(a,o()({item:n},r)),i(S.k,n,t.metricsPage)},r[k]=function(e,t){var n=Object(O.c)(e,t);h.a.execute("deleteVersions",{item:n}),i(S.k,n,t.metricsPage)},r[R]=function(e,t){var n=Object(O.c)(e,t),r=n.get("isPlaylist")?new T.a({model:n}):new j.a({model:n});u.a.trigger("show:modal",r),i(S.q,n,t.metricsPage)},
r[z]=function(e,t){var n=Object(O.c)(e,t),r=new w.a({model:n});u.a.trigger("show:modal",r),i(S.t,n,t.metricsPage)},r[U]=function(e,t){var n=Object(O.c)(e,t),r=new x.a({model:n});u.a.trigger("show:modal",r),i(S.w,n,t.metricsPage)},r[B]=function(e,t,n){var r=Object(O.c)(e,t);Object(y.a)(e,t).then(function(){n(Object(C.b)({serverEntityID:t.serverEntityID}))},function(){
var e=t.played?Object(D.default)("There was an unexpected error marking an item played."):Object(D.default)("There was an unexpected error marking an item unplayed.");n(Object(I.c)(e))}),i(t.played?S.A:S.z,r,t.metricsPage)},r[F]=function(e,t){var n=Object(O.c)(e,t),r=new A.a({item:n});u.a.trigger("show:modal",r),i(S.D,n,t.metricsPage)},r[V]=function(e,t,n){var i=t.rating,r=t.metricsPage,a=Object(O.f)(e,t),o=Object(O.c)(e,t),s={rating:i,allowMetrics:!!r,metricsProperties:{page:r}}
;Object(v.a)(a,o,s).fail(function(e){n(Object(I.c)(Object(D.default)("There was a problem rating this item.")))})},r[H]=function(e,t,n){var i=Object(O.c)(e,t),r=t.metricsPage,a={allowMetrics:!!r,metricsProperties:{page:r}};Object(g.a)(i,a).fail(function(e){503===e.status?u.a.trigger("show:modal",new E.a({model:i.server})):n(Object(I.c)(Object(D.default)("There was a problem refreshing this item.")))})},r[Q]=function(e,t,n){var r=Object(O.c)(e,t);h.a.execute("splitApart",{item:r,skipNavigate:!0
}).done(function(){n(Object(C.b)({serverEntityID:t.serverEntityID}))}),i(S.V,r,t.metricsPage)},r[Y]=function(e,t){var n=Object(O.c)(e,t);h.a.execute("showSyncModal",{item:n}),i(S.X,n,t.metricsPage)},r[G]=function(e,t){var n=Object(O.c)(e,t);h.a.execute("unmatch",{item:n}),i(S.Y,n,t.metricsPage)},r[W]=function(e,t,n){var r,a=t.providerEntityID,o=t.metadataItemEntityID,s=t.name,c=t.value,u=t.save,p=Object(O.c)(e,{metadataItemEntityID:o});if(!u){var h;return void p.set((h={},h[s]=c,h))}
var f=Object(O.f)(e,{providerEntityID:a}),v=d.join(p.get("key"),(r={},r[s]=c,r[s+".locked"]=1,r)),g=f.getXHROptions(v,{type:"PUT"});l.a.ajax(g).fail(function(e){n(Object(I.c)(Object(D.default)("There was a problem editing this item.")))}),i(S.q,p,t.metricsPage)},r[K]=function(e,t){var n=Object(O.j)(e,t);n&&n.set({metadataState:t.metadataState,mediaState:t.mediaState})},r[q]=function(e,t,n){var i=Object(O.f)(e,t),r=Object(O.c)(e,t),a=t.data;Object(m.a)(i,r,a).then(function(){n(Object(b.d)({
serverEntityID:t.serverEntityID,metadataItemEntityID:t.metadataItemEntityID}))})},r[Z]=function(e,t,n){Object(O.c)(e,t).set("settingsUpdateError",null)},r))},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(5),a=(n.n(r),n(115)),o=n(128)},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(67),s=n(3482),l=n.n(s);i.defaultProps={className:l.a.container},t.a=i},function(e,t,n){"use strict";var i=n(11),r=n(5),a=(n.n(r),n(70)),o=n(131),s=n(3503),l=n(3504),c=Object(r.createSelector)(s.a,a.a,function(e,t){return{types:e,shortcuts:[],isSidebarExpandable:t.isSidebarExpandable}}),u={onToggleExpandableSidebar:o.c};t.a=Object(i.b)(c,u)(l.a)},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{hubEntityIDs:t,showSpinner:!t.length&&n}})}var r=n(11),a=n(5),o=(n.n(a),n(1358)),s=Object(r.b)(i)(o.a);t.a=s},,function(e,t,n){e.exports={default:n(1453),__esModule:!0}},function(e,t,n){"use strict";var i=(n(36),n(507)),r=n(16),a=n(1546),o=i.a.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{activeUserID:r.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={mediaProvidersServerRoot:"1.13.10",streamDisplayTitles:"1.13.8",softSubtitlesWithDirectPlay:"1.13.4",channelGrid:"1.13.2.5081",typeFirst:"1.12.1",photoTagEdit:"1.11.1",sharedUserNotifications:"1.11.1",adaptiveBitrateFallback:"1.9.5",truePlaylistsPath:"1.9.3",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,t,n){return"#!/settings/server/"+encodeURIComponent(e)+"/"+t+"/"+n}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("ui").get("audioVideoPlayer").get("playQueue"),i=e.get("ui").get("photoPlayer").get("playQueue");return n&&n.get("playQueueID")===t?n:i&&i.get("playQueueID")===t?i:void 0}function a(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.c=i,t.b=r,t.a=a},function(e,t,n){"use strict";function i(e){return e.entities}t.a=i},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(6),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=(n(36),n(205));i.defaultProps={component:"span"},t.a=i},function(e,t,n){"use strict";var i=n(5),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){"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 b.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(12),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(6),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(528),y=(n.n(m),n(7)),b=n.n(y),I=n(715),S=n(39),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(b.a.some(t,function(e,t){return 0!==e.errors.length}))a.actions.showErrors();else{var n=b.a.mapObject(t,function(e,t){return e.value});a.props.onSubmit(n,t)}},a.store=Object(m.createStore)(i),a.prevState=a.store.getState(),a.actions=Object(m.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 g.a.createElement("form",h()({},n,{onSubmit:this.onSubmit}),t)},t}(v.Component)
;C.childContextTypes={formStore:I.a},C.defaultProps={onSubmit:function(){},onChange:function(){}},t.b=C},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(c.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(5),s=(n.n(o),n(208)),l=n(1024),c=n(34),u=Object(a.b)(r)(s.a);t.a=u
},function(e,t,n){"use strict";function i(e,t){Object(g.c)("metrics").trackClick({page:t,action:e,context:P.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 F}),n.d(t,"n",function(){return V}),n.d(t,"h",function(){return H}),n.d(t,"j",function(){return Q}),n.d(t,"d",function(){return Y}),n.d(t,"g",function(){return G}),n.d(t,"e",function(){return W}),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(6),o=n.n(a),s=n(13),l=n.n(s),c=n(48),u=n.n(c),d=n(39),p=n(18),h=n(159),f=n(445),v=n(19),g=n(15),m=n(164),y=n(108),b=n(109),I=n(223),S=n(100),M=n(263),D=n(678),C=n(440),O=n(76),P=n(123),j=n(3),T=n(327),w=n(723),E=n(116),x=n(2112),A=n(460),N=n(2156),L=n(2158),k=n(2160),_=n(388),R=n(68),z=(Object(d.a)("server/fetchSettings"),
Object(d.a)("server/populateSettings")),U=Object(d.a)("server/updateSetting"),B=Object(d.a)("server/addLibrary"),F=Object(d.a)("server/startLibrariesRefresh"),V=Object(d.a)("server/shareLibraries"),H=Object(d.a)("server/enableHttpFallback"),Q=Object(d.a)("server/optimizeDatabase"),Y=Object(d.a)("server/cleanbundles"),G=Object(d.a)("server/emptyTrash"),W=Object(d.a)("server/deleteServer"),K=Object(d.a)("server/restartPersonalCloudServer"),q=Object(d.a)("server/discoverMediaGrabberDevice"),Z=Object(d.a)("server/checkiTunes"),X=Object(d.a)("server/importPlaylists"),J=Object(d.a)("server/startLibrariesRefresh",function(e){
return o()({},e,{cancel:!0})}),$=o()({},S.m,(r={},r["server/fetchSettings"]=Object(b.a)({key:"settings",getModel:E.h}),r["server/populateSettings"]=Object(I.a)({key:"settings",fetchActionType:"server/fetchSettings",getModel:E.h}),r["server/updateSetting"]=function(e,t){var n=Object(E.i)(e,t),i=Object(E.h)(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[S.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 k.a({serverName:r});p.a.trigger("show:modal",c),n(Object(S.n)(i))}},r["server/addLibrary"]=function(e,t){var n=Object(E.i)(e,t),r=t.options,a=void 0===r?{}:r,s=new A.a(o()({
server:n,redirect:!1!==t.redirect},a));p.a.trigger("show:modal",s),i(O.a,t.metricsPage)},r["server/startLibrariesRefresh"]=function(e,t,n){var i=t.cancel,r=t.force,a=t.metricsPage,o=Object(E.i)(e,t),s={serverModel:o,libraryID:"all",cancel:i,force:r,allowMetrics:!!a,metricsProperties:{page:a}};if(t.cancel){Object(E.h)(e,t).get("libraries").each(function(e){return e.set("refreshing",!1)})}Object(w.a)(o,s).fail(function(){
var e=t.cancel?Object(j.default)("There was a problem canceling the update."):Object(j.default)("There was a problem updating libraries.");n(Object(M.c)(e))}).always(function(){n(Object(S.g)({serverEntityID:t.serverEntityID}))})},r["server/shareLibraries"]=function(e,t){var n=Object(E.i)(e,t);p.a.trigger("show:modal",new _.a({defaultPaneType:"ownedServer",defaultPaneID:n.id})),i(O.S,t.metricsPage)},r["server/enableHttpFallback"]=function(e,t,n){var i=Object(E.i)(e,t),r=new N.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(S.q)({serverEntityID:t.serverEntityID}))}),p.a.trigger("show:modal",r)},r["server/optimizeDatabase"]=function(e,t,n){var r=Object(E.i)(e,t),a=Object(E.h)(e,t),o=r.supports("optimizeDatabaseActivity"),s=v.join("/library/optimize",o?{async:1}:{}),c=r.getXHROptions(s,{type:"PUT"});n(Object(S.p)({serverEntityID:t.serverEntityID,
activityType:m.a.OPTIMIZE_DATABASE})),a.set({optimizeDatabaseError:null}),l.a.ajax(c).done(function(){o||n(Object(S.j)({serverEntityID:t.serverEntityID,activityType:m.a.OPTIMIZE_DATABASE}))}).fail(function(){a.set({optimizeDatabaseError:Object(j.default)("There was a problem optimizing the database.")}),n(Object(S.j)({serverEntityID:t.serverEntityID,activityType:m.a.OPTIMIZE_DATABASE})),t.hideAlerts||n(Object(M.c)(Object(j.default)("There was a problem optimizing the database.")))}),
i(O.E,t.metricsPage)},r["server/cleanbundles"]=function(e,t,n){var r=Object(E.i)(e,t),a=Object(E.h)(e,t),o=r.supports("cleanBundlesActivity"),s=v.join("/library/clean/bundles",o?{async:1}:{}),c=r.getXHROptions(s,{type:"PUT"});n(Object(S.p)({serverEntityID:t.serverEntityID,activityType:m.a.CLEAN_BUNDLES})),a.set({cleanBundlesError:null}),l.a.ajax(c).done(function(){o||n(Object(S.j)({serverEntityID:t.serverEntityID,activityType:m.a.CLEAN_BUNDLES}))}).fail(function(){a.set({
cleanBundlesError:Object(j.default)("There was a problem removing unused bundles.")}),n(Object(S.j)({serverEntityID:t.serverEntityID,activityType:m.a.CLEAN_BUNDLES})),t.hideAlerts||n(Object(M.c)(Object(j.default)("There was a problem removing unused bundles.")))}),i(O.h,t.metricsPage)},r["server/emptyTrash"]=function(e,t,n){var r=Object(E.i)(e,t),a=Object(E.h)(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(M.c)({type:D.b,message:Object(j.default)("The trash was emptied.")}))}).fail(function(e){n(Object(M.c)(Object(j.default)("There was a problem emptying the trash.")))}),i(O.s,t.metricsPage)},r["server/deleteServer"]=function(e,t,n){var r=Object(E.i)(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:y.a,myPlexSubscription:!1})}).always(function(){n(Object(S.q)({serverEntityID:t.serverEntityID})),r.populate().fail(function(){r.trigger("destroy",r,r.collection),n(Object(R.i)({route:"dashboard"}))})})}else r.trigger("destroy",r,r.collection),
n(Object(R.i)({route:"dashboard"}));i(O.m,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(h.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(f.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(E.i)(e,t),i=e.get("ui").get("dvrSettingsUI"),r=t.device;if(!i.get("isUIPopulated")){var a=new x.a({model:new T.a(r,{parse:!0}),serverEntityID:t.serverEntityID,machineIdentifier:n.get("machineIdentifier")});p.a.trigger("show:bar","alertbar",a)}},r["server/checkiTunes"]=function(e,t){var n=Object(E.i)(e,t),i=Object(E.h)(e,t)
;if(n.get("isPersonalCloudServer"))return void i.set("hasiTunes",!1);var r=v.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(E.i)(e,t),i=Object(E.h)(e,t),r=i.get("libraries"),a=new L.a({server:n,libraries:r});p.a.trigger("show:modal",a)},r))},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(v.default)("There was an unexpected error"),description:Object(v.default)("Please visit our forums if you continue to experience problems")},n),s()(h.a,{to:f.a,target:"_blank",kind:g.b.PRIMARY},void 0,Object(v.default)("Go to Forums")),t)}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(334),v=n(3),g=n(23),m=n(113);t.a=i},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(732)),a=n(336),o=Object(i.createSelector)(Object(a.a)("features"),r.a);t.a=o},function(e,t,n){"use strict";function i(e,t){var n=Math.floor(Date.now()/1e3);return e.get("Media").find(function(e){var i=e.beginsAt<=n&&n<=e.endsAt,r=!t||e.channelIdentifier===t;return i&&r})}function r(e){var t=i(e);return t?t.channelIdentifier:void 0}function a(e){return{channelIdentifier:e,beginsAt:Math.floor(Date.now()/1e3)}}function o(e,t){var n=Object(w.c)(e,t),i=n.get("liveTVSession")
;i&&i.set("lastSeekPosition",i.get("currentPosition"))}n.d(t,"l",function(){return R}),n.d(t,"e",function(){return z}),n.d(t,"d",function(){return U}),n.d(t,"a",function(){return B}),n.d(t,"n",function(){return F}),n.d(t,"g",function(){return V}),n.d(t,"h",function(){return H}),n.d(t,"j",function(){return Q}),n.d(t,"k",function(){return Y}),n.d(t,"i",function(){return G}),n.d(t,"c",function(){return W}),n.d(t,"b",function(){return K}),n.d(t,"m",function(){return q}),n.d(t,"f",function(){return Z
})
;var s,l=n(6),c=n.n(l),u=n(13),d=n.n(u),p=n(39),h=n(15),f=n(1135),v=n(377),g=n(705),m=n(2668),y=n(771),b=n(706),I=n(2669),S=n(100),M=n(136),D=n(190),C=n(99),O=n(81),P=n(687),j=n(688),T=n(66),w=n(177),E=n(35),x=n(3),A=n(152),N=n(69),L="ui/player/liveTVPlayer/skipBack",k="ui/player/liveTVPlayer/stepBack",_="ui/player/liveTVPlayer/seek",R=Object(p.a)("ui/player/liveTVPlayer/startLiveTVPlayback"),z=Object(p.a)("ui/player/liveTVPlayer/endLiveTVPlayback"),U=Object(p.a)("ui/player/liveTVPlayer/confirmLiveTVPlayback"),B=Object(p.a)("ui/player/liveTVPlayer/cancelConfirmLiveTVPlayback"),F=Object(p.a)("ui/player/liveTVPlayer/updatePlayerLiveTVMetadata"),V=Object(p.a)("ui/player/liveTVPlayer/playNextItem"),H=Object(p.a)("ui/player/liveTVPlayer/playPreviousItem"),Q=Object(p.a)(L),Y=Object(p.a)("ui/player/liveTVPlayer/skipForward"),G=(Object(p.a)(k),
Object(p.a)("ui/player/liveTVPlayer/stepForward"),Object(p.a)(_)),W=Object(p.a)("ui/player/liveTVPlayer/clearPlayerConflicts"),K=Object(p.a)("ui/player/liveTVPlayer/cancelMediaGrabber"),q=Object(p.a)("ui/player/liveTVPlayer/togglePlayerAlsoAiringState"),Z=(s={},s["ui/player/liveTVPlayer/startLiveTVPlayback"]=function(e,t,n){var r=t.serverEntityID,o=t.providerEntityID,s=Date.now(),l=Object(g.a)(e,t),u=Object(v.a)(l),d=C.c(u),p=Object(w.c)(e,d),m=T.k(e,t),b=T.i(e,{providerEntityID:o
}),S=b.get("parentID"),M=l.metadataItemModel,A=null;if(M?A=i(M,l.identifier):l.identifier&&(A=a(l.identifier)),!A)return void Object(E.a)(function(){p.restoreDefaults({hasError:!0,errorMessage:Object(x.default)("Unable to tune channel (Not on air)")})});if(e.get("remotePlayer")&&!e.get("user").get("features").findWhere({uuid:O.g}))return void Object(E.a)(function(){p.set({hasError:!0,errorMessage:Object(x.default)("Live TV is not currently supported when connected to a remote player.")})})
;Object(E.a)(function(){p.restoreDefaults({serverEntityID:r,providerEntityID:o,isOpen:!0,openState:D.a,isPlayQueueLoading:!0,isMediaLoading:!0,playbackStartTime:s})});var L=new f.a({},{server:m,provider:b}),k=A.channelIdentifier;Object(I.a)(L,S,k,{playbackSessionID:y.a,currentMediaItem:A}).done(function(){p.set("liveTVSession",L);var e=L.get("grabOperation"),i=e.get("metadataItem");n(Object(N.m)(c()({},t,{liveTVSessionEntityID:L.entityID(),metadataItemEntityID:i.entityID(),options:{offset:void 0
}})))}).fail(function(e){var t=e.confirmPlayback,n=e.hasConflicts,i=e.errorMessage;if(t)p.restoreDefaults({serverEntityID:r,providerEntityID:o,liveTVSession:L,confirmLiveTVPlayback:t});else if(n)p.restoreDefaults({serverEntityID:r,providerEntityID:o,liveTVSession:L,hasConflicts:n});else{var a=m.getState();Object(h.c)("metrics").trackEvent({event:"playback:failure",interaction:!0,properties:{serverType:Object(j.a)(a),connectionType:Object(P.a)(a.activeConnection),error:"tuneFailed",identifier:k}
}),p.restoreDefaults({hasError:!0,errorMessage:i})}})},s["ui/player/liveTVPlayer/endLiveTVPlayback"]=function(e,t,n){var i=t.playerType,r=t.showError,a=Object(w.c)(e,i);r?a.restoreDefaults({hasError:!0,errorMessage:Object(x.default)("This live TV session has ended due to a recording conflict")}):n(Object(N.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(w.c)(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(N.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(w.c)(e,n);Object(E.a)(function(){i.restoreDefaults()})},s["ui/player/liveTVPlayer/updatePlayerLiveTVMetadata"]=function(e,t){var n=t.serverEntityID,i=t.playerType,r=Object(w.c)(e,i),a=r.get("liveTVSession");if(a&&r.get("serverEntityID")===n){var o=a.get("dvrID"),s=a.get("channelIdentifier");Object(I.a)(a,o,s,{playbackSessionID:y.a})}},s["ui/player/liveTVPlayer/playNextItem"]=function(e,t,n){
var i=t.playerType,r=Object(w.c)(e,i),a=m.a(r);m.g(e,i,a,n)},s["ui/player/liveTVPlayer/playPreviousItem"]=function(e,t,n){var i=t.playerType,r=Object(w.c)(e,i),a=m.b(r);m.g(e,i,a,n)},s[L]=function(e,t,n){var i=t.playerType,r=Object(w.c)(e,i),a=m.c(r);m.g(e,i,a,n)},s["ui/player/liveTVPlayer/skipForward"]=function(e,t,n){var i=t.playerType,r=Object(w.c)(e,i),a=m.d(r);m.g(e,i,a,n)},s[k]=function(e,t,n){var i=t.playerType,r=Object(w.c)(e,i),a=m.e(r);m.g(e,i,a,n)},
s["ui/player/liveTVPlayer/stepForward"]=function(e,t,n){var i=t.playerType,r=Object(w.c)(e,i),a=m.f(r);m.g(e,i,a,n)},s[_]=function(e,t,n){var i=t.playerType,r=t.seekPosition;m.g(e,i,r,n)},s["ui/player/liveTVPlayer/clearPlayerConflicts"]=function(e,t){var n=t.playerType,i=Object(w.c)(e,n);Object(E.a)(function(){i.set({hasConflicts:!1})})},s["ui/player/liveTVPlayer/cancelMediaGrabber"]=function(e,t,n){var i=t.playerType,a=t.grabOperationKey,o=Object(w.c)(e,i),s=o.get("serverEntityID"),l=T.k(e,{
serverEntityID:s}),c=o.get("liveTVSession"),u=c.get("grabOperation"),p=u.get("metadataItem"),h=!o.get("isOpen");if(h&&!r(p))return void o.restoreDefaults({hasError:!0,errorMessage:Object(x.default)("Unable to cancel conflict, please try again.")});Object(E.a)(function(){o.set({isConflictCancelling:!0})});var f=l.getXHROptions(a,{type:"DELETE"});d.a.ajax(f).done(function(e){if(o.set({hasConflicts:!1,isConflictCancelling:!1,cancelConflictError:null}),h){var t=o.get("providerEntityID")
;if(!r(p))return void o.restoreDefaults({hasError:!0,errorMessage:Object(x.default)("Unable to tune channel after cancelling a conflict, please try again.")});n(R({serverEntityID:s,providerEntityID:t,metadataItemEntityID:p.entityID(),playerType:i}))}}).fail(function(e){o.set({isConflictCancelling:!1,cancelConflictError:Object(A.a)(e)})})},s[S.c]=function(e,t){var n=t.serverEntityID,i=t.activity,r=Object(w.c)(e,C.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(I.a)(a,l,c,{playbackSessionID:y.a}).fail(function(e){e.hasConflicts&&r.set({hasConflicts:!0})})}else!o&&s&&r.set({hasConflicts:!1})}},s[S.b]=function(e,t,n){var i=t.serverEntityID,r=t.activity,a=Object(w.c)(e,C.a),o=a.get("liveTVSession")
;if(o&&a.get("serverEntityID")===i&&o.get("activityUUID")===r.uuid){var s=Object(x.default)("This live TV session has ended");r.Response&&r.Response.errorText?s=r.Response.errorText:a.get("hasConflicts")&&(s=Object(x.default)("This live TV session has ended due to a recording conflict")),a.restoreDefaults({hasError:!0,errorMessage:s})}},s["ui/player/liveTVPlayer/togglePlayerAlsoAiringState"]=function(e,t){var n=t.playerType,i=Object(w.c)(e,n),r=i.get("isAlsoAiringVisible")
;Object(E.a)(function(){i.set(Object(b.a)(i,r,{isSettingsVisible:!1,isChaptersVisible:!1,isAlsoAiringVisible:!r,isLyricsVisible:!1}))})},s[M.a]=function(e,t){o(e,t.playerType)},s[M.b]=function(e,t){o(e,t.playerType)},s[M.c]=function(e,t){var n=t.playerType,i=t.positionSeconds,r=Object(w.c)(e,n),a=r.get("liveTVSession");if(a){var o=a.get("startedAt"),s=a.get("lastSeekPosition"),l=o+i;l>s&&Object(E.a)(function(){a.set({currentPosition:l,lastSeekPosition:null})})}},s)},function(e,t,n){"use strict"
;function i(e,t,n){if("mixed"===e)return[];switch(n){case l.h:switch(e){case"season":return[O.a,S.a];case"episode":return[O.a,M.a];case"album":return[O.a,L.a];case"actor":return[u.a,d.a]}break;case l.a:switch(e){case"movie":return[O.a,j.a,L.a];case"clip":return[O.a,j.a];case"episode":return[p.a,j.a,D.a]}break;case l.k:switch(t){case"news":switch(e){case"clip":return[O.a,T.a,f.a]}}switch(e){case"artist":return[O.a,g.a];case"photo":return[y.a,I.a];case"photoalbum":case"clip":return[O.a,I.a]
;case"playlist":return[O.a,w.a];case"collection":return[O.a,m.a];case"actor":case"genre":case"director":case"autotag":case"tag":case"place":return[R.a]}break;case l.g:case l.e:case l.f:case l.c:switch(t){case"news":switch(e){case"clip":return[y.a,f.a]}break;case"podcast":switch(e){case"track":return[p.a,D.a]}}switch(e){case"episode":return[p.a,D.a];case"clip":return[O.a,I.a];case"track":return[O.a,N.a]}break;case l.d:return[P.a,A.a,T.a,f.a,null]}switch(t){case"news":switch(e){case"clip":
return[P.a,T.a,f.a,null]}break;case"podcast":switch(e){case"show":return[O.a]}}switch(e){case"movie":return[O.a,L.a];case"show":return[O.a,E.a];case"season":return[h.a,O.a];case"episode":return[p.a,O.a,x.a];case"artist":return[O.a];case"album":return[h.a,O.a];case"track":return[p.a,O.a];case"photo":return[y.a];case"photoalbum":case"clip":return[O.a];case"extra":return[y.a,C.a];case"musicVideo":return[p.a,y.a];case"playlist":return[O.a,w.a];case"collection":return[O.a,m.a]}return[y.a]}
function r(e,t,n,r,a){var o=t===c.e,l=t===c.g,u=n===s.d;if(!o&&!l&&!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,s=n.isSearch,c=n.isSearchAll,u=n.isExternal,d=n.providerEntityID,p=i(e,r,t);if(s?(p.push(_.a),c&&p.push(z.a)):u&&p.push(k.a),o.c.test(d)&&("movie"===e||"episode"===e||"mixed"===e))switch(t){case l.g:case l.e:p.push(b.a)
;break;case l.c:break;default:p.push(v.a)}if(a){var h=Object(U.a)(a);h&&!p.includes(h)&&p.push(h)}return p}t.a=r,t.b=a;var o=n(41),s=n(26),l=n(32),c=n(197),u=n(2745),d=n(2746),p=n(248),h=n(468),f=n(1150),v=n(1152),g=n(1105),m=n(1106),y=n(762),b=n(2750),I=n(763),S=n(788),M=n(1163),D=n(281),C=n(2754),O=n(575),P=n(2758),j=n(1166),T=n(2759),w=n(2761),E=n(764),x=n(792),A=n(2763),N=n(765),L=n(342),k=n(2765),_=n(1110),R=n(1167),z=n(2768),U=n(2770)},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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(54),c=n(73),u=n(1188),d=n.n(u);t.a=i},function(e,t,n){function i(e){return function(){return e.apply(this,r.initial(arguments))}}var r=n(7);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="full",r="mini"},function(e,t,n){"use strict";function i(e){
var t=e.errorMessage;return a()("div",{className:d.a.sectionError},void 0,a()(c.a,{name:"plex-icon-alert-560",className:d.a.sectionErrorIcon}),t||Object(l.default)("There was a problem saving your changes."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3)),c=n(25),u=n(2013),d=n.n(u);t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(52),m=n(2037),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){var t=e.children,n=s()(e,["children"]);return u.a.createElement("div",a()({className:p.a.pageHeader},n),t)}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2214),p=n.n(d);t.a=i},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(748),c=n(749);t.a=i},function(e,t,n){"use strict";function i(e,t){return t.some(function(t){var n=t.provider,i=Object(s.a)(n);return!(!i||!i.directories)&&i.directories.some(function(t){return Object(h.a)(e,n,t)})})}function r(e,t){var n=e.isVisible;return!0===n||o.a.isFunction(n)&&n(e,t)}n.d(t,"b",function(){return f}),n.d(t,"h",function(){return v}),n.d(t,"c",function(){return g}),n.d(t,"d",function(){return m}),n.d(t,"f",function(){return y}),
n.d(t,"i",function(){return b}),n.d(t,"a",function(){return I}),n.d(t,"j",function(){return S}),n.d(t,"e",function(){return M}),n.d(t,"g",function(){return D}),n.d(t,"l",function(){return C}),n.d(t,"k",function(){return O}),n.d(t,"n",function(){return j}),n.d(t,"m",function(){return T}),t.o=r
;var a=n(7),o=n.n(a),s=n(397),l=n(3),c=n(262),u=n(98),d=n(26),p=n(130),h=n(563),f="home",v="tv",g="movies",m="music",y="photos",b="videos",I="dvr",S="webShows",M="news",D="podcasts",C=[v,g,m,y,b,I,S,M,D],O=[v,g,m,y,b,I,S,M,D],P=Object(c.a)(["key"],[{key:f,isVisible:!1,types:{},metricsMode:"home"},{key:g,title:function(){return Object(l.default)("Movies")},isVisible:!0,types:{type:d.f},metricsMode:"movies",sectionTypeKey:p.a},{key:v,title:function(){return Object(l.default)("TV Shows")},
isVisible:!0,types:{type:d.k},metricsMode:"tv",sectionTypeKey:p.d},{key:m,title:function(){return Object(l.default)("Music")},isVisible:!0,types:{type:d.b},metricsMode:"music",canCreateLibraryForType:!0,sectionTypeKey:p.b},{key:y,title:function(){return Object(l.default)("Photos")},isVisible:!0,types:{type:d.g},sectionTypeKey:p.c},{key:b,title:function(){return Object(l.default)("Other Videos")},isVisible:i,types:{type:d.f},metricsMode:"videos",sectionTypeKey:p.e},{key:I,title:function(){
return Object(l.default)("Live TV & DVR")},isVisible:!0,metricsMode:"dvr"},{key:M,title:function(){return Object(l.default)("News")},isVisible:i,types:{type:d.c,subtype:u.a},metricsMode:"news"},{key:D,title:function(){return Object(l.default)("Podcasts")},isVisible:i,types:{type:d.k,subtype:u.b},metricsMode:"podcasts"},{key:S,title:function(){return Object(l.default)("Web Shows")},isVisible:i,types:{type:d.k,subtype:u.c},metricsMode:"webshows"}]),j=P.get,T=P.getAll},function(e,t,n){"use strict"
;function i(e){var t=e.className,n=e.circleClassName,i=e.title,r=c()(e,["className","circleClassName","title"]);return p.a.createElement(h.a,a()({className:t,"aria-label":Object(f.default)("Play {title}",{title:i})},r),s()(v.a,{className:n}))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(3),v=n(2588),g=n(2589),m=n.n(g);i.defaultProps={className:m.a.playButton,circleClassName:m.a.playCircle},t.a=i},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(26);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(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(2888)),c=n.n(l);i.defaultProps={className:c.a.tertiaryTitle},t.a=i},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(5);n.n(r)},,function(e,t){
var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var i=n(363),r=new i.a({interface:["get","set","remove","clear"]});t.a=r},function(e,t,n){"use strict";n.d(t,"c",function(){return d}),n.d(t,"b",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"k",function(){return f}),n.d(t,"j",function(){return v}),n.d(t,"f",function(){return g}),
n.d(t,"e",function(){return m}),n.d(t,"i",function(){return y}),n.d(t,"g",function(){return b}),n.d(t,"h",function(){return I}),n.d(t,"d",function(){return S})
;var i,r=n(53),a=n.n(r),o=n(39),s=n(29),l=n(1538),c=n(66),u=n(35),d="app/setPrimaryServer",p="app/resetPrimaryServer",h="app/changePrimaryServer",f=Object(o.a)(d),v=Object(o.a)(p),g=Object(o.a)(h),m=Object(o.a)("app/changeCompanionServer"),y=Object(o.a)("app/removeCompanionServer"),b=Object(o.a)("app/garbageCollectEntities"),I=(Object(o.a)("app/navigate"),Object(o.a)("app/navigateBack"),Object(o.a)("app/navigateForward"),Object(o.a)("app/navigateHome")),S=(Object(o.a)("app/navigateSearch"),
Object(o.a)("app/navigatePrePlay"),i={},i["app/garbageCollectEntities"]=function(e,t){Object(u.a)();var n=Object(l.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(u.a)()},i[h]=function(e,t){},i[p]=function(e,t){},i[d]=function(e,t){},i["app/changeCompanionServer"]=function(e,t){var n=Object(c.p)(e,t);n?e.set("companionServer",n):s.a.warn("[Companion] Could not find %s to use as companion server",t.serverEntityID)},
i["app/removeCompanionServer"]=function(e,t){e.unset("companionServer")},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";n.d(t,"a",function(){return C}),n.d(t,"t",function(){return O}),n.d(t,"q",function(){return P}),n.d(t,"g",function(){return j}),n.d(t,"i",function(){return T}),
n.d(t,"r",function(){return w}),n.d(t,"e",function(){return E}),n.d(t,"h",function(){return x}),n.d(t,"c",function(){return A}),n.d(t,"m",function(){return N}),n.d(t,"f",function(){return L}),n.d(t,"k",function(){return k}),n.d(t,"b",function(){return _}),n.d(t,"d",function(){return R}),n.d(t,"j",function(){return z}),n.d(t,"n",function(){return U}),n.d(t,"p",function(){return B}),n.d(t,"o",function(){return F}),n.d(t,"l",function(){return V}),n.d(t,"s",function(){return H})
;var i,r=n(12),a=n.n(r),o=n(6),s=n.n(o),l=n(13),c=n.n(l),u=n(7),d=n.n(u),p=n(39),h=n(29),f=n(109),v=n(223),g=n(685),m=n(63),y=n(66),b=n(1726),I=n(1727),S=n(1728),M=n(686),D=n(116),C="user/resetHomeSettings",O=Object(p.a)("user/waitForCloudProviders"),P=Object(p.a)("user/stopWaitingForCloudProviders"),j=Object(p.a)("user/fetchPlans"),T=(Object(p.a)("user/populatePlans"),Object(p.a)("user/fetchAllFriends"),
Object(p.a)("user/populateAllFriends")),w=Object(p.a)("user/updateUser"),E=Object(p.a)("user/clearUpdateUserError"),x=Object(p.a)("user/fetchWebhooks"),A=Object(p.a)("user/addWebhook"),N=Object(p.a)("user/replaceWebhook"),L=Object(p.a)("user/clearUpdateWebhookError"),k=Object(p.a)("user/removeWebhook"),_=Object(p.a)("user/addHomeHubs"),R=Object(p.a)("user/changePreferredServer"),z=Object(p.a)("user/removeHomeHubs"),U=Object(p.a)(C),B=Object(p.a)("user/seedProviderPromotedContent"),F=Object(p.a)("user/seedPreferredServerContent"),V=Object(p.a)("user/reorderHomeHubs"),H=s()({},g.b,(i={},
i["user/waitForCloudProviders"]=function(e){Object(y.l)(e).set("hasAttemptedPopulateAllProviders",!1)},i["user/stopWaitingForCloudProviders"]=function(e){Object(y.l)(e).set("hasAttemptedPopulateAllProviders",!0)},i["user/fetchPlans"]=Object(f.a)({key:"plans",getModel:y.l}),i["user/populatePlans"]=Object(v.a)({key:"plans",getModel:y.l}),i["user/fetchAllFriends"]=Object(f.a)({key:"allFriends",getModel:y.l}),i["user/populateAllFriends"]=Object(v.a)({key:"allFriends",
fetchActionType:"user/fetchAllFriends",getModel:y.l}),i["user/clearUpdateUserError"]=function(e){Object(y.l)(e).set("updateUserError",null)},i["user/updateUser"]=function(e,t,n){var i=Object(y.l)(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],p=l[1],h=u.substr(5),f=window.atob(p),v=[],g=0;g<f.length;g++)v.push(f.charCodeAt(g));var b=new Uint8Array(v),I=new window.Blob([b],{type:h});s.avatar=I}
var S=new window.FormData;d.a.each(s,function(e,t){S.append(t,e)});var M=r.server.getXHROptions(d.a.result(r,"url"),{type:"PUT",processData:!1,contentType:!1,data:S});c.a.ajax(M).done(function(e){!t.avatar&&r.get("hasPassword")||r.fetch();var n=d.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=m.a.parseXML(e.responseText),n=Array.isArray(t)&&t||(Array.isArray(t.error)?t.error:[t.error]),r=d.a.mapObject(d.a.groupBy(n,function(e){return e&&e.field?e.field:"request"}),function(e,t){return d.a.flatten(e)});i.set({isUpdatingUser:!1,updateUserError:r})})},i["user/fetchWebhooks"]=Object(f.a)({key:"webhooks",getModel:y.l}),i["user/addWebhook"]=function(e){var t=Object(y.l)(e);t.get("webhooks").add({}),t.set("updateWebhooksError",null)},i["user/replaceWebhook"]=function(e,t){
var n=t.oldUrl,i=t.newUrl,r=Object(y.l)(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(S.a)(a,o).always(function(){r.set("isUpdatingWebhooks",!1)}).fail(function(e){r.set("updateWebhooksError",e[0])})}},i["user/clearUpdateWebhookError"]=function(e){Object(y.l)(e).set("updateWebhooksError",null)},i["user/removeWebhook"]=function(e,t){
var n=Object(y.l)(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(S.a)(i,a).always(function(){n.set("isRemovingWebhooks",!1)}).fail(function(e){n.set("updateWebhooksError",e[0])})},i["user/addHomeHubs"]=function(e,t){
var n=e.get("experienceSettings"),i=n.get("homeSettings"),r=t.at,a=t.isUserInitiated,o=t.hubs,s=r>=0?{at:r}:null,l=o.reduce(function(t,n){var i=n.directoryKey,r=n.entityID,a=n.model,o=r?Object(D.a)(e,{hubEntityID:r}):a;return o&&t.push(Object(b.a)({directoryKey:i,hubModel:o})),t},[]);l.length&&(a&&!i.get("hasCustomizations")&&i.set("hasCustomizations",!0),Object(h.a)("[Home] user/addHomeHubs:",t,l),i.get("hubs").add(l,s),Object(I.a)(e))},i["user/removeHomeHubs"]=function(e,t){
var n=e.get("experienceSettings"),i=n.get("homeSettings"),r=t.isUserInitiated,a=t.hubs,o=a.reduce(function(t,n){var i=n.entityID,r=n.homeHubID,a=r;if(i){var o=Object(D.a)(e,{hubEntityID:i});a=o&&M.b(o)}return a&&t.push(a),t},[]);o.length&&(r&&!i.get("hasCustomizations")&&i.set("hasCustomizations",!0),i.get("hubs").remove(o),Object(I.a)(e))},i["user/seedPreferredServerContent"]=function(e,t,n){if(t.hubs.length){var i=e.get("experienceSettings"),r=i.get("homeSettings"),a=s()({},t)
;r.get("hasCustomizations")||(a.at=0),n(_(a)),r.set({hasSeededPreferredServerContent:!0}),Object(I.a)(e)}},i["user/seedProviderPromotedContent"]=function(e,t,n){if(t.hubs.length){var i=e.get("experienceSettings"),r=i.get("homeSettings");n(_(t)),r.set({hasSeededProviderPromotedContent:!0}),Object(I.a)(e)}},i["user/reorderHomeHubs"]=function(e,t){var n=e.get("experienceSettings"),i=n.get("homeSettings"),r=i.get("hubs"),a=t.isUserInitiated,o=t.homeHubIDs,s=o.map(function(e){return r.get(e)})
;a&&!i.get("hasCustomizations")&&i.set("hasCustomizations",!0),i.get("hubs").reset(s),Object(I.a)(e)},i["user/changePreferredServer"]=function(e,t){e.get("experienceSettings").get("homeSettings").set("preferredServerID",t.machineIdentifier),Object(I.a)(e)},i[C]=function(e,t){e.get("experienceSettings").get("homeSettings").restoreDefaults(),Object(I.a)(e)},i))},function(e,t,n){"use strict";function i(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}t.a=i},function(e,t,n){"use strict"
;function i(e){var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2008),u=n.n(c);i.defaultProps={className:u.a.group},t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(380),b=n(45),I=n(27),S=n(2016),M=n(2019),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(I.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,b=l()(e,["id","children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","showOnHover","showOnFocus","hideOnPress","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),I=this.state.isOpen;return m.a.createElement(i,r()({id:t||this._targetID,onMouseEnter:Object(y.a)(this.onMouseEnter,p),onMouseLeave:Object(y.a)(this.onMouseLeave,h),onFocus:Object(y.a)(this.onFocus,f),
onBlur:Object(y.a)(this.onBlur,v),onPress:Object(y.a)(this.onPress,g)},b),a?o()(S.a,{className:s,attachment:c,options:d,target:u||t||this._targetID,isOpen:I},void 0,a):null,n)},t}(g.Component);D.defaultProps={component:M.a,showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.a=D},function(e,t,n){"use strict";function i(e){return e>=5e5?100:e>=5e4?50:e>=2e4?20:10}var r=n(6),a=n.n(r),o=n(297),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(13),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(7),I=n.n(b),S=(n(452),n(27)),M=n(271),D=n(954),C=n(371),O=n(90),P=n(2022),j=n(2023),T=n(19),w=n(1022),E=n(1023),x=n(2024),A=new D.a,N="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",L=function(e){function t(n,i){c()(this,t);var r=d()(this,e.call(this,n,i));return r.preloadImage=function(e){if(!r.props.allowImagePreloading)return v.a.Deferred().resolve(e).promise();var t=v.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 h()(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(S.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(C.a)():1,n=i(e.width*e.height*t),r=e.allowSizeBracket?Math.ceil(e.width/n)*n:e.width,a=e.allowSizeBracket?r/e.width:1,o={width:Math.round(r*t),height:Math.round(e.height*a*t)};e.filters&&!e.useClientFilters&&s()(o,e.filters),e.minSize&&(o.minSize=1),
e.format&&(o.format=e.format),e.quality&&(o.quality=e.quality),e.upscale&&(o.upscale=1);var l=I.a.result(e,"url"),c=l.indexOf("?"),u=l;return c>-1?(u=T.join(l.substring(0,c),o),u+=-1===u.indexOf("?")?"?":"&",u+=l.substring(c+1)):u=T.join(u,o),u}},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,r=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,f=p.url,v=l;if(c&&u){var g=[];if(I.a.isNumber(u.blur)&&g.push("blur("+u.blur+"px)"),I.a.isNumber(u.saturation)&&g.push("saturate("+u.saturation+"%)"),I.a.isNumber(u.opacity)&&g.push("opacity("+u.opacity+"%)"),g.length){var m=g.join(" ");v=v?a()({},v,{
filter:m}):{filter:m}}}var y={};return e.background&&(y={backgroundSize:n,backgroundPosition:i,backgroundRepeat:r}),a()({"data-image-url":t?f:void 0,src:h,style:v,className:d,width:o,height:s},y)},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(j.a)(e.loadedDelayMilliseconds?Object(P.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=v.a.Deferred(),r=A.getBlobUrl(n);if(r)return i.resolve({url:r}),i.promise();var a=A.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);A.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,r=e.transitionProps,o=this.state,s=o.isLoaded,l=o.prevSrc,c=t?w.a:E.a,u=this.getImageProps();return n?y.a.createElement(i,a()({component:c,isLoaded:s,prevSrc:l,transitionProps:r},u)):y.a.createElement(c,a()({},u,{src:s?u.src:l}))},t}(m.Component);L.defaultProps={fallbackSrc:N,exposeUrl:!1,transition:!1,transitionComponent:x.a,
background:!1,minSize:!1,upscale:!1,transitionProps:a()({},M.a,{style:{position:"relative"}}),filters:{},useClientFilters:!1,allowImageBlobs:O.a.hasBlob&&O.a.hasObjectUrl,allowImagePreloading:!0,allowPixelRatioSize:!0,allowSizeBracket:!1,onLoad:function(){},onError:function(){}},t.a=L},function(e,t,n){"use strict";function i(e,t,n){var i=n.shouldCenterCell,a=n.outerPaddingLeft,o=n.outerPaddingTop,s=n.scrollerWidth,l=n.scrollerHeight;return{scrollLeft:e===C.HORIZONTAL?r(t.cellX,{
shouldCenterCell:i,offset:a,viewportDimension:s,cellDimension:t.cellWidth}):0,scrollTop:e===C.VERTICAL?r(t.cellY,{shouldCenterCell:i,offset:o,viewportDimension:l,cellDimension:t.cellHeight}):0}}function r(e,t){if(t.shouldCenterCell){var n=(t.viewportDimension-t.cellDimension)/2,i=Math.round(e-n);return Math.max(i,0)}return e-(t.offset||0)}var a=n(2),o=n.n(a),s=n(12),l=n.n(s),c=n(6),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(64),S=n(71),M=n(210),D=n(729),C=n(54),O=(n(731),n(451),n(27)),P=n(2233),j=n.n(P),T=function(e){function t(n,i){p()(this,t);var r=f()(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=D.a.getPageKey()+"!scrollPosition!"+n.scrollPositionStorageKey),r}return g()(t,e),
t.prototype.componentWillMount=function(){this.props.scrollIndex||this._restoreScrollPosition()},t.prototype.shouldComponentUpdate=function(e,t){return Object(O.a)(this,e,t)},t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.scrollIndex,a=n.scrollDirection,o=n.shouldCenterScrollIndex,s=n.layout,l=this.state,c=l.scrollLeft,u=l.scrollTop,d=l.width,p=l.height,h=l.isMeasured;if(null!=r&&(r!==this._currentScrollIndex||o)){
var f=h&&!t.isMeasured&&r>0,v=h&&r!==e.scrollIndex,g=o!==e.shouldCenterScrollIndex;if(f||v||g){var m=s.getPositionForIndex(Math.max(r,0)),y=i(a,m,{shouldCenterCell:o,outerPaddingLeft:s.options.outerPaddingLeft,outerPaddingTop:s.options.outerPaddingTop,scrollerWidth:d,scrollerHeight:p}),b=y.scrollLeft!==c||y.scrollTop!==u;this.setState({scrollLeft:y.scrollLeft,scrollTop:y.scrollTop,isRestoringScrollPosition:f&&b})}}},t.prototype.componentWillUnmount=function(){
this._scrollPositionKey&&D.a.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft})},t.prototype._restoreScrollPosition=function(){if(this._scrollPositionKey){var e=D.a.get(this._scrollPositionKey);e&&this.setState(u()({isRestoringScrollPosition:!0},e))}},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.children,i=e.scrollerClassName,r=e.virtualListClassName,a=e.ignoreWidth,s=e.ignoreHeight,c=e.resizeTimeout,d=e.scrollDirection,p=(e.scrollIndex,e.scrollPositionStorageKey,e.smoothScroll),h=e.scrollerStyle,f=e.forwardedRef,v=(e.onListUpdate,e.onMeasure,
e.onScroll),g=l()(e,["className","children","scrollerClassName","virtualListClassName","ignoreWidth","ignoreHeight","resizeTimeout","scrollDirection","scrollIndex","scrollPositionStorageKey","smoothScroll","scrollerStyle","forwardedRef","onListUpdate","onMeasure","onScroll"]),m=this.state,y=m.isMeasured,D=m.isRestoringScrollPosition,C=m.width,O=m.height,P=m.scrollTop,j=m.scrollLeft;return o()(I.a,{className:t,ignoreWidth:a,ignoreHeight:s,ignorePosition:!0,resizeTimeout:c,onMeasure:this.onMeasure
},void 0,y&&b.a.createElement(S.a,{className:i,smoothScroll:!1!==p&&!D,scrollDirection:d,scrollTop:P,scrollLeft:j,enableChildrenProps:!0,style:h,ref:f,onScroll:v,onScrollPositionChange:this.onScrollPositionChange},b.a.createElement(M.a,u()({className:r,viewportWidth:C,viewportHeight:O,skipRenderCells:D,onListUpdate:this.onListUpdate},g)),n))},t}(y.Component);T.defaultProps={scrollDirection:C.VERTICAL,scrollerClassName:j.a.scroller,shouldCenterScrollIndex:!1},t.a=b.a.forwardRef(function(e,t){
return b.a.createElement(T,u()({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(6),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(7)),g=n.n(v),m=n(2232),y=n(324),b=(n(731),n(225)),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(m.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(b.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||(e.cellRenderer!==n.cellRenderer||(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,f=e.onPageRequest,v=this.state,m=v.moveIndex,y=v.renderStartIndex,b=v.renderEndIndex,I=v.partiallyVisibleStartIndex,S=v.partiallyVisibleEndIndex;if(!r)return[];var M=r>n.length&&b===n.length-1,D=this._keyPool.getKeys(y,b,n,i,t),C=[];return g.a.each(D,function(e,i){
var f=e.index,v=e.item,y=f>=I&&f<=S,b=a.getPositionForIndex(f,r,n);(null===v||s)&&(M=!0);var D={key:i,keyPropName:t,isVisible:y,isScrolling:h,moveIndex:m,viewportWidth:l,viewportHeight:c,cellIndex:f,cellX:b.cellX,cellY:b.cellY,cellWidth:b.cellWidth,cellHeight:b.cellHeight};s&&(D.scrollLeft=u,D.scrollTop=d),g.a.isString(v)?D[t]=v:D=o()({},v,D),C.push(p(D))}),this._shouldRequestPage=!!f&&(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}(f.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";function i(){return Object(r.createSelector)(Object(l.a)(),Object(c.a)(),function(e,t){
return o.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),n(7)),o=n.n(a),s=n(164),l=n(51),c=n(328);t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(o.a,Object(a.a)("liveTVSession"),function(e,t){return e[t]})}t.a=i;var r=n(5),a=(n.n(r),n(158)),o=n(2654)},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(2887)),c=n.n(l);i.defaultProps={className:c.a.secondaryTitle},t.a=i},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(1189);Object.defineProperty(t,"DragDropContext",{enumerable:!0,get:function(){return i(r).default}});var a=n(2957);Object.defineProperty(t,"DragDropContextProvider",{enumerable:!0,get:function(){return i(a).default}})
;var o=n(2958);Object.defineProperty(t,"DragLayer",{enumerable:!0,get:function(){return i(o).default}});var s=n(2959);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return i(s).default}});var l=n(2969);Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return i(l).default}})},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(332),l=n(3270),c=n.n(l);i.defaultProps={className:c.a.badge},t.a=i
},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/y)*y,i=[],r=0;r<=t;r++)i.push(n+r*y);return i}n.d(t,"b",function(){return C}),n.d(t,"c",function(){return O}),n.d(t,"i",function(){return P}),n.d(t,"h",function(){return j}),n.d(t,"e",function(){return T}),n.d(t,"d",function(){return w}),n.d(t,"j",function(){return E}),n.d(t,"k",function(){return x}),n.d(t,"f",function(){return A}),n.d(t,"g",function(){return N}),
n.d(t,"a",function(){return L});var a,o=n(39),s=n(1273),l=n(1274),c=n(110),u=n(109),d=n(223),p=n(3291),h=n(35),f=n(152),v=n(131),g=n(116),m=n(44),y=(n.n(m),
1800),b=parseInt(m.channelGridChannelOverflowWidth,10),I=parseInt(m.channelGridChannelColumnWidth,10),S=parseInt(m.channelGridTitleColumnWidth,10),M=2*y*12,D=6*y,C=Object(o.a)("ui/channelGridPage/initChannelsGridPage"),O=Object(o.a)("ui/channelGridPage/initMetadataList"),P=Object(o.a)("ui/channelGridPage/setStartTime"),j=Object(o.a)("ui/channelGridPage/resetStartTime"),T=Object(o.a)("ui/channelGridPage/navigateTimeFoward"),w=Object(o.a)("ui/channelGridPage/navigateTimeBack"),E=Object(o.a)("ui/channelGridPage/setViewportSize"),x=Object(o.a)("ui/channelGridPage/updateAiredProgress"),A=Object(o.a)("ui/channelGridPage/populateChannelPrograms"),N=Object(o.a)("ui/channelGridPage/populateChannelsList"),L=(Object(o.a)("ui/channelGridPage/fetchChannelsList"),
Object(c.a)((a={},a["ui/channelGridPage/initChannelsGridPage"]=function(e,t,n){var r=i(e),a=t.serverEntityID,o=t.providerEntityID,s=t.directoryKey,c=Object(g.i)(e,{serverEntityID:a}),u=Object(g.f)(e,{providerEntityID:o}),d=new l.a(null,{server:c,provider:u,type:p.a.CHANNEL}),h={serverEntityID:a,providerEntityID:o,directoryKey:s,channelsList:d};r.set(h),n(j())},a["ui/channelGridPage/initMetadataList"]=function(e,t,n){
var r=t.containerKey,a=t.serverEntityID,o=t.providerEntityID,l=i(e),c=Object(g.i)(e,{serverEntityID:a}),u=Object(g.f)(e,{providerEntityID:o});if(r!==l.get("containerKey")){var d=new s.a({containerKey:r},{server:c,provider:u});l.set({containerKey:r,metadataList:d})}},a["ui/channelGridPage/resetStartTime"]=function(e,t,n){var i=Math.floor(Date.now()/1e3);n(P(i))},a["ui/channelGridPage/setStartTime"]=function(e,t,n){var a=i(e),o=a.get("visibleColumns"),s=r(t,o);Object(h.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]+y;n(P(o))},a["ui/channelGridPage/navigateTimeBack"]=function(e,t,n){var r=i(e),a=r.get("columnTimes"),o=a[0]-y,s=Math.floor(Date.now()/1e3)-D;o+y>s&&n(P(o))},a["ui/channelGridPage/setViewportSize"]=function(e,t,n){var a=t.width,o=t.height,s=i(e),l=Math.floor(a+b),c=Math.max(Math.floor((a-S)/I),1)+1,u=Math.floor((l-S)/c),d=r(s.get("startTime"),c)
;Object(h.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(h.a)(function(){t.set({airedProgress:l})})},a["ui/channelGridPage/populateChannelPrograms"]=function(e){
var t=i(e),n=t.get("metadataList"),r=t.get("columnTimes"),a=t.get("viewportWidth");n&&a>0&&(n.set({isPending:!0,error:null}),n.populateRange({start:r[0],end:r[r.length-1],reloadThreshold:M}).done(function(){n.set({isPending:!1,isPopulated:!0,error:null})}).fail(function(e,t){t.aborting||n.set({isPending:!1,error:Object(f.a)(t)})}))},a[v.a]=function(e,t,n){if(!t.metadataItemEntityID&&!t.containerKeyPattern){var r=Object(g.i)(e,t),a=i(e),o=a.get("metadataList"),s=a.get("channelsList")
;s&&o&&s.server===r&&o.server===r&&(n(A()),n(N()))}},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){return o.a.createElement("div",e)}var r=n(1),a=(n.n(r),n(0)),o=n.n(a),s=n(3485),l=n.n(s);i.defaultProps={className:l.a.pageHeader},t.a=i},,function(e,t,n){
var i=n(640)("wks"),r=n(502),a=n(201).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";var i=n(77),r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(19),c=n(503),u=n(508),d=n(91),p=i.c.Collection.extend({mixins:[c.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(a.a.Deferred().resolve().promise()),!t.allowInCache&&!t.persistInCache)return void i.c.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var n=this.cache.getItemCacheKey(this),r=this.cache.get(n)
;if(this.uninitialize(),t.onlyIfCached&&(r||(r={})),r)return r;i.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),i.c.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=s.a.result(this,"url")),this.path&&(e=l.join([e,s.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=l.join(e,i)}return e},convert:function(e,t){var n=s.a.isObject(e)?e:d.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=s.a.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)}});p.extend=function(){var e=i.c.Collection.extend.apply(this,arguments);return e.prototype.cache=new u.a,e},t.a=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),r=n.n(i),a=n(18),o=n(19),s=n(24),l=n(65),c=n(41),u=n(1577),d=n(97),p=n(121),h=n(365),f=n(512),v=s.a.extend({name:"HubCollection",
context:["server","provider","section","identifier","hubKey","hubCount","count","includeEmpty","libraryHubsOnly","includeFeaturedTags","includeLibraryPlaylists","includeTypeFirst","includeStations","includeExternalMetadata","asyncAugmentMetadata","excludes","excludeFields","excludeElements","allowSync","maxLength","wait"],responseContext:["identifier","allowSync"],model:f.a,responseType:function(){return Object(d.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.includeStations&&(t.includeStations=1),this.includeExternalMetadata&&(t.includeExternalMetadata=1),this.asyncAugmentMetadata&&(t.asyncAugmentMetadata=1),this.wait&&(t.wait=1),this.excludes&&this.excludes.length&&this.excludes.forEach(function(e){t["exclude"+Object(h.a)(e)]=1}),o.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=o.join(r.a.result(this,"url"),{onlyTransient:1})),s.a.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){return t===l.a.xml?Object(p.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(this.includeTypeFirst&&"tv"!==this.layout){var s=Object(u.a)(),l=a&&a.some(function(e){return e.hubIdentifier===s.hubIdentifier});if((e.identifier===c.g||e.identifier===c.h)&&!l)if(a){var d=0===a.length?0:1;e.Hub.splice(d,0,s)}else e[n]=[s]}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=v},function(e,t,n){"use strict";var i=n(520),r=n(682),a=n(372),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=i.a.folder:e.placeholderClass||(this.placeholderClass=i.a[this.type])),a.a.prototype.setup.apply(this,arguments)},setDimensions:function(e){
e.width?e.height=r.a.getPosterHeight(this.type,e.width):e.height&&(e.width=r.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=i.a.folder)}});t.a=o},function(e,t,n){"use strict";function i(e){var t=e.key,n=e.actionSuffix,i=e.fetchActionType,o=e.getModel,s=Object(a.a)(n||t),l=Object(r.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(36),n(365)),a=n(1724)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"TRANSCODE_JOBS",function(){return r}),n.d(t,"BACKGROUND_TRANSCODE_JOBS",function(){return a}),n.d(t,"SEARCH_RESULT",function(){return o}),n.d(t,"SYNC_METADATA_ITEM",function(){return s});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="transcodeJobs",a="backgroundTranscodeJobs",o="searchResults",s="syncMetadataItems"},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(53),a=n.n(r)},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";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(7),b=n.n(y),I=n(52),S=n(2010),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,m.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(b.a.isString(e))return o()("option",{value:e},e,e);var t=b.a.keys(e),n=t[0];return o()("option",{value:n},n,e[n])})))
},t}(g.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";function i(e){return e.ui.authCodeExchange}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(2342)),c=n.n(l);i.defaultProps={className:c.a.header},t.a=i},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(83)),c=n(2343),u=n.n(c);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(d.c)("metrics").trackClick(o()({page:n,action:e,type:t.get("type")},i))}n.d(t,"a",function(){return D}),
n.d(t,"e",function(){return C}),n.d(t,"g",function(){return O}),n.d(t,"d",function(){return P}),n.d(t,"c",function(){return j}),n.d(t,"f",function(){return T}),n.d(t,"b",function(){return w})
;var r,a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(39),u=n(19),d=n(15),p=n(238),h=n(60),f=n(2459),v=n(263),g=n(1082),m=n(76),y=n(41),b=n(38),I=n(43),S=n(66),M=n(3),D="metadata/repopulateMetadataItem",C=Object(c.a)("metadata/selectMetadataItemStream"),O=Object(c.a)("metadata/updateMetadataItemFollowMute"),P=Object(c.a)(D),j=Object(c.a)("metadata/removeMetadataItem"),T=Object(c.a)("metadata/toggleMetadataItemSave"),w=(r={},r[D]=function(e,t){var n=Object(S.m)(e,t);n&&n.fetch({data:{skipRefresh:1},
usePopulatedParams:!0})},r["metadata/removeMetadataItem"]=function(e,t){var n=Object(S.m)(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(S.e)(e,t),c={mediaIndex:i,streamTypeString:r,streamID:a,allParts:o,allowMetrics:!!s,metricsProperties:{page:s}};Object(f.a)(l,c).fail(function(e){
e.aborting||n(Object(v.c)(Object(M.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(S.i)(e,t),d=Object(S.e)(e,t),f=void 0,v=d.get(a),y=v.find(function(e){return e.ratingKey===n}),b=o()({},y);r===p.b.FOLLOW&&(b.followed=s,b.muted=s&&y.muted?!y.muted:y.muted,f=m.u),r===p.b.MUTE&&(b.muted=s,b.followed=s&&y.followed?!y.followed:y.followed,f=m.C)
;var I=Object(g.a)(v,y,b),M=c.get("features").get(h.b.ACTIONS).get("actions").get(r),D=s?M.get("key"):M.get("reverseKey"),C=u.join(D,{ratingKey:n});d.set(a,I);var O=c.getXHROptions(C,{type:"PUT"});l.a.ajax(O).then(null,function(){d.set(a,v)}),i(f,d,t.metricsPage,{identifier:c.get("metricsIdentifier"),context:y.tag,value:s})},r["metadata/toggleMetadataItemSave"]=function(e,t,n){
var i=Object(S.i)(e,t),r=Object(S.e)(e,t),a=i.get("identifier"),o=a===y.e||a===y.f,s=r.get("ratingKey"),c=r.get("grandparentRatingKey"),d=void 0;if(c&&!o){s=c;var p=r.get("grandparentKey");if(p){var f=Object(b.a)(I.g,p,t.serverEntityID);d=Object(S.m)(e,{metadataItemEntityID:f})}}var g=r.get("saved"),m=!g;r.set("saved",m),d&&d.set("saved",m);var M=i.get("features").get(h.b.ACTIONS).get("actions").get("save"),D=m?M.get("key"):M.get("reverseKey"),C=u.join(D,{ratingKey:s}),O=i.getXHROptions(C,{
type:"PUT"});l.a.ajax(O).then(function(){n(Object(v.b)({serverEntityID:t.serverEntityID}))},function(){r.set("saved",g),d&&d.set("saved",g)})},r)},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,a){if(a)switch(a){case c.h:switch(t){case s.b:switch(e){case l.l:return n.thumb||n.grandparentThumb}}switch(e){case l.j:case l.e:case l.a:case l.l:return n.thumb}break;case c.a:
case c.d:switch(e){case l.f:return r(n);case l.e:return r(n)||n.thumb}break;case c.e:switch(e){case l.f:return r(n);case l.e:return n.thumb||r(n)}break;case c.g:case c.f:switch(e){case l.e:return n.thumb}}switch(t){case s.b:switch(e){case l.k:return n.thumb;case l.l:return n.grandparentThumb||n.thumb}break;case s.c:switch(e){case l.e:return n.thumb}}switch(e){case l.f:case l.k:return n.thumb;case l.j:return i(n);case l.e:return n.grandparentThumb;case l.b:return n.thumb;case l.a:case l.l:
return i(n);case l.g:case l.h:case l.c:return n.thumb;case l.i:return n.thumb||n.composite;default:return n.thumb}}function o(e,t,n,i,r,o){var s=null==e?Object(u.e)(t,n,i,o):e,l=null==t?Object(u.d)(e,n,i,o):t;return{url:a(n,i,r,o),width:s,height:l}}t.b=a,t.a=o;var s=n(98),l=n(26),c=n(32),u=n(126)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(s.a,Object(o.a)(),Object(a.a)("providerEntityID"),function(e,t,n){return e[t&&t.providerEntityID||n]})}t.a=i
;var r=n(5),a=(n.n(r),n(158)),o=n(168),s=n(132)},function(e,t,n){"use strict";function i(){return Object(r.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=o.a.find(n,function(e){return e.key===t}):e&&(i=o.a.find(n,function(t){var n=Object(s.q)(t.type),i=Object(s.q)(e);return!!n&&!!i&&n.id===i.id})),i||(i=o.a.first(n)),i})}t.a=i;var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(26),l=n(283)},function(e,t,n){"use strict"
;var i=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,a;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(a=[],i=arguments.length,i=1;i<arguments.length;++i)a.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,a)}},this.dispose=function(){e={}}}}
;i.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},e.exports=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(75),l=n(29),c=n(19),u=n(15),d=n(908),p=s.a.extend({initialize:function(){o.a.bindAll(this,"onAjaxSend","onAjaxComplete"),this.requests=[],this.byId={}},startListening:function(){
var e=r()(document);e.on("ajaxSend",this.onAjaxSend),e.on("ajaxComplete",this.onAjaxComplete)},stopListening:function(){var e=r()(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=o.a.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,t.xhr.abort(),this.remove(t))},store:function(e,t){
var n=o.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=o.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 r=Object(c.parseUrl)(n.url)
;if(!i||"/log"!==r.pathname){var a=Object(u.c)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),i=t&&t.get("isConnected"),r=o.a.result(t,"url");return!!i&&0===n.url.indexOf(r)});a&&(Object(l.a)('[Connections] Active connection to "%s" lost authorization',a.get("debugName")),a.trigger("error:connection",a))}}}});t.a=new p},function(e,t,n){"use strict";var i=n(77),r=n(7),a=n.n(r),o=n(19),s=n(512),l=n(435),c=n(436),u=n(934),d=n(26),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=a.a.first(n))}if(e instanceof i.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=a.a.result(e,"url"),r=e.get("currentSubset"),s=e.get("currentFolderKey"),l=e.get("currentType");if("folder"===r.id)n=s||o.join([i,"all"]);else{var c=e.get("items"),u=c.getParams();if(u.type&&delete u.type,u.timelineState&&delete u.timelineState,u.unwatchedLeaves){u[Object(d.p)(e.get("type")).typeString+".unwatched"]=1,delete u.unwatchedLeaves}l&&(u.sourceType=l.id),n=o.join([i,r.id],u),n=c.replaceSpecialFilterOperators(n)}return this._resolveURI({prefix:"library",
parts:[e.get("uuid"),"directory",n]})},getBatchLibraryMetadataURI:function(e,t){var n=this._getSectionInfo(a.a.first(e)),i=a.a.map(e,function(e){return e.get("ratingKey")}),r="/library/metadata/"+i.join(",");return this._resolveURI({prefix:"library",parts:[n.sectionUUID,"directory",r]})},getLibraryMetadataURI:function(e,t){t||(t={});var n,i=this._getSectionInfo(e),r=a.a.result(e,"url");return t.excludeSeedItem&&(r=o.join(r,{excludeSeedItem:1})),
n=e.models||e.collectionName||e instanceof s.a?"directory":e.get("radio")?"station":"item",this._resolveURI({prefix:"library",parts:[i.sectionUUID,n,r]})},getMetadataListURI:function(e,t){t||(t={});var n=this._getSectionInfo(e);return this._resolveURI({prefix:"library",parts:[n.sectionUUID,"directory",o.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=a.a.result(e,"url"),i=e.get("items"),r=i&&i.length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[e.channel.get("identifier"),r,n]})},title:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataTitle(n,t);e=a.a.first(n)}return e.get("isSection")?this.getSectionTitle(e,t):e.get("isMetadataList")?this.getMetadataListTitle(e,t):this.getLibraryMetadataTitle(e,t)},getSectionTitle:function(e){
var t=e.get("title"),n=e.get("currentSubset"),i=e.get("currentFilters");return"all"!==n.id?t+": "+n.get("title"):i.length?t+": "+a.a.flatten(a.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=a.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(l.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=a.a.map(t,function(e){return e?encodeURIComponent(e):""});return e.prefix+"://"+n.join("/")},_getSectionInfo:function(e){var t=e.get("librarySectionUUID"),n=e.get("librarySectionID");if(!t||!n){var i=Object(c.a)(e)
;a.a.isEmpty(i)||(t=i.get("uuid"),n=i.id)}return{sectionUUID:t,sectionID:n}}};t.a=p},function(e,t,n){"use strict";n.d(t,"b",function(){return a});var i=n(17),r=n(16),a={SCROBBLE:"scrobble",SAVE:"save",ADD_TO_CATALOG:"addToCatalog",FOLLOW:"follow",MUTE:"mute",RATE:"rate"},o=i.a.extend({name:"ProviderActionModel",context:["server","provider"],syncedAttrs:{id:r.a.string,key:r.a.string,reverseKey:r.a.string}});t.a=o},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){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(529),a=n(1828),o=n(448),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";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(63)},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(554),l=n(25);i.defaultProps={iconComponent:l.a},t.a=i},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(2220)),l=n.n(s);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=Object(d.a)(e);return n.set({isBusy:!0}),
Object(p.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(c.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(13),o=n.n(a),s=n(39),l=n(35),c=n(3),u=n(2287),d=n(522),p=n(1058),h=n(1060),f=Object(s.a)("user/authCodeExchange/readStoredPIN"),v=Object(s.a)("user/authCodeExchange/preloadPIN"),g=Object(s.a)("user/authCodeExchange/resetAuthCodeExchange"),m=Object(s.a)("user/authCodeExchange/beginPolling"),y=Object(s.a)("user/authCodeExchange/stopPolling"),b=Object(s.a)("user/authCodeExchange/skipSignIn"),I=(r={},r["user/authCodeExchange/resetAuthCodeExchange"]=function(e,t,n){var i=Object(d.a)(e)
;Object(l.a)(function(){i.set({code:null,pinID:null,authToken:null,errorMessage:null})})},r["user/authCodeExchange/readStoredPIN"]=function(e,t,n){var r=Object(d.a)(e),a=r.get("pinIDInitial"),s=a?o.a.Deferred().resolve(a).promise():o.a.Deferred().reject().promise(),l=s.then(function(){return Object(h.a)(e,a).fail(function(){r.set({errorMessage:Object(c.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(c.default)("There was an error signing in")}),o.a.Deferred().reject().promise())}).then(function(e){r.set({authToken:e})});t.shouldCreatePIN&&l.fail(function(){return i(e,n)})},r["user/authCodeExchange/preloadPIN"]=function(e,t,n){Object(d.a)(e).set({isBusy:!0,code:null,pinID:null}),i(e,n)},r["user/authCodeExchange/beginPolling"]=Object(u.a)(),r["user/authCodeExchange/stopPolling"]=function(e,t,n){var i=Object(d.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){function n(e,t,n){return e!==t?n.fn(this):n.inverse(this)}e.exports=n},function(e,t,n){"use strict";function i(e,t){var n=Object(O.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 h=o.get("type");a.restoreDefaults({serverEntityID:i.entityID(),providerEntityID:r.entityID(),isOpen:!0,openState:l||h===D.a?C.b:C.a,isPlayQueueLoading:!0,playQueue:o}),Object(b.a)(s()({serverModel:i,providerModel:r,playQueueModel:o},p)).done(function(){a.set(s()({isPlayQueueLoading:!1},d)),t(F({playQueueType:h,mediaIndex:c,bitrate:u}))}).fail(function(){var e=n.get("remotePlayer");if(e){var t=e.get("friendlyName");a.restoreDefaults({hasError:!0,
errorMessage:Object(A.default)('An error occurred loading the media being played on "{playerName}".',{playerName:t})})}})}}n.d(t,"a",function(){return R}),n.d(t,"l",function(){return z}),n.d(t,"m",function(){return U}),n.d(t,"k",function(){return B}),n.d(t,"n",function(){return F}),n.d(t,"o",function(){return V}),n.d(t,"b",function(){return H}),n.d(t,"j",function(){return Q}),n.d(t,"g",function(){return Y}),n.d(t,"e",function(){return G}),n.d(t,"f",function(){return W}),n.d(t,"i",function(){
return K}),n.d(t,"d",function(){return q}),n.d(t,"c",function(){return Z}),n.d(t,"h",function(){return X})
;var a,o=n(6),s=n.n(o),l=n(13),c=n.n(l),u=n(7),d=n.n(u),p=n(39),h=n(29),f=n(15),v=n(465),g=n(2457),m=n(754),y=n(378),b=n(2458),I=n(376),S=n(231),M=n(704),D=n(239),C=n(190),O=n(99),P=n(41),j=n(80),T=n(141),w=n(514),E=n(755),x=n(66),A=n(3),N=n(58),L=n(26),k=n(151),_=n(732),R=Object(p.a)("ui/player/remotePlayer/changeRemotePlayer"),z=Object(p.a)("ui/player/remotePlayer/syncRemotePlayerCurrentItem"),U=Object(p.a)("ui/player/remotePlayer/syncRemotePlayerState"),B=Object(p.a)("ui/player/remotePlayer/syncRemotePlayQueueState"),F=Object(p.a)("ui/player/remotePlayer/syncRemoteQuality"),V=Object(p.a)("ui/player/remotePlayer/syncRemoteStreams"),H=Object(p.a)("ui/player/remotePlayer/changeRemotePlayerVolume"),Q=Object(p.a)("ui/player/remotePlayer/showRemotePlayerError"),Y=Object(p.a)("ui/player/remotePlayer/mirrorDetails"),G=Object(p.a)("ui/player/remotePlayer/discoverRemotePlayers"),W=Object(p.a)("ui/player/remotePlayer/idleRemotePlayer"),K=Object(p.a)("ui/player/remotePlayer/removeRemotePlayer"),q=Object(p.a)("ui/player/remotePlayer/confirmRemoteToLocal"),Z=Object(p.a)("ui/player/remotePlayer/confirmLocalToRemote"),X=(a={},
a["ui/player/remotePlayer/changeRemotePlayer"]=function(e,t){var n=e.get("companionServer").get("desktop").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,u=o.containerKey,d=o.key,p=o.mediaIndex,f=o.bitrate,v=o.playQueueItemID,y=o.shouldRefreshPlayQueue,b=o.initialState;if(u&&d){var S=i(e,a);if(S){
var M=s===j.b,D=!s||M?j.a:s,O=e.get("servers").populateServer(D),T=O.then(function(t){return(t.get("isCloud")?e.get("user").get("desktop").get("providers"):t.get("providers")).populate().then(function(e){return e})}),w=T.then(function(e){var t=e.get(l)||e.get(Object(m.a)(u)?P.d:P.a);return t?t.populate().then(function(e){return e}):c.a.Deferred().reject().promise()}),E=w.then(function(e){return Object(g.a)({providerModel:e,currentPlayQueueModel:S.get("playQueue"),metadataKey:d,containerKey:u,
playQueueOptions:{playQueueType:a,playQueueOwn:!1}})});c.a.when(O,w,E).then(function(t,i,a){if(S.get("playQueue")!==a)return void r({appModel:e,serverModel:t,providerModel:i,playerModel:S,playQueueModel:a,openState:S.get("isOpen")?null:C.b,mediaIndex:p,bitrate:f,initialState:b,requestOptions:{metadataKey:M?t.swizzleNodeUrl(d):d,containerKey:M?t.swizzleNodeUrl(u):u}},n);if(!S.get("isPlayQueueLoading")&&!a.get("isUpdatePending")&&y){
var o=a.get("playQueueItems"),s=null!=v?o.get(v):o.find(function(e){return d===e.get("metadataItem").get("key")});if(S.set({isLyricsVisible:!1}),s){var l=a.get("playQueueSelectedItemID"),c=o.get(l),g=a.get("playQueueSelectedItemOffset"),m=o.indexOf(c),D=o.indexOf(s),O=s.get("metadataItem"),P=s.get("playQueueItemID");Object(h.a)("[Cast] The current metadata item on the remote player changed to "+O.get("title")),Object(I.a)(a).done(function(){a.set({playQueueSelectedItemID:P,
playQueueSelectedItemOffset:g+(D-m)})})}else Object(I.a)(a)}}).fail(function(){var t=e.get("remotePlayer");if(t){var n=t.get("friendlyName");S.restoreDefaults({hasError:!0,errorMessage:Object(A.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(L.q)(u.get("type"));if(p&&p.mediaType===N.d){var h=d.get("Media")[a],f=v.a.prop("video"),g=T.a.getAvailableQualitiesFor(h,d.server,{lowestQualityIndex:f.lowestQualityIndex}),m=e.get("experienceSettings"),y=null==o?m.defaults().localQuality:T.a.getNearestIndexToBitrate(o);if(T.a.isExplicitQuality(y)){var b=g[0],I=g[g.length-1]
;b&&y<b.index?y=b.index:I&&y>I.index&&(y=T.a.ORIGINAL)}s.set({qualityIndex:y,availableQualities:g})}}},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,c=void 0===l?0:l,u=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[c];if(a===m.get("key")&&b){var I=d.a.findWhere(b.Stream,{streamType:k.a.get("audio").id,selected:!0}),M=d.a.findWhere(b.Stream,{streamType:k.a.get("subtitles").id,selected:!0}),D=parseInt(u,10),C=parseInt(p||0,10);null!=u&&I&&I.id!==D&&n(Object(S.e)({metadataItemEntityID:m.entityID(),mediaIndex:s,streamTypeString:"audio",streamID:D})),
M&&M.id!==C&&n(Object(S.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(y.a)(e),i=Object(x.i)(e,t),r=Object(x.e)(e,t);Object(E.a)(Object(w.a)(i.get("identifier"),i.get("providerIdentifier")),Object(_.a)(e.get("user").get("features").getState()))&&n.mirrorDetails(r)},a["ui/player/remotePlayer/discoverRemotePlayers"]=function(e){var t=e.get("companionServer");t&&t.get("desktop").get("players").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===M.a?Object(f.c)("remoteCastPlayerManager").endSession():a===M.b&&Object(f.c)("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(I.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(y.a)(e).startPlayback(i),i.set("confirmLocalToRemote",!1)},a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.itemServerEntityID,r=e.itemProviderEntityID,o=e.type,s=e.isOffscreen,u=e.url,d=e.width,p=e.height,h=e.icon,f=e.isFolder,v=e.transitionProps,g=e.onLoad,m=e.onError;return s?null:u?a()(l.a,{serverEntityID:i||t,providerEntityID:r||n,url:u,width:d,height:p,backgroundPosition:"artist"===o?"center top":"center",transitionProps:v,onLoad:g,
onError:m}):a()(c.a,{type:o,width:d,height:p,isFolder:f,icon:h})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(760)),c=n(1104);t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},s.c,o.c,Object(a.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(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(55),c=n(143),u=n(2577);t.a=Object(l.a)(i)(u.a)},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2739),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose,r=c()(e,["isOpen","metricsProperties","onModalClose"]);return s()(f.a,{isOpen:t,metricsPage:h.I,metricsProperties:n,onModalClose:i},void 0,p.a.createElement(v.a,a()({},r,{onModalClose:i})))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(30),f=n(117),v=n(2785);t.a=i
},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="RECORDING_PRIORITY_SUBSCRIPTION",r="PLAY_QUEUE_ITEM",a="PLAYLIST_ITEM",o="ALBUM_ITEM",s="HOME_HUB_ITEM"},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(j.i)(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(O.h)({metadataListEntityID:a.entityID()})),o&&n(Object(O.h)({metadataListEntityID:o.entityID()})),s&&n(L())}function o(e,t){var n=Object(j.i)(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 T}),n.d(t,"c",function(){return w}),n.d(t,"e",function(){return E}),n.d(t,"g",function(){return A}),n.d(t,"a",function(){return N}),n.d(t,"b",function(){return L}),n.d(t,"f",function(){return _}),n.d(t,"h",function(){return R})
;var s,l=n(6),c=n.n(l),u=n(39),d=n(19),p=n(15),h=n(221),f=n(107),v=n(92),g=n(164),m=n(110),y=n(109),b=n(1122),I=n(231),S=n(100),M=n(1124),D=n(141),C=n(152),O=n(135),P=n(131),j=n(116),T=Object(u.a)("INIT_PRE_PLAY_PAGE"),w=Object(u.a)("INIT_PRE_PLAY_DESCENDANT_LIST"),E=Object(u.a)("INIT_PRE_PLAY_SIBLING_LIST"),x=Object(u.a)("INIT_PRE_PLAY_AUGMENTED_HUBS"),A=Object(u.a)("PRE_FETCH_PRE_PLAY_METADATA_ITEM"),N=Object(u.a)("FETCH_PRE_PLAY_METADATA_ITEM"),L=Object(u.a)("FETCH_PRE_PLAY_RELATED_HUBS"),k=Object(u.a)("FETCH_PRE_PLAY_AUGMENTED_HUBS"),_=Object(u.a)("MAKE_PRE_PLAY_VIDEO_DECISION"),R=Object(m.a)((s={},
s.INIT_PRE_PLAY_PAGE=function(e,t){var n=i(e),r=Object(j.i)(e,t),a=Object(j.f)(e,t),o=t.providerEntityID,s=t.metadataKey;if(o!==n.get("providerEntityID")||s!==n.get("metadataKey")){var l=new v.a({key:s},{server:r,provider:a}),c=d.join([s.replace(/(\/library)?\/metadata/,"/hubs/metadata"),"related"]),u=new h.default([],{server:r,provider:a,metadataItem:l,hubKey:c,count:12,includeExternalMetadata:!0,asyncAugmentMetadata:!0});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(j.i)(e,t),a=Object(j.f)(e,t),o=Object(j.c)(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 f.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(j.i)(e,t),a=Object(j.f)(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 f.default({containerKey:s},{server:r,provider:a,excludeAllLeaves:!0});n.set({siblingKey:s,siblingList:l})}},
s.INIT_PRE_PLAY_AUGMENTED_HUBS=function(e,t,n){var r=i(e),a=r.get("metadataItem");if(!a.get("augmentationKey"))return void r.set({isAugmentedHubsPending:!1,isAugmentedHubsPopulated:!0});var o=new h.default([],{server:a.server,provider:a.provider,hubKey:a.get("augmentationKey"),count:12,wait:1});r.set({augmentedHubs:o}),n(k())},s.PRE_FETCH_PRE_PLAY_METADATA_ITEM=function(e,t){var n=Object(j.c)(e,t);Object(b.a)(n,{forceFetch:!0})},s.FETCH_PRE_PLAY_METADATA_ITEM=function(e,t,n){
var r=i(e),a=r.get("metadataItem"),o=r.get("isMetadataItemPending");r.set("isMetadataItemPending",!0),Object(b.a)(a,{forceFetch:!0}).done(function(){r.set({isMetadataItemPending:!1,isMetadataItemPopulated:!0,metadataItemError:null}),n(x())}).fail(function(e,t){if(t.aborting)return void r.set("isMetadataItemPending",o);r.set({isMetadataItemPending:!1,metadataItemError:Object(C.a)(t)})})},s.FETCH_PRE_PLAY_RELATED_HUBS=Object(y.a)({key:"relatedHubs",getModel:i}),
s.FETCH_PRE_PLAY_AUGMENTED_HUBS=Object(y.a)({key:"augmentedHubs",getModel:i}),s.MAKE_PRE_PLAY_VIDEO_DECISION=function(e){var t=i(e),n=t.get("metadataItem"),r=e.get("settings"),a=Object(p.c)("getDecisionOptions")(n),o=M.a.getMediaDecision(c()({item:n,transcodeServer:n.server,quality:D.a.getCurrentQuality(n,r)},a));t.set("decisionMediaItem",o.media)},s[S.c]=function(e,t){t.activity.type===g.a.LIBRARY_REFRESH_ITEMS&&o(e,t)},s[S.b]=function(e,t){t.activity.type===g.a.LIBRARY_REFRESH_ITEMS&&o(e,t)},
s[I.a]=function(e,t,n){r(e,t)&&a(e,t,n)},s[P.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(j.i)(e,t),c=o.get("siblingList"),u=t.parentMetadataKey;s&&s.server===l&&c&&u&&s.get("parentKey")===u&&n(Object(O.h)({metadataListEntityID:c.entityID()}))}},s))},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(794)),c=n(476),u=n(409),d=n(3068),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(203),v=n(123),g=n(35),m=n(3216),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(g.a)(function(){e.machineIdentifier&&e.changePrimaryServer({machineIdentifier:e.machineIdentifier,metricsProperties:{context:v.g}})})},t.prototype.render=function(){return p.a.createElement(m.a,this.props)},t}(d.Component);t.a=Object(h.b)(i,{changePrimaryServer:f.f})(y)},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e,t){return t.providerEntityID},Object(I.a)(),function(e,t){
var n=t.providers,i=t.isProvidersPending,r=t.isProvidersPopulated,a=t.providersError,o=t.desktop,s=o.libraries,l=o.isLibrariesPending,c=o.isLibrariesPopulated,u=o.librariesError,d=t.isPersonalCloudServer,p=!r&&!a,h=!c&&!u,f=e||Object(M.a)(C.PROVIDER,S.d,t.entityID);return{providerEntityID:f,hasProvider:n.indexOf(f)>-1,isPersonalCloudServer:d,isRetrying:i||l,showSpinner:p||h,showError:!!u&&!s.length}})}
var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(100)),I=n(34),S=n(41),M=n(38),D=n(35),C=n(224),O=n(1251),P={dispatchFetchLibraries:b.g,dispatchPopulateLibraries:b.k,dispatchFetchProviders:b.h,dispatchPopulateProviders:b.l},j=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(D.a)(function(){i.props.dispatchPopulateProviders({serverEntityID:t}),i.props.dispatchPopulateLibraries({serverEntityID:t})})},i.onRepopulate=function(e){var t=e.serverEntityID;Object(D.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,P)(j)},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(6),o=n.n(a),s=n(19),l=n(1276),c=void 0,u=void 0},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(39),r=n(111),a=Object(i.a)(r.A),o=Object(i.a)(r.C),s=Object(i.a)(r.B),l=Object(i.a)(r.o),c=Object(i.a)(r.L),u=Object(i.a)(r.q),d=Object(i.a)(r.N),p=Object(i.a)(r.u),h=Object(i.a)(r.R),f=Object(i.a)(r._5),v=Object(i.a)(r.h),g=Object(i.a)(r.p),m=Object(i.a)(r.M),y=Object(i.a)(r._1),b=Object(i.a)(r._6),I=Object(i.a)(r.i)
},,,function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(663),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(7),a=n.n(r);t.a=i},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(7),o=n.n(a),s=n(29)},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}),n.d(t,"d",function(){return c});var i,r=n(39),a=n(678),o="ui/showAlert",s=Object(r.a)("ui/repopulatePage"),l=Object(r.a)(o,function(e){return"string"==typeof e?{type:a.a,message:e}:e}),c=(i={},i[o]=function(e,t){},i)},function(e,t,n){
"use strict";var i=n(21),r=n(18),a=n(1651),o=n.n(a),s={success:!0,error:!0,notify:!0},l=i.a.ItemView.extend({className:"alert-bar",template:o.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(){r.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";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(39),a=n(109),o=n(223),s=n(66),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(a.a)({key:"providers",getModel:s.l}),i["provider/populateCloudProviders"]=Object(o.a)({
key:"providers",fetchActionType:"provider/fetchCloudProviders",getModel:s.l}),i["providers/fetchProvider"]=Object(a.a)({getModel:s.i}),i["providers/populateProvider"]=Object(o.a)({getModel:s.i,fetchActionType:"providers/fetchProvider"}),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(48),a=n.n(r);t.default=i},function(e,t,n){"use strict"
;var i=n(1784),r=n.n(i),a=n(77),o=n(21),s=n(7),l=n.n(s),c=n(18),u=n(15),d=o.a.AppRouter.extend({initialize:function(){this.uniqueRoutes=l.a.uniq(l.a.values(this.appRoutes)),this.fragments=l.a.invert(this.appRoutes),this.listenTo(this,"route",this.onRoute),this.listenTo(c.a,"navigate",this.onNavigate)},resolveUrlFragment:function(e,t){var n=e.match(/:\w+/g);return n&&l.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=u.c("appModel"),n=r()(t.get("history")),i=r()(t.get("forwardHistory")),o=a.c.history.getFragment();o===i[0]?n.push(i.shift()):o!==l.a.last(n)&&(n.push(o),i.splice(0)),t.set({history:n,forwardHistory:i})},onNavigate:function(e,t){if(-1!==l.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,l.a.values(t));else{var i=this.resolveUrlFragment(this.fragments[e],t);this.navigate(i,{trigger:t.trigger,replace:t.replace})}}}});t.a=d},function(e,t,n){"use strict";var i,r=n(13),a=n.n(r),o=n(21),s=n(7),l=n.n(s),c=n(18),u=n(1793),d=n(159),p=n(15),h=n(969),f=(n(221),n(92)),v=n(307),g=n(236),m=!1,y=o.a.Controller.extend({populateView:function(e){e||(e={}),!1!==e.showLoading&&c.a.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var t={
options:e},n=a.a.Deferred().resolve(t).promise(),i=this.populateUser(n,t);return i=this.populateServer(i,e.serverID,t),e.primaryServer&&(i=this.populatePrimaryServer(i,t)),i=this.populateUserFeatures(i,t),e.sectionID&&(i=this.populateSection(e,i,t)),e.key&&(i=this.populateMetadata(e,i,t)),e.channelID&&(i=this.populateChannel(e,i,t)),e.channelKey&&(i=this.populateChannelMetadata(e,i,t)),this.resolveWithResult(i,t)},resolveWithResult:function(e,t){return e=e.then(function(){
return a.a.Deferred().resolve(t).promise()},function(){return m?m=!1:c.a.trigger("navigate","unauthorized",{result:t,silent:!0}),a.a.Deferred().reject(t).promise()}),i=e,e},abortPendingPopulate:function(){i&&"pending"===i.state()&&(m=!0),g.a.abortAll("page")},populateUser:function(e,t){var n=p.c("appModel"),i=n.get("user"),r=i.get("lockState")===v.a.lockStates.PENDING?i.server.populate():a.a.Deferred().resolve().promise(),o=function(){
return i.get("isLocked")?a.a.Deferred().reject(t).promise():a.a.Deferred().resolve(t).promise()};return r.then(o,o)},populateUserFeatures:function(e,t){function n(){if(!r.get("isConnected"))return a.a.Deferred().resolve().promise();var e=o.get("features"),t=!!e.failedPopulatePromise,n=o.get("features").populate({timeout:5e3});return t?void 0:n}var i=p.c("appModel"),r=i.get("cloudServer"),o=i.get("user");return e.then(function(){return Object(d.a)(n())},function(){return Object(u.a)(n())})},
populateServer:function(e,t,n){var i=p.c("appModel");return e=e.then(function(){var e=i.get("servers"),r=void 0;if(!t)return e.populateAnyServer();if(/^transient/.test(t)){var o=i.get("transientServer");if(!o||o.id!==t)return c.a.trigger("navigate:refresh:dashboard"),a.a.Deferred().reject().promise();r=a.a.Deferred().resolve(o).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=p.c("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=a.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 a.a.Deferred().resolve();var o=t.get(r);return o?(n.section=o,i&&i.setContext("section",o),a.a.Deferred().resolve(o)):a.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:l.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 h.a(i,{server:n.server});return n.channel=r,e.channelKey?a.a.Deferred().resolve().promise():r.fetch({
scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new h.a({key:e.channelKey},{server:n.server,channel:n.channel});return n.channelItem=t,t.fetch({scope:"page"})})},isReload:function(e){var t=p.c("appModel"),n=t.get("servers").get(e);return n&&n.isPopulated()}});t.a=y},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"
;var i=n(12),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(225),g=(n(36),n(15)),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(g.c)("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(v.a)(n,o);!a&&s&&Object(g.c)("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";var i=n(269),r=n(454),a=n.n(r),o=n(2021),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 s.a.createElement(l.a,a()({},e,{
textClassName:h.a.circularProgressBarText}))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(1027),c=n(1029),u=n(1030),d=n.n(u),p=n(2033),h=n.n(p);i.defaultProps=a()({},l.a.defaultProps,{backgroundClassName:h.a.circularProgressBarBackground,strokeColor:d.a.primaryColor,easing:c.b}),t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(385),b=n(20),I=n(226),S=(n(49),
n(52)),M=n(2057),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||S.MEDIUM;return m.a.createElement(b.a,r()({className:(t||"")+" "+(D.a[p]||"")+" "+(u&&D.a.isSelected||""||""),"aria-haspopup":!0,kind:s,size:c,
isSelected:u},d),i,o()(y.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:I.DOWN,isSelected:!0},t.a=C},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(5),a=(n.n(r),n(185)),o={};t.a=i},function(e,t,n){"use strict";function i(e,t,n){
return n.includes(e)?e:n.includes(t)?t:n?n[0]:null}function r(){return Object(s.createSelector)(function(e,t){return t.selectedServerEntityID},function(e){return e.primaryServer},function(e){return e.experienceSettings.showAdvancedSettings},d.a,p.a,c.a,Object(u.a)(h.n),function(e,t,n,r,a,o,s){var l=i(e,t,o);return{serverMenuServerEntityID:l,manageableServerEntityIDs:o,isPlexCloudVisible:!!a.cpms,isWebhooksVisible:s,isUserSignedIn:r.isSignedIn,isUserUnrestricted:!r.restricted,
isServerMenuServerEntityIDSelected:l===e,showAdvancedSettings:n,userTitle:r.title}})}function a(e,t){return{onClose:function(){e(Object(l.g)({budget:1/0}))}}}var o=n(11),s=n(5),l=(n.n(s),n(203)),c=n(2344),u=n(274),d=n(154),p=n(742),h=n(81),f=n(2346);t.a=Object(o.b)(r,a)(f.a)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(7)),a=n.n(r),o=Object(i.createSelectorCreator)(i.defaultMemoize,a.a.isEqual);t.a=o},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(1069)),c=n.n(l);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!r.radio&&(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){var r=!!n[U.j],a=i.stations&&!!i.stations.length;return r&&a}function l(e,t,n,i){return!!i.primaryExtraKey}function c(e,t,n,i){return!(!i.related||!i.related.find(function(e){return/similarPlaylist/.test(e)}))}function u(e,t,n,i){return c(e,t,n,i)}function d(e,t,n,i){return p(e,t,n,i)}function p(e,t,n,i){
var r=!!i.source||!e.isFullServer,a=t&&t.features&&t.features.playlist,o=!!a&&a.flavor===R.c.UNIVERSAL,s=!r||o,l=i.isExtra&&i.isPremium,c=i.identifier===z.e||i.identifier===z.f,u=(!!i.isLibraryItem||c)&&!l;return s&&u}function h(e,t,n,i){return!!t.features.actions.save&&null!=i.saved}function f(e,t,n,i){return!(!t.features.actions.rate||!n[U.i])&&(!H.t(i.type)&&!Object(B.c)(i))}function v(e,t,n,i){return!(!t.features.actions.rate||!n[U.i])&&(!H.t(i.type)&&Object(B.c)(i))}function g(e,t,n,i){
return!(!(t.features.actions&&t.features.actions.scrobble&&t.features.actions.scrobble.key)||t.protocols.livetv||i.type===H.l&&i.subtype!==V.b||null!=i.saved&&!i.saved&&!i.viewOffset||i.isExtra)&&(H.u(i.type)?i.unviewedLeafCount>0:!i.viewCount||!!i.viewOffset)}function m(e,t,n,i){
return!(!(t.features.actions&&t.features.actions.scrobble&&t.features.actions.scrobble.reverseKey)||t.protocols.livetv||i.type===H.l&&i.subtype!==V.b||null!=i.saved&&!i.saved||i.isExtra)&&(H.u(i.type)?i.viewedLeafCount>0:!!i.viewCount||!!i.viewOffset)}function y(e,t,n,i){var r=i.preferences;return!t.features.manage&&null!=r}function b(e,t,n,i){var r=i.isLibraryItem,a=i.isPlaylist,o=i.isExtra,s=i.isFolder,l=i.radio,c=i.readOnly,u=i.source,d=r&&!o&&!s&&!l&&!u;return a?!c:!(!t.features.manage||!d)}
function I(e,t,n,i){return b(e,t,n,i)}function S(e,t,n,i){return b(e,t,n,i)}function M(e,t,n,i){return!!b(e,t,n,i)&&!(!i.guid||/(local|none)\:\/\//.test(i.guid))}function D(e,t,n,i){return!!b(e,t,n,i)&&(!!i.guid&&!M(e,t,n,i))}function C(e,t,n,i){return M(e,t,n,i)}function O(e,t,n,i){if(!b(e,t,n,i))return!1;var r=void 0;return r=H.u(i.type)?i.Location:k.a.filter(i.Media,function(e){return!e.proxyType}),r.length>1}function P(e,t,n,i){if(!e.isFullServer)return!1
;var r=i.allowSync,a=i.isExtra,o=i.isLibraryItem,s=i.isPlaylist,l=i.source;return!(a||l||!o&&!s)&&!(!e.allowSync||!r)}function j(e,t,n,i){return!!b(e,t,n,i)&&!(!e.transcoderVideo||!e.backgroundProcessing)}function T(e,t,n,i){return!!t.protocols.download&&!i.isExtra&&!i.source}function w(e,t,n,i){return!!b(e,t,n,i)&&!(!i.isPlaylist&&i.type!==H.d&&!e.allowMediaDeletion)}function E(e,t,n,i){return!!b(e,t,n,i)&&(!!e.allowMediaDeletion&&k.a.filter(i.Media,function(e){return!!e.proxyType}).length>0)}
function x(e,t,n,i){return t.isLibraryProvider&&!i.isExtra}function A(e,t,n,i){return!i.source&&!i.radio&&(t.isLibraryProvider&&!i.isFolder)}function N(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=Q[o];return Object(_.a)(k.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=d,t.b=p,t.f=f,t.o=v,t.g=g,t.h=m,t.e=b,t.l=I,t.c=S,t.n=P,t.i=j,t.d=w,t.m=A,t.p=N
;var L=n(7),k=n.n(L),_=n(36),R=n(60),z=n(41),U=n(81),B=n(564),F=n(1097),V=n(98),H=n(26),Q={showPlay:i,showPlayVersion:r,showPlayAll:i,showShuffle:a,showQueue:o,showPlayTrailer:l,showPlayPlexMix:c,showQueuePlexMix:u,showPlayMusicVideo:l,showPlayRadio:s,showAddToAlbum:d,showAddToPlaylist:p,showAddToSaved:h,showFavorite:f,showUnfavorite:v,showMarkPlayed:g,showMarkUnplayed:m,showSettings:y,showEdit:b,showRefresh:I,showAnalyze:S,showFixMatch:M,showMatch:D,showUnmatch:C,showSplitApart:O,showSync:P,
showOptimize:j,showDownload:T,showDelete:w,showDeleteVersion:E,showGetInfo:x,showSelect:A},Y={movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkPlayed","showMarkUnplayed","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","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","showDelete","showDeleteVersion","showGetInfo","showSelect"],
artist:["showPlay","showShuffle","showPlayRadio","showQueue","showAddToPlaylist","showAddToSaved","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showDelete","showSelect"],album:["showPlay","showShuffle","showQueue","showAddToPlaylist","showAddToSaved","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","showDelete","showDeleteVersion","showGetInfo","showSelect"],
playlist:["showDelete","showEdit","showPlay","showQueue","showShuffle","showAddToSaved","showSync","showSelect","showEdit"],collection:["showPlay","showQueue","showShuffle","showAddToPlaylist","showEdit","showSync","showDelete"]}},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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2570),f=n.n(h);i.defaultProps={className:f.a.card},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)("currentDecision"),Object(o.a)(),function(e,t){var n=e;if(n&&n.playQueueItemID===t.playQueueItemID)return n})}var r=n(5),a=(n.n(r),n(158)),o=n(128);t.a=i},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(function(e,t){return t.metricsContext},s.a,o.a,Object(a.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};e&&(r.context=e);var a=i.skipParent&&i.subtype===l.c;return{title:i.title,index:i.index,route:Object(u.a)(t,n,i.key,r),parentTitle:i.parentTitle,parentIndex:a?null:i.parentIndex,parentRoute:i.skipParent?null:Object(u.a)(t,n,i.parentKey,r),originallyAvailableAt:i.originallyAvailableAt}})}var r=n(5),a=(n.n(r),
n(22)),o=n(37),s=n(50),l=n(98),c=n(55),u=n(143),d=n(789);t.a=Object(c.a)(i)(d.a)},function(e,t,n){"use strict";function i(){return a()(u.a,{title:Object(l.default)("You must be lost"),description:Object(l.default)("We can't find the page you're looking for")},void 0,a()(s.a,{to:"#",kind:c.b.PRIMARY},void 0,Object(l.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(20)),l=n(3),c=n(23),u=n(113);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";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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(54),p=n(184),h=n(1188),f=n.n(h);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="boolean",r="other"},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(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(265)),I=n(51),S=n(35),M=n(1251),D={dispatchFetchProvider:b.b,dispatchPopulateProvider:b.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(S.a)(function(){
i.props.dispatchPopulateProvider({providerEntityID:t,options:{merge:!0}})})},i.onRepopulate=function(e){var t=(e.serverEntityID,e.providerEntityID);Object(S.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.closedNode,i=e.title,r=e.errorMessage,o=e.isDirty,s=e.isOpen,p=e.isUpdating,g=e.showButton,m=e.showSpinner,I=e.onFormChange,S=e.onSubmit,M=e.onTogglePress;return a()(f.a,{isOpen:s,errorMessage:r,closedNode:a()(v.a,{className:y.a.sectionDetails},void 0,a()(c.a,{className:y.a.label},void 0,i),n),onTogglePress:M},void 0,m&&a()(c.a,{className:y.a.label},void 0,i),m&&a()("div",{className:y.a.spinnerContainer},void 0,b),!m&&g&&a()(l.b,{onSubmit:S,onChange:I},void 0,t,a()("div",{
className:y.a.submitButton},void 0,a()(h.a,{type:"submit",isDisabled:!o,isSpinning:p,kind:u.PRIMARY},void 0,Object(d.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(181)),c=n(142),u=n(49),d=n(3),p=n(31),h=n(124),f=n(1316),v=n(848),g=n(838),m=n(3475),y=n.n(m),b=a()(p.a,{});i.defaultProps={showButton:!0},t.a=Object(g.a)(i,{isUpdatingPropName:"isUpdating",errorPropName:"errorMessage",clearDirtyOnChangePropName:"isOpen"})},function(e,t,n){"use strict"
;function i(){return Object(c.createSelector)(function(e){return e.isWaitingForServers},Object(d.a)(),function(e,t){return t?{hasServer:!0,showSpinner:!t.isConnected&&!t.isUnauthorized&&!t.isUnavailable,machineIdentifier:t.machineIdentifier,friendlyName:t.friendlyName,isUnauthorized:t.isUnauthorized,isUnavailable:t.isUnavailable,isInstallingServerUpdate:t.isInstallingServerUpdate,hasHttpsConnections:t.hasHttpsConnections,isHostedHttps:u.a.isHostedHttps}:{hasServer:!1,showSpinner:e}})}
var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(90)),d=n(34),p=n(3481),h=Object(l.b)(i)(p.a);h.propTypes=a()({},h.propTypes,{serverEntityID:s.a.string.isRequired}),t.a=h},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(S.a,I.a,Object(b.a)(),function(e,t,n){return{machineIdentifier:e.machineIdentifier,provider:t,hasProviderSettings:!!(t.features.settings&&t.features.settings.settings.length>0),hasLibraryActions:e.isFullOwnedServer&&t.isLibraryProvider,
hasDVRActions:e.isFullOwnedServer&&M.c.test(t.identifier),isGuideRefreshing:!!n}})}var r=n(6),a=n.n(r),o=n(12),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),g=n(0),m=n.n(g),y=n(5),b=(n.n(y),n(211)),I=n(37),S=n(50),M=n(41),D=n(55),C=n(837),O=n(183),P=n(540),j=(n(93),n(88),n(3491)),T={dispatchScanLibraryFiles:C.f,dispatchCancelScanLibraryFiles:C.b,dispatchShareLibraries:O.n,dispatchEditLibrary:C.d,dispatchReloadGuide:P.e,dispatchCancelReloadGuide:P.a},w=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.onScanLibraryPress=function(){i.props.dispatchScanLibraryFiles({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,contentDirectory:i.props.sourceDirectory,metricsPage:i.props.metricsPage})},i.onCancelScanLibraryPress=function(){i.props.dispatchCancelScanLibraryFiles({serverEntityID:i.props.serverEntityID,
providerEntityID:i.props.providerEntityID,contentDirectory:i.props.sourceDirectory,metricsPage:i.props.metricsPage})},i.onSharePress=function(){i.props.dispatchShareLibraries({serverEntityID:i.props.serverEntityID,metricsPage:i.props.metricsPage})},i.onEditLibraryPress=function(){i.props.dispatchEditLibrary({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,contentDirectory:i.props.sourceDirectory,metricsPage:i.props.metricsPage})},i.onRefreshGuidePress=function(){
i.props.dispatchReloadGuide({serverEntityID:i.props.serverEntityID,dvrID:i.props.provider.parentID,metricsPage:i.props.metricsPage})},i.onCancelRefreshGuidePress=function(){i.props.dispatchCancelReloadGuide({serverEntityID:i.props.serverEntityID,dvrID:i.props.provider.parentID,metricsPage:i.props.metricsPage})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=(e.metricsPage,e.dispatchScanLibraryFiles,e.dispatchCancelScanLibraryFiles,e.dispatchShareLibraries,
e.dispatchEditLibrary,e.dispatchReloadGuide,e.dispatchCancelReloadGuide,s()(e,["metricsPage","dispatchScanLibraryFiles","dispatchCancelScanLibraryFiles","dispatchShareLibraries","dispatchEditLibrary","dispatchReloadGuide","dispatchCancelReloadGuide"]));return m.a.createElement(j.a,a()({},t,{onScanLibraryPress:this.onScanLibraryPress,onCancelScanLibraryPress:this.onCancelScanLibraryPress,onSharePress:this.onSharePress,onEditLibraryPress:this.onEditLibraryPress,
onRefreshGuidePress:this.onRefreshGuidePress,onCancelRefreshGuidePress:this.onCancelRefreshGuidePress}))},t}(g.Component),E=Object(D.a)(i,T)(w);E.propTypes=a()({},E.propTypes,{serverEntityID:v.a.string.isRequired,providerEntityID:v.a.string.isRequired}),t.a=E},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(39),r=n(111),a=Object(i.a)(r.F),o=Object(i.a)(r.E),s=Object(i.a)(r.s),l=Object(i.a)(r.P),c=Object(i.a)(r.X),u=Object(i.a)(r._7),d=Object(i.a)(r.j),p=Object(i.a)(r.I),h=Object(i.a)(r.V),f=Object(i.a)(r.W)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(l.a,s.a,Object(o.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(5),o=(n.n(a),n(22)),s=n(37),l=n(50),c=n(3733);t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){switch(e){case b.b:return D.a;case b.f:return P.a;case b.e:return O.a;case b.a:return g.a;case b.d:return y.a;default:return C.a}}function r(e){
var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataListEntityID,a=e.metadataItemEntityIDs,s=e.containerKey,l=e.listType,g=e.listStyle,y=e.populatedRange,I=e.isPopulated,M=e.isPending,D=e.error,C=e.listTitle,O=e.titleButtonTitle,P=e.titleButtonRoute,j=e.totalSize,x=e.previewSize,A=e.showArtwork,N=e.viewportWidth,L=e.viewportHeight,k=e.contentHeight,_=e.scrollTop,R=e.columnAdjustment,z=e.onPageRequest,U=j||a.length,B=null!=x&&U>x?x:U,F=null!=x&&U>x,V=i(g),H=C||Object(p.a)(l,U),Q=g===b.f||g===b.e||g===b.d||g===b.a
;return o()(m.a,{listType:l,isPopulated:I,isPending:M,error:D,size:B},void 0,!!H&&o()(f.a,{className:T.a.descendantHubCellHeader},void 0,o()(v.a,{},void 0,Object(u.a)(H)),(F||null!=O)&&o()(c.a,{className:T.a.titleButton,to:P},void 0,Object(u.a)(O||Object(d.default)("See all")))),Q&&w,o()(S.a,{showArtwork:A,contentHeight:k,scrollTop:_},void 0,o()(V,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,containerKey:s,listType:l,listContext:h.h,keyPropName:"metadataItemEntityID",items:a,
itemsOffset:y.start,size:B,viewportWidth:N,viewportHeight:L,columnAdjustment:R,onPageRequest:z})),Q&&E)}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(20)),u=n(343),d=n(3),p=n(1356),h=n(32),f=(n(412),n(403)),v=n(345),g=n(3739),m=n(1357),y=n(3743),b=n(62),I=n(626),S=n(628),M=n(627),D=n(3744),C=n(3745),O=n(3746),P=n(3747),j=n(3748),T=n.n(j),w=o()(M.a,{}),E=o()(I.a,{});t.a=r},,,,,function(e,t,n){e.exports={default:n(1454),__esModule:!0}},function(e,t,n){
var i=n(299),r=n(891),a=n(636),o=Object.defineProperty;t.f=n(360)?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){var i=n(300);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},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){var i=n(894),r=n(501);e.exports=function(e){return i(r(e))}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1472),a=i(r),o=n(903),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";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(13),a=n.n(r),o=n(159);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(36),o=n(19),s=n(17),l=n(16),c=n(913),u=n(914),d=n(655),p=n(1520),h=l.a.boolean.isRequired,f=s.a.extend({name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{currentTest:l.a.custom(function(e){return Array.isArray(e)&&e.every(function(e){return r.a.isFunction(e.abort)})}),
testState:l.a.oneOf(c.f,c.c,c.b,c.d,c.e,c.a).isRequired,isBundled:h,isFallback:h,serverAttrs:l.a.object},sessionRelations:{sources:{relationClass:p.a}},syncedAttrs:{uri:l.a.string,scheme:l.a.string,address:l.a.string,port:l.a.string,relay:l.a.boolean},derivedAttrs:{isUntested:function(){return this.get("testState")===c.f},isPending:function(){return this.get("testState")===c.c},isConnected:function(){return this.get("testState")===c.b},isUnauthorized:function(){return this.get("testState")===c.d
},isUnavailable:function(){return this.get("testState")===c.e},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable")},isAborted:function(){return this.get("testState")===c.a},isLoopback:function(){var e=this.get("address");return"localhost"===e||d.a.isLoopbackAddress(e)},isPrivate:function(){return this.get("isLoopback")||d.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:c.f,isBundled:!1,isFallback:!1,relay:!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)),
s.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(o.parseUrl)(this.get("uri")).hostname},getIpAddressFromPlexDirectAddress:function(){return Object(u.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)}});t.a=f},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(77),o=n(13),s=n.n(o),l=n(1543),c=n.n(l),u=n(7),d=n.n(u),p=n(18),h=n(29),f=n(159),v=n(15),g=n(202),m=n(40),y=n(17),b=n(657),I=n(16),S=n(57),M=n(658),D=n(917),C=n(918),O=n(174),P=n(660),j=n(661),T=n(662),w=n(908),E=n(1557),x=n(925),A=n(921),N=n(1558),L=n(922),k=n(923),_=n(659),R={PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},z={EMPTY:"",UNSUBSCRIBED:"unsubscribed",ACTIVE:"active",ERROR:"error",REMOVED:"removed"},U=y.a.extend({mixins:[M.a],name:"UserModel",
context:["server"],url:"/api/v2/user?includeSubscriptions=1",sessionAttrs:{isRemote:I.a.boolean,isSignedIn:I.a.boolean.isRequired,hasInvalidToken:I.a.boolean.isRequired,lastPrimaryServerID:I.a.string,lockState:I.a.oneOf(R.PENDING,R.LOCKED,R.UNLOCKED).isRequired,homeUsers:I.a.instanceOf(x.a).isRequired,homeDetails:I.a.instanceOf(E.a).isRequired},syncedAttrs:{id:I.a.integer,uuid:I.a.string,authToken:I.a.string,username:I.a.string,email:I.a.string,emailOnlyAuth:I.a.boolean,title:I.a.string,
subscriptionDescription:I.a.string,locale:I.a.string,thumb:I.a.string,pin:I.a.string,home:I.a.boolean,restricted:I.a.boolean,guest:I.a.boolean,homeSize:I.a.integer,maxHomeSize:I.a.integer,queueUid:I.a.string,queueEmail:I.a.string,hasAllEntitlements:I.a.boolean,mailingListActive:I.a.boolean,hasPassword:I.a.boolean,mailingListStatus:I.a.oneOf(z.EMPTY,z.UNSUBSCRIBED,z.ACTIVE,z.ERROR,z.REMOVED)},sessionRelations:{features:{relationClass:D.a}},syncedRelations:{subscription:{relationClass:_.a},
subscriptions:{relationClass:C.a},roles:{relationClass:k.a},entitlements:{relationClass:A.a},providers:{relationClass:L.a},profile:{relationClass:N.a}},derivedAttrs:{isLocked:function(){return this.get("lockState")===R.LOCKED},isUnlocked:function(){return this.get("lockState")===R.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")},
hasPlexSubscription:function(){return this.get("subscriptions").some({state:P.a})},hasPlexPass:function(){return this.get("subscriptions").some({type:j.a,state:P.a})},canGoPremium:function(){var e=this.get("homeSize")>1;return this.get("signedIn")&&!this.get("restricted")&&!this.get("hasPlexSubscription")&&!e},signedIn:function(){return this.get("isSignedIn")},locked:function(){var e=this.get("lockState");return e===R.LOCKED||e!==R.UNLOCKED&&null}},defaults:function(){var e={server:this.server,
parent:this};return{isRemote:!1,isSignedIn:!1,hasInvalidToken:!1,hasPassword:!0,lockState:R.PENDING,homeUsers:new x.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 a.c.Model.prototype.fetch.apply(this,arguments)},augmentResponse:function(e){var t=e.roles,n=e.entitlements,i=e.providers,r=e.subscriptions;return d.a.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,entitlements:n&&n.entitlement,providers:i&&i.provider,subscriptions:r&&r.subscription})},_getTokenPromise:function(){
return S.a.get("allowSSO")?this._getSSOThenStorageTokenPromise():this._getStorageTokenPromise()},_getSSOThenStorageTokenPromise:function(){var e=this,t=this._getStorageTokenPromise(),n=this._getSSOTokenPromise(),i=function(){return Object(h.a)("[User] SSO status is signed-out"),t.then(function(){return Object(f.a)(e.signOutDueToInvalidToken())})},r=function(e){return t.then(function(t){return e===t?(Object(h.a)("[User] SSO status is signed-in, storage token matches SSO token"),
e):(Object(h.a)("[User] SSO status is signed-in, storage token and SSO token differ"),m.a.execute("resetUser").then(function(){p.a.trigger("reset:servers"),p.a.trigger("reset:providers")}).then(function(){return e}))},function(){return Object(h.a)("[User] SSO status is signed-in, storage token is not present"),Object(f.a)(e)})},a=function(){return Object(h.a)("[User] SSO status is not available"),t},o=function(e){return e?r(e):i()};return n.then(o,a)},_getStorageTokenPromise:function(){
return g.a.get("myPlexAccessToken")},_getSSOTokenPromise:function(){return Object(T.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?s.a.Deferred().resolve(null).promise():s.a.Deferred().reject().promise()})},_getManualUserPromise:function(e){return s.a.ajax(this.server.getXHROptions(d.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(h.a)("[User] Token promise succeeded, accessToken="+t);var n=t?e._getManualUserPromise(t):s.a.Deferred().reject().promise();n.done(function(n){Object(h.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!==R.UNLOCKED){
var a=Object(v.c)("appModel").get("settings"),o=a.get("autoLogin"),s=!!t.guest&&!i.get("guestEnabled");r=!t.home||o&&!s?R.UNLOCKED:R.LOCKED}e.signIn(t,{lockState:r}),e._isSigningIn=!1})}),n.fail(function(t){if(Object(h.a)("[User] userPromise failed"),t&&t.aborting)return void(e._isSigningIn=!1);var n=Object(w.a)(t);n?e.signOutDueToInvalidToken():e.signOut({hasInvalidToken:n,features:e.get("features")}),e.server.testAllConnections(),e._isSigningIn=!1})}),t.fail(function(){
Object(h.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=d.a.isString(e)?this.parse(e):e,a=i.authToken,o=r()({isSignedIn:!0},i,t);return this._resolve(o,n),g.a.set("myPlexAccessToken",a)},signOut:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._reject(e),s.a.Deferred().resolve().promise()},
signOutDueToInvalidToken:function(){return s.a.when(Object(f.a)(this.signOut({hasInvalidToken:!0})),Object(f.a)(this.clearAccessToken()))},activateStoredUser:function(e){O.a.set("activeUserID",e);var t=O.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=g.a.remove("myPlexAccessToken");return e=e.then(function(){return O.a.clearActiveUser()})},hashPIN:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.get("authToken");return c.a.SHA256_hash(e+t)},hasEntitlement:function(e){var t=this.get("hasAllEntitlements"),n=this.get("entitlements");return!(!t&&!n.get(e))},hasHome:function(){return!!this.get("pin")||this.get("homeUsers").length>1},isFullUser:function(){return this.get("isFullUser")},isEmployee:function(){
return this.get("isEmployee")},isNinja:function(){return this.get("isNinja")},_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:R,mailingListStates:z});Object(b.a)(U,function(){return{relationClass:Object(v.c)("UserFlexModel")}}),t.a=U},function(e,t,n){"use strict";var i=n(24),r=n(926),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";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(7),a=n.n(r),o=n(151),s=n(261);t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(19),l=n(929),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 s.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=o.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=l.a.difference(e,n)[0];if(!i)return r.a.Deferred().resolve().promise();if(i=l.a.degap(i,n),this.isPopulating()){var a=this.get("currentPageStart")!==i.start,s=this.get("currentPageSize")!==i.size;if(!a&&!s)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&i.size>e.reloadThreshold)return t.reset(),this.populateRange(o.a.omit(e,"reloadThreshold"))
;var c=o.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";Object.defineProperty(t,"__esModule",{value:!0});var i=n(24),r=n(65),a=n(510),o=n(121),s=n(92),l=i.a.extend({name:"MetadataCollection",context:["server","provider","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],
model:s.a,responseType:function(){return Object(a.a)(this.server,this.provider,this.channel)},url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===r.a.xml?Object(o.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.default=l},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(24),r=n(1586),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,"b",function(){return l}),n.d(t,"c",function(){return c});var i=n(17),r=n(16),a=n(1598),o=n(1600),s=n(63),l={ONBOARDED:"onboarded",PLAYBACK_SPEED:"playbackSpeed"},c={
BOOL:"bool",GROUP:"group",LOCATION:"location",SELECT:"select",DOUBLE:"double"},u={bool:s.a.parseBoolean,double:s.a.parseFloat},d=i.a.extend({name:"ProviderSettingModel",context:["server","provider"],rootPropertyName:"Setting",url:function(){return this.get("key")},sessionAttrs:{isOptionsPending:r.a.boolean,isOptionsPopulated:r.a.boolean,optionsError:r.a.object,isLocationsPending:r.a.boolean,isLocationsPopulated:r.a.boolean,locationsError:r.a.object},syncedAttrs:{country:r.a.string,
countryLabel:r.a.string,hidden:r.a.boolean,id:r.a.string,key:r.a.string,label:r.a.string,multiselect:r.a.boolean,postalCode:r.a.string,required:r.a.boolean,selectedCount:r.a.integer,summary:r.a.string,type:r.a.string,value:r.a.oneOfType(r.a.string,r.a.boolean,r.a.float),min:r.a.float,max:r.a.float,step:r.a.float},sessionRelations:{locations:{relationClass:a.a}},syncedRelations:{settings:function(){return{relationClass:n(937).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";function i(e){var t,n=(t={},t["X-Plex-Text-Format"]=Object(p.a)(e),t);switch(e){case h.g:case h.h:case h.i:case h.j:case h.k:case h.l:n["X-Plex-Provider-Version"]="1.2"}return n}
var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(19),c=n(17),u=n(16),d=n(432),p=n(938),h=n(41),f=n(514),v=n(38),g=n(43),m=n(439),y=n(940),b=c.a.extend({name:"ProviderModel",context:["server"],entityType:g.k,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(v.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:y.a,rootPropertyName:"Feature",options:function(){return{provider:this}},setOptions:{
remove:!1}}},derivedAttrs:{isLibraryProvider:function(){return Object(f.a)(this.get("identifier"),this.get("providerIdentifier"))===h.d},metricsIdentifier:function(){var e=this.get("providerIdentifier")||this.get("identifier");return h.c.test(e)?e.split(":")[0]:e}},populate:function(){return this.get("isPopulated")?s.a.Deferred().resolve(this).promise():c.a.prototype.populate.apply(this,arguments)},resolveUrl:function(e,t){return this.server.resolveUrl(e,a()({},t,{baseUrl:this.url()}))},
getXHROptions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(m.a)(e)?e:l.join([this.get("baseURL"),e]),r=this.get("providerIdentifier")||this.get("identifier");return this.server.getXHROptions(n,a()({},t,{headers:a()({},i(r),t.headers)}))},defaults:function(){return{protocols:[],isPending:!0,isPopulated:!1,error:null}}});t.a=b},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(36)},function(e,t,n){"use strict";var i={NORMAL:0,LOCAL:42,CLOUD:43};t.a=i},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";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(3),a=n(375);t.a=i},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(7),a=n.n(r),o=n(75),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";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){
if(e<=0||!s.a.isNumber(e))return"0:00";var t=a.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(48),a=n.n(r),o=n(7),s=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e,t){return Object(r.a)(e,{limit:"past"},t)}var r=n(1928);t.a=i},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){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(52)),c=n(1979),u=n.n(c);i.defaultProps={size:l.MEDIUM},t.a=i},function(e,t,n){"use strict";n.d(t,"b",function(){return l});var i=n(17),r=n(16),a=n(308),o=n(1013),s=n(1989),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(r.createSelector)(Object(a.a)(),function(e){return e.desktop.activities})}var r=n(5),a=(n.n(r),n(34));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()(d.a,{onModalClose:r},void 0,a()(l.a,{},void 0,t||Object(c.default)("DVR Setup")),i?a()(u.a,{errorMessage:i}):null,n)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(78)),c=n(3),u=n(191),d=n(95);t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(52),b=n(2035),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(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(20),v=n(27),g=(n(36),n(2039)),m=n(2040),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.onMouseDown=function(e){
e.preventDefault(),0===e.button&&r._startDrag(e.pageX,e.pageY,!1)},r.onMouseMove=function(e){var t=e.pageX,n=e.pageY;if(!r.state.isDragging){var i=r._getValueForPosition(t,n),a=r._trackRef.current,o=a.getBoundingClientRect(),s=r.props.isVertical?{x:o.left,y:n}:{x:t,y:o.top};r.props.onMove({position:s,positionValue:i,steppedValue:r._getSteppedValue(i)})}},r.onTouchStart=function(e){e.preventDefault();var t=e.touches&&e.touches[0];t&&r._startDrag(t.pageX,t.pageY,!0)},
r.onDocumentMouseMove=function(e){r._drag(e.pageX,e.pageY)},r.onDocumentTouchMove=function(e){var t=e.touches&&e.touches[0];t&&r._drag(t.pageX,e.pageY)},r.onDocumentMouseUp=function(e){r._stopDrag(e.pageX,e.pageY)},r.onDocumentTouchEnd=function(e){var t=e.changedTouches&&e.changedTouches[0];t&&r._stopDrag(t.pageX,t.pageY)},r._trackRef=h.a.createRef(),r.state={isDragging:!1},r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(v.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,n){this._changeValue(this._getValueForPosition(e,t)),this._listenForDrag(n),this.props.onDragStart&&this.props.onDragStart()},
t.prototype._drag=function(e,t){this.state.isDragging||(document.body.classList.add(y.a.isDragging),this.setState({isDragging:!0})),this._changeValue(this._getValueForPosition(e,t))},t.prototype._stopDrag=function(e,t){document.body.classList.remove(y.a.isDragging),this._stopListeningForDrag();var n=this._getValueForPosition(e,t),i=this._getSteppedValue(n);this._changeValue(n),this.setState({isDragging:!1}),this.props.onDragComplete&&this.props.onDragComplete({positionValue:n,steppedValue:i})},
t.prototype._getValueForPosition=function(e,t){var n=this.props,i=n.isVertical,r=n.min,a=n.max,o=this._trackRef.current,s=o.getBoundingClientRect(),l=void 0;if(i){var c=t-document.body.scrollTop;l=(s.bottom-c)/o.offsetHeight}else{l=(e-document.body.scrollLeft-s.left)/o.offsetWidth}return l=Math.min(Math.max(l,0),1),(a-r)*l+r},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){var t=this.props.value;e!==t&&this.props.onChange({positionDelta:e-t,positionValue:e,steppedValue:this._getSteppedValue(e)})},t.prototype.render=function(){
var e,t,n=this.props,i=n.style,a=n.className,o=n.trackClassName,s=n.secondaryFillClassName,l=n.fillClassName,c=n.thumbClassName,u=n.thumbTrackClassName,d=n.label,p=n.value,v=n.min,m=n.max,b=n.secondaryMin,I=n.secondaryMax,S=n.showSecondaryFill,M=n.showFill,D=n.autoHideThumb,C=n.isDisabled,O=n.isVertical,P=n.onMove,j=n.onMouseEnter,T=n.onMouseLeave,w=n.onWheel,E=this.state.isDragging,x=Object(g.a)(this._getStickyValue(p),v,m),A="left",N="scaleX",L="translateX";O&&(A="top",N="scaleY",
L="translateY");var k=L+"("+(O?-x:x)+"%)",_=b?Object(g.a)(this._getStickyValue(b),v,m):0,R=I?Object(g.a)(this._getStickyValue(I),v,m):0,z=N+"("+(x-_)/100+")",U=N+"("+(R-_)/100+")";return r()("div",{style:i,className:(a||"")+" "+(C&&y.a.isDisabled||"")+" "+(E&&y.a.isDragging||"")+" "+(D&&y.a.hasAutoHideThumb||""||""),onWheel:C?null:w,onMouseEnter:C?null:j,onMouseLeave:C?null:T,onMouseDown:C?null:this.onMouseDown,onMouseMove:C||!P?null:this.onMouseMove,onTouchStart:C?null:this.onTouchStart
},void 0,h.a.createElement("div",{className:o,ref:this._trackRef},S&&r()("div",{className:s,style:(e={},e[A]=b?_+"%":void 0,e.WebkitTransform=U,e.msTransform=U,e.transform=U,e)}),M&&r()("div",{className:l,style:(t={},t[A]=b?_+"%":void 0,t.WebkitTransform=z,t.msTransform=z,t.transform=z,t)})),r()("div",{className:u,style:{WebkitTransform:k,msTransform:k,transform:k}},void 0,r()(f.a,{className:c,role:"slider","aria-labelledby":d,"aria-valuemin":v,"aria-valuemax":m,"aria-valuenow":p,
onMouseDown:this.onMouseDown,onMouseMove:P&&this.onMouseMove,onTouchStart:this.onTouchStart})))},t}(p.Component);b.defaultProps={className:y.a.slider,trackClassName:y.a.track,fillClassName:y.a.fill,secondaryFillClassName:y.a.secondaryFill,thumbClassName:y.a.thumb,thumbTrackClassName:y.a.thumbTrack,min:0,max:100,stepSize:0,stickiness:10,showFill:!1,showSecondaryFill:!1,autoHideThumb:!1,isDisabled:!1,isDragging:!1,isVertical:!1},t.a=b},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(49)),c=n(2076),u=n.n(c);i.defaultProps={kind:l.DEFAULT},t.a=i},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(39),r=n(111),a=Object(i.a)(r.a),o=Object(i.a)(r.d),s=Object(i.a)(r.Y)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return a});var i="https://forums.plex.tv",r="https://status.plex.tv",a="https://www.plex.tv/tidal"},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,n=arguments[2];return Object(o.c)(a()({
direction:o.b,columns:1,overscan:t,getCellWidth:function(e){return e.innerViewportWidth},getCellHeight:function(){return e}},n))}t.a=i;var r=n(6),a=n.n(r),o=n(461)},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(5),a=(n.n(r),n(154)),o={}},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(163)),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";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(5),a=(n.n(r),n(561)),o={}},function(e,t,n){"use strict";function i(e,t,n){return a()({},e,n,t)}t.a=i;var r=n(6),a=n.n(r)},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.onModalClose,i=c()(e,["isOpen","onModalClose"]);return s()(f.a,{size:g.e.SMALL,isOpen:t,metricsPage:h.O,
onModalClose:n},void 0,p.a.createElement(v.a,a()({onModalClose:n},i)))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(30),f=n(117),v=n(2557),g=n(23);t.a=i},function(e,t,n){"use strict";function i(e,t,n){Object(m.c)("metrics").trackClick(l()({page:n,action:e},r(t)))}function r(e){return{context:P.h,selectionType:e.get("activeSelectionType"),selectionCount:e.get("activeSelectionItems").length}}function a(e){
return e.get("ui").get("multiSelect").get("activeSelectionItems").map(function(e){return e.get("model").entityID()})}n.d(t,"q",function(){return L}),n.d(t,"r",function(){return k}),n.d(t,"d",function(){return _}),n.d(t,"f",function(){return R}),n.d(t,"e",function(){return z}),n.d(t,"n",function(){return F}),n.d(t,"h",function(){return V}),n.d(t,"u",function(){return H}),n.d(t,"g",function(){return Q}),n.d(t,"p",function(){return Y}),n.d(t,"b",function(){return G}),n.d(t,"t",function(){return W
}),n.d(t,"m",function(){return K}),n.d(t,"k",function(){return q}),n.d(t,"c",function(){return Z}),n.d(t,"s",function(){return X}),n.d(t,"i",function(){return J}),n.d(t,"j",function(){return $}),n.d(t,"a",function(){return ee}),n.d(t,"o",function(){return te}),n.d(t,"l",function(){return ne})
;var o,s=n(6),l=n.n(s),c=n(12),u=n.n(c),d=n(13),p=n.n(d),h=n(7),f=n.n(h),v=n(39),g=n(18),m=n(15),y=n(40),b=n(1083),I=n(1084),S=n(1085),M=n(1087),D=n(69),C=n(263),O=n(76),P=n(123),j=n(564),T=n(929),w=n(66),E=n(3),x=n(1088),A=n(556),N=n(131),L=Object(v.a)("multiSelect/selectItem"),k=Object(v.a)("multiSelect/selectModels"),_=Object(v.a)("multiSelect/deselectAllItems"),R=Object(v.a)("multiSelect/deselectModels"),z=Object(v.a)("multiSelect/deselectCollection"),U=Object(v.a)("multiSelect/selectRange"),B=Object(v.a)("multiSelect/deselectRange"),F=Object(v.a)("multiSelect/playSelectedItems"),V=Object(v.a)("multiSelect/favoriteSelectedItems"),H=Object(v.a)("multiSelect/unfavoriteSelectedItems"),Q=(Object(v.a)("multiSelect/updateSelectedItemsPlayedStatus"),
Object(v.a)("multiSelect/editSelectedItems")),Y=Object(v.a)("multiSelect/refreshSelectedItems"),G=Object(v.a)("multiSelect/analyzeSelectedItems"),W=Object(v.a)("multiSelect/syncMetadataItems"),K=Object(v.a)("multiSelect/optimizeMetadataItems"),q=Object(v.a)("multiSelect/mergeSelectedItems"),Z=Object(v.a)("multiSelect/deleteSelectedItems"),X=Object(v.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
})})}),J=Object(v.a)("multiSelect/updateSelectedItemsPlayedStatus",function(e){return l()({},e,{played:!0})}),$=Object(v.a)("multiSelect/updateSelectedItemsPlayedStatus",function(e){return l()({},e,{played:!1})}),ee=Object(v.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})})}),te=Object(v.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})})}),ne=(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("ui").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(k([{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(B({collection:a,range:{start:h,end:v}}))}l.set("activeSelectionRange",{collection:a,startModel:d,endModel:r}),n(U({type:i,collection:a,range:{start:h,end:f}}))}},o["multiSelect/selectModels"]=function(e,t){e.get("ui").get("multiSelect").get("activeSelectionItems").add(t)},o["multiSelect/deselectAllItems"]=function(e){e.get("ui").get("multiSelect").get("activeSelectionItems").reset()},
o["multiSelect/deselectModels"]=function(e,t){e.get("ui").get("multiSelect").get("activeSelectionItems").remove(t)},o["multiSelect/deselectCollection"]=function(e,t,n){var i=e.get("ui").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(R(a))},o["multiSelect/selectRange"]=function(e,t,n){var i=t.type,r=t.collection,a=t.range,o=e.get("ui").get("multiSelect"),s=o.get("activeSelectionItems"),l=[]
;T.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(k(l))},o["multiSelect/deselectRange"]=function(e,t,n){var i=t.collection,r=t.range,a=e.get("ui").get("multiSelect"),o=a.get("activeSelectionItems"),s=[];T.a.each(r,function(e){var t=i.at(e);t&&o.get(t.id)&&s.push(t.id)}),s.length&&n(R(s))},o["multiSelect/playSelectedItems"]=function(e,t,n){var i=e.get("ui").get("multiSelect"),o=a(e);n(Object(D.m)(l()({},t,{metadataItemEntityIDs:o,
metricsProperties:r(i)})))},o["multiSelect/queueSelectedItems"]=function(e,t,n){var i=e.get("ui").get("multiSelect"),o=a(e);n(Object(D.h)(l()({},t,{metadataItemEntityIDs:o,metricsProperties:r(i)})))},o["multiSelect/favoriteSelectedItems"]=function(e,t,n){var r=Object(w.i)(e,t),a=e.get("ui").get("multiSelect"),o=a.get("activeSelectionItems").pluck("model"),s=p.a.Deferred().resolve().promise();o.forEach(function(e){s=s.then(function(){return Object(I.a)(r,e,{rating:j.a})})}),s.fail(function(){
n(Object(C.c)(Object(E.default)("There was an unexpected error favoriting an item.")))}),i(O.M,a,t.metricsPage)},o["multiSelect/unfavoriteSelectedItems"]=function(e,t,n){var r=Object(w.i)(e,t),a=e.get("ui").get("multiSelect"),o=a.get("activeSelectionItems").pluck("model"),s=p.a.Deferred().resolve().promise();o.forEach(function(e){s=s.then(function(){return Object(I.a)(r,e,{rating:j.b})})}),s.fail(function(){n(Object(C.c)(Object(E.default)("There was an unexpected error unfavoriting an item.")))
}),i(O.M,a,t.metricsPage)},o["multiSelect/updateSelectedItemsPlayedStatus"]=function(e,t,n){var r=e.get("ui").get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=p.a.Deferred().resolve().promise();a.forEach(function(n){o=o.then(function(){return Object(M.a)(e,l()({},t,{metadataItemEntityID:n.entityID()}))})}),o.fail(function(){
var e=t.played?Object(E.default)("There was an unexpected error marking an item played."):Object(E.default)("There was an unexpected error marking an item unplayed.");n(Object(C.c)(e))}),o.always(function(){var e={};a.forEach(function(t){var i=t.server.entityID();e[i]||(e[i]=!0,n(Object(N.b)({serverEntityID:i})))})}),i(t.played?O.A:O.z,r,t.metricsPage)},o["multiSelect/editSelectedItems"]=function(e,t){var n=e.get("ui").get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=new x.a({
items:r});g.a.trigger("show:modal",a),i(O.q,n,t.metricsPage)},o["multiSelect/refreshSelectedItems"]=function(e,t,n){var r=e.get("ui").get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=p.a.Deferred().resolve().promise();a.forEach(function(e){o=o.then(function(){return Object(S.a)(e)})}),o.fail(function(){n(Object(C.c)(Object(E.default)("There was an unexpected error refreshing an item.")))}),i(O.N,r,t.metricsPage)},o["multiSelect/analyzeSelectedItems"]=function(e,t,n){
var r=e.get("ui").get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=p.a.Deferred().resolve().promise();a.forEach(function(e){o=o.then(function(){return Object(b.a)(e)})}),o.fail(function(){n(Object(C.c)(Object(E.default)("There was an unexpected error analyzing an item.")))}),i(O.c,r,t.metricsPage)},o["multiSelect/syncMetadataItems"]=function(e,t){var n=e.get("ui").get("multiSelect"),r=n.get("activeSelectionItems").pluck("model");y.a.execute("showSyncModal",{item:f.a.first(r),
items:r}),i(O.X,n,t.metricsPage)},o["multiSelect/optimizeMetadataItems"]=function(e,t){var n=e.get("ui").get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=new A.a({item:f.a.first(r),items:r});g.a.trigger("show:modal",a),i(O.D,n,t.metricsPage)},o["multiSelect/mergeSelectedItems"]=function(e,t){var n=e.get("ui").get("multiSelect"),r=n.get("activeSelectionItems").pluck("model"),a=r[0],o=r.slice(1);y.a.execute("merge",{item:a,items:o}),i(O.B,n,t.metricsPage)},
o["multiSelect/deleteSelectedItems"]=function(e,t,n){var r=e.get("ui").get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),o=t.options||{};y.a.execute("deleteItems",l()({},o,{items:a,skipConfirmation:!0})),i(O.k,r,t.metricsPage)},o)},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(5),o=(n.n(a),n(22)),s=n(1108);t.a=Object(r.b)(i)(s.a)
},function(e,t,n){"use strict";function i(e){if(!e)return"";var t=e.toUpperCase();if("EPs"===e)return e;var n=t.match(/(\d{4})S/);if(n){var i=n[1];return t.replace(i+"S",i+"s")}return t}t.a=i},function(e,t,n){"use strict";var i=n(276),r=n(70),a=Object(i.a)(r.a,function(e){return e.homeSettings});t.a=a},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(2713)),c=n.n(l);i.defaultProps={className:c.a.hubCellTitle},t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(269),b=n(27),I=n(785),S=n.n(I),M=n(2817),D=n(2830),C=n.n(D),O="faceFront",P=Object(y.a)(S.a.posterFlipSpeed),j={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!1,transitionEnter:!1,transitionLeave:!1},T=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(b.a)(this,e,t)},t.prototype.componentWillUnmount=function(){this._cancelFlip()},t.prototype._prepareFlip=function(e){this._cancelFlip(),this.setState({isLoadingFace:!0,isFlippingFace:!0,previousImageUrl:e})},t.prototype._flipCard=function(){var e=this;this.setState(function(t){return{isLoadingFace:!1,visibleFace:e._getInverseFace(t.visibleFace)}},function(){
e._flipTimeoutID=setTimeout(e.onFlipComplete,P)})},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?j: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?j:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},d))))},t}(g.Component)
;T.defaultProps={className:C.a.cardContainer,cardClassName:C.a.card},t.a=T},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(c.a,l.a,Object(o.a)(),Object(s.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(5),o=(n.n(a),n(22)),s=n(486),l=n(37),c=n(50),u=n(3044)
;t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(c.a,l.a,Object(o.a)(),Object(s.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(5),o=(n.n(a),n(22)),s=n(486),l=n(37),c=n(50),u=n(3082);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return Object(c.a)(Object(d.a)(),Object(v.a)(),Object(u.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=s.a.findWhere(t.features,{type:l.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===p.d){var r=[{hubKey:"/hubs",isHomeDirectory:!0,title:Object(h.default)("Home")},{
key:"/playlists",title:Object(h.default)("Playlists"),type:f.i}];return e.forEach(function(e){var t=e.key,n=e.title,i=e.type,a="/"===t.charAt(0);r.push({key:a?t:"/library/sections/"+t,hubKey:a?void 0:"/hubs/sections/"+t,title:n,type:i})}),r}return[]})}t.a=i;var r=n(6),a=n.n(r),o=n(7),s=n.n(o),l=n(60),c=n(276),u=n(3211),d=n(548),p=n(41),h=n(3),f=n(26),v=n(51),g=/\/watchnow$/i},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]}break;case"webshow":switch(e){case"episode":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.e];default:return[l.c]}}function a(e,t,n,a){return o.c.test(a.identifier)?i(e,t,n):r(e,t,n)}t.a=a;var o=n(41),s=n(32),l=n(62)},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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(54),c=n(73),u=n(1320),d=n.n(u);t.a=i},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(I.k)(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(N())}}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 P}),n.d(t,"GO_TO_PREVIOUS_RANGE",function(){return j}),n.d(t,"GO_TO_NEXT_RANGE",function(){return T}),n.d(t,"FETCH_CALENDAR",function(){return w}),n.d(t,"PLAY_RECORDING",function(){return E}),n.d(t,"initRecordingSchedulePage",function(){return x}),n.d(t,"clearRecordingSchedulePage",function(){return A}),
n.d(t,"fetchMediaSubscriptions",function(){return N}),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 F})
;var o,s=n(48),l=n.n(s),c=n(39),u=n(92),d=n(164),p=n(1334),h=n(1335),f=n(110),v=n(109),g=n(1176),m=n(100),y=n(69),b=n(30),I=n(66),S="ui/recordingSchedulePage/initRecordingSchedulePage",M="ui/recordingSchedulePage/clearRecordingSchedulePage",D="ui/recordingSchedulePage/fetchMediaSubscriptions",C="ui/recordingSchedulePage/moveMediaSubscription",O="ui/recordingSchedulePage/setVisibleDays",P="ui/recordingSchedulePage/goToToday",j="ui/recordingSchedulePage/goToPreviousRange",T="ui/recordingSchedulePage/goToNextRange",w="ui/recordingSchedulePage/fetchCalendar",E="ui/recordingSchedulePage/playRecording",x=Object(c.a)(S),A=Object(c.a)(M),N=Object(c.a)(D),L=Object(c.a)(C),k=Object(c.a)(O),_=Object(c.a)(P),R=Object(c.a)(j),z=Object(c.a)(T),U=Object(c.a)(w),B=Object(c.a)(E),F=Object(f.a)((o={},
o[S]=function(e,t){var n=i(e),r=n.get("mediaSubscriptions"),a=n.get("calendar"),o=Object(I.k)(e,t),s={isPagePopulated:!0,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null};r&&r.server===o||(s.mediaSubscriptions=new h.a([],{server:o})),a&&a.server===o?a.restoreDefaults():s.calendar=new p.a({},{server:o}),n.set(s)},o[M]=function(e){i(e).set("isPagePopulated",!1)},o[D]=Object(v.a)({key:"mediaSubscriptions",getModel:i}),o[C]=function(e,t){
var n=i(e),r=n.get("mediaSubscriptions"),a=Object(I.d)(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 c=l>0?r.at(l-1).id:void 0;Object(g.a)(a,c).fail(function(){r.remove(a),r.add(a,{at:o})})}},o[O]=function(e,t,n){r(e).set("visibleDays",t.visibleDays)},o[P]=function(e,t,n){r(e).set("time",l()().unix())},o[j]=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[T]=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[w]=Object(v.a)({key:"calendar",getModel:i}),o[E]=function(e,t,n){var i=t.serverEntityID,r=t.providerEntityID,a=t.linkedKey,o=Object(I.k)(e,t),s=new u.a({key:a},{server:o});s.populate().done(function(){n(Object(y.m)({serverEntityID:i,providerEntityID:r,metadataItemEntityID:s.entityID(),metricsPage:b._4}))})},o[m.b]=function(e,t,n){var i=t.activity
;if(i.type===d.a.PROVIDER_SUBSCRIPTION_PROCESS&&a(e,t,n),i.type===d.a.GRABBER_GRAB){"error"===i.Response.status&&a(e,t,n)}},o))},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(39),r=n(111),a=Object(i.a)(r.S),o=Object(i.a)(r.w),s=Object(i.a)(r.e)},,,,,function(e,t,n){var i=n(298),r=n(425);e.exports=n(360)?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){
e.exports=!n(301)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(893),r=n(641);e.exports=Object.keys||function(e){return i(e,r)}},,function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(75),l=n(94),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),o.a.each(this.interface,function(t){
e[t]=o.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=r.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(o.a.contains(this.props,e))return this.getInstance()[e];throw new Error("The "+e+" property has not been defined for this adapter")}});t.a=c},function(e,t,n){"use strict";function i(e){return null==e||""===e?0:parseInt(e,10)}t.a=i},function(e,t,n){"use strict";function i(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}t.a=i},function(e,t,n){"use strict";var i=n(17),r=n(16),a={ASCENDING:"asc",DESCENDING:"desc"},o=i.a.extend({name:"SortModel",context:["server","section"],
idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:r.a.boolean,direction:r.a.string},syncedAttrs:{key:r.a.string,descKey:r.a.string,title:r.a.string,isDefault:r.a.boolean,defaultDirection:r.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,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(3),o={SUBSCRIPTION:"subscription"}},function(e,t,n){"use strict";var i=n(7),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";var i=n(371),r=n(19),a=n(222),o=a.a.extend({getUrl:function(e){if(e){var t=Object(i.a)();return r.join(e,{size:Math.round(this.width*t)})}return e}});t.a=o},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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(954),c=n(371),u=n(90),d=n(15),p=n(57),h=n(955),f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",v=a.a.ItemView.extend({tagName:"img",background:!1,backgroundSize:"",cache:new l.a,initialize:function(e){e||(e={}),s.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),s.a.isFunction(e.getUrl)&&(this.getUrl=e.getUrl),
this.allowBaseImageBlobs=p.a.get("allowBaseImageBlobs"),this.allowBaseImagePreloading=p.a.get("allowBaseImagePreloading"),this.setup(e)},setup:function(e){this.setDimensions(e),this.setFilters(e.filters),this.setModel(e.model,e)},setDimensions:function(e){e.width&&e.height&&(this.transcode=!0,this.width=e.width,this.height=e.height)},setFilters:function(e){this.filters=e||void 0},hasFilters:function(){return void 0!==this.filters},setModel:function(e,t){t||(t={}),this.stopListening(),
this.src=null,this.model=e,e&&(this.server||(this.server=e.server),t.url||this.modelAttribute&&(this.url=this.getUrl(e.get(this.modelAttribute)),this.ignoreAttributeChanges||this.listenTo(e,"change:"+this.modelAttribute,this.onChange)))},setElement:function(e){a.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=d.c("appModel"),n=Object(c.a)()
;return h.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 r.a.Deferred().reject().promise();if(e=this.getTranscodeUrl(e),this.exposeUrl&&this.$el.attr("data-image-url",e),this.allowBaseImageBlobs&&u.a.hasBlob&&u.a.hasObjectUrl){var t=this.loadBlob(e);return t=t.then(this.loadImage,null,this.loadImage)}
return this.allowBaseImagePreloading?this.loadImage(e):r.a.Deferred().resolve(e).promise()},loadBlob:function(e){var t=r.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=s.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=r.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";function i(e){return e?(0,a.a.find(u,function(t){var n=t[0];return e<=n})[1])(e):""}
var r=n(7),a=n.n(r),o=n(1856),s=n(1857),l=n(703),c=n(1858),u=[[54e5,c.a],[864e5,l.a],[6048e5,s.a],[1/0,o.a]];t.a=i},function(e,t,n){"use strict";function i(e){return c.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([d.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),c.a.ajax(v).promise().then(function(t){e.get("own")&&"shuffle"!==i&&"unshuffle"!==i&&g&&(g!==e.get("playQueueSelectedItemID")||g!==e.parseResponse(t).playQueueSelectedItemID)||e.set(e.parse(t));var n=e.get("playQueueItems"),r=e.get("currentIndex");return r>=0&&r<n.length?c.a.Deferred().resolve(e).promise():c.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(6),s=n.n(o),l=n(13),c=n.n(l),u=n(7),d=n.n(u),p=n(19)},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 c.a;var o=t.get("type");return o===d.d?a(null,r):a(n,o)}function r(e){var t=e.metadataListModel,n=e.listType
;return t.get("firstItemSubtype")===u.b?c.a:a(n,t.get("firstItemType"))}function a(e,t){var n=void 0;return e&&(n=d.p(e)),n||(n=d.p(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(6),l=n.n(s),c=n(58),u=n(98),d=n(26)},function(e,t,n){"use strict";function i(e){var t=e.get("remotePlayer")
;return t?t.get("protocol")===s.a?a:o:r}t.a=i;var r=n(532),a=n(1904),o=n(1905),s=n(704)},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(239),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";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";var i=n(5),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(82)),c=n(2014),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.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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(3),v=n(25),g=n(2015),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";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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2034),p=n.n(d);i.defaultProps={className:p.a.help},t.a=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(226)),c=n(49),u=n(52),d=n(2056),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";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(19),c=n(313),u=n(3),d=n(130),p=n(550),h=n(1045),f=n(2121),v=n(2122),g=a.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"),s.a.each(e,function(e){t.filter("."+e+"-group").addClass("has-error")}),this.trigger(e.length?"invalid":"valid")},createMenuOptions:function(e,t){return s.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=d.f.get(e);return"movie"===e&&"com.plexapp.agents.none"===this.model.get("agent")&&(t=d.f.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 p.a([],{server:this.model.server,mediaTypeID:e.typeID})),this.model.agents.populate().then(function(e){return e
})):r.a.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType();return e?(this.model.scanners||(this.model.scanners=new v.a([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):r.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,
r.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,r.a.Deferred().resolve(t).promise()},populateSectionSettings:function(){var e=this;if(!this.model.server.supports("sectionSettings"))return r.a.Deferred().resolve().promise();if(!this.model.settings){var t=new c.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 a={type:n.typeID,agent:this.model.get("agent"),enableAutoPhotoTags:this.model.get("enableAutoPhotoTags")};t.url=l.join(["/library/sections/prefs"],a)}else t.url=l.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(u.default)("Import from iTunes"),
summary:Object(u.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 c.a([],{server:this.model.server,url:l.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";function i(e,t){return s[e].localeCompare(s[t])}t.c=i,n.d(t,"a",function(){return l}),n.d(t,"d",function(){return c});var r,a=n(53),o=n.n(a),s=(r={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"},r.xx="Unknown",r.xn="None",r),l=["xx","xn"],c=function(){var e=o()(s).filter(function(e){return-1===l.indexOf(e)})
;return e.sort(i),e.concat(l)}();t.b=s},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(15),c=n(40),u=n(1048),d=n(664),p=n(91),h=n(3),f=n(370),v=n(2164),g=n(85),m=n(2168),y=n(2170),b=n(2175),I=n(2181),S=n(2183),M=n(2186),D=n(2188),C=n.n(D),O=g.a.extend({name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:C.a,panes:{username:M.a,general:m.a,ownedServer:b.a,sharedServer:S.a,restrictions:I.a},ui:{poster:".modal-poster",
title:".modal-title",message:".form-message",nextBtn:".next-btn",submitBtn:".submit-btn"},regions:{nav:".modal-nav-pane",body:".modal-body-pane"},events:o.a.extend({"submit #share-server-form":"onSubmit"},g.a.prototype.events),initialize:function(e){g.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 f.a({model:this.model,type:"friend",width:40}),this.listenTo(this.body,"show",this.onShowPane)},initHomeUser:function(e){var t=l.c("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 d.a({admin:!1},{server:t.get("user").server})},initModel:function(e){
var t=l.c("appModel");this.model?this.tempModel=this.model.cloneDeep():(this.tempModel=new u.a({},{server:t.get("user").server}),this.tempModel.parseServers({Server:[]}))},initServerOverviews:function(e){var t=l.c("appModel"),n=t.get("servers"),i=t.get("user"),r=this.tempModel.get("serverOverviews");r||(r=new v.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=l.c("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=r.a.when.apply(r.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()),r.a.when.apply(r.a,n)},this)),i.done(o.a.bind(function(){var e=l.c("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(h.default)("This user could not be added to your home."):t?Object(h.default)("An invite could not be sent to this user."):Object(h.default)("Your changes could not be saved.")),s.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);l.c("appModel").get("user").set("home",!0)}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){
c.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(c.a.execute("shareServer",{user:this.tempModel,serverShare:r
})):o&&a.push(i.destroy({wait:!0}))},this),a},onRender:function(){g.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){c.a.execute("removeHomeUser",{homeUser:this.homeUser}).done(o.a.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){c.a.execute("removeFriend",{friend:this.model}).done(o.a.bind(this.hide,this))}},
onServerShareDestroy:function(e){c.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=l.c("appModel");c.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(){return Object(r.createSelector)(Object(a.a)(),function(e){return e.some(function(e){return e.refreshing})})}t.a=i;var r=n(5),a=(n.n(r),n(548))},function(e,t,n){"use strict";function i(e,t,n){return t.all||(t.all=[]),e.index=t.all.length,o(e,{filter:n.get("filter"),
timeFilterStart:n.get("timeFilterStart"),timeFilterEnd:n.get("timeFilterEnd"),logLevels:n.get("logLevels")})?t.filtered&&t.filtered.push(e):t.filtered||(t.filtered=t.all.slice(0)),t.all.push(e),t}function r(e){return e.get("ui").get("serverLogPage")}function a(e){return e.split(/\s+/).map(function(e){return new RegExp(Object(g.a)(e),"i")})}function o(e,t){var n=t.filter,i=t.timeFilterStart,r=t.timeFilterStartIndex,o=t.timeFilterEnd,s=t.timeFilterEndIndex,l=t.logLevels
;if(l.length&&-1===l.indexOf(e.level))return!1;if(i||null!=r||o||null!=s){var c=void 0,u=void 0,d=void 0;if(null!=r&&null!=s||(c=f()(e.time),null==r&&(u=i&&f()(i)),null==s&&(d=o&&f()(o))),null!=r&&r>e.index||null!=s&&s<e.index||u&&u.isAfter(c)||d&&d.isBefore(c))return!1}return!n||(t.regexps||a(n)).every(function(t){return t.test(e.message)||t.test(e.thread)})}function s(e,t){var n=a(t.filter);return e.filter(function(e){return o(e,p()({},t,{regexps:n}))})}function l(e){
var t=e.get("filter"),n=e.get("timeFilterStart"),i=e.get("timeFilterEnd"),r=e.get("logLevels"),a=e._unfilteredLogLines,o=s(a,{logLevels:r,filter:t,timeFilterStart:n,timeFilterStartIndex:Object(y.a)(a,n),timeFilterEndIndex:Object(y.b)(a,i),timeFilterEnd:i});e.set({logLines:o,unfilteredLogLinesCount:a.length})}function c(e){if(!e)return null;var t=e.match(A),n=t[1],i=t[2],r=t[3],a=t[4];return{time:n.trim(),thread:i.trim(),level:N[r],message:a.trim()}}n.d(t,"b",function(){return S}),
n.d(t,"c",function(){return M}),n.d(t,"d",function(){return D}),n.d(t,"a",function(){return C}),n.d(t,"i",function(){return O}),n.d(t,"j",function(){return P}),n.d(t,"e",function(){return j}),n.d(t,"h",function(){return T}),n.d(t,"l",function(){return w}),n.d(t,"k",function(){return E}),n.d(t,"g",function(){return x})
;var u,d=n(6),p=n.n(d),h=n(48),f=n.n(h),v=n(39),g=n(205),m=n(110),y=n(2205),b="ui/serverLogPageActions/clearLog",I="ui/serverLogPageActions/toggleRaw",S=Object(v.a)("ui/serverLogPageActions/changeTextFilter"),M=Object(v.a)("ui/serverLogPageActions/changeTimeFilter"),D=Object(v.a)("ui/serverLogPageActions/clearFilter"),C=Object(v.a)("ui/serverLogPageActions/addLogLine"),O=Object(v.a)("ui/serverLogPageActions/resetLogLevels"),P=Object(v.a)("ui/serverLogPageActions/toggleLogLevel"),j=Object(v.a)(b),T=Object(v.a)("ui/serverLogPageActions/loadLogfile"),w=Object(v.a)("ui/serverLogPageActions/toggleTimeFilter"),E=Object(v.a)(I),x=Object(v.a)("ui/serverLogPageActions/highlightLine"),A=/^([^[]+)\[([^\]]+)]\s+([^\s]+)\s+-\s+(.*)/,N={
ERROR:0,WARN:1,INFO:2,DEBUG:3,VERBOSE:4},L=Object(m.a)((u={},u["ui/serverLogPageActions/addLogLine"]=function(e,t){var n=t.message,a=r(e),o=a.get("logLines").length!==a._unfilteredLogLines.length,s=o?a.get("logLines"):null,l=o?s.length:null,c=i(n,{all:a._unfilteredLogLines.slice(0),filtered:s},a);c.filtered&&c.filtered.length!==l&&(c.filtered=c.filtered.slice(0)),a._unfilteredLogLines=c.all,a.set({unfilteredLogLinesCount:c.all.length,logLines:c.filtered||c.all})},
u["ui/serverLogPageActions/changeTextFilter"]=function(e,t){var n=r(e),i=t.filter;n.set({filter:i}),l(n)},u["ui/serverLogPageActions/changeTimeFilter"]=function(e,t){var n=r(e),i=t.timeFilterStart,a=t.timeFilterEnd;n.set({showTimeFilter:!(!i&&!a),timeFilterStart:i,timeFilterEnd:a}),l(n)},u["ui/serverLogPageActions/clearFilter"]=function(e){var t=r(e);t.set({filter:"",timeFilterStart:"",timeFilterEnd:"",logLevels:[]}),l(t)},u["ui/serverLogPageActions/resetLogLevels"]=function(e){var t=r(e)
;t.set({logLevels:[]}),l(t)},u["ui/serverLogPageActions/toggleLogLevel"]=function(e,t){var n=r(e),i=n.get("logLevels"),a=i.slice(0),o=i.indexOf(t.logLevel);-1===o?a.push(t.logLevel):a.splice(o,1),n.set({logLevels:a}),l(n)},u[b]=function(e){var t=r(e);t.set({logLines:[],unfilteredLogLinesCount:0,highlightedLineIndex:null,showRawText:!1}),t._unfilteredLogLines=[]},u["ui/serverLogPageActions/loadLogfile"]=function(e,t){var n=t.result,a=r(e),o={all:[]};a.set({logLines:[],unfilteredLogLinesCount:0})
;try{n.split(/\n+/).map(c).forEach(function(e){e&&(o=i(e,o,a))}),a._unfilteredLogLines=o.all,a.set({unfilteredLogLinesCount:o.all.length,logLines:o.filtered||o.all})}catch(e){}},u["ui/serverLogPageActions/toggleTimeFilter"]=function(e){var t=r(e),n=t.get("showTimeFilter");t.set({timeFilterStart:"",timeFilterEnd:"",showTimeFilter:!n}),l(t)},u[I]=function(e){var t=r(e);t.set("showRawText",!t.get("showRawText"))},u["ui/serverLogPageActions/highlightLine"]=function(e,t){
r(e).set("highlightedLineIndex",t.index)},u));t.f=L},function(e,t,n){"use strict";var i=n(21),r=n(7),a=n.n(r),o=n(3),s=n(2269),l=n.n(s),c=i.a.Layout.extend({className:"form-group",template:l.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 a.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(){a.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(o.default)("Your changes have been saved.")):t=Object(o.default)("Your changes could not be saved."),this.ui.message.text(t)}});t.a=c},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?includeSubscriptions=1",{headers:{"X-Plex-Token":i}})).then(function(e){return n.signIn(e,{})})}function r(e,t,n){var i=t.authToken,r=Object(v.k)(e,t),a=Object(y.a)(e);a.set({errorMessage:null,isBusy:!0})
;var o=Object(u.c)("metrics");return Object(m.a)(e,r,i,function(){n(Object(d.f)({machineIdentifier:r.id,metricsProperties:{context:f.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(g.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 P});var a,o=n(13),s=n.n(o),l=n(39),c=n(18),u=n(15),d=n(203),p=n(1055),h=n(1056),f=n(123),v=n(66),g=n(3),m=n(2275),y=n(522),b=n(2277),I=n(1058),S={CLAIM_SERVER:"client:claimServer",CLAIM_SERVER_FAILURE:"client:claimServerFailure"},M=Object(l.a)("server/claim/claimServer"),D=Object(l.a)("server/claim/signInThenClaimServer"),C=Object(l.a)("server/claim/signOutServer"),O=Object(l.a)("server/claim/createPIN"),P=(a={},
a["server/claim/claimServer"]=function(e,t,n){r(e,t,n).then(function(){Object(y.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(y.a)(e).set({errorMessage:null,isBusy:!1})}).fail(function(t){var n=Object(p.a)(t);c.a.trigger("show:alert",{message:Object(h.a)(n)}),Object(y.a)(e).set({errorMessage:Object(g.default)("There was a problem claiming this server."),isBusy:!1})})},
a["server/claim/signOutServer"]=function(e,t,n){var i=Object(v.k)(e,t),r=i.get("desktop").get("cloudAccount"),a=Object(y.a)(e);a.set({errorMessage:null,isBusy:!0}),Object(b.a)(r).done(function(){a.set({errorMessage:null,isBusy:!1})}).fail(function(){a.set({errorMessage:Object(g.default)("There was a problem signing the server out."),isBusy:!1})})},a["server/claim/createPIN"]=function(e,t,n){var i=Object(I.a)(e),r=Object(y.a)(e);i.then(function(e){r.set({pinID:e.id,code:e.code,isBusy:!0})}),
i.fail(function(){r.set({fatalErrorMessage:Object(g.default)("An error occurred"),isBusy:!1})})},a)},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(6),o=n.n(a),s=n(12),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(11),h=n(5),f=(n.n(h),n(2288));t.a=Object(p.b)(i,{})(r)
},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(163)),a=Object(i.createSelector)(r.a,function(e){return e.cloudServer},function(e,t){return e[t]});t.a=a},function(e,t,n){"use strict";var i=n(21),r=i.a.Layout.extend({regions:{content:".content"}});t.a=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";function i(e){if(e&&e.features)return e.features.find(function(e){return e.type===r.b.CONTENT})}t.a=i;var r=n(60)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(2444)),a=n(274),o=n(81),s=Object(i.createSelector)(Object(r.a)("typeFirstPreview"),Object(a.a)(o.m),function(e,t){return!1});t.a=s},function(e,t,n){"use strict";var i=n(3),r=n(262),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(){return Object(r.createSelector)(a.a,function(e,t){return t.searchResultEntityID},function(e,t){return e[t]})}t.a=i;var r=n(5),a=(n.n(r),n(2547))},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(20),b=n(45),I=n(3),S=n(25),M=n(757),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()(y.a,{"data-qa-id":t,id:this._moreButtonID,className:n,tabIndex:a,
"aria-label":Object(I.default)("More Actions"),"aria-haspopup":!0,onPress:this.onActionsPress},void 0,o()(S.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.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(20));t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(2707),b=n(2710),I=n(2712),S=n.n(I),M=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.state={hasMouseEntered:!1},i.onMouseEnter=function(e){i.setState({hasMouseEntered:!0})},i.onMouseLeave=function(e){i.setState({hasMouseEntered:!1})},r=n,p()(i,r)}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.allowPersistentHomeHubStatus,n=e.allowToggleHomeHub,i=e.children,a=e.className,s=e.isHomeHub,c=l()(e,["allowPersistentHomeHubStatus","allowToggleHomeHub","children","className","isHomeHub"]),u=this.state.hasMouseEntered;return o()("div",{className:a,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},void 0,n?m.a.createElement(b.a,r()({},c,{component:y.a,isHomeHub:s,isVisible:u||t&&s})):null,i)},t}(g.Component);M.defaultProps={className:S.a.hubCellHeader},t.a=M
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.isPrimary,i=s()(e,["className","isPrimary"]);return u.a.createElement(d.a,a()({},i,{className:(t||"")+" "+(n&&h.a.isPrimary||""||"")}))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(242),p=n(2723),h=n.n(p);i.defaultProps={className:h.a.playerButton},t.a=i},function(e,t,n){"use strict";function i(e){if(e){var t=e.split("?"),n=t[1];return n?h.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(u.a.isNumber(a))return a}return{}}function a(e,t){return!(!u.a.isObject(t)||!Object(d.a)(e,t))||e>=t}function o(e,t){return!(!u.a.isObject(t)||!Object(p.a)(e,t))||e<=t}function s(){return Object(l.createSelector)(function(e,t){return t.containerKey},Object(f.a)(),function(e,t){if(t&&t.Media){
for(var n=i(e),s=u.a.sortBy(t.Media,"endsAt"),l=Date.now()/1e3,c=0,d=s.length;c<d;c++){var p=s[c];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 u.a.first(s)}})}t.a=s;var l=n(5),c=(n.n(l),n(7)),u=n.n(c),d=n(1154),p=n(1155),h=n(63),f=n(22),v={s:"seconds",m:"minutes",
h:"hours",d:"days",w:"weeks",M:"months",y:"years"}},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(48),a=n.n(r);t.default=i},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(48),a=n.n(r)},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)(),s.c,o.c,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)}var d={}
;return n&&(d.context=n),Object(u.a)(r,a,o,d,i.playlistType)})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(2757),c=n(133),u=n(143)},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(2886)),c=n.n(l);i.defaultProps={className:c.a.rightTitle},t.a=i},function(e,t,n){"use strict";var i=n(214),r=(n.n(i),n(411)),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){return new o.default(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyImage=t.NativeTypes=void 0,t.default=r;var a=n(2974),o=i(a),s=n(2995),l=i(s),c=n(810),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";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";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(39),r=n(111),a=Object(i.a)(r._10),o=Object(i.a)(r.U),s=Object(i.a)(r.g),l=Object(i.a)(r.O),c=Object(i.a)(r.r),u=Object(i.a)(r.y)},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(13),a=n.n(r),o=n(39),s=n(445),l=n(109),c=n(68),u=Object(o.a)("oauth/fetchOauthProviders"),d=Object(o.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 o=i.populate().then(function(){return a.a.ajax(i.getXHROptions(t.url,{type:"DELETE"}))});Object(s.a)(o,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";function i(){return Object(a.createSelector)(l.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.d(n))}}}var a=n(5),o=(n.n(a),n(55)),s=n(341),l=n(74),c=n(3220);t.a=Object(o.a)(i,r)(c.a)},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e,t){return t.listType},d.a,u.a,p.a,Object(c.a)(),function(e,t,n,i,r){return Object(g.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:h.e}};return{onPlayAllPress:function(){e(l.m(n))},onShufflePress:function(){e(l.q(n))},onPlayNextPress:function(){e(l.h(o()({},n,{options:{playAll:!0,next:!0}})))},onAddToQueuePress:function(){e(l.h(o()({},n,{options:{playAll:!0,next:!1}})))},onSyncPress:function(){e(v.l(n))},
onOptimizePress:function(){e(v.e(n))}}}var a=n(6),o=n.n(a),s=n(5),l=(n.n(s),n(69)),c=n(119),u=n(37),d=n(50),p=n(185),h=n(123),f=n(55),v=n(135),g=n(3275),m=n(339),y=n(3276);t.a=Object(f.a)(i,r,m.a)(y.a)},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(){return Object(a.createSelector)(o.a,function(e){return{provider:e.epgSource}})}var r=n(11),a=n(5),o=(n.n(a),n(37)),s=n(3297);t.a=Object(r.b)(i)(s.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(3335)),c=n.n(l);i.defaultProps={
className:c.a.pageHeaderCenter},t.a=i},function(e,t,n){"use strict";function i(e){return e.experienceSettings.listStyles}t.a=i},function(e,t,n){"use strict";function i(e,t,n,i,o){if(n){var s=Object(r.a)(n,i,t,o);if(1===s.length)return s[0];var l=void 0,c=Object(a.a)(n,i);return e[t]&&(l=e[t][c]),l&&s.indexOf(l)>-1?l:s[0]}}t.a=i;var r=n(351),a=n(606)},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,p=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(d.a,g,m&&t.map(function(e){var t=e.key,n=e.title;return a()(f.a,{to:Object(h.a)({typeKey:t,filters:p?c:void 0,sort:p?o:void 0,limit:p?l:void 0,customFilter:p},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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(243),h=(n(89),n(256)),f=n(103),v=a()(p.a,{});t.a=i},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),function(){return Object(i.createSelector)(function(e){return e.ui.homePage.homeHubStatuses},function(e,t){return t.homeHubID},function(e,t){return e.find(function(e){return e.homeHubID===t})})});t.a=r
},function(e,t,n){"use strict";var i=n(19),r=n(17),a=n(16),o=n(97),s=n(3828),l=n(3830),c=n(3834),u=r.a.extend({name:"LibraryDetailsModel",context:["server","provider","includeAdvanced","includeCollections"],responseType:function(){return Object(o.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:c.a,rootPropertyName:"Type"},fieldTypes:{relationClass:l.a,rootPropertyName:"FieldType"}}});t.a=u},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var i=n(501);e.exports=function(e){return Object(i(e))}},function(e,t){e.exports={}},function(e,t,n){
"use strict";function i(e){e=e>0?Math.min(e,1024):24;for(var t="";t.length<e;)t+=Math.random().toString(36).substr(2);return t.substr(0,e)}t.a=i},function(e,t,n){"use strict";var i=n(363),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(1539),a=n.n(r),o=n(304),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,t,n){return void 0===n?t:a.a.isObject(t)?t:n}t.a=i;var r=n(7),a=n.n(r)},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(108),o=n(85),s=n(176),l=n(1605),c=n.n(l),u=o.a.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:c.a,events:r.a.extend({"click .confirm-btn":"hide"},o.a.prototype.events),serializeData:function(){return{isSignedIn:this.model.get("myPlexSigninState")===a.b,hasPlexSubscription:this.model.get("myPlexSubscription"),serverSettingsRoute:Object(s.a)(this.model.id,"settings","general")}}});t.a=u},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(19),o=n(24),s=n(366),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(o.a)(t),n=Object(o.a)(n));var i=e.separator;if(e.useLongName){
var r=Object(s.default)("Season {seasonNumber}",{seasonNumber:t}),l=Object(s.default)("Episode {episodeNumber}",{episodeNumber:n});return""+r+(i||" ")+l}var c=Object(s.default)("S{seasonNumber}",{seasonNumber:t}),u=Object(s.default)("E{episodeNumber}",{episodeNumber:n});return""+c+(i||"")+u}if(e.date){var d=a()(e.date);return Object(s.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:d.month()+1,dayNumber:d.date(),shortYear:d.format("YY")})}return""}
var r=n(48),a=n.n(r),o=n(667),s=n(3);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.onlyIfCached,r=void 0===n||n;if(e){if(e.section)return e.section;if(e.get("isSection"))return e;var s=e.get("librarySectionID");if(s){var l=new o.a({key:s},{server:e.server,onlyIfCached:r});return a.a.isEmpty(l)?void 0:l}return e.parent?i(e.parent,t):void 0}}t.a=i;var r=n(7),a=n.n(r),o=n(437)},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(19),o=n(17),s=n(16),l=n(1585),c=n(313),u=n(260),d=n(38),p=n(43),h=n(26),f=n(130),v=n(1587),g=n(930),m=n(669),y=n(931),b=n(1589),I=n(1591),S=n(1593),M=n(932),D=n(1594),C=n(933),O=n(434),P=n(366),j=o.a.extend({name:"SectionModel",context:["server"],entityType:p.c,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(d.a)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",
cache:new u.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:s.a.boolean,currentFilters:s.a.array,currentFolderKey:s.a.string,settings:s.a.instanceOf(c.a)},syncedAttrs:{key:s.a.oneOfType(s.a.string,s.a.integer),uuid:s.a.string,thumb:s.a.string,art:s.a.string,
createdAt:s.a.integer,updatedAt:s.a.integer,allowAdvancedFilters:s.a.boolean,allowSync:s.a.boolean,refreshing:s.a.boolean,name:{type:s.a.string,save:!0},title:{type:s.a.string,save:!0},type:{type:s.a.string,save:!0},agent:{type:s.a.string,save:!0},scanner:{type:s.a.string,save:!0},language:{type:s.a.string,save:!0},importFromiTunes:{type:s.a.boolean,save:!0},enableAutoPhotoTags:{type:s.a.boolean,save:!0}},derivedAttrs:{serverEntityID:function(){return this.state?this.server.entityID():""}},
syncedRelations:{locations:function(){return{relationClass:I.a,rootPropertyName:"Location",options:{section:this},save:!0}}},sessionRelations:{items:function(){return{relationClass:l.a,options:{section:this}}},currentSubset:function(){return{relationClass:C.a,options:{section:this}}},currentFirstCharacter:function(){return{relationClass:y.a,deferred:!0}},currentType:function(){return{relationClass:M.a,deferred:!0}},currentSort:function(){return{relationClass:P.a,deferred:!0}},types:function(){
return{relationClass:S.a,options:{section:this}}},subsets:function(){return{relationClass:D.a,options:{section:this}}},filters:function(){return{relationClass:this.get("allowAdvancedFilters")?g.a:b.a,options:{section:this}}},sorts:function(){return{relationClass:O.a,options:{section:this}}},firstCharacters:function(){return{relationClass:m.a,options:{section:this}}}},defaults:function(){var e=this;return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,
currentFolderKey:null,currentSubset:v.a.get("all"),settings:new c.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 f.f.get(e)},getSaveParams:function(e){var t=o.a.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=f.f.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(h.r)(t);this.get("types").reset(n)}});t.a=j},function(e,t,n){"use strict";function i(){var e=Object(r.c)("appModel");e.get("user"),e.get("experienceSettings");return!1}t.a=i;var r=n(15);n(81)},function(e,t,n){"use strict";function i(e){return/^\w+:\/\//.test(e)}t.a=i},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,r,a=n(17),o=n(16),s=n(260),l=n(58),c=n(1662),u=n(1663),d=n(1666),p=n(1667),h=a.a.extend({name:"VersionGeneratorModel",context:["server","section","playlistID"],rootPropertyName:"Item",cache:new s.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id)},urlRoot:function(){return"/playlists/"+(this.playlistID||this.parent.id)+"/items"},syncedAttrs:{
id:o.a.integer,clientIdentifier:o.a.string,contentType:o.a.string,composite:o.a.string,type:{type:o.a.integer,save:!0},title:{type:o.a.string,save:!0},target:{type:o.a.string,save:!0},targetTagID:{type:o.a.integer,save:!0},locationID:{type:o.a.integer,save:!0},Location:{type:o.a.object,save:!0},Device:{type:o.a.object,save:!0}},sessionRelations:{children:{relationClass:u.a,options:function(){return{generator:this}}}},syncedRelations:{status:{relationClass:p.a,rootPropertyName:"Status"},policy:{
relationClass:d.a,rootPropertyName:"Policy",save:!0},mediaSettings:{relationClass:c.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[l.d]=5,i[l.a]=50,i[l.c]=50,i),warningCounts:(r={},r[l.d]=10,r[l.a]=100,r[l.c]=100,r),getSaveParams:function(e,t){
var n=a.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(1673).default,r=n(189);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(950),a=n(1674);t.default=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(15),l=n(57),c=n(85),u=n(1683),d=n(1685),p=n(1690),h=n(1693),f=n.n(h),v=c.a.extend({name:"userSelectModal",className:"user-select-modal modal modal-transparent fade",template:f.a,transparent:!0,
panes:{users:p.a,pin:d.a},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){c.a.prototype.initialize.apply(this,arguments);var t=s.c("appModel");this.options=e,this.isForced=e.isForced,this.user=t.get("user"),this.promise=r.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=l.a.get("alerts");l.a.set("alerts",null);var t=new u.a({alert:o.a.first(e)});this.alertBar.show(t)},onRender:function(){c.a.prototype.onRender.apply(this,arguments),this.model?this.showPane("pin",{focusDelay:this.focusDelay}):this.showPane("users"),this.showAlertBar()},onHide:function(e){c.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(l.a.has("continueUrl")&&!this.options.isEditing)return void(window.location=l.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,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(13),a=n.n(r);t.a=i},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(7),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){
var i=n(978),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";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";var i=n(2),r=n.n(i),a=n(6),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(27)),g=n(15),m=n(76),y=n(30),b=n(117),I=n(23),S=n(1974),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(g.c)("metrics").trackClick(o()({},i.props.metricsProperties,{page:y.Q,action:m.U})),i.props.onModalClose()},r=n,u()(i,r)}return p()(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.isOpen,n=e.metricsProperties;return r()(b.a,{size:I.e.LARGE,isOpen:t,metricsPage:y.Q,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";var i=n(1),r=n.n(i);r.a.shape({current:r.a.instanceOf(window.Element)})},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(1960),h=n.n(p),f=n(27),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){try{e.focus()}catch(e){}}function r(e){var t=document.activeElement,n=t&&e&&e.contains(t);t&&!n&&t.blur()}function a(e){v=document.activeElement,g=e,r(e)}function o(e){Object(p.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(p.a)(g,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=Object(f.a)(g),t=d.a.find(e,function(e){return Object(h.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(7),d=n.n(u),p=n(36),h=n(504),f=n(1971),v=void 0,g=void 0},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={modalFooter:"ModalFooter-modalFooter-30WIB",button:"ModalFooter-button-15VJa Button-button-2kT68 Link-link-2n0yJ",splitButton:"ModalFooter-splitButton-2NLiB ModalFooter-button-15VJa Button-button-2kT68 Link-link-2n0yJ"}},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=c()(e,["formGroupClassName","formLabelClassName","name","labelText","helpText","showErrors","errors"]);return s()(h.a,{className:t},void 0,s()(v.a,{className:n,showErrors:l,errors:u,name:i,labelText:r}),p.a.createElement(g.a,a()({name:i,hasError:l},d)),o&&s()(f.a,{},void 0,o))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(206),f=n(384),v=n(457),g=n(227),m=n(165);t.a=Object(m.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(142));t.a=i},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,y=e.min,b=e.max,I=e.step,S={name:t,helpText:a,initialValue:l(s)};if(Array.isArray(g))return c.a.createElement(p.a,o()({labelText:r},S,{values:i(g)}));switch(n){case f.b.TEXT:return c.a.createElement(h.b,o()({labelText:r},S));case f.b.BOOL:return c.a.createElement(u.a,o()({checkboxText:r},S));case f.b.INT:return c.a.createElement(d.a,o()({labelText:r},S))
;case f.b.DOUBLE:return c.a.createElement(v.a,o()({labelText:r,min:y,max:b,stepSize:I,valueModifier:m[t]},S));default:return null}}var a=n(6),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(545),d=n(2036),p=n(456),h=n(546),f=n(926),v=n(1034),g=n(719),m={playbackSpeed:g.a};r.defaultProps={initialValueModifier:function(e){return e}},t.a=r},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.deviceID},Object(s.a)(),function(e,t){
if(t)return o.a.find(t.devices,{key:e})})}var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(547);t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(19),c=n(15),u=n(437),d=n(60),p=n(100),h=n(41),f=n(91),v=n(3),g=n(26),m=n(130),y=n(446),b=n(2114),I=n(2127),S=n(2129),M=n(2147),D=n(2153),C=n(85),O=n(433),P=n(133),j=n(2155),T=n.n(j),w=C.a.extend({mixins:[y.a],name:"editSectionModal",className:"edit-section-modal modal modal-lg fade",template:T.a,panes:{type:{constructor:D.a,
nextPane:"folders",dependentPanes:function(){return this.showFolders?["folders"]:["options","advanced"]}},folders:{constructor:S.a,nextPane:"options",dependentPanes:["options","advanced"]},options:{constructor:M.a,nextPane:"advanced"},advanced:{constructor:b.a},error:{constructor:I.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"},C.a.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){var t=this;C.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 u.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=r.a.Deferred(),this.promise=this._deferred.promise()
;var n=this.server.get("providers");n.populate().done(this.whenRendered(function(){var i=n.get(h.d),r=i.get("features").get(d.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=m.f.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?s.a.trigger("show:modal",new O.a({model:this.server})):this.updateMessage(Object(v.default)("Your changes could not be saved."))},this)),t.then(o.a.bind(function(){var e=this.model.server.entityID(),t=Object(c.c)("appStore").dispatch
;if(t(Object(p.h)({serverEntityID:e})),t(Object(p.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")===g.b&&(r.type=Object(g.q)(g.a).id,r.sort="addedAt:desc"),window.location.hash=Object(P.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=f.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 u.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=r.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(),a=i.getSaveParams(n),s=l.join(["/library/sections/",this.model.id,"/prefs"],a),c=o.a.extend(this.server.getXHROptions(s),{type:"PUT"});return r.a.ajax(c).promise().then(function(){return e})},
saveAgentSettings:function(){var e=r.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(),a=i.getSaveParams(n),s=o.a.result(t,"url"),c=l.join([s,"/set"],a),u=i.server.getXHROptions(c);return r.a.ajax(u).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=w},function(e,t,n){"use strict"
;function i(){function e(e,t){var n=[P,T,E,A,t];for(var i in e)n.push(e[i]);var r=n.join(":");if(r===V)return H;k=e.listTop,_=e.listLeft;var s=(e.viewportWidth||0)-T-A,l=(e.viewportHeight||0)-P-E;g===a?s-=_:l-=k,s=Math.max(0,s),l=Math.max(0,l),R=N({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))),F=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),Q={},V=r,H={width:c+T+A,height:u+P+E}}function t(e){var t=e;if(Q[t])return Q[t];var n=l(e),i=s(e),r={column:n,row:i,cellX:n*(R+M)+_+A,cellY:i*(z+C)+k+P,cellWidth:R,cellHeight:z};return Q[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=F+2*c+I*c*2,p=Math.ceil(u)*c,h=p+F-1,f=Math.floor(u)*c,v=p+F+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,P=void 0===O?0:O,j=f.outerPaddingRight,T=void 0===j?0:j,w=f.outerPaddingBottom,E=void 0===w?0:w,x=f.outerPaddingLeft,A=void 0===x?0:x,N=f.getCellWidth,L=f.getCellHeight,k=void 0,_=void 0,R=void 0,z=void 0,U=void 0,B=void 0,F=void 0,V=void 0,H=void 0,Q=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(36),n(2234)),a="vertical",o="horizontal"},function(e,t,n){"use strict";function i(){return Object(a.a)()||Object(r.a)()||Object(o.a)()}var r=n(689),a=n(965),o=n(734);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(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(101)),f=n(27),v=n(3),g=n(25),m=n(1066),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.friendlyNameClassName,a=e.detailsClassName,o=e.to,s=e.isDisabled,l=e.isSelected,c=e.identifier,u=e.title,d=e.details,p=e.onPress;return r()(h.a,{className:(n||"")+" "+(y.a.serverMenuItem||"")+" "+(l&&y.a.selectedServerMenuItem||""||""),"data-qa-id":"serverMenuItem--"+c,to:o,isDisabled:s,onPress:p},void 0,r()("div",{className:y.a.serverMenuItemContainer},void 0,r()("div",{className:y.a.serverMenuTitle},void 0,r()("div",{className:i
},void 0,u),r()("div",{className:a},void 0,d)),r()("div",{className:y.a.serverMenuIconContainer},void 0,l&&r()(g.a,{name:"plex-icon-selected-560",className:(y.a.serverMenuIcon||"")+" "+(y.a.selectedIcon||""),"aria-label":Object(v.default)("Selected")}),t)))},t}(p.Component);b.defaultProps={friendlyNameClassName:y.a.serverMenuFriendlyName,detailsClassName:y.a.serverMenuDetails},t.a=b},function(e,t,n){"use strict";var i=n(363),r=new i.a({props:["capabilities","video","music","photo"]});t.a=r
},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(132)),a=n(337),o=n(338),s=Object(i.createSelector)(a.a,r.a,Object(o.a)("providers"),function(e,t,n){return e.reduce(function(e,i){var r=i.isCloud?n:i.providers,a=r.map(function(e){return{server:i,provider:t[e]}}),o=a.length?a:[{server:i}];return e.push.apply(e,o),e},[])});t.a=s},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(r.createSelector)(function(e,t){return t.metricsContext},s.c,o.c,Object(a.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(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(55),c=n(143),u=n(2578);t.a=Object(l.a)(i)(u.a)},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(e,t){var n=Object(f.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 j}),n.d(t,"b",function(){return T}),n.d(t,"d",function(){return w}),n.d(t,"e",function(){return E
}),n.d(t,"c",function(){return x});var r,a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(7),u=n.n(c),d=n(39),p=(n(36),n(15)),h=n(1122),f=n(770),v=n(2640),g=n(533),m=n(771),y=n(534),b=n(1123),I=n(141),S=n(2641),M=n(320),D=n(66),C=n(177),O=n(35),P=n(58),j=Object(d.a)("ui/player/playerDecision/makeDecision"),T=Object(d.a)("ui/player/playerDecision/makeNextDecision"),w=Object(d.a)("ui/player/playerDecision/removeDecision"),E=Object(d.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,d=t.transcodeSessionID,f=t.options,O=void 0===f?{}:f,j=Object(C.c)(e,n),T=D.g(e,{playQueueItemEntityID:r});if(T.get("type")!==P.c){var w=j.get("decisions"),E=w[r];if(E)return void i(j,E);var x=T.get("metadataItem"),A=D.i(e,{providerEntityID:x.get("providerEntityID")
}),N=null==a?Object(v.a)(j,x):a,L=x.get("Media")[N],k=Object(p.c)("getDecisionOptions")(x,c,L),_=l.a.extend(!0,{},k,O),R=void 0,z=[],U=I.a.ORIGINAL;k.type===M.a.types.VIDEO&&(z=k.availableQualities,U=k.qualityIndex);var B={forceSyncCheckFiles:!0,itemProvider:A};Object(h.a)(x,B).always(function(){var t=x.get("Media")[N],n=t&&t.Part[s];O.offset,S.a.getPlayerDecision(o()({playbackSessionID:m.a,transcodeSessionID:d,item:x,itemProvider:A,media:t,part:n,offset:Object(g.a)(j,x),
fallbackServer:e.get("primaryServer")},_)).done(Object(y.a)(j,function(e){var t,n=e.transcodeServer,a=e.media,s=e.part,l=j.get("decisions"),c=x.get("Media"),d=a.Part,p=u.a.findIndex(c,function(e){return null!=e.id?e.id===a.id:null==e.uuid||e.uuid===a.uuid}),h=u.a.findIndex(d,function(e){return null!=e.id?e.id===s.id:null==e.key||e.key===s.key});e.abr&&(U=I.a.CONVERT_AUTOMATICALLY),R={playQueueItemID:T.get("playQueueItemID"),availableQualities:z,qualityIndex:U,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||(R.transcodeSessionID=e.transcodeSessionID),
R.transcodeServerEntityID=n&&n.entityID(),j.set("decisions",o()({},l,(t={},t[r]=R,t))),i(j,R)})).fail(Object(y.a)(j,function(e){x.set({isPreFetched:!1});var t=j.get("playQueue"),n=t.get("playQueueItems").at(t.get("currentIndex"));T.id===n.id&&j.set({isMediaLoading:!1,hasError:!0,errorMessage:Object(b.a)(e)})}))})}},r["ui/player/playerDecision/makeNextDecision"]=function(e,t,n){
var i=t.playerType,r=Object(C.c)(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(j({playerType:i,playQueueItemEntityID:c}))}},r["ui/player/playerDecision/removeDecision"]=function(e,t){var n=t.playerType,i=t.playQueueItemEntityID,r=Object(C.c)(e,n);Object(O.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(C.c)(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(w({playerType:i,playQueueItemEntityID:p})),n(c?j({playerType:i,playQueueItemEntityID:p,mediaIndex:c.mediaIndex,partIndex:c.partIndex,qualityIndex:a.get("qualityIndex"),options:o()({
offset:1e3*a.get("positionSeconds")},r)}):j({playerType:i,playQueueItemEntityID:p,qualityIndex:a.get("qualityIndex")}))},r)},function(e,t,n){"use strict";function i(e,t){return Object(s.a)(Object(r.createSelector)(function(e){return e.ui},function(e,t){return t.playerType},function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=i+"Player";return n[r]?o.a.pick(n[r],e):{}}),function(e){return e})}var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(156);t.a=i},function(e,t,n){"use strict"
;function i(){return Object(r.createSelector)(Object(a.a)("serverEntityID"),Object(o.a)(),s.a,function(e,t,n){return n[t&&t.serverEntityID||e]})}t.a=i;var r=n(5),a=(n.n(r),n(158)),o=n(168),s=n(163)},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(72),v=n(554),g=n(20),m=n(209),y=n(54),b=(n(731),n(27)),I=n(343),S=n(3),M=n(25),D=n(1136),C=n(403),O=n(345),P=n(2714),j=n.n(P),T=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._setScrollIndex(e)},r.onPreviousPress=function(){
r._setScrollIndex(r._visibleStartIndex-r._pageSize-1)},r.onNextPress=function(){r._setScrollIndex(r._visibleEndIndex+1)},r.state={showActions:!1,enablePrevious:!1,enableNext:!1,listHeight:"auto",scrollIndex:r.props.scrollIndex||0},r._isReady=!1,r._listRef=h.a.createRef(),r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){return null!=e.scrollIndex&&e.scrollIndex!==t.scrollIndex?{scrollIndex:e.scrollIndex}:null},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(b.a)(this,e,t)},t.prototype._setScrollIndex=function(e){this.props.onListScrollIndexChange&&this.props.onListScrollIndexChange(e),null==this.props.scrollIndex&&this.setState({scrollIndex:e})},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.serverEntityID,i=e.providerEntityID,a=e.hubEntityID,o=e.directoryKey,s=e.allowHomeHubIndicator,l=e.allowPersistentHomeHubStatus,c=e.allowToggleHomeHub,u=e.hubIdentifier,d=e.isHomeHub,p=e.title,b=e.sourceTitle,P=e.attribution,T=e.route,w=e.size,E=e.more,x=e.random,A=e.totalSize,N=e.keyPropName,L=e.itemsOffset,k=e.items,_=e.layout,R=e.cellRenderer,z=e.resizeTimeout,U=e.shouldConfirmHomeHubRemoval,B=e.onPageRequest,F=this.state,V=F.showActions,H=F.enablePrevious,Q=F.enableNext,Y=F.listHeight
;if(!w&&!A)return null;var G=E?w+1:w,W=x?w:A||G,K={visibility:"auto"===Y?"hidden":"visible"},q={height:Y,overflow:"hidden"},Z=null;if(p){var X=Object(I.a)(p);Z=r()(O.a,{className:j.a.title},void 0,P?r()(D.a,{className:j.a.attribution,attribution:P}):null,T?r()(g.a,{to:T},void 0,X):X,b?r()(f.b,{className:j.a.titleSeparator}):null,b?r()("span",{className:j.a.sourceTitle},void 0,b):null)}return r()("div",{className:t,style:K,"data-qa-id":"hub--"+u},void 0,r()(C.a,{allowHomeHubIndicator:s,
allowPersistentHomeHubStatus:l,allowToggleHomeHub:c,className:j.a.hubCellHeader,directoryKey:o,hubEntityID:a,isHomeHub:d,providerEntityID:i,serverEntityID:n,shouldConfirmHomeHubRemoval:U},void 0,Z,V?r()("div",{className:j.a.hubActions},void 0,r()(v.a,{className:j.a.hubScrollButton,"data-qa-id":"hubPreviousButton",icon:"plex-icon-hub-prev-560",iconComponent:M.a,isDisabled:!H,title:Object(S.default)("Previous Page"),onPress:this.onPreviousPress}),r()(v.a,{className:j.a.hubScrollButton,
"data-qa-id":"hubNextButton",icon:"plex-icon-hub-next-560",iconComponent:M.a,isDisabled:!Q,title:Object(S.default)("Next Page"),onPress:this.onNextPress})):null),r()("div",{style:q},void 0,h.a.createElement(m.a,{scrollerClassName:j.a.hubScroller,ignoreHeight:!0,keyPropName:N,items:k,itemsOffset:L,scrollDirection:y.HORIZONTAL,scrollIndex:this.state.scrollIndex,shouldCenterScrollIndex:this.props.shouldCenterScrollIndex,size:Math.min(1e4,W),layout:_,cellRenderer:R,resizeTimeout:z,ref:this._listRef,
onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,onPageRequest:B})))},t}(p.Component);T.defaultProps={className:j.a.hubCell,shouldCenterScrollIndex:!1},t.a=T},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(5),a=(n.n(r),n(475))},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),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 Object(p.createSelector)(g.a,Object(v.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[f.b.ACTIONS][h.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(y.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(b.a,n):null}var o=n(12),s=n.n(o),l=n(1),c=n.n(l),u=n(0),d=n.n(u),p=n(5),h=(n.n(p),n(238)),f=n(60),v=n(22),g=n(37),m=n(55),y=n(167),b=n(2740),I=Object(m.a)(i,r)(a);I.propTypes={hideUnrated:c.a.bool},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=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(48),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type
;return Object(l.t)(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(26)),c=n(25);t.a=i},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(y.a)(e)+")",t.WrappedComponent=e,t.defaultProps={disableSelection:!1},t}var r,a=n(6),o=n.n(a),s=n(12),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(166),b=n(27),I=n(325),S=(r={},r[I.i]=!0,r[I.b]=!0,r[I.f]=!0,r[I.g]=!0,r[I.h]=!0,r);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(1196),a=n(2929),o=n(2931);e.exports=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(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2999),u=n.n(c);i.defaultProps={className:u.a.dragLayer},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e,t){return t.sourceDirectoryKey},function(e,t){return Object(o.a)(e,t)})}t.a=i;var r=n(5),a=(n.n(r),
n(3022)),o=n(1219)},function(e,t,n){"use strict";function i(e,t,n){var i=encodeURIComponent(t.machineIdentifier),a=encodeURIComponent(n.identifier),o=["#!",e];return t.isCloud||o.push(i),o.push(a),r.join(o)}t.a=i;var r=n(19)},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,p=Object(c.c)(e,t,n),h=e+(t||"")+n+i+r;if(d.hasOwnProperty(h))return d[h];var f=Object(u.a)({type:e,
aspectRatio:p,titleCount:r,context:n}),v=f.titleHeight,g=f.minCellWidth,m=f.preferredCellWidth,y=f.minColumns,b=f.maxColumns,I=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(l.a)(a()({},e,{preferredCellWidth:m,minCellWidth:g,minColumns:y,maxColumns:b,columnAdjustment:i,aspectRatio:p}))},getCellHeight:function(e){
return Object(s.a)(a()({},e,{aspectRatio:p,titleHeight:v}))}});return I.cellOptions={preferredCellWidth:m,minCellWidth:g,minColumns:y,maxColumns:b,columnAdjustment:i,aspectRatio:p,titleHeight:v},d[h]=I,I}t.a=i;var r=n(6),a=n.n(r),o=n(461),s=n(781),l=n(571),c=n(126),u=n(1221),d={}},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(5),a=(n.n(r),n(22))},function(e,t,n){"use strict";function i(e){return Object(r.createSelector)(Object(s.a)(),function(t){if(t)return o.a.findWhere(t.features,{type:e})})}t.a=i;var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(51)},function(e,t,n){"use strict";function i(e,t,n){var i=Object(v.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(p.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()(f.a,{"data-qa-id":"directoriesMenuItem--"+u,to:d,isSelected:c===u},u,l?Object(h.default)("All Libraries"):s)}))}
var a=n(2),o=n.n(a),s=n(12),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(56),h=n(3),f=n(103),v=(n(88),n(125),n(552));t.a=r},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(b.a)(),Object(m.a)(),I.a,function(e,t,n){var i=e.isHubKey,r=e.directory,a=t.isProvidersPending,o=t.desktop.isLibrariesPending,s=!r&&(a||o);return{isHubKey:i,isChannelsGrid:r&&M.test(r.key),selectedDirectory:r,libraryRoutes:n,showSpinner:s}})}
var r=n(6),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(5),m=(n.n(g),n(34)),y=n(68),b=n(3285),I=n(727),S=n(3287),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:y.l})(D)},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(d.a)(),Object(u.a)(),function(e,t){return{machineIdentifier:e.machineIdentifier,isRefreshing:!!t}})}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(5),u=(n.n(c),n(211)),d=n(34),p=n(3299);t.a=Object(l.b)(i)(r)},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.onPress,l=o?i:r;return s()(l,{className:a,onPress:o},void 0,t?s()(d.a,{errorMessage:t}):null,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(20)),d=n(191),p=n(3471),h=n.n(p);t.a=a},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(l.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.d(n))}}}var a=n(5),o=(n.n(a),n(55)),s=n(341),l=n(74),c=n(3484);t.a=Object(o.a)(i,r)(c.a)
},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(3490)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderDivider},t.a=i},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.playlistItems});t.a=a},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},,,,,,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,n){"use strict";var i=n(77),r=n(13),a=n.n(r),o=n(236),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=a.a.Deferred(),n=void 0;if(this.isPopulating())return this.populatePromise;n=this._fetch?this._fetch.apply(this,arguments):this instanceof i.c.Collection?i.c.Collection.prototype.fetch.apply(this,arguments):i.c.Model.prototype.fetch.apply(this,arguments);var r=t.promise();return r.rid=n.rid,this.populatePromise=r,this.failedPopulatePromise=null,n.done(function(n){
e.populatePromise=a.a.Deferred().resolveWith(e,[e]).promise(),t.resolveWith(e,[e,n])}),n.fail(function(n){e.populatePromise=null,e.failedPopulatePromise=r,t.rejectWith(e,[e,n])}),r},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";function i(e){
return 1===Number(e)||"true"===e}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(654),o=n.n(a),s=n(29),l=void 0;t.a=r},function(e,t,n){"use strict";var i=n(29),r=n(1519),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(173),r=n.n(i),a=n(7),o=n.n(a),s=n(36),l=n(202),c=n(17),u=n(65),d=c.a.extend({name:"AbstractStorageModel",
responseType:u.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(7),r=n.n(i),a=n(663),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"
;var i=n(363),r=new i.a({interface:["getLanguages","load","t"]});t.a=r},function(e,t,n){"use strict";function i(e,t,n){return n?r.a.xml:t&&t.get("identifier")===a.a?r.a.xml:Object(o.a)(e)}t.a=i;var r=n(65),a=n(41),o=n(97)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="livetv"},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(65),o=n(97),s=n(121),l=n(63),c=n(38),u=n(43),d=n(107),p=n(665),h=i.a.extend({name:"HubModel",
context:["server","provider","section","identifier","allowSync"],entityType:u.b,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(c.a)(this.entityType,e.key||e.hubKey||e.hubIdentifier,this.provider.entityID())},idAttribute:"hubIdentifier",rootPropertyName:"Hub",responseType:function(){return Object(o.a)(this.server)},url:function(){return this.get("key")||this.get("hubKey")},syncedAttrs:{key:r.a.string,hubKey:r.a.string,
hubIdentifier:r.a.string,source:r.a.string,title:r.a.string,summary:r.a.string,icon:r.a.string,thumb:r.a.string,attribution:r.a.string,type:r.a.string,subtype:r.a.string,style:r.a.string,size:r.a.integer,totalSize:r.a.integer,more:r.a.boolean,random:r.a.boolean,browse:r.a.boolean,upNext:r.a.boolean,context:r.a.string,promoted:r.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===a.a.xml?Object(s.b)(e):e},augmentResponse:function(e){var t=null==e.totalSize?void 0:l.a.parseInteger(e.totalSize),n=l.a.parseInteger(e.size)||0,i=e.key||e.hubKey;return e.Directory?e.directoryList={containerKey:i,Directory:e.Directory,size:n,totalSize:t
}:e.metadataList={containerKey:i,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(7),r=n.n(i),a=n(24),o=n(1588),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";function i(e,t){var n=t||e,i=n?n.match(r.c):null;return i?i[1]:n}var r=n(41);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return c})
;var i=n(7),r=n.n(i),a=n(24),o=n(57),s=n(655),l=n(306),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:l.a,getBestConnection:function(){
var e=o.a.get("allowHttpsMediaServerConnections"),t=!this.server||this.server.get("isCloudBased")||e,n=this.filter(function(e){return e.get("isConnected")&&(t||!e.get("isHttps"))});if(n.length)return 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")&&s.a.isValidV4Address(n)){var i=s.a.getV4Subnet(n);return e||(e=i),e!==i}})}});t.b=u},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return d}),
n.d(t,"f",function(){return p}),n.d(t,"d",function(){return h}),n.d(t,"e",function(){return f}),n.d(t,"h",function(){return v}),n.d(t,"g",function(){return g});var i=n(173),r=n.n(i),a=n(29),o=n(17),s=n(16),l=n(65),c="unknown",u="waiting",d="mapped",p="ok",h="connecting",f="disconnecting",v="unreachable",g="",m=o.a.extend({context:["server"],url:"/myplex/account",responseType:l.a.json,sessionAttrs:{remoteAccessState:s.a.oneOf(h,f,v,p,g)},syncedAttrs:{username:s.a.string,
mappingState:s.a.oneOf(c,u,"failed",d),mappingError:s.a.oneOf("badauth","unreachable","myplexgone","publisherror","doublenat","jumboframes",""),signInState:s.a.oneOf("none","unknown","invalid","ok"),publicAddress:s.a.string,publicPort:s.a.integer,privateAddress:s.a.string,privatePort:s.a.integer,subscriptionActive:s.a.boolean,subscriptionState:s.a.string},derivedAttrs:{signedIn:function(){return"ok"===this.get("signInState")},isWaiting:function(){var e=this.get("remoteAccessState")
;return e===h||e===f}},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;t||(a.a.warn("[Account] Failed to get reachable information for account - received "+r()(e)),t={});var n="ok"===t.signInState;n||(t.username=null);var i=!n||t.mappingError,o=!i&&t.mappingState===d
;return i?t.remoteAccessState=v:o&&(t.remoteAccessState=p),t}});t.i=m},function(e,t,n){"use strict";var i=n(363),r=new i.a({interface:["get","set","remove","clear"]});t.a=r},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(29),o=n(519),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(681)},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";var i=(n(1742),n(961),n(962),n(689));n.d(t,"a",function(){return i.a});var r=n(1743);n.d(t,"b",function(){return r.a});var a=(n(1744),n(1745),n(1746),n(1747),n(1748),n(1749),n(1750),n(1751),n(525),n(526),
n(1752),n(1753),n(318));n.d(t,"c",function(){return a.a});var o=(n(963),n(964),n(1754),n(965));n.d(t,"d",function(){return o.a});n(966),n(1755),n(1756),n(1757),n(690),n(1758),n(1759),n(1760),n(1761),n(1762),n(1763),n(1764),n(691),n(693),n(1765),n(1766),n(692),n(694),n(1767),n(1768),n(1769)},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(47)},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(47)},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(36),n(29)),o={},s=!1},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(977),a=i(r),o=n(1830),s=i(o),l=n(1831),c=i(l),u=n(1832),d=i(u),p=n(980),h=i(p),f=n(979);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(701),a=n(1826),o=n(1827),s="[object Null]",l="[object Undefined]",c=r?r.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return encodeURIComponent(e||"")}
e.exports=n},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(15),c=n(69),u=n(435),d=n(3),p=n(707),h=n(708),f=n(1910),v=n(1921),g=n(1923),m=n.n(g),y=a.a.Layout.extend({tagName:"li",className:"striped-list-item media-list-item",template:m.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 p.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(e.source)t="";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">'+s.a.escape(t)+"</span>":s.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(u.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 h.a({model:this.model,disabled:!0})),this.progress&&this.progress.show(new v.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(l.c)("appStore").dispatch(Object(c.k)({serverModel:this.model.server,metadataItemModel:this.model}))}},
onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),Object(l.c)("appStore").dispatch(Object(c.k)({serverModel:this.model.server,metadataItemModel:this.model}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),r()(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new f.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,t){
var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.get("playQueue"),r=i.get("currentIndex"),a=i.get("playQueueSelectedItemOffset"),o=n.isApplicationInitiated,s=void 0!==o&&o,l=n.isRestoringPlayQueue,c=void 0!==l&&l,u=Object(C.a)(e,t);if(u){var d=u.get("metadataItem"),p=Math.floor(Object(O.a)(e,d)/1e3),h=Math.floor((d.get("duration")||0)/1e3),f={isMediaLoading:!0,isBuffering:!1,isLyricsVisible:!1,positionSeconds:p,durationSeconds:h,metricsAutoPlay:s,hasError:!1,errorMessage:null,
errorCode:null,errorCategory:null,qualityIndex:null};c||i.get("type")===M.b||(f.isPaused=!1),e.set(f),i.set({playQueueSelectedItemID:u.id,playQueueSelectedItemOffset:a+(t-r)}),Object(D.a)()}}function r(e,t){var n=e.get("playQueue"),i=n.get("length"),r=n.get("currentIndex"),a=r+t;return n.get("repeat")?(a+i)%i:Math.min(Math.max(0,a),i-1)}function a(e,t){i(e,e.get("playQueue").get("currentIndex"),{isRestoringPlayQueue:t})}function o(e){e.restoreDefaults()}function s(e,t){i(e,r(e,1),{
isApplicationInitiated: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(D.a)()}function d(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.set({isPaused:!0}),Object(D.a)()}function p(e,t){e.set({lastSeekPositionSeconds:t}),Object(D.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(239),D=n(995),C=n(177),O=n(533)},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(29)},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";function i(e){return!e.isShared}function r(e){return!!e.desktop.isSettingsPopulated}function a(e,t){var n=e.diagnostics;return!(!t.features.find(function(e){
return e.uuid===h.h})||!n||-1===n.indexOf("streaminglogs"))}function o(e){return e.desktop.sessions.length>0}function s(e){return e.desktop.backgroundTranscodeJobs.length>0}function l(e){var t=e.desktop.cloudAccount;return t&&t.remoteAccessState}var c=n(2),u=n.n(c),d=n(0),p=(n.n(d),n(30)),h=n(81),f=n(3),v=n(1943),g=n(2111),m=n(2204),y=n(2244),b=n(2249),I=n(2250),S=n(2252),M=[{key:"status",title:function(){return Object(f.default)("Status")},isVisible:!0,metricsPage:p._3,metricsPanePrefix:"",
groups:[{key:"now-playing",title:function(){return Object(f.default)("Now Playing")},isVisible:i,metricsPage:p.L,createStatusIndicator:function(e){return u()(b.a,{isActive:o(e)})}},{key:"alerts",title:function(){return Object(f.default)("Alerts")},isVisible:i},{key:"sync",title:function(){return Object(f.default)("Sync")},isVisible:!0},{key:"conversion",title:function(){return Object(f.default)("Conversions")},isVisible:i,createStatusIndicator:function(e){return u()(b.a,{isActive:s(e)})}}]},{
key:"settings",title:function(){return Object(f.default)("Settings")},isVisible:i,metricsPage:p.X,metricsPanePrefix:"server:",groups:[{key:"general",title:function(){return Object(f.default)("General")},isVisible:r,createStatusIndicator:function(e){return u()(S.a,{isClaimed:!!e.isClaimed})}},{key:"remoteAccess",title:function(){return Object(f.default)("Remote Access")},isVisible:function(e){return!e.isPersonalCloudServer&&r(e)},createStatusIndicator:function(e){return u()(I.a,{
remoteAccessState:l(e)})}},{key:"agents",title:function(){return Object(f.default)("Agents")},isVisible:r},{key:"library",title:function(){return Object(f.default)("Library")}},{key:"channels",title:function(){return Object(f.default)("Plugins")},isVisible:r},{key:"network",title:function(){return Object(f.default)("Network")}},{key:"transcoder",title:function(){return Object(f.default)("Transcoder")}},{key:"languages",title:function(){return Object(f.default)("Languages")},isVisible:r},{
key:"dlna",title:function(){return Object(f.default)("DLNA")}},{key:"butler",title:function(){return Object(f.default)("Scheduled Tasks")}},{key:"extras",title:function(){return Object(f.default)("Extras")}}]},{key:"manage",title:function(){return Object(f.default)("Manage")},isVisible:i,groups:[{key:"libraries",title:function(){return Object(f.default)("Libraries")},isVisible:!0,metricsPage:p.X,metricsPane:"server:libraries",paneComponent:g.a},{key:"versions",title:function(){
return Object(f.default)("Optimized Versions")},isVisible:function(e){return!e.isPersonalCloudServer&&r(e)},metricsPage:p._3,metricsPane:"versions"},{key:"dvr",title:function(){return Object(f.default)("Live TV & DVR")},isVisible:function(e){return e.livetv>=1&&r(e)},metricsPage:p.X,metricsPane:"server:dvr",paneComponent:v.a},{key:"help",title:function(){return Object(f.default)("Troubleshooting")},isVisible:r,metricsPage:p.X,metricsPane:"server:help",paneComponent:y.a},{key:"console",
title:function(){return Object(f.default)("Console")},isVisible:a,metricsPage:p.X,metricsPane:"server:console",pageComponent:m.a}]}];t.a=M},function(e,t,n){"use strict";var i=n(6),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(122),v=n.n(f),g=(n(451),function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onCloseTimeout=function(){r._closeTimeoutID=null,r.setState({shouldPreventPortalClose:!1},function(){
r.props.onClose&&r.props.onClose()})},r.onInteractionEvent=function(e){r.props.allowInteractionEventBubbling||e.stopPropagation()},r.state={isOpen:n.isOpen,shouldPreventPortalClose:!1},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){return e.isOpen===t.isOpen?null:{isOpen:e.isOpen,shouldPreventPortalClose:e.closeTimeout&&!e.isOpen&&t.isOpen}},t.prototype.componentDidMount=function(){this.props.onOpen&&this.props.isOpen&&this.props.onOpen()},
t.prototype.componentDidUpdate=function(e,t){!this.state.shouldPreventPortalClose&&t.shouldPreventPortalClose&&(this._closeTimeoutID=clearTimeout(this._closeTimeoutID)),this.state.shouldPreventPortalClose&&!t.shouldPreventPortalClose&&(this._closeTimeoutID=setTimeout(this.onCloseTimeout,this.props.closeTimeout)),this.props.onOpen&&this.props.isOpen&&!e.isOpen&&this.props.onOpen()},t.prototype.componentWillUnmount=function(){this._closeTimeoutID&&clearTimeout(this._closeTimeoutID)},
t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,i=e.children,r=e.forwardedRef,a=this.state,o=a.isOpen,s=a.shouldPreventPortalClose;return o||s?v.a.createPortal(h.a.createElement("div",{className:t,style:n,ref:r,onTouchStart:this.onInteractionEvent,onTouchMove:this.onInteractionEvent,onTouchEnd:this.onInteractionEvent,onTouchCancel:this.onInteractionEvent,onMouseDown:this.onInteractionEvent,onMouseUp:this.onInteractionEvent,onMouseLeave:this.onInteractionEvent,
onClick:this.onInteractionEvent,onFocus:this.onInteractionEvent,onBlur:this.onInteractionEvent},i),document.body):null},t}(p.Component));g.defaultProps={isOpen:!0,closeTimeout:0,allowInteractionEventBubbling:!1},t.a=h.a.forwardRef(function(e,t){return h.a.createElement(g,r()({},e,{forwardedRef:t}))})},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={},P=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,P(new C(null,null,1,u),d,"easeOut",!0),P(new C(null,null,2,u),d,"easeIn"+(0===u?",easeNone":"")),P(new C(null,null,3,u),d,"easeInOut");O.linear=v.easing.Linear.easeIn,O.swing=v.easing.Quad.easeInOut;var j=M("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});d=j.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 T=n.requestAnimationFrame,w=n.cancelAnimationFrame,E=Date.now||function(){return(new Date).getTime()},x=E();for(c=["ms","moz","webkit","o"],u=c.length;--u>-1&&!T;)T=n[c[u]+"RequestAnimationFrame"],w=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||!T)&&"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")};j.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&&w?w(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&&T?T: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 A=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=A.ticker=new v.Ticker,d=A.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 N=function(){h&&E()-x>2e3&&"hidden"!==s.visibilityState&&p.wake();var e=setTimeout(N,2e3)
;e.unref&&e.unref()};N(),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){A.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});d=L.prototype=new A,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(A.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||!(!G[n]||G[n]&&G[n]._autoCSS)||(i[n]=e[n],delete e[n]);e.css=i};d=k.prototype=new A,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,F=/[\+-]=-?[\.\d]/,V=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},H=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=V,
F.test(t)&&(d.end=0),d},Q=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=H(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:H},G=k._plugins={},W=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=A._rootFramesTimeline=new L,J=A._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),A._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 W){for(t=W[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);0===t.length&&delete W[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",A._updateRoot);var te=function(e,t,n){var i,r,a=e._gsTweenID;if(W[a||(e._gsTweenID=a="t"+K++)]||(W[a]={target:e,tweens:[]}),
t&&(i=W[a].tweens,i[r=i.length]=t,n))for(;--r>-1;)i[r]===t&&i.splice(r,1);return W[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&&G.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(G[o]&&(c=new G[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]=Q.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?{}:[],A.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 A.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=Q,d.setRatio=V,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&&(G[(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(218))},function(e,t,n){
"use strict";var i=n(6),r=n.n(i),a=n(12),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(380),y=n(27),b=n(15),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(b.c)("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(m.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){return e.get("ui").get("dvrSettingsUI")}function r(e,t,n){
var i=Object(g.i)(e,t),r=c.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(13),s=n.n(o),l=n(39),c=n(19),u=n(110),d=n(109),p=n(263),h=n(3),f=n(1011),v=n(542),g=n(116),m=Object(l.a)("ui/dvrSettings/initDVRSettingsUI"),y=Object(l.a)("ui/dvrSettings/clearDVRSettingsUI"),b=Object(l.a)("ui/dvrSettings/fetchDVRs"),I=Object(l.a)("ui/dvrSettings/removeDVR"),S=Object(l.a)("ui/dvrSettings/reloadGuide"),M=Object(l.a)("ui/dvrSettings/cancelReloadGuide"),D=Object(u.a)((a={},a["ui/dvrSettings/fetchDVRs"]=Object(d.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(g.i)(e,t),l=s.get("machineIdentifier"),c={isUIPopulated:!0};o&&o.server.get("machineIdentifier")===l||(c.dvrs=new f.a([],{server:s})),a&&a.server.get("machineIdentifier")===l?a.restoreDefaults():c.dvrSetup=new v.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(p.c)(Object(h.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";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";n.d(t,"b",function(){return v});var i=n(17),r=n(16),a=n(308),o=n(713),s=n(327),l=n(1014),c=n(1992),u=n(1012),d=n(1994),p=n(2001),h=n(714),f=n(1013),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:p.a},epgSettings:{relationClass:d.a},channelMappings:{relationClass:f.a},selectedDVR:{relationClass:u.a,deferred:!0},selectedDevice:{relationClass:s.a,deferred:!0},selectedLanguage:{relationClass:h.a,deferred:!0},setupErrorMessages:{relationClass:c.a},scanPrefs:{relationClass:a.a,deferred:!0
},scanNetworks:{relationClass:l.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";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(39),r=n(111),a=Object(i.a)(r.Z),o=Object(i.a)(r.k),s=Object(i.a)(r.l),l=Object(i.a)(r._2),c=Object(i.a)(r._3),u=Object(i.a)(r._4),d=Object(i.a)(r._9),p=Object(i.a)(r.m)},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(182)),c=n(2025),u=n.n(c),d=n(2026),p=n.n(d),h=n(2027),f=n.n(h),v=n(2028),g=n.n(v),m=n(2029),y=n.n(m);i.defaultProps={className:y.a.image},t.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()(g.a,{},void 0,n),p.a.createElement(h.a,a()({hasError:o,checkboxText:s()("span",{},void 0,i,o&&d&&" \u2014 "+d)},u)),r&&s()(v.a,{},void 0,r))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(330),f=n(206),v=n(384),g=n(142),m=n(165);i.defaultProps={showErrors:!1,errors:[]},t.a=Object(m.a)(i)},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,m=c()(e,["formGroupClassName","formLabelClassName","name","labelText","helpText","showErrors","errors","children"]);return s()(h.a,{className:t},void 0,d,s()(v.a,{className:n,showErrors:l,errors:u,name:i,
labelText:r}),p.a.createElement(g.a,a()({name:i,hasError:l},m)),o&&s()(f.a,{},void 0,o))}t.a=i;var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(206),f=n(384),v=n(457),g=n(192),m=n(165);i.defaultProps={errors:[]},t.b=Object(m.a)(i)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e){return e.ui.dvrSettingsUI},function(e,t){return t.dvrID},function(e,t){var n=e.dvrs;return o.a.find(n,{key:t})})}var r=n(5),a=(n.n(r),
n(7)),o=n.n(a);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(5),o=(n.n(a),n(34)),s=n(549)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.libraries});t.a=a},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(24),o=n(508),s=n(2117),l=a.a.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],model:s.a,cache:new o.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(7),n(362))}(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";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}function r(e){var t=Object(a.a)(e),n=t.isServer,i=t.serverIdentifier,r=t.providerIdentifier;return(n?"/server/"+i:"")+"/provider/"+r}t.a=i,t.b=r;var a=n(928)},function(e,t,n){"use strict";function i(e){
return Object(s.createSelector)(Object(d.a)(),function(t){return c.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),n(7)),c=n.n(l),u=n(164),d=n(328)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.iconComponent,i=e.iconClassName,r=e.activeClassName,o=e.disabledClassName,l=e.icon,u=e.isDisabled,d=e.isActive,f=e.label,v=e.labelClassName,g=e.title,m=e.ariaLabel,y=e.children,b=c()(e,["className","iconComponent","iconClassName","activeClassName","disabledClassName","icon","isDisabled","isActive","label","labelClassName","title","ariaLabel","children"]),I=m||g;return p.a.createElement(h.a,a()({className:(t||"")+" "+(u&&o||"")+" "+(d&&r||""||""),isDisabled:u,"aria-label":I,
title:g},b),s()(n,{className:i,name:l}),f&&s()("span",{className:v},void 0,f),y)}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=(n(36),n(20)),f=n(2195),v=n.n(f);i.defaultProps={className:v.a.button,activeClassName:v.a.isActive,disabledClassName:v.a.isDisabled,labelClassName:v.a.label,isDisabled:!1},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.className,n=c()(e,["className"]);return s()("div",{className:t
},void 0,p.a.createElement(h.a,a()({},n,{background:!0})))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(182),f=n(2280),v=n.n(f);i.defaultProps={className:v.a.avatar},t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(368),o=n(697),s=n(2310),l=n(2312),c=n(85),u=n(2314),d=n(2316),p=n(2322),h=n(2324),f=n(2326),v=n.n(f),g=c.a.extend({mixins:[a.a],name:"convertModal",className:"convert-modal modal fade",template:v.a,regions:{
bodyRegion:".modal-body-region"},initialize:function(e){c.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 o.a([],t),this.targets=new l.a([],t),this.profiles=new s.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=r.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 d.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 h.a({server:this.server})),this.listenForStateRequests())}},error:{onEnter:function(e){this.bodyRegion.show(new u.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(){c.a.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.a=g},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
}(u.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(27)),f=n(3),v=n(25),g=n(2352),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(h.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.isConnected,i=e.isUnavailable,a=e.isSecure
;return e.isRelayed?r()(v.a,{className:(t||"")+" "+(m.a.warningIcon||""),name:"plex-icon-alert-round-560","aria-label":Object(f.default)("Indirect")}):i?r()(v.a,{className:(t||"")+" "+(m.a.alertIcon||""),name:"plex-icon-alert-560","aria-label":Object(f.default)("Unavailable")}):a&&n?r()(v.a,{className:(t||"")+" "+(m.a.secureIcon||""),name:"plex-icon-lock-560","aria-label":Object(f.default)("Secure")}):null},t}(p.Component);t.a=y},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(6),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(166);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";var i=n(2),r=n.n(i),a=n(12),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(20),m=n(25),y=n(2373),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(5),r=(n.n(i),n(154)),a=Object(i.createSelector)(r.a,function(e){return e.desktop});t.a=a},function(e,t,n){"use strict";function i(e){
var t=e.machineIdentifier,n=e.showChannels,i=e.cloudProviderEntityIDs;if(!n&&!i.length)return null;var r=encodeURIComponent(t);return a()(l.a,{title:Object(c.default)("Online Content")},void 0,n&&t&&a()(u.a,{to:"#!/server/"+r+"/channels",icon:"plex-icon-channels-560",title:Object(c.default)("Plugins"),"data-qa-id":"sidebarPlugins"},"channels"),i.map(function(e){return a()(d.a,{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(747)),c=n(3),u=n(194),d=n(2385)
;i.defaultProps={showChannels:!0},t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=e.key,o=e.types,s=void 0===o?{}:o,l=t.protocols.includes(r.a),c=i===a.a;if(l)return c;if(c)return!1;var u="com.plexapp.agents.none"===n.agent;if(i===a.i&&!u||i===a.c&&u)return!1;var d=s.type,p=s.subtype;return n.type===d&&(null==p&&null==n.subtype||null!=p&&n.subtype===p)}var r=n(511),a=n(195);t.a=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";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(3));t.a=i},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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(3),v=n(1109),g=n(2591),m=n.n(g);i.defaultProps={className:m.a.recordButton},t.a=i},function(e,t,n){"use strict"
;n.d(t,"b",function(){return o});var i=n(17),r=n(16),a=n(92),o={INACTIVE:"inactive",SCHEDULED:"scheduled",IN_PROGRESS:"inprogress",COMPLETE:"complete",CANCELLED:"cancelled",ERROR:"error",POST_PROCESSING:"postprocessing"},s=i.a.extend({name:"MediaGrabOperationModel",context:["server","provider"],rootPropertyName:"MediaGrabOperation",syncedAttrs:{mediaSubscriptionID:r.a.string,provider:r.a.string,identifier:r.a.string,mediaIndex:r.a.integer,channelTitle:r.a.string,status:r.a.string,
error:r.a.string,linkedKey:r.a.string,key:r.a.string,rolling:r.a.boolean},sessionAttrs:{isLibraryMetadataItemPending:r.a.boolean,isLibraryMetadataItemPopulated:r.a.boolean,libraryMetadataItemError:r.a.object},syncedRelations:{metadataItem:{relationClass:a.a,rootPropertyName:"Metadata"},conflicts:function(){return{relationClass:n(768).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";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&&e.metadataItem)return t[e.metadataItem]})}var r=n(5),a=(n.n(r),n(115)),o=n(128);t.a=i},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(1077)},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,t){var n=t.innerViewportWidth,i=t.innerHorizontalPadding,r=void 0===i?0:i;return Math.floor((n+r)/e)-r}function r(e){
var t=e.innerViewportWidth,n=e.innerHorizontalPadding,r=void 0===n?0:n,a=e.preferredCellWidth,o=e.minCellWidth,s=e.minColumns,l=void 0===s?1:s,c=e.maxColumns,u=void 0===c?1/0:c,d=e.columnAdjustment,p=void 0===d?0:d,h=Math.round((t+r)/(a+r));h+=p,h=Math.max(Math.min(h,u),l);var f=i(h,e);return f<o&&(f=h===l?o:i(h-1,e)),f}t.a=r},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(48),a=n.n(r)
},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(5),a=(n.n(r),n(574)),o=n(776)},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(5),a=(n.n(r),n(212))},function(e,t,n){
"use strict";function i(){return Object(r.createSelector)(Object(a.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(5),a=(n.n(r),n(22)),o=n(55),s=n(408),l=n(402);t.a=Object(o.a)(i)(l.a)},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(375));t.a=i
},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),o=n.n(a),s=n(17),l=n(16),c=n(311),u=n(432),d=n(65),p=n(121),h=n(38),f=n(43),v=n(768),g=n(308),m=n(2786),y=s.a.extend({name:"MediaSubscriptionModel",context:["server"],entityType:f.e,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(h.a)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"key",rootPropertyName:"MediaSubscription",urlRoot:"/media/subscriptions",
mergeStrategy:u.a,syncedAttrs:{key:l.a.string,type:l.a.integer,provider:l.a.string,targetLibrarySectionID:{type:l.a.string,save:!0},targetSectionLocationID:{type:l.a.string,save:!0},title:l.a.string,selected:l.a.boolean,parameters:l.a.string},syncedRelations:{target:{relationClass:m.a,rootPropertyName:"Metadata",deferred:!0},grabOperations:{relationClass:v.default,rootPropertyName:"MediaGrabOperation",deferred:!0},prefs:{relationClass:g.a,rootPropertyName:"Setting",deferred:!0,save:!0},
timeline:{relationClass:c.default,rootPropertyName:"Timeline",deferred:!0}},augmentResponseText:function(e,t){return t===d.a.xml?Object(p.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=s.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";function i(e){switch(e){case"movie":case"show":return[g.a]
;case"episode":return[v.a,m.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,v=r.thumb,g=r.grandparentThumb,m="playlist"===c?"show":c;return l()("div",{className:S.a.container},void 0,l()("div",{className:S.a.left},void 0,l()(h.a,{serverEntityID:t,providerEntityID:n,component:f.a,type:m,width:M,height:Object(y.d)(M,m,u),url:g||v},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(6),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(478),h=n(279),f=n(247),v=n(796),g=n(469),m=n(789),y=n(126),b=n(2797),I=n(2799),S=n.n(I),M=130;r.defaultProps={useStaticHeight:!1},t.a=r},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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(188),c=n(2883),u=n.n(c);t.a=i},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(162),d=i(u),p=n(347),h=i(p),f=n(480),v=i(f),g=n(1191),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(582),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(2902),a=n(2906);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(800);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(2919);e.exports=i},function(e,t,n){function i(e){return a(e)&&r(e)}var r=n(806),a=n(448);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){}
Object.defineProperty(t,"__esModule",{value:!0}),t.default=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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(3001),c=n(1030),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(27)),f=(n(32),n(3019)),v=(n(93),n(812)),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.allowHomeHubIndicator,i=t.allowPersistentHomeHubStatus,a=t.allowToggleHomeHub,o=t.className,s=t.serverEntityID,l=t.providerEntityID,c=t.directoryKey,u=t.hubEntityIDs,d=t.sourceDirectory,p=t.isPromoted,h=t.columnAdjustment,y=t.listContext,b=this.state.isReady,I=p?f.a:v.a;return r()("div",{className:o,style:b?m:g
},void 0,u.map(function(t){return r()(I,{serverEntityID:s,providerEntityID:l,hubEntityID:t,sourceDirectory:d,directoryKey:c,allowHomeHubIndicator:n,allowPersistentHomeHubStatus:i,allowToggleHomeHub:a,listContext:y,columnAdjustment:h,onListReady:e.onListReady},t)}))},t}(p.Component);t.a=y},function(e,t,n){"use strict";function i(e,t,n,i){var r=i.key,a=i.typeKey,u=i.title,p=i.type,h=i.subtype,f=i.content,v=i.context,g=Object(l.a)(t,n);if(g){var m=Object(c.a)(g.key,e,t),y=n.hubKey||n.key
;return d[r]?d[r](e,t,m,o()({source:y},i)):/\/library\/sections\/(\d+)\/cluster/.test(r)?s.join([m,"timeline"],{source:y,key:r}):/\/watchnow$/.test(r)?s.join([m,"guide"],{source:y}):f?s.join(m,{source:y,key:r,typeKey:a,content:1,context:v}):s.join(m,{source:y,key:r,type:p,subtype:h,title:u,context:v})}}n.d(t,"b",function(){return u}),t.a=i;var r,a=n(6),o=n.n(a),s=n(19),l=n(591),c=n(484),u={RECORDING_SCHEDULE:"view://dvr/recording-schedule"},d=(r={},r[u.RECORDING_SCHEDULE]=function(e,t,n,i){
return s.join([n,"schedule"],{source:i.source})},r)},function(e,t,n){"use strict";function i(e,t){for(var n=Object(r.m)(),i=0,o=n.length;i<o;i++){var s=n[i];if(Object(a.a)(s,e,t))return s}}t.a=i;var r=n(195),a=n(563)},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(5),a=(n.n(r),n(3026))},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){
return t.providerEntityID},d.a,Object(u.a)(),function(e,t){return!!t[(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).providerEntityID||e]})}function r(){return Object(c.createSelector)(function(e,t){return t.listContext},function(e,t){return t.cellWidth},Object(u.a)(),Object(m.a)(),Object(g.a)(),Object(v.a)(),Object(f.a)(),y.a,i(),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=Object(b.a)(t,null,i,r,n,e);return{itemServerEntityID:n.serverEntityID,itemProviderEntityID:n.providerEntityID,isFeaturedHub:Object(p.a)(e),metadataKey:n.key,type:i,selectionType:a,activeSelectionType:s.activeSelectionType,isSelected:o,icon:n.icon,imageWidth:c.width,imageHeight:c.height,imageUrl:c.url,isFolder:n.isFolder,isUnavailable:!l}})}
function a(e,t){var n=t.metadataListEntityID;return{onSelectItem:function(t){e(Object(h.j)(s()({metadataListEntityID:n},t)))},onDeselectItem:function(t){e(Object(h.b)(s()({metadataListEntityID:n},t)))}}}var o=n(6),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(22)),d=n(132),p=n(1222),h=n(135),f=n(594),v=n(597),g=n(1227),m=n(598),y=n(74),b=n(232),I=n(3034);t.a=Object(l.b)(r,a)(I.a)},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(5),a=(n.n(r),n(22)),o=n(595),s=n(596)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(7)),a=n.n(r),o=n(74),s=void 0,l=Object(i.createSelector)(o.a,function(e){var t=a.a.pluck(e.activeSelectionItems,"id");return s&&a.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(){return Object(r.createSelector)(function(e,t){return t.listType},Object(a.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type;if(n){if(n===o.i)return o.i;if(n===o.d)return o.d;if(e===s.g)return o.g;var i=o.p(n);return i&&i.mediaType}})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(26),s=n(197)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.listType
},Object(a.a)(),function(e,t){if(!t)return e;var n=e===s.g&&t.type===o.c,i=e===s.b&&t.type===o.f;return n||i?e:t.extraType?s.d:t.type})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(26),s=n(197)},function(e,t,n){"use strict";function i(e){var t=e.imageWidth,n=e.imageHeight,i=e.isSelected,r={width:t,height:n};return a()("div",{className:(c.a.placeholder||"")+" "+(i&&c.a.isSelected||""||""),style:r})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3035)),c=n.n(l);t.a=i},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(3047)),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){return s.a.createElement(c.a,a()({},e,{separatorComponent:l.b}))}
var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(72),c=n(3051);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(c.a,l.a,Object(o.a)(),Object(s.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(5),o=(n.n(a),n(22)),s=n(486),l=n(37),c=n(50),u=n(3074);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(823)),a=n(742),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(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(114),b=n(27),I=n(25),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(b.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(y.a,r()({"aria-haspopup":!0,"data-qa-id":"toolbarMore",tooltip:a?void 0:i,hideOnPress:!1},s),o()(I.a,{name:n}),t)},t}(g.Component);t.a=S},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(y.a)(),I.a,b.a,S.a,Object(E.a)(),Object(T.a)(),Object(O.a)(),Object(j.a)(),Object(P.a)(),Object(x.a)(),function(e){
return e.ui.audioVideoPlayer.isPaused},w.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(N.j)(t,n,i,e),showEdit:Object(N.e)(t,n,i,e),showSelect:Object(N.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(m.m)({serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,metricsPage:l,options:{containerKey:o,listType:s}}))},onEditPress:function(){e(Object(D.editMetadataItem)({serverEntityID:n,
providerEntityID:i,metadataItemEntityID:a,metricsPage:l}))},onSelectItem:function(t){e(Object(C.j)(p()({metadataListEntityID:r,id:a},t)))},onDeselectItem:function(t){e(Object(C.b)(p()({metadataListEntityID:r},t)))},onDeselectAllItems:function(){e(Object(C.a)({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(6),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(5),m=(n.n(g),
n(69)),y=n(22),b=n(37),I=n(50),S=n(185),M=n(55),D=n(167),C=n(135),O=n(408),P=n(594),j=n(597),T=n(598),w=n(74),E=n(1266),x=n(833),A=n(479),N=n(278),L=n(339),k=n(3259),_=n(3265),R=Object(A.a)(k.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(k.a,this.props):v.a.createElement(_.a,this.props)},t}(f.Component);t.a=Object(M.a)(i,r,L.a)(z)},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(3271)),c=n.n(l);i.defaultProps={className:c.a.pageHeaderDivider},t.a=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(5),o=(n.n(a),n(211)),s=n(3336);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(f.createSelector)(Object(g.a)(),function(e){return{isRefreshing:!!e}})}function r(e,t){
var n=t.serverEntityID;return{dispatchFetchProviders:function(){e(Object(v.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(5),v=(n.n(f),n(100)),g=n(211),m=n(131),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";function i(e){var t=e.className,n=s()(e,["className"]);return u.a.createElement(d.b,a()({className:t},n))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(72),p=n(3361),h=n.n(p);i.defaultProps={className:h.a.pageHeaderSeparator},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(5),a=(n.n(r),n(840)),o=n(199)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.activeSort},Object(s.a)(),function(e,t){if(t){var n=e&&o.a.first(e.split(":")),i=o.a.find(t.sorts,function(t){return e?t.key===n||t.descKey===e:t.isDefault});return i||(i=o.a.first(t.sorts)),i}})}t.a=i;var r=n(5),a=(n.n(r),
n(7)),o=n.n(a),s=n(234)},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(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(u.a)(n,i,r,{save:1})}),f&&m&&h.push({key:"albums",title:Object(o.default)("Albums"),route:Object(c.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(7),a=n.n(r),o=n(3),s=n(58),l=n(133),c=n(750),u=n(1051)},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(3442)},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(3472)),c=n.n(l);i.defaultProps={className:c.a.actionLinks},t.a=i},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(d.a)("isProvidersPopulated"),Object(d.a)("providersError"),Object(u.a)(),function(e,t,n){return n?{hasProvider:!0,showSpinner:!n.isPopulated&&!n.error,showError:!!n.error}:{hasProvider:!1,showSpinner:!e&&!t,showError:!!t}})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(51)),d=n(338),p=n(3480),h=Object(l.b)(i)(p.a)
;h.propTypes=a()({},h.propTypes,{providerEntityID:s.a.string.isRequired}),t.a=h},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(54),p=n(184),h=n(1320),f=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({key:r.a.string.isRequired,
serverEntityID:r.a.string.isRequired,providerEntityID:r.a.string,directoryKey:r.a.string,directoryHubKey:r.a.string,title:r.a.string,detail:r.a.string,isUnknownUnavailableServer:r.a.bool,isUnavailable:r.a.bool,isOutOfDate:r.a.bool,isLocal:r.a.bool,route:r.a.string})},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(a.a,Object(o.a)(),function(e,t){return e[t.server]})}t.a=i;var r=n(5),a=(n.n(r),n(163)),o=n(423)},function(e,t,n){"use strict";function i(e){
return a()("div",{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(3561)),c=n.n(l);i.defaultProps={className:c.a.badge},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.url,n=e.title,i=e.messages,r=e.children,o=e.contentClassName,l=c()(e,["url","title","messages","children","contentClassName"]);return p.a.createElement(f.a,a()({autoScroll:!0,compactScroller:!0},l),s()(h.a,{url:t}),s()("div",{className:o},void 0,n?s()("h1",{
className:g.a.title},void 0,n):null,i?i.map(function(e,t){return s()("p",{className:g.a.message},t,e)}):null,r))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3562),f=n(140),v=n(3564),g=n.n(v);i.defaultProps={contentClassName:g.a.content,innerClassName:g.a.innerPageContent},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],l=o?a.a.uniq(o.split(u.b)):"";return 1===l.length&&(l=l[0]),Object(s.a)(e,i,{value:l,type:v[i]?c.a:c.b,operator:r})},[]):[]}t.a=i;var r=n(7),a=n.n(r),o=n(205),s=n(3575),l=n(417),c=n(285),u=n(1277),d=l.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.experienceSettings.showPrePlayArtwork}t.a=i},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=e.type,n=e.subtype,i=e.skipChildren;if(t===s.d)return n;if(t===s.k&&n===o.b)return s.l;var r=i?s.p(t):s.o(t);return r&&r.typeString})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(98),s=n(26)},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(129)),l=n(3717),c=n.n(l);t.a=i},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(129)),l=n(3718),c=n.n(l);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=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){var i=n(1456);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){var i=n(300)
;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={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},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(640)("keys"),r=n(502);e.exports=function(e){return i[e]||(i[e]=r(e))}},function(e,t,n){var i=n(201),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(1460),r=n(1461);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,n){"use strict";var i=n(1474)(!0);n(899)(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){e.exports=!0},function(e,t,n){
var i=n(299),r=n(1476),a=n(641),o=n(639)("IE_PROTO"),s=function(){},l=function(){var e,t=n(892)("iframe"),i=a.length;for(t.style.display="none",n(1477).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(298).f,r=n(302),a=n(219)("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(219)},function(e,t,n){var i=n(201),r=n(106),a=n(646),o=n(649),s=n(298).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";var i=n(7),r=n.n(i),a=n(75),o=n(29),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(7),r=n.n(i),a=n(75),o=n(90),s=n(29),l=n(94),c=a.a.extend({mixins:[l.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.allowMultipleConnections=e.allowMultipleConnections,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.allowMultipleConnections?this.listenTo(this.servers,{"change:isResolved":this.onServerResolvedChange,"change:isRejected":this.onServerRejectedChange,remove:this.onServerRemove,reset:this.onServersReset}):this.listenTo(this.appModel,"change:primaryServer",this.onPrimaryServerChange)},stop:function(){this.stopListening(),this._serverRetryManager.stopAll(),this.disconnectAll(),this.connections={}},tryConnectServer:function(e){var t=this.connections[e.id]
;this.isValidServer(e)&&!t&&(o.a.hasWebSocket||this.supportsLongPolling?this.connect({server:e}):e.trigger("socket:websocket",{error:!0}))},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(s.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(s.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})},onPrimaryServerChange:function(e,t){this.disconnectAll(),t&&this.tryConnectServer(t)},onServerResolvedChange:function(e,t){t&&this.tryConnectServer(e)},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})})},onOpen:function(e){var t=this.connections[e.id],n=t.socket?t.socket.url:t.pollUrl;s.a.info("["+this.name+"] Opened server event connection to "+e.get("debugName")+" at "+n),this._serverRetryManager.stop(e)},onClose:function(e){s.a.warn("["+this.name+"] Unexpectedly closed server event connection to "+e.get("debugName")),this._serverRetryManager.start(e)}});t.a=c},function(e,t,n){"use strict"
;function i(e){return e?Array.isArray(e)?e:[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(7),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,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(29)},function(e,t,n){"use strict";function i(e,t){if(o.a.get("shouldCreateFlexModels")||o.a.get("shouldCreateFlex"+e.prototype.name)){var n;e.prototype.sessionRelations=a()({},e.prototype.sessionRelations,(n={},n.desktop=t,n))}return e}t.a=i;var r=n(6),a=n.n(r),o=n(57)},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(36),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"
;var i=n(17),r=n(16),a=n(919),o=n(660),s=n(1545),l=n(661),c=i.a.extend({name:"UserSubscriptionModel",syncedAttrs:{type:r.a.oneOf.apply(r.a,l.c),active:r.a.boolean,status:r.a.oneOf.apply(r.a,s.a),state:r.a.oneOf.apply(r.a,o.b),plan:r.a.oneOf.apply(r.a,a.b),mode:r.a.string}});t.a=c},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="active",r=[i,"inactive","canceled"];t.b=r},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r})
;var i="plexpass",r="tidal",a=[i,r];t.c=a},function(e,t,n){"use strict";function i(e){return e&&e.statusText||""}function r(e){var t=c.a.Deferred();return Object(h.a)({url:Object(p.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&&!u.a.isHostedHttps
;return e.headers=s()({},d.a.getInstance(),e.headers||{}),n?r(e):c.a.ajax(e)}var o=n(6),s=n.n(o),l=n(13),c=n.n(l),u=n(90),d=n(430),p=n(924),h=n(1556),f="service-reflector";t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(75),o=n(18),s=n(29),l=n(94),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(7),r=n.n(i),a=n(160),o=n(91),s=a.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:o.a.parseXML(e);return t.User&&(t=t.User),o.a.parseInteger(t,"id"),
o.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 a.a.prototype.getSaveParams.apply(this,arguments)}});t.a=s},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(310),o=n(97),s=n(38),l=n(43),c=n(1578),u=i.a.extend({
mixins:[a.a],name:"MetadataDirectoryListModel",context:["server","provider"],entityType:l.h,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(s.a)(this.entityType,e.containerKey||this.cid,this.provider.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",responseType:function(){return Object(o.a)(this.server)},url:function(){return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:r.a.string,
containerTitle:r.a.string,currentPageStart:r.a.integer,currentPageSize:r.a.integer,populatedRange:r.a.object,isPending:r.a.boolean,isPopulated:r.a.boolean,error:r.a.object},syncedAttrs:{totalSize:r.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){return e=parseInt(e,10),a.a.isNaN(e)?"":(e<10?"0":"")+e}var r=n(7),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(513),o=i.a.extend({name:"FilterModel",context:["server","section","type","standalone"],idAttribute:"filter",rootPropertyName:"Directory",defaults:{advanced:!1},syncedAttrs:{filter:r.a.string,filterType:r.a.string,type:r.a.string,key:r.a.string,title:r.a.string,
advanced:r.a.boolean},syncedRelations:{options:{relationClass:a.a}}});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(24),o=n(97),s=n(931),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";var i=n(17),r=n(16),a=n(310),o=n(65),s=n(121),l=n(1595),c=i.a.extend({mixins:[a.a],name:"PlaylistItemListModel",context:["server","provider","playlist"],idAttribute:"key",collectionName:"metadataItems",url:function(){
return this.getPaginatedUrl(this.get("containerKey"))},sessionAttrs:{containerKey:r.a.string,currentPageStart:r.a.integer,currentPageSize:r.a.integer,populatedRange:r.a.object},syncedAttrs:{totalSize:r.a.integer},syncedRelations:{metadataItems:{relationClass:l.a,rootPropertyName:"Metadata",setOptions:function(e){return{remove:e.remove,at:e.at}}}},defaults:function(){return{populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},
augmentResponseText:function(e,t){return t===o.a.xml?Object(s.b)(e):e}});t.a=c},function(e,t,n){"use strict";var i=n(24),r=n(97),a=n(437),o=i.a.extend({name:"SectionCollection",context:["server"],model:a.a,url:"/library/sections",responseType:function(){return Object(r.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(41),r=n(3),a=n(238),o=n(60),s=n(315),l=s.a.extend({name:"LegacyChannelProviderModel",defaults:function(){return{identifier:i.a,title:Object(r.default)("Channel"),
types:["video","audio","photo"],protocols:["stream"],features:[{type:o.b.ACTIONS,actions:[{id:a.b.SCROBBLE,key:"/:/scrobble",reverseKey:"/:/unscrobble"}]},{type:o.b.TIMELINE,key:"/:/timeline"}]}}});t.a=l},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(7),a=n.n(r);t.a=i},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(675),s=n(676).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(941).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";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(85),l=s.a.extend({className:"select-modal modal modal-sm fade",events:o.a.extend({"click a":"onClick"},s.a.prototype.events),initialize:function(){
s.a.prototype.initialize.apply(this,arguments),this.promise=r.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(r()(e.currentTarget).data("value")),this.hide()}});t.a=l},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(15),r=n(85),a=n(1656),o=n.n(a),s=r.a.extend({name:"plexPassModal",template:o.a,serializeData:function(){return{plexPassUrl:i.c("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(7),r=n.n(i),a=n(16),o=n(312),s=n(441),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:a.a.integer,save:!0},metadataType:{type:a.a.string,save:!0},rootTitle:{type:a.a.string,save:!0},machineIdentifier:{type:a.a.string,save:!0},Server:a.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=o.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){"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(13),r=n.n(i),a=n(75),o=n(29),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){return e?e.toUpperCase():""}t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return l})
;var i,r=n(39),a=n(307),o=n(35),s=Object(r.a)("user/lockUser"),l=(i={},i["user/lockUser"]=function(e){Object(o.a)(function(){e.get("user").set("lockState",a.a.lockStates.LOCKED)})},i)},function(e,t,n){"use strict";function i(e){return a({hubIdentifier:e.get("hubIdentifier"),identifier:e.provider.get("identifier"),machineIdentifier:e.server.get("machineIdentifier")})}function r(e,t,n){return a({hubIdentifier:e.hubIdentifier,identifier:t.identifier,machineIdentifier:n.machineIdentifier})}
function a(e){var t=e.identifier,n=e.hubIdentifier;return e.machineIdentifier+"--"+t+"--"+Object(o.a)(n)}t.b=i,t.a=r;var o=n(959)},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){return e.isCloud?"online":e.isShared?"shared":"owned"}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(47)},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(47)},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(47),a=n(525)},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(47),a=n(525)},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(47),a=n(526)},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(47),a=n(526)},,,function(e,t,n){"use strict"
;var i=n(220),r=n(317),a=n(1801),o=i.a.extend({model:a.a,url:"/playlists?type="+r.a.LOCAL,parse:function(e){return this.convert(e,"Playlist")}});t.a=o},function(e,t,n){"use strict";var i=n(24),r=n(973),a=i.a.extend({name:"PlayQueueItemCollection",context:["server","provider","identifier","mediaTagPrefix","mediaTagVersion"],model:r.a});t.a=a},function(e,t,n){"use strict";function i(e){return Object(o.a)("web-client","settings",e)}function r(e,t,n){return Object(o.a)("server",e,t,n)}function a(e){
return Object(o.a)("synced-content",e)}t.c=i,t.a=r,t.b=a;var o=n(974)},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(447),r=i.Symbol;e.exports=r},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[N]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,
dataIdAttr:"data-id",delay:0};for(var 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),V.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function t(e){
b&&b.state!==e&&(l(b,"display",e?"none":""),!e&&b.state&&I.insertBefore(b,m),b.state=e)}function n(e,t){var n=F.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(F.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(A," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(A," ")}}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,P,j,T,w,E,x={},A=/\s+/g,N="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[N]).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,F=[].slice,V=[],H=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(P=f(s),"function"==typeof c){if(c.call(this,e,s,this))return U(t,l,"filter",s,n,P),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,P),!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&&(w=e,I=o,m=n,S=m.nextSibling,T=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?(w={target:m,clientX:e.clientX,clientY:e.clientY},
this._onDragStart(w,"touch")):R?(a(m,"dragend",this),a(I,"dragstart",this._onDragStart)):this._onDragStart(w,!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,P))},_emulateDragOver:function(){if(E){l(y,"display","none");var e=k.elementFromPoint(E.clientX,E.clientY),t=e,n=" "+this.options.group.name,i=V.length;if(t)do{
if(t[N]&&t[N].options.groups.indexOf(n)>-1){for(;i--;)V[i]({clientX:E.clientX,clientY:E.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(w){var t=e.touches?e.touches[0]:e,n=t.clientX-w.clientX,i=t.clientY-w.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"==T.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=T===c,f=s.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),
!s.dragoverBubble&&e.stopPropagation()),T&&!s.disabled&&(h?f||(a=!I.contains(m)):T.pull&&u&&(T.name===c.name||u.indexOf&&~u.indexOf(T.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){if(H(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[N]){C!==n&&(C=n,O=l(n));var v,g=n.getBoundingClientRect(),M=g.right-g.left,D=g.bottom-g.top,P=/left|right|inline/.test(O.cssFloat+O.display),j=n.offsetWidth>m.offsetWidth,w=n.offsetHeight>m.offsetHeight,E=(P?(e.clientX-g.left)/M:(e.clientY-g.top)/D)>.5,x=n.nextElementSibling;z=!0,setTimeout(d,30),t(h),v=P?n.previousElementSibling===m&&!j||E&&j:x!==m&&!w||E&&w,
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?(j=f(m),U(null,m.parentNode,"sort",m,I,P,j),U(this,I,"sort",m,I,P,j),U(null,m.parentNode,"add",m,I,P,j),U(this,I,"remove",m,I,P,j)):(b&&b.parentNode.removeChild(b),m.nextSibling!==S&&(j=f(m),U(this,I,"update",m,I,P,j),U(this,I,"sort",m,I,P,j))),e.active&&U(this,I,"end",m,I,P,j)),I=m=y=S=b=M=D=w=E=C=O=T=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[N]=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")}),
V.splice(V.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";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(48),a=n.n(r),o=n(3);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="cast",r="plex"},function(e,t,n){"use strict";function i(e,t){var n=t.options?a()({},t.options):{},i=s.i(e,t),r=s.k(e,t),l=t.itemProviderEntityID&&s.i(e,{providerEntityID:t.itemProviderEntityID
}),c=t.itemServerEntityID&&s.k(e,{serverEntityID:t.itemServerEntityID}),u=c&&!c.get("isCloud"),d=u&&l;return n.serverModel=d?c:r,n.providerModel=d?l:i,t.metadataItemEntityID&&(n.metadataItemModel=s.e(e,t)),t.playlistMetadataItemEntityID&&(n.playlistModel=s.e(e,{metadataItemEntityID:t.playlistMetadataItemEntityID})),t.metadataItemEntityIDs&&(n.metadataItemModels=t.metadataItemEntityIDs.map(function(t){return s.e(e,{metadataItemEntityID:t})})),
t.metadataListEntityID&&(n.metadataListModel=s.f(e,t)),t.listType&&(n.type=Object(o.a)({metadataType:t.listType})),n}t.a=i;var r=n(6),a=n.n(r),o=n(377),s=n(66)},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(6),a=n.n(r),o=n(190)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(15),o=n(160),s={movie:{showInfo:!0,showPlay:!0},episode:{
showInfo:!0,showPlay:!0},clip:{showInfo:!0,showPlay:!0}},l={showListDropdown:["showInfo"]},c=o.a.extend({initialize:function(e,t){if(t||(t={}),t.item){var n=a.c("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})}},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("showInfo",this.canGetInfo),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")},canGetInfo:function(e){return!!e},
onSignedInChange:function(e,t){this.signedIn=t,this.updateDropdown("showListDropdown")}});t.a=c},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(40),l=n(1907),c=n(1909),u=n.n(c),d=l.a.extend({tagName:"span",className:"rating star-rating",template:u.a,disabled:!0,modelEvents:{"change:rating":"onRatingChange","change:userRating":"onRatingChange"},events:o.a.extend({mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},l.a.prototype.events),
initialize:function(e){l.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;s.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;r()(this).toggleClass("star",n).toggleClass("dislikes",!n)}),this.$el.toggleClass("unrated",!e)},onRender:function(){l.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";function i(e){var t=l.a.reject(e,function(e){return e.id===p.a}),n=l.a.sortBy(t,"streamType");return l.a.map(n,function(e){return j(e,"streamType")})}function r(e){
return l.a.map(e.get("Media"),function(e){return l.a.extend(j(e,"Part"),{Part:l.a.map(e.Part,function(e){return l.a.extend(j(e,"Stream"),{file:e.file,exists:!1!==e.exists,accessible:!1!==e.accessible,Stream:i(e.Stream)})})})})}
var a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(19),u=n(15),d=n(40),p=n(927),h=n(322),f=n(998),v=n(369),g=n(1911),m=n(684),y=n(1e3),b=n(1917),I=n(85),S=n(1918),M=n.n(S),D=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],C={size:f.a,duration:h.a,codec:m.a,format:m.a,container:m.a,videoResolution:v.default,bitrateMode:m.a,
accessible:y.default,exists:y.default,optimizedForStreaming:y.default,timed:y.default,file:c.getLastSegment},O={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},P={frameRate:" fps",dialogNorm:" dB",bitrate:" kbps",samplingRate:" Hz"},j=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&&(P[i]&&(a+=P[i]),r||(r=Object(b.a)(i)),
n.properties.push({name:r,value:a}))}return t&&e&&(n[t]=e[t]),n},T=I.a.extend({name:"mediaInfoModal",className:"media-info-modal modal modal-lg fade",template:M.a,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:l.a.extend({"click .delete-btn":"onDeleteClick"},I.a.prototype.events),modelEvents:{"change:Media":"onMediaChange"},initialize:function(e){I.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=u.c("appModel"),n=t.get("user"),i=this.model.server;return this.model.get("isLibraryItem")&&(e=c.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(){I.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(),d.a.execute("deleteMediaItem",{item:this.model,index:o()(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=o()(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=T},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,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";function i(){return Object(g.createSelector)(function(e){return e.ui.dvrSettingsUI},Object(m.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(12),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(5),m=(n.n(g),n(34)),y=n(35),b=n(540),I=n(2003),S={
dispatchInitDVRSettingsUI:b.d,dispatchClearDVRSettingsUI:b.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(y.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";var i=n(24),r=n(327),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(17),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";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(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()(h.a,{className:m.a.spinner,loadingLabel:i,size:r})),s()("span",{className:m.a.label},void 0,t))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(326),f=n(52),v=n(42),g=n(2012),m=n.n(g);i.defaultProps={isDisabled:!1,isSpinning:!1,spinnerSize:f.SMALL},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(42),v=n(3),g=n(155),m=n(23),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(v.default)("Continue"):t,i=e.isDisabled;return r()(f.a,{kind:m.b.PRIMARY,size:m.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";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(42),v=n(3),g=n(155),m=n(23),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()(f.a,{kind:m.b.DEFAULT,size:m.e.MEDIUM,onPress:this.onPreviousStepPress},void 0,Object(v.default)("Previous"))},t}(p.Component);t.a=Object(h.b)(null,{dvrSetupPreviousStep:g.m})(y)},function(e,t,n){"use strict"
;function i(e){return e+"\xd7"}t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return e?e.providers:void 0})}t.a=i;var r=n(5),a=(n.n(r),n(34))},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()(d.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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(25),p=n(23),h=n(1042),f=n(2096),v=n.n(f);i.defaultProps={iconClassName:v.a.icon,messageClassName:v.a.message,kind:p.b.DEFAULT},t.a=i},function(e,t,n){"use strict";function i(e){var t="movie"===e.type&&"com.plexapp.agents.none"===e.agent,n=t?"videos":e.type;return r.f.get(n).key}t.a=i;var r=n(130)},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(l.join)(["/library/sections",n,"refresh"],f),g=e.getXHROptions(v,{type:r?"DELETE":"GET"});if(d){var m=void 0;m=r?u.f:o?u.v:u.Z,Object(c.c)("metrics").trackClick(a()({},h,{action:m,type:"all"===n?"all":i}))}return s.a.ajax(g).promise()}t.a=i;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(19),c=n(15),u=n(76)},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(13),a=n.n(r)},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(5),a=(n.n(r),n(549))},function(e,t,n){"use strict";function i(e,t,n){Object(p.c)("metrics").trackClick({page:n,action:e,type:t.get("type"),context:y.d})}n.d(t,"g",function(){return P}),n.d(t,"i",function(){return j}),n.d(t,"d",function(){return T}),n.d(t,"a",function(){return w
}),n.d(t,"e",function(){return E}),n.d(t,"c",function(){return x}),n.d(t,"h",function(){return A}),n.d(t,"b",function(){return N}),n.d(t,"f",function(){return L})
;var r,a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(39),u=n(18),d=n(19),p=n(15),h=n(164),f=n(100),v=n(263),g=n(678),m=n(76),y=n(123),b=n(3),I=n(723),S=n(131),M=n(116),D=n(460),C=n(433),O=n(388),P=Object(c.a)("library/shareLibrary"),j=Object(c.a)("library/startLibraryRefresh"),T=Object(c.a)("library/editLibrary"),w=Object(c.a)("library/analyzeLibrary"),E=Object(c.a)("library/emptyTrashLibrary"),x=Object(c.a)("library/deleteLibrary"),A=Object(c.a)("library/startLibraryRefresh",function(e){
return o()({},e,{force:!0})}),N=Object(c.a)("library/startLibraryRefresh",function(e){return o()({},e,{cancel:!0})}),L=(r={},r["library/shareLibrary"]=function(e,t){var n=Object(M.i)(e,t),r=Object(M.b)(e,t);u.a.trigger("show:modal",new O.a({defaultPaneType:"ownedServer",defaultPaneID:n.id})),i(m.S,r,t.metricsPage)},r["library/startLibraryRefresh"]=function(e,t,n){var i=t.cancel,r=t.force,a=t.metricsPage,o=Object(M.i)(e,t),s=Object(M.b)(e,t),l={libraryID:s.id,libraryType:s.get("type"),cancel:i,
force:r,allowMetrics:!!a,metricsProperties:{page:a}};s.set("refreshing",!i),Object(I.a)(o,l).fail(function(e){if(503===e.status)u.a.trigger("show:modal",new C.a({model:o}));else{var i=t.cancel?Object(b.default)("There was a problem canceling the update."):Object(b.default)("There was a problem updating the library.");n(Object(v.c)(i))}}).always(function(e){n(f.g({serverEntityID:t.serverEntityID}))})},r["library/editLibrary"]=function(e,t){var n=Object(M.i)(e,t),r=Object(M.b)(e,t)
;u.a.trigger("show:modal",new D.a({server:n,model:r})),i(m.r,r,t.metricsPage)},r["library/analyzeLibrary"]=function(e,t,n){var r=Object(M.i)(e,t),a=Object(M.b)(e,t),o=r.getXHROptions("/library/sections/"+a.id+"/analyze",{type:"PUT"});l.a.ajax(o).fail(function(e){n(Object(v.c)(Object(b.default)("There was a problem analyzing the library.")))}),i(m.d,a,t.metricsPage)},r["library/emptyTrashLibrary"]=function(e,t,n){
var r=Object(M.i)(e,t),a=Object(M.b)(e,t),o=r.getXHROptions("/library/sections/"+a.id+"/emptyTrash",{type:"PUT"});l.a.ajax(o).done(function(){n(Object(v.c)({type:g.b,message:Object(b.default)("The trash was emptied.")}))}).fail(function(e){n(Object(v.c)(Object(b.default)("There was a problem emptying the trash.")))}),i(m.s,a,t.metricsPage)},r["library/deleteLibrary"]=function(e,t,n){var r=Object(M.i)(e,t),a=Object(M.b)(e,t);if(a.isNew())return void a.destroy()
;var o=r.supports("libraryDeleteActivity"),s=d.join(a.url(),o?{async:1}:{}),c=r.getXHROptions(s,{type:"DELETE"});n(f.p({serverEntityID:t.serverEntityID,activityType:h.a.LIBRARY_DELETE})),l.a.ajax(c).done(function(){o||n(f.j({serverEntityID:t.serverEntityID,activityType:h.a.LIBRARY_DELETE}))}).fail(function(){n(f.j({serverEntityID:t.serverEntityID,activityType:h.a.LIBRARY_DELETE})),n(Object(v.c)(Object(b.default)("There was a problem deleting the library.")))}),i(m.l,a,t.metricsPage)},
r[f.b]=function(e,t,n){t.activity.type===h.a.LIBRARY_DELETE&&(n(f.h({serverEntityID:t.serverEntityID})),n(f.g({serverEntityID:t.serverEntityID})),n(S.b({serverEntityID:t.serverEntityID})))},r)},function(e,t,n){"use strict";function i(e){return e.experienceSettings.libraryRoutes}t.a=i},function(e,t,n){"use strict";n.d(t,"i",function(){return i}),n.d(t,"o",function(){return r}),n.d(t,"l",function(){return a}),n.d(t,"j",function(){return o}),n.d(t,"h",function(){return s}),n.d(t,"n",function(){
return l}),n.d(t,"c",function(){return c}),n.d(t,"t",function(){return u}),n.d(t,"d",function(){return d}),n.d(t,"q",function(){return p}),n.d(t,"r",function(){return h}),n.d(t,"p",function(){return f}),n.d(t,"s",function(){return v}),n.d(t,"k",function(){return g}),n.d(t,"a",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,"m",function(){return M})
;var i="preference",r="timeline",a="status",o="progress",s="playing",l="syncState",c="backgroundGeneratorState",u="versionState",d="backgroundProcessingQueue",p="transcodeSession.start",h="transcodeSession.update",f="transcodeSession.end",v="update.statechange",g="reachability",m="account",y="activity",b="grabber.device",I="provider.content.change",S="log",M="provider.subscription.change"},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(e){switch(e){case 0:return Object(r.default)("Error");case 1:return Object(r.default)("Warning");case 2:return Object(r.default)("Info");case 3:return Object(r.default)("Debug");case 4:return Object(r.default)("Verbose");default:return Object(r.default)("Unknown")}}var r=n(3);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(e){return Object(r.a)(e,function(e){return e.uuid},function(){return!0})}var r=n(2246);t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(19),c=n(3),u=n(85),d=n(2265),p=n.n(d),h=u.a.extend({
name:"channelSettingsModal",className:"channel-settings-modal modal fade",template:p.a,ui:{submitBtn:".submit-btn"},events:o.a.extend({"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"},u.a.prototype.events),initialize:function(){u.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),a=o.a.result(this.collection,"url"),u=l.join([a,"/set"],i),d=r.a.ajax(n.server.getXHROptions(u))
;d.done(o.a.bind(function(){this.hide()},this)),d.fail(o.a.bind(function(){s.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem saving these settings.")})},this)),d.always(function(){t.removeClass("active")})}}});t.a=h},function(e,t,n){"use strict";function i(){return window!==window.top}t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(d.a,a()({className:h.a.button,kind:l.DEFAULT,size:c.MEDIUM,target:"_blank"
},e),Object(u.default)("Claim Server"))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(49),c=n(52),u=n(3),d=n(124),p=n(2285),h=n.n(p);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(68),h={dispatchRedirectToUrl:p.j},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){"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";function i(){return a()(l.a,{title:Object(s.default)("No soup for you!"),description:Object(s.default)("You do not have access to this server")})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(3)),l=n(113);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.friendlyName
;return a()(c.a,{title:t?Object(l.default)('The server "{serverName}" is unavailable',{serverName:t}):Object(l.default)("This server is unavailable"),description:Object(l.default)("Plex will automatically try to reconnect to this server")})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3)),c=n(113);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(s.a)(),function(e){return{friendlyName:e.friendlyName}})}function r(e){return{
onReloadHttpPress:function(t){e(Object(l.h)())},onReloadHttpAlwaysPress:function(t){e(Object(l.f)()),e(Object(l.h)())}}}var a=n(11),o=n(5),s=(n.n(o),n(34)),l=n(68),c=n(2338);t.a=Object(a.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName;return a()(u.a,{title:Object(l.default)('The server "{serverName}" is installing an update',{serverName:t}),description:Object(l.default)("Grab a cup of tea. This may take a couple of minutes.")},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(3)),c=n(31),u=n(73),d=a()(c.a,{});t.a=i},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(156)),a=n(154),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";function i(e){var t=e.className;return l.a.createElement(c.a,a()({className:t,autoScroll:!0},e))}var r=n(6),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=n.n(s),c=n(71),u=n(2348),d=n.n(u);i.defaultProps={className:d.a.scroller},t.a=i},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(3);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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(2358),c=n(31);t.a=i},function(e,t,n){"use strict";function i(e){return!0}function r(e,t){return Object(o.createSelector)(d.a,Object(u.a)(),function(n,i){return i?i.reduce(function(i,r){var a=n[r];return a&&t(a)&&l.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),n(7)),l=n.n(s),c=n(156),u=n(720),d=n(132)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.headerClassName,i=e.children,r=e.title,o=e.icon,s=e.onRef;return l.a.createElement("div",{className:t,role:"navigation",ref:s},a()("div",{className:u.a.sidebarListHeaderContainer},void 0,a()("div",{className:n,role:"header"},void 0,r),o&&a()("div",{
className:u.a.sidebarListHeaderIcon},void 0,o)),i)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(2364),u=n.n(c);i.defaultProps={headerClassName:u.a.sidebarListHeader},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(2365)),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(l.a,a()({},e,{iconComponent:c.a}))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(2366),c=n(25);t.a=i},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===s.c&&d?"albums":"playlists";return o.join("#!/server/"+c+"/"+p,a()({},l,r))}}t.a=i
;var r=n(6),a=n.n(r),o=n(19),s=n(58)},function(e,t,n){var i=n(2427).default,r=n(189);e.exports=r(i)},function(e,t,n){"use strict";var i=n(2432),r=n(396),a=n.n(r),o=i.a.extend({className:"container",template:a.a});t.a=o},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(39),a=n(15),o=n(2455),s=Object(r.a)("ui/player/remoteCastPlayer/changeCastApiAvailability"),l=Object(r.a)("ui/player/remoteCastPlayer/requestCastSession"),c=Object(r.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(a.c)("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=r.parseUrl(e),n=/^\/playQueues\/([^\/?]+)/.exec(t.pathname||t.href);return n?n[1]:void 0}t.a=i;var r=n(19)},function(e,t,n){"use strict";function i(e,t){
return e===r.d||e===r.a||e===r.i||e===r.j||e===r.b&&t[a.g]||e===r.k&&t[a.o]||e===r.l&&t[a.o]}var r=n(41),a=n(81);t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(3),c=a.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=r()(n),a=i.data("field");i.hasClass("locked")?t[a]=!0:a in t&&(t[a]=!1)}),s.a.map(t,function(e,t){return{name:t,locked:e}})},onLockClick:function(e){e.preventDefault(),r()(e.currentTarget).hasClass("disabled")||r()(e.currentTarget).toggleClass("locked")},onLockableFieldChange:function(e){
var t=e instanceof r.a?e:r()(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";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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(2549);i.defaultProps={allowRedirectOnDelete:!1},t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(6),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),m=n(78),y=n(711),b=n(15),I=n(76),S=n(117),M=n(95),D=n(23),C=n(2552),O=n.n(C),P=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(b.c)("metrics").trackClick(o()({},i.props.metricsProperties,{page:i.props.metricsPage,action:I.P,value:e})),i.props.onItemSelect(e)},i.onCancel=function(){Object(b.c)("metrics").trackClick(o()({},i.props.metricsProperties,{page:i.props.metricsPage,action:I.e})),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()(S.a,{size:D.e.SMALL,isOpen:i,metricsPage:a,metricsProperties:o,onModalClose:this.onCancel},void 0,r()(M.a,{onModalClose:this.onCancel},void 0,r()(m.a,{},void 0,s),r()(g.a,{innerClassName:O.a.listModalInnerBody},void 0,Object(y.a)(n,function(t){return v.a.cloneElement(t,{onSelect:e.onItemSelect})}))))},t}(f.Component);t.a=P},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(12),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(20),m=n(2553),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(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),allowSizeBracket:!0},n))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(271),p=n(182),h=n(2571),f=n.n(h),v={width:"100%",height:"100%"};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="playlist://image.favorite",r="playlist://image.radio",a="folder"},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(5),o=(n.n(a),
n(22)),s=n(469);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{addedAt:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).addedAt}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(2582);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(5),o=(n.n(a),n(22)),s=n(2585);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},s.a,o.a,Object(a.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(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(55),c=n(143),u=n(2586);t.a=Object(l.a)(i)(u.a)},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(196)),c=n(566),u=n(279),d=n(247),p=n(2592),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.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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(399),p=n(279),h=n(2595),f=n(2598),v=n.n(f);i.defaultProps={className:v.a.card},t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(24),r=n(567),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"
;var i=n(5),r=(n.n(i),n(178)),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=e.get("playQueue");if(t){var n=t.get("currentIndex");return Object(r.a)(e,n)}}t.a=i;var r=n(177)},function(e,t,n){"use strict";var i=n(429),r=Object(i.a)();t.a=r},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(7),a=n.n(r),o=n(151),s=n(261);t.a=i
},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(570)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)("serverEntityID"),Object(s.a)(),o.a,function(e,t,n){return t&&t.transcodeServerEntityID?n[t.transcodeServerEntityID]:e?n[e]:void 0})}var r=n(5),a=(n.n(r),n(158)),o=n(163),s=n(280);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),
n.d(t,"c",function(){return o}),n.d(t,"b",function(){return s});var i=n(1),r=n.n(i),a="bottom-left",o="top-left",s="none";r.a.oneOf([a,o,s])},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(5),a=(n.n(r),n(115)),o=n(212)},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}))}n.d(t,"a",function(){return f});var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1117),p=n(1118),h=n(1120);i.defaultProps={component:h.a};var f=i;t.b=Object(p.a)(i)},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(11),p=n(5),h=(n.n(p),n(166));t.a=i},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){"use strict";n.d(t,"a",function(){return i});var i="directory"},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";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(6),a=n.n(r),o=n(39),s=n(190),l=n(177),c=n(35),u="ui/player/playerControls/togglePlayerOpenState",d=(Object(o.a)(u),Object(o.a)(u,function(e){return a()({},e,{openState:s.a})})),p=Object(o.a)(u,function(e){return a()({},e,{openState:s.b})}),h=(i={},i[u]=function(e,t){var n=t.playerType,i=t.openState,r=Object(l.c)(e,n);Object(c.a)(function(){r.set({previousOpenState:void 0,openState:i,isSettingsVisible:!1,
isChaptersVisible:!1,isPlayQueueVisible:!1,isLyricsVisible:!1})})},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(2735)),c=n.n(l);i.defaultProps={className:c.a.container},t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.durationSeconds,i=e.hasLiveTVProtocol,r=e.isMiniPlayer,o=e.isMusic,b=e.isVideo,S=e.metadataItemEntityID,M=e.playerType,D=e.positionSeconds,C=e.providerEntityID,O=e.serverEntityID,P=e.volume,j=e.activateChaptersButton,T=e.activateLyricsButton,w=e.activatePhotoInformationButton,E=e.activatePhotoStripButton,x=e.activateQueueButton,A=e.activateRepeatButton,N=e.activateRepeatOneButton,L=e.activateSettingsButton,k=e.activateShuffleButton,_=e.disableCloseButton,R=e.disableLyricsButton,z=e.disableMenuButton,U=e.disableNextButton,B=e.disablePauseButton,F=e.disablePlayButton,V=e.disablePreviousButton,H=e.disableQueueButton,Q=e.disableRepeatButton,Y=e.disableRepeatOneButton,G=e.disableSettingsButton,W=e.disableShuffleButton,K=e.disableSkipBackButton,q=e.disableSkipForwardButton,Z=e.showChaptersButton,X=e.showCloseButton,J=e.showDuration,$=e.showEditButton,ee=e.showFavoriteButton,te=e.showLyricsButton,ne=e.showMenuButton,ie=e.showNextButton,re=e.showPauseButton,ae=e.showPhotoInformationButton,oe=e.showPhotoStripButton,se=e.showPlayButton,le=e.showPreviousButton,ce=e.showQueueButton,ue=e.showRecordButton,de=e.showRepeatButton,pe=e.showRepeatOneButton,he=e.showSettingsButton,fe=e.showShuffleButton,ve=e.showSkipBackButton,ge=e.showSkipForwardButton,me=e.showUnfavoriteButton,ye=e.showVolume,be=e.onChaptersPress,Ie=e.onClosePress,Se=e.onControlsMenuChange,Me=e.onEditPress,De=e.onFavoritePress,Ce=e.onLyricsPress,Oe=e.onNextPress,Pe=e.onPausePress,je=e.onPhotoInformationPress,Te=e.onPhotoStripPress,we=e.onPlayPress,Ee=e.onPreviousPress,xe=e.onQueuePress,Ae=e.onRepeatOnePress,Ne=e.onRepeatPress,Le=e.onSettingsPress,ke=e.onShufflePress,_e=e.onSkipBackPress,Re=e.onSkipForwardPress,ze=e.onUnfavoritePress,Ue=e.onVolumeChange,Be=e.onVolumeIconPress,Fe=void 0
;Fe=M===l.b?y.a:i?d.a:u.a;var Ve=ye&&null!=P,He=i?null:I.a.balanceLeft,Qe=b?I.a.hasLandscapePoster:I.a.hasSquarePoster;return a()(s.Fragment,{},void 0,a()("div",{className:(t||"")+" "+(r&&Qe||""||""),"data-qa-id":"playerControlsContainer"},void 0,a()("div",{className:I.a.buttonGroupLeft},void 0,r?a()(h.a,{playerType:M,isVideo:b,isMusic:o}):null,a()(Fe,{metadataItemEntityID:S,playerType:M,positionSeconds:D,durationSeconds:n,showDuration:J,showStarRating:o})),a()("div",{
className:(I.a.buttonGroupCenter||"")+" "+(He||"")},void 0,ue?a()(p.a,{playerType:M,"data-qa-id":"recordButton",serverEntityID:O,providerEntityID:C,positionSeconds:D}):null,le?a()(v.a,{icon:"plex-icon-player-previous-track-560","data-qa-id":"previousButton",isDisabled:V,title:Object(c.default)("Previous"),onPress:Ee}):null,ve?a()(v.a,{icon:"plex-icon-player-skip-back-560","data-qa-id":"skipBackButton",isDisabled:K,title:Object(c.default)("Skip Back 10 Seconds"),onPress:_e}):null,se?a()(v.a,{
icon:"plex-icon-player-play-560","data-qa-id":"resumeButton",isPrimary:!0,isDisabled:F,title:Object(c.default)("Play"),onPress:we}):null,re?a()(v.a,{icon:"plex-icon-player-pause-560","data-qa-id":"pauseButton",isPrimary:!0,isDisabled:B,title:Object(c.default)("Pause"),onPress:Pe}):null,ge?a()(v.a,{icon:"plex-icon-player-skip-forward-560","data-qa-id":"skipForwardButton",isDisabled:q,title:Object(c.default)("Skip Forward 30 Seconds"),onPress:Re}):null,ie?a()(v.a,{
icon:"plex-icon-player-next-track-560","data-qa-id":"nextButton",isDisabled:U,title:Object(c.default)("Next"),onPress:Oe}):null,X?a()(v.a,{"data-qa-id":"closeButton",isDisabled:_,icon:"plex-icon-player-stop-560",title:Object(c.default)("Close Player"),onPress:Ie}):null),a()("div",{className:I.a.buttonGroupRight},void 0,ne?a()(f.a,{serverEntityID:O,"data-qa-id":"moreButton",providerEntityID:C,metadataItemEntityID:S,isDisabled:z,onMenuChange:Se}):null,de?a()(v.a,{
icon:"plex-icon-player-repeat-560","data-qa-id":"repeatButton",isDisabled:Q,isActive:A,title:Object(c.default)("Repeat"),onPress:Ne}):null,pe?a()(v.a,{icon:"plex-icon-player-repeat-one-560","data-qa-id":"repeatOneButton",isDisabled:Y,isActive:N,title:Object(c.default)("Repeat One"),onPress:Ae}):null,fe?a()(v.a,{icon:"plex-icon-player-shuffle-560","data-qa-id":"shuffleButton",isDisabled:W,isActive:k,title:Object(c.default)("Shuffle"),onPress:ke}):null,$?a()(v.a,{icon:"plex-icon-player-edit-560",
"data-qa-id":"playerEditButton",title:Object(c.default)("Edit"),onPress:Me}):null,ee?a()(v.a,{icon:"plex-icon-player-favorite-empty-560","data-qa-id":"playerFavoriteButton",title:Object(c.default)("Add to Favorites"),onPress:De}):null,me?a()(v.a,{icon:"plex-icon-player-favorite-filled-560","data-qa-id":"playerUnfavoriteButton",title:Object(c.default)("Remove from Favorites"),onPress:ze}):null,ae?a()(v.a,{icon:"plex-icon-player-info-560","data-qa-id":"playerPhotoInfoButton",
title:Object(c.default)("Information"),isActive:w,onPress:je}):null,oe?a()(v.a,{icon:"plex-icon-player-thumbnails-560","data-qa-id":"playerPhotoStripButton",isActive:E,title:Object(c.default)("Show Photo Strip"),onPress:Te}):null,te?a()(v.a,{icon:"plex-icon-player-lyrics-560","data-qa-id":"lyricsButton",isDisabled:R,isSelected:T,title:Object(c.default)("Lyrics"),onPress:Ce}):null,he?a()(v.a,{icon:"plex-icon-player-settings-560","data-qa-id":"videoSettingsButton",isDisabled:G,isActive:L,
title:Object(c.default)("Settings"),onPress:Le}):null,Z?a()(v.a,{icon:"plex-icon-player-chapters-560","data-qa-id":"chaptersButton",isActive:j,title:Object(c.default)("Chapters"),onPress:be}):null,ce?a()(v.a,{icon:"plex-icon-player-queue-560","data-qa-id":"playQueueButton",isDisabled:H,isActive:x,title:Object(c.default)("Play Queue"),onPress:xe}):null,Ve?a()(g.a,{className:I.a.volumeButton,"data-qa-id":"volumeButton",volume:P,onPress:Be,onVolumeChange:Ue}):null)),Ve?a()(m.a,{
className:I.a.volumeSlider,volume:P,onVolumeChange:Ue}):null)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(99)),c=n(3),u=n(1149),d=n(2782),p=n(2783),h=n(2815),f=n(2832),v=n(404),g=n(2834),m=n(2838),y=n(2842),b=n(2845),I=n.n(b);i.defaultProps={className:I.a.controls,isMusic:!1,isVideo:!1,isPhoto:!1},t.a=i},function(e,t,n){var i=n(374),r=n(454);e.exports=i({},r,{starSpeed:"0.3s",starPulseScale:1.35,starPulseSpeed:"0.15s",starPulseTimingFunction:"cubic-bezier(0.075, 0.82, 0.165, 1)",
posterFlipSpeed:"0.8s",overlaySpeed:"0.3s"})},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(48),s=n.n(o),l=n(36),c=n(3);t.a=a},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(a.a)(),Object(s.a)(),function(e,t,n){if(null!=e&&t&&n){return t.Media.find(function(t){var i=t.beginsAt,r=t.endsAt,a=t.channelIdentifier;return i<=e&&r>e&&n.channelIdentifier===a})}})}t.a=i;var r=n(5),a=(n.n(r),n(573)),o=n(574),s=n(212)},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(5),o=(n.n(a),n(22)),s=n(565);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,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(72)),c=n(402),u=n(1165),d=a()(l.b,{});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(319));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(322));t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},s.a,o.a,Object(a.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};e&&(r.context=e);var a=i.skipParent&&i.subtype===l.c;return{title:i.title,index:i.index,route:Object(u.a)(t,n,i.key,r),
parentTitle:i.parentTitle,parentIndex:a?null:i.parentIndex,parentRoute:i.skipParent?null:Object(u.a)(t,n,i.parentKey,r),originallyAvailableAt:i.originallyAvailableAt}})}var r=n(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(98),c=n(55),u=n(143),d=n(1165);t.a=Object(c.a)(i)(d.a)},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,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(5),o=(n.n(a),n(22)),s=n(2773);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.mediaSubscriptions});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(469));t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(537),b=n(961),I=n(962),S=n(318),M=n(331),D=n(2848),C=n(2852),O=n.n(C),P=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,b=l()(e,["className","trackClassName","bufferClassName","fillClassName","canSeek","positionMilliseconds","offsetMilliseconds","durationMilliseconds","bufferStartMilliseconds","bufferEndMilliseconds","showBuffer","noFillTransition","isDisabled"])
;if(!s)return null;var I=this.state,S=I.hoverValue,C=I.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
}),o()(y.a,{},void 0,m.a.createElement(D.a,r()({},b,{position:C,hoverValue:S,isVisible:null!=S}))))},t}(g.Component);P.defaultProps={className:O.a.seekBar,trackClassName:O.a.seekBarTrack,fillClassName:O.a.seekBarFill,bufferClassName:O.a.seekBarBuffer,canSeek:!0,showBuffer:!1,noFillTransition:Object(b.a)()||Object(I.a)()||Object(S.a)(),isDisabled:!1},t.a=P},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(44),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,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(1194),a=n(2923),o=n(2924);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(2925);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(1195),a=n(1197);e.exports=i},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===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+=1){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}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},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";Object.defineProperty(t,"__esModule",{value:!0})
;t.FILE="__NATIVE_FILE__",t.URL="__NATIVE_URL__",t.TEXT="__NATIVE_TEXT__"},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(5),a=(n.n(r),n(769))},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.sourceDirectory},function(e,t){return t.listContext},function(e,t){return t.allowSourceTitle
},Object(h.a)(),Object(p.a)(),Object(d.a)(),Object(m.a)(),Object(y.a)(),b.a,function(e,t,n,i,r,a,o,s,l){var c=a.hubIdentifier.indexOf("music.video")>-1?g.f:a.type,d=t||Object(f.a)(a.hubIdentifier),p=void 0;if(a.key&&d!==v.a){var h={key:a.key,title:a.title,type:c,subtype:a.subtype,source:a.source,context:a.context};if(l)if(e)p=Object(M.a)(i,r,e,h);else{var m=Object(D.a)("home",i,r);p=u.join(m,h)}else p=Object(S.a)(i,r,h)}return{metadataListEntityID:a.metadataList||a.directoryList,
component:a.metadataList?O.a:C.a,metricsContext:a.context||a.hubIdentifier,hubIdentifier:a.hubIdentifier,title:a.title,sourceTitle:n?o:null,attribution:a.attribution,route:p,style:a.style,size:a.size,more:a.more,random:a.random,containerKey:a.key,listType:c,listSubtype:a.subtype,listContext:d,isHomeHub:s&&l}})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),
n(19)),d=n(474),p=n(51),h=n(34),f=n(1216),v=n(32),g=n(197),m=n(3021),y=n(1138),b=n(398),I=n(93),S=n(813),M=n(590),D=n(484),C=n(3023),O=n(1226),P=n(127),j=Object(l.b)(i)(P.a);j.propTypes=a()({},j.propTypes,{providerEntityID:s.a.string.isRequired,serverEntityID:s.a.string.isRequired,hubEntityID:s.a.string.isRequired,sourceDirectory:I.a,allowSourceTitle:s.a.bool}),t.a=j},function(e,t,n){"use strict";function i(e,t,n){
var i=n.key,s=n.typeKey,l=n.title,c=n.type,u=n.subtype,d=n.content,p=n.source,h=n.context,f=p?Object(a.b)(p):Object(a.a)(e,t);if(o[i])return o[i](e,t,n);var v=i.match(/\/library\/sections\/(\d+)\/cluster/);return v?r.join(["#!",f,"timeline"],{key:"/library/sections/"+v[1]}):/\/watchnow$/.test(i)?r.join(["#!",f,"guide"]):d?r.join(["#!",f],{key:i,typeKey:s,context:h}):r.join(["#!",f,"list"],{key:i,type:c,subtype:u,title:l,context:h})}t.a=i;var r=n(19),a=n(552),o={
"view://dvr/recording-schedule":function(e,t,n){var i=encodeURIComponent(e.machineIdentifier);return r.join(["#!","server",i,"schedule"])}}},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(c.q)(d);return a()("span",{className:t},void 0,p.map(function(e,t){if(!(t>=h)){var c={filters:e.filter,filterLabel:e.tag}
;return!c.filter&&s&&e.id&&(c.filters=s+"="+e.id),f&&(c.type=f.id),e.context&&(c.context=e.context),a()("span",{},t,a()(l.a,{className:n,to:Object(u.a)(i,r,o,c)},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(20)),c=n(26),u=(n(88),n(125),n(133)),d=n(3045),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(3046)),c=n.n(l);i.defaultProps={className:c.a.group},t.a=i},function(e,t,n){"use strict";function i(e){return e.get("ui").get("subtitlesModal")}function r(e){return e.get("user").get("profile")}n.d(t,"c",function(){return y}),n.d(t,"b",function(){return b}),n.d(t,"a",function(){return I}),n.d(t,"d",function(){return S})
;var a,o=n(13),s=n.n(o),l=n(39),c=n(19),u=n(1233),d=n(164),p=n(110),h=n(231),f=n(100),v=n(241),g=n(66),m=n(3),y=Object(l.a)("ui/subtitlesModal/resetMetadataItemSubtitles"),b=Object(l.a)("ui/subtitlesModal/fetchMetadataItemSubtitles"),I=Object(l.a)("ui/subtitlesModal/downloadMetadataItemSubtitle"),S=(Object(l.a)("ui/subtitlesModal/clearSubtitlesDownloadError"),Object(p.a)((a={},a["ui/subtitlesModal/resetMetadataItemSubtitles"]=function(e){var t=i(e),n=t.get("subtitles");n.abortPendingPopulate(),
n.resetPopulatePromise(null),t.restoreDefaults()},a["ui/subtitlesModal/fetchMetadataItemSubtitles"]=function(e,t,n){var a=i(e),o=r(e),s=Object(g.e)(e,t),l=a.get("subtitles");l&&(l.abortPendingPopulate(),l.resetPopulatePromise(null));var c=new u.a([],{key:s.get("key"),server:s.server,provider:s.provider,language:t.language,title:t.title,mediaItemID:t.mediaItemID,minimumScore:t.minimumScore,hearingImpaired:o.get("defaultSubtitleAccessibility")});a.set({subtitles:c,
metadataItemEntityID:t.metadataItemEntityID,isSubtitlesPending:!0,isSubtitlesPopulated:!1,subtitlesError:null}),c.fetch().then(function(e){a.set({isSubtitlesPending:!1,isSubtitlesPopulated:!0})},function(e,t){if(t.aborting)return void a.set("isSubtitlesPending",!1);a.set({isSubtitlesPending:!1,subtitlesError:Object(v.a)(t,Object(m.default)("Unable to load subtitles"))})})},a["ui/subtitlesModal/downloadMetadataItemSubtitle"]=function(e,t,n){var r=i(e),a=Object(g.e)(e,t),o=a.server,l={key:t.key,
codec:t.codec,language:t.language,hearingImpaired:t.hearingImpaired?1:0,providerTitle:t.providerTitle,mediaItemID:t.mediaItemID,transient:t.transient},u=c.join([a.get("key"),"/subtitles"],l),d=o.getXHROptions(u,{type:"PUT"});r.set({subtitlesDownloadKey:t.key,isSubtitlesDownloaded:!1,subtitlesDownloadError:null}),s.a.ajax(d).then(function(e,t,n){var i=n.getResponseHeader("X-Plex-Activity");r.set("subtitlesDownloadActivityID",i)},function(e){r.set({subtitlesDownloadKey:null,
subtitlesDownloadError:Object(v.a)(e,Object(m.default)("Unable to download subtitles"))})})},a[f.b]=function(e,t,n){var r=t.activity;if(r.type===d.a.SUBTITLE_DOWNLOAD){var a=i(e);if(r.uuid===a.get("subtitlesDownloadActivityID")){var o=a.get("metadataItemEntityID"),s=Object(g.e)(e,{metadataItemEntityID:o}),l=s.server.entityID(),c={subtitlesDownloadActivityID:null,subtitlesDownloadKey:null},u=null!=r.Response.error;u?(c.isSubtitlesDownloaded=!1,
c.subtitlesDownloadError=r.Response.status):c.isSubtitlesDownloaded=!0,a.set(c),u||n(Object(h.d)({serverEntityID:l,metadataItemEntityID:o}))}}},a["ui/subtitlesModal/clearSubtitlesDownloadError"]=function(e){i(e).set("subtitlesDownloadError",null)},a)))},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(c.a)(),Object(u.a)(),Object(p.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(d.getMetadataItemInfo)({metadataItemEntityID:t.metadataItemEntityID}))}}}var a=n(6),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(22)),u=n(3069),d=n(167),p=n(3070),h=n(3071);t.a=Object(s.b)(i,r)(h.a)},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(42),l=n(23),c=n(3075),u=n.n(c);i.defaultProps={className:u.a.statusButton,size:l.e.SMALL},t.a=i},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.summary;return a()(s.Fragment,{},void 0,a()(d.a,{},void 0,a()(f.a,{},void 0,a()(h.a,{},void 0,a()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),a()(g.a,{},void 0,a()(h.a,{},void 0,a()(c.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i})),a()(v.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(y.a,{},void 0,a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),I,a()(d.a,{},void 0,a()(p.a,{dangerouslySetInnerHTML:{__html:r}})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(248)),c=n(281),u=n(129),d=n(96),p=n(144),h=n(104),f=n(139),v=n(253),g=n(213),m=n(817),y=n(198),b=n(1236),I=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(814));n(88),n(125);t.a=i},function(e,t,n){"use strict";function i(){return!Object(r.a)()}t.a=i;var r=n(318)},function(e,t,n){var i=n(1e3).default,r=n(189);e.exports=r(i)},function(e,t,n){"use strict"
;var i=n(5),r=(n.n(i),n(7)),a=n.n(r),o=n(3176),s=Object(i.createSelector)(o.a,function(e){return a.a.find(e,function(e){return e.isFullOwnedServer})});t.a=s},function(e,t,n){"use strict";function i(e){return c.a.createElement(u.a,s()({"data-qa-id":"toolbarAddToAlbum",tooltip:Object(d.default)("Add to Album")},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.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(u.a,s()({tooltip:Object(d.default)("Add to Playlist"),"data-qa-id":"toolbarPlaylist"},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{name:"plex-icon-toolbar-add-to-playlist-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(u.a,s()({tooltip:Object(d.default)("Edit"),"data-qa-id":"toolbarEdit"},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{
name:"plex-icon-toolbar-edit-560"});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.playLabel,n=void 0===t?Object(f.default)("Play"):t,i=c()(e,["playLabel"]);return p.a.createElement(h.a,s()({tooltip:n,"data-qa-id":"toolbarPlay"},i),g)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(114),f=n(3),v=n(25),g=a()(v.a,{name:"plex-icon-toolbar-play-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(u.a,s()({
tooltip:Object(d.default)("Shuffle"),"data-qa-id":"toolbarShuffle"},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{name:"plex-icon-toolbar-shuffle-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(u.a,s()({tooltip:Object(d.default)("Sync"),"data-qa-id":"toolbarSync"},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{name:"plex-icon-toolbar-sync-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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(56),c=n(3227),u=n.n(c);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()(y.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(b.a)(e)+")",a.WrappedComponent=e,a}var o=n(6),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(64),b=n(166),I=n(44),S=n.n(I),M=n(3228),D=n.n(M),C=parseInt(S.a.toolbarButtonWidth,10);t.a=a},function(e,t,n){"use strict";function i(e){return e===u.h?o()({},m,{outerPaddingTop:10,outerPaddingRight:v,outerPaddingBottom:5,outerPaddingLeft:v}):m}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,u=e+(t||"")+n+r+a;if(g.hasOwnProperty(u))return g[u];var p=Object(d.c)(e,t,n),h=Object(f.a)({type:e,aspectRatio:p,titleCount:a,context:n}),v=h.titleHeight,m=h.minCellWidth,y=h.preferredCellWidth,b=h.minColumns,I=h.maxColumns,S=i(n),M=Object(s.c)(o()({direction:s.b},S,{getCellWidth:function(e){return Object(c.a)(o()({},e,{preferredCellWidth:y,minCellWidth:m,minColumns:b,
maxColumns:I,columnAdjustment:r,aspectRatio:p}))},getCellHeight:function(e){return Object(l.a)(o()({},e,{aspectRatio:p,titleHeight:v}))}}));return M.cellOptions={minCellWidth:m,minColumns:b,maxColumns:I,columnAdjustment:r,aspectRatio:p,titleHeight:v},g[u]=M,M}t.a=r;var a=n(6),o=n.n(a),s=n(461),l=n(781),c=n(571),u=n(32),d=n(126),p=n(44),h=n.n(p),f=n(1221),v=parseInt(h.a.prePlayContentPadding,10),g={},m={innerHorizontalPadding:30,innerVerticalPadding:30,outerPaddingTop:30,outerPaddingRight:60,
outerPaddingBottom:30,outerPaddingLeft:60}},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(5),o=(n.n(a),n(769))
},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";var i=n(335),r=n(44),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.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(f.b)(c,m,{providerEntityID:n,subtype:g,activeSort:l});return u.a.createElement(d.a,a()({listType:c,listContext:m,
layout:Object(p.a)(c,g,m,y,I.length),cellRenderer:Object(h.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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(209),p=(n(32),n(832)),h=n(138),f=n(187),v=n(593);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.get("key");return e.get("id")||t.substr(t.lastIndexOf("/")+1)}n.d(t,"a",function(){return O}),
n.d(t,"c",function(){return P}),n.d(t,"f",function(){return j}),n.d(t,"d",function(){return T}),n.d(t,"b",function(){return w}),n.d(t,"e",function(){return E})
;var r,a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(39),u=n(18),d=n(19),p=n(15),h=n(92),f=n(60),v=n(265),g=n(100),m=n(76),y=n(123),b=n(66),I=n(35),S=n(152),M=n(723),D=n(460),C=n(143),O=Object(c.a)("provider/addToCatalog"),P=Object(c.a)("provider/clearAddToCatalogError"),j=Object(c.a)("provider/scanLibraryFiles"),T=Object(c.a)("provider/editLibrary"),w=Object(c.a)("provider/scanLibraryFiles",function(e){return o()({},e,{cancel:!0})}),E=o()({},v.e,(r={},r["provider/clearAddToCatalogError"]=function(e,t){
e.get("ui").get("addToCatalogModal").set("error",null)},r["provider/addToCatalog"]=function(e,t,n){var i=e.get("ui").get("addToCatalogModal"),r=Object(b.i)(e,t),a=r.get("features").get("actions").get("actions").get("addToCatalog"),o=a.get("key");if(Object(I.a)(function(){i.set({isUpdating:!0,error:null})}),t.data.fileURL){var s=new window.XMLHttpRequest;return s.open("GET",t.data.fileURL,!0),s.responseType="blob",s.onload=function(e){if(200===e.target.status){
var n=e.target.response,a=new window.FormData;a.append("file",n);var s=r.getXHROptions(o,{method:"POST",processData:!1,contentType:!1,data:a});l.a.ajax(s).then(function(e,t,n){i.set({isUpdating:!1})},function(e){i.set({isUpdating:!1,error:Object(S.a)(e)})})}window.URL.revokeObjectURL(t.data.fileURL)},void s.send()}var c=d.join(o,{url:t.data.channelURL}),u=r.getXHROptions(c,{method:"PUT",dataType:"json"});l.a.ajax(u).then(function(e,t,n){i.set("isUpdating",!1);var a=new h.a(e,{server:r.server,
provider:r,parse:!0});if(!a.get("key"))return void i.set({isUpdating:!1,error:Object(S.a)(n)});var o=Object(C.a)(r.server.state,r.state,a.get("key"));window.location.hash=o},function(e){i.set({isUpdating:!1,error:Object(S.a)(e)})})},r["provider/scanLibraryFiles"]=function(e,t,n){var r=t.cancel,a=t.force,o=t.metricsPage,s=Object(b.k)(e,t),l=Object(b.i)(e,t),c=l.get("features").get(f.b.CONTENT),u=c.get("directories").findWhere(t.contentDirectory),d={libraryID:i(u),libraryType:u.get("type"),
cancel:r,force:a,allowMetrics:!!o,metricsProperties:{page:o}};u.set("refreshing",!r),Object(M.a)(s,d).fail(function(e){u.set("scanFilesError",Object(S.a)(e))}).always(function(e){n(g.q({serverEntityID:t.serverEntityID}))})},r["provider/editLibrary"]=function(e,t){var n=Object(b.k)(e,t),r=Object(b.i)(e,t),a=n.get("desktop").get("libraries"),o=r.get("features").get(f.b.CONTENT),s=o.get("directories").findWhere(t.contentDirectory);a.populate().then(function(){var e=i(s),r=a.get(e)
;u.a.trigger("show:modal",new D.a({server:n,model:r})),Object(p.c)("metrics").trackClick({page:t.metricsPage,action:m.r,type:r.get("type"),context:y.d})})},r))},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.onFormChange=function(e){i.props.onFormChange&&i.props.onFormChange(e),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 f.a.createElement(e,a()({isDirty:this.state.isDirty},this.props,{onFormChange:this.onFormChange}))},o}(h.Component);return o.displayName="DirtyAware("+Object(v.a)(e)+")",o.WrappedComponent=e,o}
var r=n(6),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(166);n(36);t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(114),b=n(3),I=n(25),S=n(1271),M=o()(I.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(y.a,r()({tooltip:Object(b.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,t){var n=Object(o.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,o=t.sort,s=t.limit,l=a.join(e),c={};return n&&(c.type=n),o&&(c.sort=o),s&&(c.limit=s),a.join(i(l,r),c)}t.a=r;var a=n(19),o=n(1276)},function(e,t,n){"use strict";function i(e){function t(e){var t=e.viewportHeight+":"+e.viewportWidth;if(t===O)return P;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,P={height:D,width:S}}function n(){Object(o.a)(void 0!==I,"`getListStyle` must be called before `getLandmarks`");var e=I+":"+D;return e===j?T:(j=e,T=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,P=void 0,j=void 0,T=void 0;return{getListStyle:t,getLandmarks:n,getPositionForIndex:i,getRelativeIndex:r,getRangesForPosition:l}}t.a=i;var r=n(7),a=n.n(r),o=n(36)},function(e,t,n){"use strict";function i(e){var t=e.className
;return a()(l.a,{className:t},void 0,Object(c.default)("New"))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(332)),c=n(3),u=n(3316),d=n.n(u);i.defaultProps={className:d.a.badge},t.a=i},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(48),a=n.n(r),o=n(3)},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(39),r=n(111),a=Object(i.a)(r.z),o=Object(i.a)(r.n),s=Object(i.a)(r.t),l=Object(i.a)(r.Q)},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){var t=e.className,n=e.selectedListStyle,i=e.allListStyles;return Object(c.g)(i,n)?a()(l.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(607)),c=n(62);i.defaultProps={selectedListStyle:c.c,allListStyles:[c.c]},t.a=i},function(e,t,n){"use strict";function i(e,t){
return Object(y.i)(e,t).get("features").get(f.b.SETTINGS)}function r(e,t){return i(e,t).get("settings").get(t.settingID)}function a(e,t){switch(e.get("type")){case v.c.LOCATION:var n=e.get("locations").get(t.country);e.set({country:t.country,countryLabel:n.get("title"),postalCode:t.postalCode});break;case v.c.SELECT:d.a.each(t,function(t,n){e.get("options").get(n).set({selected:t})}),e.set("selectedCount",d.a.values(t).filter(function(e){return e}).length);break;default:e.set("value",t[e.id])}}
function o(e,t,n){var i=d.a.mapObject(t,function(e,t){return!0===e?"1":!1===e?"0":e}),r=h.join(d.a.result(e,"url"),{prefs:i}),o=n.getXHROptions(r,{type:"PUT"});return c.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 P}),n.d(t,"d",function(){return j}),n.d(t,"e",function(){return T})
;var s,l=n(13),c=n.n(l),u=n(7),d=n.n(u),p=n(39),h=n(19),f=n(60),v=n(314),g=n(109),m=n(223),y=n(66),b=n(35),I=n(152),S=Object(p.a)("provider/providerSettings/fetchProviderSettings"),M=Object(p.a)("provider/providerSettings/fetchProviderSettingSelectOptions"),D=Object(p.a)("provider/provderSettings/clearProviderSettingFetchError"),C=(Object(p.a)("provider/providerSettings/fetchProviderSettingLocationOptions"),
Object(p.a)("provider/providerSettings/populateProviderSettingLocationOptions")),O=Object(p.a)("provider/providerSettings/updateProviderSetting"),P=Object(p.a)("provider/providerSettings/clearProviderSettingUpdateError"),j=Object(p.a)("provider/providerSettings/populateProviderSettingOptions"),T=(s={},s["provider/providerSettings/fetchProviderSettings"]=Object(g.a)({key:"settings",getModel:i}),s["provider/providerSettings/fetchProviderSettingSelectOptions"]=Object(g.a)({key:"options",getModel:r
}),s["provider/providerSettings/fetchProviderSettingLocationOptions"]=Object(g.a)({key:"locations",getModel:r}),s["provider/providerSettings/populateProviderSettingLocationOptions"]=Object(m.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.i)(e,t),a=r.get("features").get(f.b.SETTINGS),s=e.get("ui").get("providerSettingsPage"),l=a.get("settings").get(n);s.set({isUpdatePending:!0,updateError:null});var u=[];l.get("type")===v.c.GROUP?l.get("settings").forEach(function(e){var t,n=(t={},t[e.id]=i[e.id],t);u.push(o(e,n,r))}):u.push(o(l,i,r)),c.a.when.apply(c.a,u).then(function(){s.set({isUpdatePending:!1,updateError:null})},function(e){s.set({isUpdatePending:!1,updateError:Object(I.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.i)(e,t).get("features").get(f.b.SETTINGS).get("settings").get(t.settingID).set({optionsError:null,locationsError:null})},s["provider/providerSettings/populateProviderSettingOptions"]=function(e,t,n){
var i=Object(y.i)(e,t),r=i.get("features"),a=r.get(f.b.SETTINGS),o=a.get("settings").get(t.settingID),s=o.get("type");s===v.c.SELECT&&Object(b.a)(function(){n(M(t))}),s===v.c.LOCATION&&n(C(t))},s)},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(3474)),c=n.n(l);i.defaultProps={className:c.a.sectionDetails},t.a=i},function(e,t,n){"use strict";function i(e){
return e.get("experienceSettings").get("homeSettings")}function r(e){return e.get("ui").get("homePage")}n.d(t,"f",function(){return w}),n.d(t,"a",function(){return E}),n.d(t,"b",function(){return x}),n.d(t,"c",function(){return A}),n.d(t,"d",function(){return N}),n.d(t,"g",function(){return L}),n.d(t,"h",function(){return k}),n.d(t,"e",function(){return R})
;var a,o=n(6),s=n.n(o),l=n(13),c=n.n(l),u=n(39),d=n(29),p=n(305),h=n(60),f=n(315),v=n(108),g=n(957),m=n(30),y=n(41),b=n(506),I=n(66),S=n(3510),M=n(3511),D=n(1323),C=n(3513),O=n(3514),P=n(135),j=n(131),T=n(204),w=Object(u.a)("home/initHomePage"),E=Object(u.a)("home/fetchHomeContent"),x=Object(u.a)("home/fetchHomeHubs"),A=Object(u.a)("home/fetchPreferredServerContent"),N=Object(u.a)("home/fetchProviderPromotedContent"),L=Object(u.a)("home/resetHomePage"),k=Object(u.a)("home/updateHomeHubsStatus"),_=void 0,R=(a={},
a["home/initHomePage"]=function(e,t,n){var r=i(e).get("hubs");b.a.startPeriod("client:view:"+m.D),Object(O.a)(r).forEach(function(e){var t=e.identifier,i=e.homeHubIDs,r=e.machineIdentifier,a={skipCache:!0},o=new v.c({machineIdentifier:r},a),l=new f.a({identifier:t},s()({},a,{server:o}));n(k({homeHubIDs:i,status:{provider:l.entityID(),server:o.entityID()}})),l.uninitialize(),o.uninitialize()})},a["home/resetHomePage"]=function(e,t){_=clearTimeout(_),r(e).restoreDefaults()},
a["home/updateHomeHubsStatus"]=function(e,t){var n=t.homeHubIDs,i=t.status;r(e).get("homeHubStatuses").set(n.map(function(e){return s()({},i,{homeHubID:e})}),{remove:!1})},a["home/fetchHomeHubs"]=function(e,t,n){var r=t.homeHubIDs,a=t.fetchDelayMS,o=i(e),s=o.get("hubs"),l=s.get(r[0]),u=l.get("server").get("machineIdentifier"),p=l.get("provider").get("identifier"),h=l.get("directoryKey");n(k({homeHubIDs:r,status:{error:null,isPending:!0,isPopulated:!1}}))
;var f=e.get("servers").findServer(u).then(function(e){return e.get("isOutOfDate")||!e.get("activeConnection")?c.a.Deferred().reject(e).promise():c.a.Deferred().resolve(e).promise()});f=f.then(function(t){var n=t.get("isCloud")?Object(I.l)(e):t;return Object(M.a)(n.get("providers"),{identifier:p})}),a>0&&(f=f.then(function(e){var t=c.a.Deferred();return setTimeout(t.resolve.bind(null,e),a),t.promise()})),f=f.then(function(e){return Object(D.b)({hubKey:h,provider:e,server:e.server}).fetch()}),
f.then(function(e){r.forEach(function(t){var i=s.get(t);if(i){var r={isPending:!1},a=e.findWhere({hubIdentifier:i.get("hubIdentifier")});a?(r.isPopulated=!0,r.hub=a,r.provider=e.provider.entityID(),r.server=e.provider.server.entityID()):(r.error={isContentUnavailable:!0},d.a.warn("[Home] home/fetchHomeHubs: missing",i)),n(k({homeHubIDs:[t],status:r}))}})},function(){n(k({homeHubIDs:r,status:{isPending:!1,error:{}}}))})},a["home/fetchHomeContent"]=Object(g.a)({key:"content",
getModel:function(e,t){return e.get("ui").get("homePage")},fetch:function(e,t,n){var r=i(e).get("hubs"),a=c.a.Deferred();return r.length?(Object(O.a)(r).forEach(function(e){n(x({homeHubIDs:e.homeHubIDs}))}),_=clearTimeout(_),_=setTimeout(a.resolve,1e3),a.promise()):a.resolve().promise()}}),a["home/fetchPreferredServerContent"]=Object(g.a)({key:"preferredServerContent",getModel:function(e,t){return e.get("ui").get("homePage")},fetch:function(e,t,n){var r=i(e),a={identifier:y.d
},o=r.get("preferredServerID"),s=e.get("servers").findServer(o);return s=s.then(function(e){return Object(M.a)(e.get("providers"),a)}),s=s.then(function(e){return Object(C.a)({provider:e,server:e.server,directoryKey:"/hubs"})}),s.then(function(e){var t=e.directoryKey,i=e.hubModels,r=i.map(function(e){return{directoryKey:t,model:e}});n(Object(T.o)({hubs:r}))},function(){return c.a.Deferred().reject({}).promise()})}}),a["home/fetchProviderPromotedContent"]=Object(g.a)({
key:"providerPromotedContent",getModel:function(e,t){return e.get("ui").get("homePage")},fetch:function(e,t,n){var i={type:h.b.PROMOTED},r=Object(S.a)(e);return r=r.then(function(e){var t=e.reduce(function(e,t){var n=t.get("features").findWhere(i);return n&&e.push(n),e},[]);return Object(p.a)(t.map(function(e){return Object(C.a)({directoryKey:e.get("key"),onlyPromoted:!0,provider:e.provider,server:e.server})}))}),r.then(function(){
for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var r=t.reduce(function(e,t){var n=t.directoryKey,i=t.hubModels;return e.push.apply(e,i.map(function(e){return{directoryKey:n,model:e}})),e},[]);n(Object(T.p)({hubs:r}))},function(){return c.a.Deferred().reject({}).promise()})}}),a[j.a]=function(e,t,n){r(e).get("homeHubStatuses").each(function(e){var t=e.get("hub");if(t){var i=t.get("metadataList")||t.get("directoryList");!t.get("random")&&i.get("containerKey")&&n(Object(P.h)({
metadataListEntityID:i.entityID(),count:D.a}))}})},a[T.a]=function(e,t){e.get("ui").get("homePage").restoreDefaults()},a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(a.a,function(e,t){return t.homeHubID},function(e,t){return e.hubs.find(function(e){return e.id===t})})}t.a=i;var r=n(5),a=(n.n(r),n(344))},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";function i(e){return Object(r.createSelector)(function(e,t){return t.libraryKey},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.sourceDirectory},function(t,n,i,r,s,l){var c={filters:n,sort:i,limit:r};return l.type!==a.g&&s&&s.key?Object(o.a)([s.key.replace("/all?","/"+e+"?")],c):Object(o.a)([t,e],c)})}t.a=i
;var r=n(5),a=(n.n(r),n(26)),o=n(840)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.selectedListStyle,i=e.allListStyles;return Object(c.g)(i,n)?a()(l.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(493)),c=n(62);i.defaultProps={selectedListStyle:c.c,allListStyles:[c.c]},t.a=i},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(5),a=(n.n(r),n(720)),o=n(132)},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()(p.a,{innerClassName:g.a.searchPageContent},void 0,n.map(function(e){return u.a.createElement(f.a,a()({key:e.providerEntityID,columnAdjustment:r,searchAllServers:i},e))})):s()(h.a,{title:Object(d.default)("This server does not support search"),
description:Object(d.default)("Browse libraries using the sidebar")})}var r=n(6),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(3),p=n(140),h=n(113),f=n(3695),v=n(3702),g=n.n(v);i.defaultProps={searchAllServers:!1},t.a=i},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(u.default)("There was an unexpected error loading this item")}):a()(p.a,{metricsPage:c.S,isMetricsDelegated:!0,disableBackgroundPreset:!0,scrollDirection:l.NONE},void 0,d?a()(v.a,{serverEntityID:t,providerEntityID:n,toolbarComponent:S,
allowRedirectOnDelete:!0}):a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(g.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(54)),c=n(30),u=n(3),d=n(31),p=n(83),h=n(73),f=n(184),v=n(415),g=n(3708),m=n(3805),y=a()(h.a,{},void 0,a()(d.a,{}));t.a=i},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(l.a,Object(o.a)(),Object(s.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=n.metadataItems.length,r=1===i&&!!t.primaryExtraKey;return{metadataItemEntityIDs:n.metadataItems,containerKey:n.containerKey,size:r?0:i,populatedRange:n.populatedRange}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(119),l=n(37),c=n(3749);t.a=Object(r.b)(i)(c.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()(l.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(418)),c=n(44),u=n.n(c),d=n(3761),p=n.n(d),h=parseInt(u.a.pagePadding,10),f=parseInt(p.a.defaultFontSize,10),v=parseFloat(p.a.lineHeightComputed,10);t.a=i},function(e,t,n){"use strict";function i(e,t){return Object(o.createSelector)(function(e,t){return t.playlistItemEntityID
},Object(l.a)(),Object(s.a)(),u.a,d.a,function(e,t,n,i,r){var a=t.playlistItemID;return{itemServerEntityID:n.serverEntityID,itemProviderEntityID:n.providerEntityID,metadataItemEntityID:n.entityID,metadataKey:n.key,title:n.title,selectionID:e,selectionType:n.type,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(5),s=(n.n(o),n(1374)),l=n(860),c=n(290),u=n(595),d=n(74),p=n(479),h=n(596),f=n(3771),v=Object(a.b)(i,r)(Object(p.a)(f.a));t.a=v},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(5),a=(n.n(r),n(494))},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e){return e.ui.prePlayPage
},c.a,p.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(5),l=(n.n(s),n(70)),c=n(1390),u=n(120),d=n(252),p=n(74),h=n(856),f=Object(u.a)(h.a,r,a),v=Object(o.b)(i)(f);t.a=v},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e){return e.ui.prePlayPage},c.a,p.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(5),l=(n.n(s),n(70)),c=n(1390),u=n(120),d=n(252),p=n(74),h=n(3863),f=Object(u.a)(h.a,r,a),v=Object(o.b)(i)(f);t.a=v},function(e,t,n){"use strict"
;function i(e){return e.get("user").get("profile")}function r(e){return e.get("ui").get("accountSettingsPage")}n.d(t,"c",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"a",function(){return u});var a,o=n(39),s=n(367),l=Object(o.a)("ui/accountSettingsPage/updateUserProfile"),c=Object(o.a)("ui/accountSettingsPage/clearUpdateUserProfileError"),u=(a={},a["ui/accountSettingsPage/updateUserProfile"]=function(e,t){var n=i(e),a=r(e);a.set({isUpdatingUserProfile:!0,
updateUserProfileError:null}),n.save(t,{type:"PUT",wait:!0}).done(function(){n.set(t),a.set({isUpdatingUserProfile:!1,updateUserProfileError:null})}).fail(function(e){a.set({isUpdatingUserProfile:!1,updateUserProfileError:Object(s.a)(e)})})},a["ui/accountSettingsPage/clearUpdateUserProfileError"]=function(e){r(e).set("updateUserProfileError",null)},a)},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"
;var i,r=n(235),a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=function(){var e;i.prototype.init.call(this),this.push=function(t){var n,i,r,o,s,l,c=0,u=0;if("audio"===t.type)for(e?(o=e,e=new Uint8Array(o.byteLength+t.data.byteLength),e.set(o),e.set(t.data,o.byteLength)):e=t.data;c+5<e.length;)if(255===e[c]&&240==(246&e[c+1])){if(i=2*(1&~e[c+1]),n=(3&e[c+3])<<11|e[c+4]<<3|(224&e[c+5])>>5,s=1024*(1+(3&e[c+6])),l=9e4*s/a[(60&e[c+2])>>>2],r=c+n,e.byteLength<r)return
;if(this.trigger("data",{pts:t.pts+u*l,dts:t.dts+u*l,sampleCount:s,audioobjecttype:1+(e[c+2]>>>6&3),channelcount:(1&e[c+2])<<2|(192&e[c+3])>>>6,samplerate:a[(60&e[c+2])>>>2],samplingfrequencyindex:(60&e[c+2])>>>2,samplesize:16,data:e.subarray(c+7+i,r)}),e.byteLength===r)return void(e=void 0);u++,e=e.subarray(r)}else c++},this.flush=function(){this.trigger("done")}},i.prototype=new r,e.exports=i},function(e,t,n){"use strict";var i,r,a,o=n(235),s=n(4025);r=function(){var e,t,n=0
;r.prototype.init.call(this),this.push=function(i){var r;for(t?(r=new Uint8Array(t.byteLength+i.data.byteLength),r.set(t),r.set(i.data,t.byteLength),t=r):t=i.data;n<t.byteLength-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<t.byteLength;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<t.length);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,
e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")}},r.prototype=new o,a={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},i=function(){var e,t,n,o,l,c,u,d=new r;i.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,o=e.dts,d.push(e))},d.on("data",function(i){var r={trackId:t,pts:n,dts:o,data:i};switch(31&i[0]){
case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=l(i.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=l(i.subarray(1)),r.config=c(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",r)}),d.on("done",function(){e.trigger("done")}),this.flush=function(){d.flush()},u=function(e,t){var n,i,r=8,a=8
;for(n=0;n<e;n++)0!==a&&(i=t.readExpGolomb(),a=(r+i+256)%256),r=0===a?r:a},l=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===r[0]&&(o++,r.shift()),n[a]=e[o];return n},c=function(e){var t,n,i,r,o,l,c,d,p,h,f,v,g,m=0,y=0,b=0,I=0,S=1;if(t=new s(e),n=t.readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),
a[n]&&(o=t.readUnsignedExpGolomb(),3===o&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(f=3!==o?8:12,g=0;g<f;g++)t.readBoolean()&&(g<6?u(16,t):u(64,t));if(t.skipUnsignedExpGolomb(),0===(l=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===l)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),c=t.readUnsignedExpGolomb(),g=0;g<c;g++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),
p=t.readUnsignedExpGolomb(),h=t.readBits(1),0===h&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb(),I=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11]
;break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(S=v[0]/v[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:Math.ceil((16*(d+1)-2*m-2*y)*S),height:(2-h)*(p+1)*16-2*b-2*I}}},i.prototype=new o,e.exports={H264Stream:i,NalByteStream:r}},function(e,t,n){"use strict"
;var i,r,a,o,s,l=n(4027).toUnsigned;i=function(e,t){var n,a,o,s,c,u=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=l(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),o=r(e.subarray(n+4,n+8)),s=a>1?n+a:e.byteLength,o===t[0]&&(1===t.length?u.push(e.subarray(n+8,s)):(c=i(e.subarray(n+8,s),t.slice(1)),c.length&&(u=u.concat(c)))),n=s;return u},r=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},a=function(e){
var t={};return i(e,["moov","trak"]).reduce(function(e,t){var n,r,a,o,s;return(n=i(t,["tkhd"])[0])?(r=n[0],a=0===r?12:20,o=l(n[a]<<24|n[a+1]<<16|n[a+2]<<8|n[a+3]),(s=i(t,["mdia","mdhd"])[0])?(r=s[0],a=0===r?12:20,e[o]=l(s[a]<<24|s[a+1]<<16|s[a+2]<<8|s[a+3]),e):null):null},t)},o=function(e,t){var n,r,a;return n=i(t,["moof","traf"]),r=[].concat.apply([],n.map(function(t){return i(t,["tfhd"]).map(function(n){var r,a,o;return r=l(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,
o=i(t,["tfdt"]).map(function(e){var t,n;return t=e[0],n=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n})[0],(o=o||1/0)/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0},s=function(e){var t=i(e,["moov","trak"]),n=[];return t.forEach(function(e){var t=i(e,["mdia","hdlr"]),a=i(e,["tkhd"]);t.forEach(function(e,t){var i,o,s,l=r(e.subarray(8,12)),c=a[t];"vide"===l&&(i=new DataView(c.buffer,c.byteOffset,c.byteLength),o=i.getUint8(0),
s=0===o?i.getUint32(12):i.getUint32(20),n.push(s))})}),n},e.exports={findBox:i,parseType:r,timescale:a,startTime:o,videoTrackIds:s}},function(e,t,n){"use strict";var i,r,a,o,s=n(235),l=n(1411),c=n(4028),u=n(4029),d=n(4032),p=n(869),h=n(865),f=n(866).H264Stream,v=n(4034),g=n(870).isLikelyAacData,m=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],y=["width","height","profileIdc","levelIdc","profileCompatibility"],b=function(e,t){var n
;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};r=function(e,t){var n=[],i=0,a=0,o=0,s=1/0;t=t||{},r.prototype.init.call(this),this.push=function(t){d.collectDtsInfo(e,t),e&&m.forEach(function(n){e[n]=t[n]}),n.push(t)},this.setEarliestDts=function(t){a=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var r,c,p,h
;if(0===n.length)return void this.trigger("done","AudioSegmentStream");r=u.trimAdtsFramesByEarliestDts(n,e,a),e.baseMediaDecodeTime=d.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),u.prefixWithSilence(e,r,o,s),e.samples=u.generateSampleTable(r),p=l.mdat(u.concatenateFrameData(r)),n=[],c=l.moof(i,[e]),h=new Uint8Array(c.byteLength+p.byteLength),i++,h.set(c),h.set(p,c.byteLength),d.clearDtsInfo(e),this.trigger("data",{track:e,boxes:h}),this.trigger("done","AudioSegmentStream")}},
r.prototype=new s,i=function(e,t){var n,r,a=0,o=[],s=[];t=t||{},i.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){d.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],y.forEach(function(t){e[t]=n[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,i,r,u,p,h;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift()
;if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=c.groupNalsIntoFrames(o),r=c.groupFramesIntoGops(n),r[0][0].keyFrame||(i=this.getGopForFusion_(o[0],e),i?(r.unshift(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.pts=i.pts,r.dts=i.dts,r.duration+=i.duration):r=c.extendFirstKeyFrame(r)),s.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r)))return this.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),
this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");d.clearDtsInfo(e),r=f}d.collectDtsInfo(e,r),e.samples=c.generateSampleTable(r),p=l.mdat(c.concatenateNalData(r)),e.baseMediaDecodeTime=d.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",r.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),this.gopCache_.unshift({gop:r.pop(),pps:e.pps,sps:e.sps}),
this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=l.moof(a,[e]),h=new Uint8Array(u.byteLength+p.byteLength),a++,h.set(u),h.set(p,u.byteLength),this.trigger("data",{track:e,boxes:h}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){d.clearDtsInfo(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,i,r,a,o,s=1/0
;for(o=0;o<this.gopCache_.length;o++)a=this.gopCache_[o],r=a.gop,e.pps&&b(e.pps[0],a.pps[0])&&e.sps&&b(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||s>n)&&(i=a,s=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,a,o,l,c;for(a=e.byteLength,o=e.nalCount,l=e.duration,t=n=0;t<s.length&&n<e.length&&(i=s[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,a-=r.byteLength,o-=r.nalCount,l-=r.duration)
;return 0===n?e:n===e.length?null:(c=e.slice(n),c.byteLength=a,c.duration=l,c.nalCount=o,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,n,i,r,a,o;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(i=s[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;var l;if(0===(l=o?n:a))return e;var c=e.slice(l),u=c.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{
byteLength:0,duration:0,nalCount:0});return c.byteLength=u.byteLength,c.duration=u.duration,c.nalCount=u.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){s=e}},i.prototype=new s,o=function(e,t){this.numberOfTracks=0,this.metadataStream=t,e=e||{},void 0!==e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps&&(this.keepOriginalTimestamps=e.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],
this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,o.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}},o.prototype=new s,o.prototype.flush=function(e){var t,n,i,r,a=0,o={
captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return void(++this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,y.forEach(function(e){o.info[e]=this.videoTrack[e]
},this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,m.forEach(function(e){o.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,i=l.initSegment(this.pendingTracks),o.initSegment=new Uint8Array(i.byteLength),o.initSegment.set(i),o.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)o.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength
;for(r=0;r<this.pendingCaptions.length;r++)t=this.pendingCaptions[r],t.startTime=t.startPts,this.keepOriginalTimestamps||(t.startTime-=s),t.startTime/=9e4,t.endTime=t.endPts,this.keepOriginalTimestamps||(t.endTime-=s),t.endTime/=9e4,o.captionStreams[t.stream]=!0,o.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)n=this.pendingMetadata[r],n.cueTime=n.pts,this.keepOriginalTimestamps||(n.cueTime-=s),n.cueTime/=9e4,o.metadata.push(n)
;o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},a=function(e){var t,n,s=this,l=!0;a.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},
this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new p.MetadataStream,t.aacStream=new v,t.audioTimestampRolloverStream=new p.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new p.TimestampRolloverStream("timed-metadata"),t.adtsStream=new h,t.coalesceStream=new o(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),
t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(i){"timed-metadata"!==i.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new r(n,e),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))}),
t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var a={};this.transmuxPipeline_=a,a.type="ts",a.metadataStream=new p.MetadataStream,a.packetStream=new p.TransportPacketStream,a.parseStream=new p.TransportParseStream,a.elementaryStream=new p.ElementaryStream,a.videoTimestampRolloverStream=new p.TimestampRolloverStream("video"),
a.audioTimestampRolloverStream=new p.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new p.TimestampRolloverStream("timed-metadata"),a.adtsStream=new h,a.h264Stream=new f,a.captionStream=new p.CaptionStream,a.coalesceStream=new o(e,a.metadataStream),a.headOfPipeline=a.packetStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream),a.elementaryStream.pipe(a.videoTimestampRolloverStream).pipe(a.h264Stream),
a.elementaryStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.elementaryStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.h264Stream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",function(o){var l;if("metadata"===o.type){for(l=o.tracks.length;l--;)t||"video"!==o.tracks[l].type?n||"audio"!==o.tracks[l].type||(n=o.tracks[l],n.timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=o.tracks[l],
t.timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime);t&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new i(t,e),a.videoSegmentStream.on("timelineStartInfo",function(e){n&&(n.timelineStartInfo=e,a.audioSegmentStream.setEarliestDts(e.dts))}),a.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),
a.h264Stream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),n&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new r(n,e),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream))}}),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),
n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,d.clearDtsInfo(n),e.keepOriginalTimestamps||(n.timelineStartInfo.baseMediaDecodeTime=i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,d.clearDtsInfo(t),r.captionStream.reset(),
e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=i)),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(l){var t=g(e)
;t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),l=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){l=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},a.prototype=new s,e.exports={Transmuxer:a,VideoSegmentStream:i,AudioSegmentStream:r,AUDIO_PROPERTIES:m,VIDEO_PROPERTIES:y}
},function(e,t,n){"use strict";var i,r,a,o=n(235),s=n(1412),l=n(495),c=n(1414).TimestampRolloverStream,u=n(495);i=function(){var e=new Uint8Array(188),t=0;i.prototype.init.call(this),this.push=function(n){var i,r=0,a=188;for(t?(i=new Uint8Array(n.byteLength+t),i.set(e.subarray(0,t)),i.set(n,t),t=0):i=n;a<i.byteLength;)71!==i[r]||71!==i[a]?(r++,a++):(this.trigger("data",i.subarray(r,a)),r+=188,a+=188);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){
188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}},i.prototype=new o,r=function(){var e,t,n,i;r.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r,a,o;if(1&e[5]){
for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=(15&e[1])<<8|e[2],r=3+n-4,a=(15&e[10])<<8|e[11],o=12+a;o<r;){var s=e[o],c=(31&e[o+1])<<8|e[o+2];s===l.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=c:s===l.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=c:s===l.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][c]=s),o+=5+((15&e[o+3])<<8|e[o+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4
;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){
n.pid===this.programMapTable.video?n.streamType=l.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=l.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},r.prototype=new o,r.STREAM_TYPES={h264:27,adts:15},a=function(){var e=this,t={data:[],size:0},n={data:[],size:0},i={data:[],size:0},r=function(e,t){var n;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),n=e[7],
192&n&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])},o=function(t,n,i){var a,o=new Uint8Array(t.size),s={type:n},l=0,c=0,u=!1;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,l=0;l<t.data.length;l++)a=t.data[l],o.set(a.data,c),c+=a.data.byteLength;r(o,s),
u="video"===n||s.packetLength<=t.size,(i||u)&&(t.size=0,t.data.length=0),u&&e.trigger("data",s)}};a.prototype.init.call(this),this.push=function(r){({pat:function(){},pes:function(){var e,a;switch(r.streamType){case l.H264_STREAM_TYPE:case u.H264_STREAM_TYPE:e=t,a="video";break;case l.ADTS_STREAM_TYPE:e=n,a="audio";break;case l.METADATA_STREAM_TYPE:e=i,a="timed-metadata";break;default:return}r.payloadUnitStartIndicator&&o(e,a,!0),e.data.push(r),e.size+=r.data.byteLength},pmt:function(){var t={
type:"metadata",tracks:[]},n=r.programMapTable;null!==n.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[r.type]()},this.flush=function(){o(t,"video"),o(n,"audio"),o(i,"timed-metadata"),this.trigger("done")}},a.prototype=new o;var d={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:i,
TransportParseStream:r,ElementaryStream:a,TimestampRolloverStream:c,CaptionStream:s.CaptionStream,Cea608Stream:s.Cea608Stream,MetadataStream:n(4033)};for(var p in l)l.hasOwnProperty(p)&&(d[p]=l[p]);e.exports=d},function(e,t,n){"use strict";var i=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},a=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},o=function(e,t,n){var i,r=""
;for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},s=function(e,t,n){return unescape(o(e,t,n))},l=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},c=function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},u=function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},d=function(e){for(var t=0;t+5<e.length;){
if(255===e[t]&&240==(246&e[t+1]))return i[(60&e[t+2])>>>2];t++}return null},p=function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=a(e.subarray(10,14)));do{if((n=a(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var r=0;r<i.byteLength;r++)if(0===i[r]){var o=s(i,0,r);if("com.apple.streaming.transportStreamTimestamp"===o){var l=i.subarray(r+1),c=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;return c*=4,c+=3&l[7]}break}}t+=10,
t+=n}while(t<e.byteLength);return null};e.exports={isLikelyAacData:r,parseId3TagSize:l,parseAdtsSize:c,parseType:u,parseSampleRate:d,parseAacTimestamp:p}},function(e,t,n){"use strict";var i;i=function(e,t){var n,r=0,a=16384,o=function(e,t){var n,i=e.position+t;i<e.bytes.byteLength||(n=new Uint8Array(2*i),n.set(e.bytes.subarray(0,e.position),0),e.bytes=n,e.view=new DataView(e.bytes.buffer))
},s=i.widthBytes||new Uint8Array("width".length),l=i.heightBytes||new Uint8Array("height".length),c=i.videocodecidBytes||new Uint8Array("videocodecid".length);if(!i.widthBytes){for(n=0;n<"width".length;n++)s[n]="width".charCodeAt(n);for(n=0;n<"height".length;n++)l[n]="height".charCodeAt(n);for(n=0;n<"videocodecid".length;n++)c[n]="videocodecid".charCodeAt(n);i.widthBytes=s,i.heightBytes=l,i.videocodecidBytes=c}switch(this.keyFrame=!1,e){case i.VIDEO_TAG:this.length=16,a*=6;break
;case i.AUDIO_TAG:this.length=13,this.keyFrame=!0;break;case i.METADATA_TAG:this.length=29,this.keyFrame=!0;break;default:throw new Error("Unknown FLV tag type")}this.bytes=new Uint8Array(a),this.view=new DataView(this.bytes.buffer),this.bytes[0]=e,this.position=this.length,this.keyFrame=t,this.pts=0,this.dts=0,this.writeBytes=function(e,t,n){var i,r=t||0;n=n||e.byteLength,i=r+n,o(this,n),this.bytes.set(e.subarray(r,i),this.position),this.position+=n,
this.length=Math.max(this.length,this.position)},this.writeByte=function(e){o(this,1),this.bytes[this.position]=e,this.position++,this.length=Math.max(this.length,this.position)},this.writeShort=function(e){o(this,2),this.view.setUint16(this.position,e),this.position+=2,this.length=Math.max(this.length,this.position)},this.negIndex=function(e){return this.bytes[this.length-e]},this.nalUnitSize=function(){return 0===r?0:this.length-(r+4)},this.startNalUnit=function(){
if(r>0)throw new Error("Attempted to create new NAL wihout closing the old one");r=this.length,this.length+=4,this.position=this.length},this.endNalUnit=function(e){var t,n;this.length===r+4?this.length-=4:r>0&&(t=r+4,n=this.length-t,this.position=r,this.view.setUint32(this.position,n),this.position=this.length,e&&e.push(this.bytes.subarray(t,t+n))),r=0},this.writeMetaDataDouble=function(e,t){var n;if(o(this,2+e.length+9),this.view.setUint16(this.position,e.length),this.position+=2,
"width"===e)this.bytes.set(s,this.position),this.position+=5;else if("height"===e)this.bytes.set(l,this.position),this.position+=6;else if("videocodecid"===e)this.bytes.set(c,this.position),this.position+=12;else for(n=0;n<e.length;n++)this.bytes[this.position]=e.charCodeAt(n),this.position++;this.position++,this.view.setFloat64(this.position,t),this.position+=8,this.length=Math.max(this.length,this.position),++r},this.writeMetaDataBoolean=function(e,t){var n;for(o(this,2),
this.view.setUint16(this.position,e.length),this.position+=2,n=0;n<e.length;n++)o(this,1),this.bytes[this.position]=e.charCodeAt(n),this.position++;o(this,2),this.view.setUint8(this.position,1),this.position++,this.view.setUint8(this.position,t?1:0),this.position++,this.length=Math.max(this.length,this.position),++r},this.finalize=function(){var e,n;switch(this.bytes[0]){case i.VIDEO_TAG:this.bytes[11]=7|(this.keyFrame||t?16:32),this.bytes[12]=t?0:1,e=this.pts-this.dts,
this.bytes[13]=(16711680&e)>>>16,this.bytes[14]=(65280&e)>>>8,this.bytes[15]=(255&e)>>>0;break;case i.AUDIO_TAG:this.bytes[11]=175,this.bytes[12]=t?0:1;break;case i.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,r),this.position=this.length,
this.bytes.set([0,0,9],this.position),this.position+=3,this.length=this.position}return n=this.length-11,this.bytes[1]=(16711680&n)>>>16,this.bytes[2]=(65280&n)>>>8,this.bytes[3]=(255&n)>>>0,this.bytes[4]=(16711680&this.dts)>>>16,this.bytes[5]=(65280&this.dts)>>>8,this.bytes[6]=(255&this.dts)>>>0,this.bytes[7]=(4278190080&this.dts)>>>24,this.bytes[8]=0,this.bytes[9]=0,this.bytes[10]=0,o(this,4),this.view.setUint32(this.length,this.length),this.length+=4,this.position+=4,
this.bytes=this.bytes.subarray(0,this.length),this.frameTime=i.frameTime(this.bytes),this}},i.AUDIO_TAG=8,i.VIDEO_TAG=9,i.METADATA_TAG=18,i.isAudioFrame=function(e){return i.AUDIO_TAG===e[0]},i.isVideoFrame=function(e){return i.VIDEO_TAG===e[0]},i.isMetaData=function(e){return i.METADATA_TAG===e[0]},i.isKeyFrame=function(e){return i.isVideoFrame(e)?23===e[11]:!!i.isAudioFrame(e)||!!i.isMetaData(e)},i.frameTime=function(e){var t=e[4]<<16;return t|=e[5]<<8,t|=e[6]<<0,t|=e[7]<<24},e.exports=i
},function(e,t,n){"use strict";var i=n(19),r=n(17),a=n(16),o=n(65),s=n(97),l=n(121),c=n(4152),u=r.a.extend({name:"SearchModel",context:["server","provider","includeCollections"],responseType:function(){return Object(s.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(l.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){e.exports=!n(360)&&!n(301)(function(){
return 7!=Object.defineProperty(n(892)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(300),r=n(201).document,a=i(r)&&i(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},function(e,t,n){var i=n(302),r=n(303),a=n(1458)(!1),o=n(639)("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(637)
;e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){var i=n(638),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},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(150),r=n(501),a=n(301),o=n(644),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(150),r=n(106),a=n(301);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(646),r=n(150),a=n(900),o=n(359),s=n(428),l=n(1475),c=n(648),u=n(901),d=n(219)("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,P=O[d]||O["@@iterator"]||v&&O[v],j=P||S(v),T=v?D?S("entries"):j:void 0,w="Array"==t?O.entries||P:P;if(w&&(I=u(w.call(new e)))!==Object.prototype&&I.next&&(c(I,M,!0),i||"function"==typeof I[d]||o(I,d,h)),D&&P&&"values"!==P.name&&(C=!0,j=function(){return P.call(this)}),i&&!m||!p&&!C&&O[d]||o(O,d,j),s[t]=j,s[M]=h,v)if(y={values:D?j:S("values"),keys:g?j:S("keys"),entries:T},
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(359)},function(e,t,n){var i=n(302),r=n(427),a=n(639)("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){n(1478)
;for(var i=n(201),r=n(359),a=n(428),o=n(219)("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){e.exports={default:n(1481),__esModule:!0}},function(e,t,n){"use strict"
;var i=n(201),r=n(302),a=n(360),o=n(150),s=n(900),l=n(1482).KEY,c=n(301),u=n(640),d=n(648),p=n(502),h=n(219),f=n(649),v=n(650),g=n(1483),m=n(1484),y=n(299),b=n(300),I=n(303),S=n(636),M=n(425),D=n(647),C=n(1485),O=n(906),P=n(298),j=n(361),T=O.f,w=P.f,E=C.f,x=i.Symbol,A=i.JSON,N=A&&A.stringify,L=h("_hidden"),k=h("toPrimitive"),_={}.propertyIsEnumerable,R=u("symbol-registry"),z=u("symbols"),U=u("op-symbols"),B=Object.prototype,F="function"==typeof x,V=i.QObject,H=!V||!V.prototype||!V.prototype.findChild,Q=a&&c(function(){
return 7!=D(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=T(B,t);i&&delete B[t],w(e,t,n),i&&e!==B&&w(B,t,i)}:w,Y=function(e){var t=z[e]=D(x.prototype);return t._k=e,t},G=F&&"symbol"==typeof x.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof x},W=function(e,t,n){return e===B&&W(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)||w(e,L,M(1,{})),e[L][t]=!0),
Q(e,t,n)):w(e,t,n)},K=function(e,t){y(e);for(var n,i=g(t=I(t)),r=0,a=i.length;a>r;)W(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=T(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};F||(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),Q(this,e,M(1,n))};return a&&H&&Q(B,e,{configurable:!0,set:t}),Y(e)},
s(x.prototype,"toString",function(){return this._k}),O.f=X,P.f=W,n(905).f=C.f=J,n(426).f=Z,n(642).f=$,a&&!n(646)&&s(B,"propertyIsEnumerable",Z,!0),f.f=function(e){return Y(h(e))}),o(o.G+o.W+o.F*!F,{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=j(h.store),ie=0;ne.length>ie;)v(ne[ie++]);o(o.S+o.F*!F,"Symbol",{for:function(e){return r(R,e+="")?R[e]:R[e]=x(e)
},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in R)if(R[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),o(o.S+o.F*!F,"Object",{create:q,defineProperty:W,defineProperties:K,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:$}),A&&o(o.S+o.F*(!F||c(function(){var e=x();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(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)&&!G(e))return m(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),i[1]=t,N.apply(A,i)}}),x.prototype[k]||n(359)(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(893),r=n(641).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){
var i=n(426),r=n(425),a=n(303),o=n(636),s=n(302),l=n(891),c=Object.getOwnPropertyDescriptor;t.f=n(360)?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(651),r=i.a.extend({supportsRetry:function(e){return e.get("isCloud")}});t.a=r},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(7),a=n.n(r),o=n(29);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(53),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(7),a=n.n(r);t.a=i},function(e,t,n){"use strict";n.d(t,"f",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"d",function(){return o}),n.d(t,"e",function(){return s}),
n.d(t,"a",function(){return l});var i="untested",r="pending",a="connected",o="unauthorized",s="unavailable",l="aborted"},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";var i=n(363),r=new i.a({interface:["init","enable","disable","set","capture"]});t.a=r},function(e,t,n){"use strict";var i=n(94),r=n(651),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";var i=n(19),r=n(24),a=n(65),o=n(1544),s=r.a.extend({
name:"UserFeatureCollection",context:["server"],model:o.a,url:i.join(["https://plex.tv","/api/v2/features"]),responseType:a.a.json});t.a=s},function(e,t,n){"use strict";var i=n(24),r=n(659),a=i.a.extend({name:"UserSubscriptionCollection",model:r.a});t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="lite",r=["","lifetime","yearly","monthly",i,"comped","pro","six_months","premium"];t.b=r},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(17),o=n(16),s=n(1549),l=a.a.extend({name:"StoredServerModel",idAttribute:"machineIdentifier",syncedAttrs:{machineIdentifier:o.a.string,friendlyName:o.a.string,accessToken:o.a.string,sourceTitle:o.a.string,home:o.a.boolean,synced:o.a.boolean,serverClass:o.a.string,platform:o.a.string,isShared:o.a.boolean,version:o.a.string,publicAddressMatches:o.a.boolean,ownerId:o.a.integer,mediaProviders:o.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(24),r=n(1553),a=i.a.extend({name:"UserEntitlementCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1554),a=i.a.extend({name:"UserProviderCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1555),a=i.a.extend({name:"UserRoleCollection",model:r.a});t.a=a},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(220),r=n(664),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";function i(e,t){switch(e){case s.INT:case s.ENUM:return o.a.parseInteger(t);case s.BOOL:return o.a.parseBoolean(t);case s.DOUBLE:return o.a.parseFloat(t);default:return t}}n.d(t,"b",function(){return s});var r=n(17),a=n(16),o=n(63),s={INT:"int",TEXT:"text",BOOL:"bool",
DOUBLE:"double"},l=r.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";n.d(t,"a",function(){return i});var i=0},function(e,t,n){"use strict";function i(e){if(o[e])return o[e]
;var t=e.match("^(server|provider)://([a-fA-F0-9-]+)?/?([^/]*)/?$");if(t){var n="server"===t[1],i=n?t[2]:a.a,s=t[3]||r.d;o[e]={isServer:n,serverIdentifier:i,providerIdentifier:s}}else o[e]={};return o[e]}t.a=i;var r=n(41),a=n(80),o={}},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(7),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";var i=n(7),r=n.n(i),a=n(19),o=n(24),s=n(668),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(17),r=n(16),a=i.a.extend({name:"FirstCharacterModel",context:["server","provider","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:r.a.string,
title:r.a.string,size:r.a.integer},urlRoot:function(){return"/library/sections/"+this.section.id+"/firstCharacter"}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"MediaTypeModel",context:["server","section"],sessionAttrs:{id:r.a.integer,typeString:r.a.string,title:r.a.string,plural:r.a.string,mediaType:r.a.string,child:r.a.string,parent:r.a.string,selected:r.a.boolean},defaults:{selected:!1}});t.a=a},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(17),o=n(16),s=n(3),l=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],c=a.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(s.default)("All")),e}},{whitelistedPrimaryKeySubsets:l});t.a=c},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(3);t.a=i},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(24),o=n(97),s=n(936),l=n(315),c=a.a.extend({name:"ProviderCollection",context:["server"],model:l.a,url:"/media/providers",responseType:function(){return Object(o.a)(this.server)},fetch:function(){var e=this.server,t=void 0;return t=e.get("mediaProviders")||e.get("isCloud")?a.a.prototype.fetch.apply(this,arguments):r.a.Deferred().resolve(this,"").promise(),t.then(function(t){Object(s.a)(t,e)}),t}});t.a=c},function(e,t,n){"use strict";function i(e,t){
t.get("isCloud")||e.forEach(function(e){e.set({isPending:!1,isPopulated:!0})}),t.get("isCloud")||e.get(o.d)||e.add(new a.a({isPending:!1,isPopulated:!0},{server:t})),e.get(o.a)||e.add(new r.a({isPending:!1,isPopulated:!0},{server:t}))}t.a=i;var r=n(672),a=n(1604),o=(n(315),n(41))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(24),r=n(63),a=n(438),o=n(314),s=i.a.extend({name:"ProviderSettingCollection",context:["server","provider"],url:"/settings",
model:o.a,augmentResponse:function(e){if(!Object(a.a)())return e;var t=e.Setting?e.Setting:e;t=r.a.parseArray(t);var n=t.find(function(e){return"experience"===e.id});return n?(n.Setting=r.a.parseArray(n.Setting),n.Setting=n.Setting.filter(function(e){return"promoteToDashboard"!==e.id}),0===n.Setting.length?t.filter(function(e){return"experience"!==e.id}):t):t}});t.default=s},function(e,t,n){"use strict";function i(e){if(!r.a.get("shouldRequestHTMLFromCloudProvider"))return o.b;switch(e){
case a.i:case a.j:case a.k:case a.l:return o.a}return o.b}var r=n(57),a=n(41),o=n(939);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="html",r="plain"},function(e,t,n){"use strict";var i=n(24),r=n(238),a=n(60),o=i.a.extend({name:"ProviderFeatureCollection",context:["server","provider"],model:a.a,modelId:function(e){return e.type===a.b.ACTION?e.id:e.type},augmentResponse:function(e){Array.isArray(e)||(e=[e]);var t=e.find(function(e){
return e.type===a.b.ACTIONS});return null==t||Array.isArray(t.Action)||(t.Action=[t.Action]),null==t&&(t={Action:[],type:a.b.ACTIONS},e.push(t)),e.forEach(function(e){if(e.type===a.b.TIMELINE&&(null!=e.scrobbleKey||null!=e.unscrobbleKey)){var n=e.scrobbleKey,i=e.unscrobbleKey;t.Action.push({id:r.b.SCROBBLE,key:n,reverseKey:i}),delete e.scrobbleKey,delete e.unscrobbleKey}if(e.type===a.b.RATE){var o=e.key;t.Action.push({id:r.b.RATE,key:o}),delete e.key}
if(e.type===a.b.ACTION&&(null!=e.key||null!=e.reverseKey)){var s=e.key,l=e.reverseKey;t.Action.push({id:e.id,key:s,reverseKey:l}),delete e.key,delete e.reverseKey}}),e}});t.a=o},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";function i(e,t){return Object(a.default)(Object(r.getLastSegment)(e||""),t)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),a=n(943);t.default=i
},function(e,t,n){"use strict";function i(e,t,n){if(!e)return"";if(e.length>t){n=n||Math.floor((t-3)/2);var i=t-3-n;return e.substr(0,n)+"..."+e.substr(e.length-i)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i=n(945).default,r=n(189);e.exports=r(i)},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(368),r=n(85),a=n(1659),o=n(1661),s=n(1678),l=n(1680),c=n.n(l),u=r.a.extend({mixins:[i.a],name:"syncModal",className:"convert-modal modal fade",template:c.a,regions:{bodyRegion:".modal-body-region"},initialize:function(e){r.a.prototype.initialize.apply(this,arguments),this.device=this.model?this.model.device:e.device},initialState:"form",states:{form:{nextState:"success",onEnter:function(){
this.bodyRegion.show(new o.a({model:this.model,item:this.options.item,items:this.options.items,device:this.device})),this.listenForStateRequests()}},success:{onEnter:function(){this.model?this.hide():(this.bodyRegion.show(new s.a({server:this.options.item.server,device:this.device})),this.listenForStateRequests())}},error:{onEnter:function(){this.bodyRegion.show(new a.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(){r.a.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.a=u},function(e,t,n){"use strict";var i=n(21),r=n(7),a=n.n(r),o=n(58),s=n(26),l=n(1668),c=n.n(l),u=i.a.ItemView.extend({className:"convert-policy-container",template:c.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(s.q)(this.model.get("metadataType")||"movie"),
this.leafMediaType=Object(s.p)(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===o.d,e},updatePolicyValue:function(){
var e=this.model.get("policy"),t=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(a.a.isNaN(t)?"":t),a.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";n.d(t,"a",function(){return i});var i=2},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(950)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(15),o=n(3),s=n(161),l=n(85),c=n(1682),u=n.n(c),d=l.a.extend({name:"homeWarningModal",template:u.a,events:r.a.extend({"click .server-settings-btn":"onServerSettingsClick"},l.a.prototype.events),initialize:function(e){l.a.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e
;return e="pin"===this.type?Object(o.default)("You've added a PIN restriction"):Object(o.default)("You've joined a Plex Home"),{intro:e}},onServerSettingsClick:function(e){e.preventDefault(),this.hide();var t=Object(a.c)("appModel"),n=t.get("primaryServer");Object(s.a)("serverSettings",{serverID:n.id,group:"general"})}});t.a=d},function(e,t,n){"use strict";var i=n(21),r=n(15),a=n(370),o=n(1688),s=n.n(o),l=i.a.ItemView.extend({tagName:"li",className:"user-select-list-item",template:s.a,ui:{
container:".user-select-container",poster:".user-poster"},events:{"click a":"onClick"},initialize:function(e){this.disabled=e.disabled,this.posterImage=new a.a({model:this.model,type:"friend",width:80});var t=r.c("appModel"),n=t.get("primaryServer");n&&n.supports("imageFilters")&&(this.backgroundImage=new a.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(7),r=n.n(i),a=n(90),o=n(663),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(7),r=n.n(i),a=n(29),o=n(19),s=n(306),l=n(1686),c=n(1687),u={extensions:{dash:".mpd",hls:".m3u8",http:""},logParams:function(e,t,n){a.a.group("[Transcoder] %s (%s) options",e,t),r.a.forEach(n,function(e,t){return a.a.info("%s: %s",t,e)}),a.a.groupEnd()},serializeParams:function(e,t){
var n={},i={},a=/^X-Plex/;return r.a.each(e,function(e,t){a.test(t)?i[t]=e:n[t]=e}),n=o.stringifyParams(n),i=o.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")){i=a.get("isFullServer")?a:null}if(i)if(e.get("cloud"))o=!0;else if(!e.get("isFullServer")){var l=!e.get("activeConnection").get("isPrivate"),c=i.get("activeConnection").get("isPrivate");o=l||c}var u=o?i:e,d=u.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 p={url:e.resolveUrl(t,{useRelativeUrl:d,appendToken:!0}),width:n.width&&Math.round(parseFloat(n.width)),height:n.height&&Math.round(parseFloat(n.height))};n.minSize&&(p.minSize=1),n.format&&(p.format=n.format),n.quality&&(p.quality=n.quality),n.filters&&r.a.each(n.filters,function(e,t){void 0!==e&&(p[t]=e)});var h="/photo/:/transcode?"+this.serializeParams(p,u)
;return u.resolveUrl(h,{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";function i(e){return e?a()("<p>"+e+"<p>").text():""}var r=n(13),a=n.n(r);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(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2],c=n(t,i),u=(c.sessionAttrs,c.get(o));c.set(o,!0),e.fetch(t,i,r).then(function(){var e
;c.set((e={},e[o]=!1,e[s]=!0,e[l]=null,e))},function(e){var t,n,i=e.aborting?(t={},t[o]=u,t):(n={},n[o]=!1,n[l]=Object(a.a)(e),n);c.set(i)})}}t.a=i;var r=(n(36),n(365)),a=n(152)},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return c});var i=n(6),r=n.n(i),a=n(17),o=n(16),s={hubIdentifier:o.a.string,hubKey:o.a.string,key:o.a.string,style:o.a.string,subtype:o.a.string,title:o.a.string,type:o.a.string},l={friendlyName:o.a.string,
machineIdentifier:o.a.string.isRequired,sourceTitle:o.a.string},c={identifier:o.a.string,providerIdentifier:o.a.string,title:o.a.string},u=a.a.extend({name:"HomeHubProviderModel",syncedAttrs:r()({},c)}),d=a.a.extend({name:"HomeHubServerModel",syncedAttrs:r()({},l)}),p=a.a.extend({name:"HomeHubModel",syncedAttrs:r()({},s,{id:o.a.string.isRequired,directoryKey:o.a.string.isRequired}),syncedRelations:{provider:{relationClass:u},server:{relationClass:d}}});t.d=p},function(e,t,n){"use strict"
;function i(e,t){return t.some(function(t){return t.test(e)})}function r(e){for(var t in a){if(i(e,a[t]))return t}return e}t.a=r;var a={"home.continue":[/^(movie|tv)\.inprogress\.*/],"home.movies.recent":[/^movie\.recentlyadded\.*/],"home.music.recent":[/^music\.recent\.added\.*/],"home.photos.recent":[/^photo\.recent\.*/],"home.ondeck":[/^tv\.ondeck\.*/],"home.television.recent":[/^tv\.recentlyadded\.*/],"home.videos.recent":[/^video\.recent\.*/]}},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(){return"edge"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).id}t.a=i;var r=n(47)},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(47)},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(47)},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(47)},function(e,t,n){"use strict";function i(){return!1}t.a=i},function(e,t,n){"use strict";function i(){
return"safari"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a).id}t.a=i;var r=n(47)},function(e,t,n){var i=n(266).default,r=n(189);e.exports=r(i)},function(e,t,n){var i=n(1790),r=n(219)("iterator"),a=n(428);e.exports=n(106).getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||a[i(e)]}},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(107),o=n(65),s=n(121),l=n(63),c=i.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:r.a.string,identifier:r.a.string,type:r.a.string,name:r.a.string,title1:r.a.string,title2:r.a.string,message:r.a.string,summary:r.a.string,thumb:r.a.string,art:r.a.string,prefsKey:r.a.string,searchKey:r.a.string,installed:r.a.boolean,noCache:r.a.boolean,allowSync:r.a.boolean,hasPrefs:r.a.boolean,hasStoreServices:r.a.boolean,share:r.a.boolean,
lastAccessedAt:r.a.integer},syncedRelations:{metadataList:{relationClass:a.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(s.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=l.a.parseArray(e.Metadata),i=n.length-1;i>=0;i--){var r=n[i];if(r.settings||r.search){e[r.settings?"prefsKey":"searchKey"]=r.key,n.splice(i,1)}}return e.Metadata=n,e.metadataList=e,e}});t.a=c},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),l=n.n(s),c=n(297),u=n.n(c),d=n(13),p=n.n(d),h=n(0),f=n.n(h),v=n(67),g=n(18),m=n(15),y=n(1800),b=n(313),I=n(38),S=n(43),M=n(35),D=n(3),C=n(697),O=n(972),P=n(161),j=n(699),T=n(46),w=n(1846),E=n(1851),x=n(1865),A=n(1926),N=n(1941),L=n(275),k=T.a.extend({initialize:function(e){var t=this,n=e.serverID,i=e.settingsSection,r=e.settingsGroup,a=m.c("appModel"),o=a.get("servers");this.options={settingsSection:i,settingsGroup:r,machineIdentifier:n,
isViewDataPending:!0},o.findServer(n).done(this.whenRendered(function(n){return Object(M.a)(),a.set("primaryServer",n),t.listenTo(n,"change:isConnected",t.onServerIsConnectedChanged),
n.get("isConnected")?!n.get("shared")||"status"===i&&"sync"===r?void("settings"===i||"manage"===i?t.initializeServerSettingsView(n,e):"status"===i&&"alerts"===r?t.initializeAlertsView(n):"status"===i&&"conversion"===r?t.initializeConversionView(n):"status"===i&&"sync"===r?t.initializeSyncView(n,e):"status"===i&&"now-playing"===r?t.initializeNowPlayingView(n):(t.options.isViewDataPending=!1,t.render())):void Object(P.a)("sync",{serverID:n.id}):(t.options.isViewDataPending=!1,void t.render())
})).fail(this.whenRendered(function(){u()(t.options,{viewDataErrorMessage:Object(D.default)("The server you're trying to access doesn't seem to exist."),isViewDataPending:!1}),t.render()}))},initializeServerSettingsView:function(e,t){var n=this,i=t.group;this.options.settingsGroup=i;var r=e.get("desktop"),a=r.get("settings"),o=new y.a({key:"/accounts/1"},{server:e}),s=r.get("cloudAccount"),l=new b.a([],{server:e,url:"/system/:/prefs"}),c=p.a.when(a.fetch(),o.fetch({scope:"page"}),s.fetch({
scope:"page"}),l.fetch({scope:"page"}));c.done(this.whenRendered(function(){u()(n.options,{model:e,collection:a,account:o,cloudAccount:s,channelSettings:l,subset:"server",group:i,isViewDataPending:!1}),n.render()})),c.fail(this.whenRendered(function(){u()(n.options,{viewDataErrorMessage:Object(D.default)("Server settings are unavailable."),isViewDataPending:!1}),n.render()}))},initializeAlertsView:function(e){var t=e.get("desktop");u()(this.options,{model:e,collection:t.get("alerts"),
subset:"alerts",contentView:w.a,isViewDataPending:!1}),this.render()},initializeConversionView:function(e){var t=this,n=e.get("desktop");this.options.contentView=E.a;var i=new O.a([],{server:e,allowInCache:!0}),r=n.get("backgroundTranscodeJobs"),a=new C.a([],{server:e,allowInCache:!0}),o=void 0,s=void 0,l=p.a.when(i.populate(),r.fetch(),n.get("settings").fetch(),a.populate()).then(function(){o=i.first();var e=a.first();return o&&e?(s=e.get("children"),
p.a.when(o.fetch(),s.fetch())):p.a.Deferred().reject().promise()});l.done(this.whenRendered(function(){u()(t.options,{model:e,playQueue:o,transcodeJobs:r,generators:s,subset:"conversion",isViewDataPending:!1}),t.render()})),l.fail(this.whenRendered(function(){u()(t.options,{viewDataErrorMessage:Object(D.default)("The conversion queue is unavailable."),isViewDataPending:!1}),t.render()}))},initializeSyncView:function(e,t){var n=this,i=t.deviceID,r=t.routeOrigin;u()(this.options,{contentView:A.a,
sidebarKey:"syncedContent"===r?Object(j.b)(e.id):null});var a=m.c("appModel"),o=a.get("user"),s=o.get("desktop").get("devices"),l=s.populate();l.done(this.whenRendered(function(){var t=s.filterSyncDevices(),a=i?t.get(i):null;u()(n.options,{model:e,collection:t,selectedDevice:a,subset:"sync",routeOrigin:r,isViewDataPending:!1}),n.render()})),l.fail(this.whenRendered(function(){u()(n.options,{viewDataErrorMessage:Object(D.default)("Sync status is unavailable."),isViewDataPending:!1}),n.render()}))
},initializeNowPlayingView:function(e){var t=e.get("desktop");u()(this.options,{model:e,collection:t.get("sessions"),subset:"now-playing",contentView:x.a,isViewDataPending:!1}),this.render()},component:function(e){var t=e.machineIdentifier,n=e.settingsSection,i=e.settingsGroup,a=e.sidebarKey,s=l()(e,["machineIdentifier","settingsSection","settingsGroup","sidebarKey"]),c=Object(I.a)(S.m,t),u=a||Object(j.a)(t,n,i);return o()(v.a,{},void 0,o()(L.a,{selectedKey:u,settingsSection:n,settingsGroup:i,
selectedServerEntityID:c}),f.a.createElement(N.a,r()({serverEntityID:c,settingsSection:n,settingsGroup:i},s)))},onServerIsConnectedChanged:function(e,t){t&&g.a.trigger("navigate:refresh")}});t.a=k},,function(e,t,n){"use strict";var i=n(220),r=n(317),a=n(1804),o=i.a.extend({model:a.a,url:"/playQueues?type="+r.a.LOCAL,parse:function(e){return this.convert(e,"PlayQueue")}});t.a=o},function(e,t,n){"use strict"
;var i=n(53),r=n.n(i),a=n(7),o=n.n(a),s=n(17),l=n(16),c=n(221),u=n(92),d=n(1805),p=n(260),h=n(63),f=n(38),v=n(43),g=n(151),m=n(1812),y=s.a.extend({name:"PlayQueueItemModel",context:["server","provider","identifier","mediaTagPrefix","mediaTagVersion"],entityType:v.j,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(f.a)(this.entityType,e.playQueueItemID,this.server.entityID())},idAttribute:"playQueueItemID",cache:new p.a,
cacheKey:function(e){return this.server&&this.server.getScopedKey(e.playQueueItemID)},sessionAttrs:{isPlayQueueItem:l.a.boolean},syncedAttrs:{playQueueItemID:l.a.string,queueIndex:l.a.integer,key:l.a.string,ratingKey:l.a.string,type:l.a.string,subtype:l.a.string,advertisement:l.a.boolean,allowSkipAfter:l.a.integer,librarySectionID:l.a.string,hasPremiumLyrics:l.a.boolean,syncItemId:l.a.integer,generatorID:l.a.integer,generatorType:l.a.integer,clientIdentifier:l.a.string,target:l.a.string},
syncedRelations:{metadataItem:{relationClass:u.a,deferred:!0},lyricsStreams:{relationClass:d.a,deferred:!0},vast:{relationClass:m.a,deferred:!0}},sessionRelations:{postPlay:{relationClass:c.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(h.a.parseArray(e.Media));if(n){
var i=o.a.first(h.a.parseArray(n.Part));if(i){var a=h.a.parseArray(i.Stream);if(a){var s=g.a.get("lyrics");t.lyricsStreams=o.a.filter(a,function(e){return h.a.parseInteger(e.streamType)===s.id})}}}return t}});t.a=y},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 t.filter(function(e){return!!e}).join("--")}t.a=i},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,P=c.storeKey,j=void 0===P?"store":P,T=c.withRef,w=void 0!==T&&T,E=o(c,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),x=j+"Subscription",A=y++,N=(t={},t[j]=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:j,withRef:w,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=A,a.state={},a.renderCount=0,a.store=e[j]||t[j],
a.propsMode=Boolean(e[j]),a.setWrappedInstance=a.setWrappedInstance.bind(a),h()(a.store,'Could not find "'+j+'" in either the context or props of "'+o+'". Either wrap the root component in a <Provider>, or explicitly pass "'+j+'" 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()(w,"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(!(w||D||this.propsMode&&this.subscription))return e;var t=m({},e);return w&&(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=N,u.propTypes=N,d()(u,t)}}t.a=c;var u=n(1821),d=n.n(u),p=n(162),h=n.n(p),f=n(0),v=(n.n(f),n(1822)),g=n(975),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(240),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(218))},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(982)},function(e,t,n){"use strict";n(1833),n(700)},function(e,t,n){"use strict";var i=n(1835),r=i.a.Symbol;t.a=r},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(1853),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(77),r=n(21),a=n(319),o=n(3),s=n(986),l=n(368),c=n(1860),u=n.n(c),d=r.a.Layout.extend({mixins:[l.a],className:"conversion-status",template:u.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 i.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(o.default)("Paused"):Object(o.default)("Converting")}},".conversion-status-pending-label":{model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?Object(o.default)("Paused"):Object(o.default)("Waiting")}},".conversion-status-converting-speed":{modelAttribute:"speed",autohide:!0,formatter:function(e){if(e){var t=Math.round(10*e)/10;return t>10&&(t=Math.round(t)),"("+t+"x)"}}},".conversion-status-converting-percentage":{modelAttribute:"progress",
formatter:function(e){return Math.round(e)+"%"}},".conversion-status-converting-progress-separator":{modelAttribute:"remaining",manual:!0,autohide:function(e){return e&&this.progressModel.get("speed")}},".conversion-status-converting-remaining":{modelAttribute:"remaining",autohide:!0,formatter:function(e){if(this.progressModel.get("speed"))return Object(a.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 s.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(21),r=n(1859),a=n.n(r),o=i.a.ItemView.extend({className:"circle-progress",template:a.a,size:30,lineWidth:5,
strokeColor:"#cc7b19",hasSize:!1,ui:{svg:".circle-progress-bar",svgCircle:".circle-progress-bar circle"},bindings:{".circle-progress-text":{modelAttribute:"text"}},modelEvents:{"change:progress":"onProgressChange"},initialize:function(e){this.size=e.size||this.size,this.lineWidth=e.lineWidth||this.lineWidth,this.strokeColor=e.strokeColor||this.strokeColor,this.size&&(this.$el.width(this.size),this.$el.height(this.size))},drawProgressBar:function(){
var e=this.size,t=e/2,n=t-this.lineWidth,i=Math.PI*(2*n);this.hasSize||(this.ui.svg.attr("width",e),this.ui.svg.attr("height",e),this.ui.svgCircle.attr("r",n),this.ui.svgCircle.attr("cx",t),this.ui.svgCircle.attr("cy",t),this.ui.svgCircle.attr("stroke-dasharray",i),this.ui.svgCircle.css("stroke-width",this.lineWidth),this.ui.svgCircle.css("stroke",this.strokeColor),this.hasSize=!0);var 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";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(7),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";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(7),a=n.n(r);t.a=i},function(e,t,n){"use strict";function i(e){for(var t=0,n=de.length;t<n;t++){var i=de[t],r=i[0];if(i[1].test(e))return r}}function r(e,t){var n=pe[e]||pe[t];return n||((n=e&&i(e))?(pe[e]=n,n):(n=t&&i(t),n?(pe[t]=n,n):b.a))}t.a=r
;var a,o=n(7),s=n.n(o),l=n(1872),c=n.n(l),u=n(1873),d=n.n(u),p=n(1874),h=n.n(p),f=n(1875),v=n.n(f),g=n(1876),m=n.n(g),y=n(1877),b=n.n(y),I=n(1878),S=n.n(I),M=n(1879),D=n.n(M),C=n(1880),O=n.n(C),P=n(1881),j=n.n(P),T=n(1882),w=n.n(T),E=n(1883),x=n.n(E),A=n(1884),N=n.n(A),L=n(1885),k=n.n(L),_=n(1886),R=n.n(_),z=n(1887),U=n.n(z),B=n(1888),F=n.n(B),V=n(1889),H=n.n(V),Q=n(1890),Y=n.n(Q),G=n(1891),W=n.n(G),K=n(1892),q=n.n(K),Z=n(1893),X=n.n(Z),J=n(1894),$=n.n(J),ee=n(1895),te=n.n(ee),ne=n(1896),ie=n.n(ne),re=n(1897),ae=n.n(re),oe=n(1898),se=n.n(oe),le=n(1899),ce=n.n(le),ue=(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[j.a]=/google.*tv/i,a[w.a]=/internet.*explorer|explorer.*windows/i,a[x.a]=/ios/i,a[N.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[F.a]=/plexamp/i,a[H.a]=/plex.*media.*server/i,a[Y.a]=/WebMAF|mystery.*3/i,a[W.a]=/roku/i,a[q.a]=/safari/i,a[X.a]=/samsung/i,a[$.a]=/sonos/i,a[te.a]=/plex.*vr/i,
a[ie.a]=/wii.*u/i,a[ae.a]=/windows/i,a[se.a]=/windows.*phone|wince/i,a[ce.a]=/xbox|mystery.*5/i,a),de=s.a.pairs(ue),pe={}},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;if(Object(h.a)(i||r,"A path or a model is required to build a source URI"),t.get("isUniversal")){var s=r&&r.get("source")||Object(m.a)(e.server.get("machineIdentifier"),e.get("identifier")),l=i||r.get(o);return f.join([s,l])}return i||g.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"),g=d===b.k,m=d===b.j,I=d===b.e,S=d===b.g,M=d===b.c,D=d===b.l,C=!!r||a.get("isPlaylist"),O=a.get("isExtra"),P=!!a.get("radio"),j=c(e)
;if((g||m||I||h===y.b)&&(j.continuous=1),(g||m)&&!l&&!s){var T=g?a:new v.a({key:a.get("parentKey")},{server:a.server,provider:a.providerModel});return T.fetch({merge:!0,data:{includeOnDeck:"1"}}).then(function(){var e=T.get("onDeck"),r=e&&g,o=e&&m&&e.get("parentRatingKey")===a.get("ratingKey");return r||o?(j.uri=i(n,t,{model:e}),j):m?a.get("children").populate().then(function(){var e=a.get("children").get("metadataItems"),r=e.findWhere(function(e){return!e.get("viewCount")});return j.uri=i(n,t,{
model:r||e.first()}),j}):(j.uri=i(n,t,{model:a}),j)})}return C?r?(u&&(j.uri=i(n,t,{model:r})),j.playlistID=r.get("ratingKey"),j.key=a.get("key")):(u&&(j.uri=i(n,t,{model:a})),j.playlistID=a.get("ratingKey")):(D||S||M&&!O)&&o&&!j.continuous?(j.uri=i(n,t,{path:u?o:"library:///directory/"+encodeURIComponent(o)}),j.key=a.get("key")):j.uri=P&&u?i(n,t,{path:f.join(a.get("key"),{includeSharedContent:1})}):i(n,t,{model:a}),p.a.Deferred().resolve(j).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=c(e);return t.uri=g.a.uri(null,{items:e.metadataItemModels}),p.a.Deferred().resolve(t).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(I.a)(e).then(function(){return Object(S.a)(t)});var n=t.isNew()?"POST":"PUT";return r(e).then(function(e){return Object(S.a)(t,{params:e,type:n}).then(null,function(){return p.a.Deferred().reject().promise()})})}t.a=u
;var d=n(13),p=n.n(d),h=n(36),f=n(19),v=n(92),g=n(237),m=n(992),y=n(98),b=n(26),I=n(1901),S=n(376)},function(e,t,n){"use strict";function i(e,t){return e===r.a?"provider://"+t:"server://"+e+"/"+t}t.a=i;var r=n(80)},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 a.a({playQueueID:n,
key:d.get("key"),type:i,repeat:s,own:c,isUniversal:p},{server:t.server,provider:t}):new r.a({playQueueID:n,type:i},{server:t.server,provider:t})}t.a=i;var r=(n(36),n(1903)),a=n(994),o=n(60);n(239)},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(698),o=n(65),s=n(121),l=i.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:{allowShuffle:r.a.boolean,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:a.a,rootPropertyName:"Metadata"}},derivedAttrs:{canShuffle:function(){var e=this.get("playQueueSourceURI")||"",t=-1!==e.indexOf("library://x/station");return!this.get("playQueueLastAddedItemID")&&this.get("allowShuffle")&&!t},currentIndex:function(){var e=this.get("playQueueItems"),t=this.get("playQueueSelectedItemID"),n=e.get(t);return e.indexOf(n)},length:function(){
var e=this.get("playQueueTotalCount")||0,t=this.get("playQueueItems")||[];return Math.max(e,t.length)}},defaults:{repeat:!1,own:!0,isUpdatePending:!1,isUniversal:!1,allowShuffle:!0},augmentResponseText:function(e,t){return t===o.a.xml?Object(s.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";function i(){var e=Date.now(),t=Object(a.c)("sessionStats")
;r.a.debug("[Metrics] Updating session last interaction time"),t.save("lastInteractionTime",e)}var r=n(29),a=n(15);t.a=i},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(449);t.a=i},function(e,t,n){"use strict";function i(e){var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10)
;return(e/Math.pow(1024,t)).toFixed(2)+" "+r[t]}var r=["B","KB","MB","GB","TB"];t.a=i},function(e,t,n){e.exports={default:n(1912),__esModule:!0}},function(e,t,n){"use strict";function i(e){return e&&r.a.parseBoolean(e)?Object(a.default)("Yes"):Object(a.default)("No")}Object.defineProperty(t,"__esModule",{value:!0});var r=n(63),a=n(3);t.default=i},function(e,t,n){"use strict";var i=n(92),r=n(260),a=n(38),o=n(224),s=i.a.extend({name:"SyncMetadataModel",entityType:o.SYNC_METADATA_ITEM,
entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(a.a)(this.entityType,e.ratingKey,this.syncItemId,this.server.entityID())},context:["server","device","syncItemId"],cache:new r.a,cacheKey:function(){return i.a.prototype.cacheKey.apply(this,arguments)+"!"+this.syncItemId}});t.a=s},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(u.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,n){return!0===e||l.a.isFunction(e)&&e(t,n)}function a(){return Object(o.createSelector)(Object(c.a)(),d.a,i(),function(e,t,n){return!e||e.isUnavailable?[]:p.a.reduce(function(i,a){if(!r(a.isVisible,e,t))return i;var o=a.groups.reduce(function(i,a){return(r(a.isVisible,e,t)||!1!==a.isVisible&&n.includes(a.key))&&i.push({key:a.key,title:a.title(),
statusIndicator:a.createStatusIndicator&&a.createStatusIndicator(e),pageComponent:a.pageComponent,paneComponent:a.paneComponent}),i},[]);return o.length>0&&i.push({key:a.key,title:a.title(),groups:o}),i},[])})}t.a=a;var o=n(5),s=(n.n(o),n(7)),l=n.n(s),c=n(34),u=n(1942),d=n(154),p=n(536)},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(25)),c=n(1957),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)(),function(e,t){return{machineIdentifier:t.machineIdentifier,isClaimed:t.isClaimed,isSignedIn:!!e&&e.signedIn,hasPlexSubscription:!!e&&e.hasPlexSubscription}})}
var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(34)),d=n(1958),p=Object(l.b)(i)(d.a);p.propTypes=a()({},p.propTypes,{serverEntityID:s.a.string.isRequired}),t.a=p},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){(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(538),e.exports=i()):(a=[n(538)],r=i,void 0!==(o="function"==typeof r?r.apply(t,a):r)&&(e.exports=o))}()}).call(t,n(218))},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1IDUpIj4KICAgIDxwYXRoIGQ9Ik0xNS4zMzMsMTcuNjY3IEMxNC45NjUsMTcuNjY3IDE0LjY2NiwxNy45NjYgMTQuNjY2LDE4LjMzNCBMMTQuNjY2LDI0LjMzNCBMMS4zMzMsMjQuMzM0IEwxLjMzMywxMS4wMDEgTDcuMzMzLDExLjAwMSBDNy43MDEsMTEuMDAxIDgsMTAuNzAyIDgsMTAuMzM0IEM4LDkuOTY2IDcuNzAxLDkuNjY3IDcuMzMzLDkuNjY3IEwxLjMzMyw5LjY2NyBMMS4zMzMsNy42NjcgQzEuMzMzLDYuNTY0IDIuMjMsNS42NjcgMy4zMzMsNS42NjcgTDcuMzMzLDUuNjY3IEM3LjcwMSw1LjY2NyA4LDUuMzY4IDgsNSBDOCw0LjYzMiA3LjcwMSw0LjMzMyA3LjMzMyw0LjMzMyBMMy4zMzMsNC4zMzMgQzEuNDk2LDQuMzMzIDAsNS44MjggMCw3LjY2NiBMMCwyNy42NjYgQzAsMjkuNTA1IDEuNDk2LDMwLjk5OSAzLjMzMywzMC45OTkgTDEyLjY2NiwzMC45OTkgQzE0LjUwMywzMC45OTkgMTUuOTk5LDI5LjUwNCAxNS45OTksMjcuNjY2IEwxNS45OTksMTguMzMzIEMxNS45OTksMTcuOTY1IDE1LjcsMTcuNjY2IDE1LjMzMiwxNy42NjYgTDE1LjMzMywxNy42NjcgWiBNMTIuNjY3LDI5LjY2NyBMMy4zMzQsMjkuNjY3IEMyLjIzMSwyOS42NjcgMS4zMzQsMjguNzcgMS4zMzQsMjcuNjY3IEwxLjMzNCwyNS42NjcgTDE0LjY2NywyNS42NjcgTDE0LjY2NywyNy42NjcgQzE0LjY2NywyOC43NyAxMy43NywyOS42NjcgMTIuNjY3LDI5LjY2NyBaIi8+CiAgICA8cGF0aCBkPSJNNy4zMzMgN0w2IDdDNS42MzIgNyA1LjMzMyA3LjI5OSA1LjMzMyA3LjY2NyA1LjMzMyA4LjAzNSA1LjYzMiA4LjMzNCA2IDguMzM0TDcuMzMzIDguMzM0QzcuNzAxIDguMzM0IDggOC4wMzUgOCA3LjY2NyA4IDcuMjk5IDcuNzAxIDcgNy4zMzMgN3pNOS4zMzMgMjcuNjY3QzkuMzMzIDI4LjQwMyA4LjczNiAyOSA4IDI5IDcuMjY0IDI5IDYuNjY3IDI4LjQwMyA2LjY2NyAyNy42NjcgNi42NjcgMjYuOTMxIDcuMjY0IDI2LjMzNCA4IDI2LjMzNCA4LjczNiAyNi4zMzQgOS4zMzMgMjYuOTMxIDkuMzMzIDI3LjY2N3pNMjcuMzMzLjMzM0wxNCAuMzMzQzEyLjE2My4zMzMgMTAuNjY3IDEuODI4IDEwLjY2NyAzLjY2NkwxMC42NjcgMTEuNjY2QzEwLjY2NyAxMy41MDUgMTIuMTYzIDE0Ljk5OSAxNCAxNC45OTlMMjcuMzMzIDE0Ljk5OUMyOS4xNyAxNC45OTkgMzAuNjY2IDEzLjUwNCAzMC42NjYgMTEuNjY2TDMwLjY2NiAzLjY2NkMzMC42NjYgMS44MjcgMjkuMTcuMzMzIDI3LjMzMy4zMzN6TTE1LjY0OCAxMy42NjdMMTcuNDM5IDEwLjY4NCAyMC40ODYgMTEuODM2QzIwLjc5MSAxMS45NDkgMjEuMTM3IDExLjgyNyAyMS4zMDEgMTEuNTQzTDI0LjA4NSA2LjY2NyAyNi4wODkgMTMuNjY3IDE1LjY0OSAxMy42NjcgMTUuNjQ4IDEzLjY2N3pNMjkuMzMzIDExLjY2N0MyOS4zMzMgMTIuNzIzIDI4LjUwOSAxMy41ODIgMjcuNDcyIDEzLjY1MkwyNC45MzIgNC43NzlDMjQuODU5IDQuNTIyIDI0LjYzNyA0LjMzMiAyNC4zNzIgNC4zMDIgMjQuMDkzIDQuMjYzIDIzLjg0NSA0LjM5OSAyMy43MTMgNC42MzNMMjAuNDI0IDEwLjM4OCAxNy4zODkgOS4yNDFDMTcuMDg4IDkuMTI5IDE2Ljc0OSA5LjI0NiAxNi41ODIgOS41MjJMMTQuMDk0IDEzLjY2NyAxMy45OTkgMTMuNjY3QzEyLjg5NiAxMy42NjcgMTEuOTk5IDEyLjc3IDExLjk5OSAxMS42NjdMMTEuOTk5IDMuNjY3QzExLjk5OSAyLjU2NCAxMi44OTYgMS42NjcgMTMuOTk5IDEuNjY3TDI3LjMzMiAxLjY2N0MyOC40MzUgMS42NjcgMjkuMzMyIDIuNTY0IDI5LjMzMiAzLjY2N0wyOS4zMzIgMTEuNjY3IDI5LjMzMyAxMS42Njd6Ii8+CiAgICA8cGF0aCBkPSJNMTcuMTQ1LDMuODMzIEMxNi4wMzcsMy44MzMgMTUuMTM3LDQuNzM0IDE1LjEzNyw1Ljg0MSBDMTUuMTM3LDYuOTQ4IDE2LjAzNyw3Ljg0OSAxNy4xNDUsNy44NDkgQzE4LjI1Myw3Ljg0OSAxOS4xNTMsNi45NDggMTkuMTUzLDUuODQxIEMxOS4xNTMsNC43MzQgMTguMjUzLDMuODMzIDE3LjE0NSwzLjgzMyBaIE0xNy4xNDUsNi41MTYgQzE2Ljc3Myw2LjUxNiAxNi40Nyw2LjIxMyAxNi40Nyw1Ljg0MSBDMTYuNDcsNS40NjkgMTYuNzczLDUuMTY2IDE3LjE0NSw1LjE2NiBDMTcuNTE3LDUuMTY2IDE3LjgyLDUuNDY5IDE3LjgyLDUuODQxIEMxNy44Miw2LjIxMyAxNy41MTcsNi41MTYgMTcuMTQ1LDYuNTE2IFoiLz4KICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMCA0KSI+CiAgICA8cGF0aCBkPSJNMTUuOTUxLDE2LjQ0NCBDMTUuODUsMTYuMTkzIDE1LjYwOCwxNi4wMjkgMTUuMzM5LDE2LjAyOCBMMTIuNjY3LDE2LjAwNSBMMTIuNjY3LDEwIEMxMi42NjcsOS42MzIgMTIuMzY4LDkuMzMzIDEyLDkuMzMzIEw4LDkuMzMzIEM3LjYzMiw5LjMzMyA3LjMzMyw5LjYzMiA3LjMzMywxMCBMNy4zMzMsMTYgTDQuNjEsMTYgQzQuMzQxLDE2IDQuMDk3LDE2LjE2MyAzLjk5NCwxNi40MTIgQzMuODksMTYuNjYxIDMuOTQ3LDE2Ljk0OCA0LjEzOCwxNy4xMzkgTDkuNDcxLDIyLjQ3MiBDOS42MDIsMjIuNjAxIDkuNzcyLDIyLjY2NyA5Ljk0MywyMi42NjcgQzEwLjExMSwyMi42NjcgMTAuMjgsMjIuNjAzIDEwLjQxMSwyMi40NzUgTDE1LjgsMTcuMTcgQzE1Ljk5MiwxNi45ODEgMTYuMDUyLDE2LjY5NSAxNS45NDksMTYuNDQ1IEwxNS45NTEsMTYuNDQ0IFogTTkuOTQ4LDIxLjA2MSBMNi4yMiwxNy4zMzMgTDgsMTcuMzMzIEM4LjM2OCwxNy4zMzMgOC42NjcsMTcuMDM0IDguNjY3LDE2LjY2NiBMOC42NjcsMTAuNjY2IEwxMS4zMzQsMTAuNjY2IEwxMS4zMzQsMTYuNjY2IEMxMS4zMzQsMTcuMDMxIDExLjYyOSwxNy4zMyAxMS45OTUsMTcuMzMzIEwxMy43MTksMTcuMzQ4IEw5Ljk0OCwyMS4wNjEgWiIvPgogICAgPHBhdGggZD0iTTE2LDcuODg4NjA5MDVlLTMxIEw0LDcuODg4NjA5MDVlLTMxIEMyLjE2Myw3Ljg4ODYwOTA1ZS0zMSAwLjY2NywxLjQ5NSAwLjY2NywzLjMzMyBMMC42NjcsMjguNjY2IEMwLjY2NywzMC41MDUgMi4xNjMsMzEuOTk5IDQsMzEuOTk5IEwxNiwzMS45OTkgQzE3LjgzNywzMS45OTkgMTkuMzMzLDMwLjUwNCAxOS4zMzMsMjguNjY2IEwxOS4zMzMsMy4zMzMgQzE5LjMzMywxLjQ5NCAxNy44MzcsLTEuNzc2MzU2ODRlLTE1IDE2LDcuODg4NjA5MDVlLTMxIFogTTIsNi42NjcgTDE4LDYuNjY3IEwxOCwyNS4zMzQgTDIsMjUuMzM0IEwyLDYuNjY3IFogTTQsMS4zMzMgTDE2LDEuMzMzIEMxNy4xMDMsMS4zMzMgMTgsMi4yMyAxOCwzLjMzMyBMMTgsNS4zMzMgTDIsNS4zMzMgTDIsMy4zMzMgQzIsMi4yMyAyLjg5NywxLjMzMyA0LDEuMzMzIFogTTE2LDMwLjY2NyBMNCwzMC42NjcgQzIuODk3LDMwLjY2NyAyLDI5Ljc3IDIsMjguNjY3IEwyLDI2LjY2NyBMMTgsMjYuNjY3IEwxOCwyOC42NjcgQzE4LDI5Ljc3IDE3LjEwMywzMC42NjcgMTYsMzAuNjY3IFoiLz4KICAgIDxwYXRoIGQ9Ik02LjY2NyA0TDEzLjMzNCA0QzEzLjcwMiA0IDE0LjAwMSAzLjcwMSAxNC4wMDEgMy4zMzMgMTQuMDAxIDIuOTY1IDEzLjcwMiAyLjY2NiAxMy4zMzQgMi42NjZMNi42NjcgMi42NjZDNi4yOTkgMi42NjYgNiAyLjk2NSA2IDMuMzMzIDYgMy43MDEgNi4yOTkgNCA2LjY2NyA0ek0xMS4zMzMgMjguNjY3QzExLjMzMyAyOS40MDMgMTAuNzM2IDMwIDEwIDMwIDkuMjY0IDMwIDguNjY3IDI5LjQwMyA4LjY2NyAyOC42NjcgOC42NjcgMjcuOTMxIDkuMjY0IDI3LjMzNCAxMCAyNy4zMzQgMTAuNzM2IDI3LjMzNCAxMS4zMzMgMjcuOTMxIDExLjMzMyAyOC42Njd6Ii8+CiAgPC9nPgo8L3N2Zz4K"
},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(1986)),c=n.n(l);t.a=i},function(e,t,n){"use strict"
;var i=n(24),r=n(1012),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(17),r=n(16),a=n(308),o=n(713),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(24),r=n(1988),a=i.a.extend({name:"ChannelMappingCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1991),a=i.a.extend({name:"DVRNetworkCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),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(17),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(2),r=n.n(i),a=n(6),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(27)),g=n(15),m=n(76),y=n(30),b=n(117),I=n(2004),S=n(2082),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(g.c)("metrics").trackClick(o()({},i.props.metricsProperties,{page:y.C,action:m.n})),
i.props.onModalClose()},r=n,u()(i,r)}return p()(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.dvrID,i=e.isOpen,a=e.metricsProperties;return r()(b.a,{className:M.a.modal,isOpen:i,metricsPage:y.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(r.createSelector)(function(e,t){return t.deviceID},Object(l.a)(),c.a,function(e,t,n){var i=n.selectedDevice&&n.selectedDevice.key;return o.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),n(7)),o=n.n(a),s=n(164),l=n(328),c=n(180);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(20)),f=n(3),v=n(383),g=n(1020),m=n(544),y=n(1025),b=n(44),I=n.n(b),S=n(2030),M=n.n(S),D=parseInt(I.a.dvrSetupImageWidth,10),C=r()(g.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,g=e.includeChannelCount,b=void 0;return b=1===l?Object(f.default)("1 channel"):l>1?Object(f.default)("{channelCount} channels",{channelCount:l}):Object(f.default)("No channels"),r()("div",{className:t},void 0,u&&r()(h.a,{onPress:this.onSelectDevicePress},void 0,r()("div",{className:M.a.deviceImageContainer},void 0,r()(m.a,{
serverEntityID:n,model:a,thumb:s,width:D,height:100}),d&&r()(v.a,{className:M.a.selectButton,component:"div",title:a,isSelected:!0,isDisabled:!0}))),!u&&r()(m.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()(y.a,{className:M.a.uri,uri:o}),g&&r()("div",{className:M.a.channelCount},void 0,b)))},t
}(p.Component);O.defaultProps={includeUri:!1,includeChannelCount:!1,isSelectable:!1},t.a=O},function(e,t,n){"use strict";function i(){var e=Object(c.default)("This tuner isn't officially supported by Plex, click for more information");return a()(l.a,{className:h.a.unsupported,component:s.a,tooltip:e,tooltipClassName:h.a.unsupportedTooltip,tooltipAttachment:d.f.BOTTOM_CENTER,target:"_blank",to:"https://support.plex.tv/articles/community-supported-tuners/"},void 0,a()(u.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(20)),l=n(207),c=n(3),u=n(25),d=n(23),p=n(2020),h=n.n(p);t.a=i},function(e,t,n){"use strict";var i=n(6),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(2017),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(122),g=n.n(v),m=n(537),y=(n(451),n(27)),b=(n(36),function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onOpen=function(){r._open()},
r.onClose=function(){r._close()},r.onPopperUpdate=function(e){var t=r.props.onReposition;if(t){t(e.placement.split("-")[0])}},r._ref=n.forwardedRef||f.a.createRef(),r._popper=null,r}return u()(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){this._popper&&this._popper.scheduleUpdate()},t.prototype.componentWillUnmount=function(){this._close()},t.prototype._open=function(){
var e=this.props,t=e.target,n=e.options,i=document.getElementById(t)||document.getElementsByName(t)[0];this._popper=new d.a(i,g.a.findDOMNode(this._ref.current),r()({},n,{onUpdate:this.onPopperUpdate})),this._popper.scheduleUpdate()},t.prototype._close=function(){this._popper&&(this._popper.destroy(),this._popper=null)},t.prototype.render=function(){return f.a.createElement(m.a,r()({},this.props,{ref:this._ref,onOpen:this.onOpen,onClose:this.onClose}))},t}(h.Component)),I={options:{
placement:"bottom-start"}};b.defaultProps=I,t.a=f.a.forwardRef(function(e,t){return f.a.createElement(b,r()({},e,{forwardedRef:t}))})},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(6),a=n.n(r),o=n(12),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(e,t){var n=t.serverEntityID,i=t.providerEntityID,r=n+":"+i
;return v[r]||(v[r]=Object(u.a)(Object(a.createSelector)(Object(p.a)(),Object(d.a)(),function(e,t){var n=e&&e.activeConnection&&e.activeConnection.uri;if(!n)return f;var i="/photo/:/transcode",r=!1,a=!1,o=void 0;if(t){var l=s.a.findWhere(t.features,{type:c.b.IMAGE_TRANSCODER});l&&(i=l.key,r=Object(h.a)(i),a=l.public)}return o=r?t&&t.baseURL?t.baseURL:n:"",{accessToken:e.accessToken,baseUrl:o,isAbsoluteTranscodeKey:r,isPublicTranscoder:a,transcodeKey:i,uri:n}}),function(e){return e})),v[r](e,t)}
function r(){return Object(a.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,c=Object(h.a)(e)?e:l.join([i,e],{"X-Plex-Token":n}),u=r?o:[s,o];return l.join(u,{url:c,"X-Plex-Token":a?void 0:n})}})}t.a=r;var a=n(5),o=(n.n(a),n(7)),s=n.n(o),l=n(19),c=n(60),u=n(156),d=n(51),p=n(34),h=n(439),f={},v={}},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){e.exports={gapSmall:"15px",gapMedium:"30px",gapLarge:"60px",navigationHeaderHeight:"60px",navigationUserMenuImageSize:"34px",pageHeaderHeight:"60px",breadcrumbMargin:"25px",menuSmallWidth:"120px",menuMediumWidth:"180px",menuLargeWidth:"220px",menuPadding:"8px",menuItemTopPadding:"4px",menuItemSidePadding:"20px",
toolbarButtonWidth:"50px",posterTitlePadding:"10px",posterTitleHeight:"20px",searchHubTitleHeight:"18px",searchResultWidth:"346px",searchResultHeight:"50px",sidebarWidth:"240px",sidebarRightGutterWidth:"15px",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",modalBodyPadding:"30px"}},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(538),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(1028)),g=n.n(v),m=n(2032),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.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=p.a.to(this._progressPosition,n,i)},t.prototype._cancelProgressTo=function(){this._progressToTween&&(this._progressToTween.kill(),this._progressToTween=null)},t.prototype.render=function(){
var e=this.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}(f.Component);b.defaultProps={className:y.a.circularProgressBar,containerClassName:y.a.circularProgressBarContainer,backgroundClassName:y.a.circularProgressBarBackground,textClassName:y.a.circularProgressBarText,size:60,lineWidth:5,strokeColor:g.a.primaryColor,showProgressText:!0,smoothProgressDuration:1e3},t.a=b
},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",badgeBackgroundColor:"rgba(0, 0, 0, 0.15)",defaultBadgeColor:"rgba(255, 255, 255, 0.7)",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",
pageHeaderColor:"rgba(255, 255, 255, 0.75)",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"
;n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o});var i=n(1007),r=n.n(i),a=r.a.Power0.easeInOut,o=r.a.Power3.easeOut},function(e,t,n){var i=n(374),r=n(1028);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",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)",playerPrimaryButtonBackgroundColor:"rgba(0, 0, 0, 0.45)",miniPlayerBackgroundColor:"rgba(0, 0, 0, 0.3)",playerPlaceholderColor:"rgba(0, 0, 0, 0.3)",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)",seekBarThumbnailShadowColor:"rgba(0, 0, 0, 0.45)",seekBarTooltipBackgroundColor:"#000",seekBarTooltipShadowColor:"rgba(0, 0, 0, 0.5)",thumbnailBackgroundColor:"rgba(0, 0, 0, 0.45)",adSeekBarFillColor:"#f9be03",equalizerBarColor:"#f9be03",
htmlMediaElementBackgroundColor:"#000",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)",searchInputBackgroundColor:"rgba(255, 255, 255, 0.08)",preferredServerButtonBackgroundColor:"rgba(0, 0, 0, 0.45)",
sortableHomeHubsContainerBackgroundColor:"rgba(255, 255, 255, 0.03)",sortableHomeHubsRowBackgroundColor:"rgba(255, 255, 255, 0.02)",sortableHomeHubDimOpacity:"0.35"})},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(c.default)("Select Network")}]);return a()("div",{className:t},void 0,a()(l.a,{name:"network",labelText:"Network",initialValue:"",values:i}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(456)),c=n(3);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(d.default)("Select {label}",{label:r}),value:""}].concat(i):void 0;return u.a.createElement(p.a,a()({key:t},e,{value:null==n?"":n,enumValues:o}))}))}var r=n(6),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(3),p=n(458);t.a=i},function(e,t,n){"use strict";var i=n(6),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(192),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(206)),f=n(457),v=n(165),g=n(331),m=n(2041),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,u=e.valueModifier;return r()(h.a,{},void 0,r()(f.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,u(n))))},t}(p.Component);b.defaultProps={valueModifier:function(e){return e}},t.a=Object(v.a)(b)},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(208)),u=n(2043),d=n.n(u),p=n(2044),h=n.n(p),f=n(2045),v=n.n(f),g=n(2046),m=n.n(g),y=n(2047),b=n.n(y),I=n(2048),S=n.n(I);r.defaultProps={className:S.a.signalStrength,width:23,height:18},t.a=r},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.dvrID},Object(l.a)(),c.a,function(e,t,n){return e?o.a.find(t,function(t){return t.type===s.a.PROVIDER_EPG_LOAD&&parseInt(t.Context.dvrID,10)===e
}):o.a.find(t,{uuid:n.epgDownloadActivityID})})}var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(164),l=n(328),c=n(180);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(d.a,Object(u.a)(),function(e,t){var n=t?t.channels:e.selectedDevice.channels,i=t?t.channelMappings:e.channelMappings,r=e.lineupChannels,a=s.a.pluck(n,"key"),o=s.a.pluck(i,"deviceIdentifier"),l=a.concat(o);return s.a.uniq(l).map(function(e){var t=s.a.find(n,{key:e}),a=s.a.findWhere(i,{deviceIdentifier:e
}),o=a&&a.lineupIdentifier?a.lineupIdentifier:"",l=o&&s.a.find(r,{identifier:o}),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(c.a)(e.deviceIdentifier,t.deviceIdentifier)})})}function r(){return Object(l.a)(i(),function(e){return e})}t.a=r;var a=n(5),o=(n.n(a),n(7)),s=n.n(o),l=n(156),c=n(541),u=n(459),d=n(180)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(156)),a=n(180),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(e){return h()(e).sort(S.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(53),h=n.n(p),f=n(1),v=n.n(f),g=n(0),m=(n.n(g),n(332)),y=n(330),b=n(227),I=n(165),S=n(541),M=n(3),D=n(1035),C=n(2077),O=n(23),P=n(2079),j=n.n(P),T=a()(C.a,{}),w=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:j.a.channelMapping},void 0,a()("div",{className:j.a.deviceInfo},void 0,a()("div",{className:j.a.channelEnabled},void 0,s?null:a()(y.a,{name:n+"Check",value:v,onChange:this.onEnabledChange
})),a()("label",{className:(j.a.deviceIdentifier||"")+" "+(!v&&j.a.mappingDisabled||""||""),htmlFor:n+"Check"},void 0,r),a()("div",{className:(j.a.channelName||"")+" "+(!v&&j.a.mappingDisabled||""||"")},void 0,o),a()(D.a,{className:j.a.signalStrength,signalStrength:l})),s?a()("div",{className:j.a.drmChannel},void 0,a()(m.a,{className:j.a.drmChannelBadge},void 0,Object(M.default)("Protected"))):a()("div",{className:j.a.epgChannel},void 0,a()(b.a,{name:n+"Select",value:g,
values:this.state.showSelectOptions?i(h):[(e={},e[g]=h[g],e)],size:O.e.SMALL,isDisabled:!v,onMouseDown:this.onSelectPress,onTouchStart:this.onSelectPress,onChange:this.onLineupChannelChange}),p?a()("div",{className:j.a.resolutionContainer},void 0,c||u?T:null):null))},t}(g.Component);v.a.shape({enabled:v.a.bool.isRequired,lineupIdentifier:v.a.string});t.a=Object(I.a)(w)},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()(l.a,{name:"toggleAll",value:o,onChange:r}),a()("div",{className:d.a.deviceChannelsPadding}),a()("div",{className:d.a.deviceChannels},void 0,Object(c.default)("Device Channels")),t&&a()("div",{className:d.a.signalStrength
},void 0,Object(c.default)("Strength"))),a()("div",{className:d.a.guideChannels},void 0,Object(c.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(330)),c=n(3),u=n(2080),d=n.n(u);t.a=i},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(6),a=n.n(r),o=n(53),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(166);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,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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(59),p=n(95),h=n(2095),f=n.n(h);t.a=i},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(a.a)(),function(e){return e&&e.desktop})}t.a=i;var r=n(5),a=(n.n(r),n(34))},function(e,t,n){"use strict";function i(e){return r.b[e]||""}t.a=i;var r=n(387)},function(e,t,n){"use strict";var i=n(551),r=n.n(i),a=n(7),o=n.n(a),s=r.a.extend({constructor:function(e,t,n,i){this.exclusiveAgents=t,this.agentIdentifier=n,r.a.call(this,e,i),this.filterBy(o.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";var i=n(13),r=n.n(i),a=n(17),o=n(16),s=a.a.extend({name:"CloudDriveUpdateStatusModel",context:["server"],url:"/services/clouddrive/updatestatus",syncedAttrs:{updating:o.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(17),a=n(16),o=n(65),s=n(2134),l=n(2136),c=r.a.extend({name:"FilePathListModel",responseType:o.a.json,context:["server","includeFiles","url"],url:function(){var e={};return this.includeFiles&&(e.includeFiles=1),i.join(["/services/browse"],e)},sessionAttrs:{truncatedFilesCount:a.a.integer},syncedRelations:{paths:{
relationClass:l.a,rootPropertyName:"Path"},files:{relationClass:s.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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(160),l=n(2162),c=n(91),u=s.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=o.a.isObject(e)?e:c.a.parseXML(e);return t.User&&(t=t.User),c.a.parseInteger(t,"id"),c.a.parseBoolean(t,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels","allowTuners"]),c.a.parseQueryString(t,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),c.a.parseArray(t,"Server"),t},parse:function(e){var t=this.convert(e);return this.parseServers(t),
t=o.a.pick(t,this.whitelistedAttrs)},parseServers:function(e){var t=this.get("serverShares"),n=e.Server;t?t.set(n,{parse:!0}):(t=new l.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(r.a.extend(!0,{},e),t)||null},
getSaveParams:function(e,t){var n=this;if(o.a.isEmpty(e)){var i=this.pick(this.saveAttrs);return o.a.map(i,function(e,t,i){o.a.isBoolean(e)?i[t]=e?"1":"0":o.a.contains(n.filterAttrs,t)&&(i[t]=n.stringifyFilter(e))},this),i}return s.a.prototype.getSaveParams.apply(this,arguments)},stringifyFilter:function(e){return o.a.map(o.a.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("|")}});t.a=u},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(13),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(13))},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(a.a)(),s.a,function(e,t,n){var i=t.key,r=t.title,a=void 0===r?"":r,o=t.type,s="photo"===o&&e.itemClusters,u=a.trim(),d=e.isCloudSyncServer?{
type:o,title:u}:{},p=e.entityID+"!/library/sections/"+i,h=n[p],f={isLibraryProvider:!0},v=s&&Object(c.a)(e,f,i),g=Object(l.a)(e,f,i,d);return h||v||g})}t.a=i;var r=n(5),a=(n.n(r),n(725)),o=n(34),s=n(727),l=n(133),c=n(1051)},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";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(75),l=n(29),c=n(94),u=n(15),d=n(306),p=n(100),h=n(2207),f=s.a.extend({mixins:c.a,url:function(){var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws");return this.server.resolveUrl("/:/websockets/notifications",{connection:new d.a({uri:t}),appendToken:!0})},initialize:function(e){o.a.bindAll(this,"onOpen","onClose","onError","onMessage","getMessageTypes"),this.server=e.server},open:function(){
return this.socket&&this.close(),this._deferred=r.a.Deferred(),this.socket=new window.WebSocket(o.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)}},onOpen:function(e){var t=u.c("appStore"),n=this.server.entityID();n&&t.dispatch(Object(p.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.c("appStore"),n=this.server.entityID();n&&t.dispatch(Object(p.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 l.a.warn("[Connections] Error formatting message:\n%s",e.data)}var i=!!n._elementType,r=i?o.a.first(n._children):n.NotificationContainer;if(r){var a=i?n.type:r.type,s=this[a],c=void 0;c=i?Array.isArray(r)?r:[r]:Object(h.a)(r,this.getMessageTypes()),c.forEach(function(e){t.trigger("message",e),o.a.isFunction(s)&&s.call(t,e)})}}});t.a=f
},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(71),m=n(729),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=m.a.getKey(n.scrollPositionKey),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.componentDidUpdate=function(e){var t=this.props.scrollPositionKey;e.scrollPositionKey!==t&&(this._positionKey=m.a.getKey(t))},t.prototype.componentWillUnmount=function(){this._storeScrollPosition(),
this._restoreScrollTimeoutID&&clearTimeout(this._restoreScrollTimeoutID)},t.prototype._restoreScrollPosition=function(){var e=this,t=m.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(){m.a.set(this._positionKey,{scrollTop:this._currentScrollTop})},
t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=(e.restoreScrollDelay,e.scrollPositionKey,o()(e,["children","className","restoreScrollDelay","scrollPositionKey"]));return v.a.createElement(g.a,r()({className:n,scrollTop:this._currentScrollTop,restoreScroll:this._restoreScroll,onScrollPositionChange:this.onScrollPositionChange},i),t)},t}(f.Component);y.defaultProps={restoreScrollDelay:100,scrollPositionKey:"scrollPosition",smoothScroll:!0,smoothScrollDuration:400},
t.a=y},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(5),a=(n.n(r),n(34));t.a=i},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(63);t.a=i},function(e,t,n){"use strict";function i(e){var t=e&&e[0]
;return t?a.a.isObject(t)?Object(o.a)(t):t:Object(s.default)("There was a problem signing in to Plex.")}t.a=i;var r=n(7),a=n.n(r),o=n(367),s=n(3)},function(e,t,n){"use strict";function i(e){return!!e.get("shortVersion")&&Object(a.a)(e.get("shortVersion"),r.a.mediaProvidersServerRoot)}t.a=i;var r=n(175),a=n(316)},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(13),a=n.n(r);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(25)),c=n(555),u=n(2281),d=n.n(u),p=60;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(13),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(21),r=n(2303),a=n.n(r),o=i.a.ItemView.extend({className:"loading",template:a.a,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});t.a=o},function(e,t,n){var i=n(943).default,r=n(189);e.exports=r(i)},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(7),a=n.n(r),o=["Bytes","KB","MB","GB","TB"];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(2347)),c=n.n(l);i.defaultProps={className:c.a.sidebarContainer},t.a=i},function(e,t,n){"use strict";function i(){
return Object(r.a)()?Object(a.default)("Plex Media Player"):Object(a.default)("Web Client")}t.a=i;var r=n(318),a=n(3)},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.className,n=e.isInstallingServerUpdate,i=e.isUnavailable,r=e.isSettingsPending
;return n||r&&!i?a()("div",{className:t},void 0,a()(u.a,{className:h.a.spinner,size:c.SMALL})):l.a.createElement(d.a,e)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(52),u=n(31),d=n(558),p=n(2353),h=n.n(p);t.a=i},function(e,t,n){"use strict";function i(e){return!e.isLibraryProvider}function r(){return Object(b.createSelector)(Object(P.a)(),O.c(),O.a(),Object(C.a)(M.b.CONTENT,i),Object(C.a)(M.b.SUBSCRIBE),Object(x.a)(),function(e,t,n,i,r,a){
var o=S.a.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isInstallingServerUpdate","isConnected","isFullServer","isFullOwnedServer","isPersonalCloudServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections","isProvidersPending","isProvidersPopulated","providersError"),s=S.a.pick(e&&e.desktop,"libraries","isLibrariesPending","isLibrariesPopulated","librariesError");return v()({},o,s,{contentProviders:i,
showRecordingSchedule:!!r.length,isLibraryRefreshing:a,isOptimizeDatabaseInProgress:!!t,isCleanBundlesInProgress:!!n})})}function a(e,t){var n={serverEntityID:t.serverEntityID,metricsPage:t.metricsPage};return{dispatchFetchLibraries:function(){e(D.g(n))},dispatchFetchProviders:function(){e(D.h(n))},onReloadHttpPress:function(){e(Object(w.h)())},onReloadHttpAlwaysPress:function(){e(Object(w.f)()),e(Object(w.h)())},onRestartPress:function(){e(E.l(n))},onDeleteServerConfirm:function(){e(E.e(n))},
onAddLibraryPress:function(){e(E.a(n))},onSharePress:function(){e(E.n(n))},onUpdateLibrariesPress:function(){e(E.o(n))},onCancelUpdatePress:function(){e(E.b(n))},onOptimizeDatabaseConfirm:function(){e(E.j(n))},onCleanBundlesConfirm:function(){e(E.d(n))},onEmptyTrashConfirm:function(){e(E.g(n))},onTryAgainPress:function(){e(Object(w.b)()),e(D.q(n))},onAllowFallbackPress:function(){e(E.h(n))}}}var o=n(12),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(6),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(5),I=(n.n(b),n(7)),S=n.n(I),M=n(60),D=n(100),C=n(746),O=n(553),P=n(34),j=n(35),T=n(55),w=n(68),E=n(183),x=n(389),A=n(2363),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.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(j.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 y.a.createElement(A.a,t)},t}(m.Component);t.a=Object(T.a)(r,a)(N)},function(e,t){e.exports={sidebarMessage:"SidebarMessage-sidebarMessage-3O-De"}},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(31)),c=n(2388),u=n.n(c),d=a()(l.a,{});i.defaultProps={className:u.a.spinnerContainer},t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({headerClassName:u.a.header},e))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(747),c=n(2390),u=n.n(c);t.a=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)||(p=Object(l.a)()?"_blank":"_self"),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(734)),c=n(194),u=n(2391),d=n.n(u);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(266),o=n(703),s=n(1074),l=n(535),c=n(2420),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(l.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(o.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(s.a)(e).length}},".item-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return Object(a.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=[];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(7),a=n.n(r);t.a=i},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(3);t.a=i},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";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(6),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),n(27)),g=n(271),m=n(2445),y=n.n(m),b=n(2446),I=n.n(b),S=n(2447),M=n.n(S),D=n(2448),C=n.n(D),O=n(182),P={position:"absolute",width:"100%",height:"100%"},j=p()({},P,{background:"url("+y.a+")",zIndex:2}),T={opacity:30,
background:"36383b"},w=p()({},T,{format:"png"}),E=r()("div",{style:j}),x=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=e.isTypeFirstEnabled,c=window.innerWidth,u=window.innerHeight,d=s?w:T,h=void 0,f=void 0,v=void 0,m=void 0
;if(s){var y=c/u;h=y>1?640:640*y,f=y>1?640/y:640;var b=Math.max(c/h,u/f);v=Math.round(100/b)}else h=Math.min(window.innerWidth,1920),f=Math.min(window.innerHeight,1080);if(!i&&a){var S=l?C.a:M.a;m=o?S:I.a}return r()("div",{},void 0,r()(O.a,{serverEntityID:t,providerEntityID:n,url:i,src:m,width:h,height:f,minSize:!0,upscale:s,style:P,background:!0,transition:!0,transitionProps:g.a,filters:m?null:p()({},d,{blur:v}),allowPixelRatioSize:!1}),E)},t}(f.Component);x.defaultProps={allowBlur:!0},t.a=x
},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(561)),a=Object(i.createSelector)(r.a,function(e){return e.invites});t.a=a},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(2453)),a=Object(i.createSelector)(r.a,function(e){return e.filter(function(e){return!e.read})});t.a=a},function(e,t,n){"use strict";function i(e){return{onDiscoverPlayers:function(t){e(c.e())},onPlayerSelect:function(e){Object(o.c)("remotePlexPlayerManager").requestSession(e)},onCastPress:function(t){e(l.d())},
onDisconnectPress:function(t){e(c.i())}}}var r=n(11),a=n(5),o=(n.n(a),n(15)),s=n(163),l=n(753),c=n(246),u=n(2460),d=Object(a.createSelector)(function(e){return e.companionServer},s.a,function(e,t){return t[e]}),p=Object(a.createSelector)(d,function(e){return e?e.desktop.players:[]}),h=Object(a.createSelector)(function(e){return e.isCastApiAvailable},function(e){return e.remotePlayer},p,function(e){return e.companionServer},function(e,t,n,i){return{isCastApiAvailable:e,hasCompanionServer:!!i,
isRemotePlayer:!!t,remotePlayerName:t&&t.friendlyName,remotePlayerProduct:t&&t.product,players:n}});t.a=Object(r.b)(h,i)(u.a)},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";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.t)(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.c)("metrics").trackClick(a()({},r,{action:u.c,type:e.get("type")})),m.promise()}t.a=i;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(15),c=n(2482),u=n(76),d=n(26)},function(e,t,n){"use strict";function i(e,t,n){
var i=n.rating,r=n.allowMetrics,o=n.metricsProperties,h=void 0===o?{}:o,f=e.get("features").get(d.b.ACTIONS).get("actions").get(u.b.RATE);if(!f)return s.a.Deferred().reject().promise();var v={key:t.get("ratingKey"),identifier:t.get("identifier"),rating:i},g=l.join(f.get("key"),v),m=e.getXHROptions(g,{type:"PUT"}),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(c.c)("metrics").trackClick(a()({},h,{action:p.M,type:t.get("type"),rating:i})),I.promise()}t.a=i;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(19),c=n(15),u=n(238),d=n(60),p=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.c)("metrics").trackClick(a()({},r,{action:u.N,type:e.get("type")})),v.promise()}t.a=i;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(15),c=n(1086),u=n(76)},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.played,i=t.providerEntityID,o=t.serverEntityID,s=t.metadataItemEntityID,l=Object(v.i)(e,t);if(null==l){return c.a.Deferred().reject({errorMessage:"Could not find providerModel with provided `providerEntityID`"}).promise()}var h=Object(v.k)(e,t);if(null==h){return c.a.Deferred().reject({errorMessage:"Could not find serverModel with provided `serverEntityID`"}).promise()}
var f=Object(v.m)(e,{metadataItemEntityID:s});if(null==f){return c.a.Deferred().reject({errorMessage:"Could not find metadataModel with provided `metadataItemEntityID`"}).promise()}var g=l.get("features").get(p.b.ACTIONS).get("actions").get(d.b.SCROBBLE),m=n?g.get("key"):g.get("reverseKey"),y={identifier:f.get("identifier")||"com.plexapp.plugins.library"};h.get("isCloudSyncServer")?(y.key=f.get("key"),y.ratingKey=f.get("ratingKey")):y.key=f.get("ratingKey")
;var b=u.join(m,y),I=c.a.ajax(l.getXHROptions(b));return I.then(function(){var t={providerEntityID:i,serverEntityID:o,metadataItemEntityID:f.entityID()};a(e,t,n),r(e,t,n)}),I}function r(e,t,n){var i=Object(v.m)(e,t);if(i)if(Object(g.t)(i.get("type"))){i.set({viewedLeafCount:n?i.get("leafCount"):0});var a=Object(h.a)(f.h,i.get("childrenKey"),t.serverEntityID),o=Object(v.n)(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(v.m)(e,t);if(r){var o=Object(g.q)(r.get("type")),l=Object(h.a)(f.g,r.get("parentKey"),t.serverEntityID),c=Object(v.m)(e,{metadataItemEntityID:l}),u=void 0;if(c&&(u=Object(g.q)(c.get("type"))),u&&u.typeString===o.parent){var d=void 0,p=Object(g.t)(r.get("type"));n?d=p?r.get("unviewedLeafCount"):1:(d=p?r.get("viewedLeafCount"):1,d*=-1);var m=null!=i?i:d;c.set({viewedLeafCount:c.get("viewedLeafCount")+m})
;a(e,s()({},t,{metadataItemEntityID:l}),n,m)}}}t.a=i;var o=n(6),s=n.n(o),l=n(13),c=n.n(l),u=(n(36),n(19)),d=n(238),p=n(60),h=n(38),f=n(43),v=n(66),g=n(26)},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(48),o=n.n(a),s=n(7),l=n.n(s),c=n(18),u=n(19),d=n(15),p=n(40),h=n(436),f=n(3),v=n(446),g=n(2488),m=n(131),y=n(2492),b=n(2494),I=n(1090),S=n(2514),M=n(2518),D=n(1092),C=n(85),O=n(61),P=n(1093),j=n.n(P),T={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"]},w=["poster","art","banner","info","advanced"],E=C.a.extend({mixins:[v.a],name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:j.a,panes:{general:{constructor:I.a},tags:{constructor:D.a},poster:{constructor:b.a},art:{constructor:b.a},banner:{constructor:b.a},sharing:{constructor:M.a},info:{constructor:S.a},advanced:{constructor:y.a}},events:l.a.extend({"click .change-pane-btn":"onChangePaneClick",
"click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},C.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){C.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 g.a({},{server:n.server,metadataItems:t}),i=i.then(l.a.bind(function(){return this.model.setContext("section",Object(h.a)(n,{onlyIfCached:!1})),this.model.populate()},this)),i.done(l.a.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),this.render(),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(c.a,"shortcut:save",this.saveChanges)},this)),i.fail(l.a.bind(function(){
this.ui.message.text(Object(f.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden")},this))},serializeData:function(){var e=this.model.get("type"),t=T[e]||T.movie;this.model.get("isSingleMetadataItem")||(t=l.a.difference(t,w)),this.model.getSingleMetadataItem().has("preferences")||(t=l.a.difference(t,["advanced"])),"photo"!==e||this.model.server.supports("photoTagEdit")||(t=l.a.difference(t,["tags"]));var n=l.a.reduce(t,function(e,t){return e[t]=!0,e
},{}),i=Object(f.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=l.a.has(e,"artist.id.value")||l.a.has(e,"artist.title.value")||l.a.has(e,"album.id.value")||l.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"),c=l.a.has(e,"artist.title.value")||l.a.has(e,"artist.id.value"),u=l.a.includes(s,"ratingKey"),d=l.a.has(e,"title.value");u&&d&&!c&&t.push("parentTitle")}if(l.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=o()(p,"YYYY-MM-DD",!0).isValid(),f=o()(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(),a=this.invalidChangedAttrs(i);if(a.length)return void this.markInvalid(a);e.addClass("active")
;var o=this.showAdvancedConfirmModal({saving:!0});o.done(l.a.bind(function(){l.a.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&n.push(p.a.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t}))},this),n.push(this.savePreferences()),n.push(this.model.save());var i=r.a.when.apply(r.a,n);i.done(l.a.bind(function(){var e=d.c("appStore").dispatch,t=this.model.server.entityID();t&&e(m.b({serverEntityID:t})),this.hide()},this)),
i.fail(function(){t.text(Object(f.default)("Your changes could not be saved."))}),i.always(function(){e.removeClass("active")})},this)),o.fail(l.a.bind(function(){e.removeClass("active"),this.showPane("advanced")},this))}},savePreferences:function(){var e=this.model.get("preferences");if(!e.length)return r.a.Deferred().resolve().promise();var t=this.model.getSingleMetadataItem(),n=u.join(["/library/metadata",t.get("ratingKey"),"prefs"],e.getSaveParams()),i=this.model.server.getXHROptions(n,{
type:"PUT"}),a=r.a.ajax(i);return a.done(function(){var n=t.get("preferences");e.forEach(function(e){n.get(e.id).set("value",e.get("value"))})}),a},showAdvancedConfirmModal:function(){if(!this.model.get("preferences").some(function(e){return/^autoDeletion/.test(e.id)}))return r.a.Deferred().resolve().promise();var e=new O.a({title:Object(f.default)("Confirm Deletion Settings"),
message:Object(f.default)("Deletion settings will take effect immediately! Files may be deleted and this can't be undone. Are you sure?"),confirmLabel:Object(f.default)("Yes"),cancelLabel:Object(f.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:Object(f.default)("Multiple files may be deleted."),doubleConfirmLabel:Object(f.default)("Yes, I'm sure"),hasDanger:!0});return c.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){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"TagModel",context:["server","section"],idAttribute:"tag",syncedAttrs:{id:r.a.integer,tag:{type:r.a.string,save:!0},tagType:r.a.integer,librarySectionID:r.a.string,librarySectionKey:r.a.string,librarySectionType:r.a.integer,filter:r.a.string,role:r.a.string,
thumb:r.a.string,count:r.a.integer,context:r.a.string}});t.a=a},function(e,t,n){"use strict";function i(e){return s.a.reduce(e,function(e,t){return e[t]=!0,e},{})}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(3),c=n(26),u=n(708),d=n(756),p=n(2501),h=n(2503),f=n.n(h),v=n(2504),g=n.n(v),m=n(2505),y=n.n(m),b=n(2506),I=n.n(b),S=n(2507),M=n.n(S),D=n(2508),C=n.n(D),O=n(2509),P=n.n(O),j=n(2510),T=n.n(j),w=n(2511),E=n.n(w),x=n(2512),A=n.n(x),N=n(2513),L=n.n(N),k={movie:M.a,show:A.a,season:E.a,episode:I.a,
artist:g.a,album:f.a,track:L.a,photoalbum:C.a,photo:P.a,playlist:T.a,collection:y.a},_=d.a.extend({regions:{ratingRegion:".rating-region"},ui:s.a.extend({selectizeInputs:".selectize input[type=text]"},d.a.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=k[t]||k.movie;var n=Object(c.q)(t);this.canSelectize=this.model.server.supports("batchEdit")&&n,this.canReparent=this.model.server.supports("batchEdit")},serializeData:function(){
var e=d.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(s.a.pluck(t,"name")),r=i(s.a.pluck(e.find("[type=number]"),"name")),o=s()(e.serializeArray()).reject(function(e){return n[e.name]},this),l=s.a.reduce(o,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);s.a.each(t,function(e){var t=a()(e),n=t.data("updateAttr"),i=t.data("altUpdateAttr"),r=t.data("isText"),o=e.selectize.getValue();if(i)if(r)l[n]=o,l[i]=null;else{var s=e.selectize.options[o];if(s){var c=s[t.data("autocompleteAttr")];l[n]=c,l[i]=o}}else l[n]=o});var c=this.model.get("lockedFields");c&&c.set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(l)},markInvalid:function(e){
this.$(".form-group").removeClass("has-error"),s()(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]');t.addClass("has-error"),t.find(".control-error").text(Object(l.default)("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new u.a({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,n){Object(p.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(u.q)(a[1]).id,n=a[2]),e[n+".query"]=t,e}var r=n(7),a=n.n(r),o=n(19),s=n(24),l=n(65),c=n(121),u=n(26),d=n(2502),p=s.a.extend({name:"MetadataAutocompleteResultCollection",context:["server","section","multiMetadataItem","query"],model:d.a,url:function(){var e={type:Object(u.q)(this.multiMetadataItem.get("type")).id,limit:10};return e=a.a.reduce(this.query,i,e),
o.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===l.a.xml?Object(c.b)(e):e}});t.a=p},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(1049),o=(n.n(a),n(7)),s=n.n(o),l=n(437),c=n(756),u=n(2519),d=n(2520),p=n.n(d),h=n(2521),f=n.n(h),v=n(2522),g=n.n(v),m=n(2523),y=n.n(m),b=n(2524),I=n.n(b),S=n(2525),M=n.n(S),D=n(2526),C=n.n(D),O=c.a.extend({templatesByType:{movie:y.a,show:M.a,episode:g.a,artist:f.a,album:p.a,track:C.a,photo:I.a},
ui:s.a.extend({tagInputs:".tag-input-hidden"},c.a.prototype.ui),events:s.a.extend({"change .lockable-field":"onLockableFieldChange"},c.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 l.a({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){var e=this.ui.form,t=s.a.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e},{}),n=s.a.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,i=r()(t).data("name");return e[r()(t).data("attr")]=s.a.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+i]=s.a.toArray(n.options),e},{},this)
;s.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(u.a)(e,n)})}});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+=' <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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"Save Changes",{
hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(24),r=n(2535),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,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],s=n.type,l=n.playlistType,c=n.key
;if(!n.skipDetails&&s!==r.g)return s===r.l&&(c=n.skipParent?n.grandparentKey:n.parentKey),!c&&n.librarySectionID?Object(a.a)(e,t,n.librarySectionID,i):Object(o.a)(e,t,c,i,l)}t.a=i;var r=n(26),a=n(133),o=n(143)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.listType},Object(a.a)(),s.a,o.a,l.a,function(e,t,n,i,r){var a=t.type,o=a===c.d?a:e;return Object(u.p)(n,i,r,t,o)})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(185),c=n(26),u=n(278)
},function(e,t,n){"use strict";function i(e,t,n,i){if(!(e&&t&&n&&i))return!1;var s=i.type,l=i.hasInvalidKey,c=i.deletedAt,u=i.isFolder,d=i.isMetadataList,p=i.firstItemType,h=i.onAir,f=l||c||u;if(!d&&f)return!1;if(!t.protocols.stream&&!h)return!1;if(t.features.playqueue)return!0;if(d&&!p)return!1;var v=!!n[a.e];if(t.protocols.livetv&&(e.livetv<4||!v))return!1;if(t.protocols.livetv&&!r.a.get("allowLiveTVPlayback"))return!1;var g=d?p:s,m=Object(o.p)(g),y=Object(o.o)(g)
;return g===m.typeString||y.id===m.id}t.a=i;var r=n(57),a=n(81),o=n(26)},function(e,t,n){"use strict";function i(e){return e!==y.k&&e!==y.j}function r(e){var t=e.title,n=e.leafCount;return 1===n?Object(m.default)('Are you sure you want to mark 1 episode in "{showTitle}" as unplayed?',{showTitle:t}):Object(m.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(m.default)('Are you sure you want to mark 1 episode in "{showTitle}" as played?',{showTitle:t}):Object(m.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(30)),m=n(3),y=n(26),b=n(157),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?g.n:g.o,title:o?Object(m.default)("Mark as Unplayed"):Object(m.default)("Mark as 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()(c.a,{size:u.e.SMALL,isOpen:r,metricsPage:l.K,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(30)),c=n(117),u=n(23),d=n(2554);t.a=i},function(e,t,n){"use strict";function i(e){return e.get("ui").get("addToPlaylistModal")}function r(e,t){Object(f.a)(function(){e.set({isUpdating:!0,error:null})}),Object(u.a)(t).then(function(){e.set({isUpdating:!1})},function(t){e.set({isUpdating:!1,error:Object(v.a)(t)})})}n.d(t,"f",function(){return g}),n.d(t,"c",function(){return m}),n.d(t,"g",function(){return y}),n.d(t,"e",function(){return b}),n.d(t,"d",function(){return I}),n.d(t,"a",function(){
return S}),n.d(t,"b",function(){return M});var a,o=n(39),s=n(107),l=n(110),c=n(2558),u=n(2560),d=n(237),p=n(66),h=n(177),f=n(35),v=n(152),g=Object(o.a)("ui/modal/initAddToPlaylistModal"),m=Object(o.a)("ui/modal/clearAddToPlaylistModal"),y=Object(o.a)("ui/modal/selectDestination"),b=Object(o.a)("ui/modal/editPlaylistTitle"),I=Object(o.a)("ui/modal/createPlaylist"),S=Object(o.a)("ui/modal/addToPlaylist"),M=Object(l.a)((a={},a["ui/modal/initAddToPlaylistModal"]=function(e,t,n){
var r=i(e),a=void 0,o=void 0,s=void 0,l=void 0,c="";if(t.metadataItemEntityID)a=Object(p.e)(e,t),c=d.a.title(a);else if(t.metadataListEntityID)o=Object(p.f)(e,t),c=d.a.title(o);else if(t.playQueueID)l=Object(h.b)(e,t.playQueueID);else{s=e.get("ui").get("multiSelect");var u=s.get("activeSelectionItems").pluck("model");c=d.a.title(u,{items:u})}r.set({title:c,smart:t.smart,metadataItem:a,metadataList:o,multiSelect:s,playQueue:l}),n(y(t))},a["ui/modal/clearAddToPlaylistModal"]=function(e){
i(e).restoreDefaults()},a["ui/modal/selectDestination"]=function(e,t){var n=i(e),r=Object(p.k)(e,t),a=Object(p.i)(e,t),o=n.get("metadataItem"),l=n.get("metadataList"),u=n.get("multiSelect"),d=n.get("playQueue"),h=n.get("smart"),f=o?Object(p.i)(e,{providerEntityID:o.get("providerEntityID")}):a,v=Object(c.a)({providerModel:a,itemProviderModel:f,metadataItemModel:o,metadataListModel:l,multiSelectModel:u,playQueueModel:d}),g=v.containerKey,m=v.playlistType,y=v.uri,b=new s.default({containerKey:g},{
server:r,provider:a});n.set({server:r,provider:a,type:m,smart:h,containerKey:g,uri:y,playlists:b})},a["ui/modal/editPlaylistTitle"]=function(e,t){var n=t.title;i(e).set("title",n)},a["ui/modal/createPlaylist"]=function(e){var t=i(e),n=t.get("provider"),a=t.get("playQueue"),o=t.pick("type","title","uri","smart");o.providerModel=n,a&&(o.playQueueID=a.get("playQueueID")),r(t,o)},a["ui/modal/addToPlaylist"]=function(e,t){
var n=t.playlistID,a=i(e),o=a.get("provider"),s=a.get("playQueue"),l=a.get("uri"),c={playlistID:n,providerModel:o,uri:l};s&&(c.playQueueID=s.get("playQueueID")),r(a,c)},a))},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(36),n(365)),a=n(152)},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(36),n(365)),a=n(152)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.columnAdjustment},a.a,function(e,t){return e||t.columnAdjustment})}t.a=i;var r=n(5),a=(n.n(r),n(70))},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.icon,r=e.width,o=e.height,s=e.isFolder;return a()(c.a,{className:(t||"")+" "+(d.a.placeholderIcon||""),
type:n,icon:s?l.b:i,width:r,height:o})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(761)),c=n(2572),u=n(2573),d=n.n(u);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{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(2579);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{childCount:e.childCount,subtype:e.subtype}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(2581);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(3));t.a=i},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(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(2590)),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(){return Object(a.createSelector)(l.a,s.a,Object(c.a)(),Object(o.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(5),o=(n.n(a),n(22)),s=n(37),l=n(50),c=n(400),u=n(2602);t.a=Object(r.b)(i)(u.a)},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(12),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),n(400))
;t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(e){return o.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:o.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(7),o=n.n(a),s=n(85),l=n(2611),c=n.n(l),u=s.a.extend({name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:c.a,orderedGroups:[{group:"navigation",label:"Navigation"},{group:"actions",label:"Actions"},{group:"player",label:"Player"}],initialize:function(e){s.a.prototype.initialize.apply(this,arguments),
this.shortcuts=e.shortcuts},serializeData:function(){var e={};return o.a.each(this.shortcuts,function(t){var n=t.group;("function"!=typeof t.isSupported||t.isSupported())&&(e[n]||(e[n]=[]),e[n].push(this.humanizeShortcut(t)))},this),{groups:o.a.map(this.orderedGroups,function(t){var n=o.a.clone(t);return n.shortcuts=e[t.group],n},this)}},humanizeShortcut:function(e){return e=o.a.clone(e),e.keys=i(e.keys),e.label=e.label(),e}});t.a=u},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(156)),a=n(337),o=Object(r.a)(Object(i.createSelector)(a.a,function(e){return e.filter(function(e){return e.isFullOwnedServer&&e.isConnected})}),function(e){return e});t.a=o},function(e,t,n){"use strict";var i,r=n(164),a=(i={},i[r.a.PROVIDER_DEVICE_CHANNELSCAN]=!0,i[r.a.PROVIDER_EPG_LOAD]=!0,i[r.a.GRABBER_GRAB]=!0,i[r.a.CLEAN_BUNDLES]=!0,i[r.a.BACKUP_DATABASE]=!0,i[r.a.OPTIMIZE_DATABASE]=!0,i[r.a.LIBRARY_DELETE]=!0,i[r.a.MEDIA_GENERATE_BIF]=!0,i[r.a.SUBTITLE_DOWNLOAD]=!0,i);t.a=a
},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.tooltipClassName,i=e.labelClassName,r=e.iconClassName,o=e.iconComponent,l=e.title,u=e.label,d=e.icon,v=e.iconProps,g=c()(e,["className","tooltipClassName","labelClassName","iconClassName","iconComponent","title","label","icon","iconProps"]);return p.a.createElement(f.a,s()({className:t,tooltipClassName:n,component:h.a,tooltip:l,"aria-label":l},g),p.a.createElement(o,s()({className:r,name:d},v)),u&&a()("span",{className:i
},void 0,u))}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(207),v=n(25),g=n(2627),m=n.n(g);i.defaultProps={className:m.a.button,iconClassName:m.a.icon,tooltipClassName:m.a.tooltip,iconComponent:v.a},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.a)("playQueue")}var r=n(158);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(6),a=n.n(r),o=n(12),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(166),b=n(27),I=n(1119);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(528),f=(n.n(h),n(715)),v=n(39),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(o.createSelector)(function(e,t){return t.mediaType},Object(s.a)("openState"),function(e,t){return e===p.d&&t===d.a})}function r(){return Object(o.createSelector)(Object(s.a)("qualityIndex"),c.a,u.a,Object(l.a)(),i(),function(e,t,n,i,r){return{qualityIndex:e,subtitleSize:t.subtitleSize,volume:n,playbackSpeed:i,shouldCoverWhenDecisionPending:r}})}var a=n(11),o=n(5),s=(n.n(o),
n(158)),l=n(1121),c=n(70),u=n(569),d=n(190),p=n(58),h=n(2639);t.a=Object(a.b)(r)(h.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e){return e.remotePlayer},Object(o.a)("playbackSpeed"),Object(a.a)(),function(e,t,n){return e?1:t||n&&n.playbackSpeed||1})}t.a=i;var r=n(5),a=(n.n(r),n(568)),o=n(158)},function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.itemProvider
;if(e.get("isPreFetched")&&!t.forceFetch)return a.a.Deferred().resolve().promise();var i={includeConcerts:1,includeExtras:1,includeOnDeck:1,includePopularLeaves:1,includePreferences:1,includeChapters:1,includeStations:1,asyncAugmentMetadata:1};e.get("type")===s.l&&(i.includeRelated=1),!t.forceSyncCheckFiles&&e.server.supports("asyncCheckFiles")?(i.asyncCheckFiles=1,i.asyncRefreshAnalysis=1,i.asyncRefreshLocalMediaAgent=1):i.checkFiles=1
;var r=n||e.provider,l=Object(o.a)(r.server,r,e.channel),c=r.getXHROptions(e.url(),{dataType:l.typeName,data:i,merge:!0});return e.fetch(c).done(function(){e.set("isPreFetched",!0)})}t.a=i;var r=n(13),a=n.n(r),o=n(510),s=n(26)},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"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=(n(36),n(29)),l=n(317),c=n(373),u=n(1074),d=n(772),p=n(1125),h=n(309),f=n(261),v=n(1126),g=n(141),m=n(320),y=n(3),b=n(151),I={getMediaDecision:function(e){var t=this.augmentProfile(e);if(s.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(o.a.first(i),t,e)
;var r=o.a.map(i,function(n){return this.analyzeMedia(n,t,e)},this);return this.getBestDecision(r)},augmentProfile:function(e){var t=e.profile;if(!t)throw new Error("MDE: No player profile provided for "+e.type);var n=e.type===m.a.types.VIDEO,i=r.a.extend(!0,{},t.directPlay),a=r.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 f=e.allowedTrueHDContainers,v="*"===f;return!v&&f&&(f=Array.isArray(f)?f:[f]),o.a.each(i,function(t,i){this.mergeGenericOptions(t,s),this.mergeMaxQualityOptions(t,e),(c||l&&o.a.contains(l,i))&&this.addAudioCodec("ac3",t,e),(d||u&&o.a.contains(u,i))&&this.addAudioCodec("eac3",t,e),(h||p&&o.a.contains(p,i))&&this.addAudioCodec("dca",t,e),(v||f&&o.a.contains(f,i))&&this.addAudioCodec("truehd",t,e)
;var r=m.a.getStreamByType(e.type),a=t[r];if(a){var g=a.codecs;o.a.each(g,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;o.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&&o.a.each(a.video.codecs,function(t,n){e.videoCodecOptions[n]&&this.mergeCodecOptions(t,e.videoCodecOptions[n])},this),e.audioCodecOptions&&a.audio&&o.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&&(o.a.defaults(e,o.a.omit(t,"video","audio")),o.a.each(["audio","video"],function(n){var i=t[n],r=e[n];i&&(r||(r={},e[n]=r),
o.a.defaults(r,o.a.omit(i,"codecs")),i.codecs&&o.a.each(i.codecs,function(e,t){o.a.defaults(this.ensureCodecs(t,r),e)},this))},this))},mergeCodecOptions:function(e,t){o.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"}];o.a.each(i,function(i){
if("videoResolution"!==i.option||t.type===m.a.types.VIDEO){var r=this.getMaxQualityOption(e,i.option,t);if(null!=r){var a=i.setting,o=m.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=g.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){s.a.info("[MDE] Starting analysis of",this.getMediaTitle(e)),Object(s.a)("[MDE] Analyzing direct play");var i=this.canDirectPlay(e,t.directPlay,n);i.result||Object(s.a)("[MDE] Cannot direct play:",i.failedCheck);var r={finalProfile:t,transcodeServer:n.transcodeServer,
item:n.item,media:e,canDirectPlay:i.result,canDirectPlayFailedCheck:i.failedCheck},a=n.transcoderOptions||{};if(o.a.isFunction(a)&&(a=a(r)),n.type===m.a.types.VIDEO){Object(s.a)("[MDE] Analyzing video direct stream");var l=Object(h.a)(e);if(l){var c=this.canDirectStreamVideo(l,t.directStream.video,n,a);r.canDirectStreamVideo=c.result,r.canDirectStreamVideoFailedCheck=c.failedCheck}}if(n.type!==m.a.types.PHOTO){Object(s.a)("[MDE] Analyzing audio direct stream");var u=Object(d.a)(e);if(u){
var f=this.canDirectStreamAudio(u,t.directStream.audio,n,a);r.canDirectStreamAudio=f.result,r.canDirectStreamAudioFailedCheck=f.failedCheck}}var v=Object(p.a)(r.media);return v&&(Object(s.a)("[MDE] Analyzing subtitles"),o.a.extend(r,this.analyzeSubtitles(v,n))),Object(s.a)("[MDE] Analyzing playability"),o.a.extend(r,this.canPlay(r,n)),o.a.extend(r,this.getEffectiveQuality(e,t.directStream,n)),s.a.group("[MDE] Finished analysis of",this.getMediaTitle(e)),
this.getDecisionLogs(r).forEach(function(e){return s.a.info(e)}),s.a.groupEnd(),r},canDirectPlay:function(e,t,n){if(n.forceDirectPlay)return Object(s.a)("[MDE] Direct play forced"),{result:!0};if(!1===n.allowDirectPlay&&!n.transcodeServer.get("isCloud"))return s.a.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"};if(n.type===m.a.types.VIDEO&&!this.canDirectPlayVideo(e,n))return{result:!1,failedCheck:"canDirectPlayVideo"};var i=t[e.container]
;if(!i)return s.a.warn("[MDE] Direct play failed; unsupported container:",e.container),{result:!1,failedCheck:"containerProfile"};var r=o.a.keys(i);if(r&&r.length){for(var a=0,l=r.length;a<l;a++){var c=r[a],u=i[c];if("mimeType"===c){if(!n.skipCanPlayTypeTest&&!this.canPlayType(m.a.getElementByType(n.type),u))return s.a.warn("[MDE] Direct play failed; canPlayType test, %s: %s",c,u),{result:!1,failedCheck:"canPlayType"}}else if("video"===c||"audio"===c){var p=b.a.get(c),v=Object(f.a)(e,{
streamType:p.id}),g="video"===c?Object(h.a)(e):Object(d.a)(e);if(!g){s.a.warn("[MDE] No stream selected; will not be able to analyze stream codecs");continue}var y="audio"===c&&g!==v[0];if(y&&!n.allowMultiTrackAudio)return s.a.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var I=this.analyzeStream(g,u,n);if(!I.result)return{result:!1,failedCheck:I.failedCheck}}else if("photo"===c){var S=this.analyzeStream(o.a.first(e.Part),u,n)
;if(!S.result)return{result:!1,failedCheck:S.failedCheck}}else if(!this.validateProfileProperty(c,u,e))return{result:!1,failedCheck:"validateProfileProperty:"+c}}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)||(s.a.warn("[MDE] Direct play failed; cannot play DASH"),
!1):(s.a.warn("[MDE] Direct play failed; cannot play FLV"),!1):(s.a.warn("[MDE] Direct play failed; cannot play HLS"),!1):(s.a.warn("[MDE] Direct play failed; option is disabled"),!1)},canPlayType:function(e,t){if(e===m.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):(s.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):(s.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,r=e.match(/^(min|max)(\w)(\w*)/);if(r){
var a="min"===r[1],l="max"===r[1];if(e=r[2].toLowerCase()+r[3],i=n[e],null==i&&s.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),null!=i&&"videoResolution"===e&&(i=g.a.getHeightFromResolution(i),t=g.a.getHeightFromResolution(t)),null!=i){if(a&&i<t)return s.a.warn("[MDE] Invalid profile property; %s: %s < %s",e,i,t),!1;if(l&&i>t)return s.a.warn("[MDE] Invalid profile property; %s: %s > %s",e,i,t),!1}}else if(i=n[e],
null==i&&s.a.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),i!==t&&!o.a.contains(t,i))return s.a.warn("[MDE] Invalid profile property; %s: %s !== %s",e,i,t),!1;return!0},analyzeSubtitles:function(e,t){var n=t.subtitlesBurnLevel||c.a.ALWAYS,i=e.codec;return Object(s.a)("[MDE] Subtitle codec:",i),Object(s.a)("[MDE] Burn level:",n),n===c.a.NEVER?{useSoftSubtitles:!1}:n===c.a.ALWAYS?(s.a.warn("[MDE] Direct play failed; asked to always burn subtitles"),{useSoftSubtitles:!1,
canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitles")?Object(v.a)(i)?(s.a.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(i)&&n===c.a.AUTO?(s.a.warn("[MDE] Soft subtitles failed; ASS subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",
canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitlesWithDirectPlay")?t.allowDirectStreamVideoWithSoftSubtitles?{useSoftSubtitles:!0}:{useSoftSubtitles:!0,canDirectStreamVideo:!1}:(s.a.warn("[MDE] Direct play failed; %s subtitles",i),t.allowDirectStreamVideoWithSoftSubtitles?{useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}:{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1
}):(s.a.warn("[MDE] Direct play failed; server support requires burn subtitles"),s.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(u.a)(e.media);if(n.length){
s.a.warn("[MDE] Unable to play; missing parts");var i=o.a.first(n);return 1===Number(i.exists)?Object(y.default)("Please check the permissions for this file."):Object(y.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,r=i===m.a.types.MUSIC,a=i===m.a.types.VIDEO,l=t.transcodeServer,c=l.get("transcoderAudio"),u=l.get("transcoderVideo");if(r||"track"===t.item.get("type")){
if(n=Object(y.default)("This server is not powerful enough to convert audio."),a&&!u)return s.a.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),n;if(r&&!c)return s.a.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),n}else if(a){
var d=Object(y.default)("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),p=Object(y.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(y.default)("This server is not powerful enough to convert video."),!u||!h){
if(s.a.warn("[MDE] Unable to play; server unable to transcode video"),l.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return Object(y.default)("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return Object(y.default)("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return Object(y.default)("Converting is not supported for synced media.")}if(t.quality){
if(t.quality.index===g.a.ORIGINAL)return n;var f=o.a.clone(t);return f.quality=o.a.extend({index:g.a.ORIGINAL},o.a.pick(t.quality,"attribute")),this.getMediaDecision(f).canDirectPlay?d:"relay"===l.get("maxUploadBitrateReason")?p:n}return d}}}},getEffectiveQuality:function(e,t,n){var i=n.quality,r={},a={};if(e.bitrate||s.a.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),n.type===m.a.types.VIDEO){r.bitrate=e.bitrate,
r.videoResolution=g.a.getHeightFromResolution(e.videoResolution);var o=this.getPrimaryStreamProperty(t,"maxBitrate",n);if(o){var l=Object(h.a)(e),c=l?l.bitrate:e.bitrate;r.bitrate=Math.min(c,o),a.maxVideoBitrate=o}if(i){if(i.videoResolution){var u=g.a.getResolutionFromSize(i.videoResolution),d=g.a.getHeightFromResolution(u);r.videoResolution=Math.min(r.videoResolution,d)}}}else if(n.type===m.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=m.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=o.a.compact([e.container,e.videoCodec,e.audioCodec]),i=Object(h.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 r=e.useSoftSubtitles;null!=r&&t.push("useSoftSubtitles: "+r);var a=e.bitrate;null==a||o.a.isNaN(a)||t.push("bitrate: "+a);var s=e.videoResolution;return null==s||o.a.isNaN(s)||t.push("videoResolution: "+s),t},getBestDecision:function(e){var t=o.a.last(this.sortDecisions(e))
;return s.a.group("[MDE] Selected %s to play",this.getMediaTitle(t.media)),this.getDecisionLogs(t).forEach(function(e){return s.a.info(e)}),s.a.groupEnd(),t},sortDecisions:function(e){
return o.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===l.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(7),a=n.n(r),o=n(151),s=n(261);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,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(){
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(5),a=(n.n(r),n(151)),o=n(1129);t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)("partIndex"),Object(o.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1];if(t)return t.Part[e]})}var r=n(5),a=(n.n(r),n(158)),o=n(1130);t.a=i},function(e,t,n){
"use strict";function i(){return Object(r.createSelector)(Object(o.a)("mediaIndex"),Object(s.a)(),a.a,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1],n=arguments[2];if(t&&t.metadataItem){return n[t.metadataItem].Media[e]}})}var r=n(5),a=(n.n(r),n(115)),o=n(158),s=n(128);t.a=i},function(e,t,n){"use strict";var i=n(6),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(30),m=n(775),y=(n(58),
n(270)),b=n(2658),I=n(2661),S=n(2662),M=n(1119),D=(n(2665),
n(2666)),C=n(2667),O=n(2672),P=n(2674),j=n(2676),T=n(2678),w=n(2680),E=n(2689),x=n(2692),A=n(2695),N=n(777),L=n(2696),k=n(44),_=n.n(k),R=n(2697),z=n.n(R),U=parseInt(_.a.playerControlsPosterHeight,10),B=parseInt(_.a.playerControlsLandscapePosterWidth,10),F=parseInt(_.a.playerControlsNarrowBreakpoint,10),V=parseInt(_.a.playerControlsPosterLeftGutter,10),H=parseInt(_.a.playerControlsPosterBottomGutter,10),Q=parseInt(_.a.playerControlsNarrowPosterBottomGutter,10),Y=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.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.onScreenSizeChange=function(e){var t=e.width,n=t<=F;n!==r.state.isNarrowLayout&&r.setState({isNarrowLayout:n})},r.state={seekStartMilliseconds:0,seekEndMilliseconds:0,bufferStartMilliseconds:0,bufferEndMilliseconds:0,adPositionMilliseconds:0,adDurationMilliseconds:null,isAdVisible:!!n.vast,isAdLoaded:!1,isAdSkipped:!1,isNarrowLayout:!1,
adSkipDelaySeconds:null},r}return p()(t,e),t.prototype.componentDidMount=function(){Object(L.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(L.a)(this.props.showBackgroundVideoPlayer)},t.prototype.componentWillUnmount=function(){Object(L.a)(!1)},t.prototype.render=function(){
var e=this.props,t=e.playerType,n=e.isOpen,i=e.isMiniPlayer,a=e.isRemotePlayer,s=e.isPlayQueueLoading,l=e.isPostPlayVisible,c=e.isFullscreen,u=e.isVideo,d=e.hasError,p=e.hasConflicts,h=e.confirmLiveTVPlayback,f=e.showBackgroundVideoPlayer,L=e.currentMediaType,k=e.confirmPlaybackPayload,_=e.confirmOffsetPayload,R=e.confirmRemoteToLocal,F=e.confirmLocalToRemote,Y=e.vast,G=e.mediaComponent,W=e.mediaHeight,K=e.mediaPlacement,q=e.mediaWidth,Z=e.playerComponent,X=e.onToggleFullscreen,J=this.state,$=J.seekStartMilliseconds,ee=J.seekEndMilliseconds,te=J.bufferStartMilliseconds,ne=J.bufferEndMilliseconds,ie=J.adSkipDelaySeconds,re=J.adPositionMilliseconds,ae=J.adDurationMilliseconds,oe=J.isAdVisible,se=J.isAdLoaded,le=J.isAdSkipped,ce=J.isNarrowLayout
;if(!n)return d?o()(E.a,{isOpen:!0,isRemotePlayer:a,mediaType:L,playerType:t}):p?o()(w.a,{isOpen:!0,isPlayerOpen:n,playerType:t}):h?o()(C.a,{isOpen:!0,isPlayerOpen:n,playerType:t}):null;var ue=u&&i?{edgeGutterX:V,edgeGutterY:ce?Q:H,height:U,placement:m.a,width:B}:{height:W,placement:K,width:q};return o()(M.a,{},void 0,o()(y.a,{page:g.M},void 0,o()("div",{className:((i?z.a.miniPlayerContainer:z.a.fullPlayerContainer)||"")+" "+(!f&&!i&&z.a.fullPlayerContainerBackground||""||"")
},void 0,k&&o()(j.a,{isOpen:!0,playerType:t,confirmPlaybackPayload:k}),_&&o()(P.a,{isOpen:!0,playerType:t,confirmOffsetPayload:_}),R&&o()(T.a,{isOpen:!0,playerType:t}),F&&o()(O.a,{isOpen:!0,playerType:t}),d&&o()(E.a,{isOpen:!0,isRemotePlayer:a,mediaType:L,playerType:t}),p&&o()(w.a,{isOpen:!0,isPlayerOpen:n,playerType:t}),!oe&&!l&&!s&&!a&&!R&&v.a.createElement(G,r()({},ue,{playerType:t,mediaType:L,isNarrowLayout:ce,isStackedAbove:i,onBufferChange:this.onBufferChange
})),oe&&v.a.createElement(N.a,r()({},ue,{playerType:t,isMiniPlayer:i,isFullscreen:c,isSkipped:le,component:S.a,isStackedAbove:i,isNarrowLayout:ce,positionSeconds:Math.floor(re/1e3),url:Y.url,urlTemplateFilters:Y.UrlTemplateFilter,onPositionMillisecondsChange:this.onAdPositionMillisecondsChange,onDurationMillisecondsChange:this.onAdDurationMillisecondsChange,onResponse:this.onAdResponse,onSkipDelayChange:this.onAdSkipDelayChange,onEnd:this.onAdEnd})),v.a.createElement(Z,r()({},this.props,ue,{
isAdVisible:oe&&se,isNarrowLayout:ce,seekStartMilliseconds:$,seekEndMilliseconds:ee,bufferStartMilliseconds:te,bufferEndMilliseconds:ne,adPositionMilliseconds:re,adDurationMilliseconds:ae,adSkipDelaySeconds:ie,onAdSkipPress:this.onAdSkipPress})),o()(x.a,{playerType:t,onToggleFullscreenShortcut:X}),o()(A.a,{playerType:t}),o()(b.a,{playerType:t,isRemotePlayer:a}),o()(I.a,{playerType:t}),o()(D.a,{onScreenSizeChange:this.onScreenSizeChange}))))},t}(f.Component);Y.defaultProps={
confirmLiveTVPlayback:!1,isMusic:!1,isPhoto:!1,isVideo:!1},t.a=Y},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){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(1132)},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(12),o=n.n(a),s=n(527)},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(311),o=n(65),s=n(567),l=n(121),c=n(38),u=n(43),d=i.a.extend({name:"LiveTVSessionModel",context:["server","provider"],
entityType:u.d,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",sessionAttrs:{dvrID:r.a.integer,channelIdentifier:r.a.string,activityUUID:r.a.string,currentPosition:r.a.integer,nextPosition:r.a.integer,lastSeekPosition:r.a.integer,startedAt:r.a.integer,captureBuffer:r.a.object},syncedAttrs:{key:r.a.string,type:r.a.integer,
title:r.a.string},syncedRelations:{grabOperation:{relationClass:s.a,rootPropertyName:"MediaGrabOperation",deferred:!0},timeline:{relationClass:a.default,rootPropertyName:"Timeline",deferred:!0},alsoAiring:{relationClass:a.default,rootPropertyName:"AlsoAiring",deferred:!0}},defaults:{nextPosition:null,lastSeekPosition:null},augmentResponseText:function(e,t){return t===o.a.xml?Object(l.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=u[e.attribution];return t?a()("div",{className:e.className},void 0,a()("div",{className:(c.a.attribution||"")+" "+(t||"")})):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2706)),c=n.n(l),u={"com.tidal":c.a.tidal};t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.isMonochrome,n=e.isRemovable,i=e.tooltip,r=s()(e,["isMonochrome","isRemovable","tooltip"]),o=i||(n?Object(f.default)("Remove"):Object(f.default)("Add"));return u.a.createElement(p.a,a()({},r,{component:d.a,hideOnPress:!1,iconComponent:v.a,iconClassName:n?m.a.iconRemovable:m.a.icon,kind:n&&!t?h.DANGER:h.DEFAULT,ariaLabel:o,tooltip:o}))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(554),p=n(207),h=n(49),f=n(3),v=n(25),g=n(2708),m=n.n(g);i.defaultProps={
className:m.a.button,icon:"plex-icon-add-560"},t.a=i},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){return!!e})}t.a=i;var r=n(5),a=(n.n(r),n(2711))},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(64)),f=n(44),v=n.n(f),g=n(2715),m=n.n(g),y=parseInt(v.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()(h.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,n){"use strict";function i(e){return e-M}function r(){return Object(s.c)({direction:s.a,rows:1,overscan:0,innerHorizontalPadding:30,outerPaddingTop:10,outerPaddingLeft:5,outerPaddingRight:5,getCellWidth:function(e){return Object(c.a)(o()({},e,{minCellWidth:m,preferredCellWidth:g,minColumns:y,maxColumns:b,aspectRatio:v}))},getCellHeight:function(e){return Object(l.a)(o()({},e,{aspectRatio:v,titleHeight:M}))}})}t.a=i,t.b=r
;var a=n(6),o=n.n(a),s=n(461),l=n(781),c=n(571),u=n(26),d=n(32),p=n(126),h=n(44),f=n.n(h),v=Object(p.c)(u.f,null,d.e),g=180,m=135,y=2,b=11,I=parseInt(f.a.posterTitleHeight,10),S=parseInt(f.a.posterTitlePadding,10),M=2*(I+S)},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(o.a)(n))}}}var r=n(11),a=n(5),o=(n.n(a),n(782)),s=n(2721),l=n(2722),c=Object(a.createSelector)(function(e){
return e.remotePlayer?e.remotePlayer.friendlyName:null},function(e){return e.remotePlayer?e.remotePlayer.product:null},Object(s.a)(),function(e,t,n){return{remotePlayerName:e,remotePlayerProduct:t,showRemotePlayer:n}});t.a=Object(r.b)(c,i)(l.a)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),function(e){return{isPaused:e.isPaused}})}function r(e,t){var n={playerType:t.playerType};return{onTogglePlayPress:function(t){e(Object(s.u)(n))}}}
var a=n(11),o=n(5),s=(n.n(o),n(136)),l=n(79),c=n(2725);t.a=Object(a.b)(i,r)(c.a)},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(3)),c=n(1139),u=n(2729),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(2730)),c=n.n(l);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.playerType,n=e.isPostPlayVisible,i=e.isVideo,r=e.isMusic,o=e.isAdVisible,s=e.isMiniPlayer,y=e.hasLiveTVProtocol,b=e.currentSubType,I=e.seekStartMilliseconds,S=e.seekEndMilliseconds,M=e.bufferStartMilliseconds,D=e.bufferEndMilliseconds,C=e.adPositionMilliseconds,O=e.adDurationMilliseconds,P=e.adSkipDelaySeconds,j=e.onAdSkipPress,T=e.onControlsMenuChange,w=e.onFollowMuteMenuChange,E=b===l.a;return a()(c.a,{},void 0,y&&!s?a()(g.a,{playerType:t}):null,o&&!s?a()(p.a,{skipDelaySeconds:P,
positionSeconds:Math.floor(C/1e3),onSkipPress:j}):null,o||!E||s?null:a()(m.a,{playerType:t,onFollowMuteMenuChange:w}),a()(u.a,{},void 0,n?null:a()(f.a,{playerType:t,isAdVisible:o,seekStartMilliseconds:I,seekEndMilliseconds:S,bufferStartMilliseconds:M,bufferEndMilliseconds:D,adPositionMilliseconds:C,adDurationMilliseconds:O}),a()(d.a,{component:y?v.a:h.a,playerType:t,hasLiveTVProtocol:y,isVideo:i,isMusic:r,isAdVisible:o,isMiniPlayer:s,onControlsMenuChange:T})))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(99),n(98)),c=n(1146),u=n(1147),d=n(1148),p=n(2734),h=n(2737),f=n(2846),v=n(2857),g=n(2859),m=n(2868);i.defaultProps={isMiniPlayer:!1},t.a=i},function(e,t,n){"use strict";function i(e){return a()("div",{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(2732)),c=n.n(l);i.defaultProps={className:c.a.bottomBar},t.a=i},function(e,t,n){"use strict";function i(e){return a()("div",{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(2733)),c=n.n(l);i.defaultProps={className:c.a.controlsContainer},t.a=i},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(D.a)(),Object(M.a)(),C.a,function(e,t,n){var i=e.controllable,r=e.playQueue,a=r.currentIndex,o=t.subtype===P.a,s=void 0,l=void 0,c=void 0;return i?(l=!i.skipNext,s=!i.skipPrevious,c=!i.shuffle):(l=!e.repeatAll&&a>=e.playQueue.playQueueItems.length-1,
s=!e.repeatAll&&a<=0&&e.positionSeconds<=O.a,c=!r.canShuffle),{metadataItemEntityID:t.metadataItem,providerEntityID:e.providerEntityID,serverEntityID:e.serverEntityID,volume:n,activateChaptersButton:e.isChaptersVisible,activateLyricsButton:e.isLyricsVisible,activateQueueButton:e.isPlayQueueVisible,activateRepeatButton:e.repeatAll,activateRepeatOneButton:e.repeatOne,activateSettingsButton:e.isSettingsVisible,activateShuffleButton:r.playQueueShuffled,disableNextButton:l,
disablePauseButton:!!i&&!i.playPause,disablePlayButton:!!i&&!i.playPause,disablePreviousButton:s,disableRepeatButton:!!i&&!i.repeat,disableRepeatOneButton:!!i&&!i.repeat,disableShuffleButton:c,disableSkipBackButton:!!i&&!i.seekTo,disableSkipForwardButton:!!i&&!i.seekTo,showCloseButton:!0,showNextButton:!0,showPauseButton:!e.isPaused,showPlayButton:e.isPaused,showPreviousButton:!0,showRepeatButton:!o&&!e.repeatOne,showRepeatOneButton:e.repeatOne,showVolume:!i||i.volume}})}function r(e,t){
var n=t.playerType,i={playerType:n};return{onEditPress:function(t){e(j.editMetadataItem(t))},onFavoritePress:function(t){e(j.favoriteMetadataItem(t))},onUnfavoritePress:function(t){e(j.unfavoriteMetadataItem(t))},onRepeatPress:function(){e(b.t(i))},onRepeatOnePress:function(){e(b.t(i))},onPreviousPress:function(){e(b.i(i))},onNextPress:function(){e(b.h(i))},onShufflePress:function(){e(b.u(i))},onQueuePress:function(){e(b.s(i))},onLyricsPress:function(){e(b.r(i))},onSkipBackPress:function(){
e(S.p(i))},onPlayPress:function(){e(S.k(i))},onPausePress:function(){e(S.j(i))},onSkipForwardPress:function(){e(S.q(i))},onSettingsPress:function(){e(S.w(i))},onChaptersPress:function(){e(S.v(i))},onVolumeChange:function(t){e(S.h(h()({},i,{volume:t})))},onClosePress:function(){e(I.f(i))}}}function a(e,t,n){var i=e.metadataItemEntityID,r=e.providerEntityID;return h()({},n,e,t,{onEditPress:function(){t.onPausePress(),t.onEditPress({metadataItemEntityID:i})},onFavoritePress:function(){
t.onFavoritePress({metadataItemEntityID:i,providerEntityID:r})},onUnfavoritePress:function(){t.onUnfavoritePress({metadataItemEntityID:i,providerEntityID:r})}})}var o=n(8),s=n.n(o),l=n(9),c=n.n(l),u=n(10),d=n.n(u),p=n(6),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(5),b=(n.n(y),n(153)),I=n(69),S=n(136),M=n(128),D=n(79),C=n(569),O=n(321),P=n(98),j=n(167),T=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onVolumeChange=function(e){
var t=r.state.volume,n=Math.round(Math.min(100,Math.max(0,t+e)));t!==n&&r.setState({volume:n},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 d()(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.volume;t!==this.state.volume&&this.setState({volume:t})},
t.prototype.render=function(){var e=this.props.component;return g.a.createElement(e,h()({},this.props,this.state,{onVolumeChange:this.onVolumeChange,onVolumeIconPress:this.onVolumeIconPress}))},t}(v.Component);t.a=Object(m.b)(i,r,a)(T)},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(d.a)(),Object(u.a)(),function(e,t){return{serverEntityID:t.serverEntityID||e.serverEntityID,providerEntityID:t.providerEntityID||e.providerEntityID,type:t.type,subtype:t.subtype,
context:p.e,hasUserRating:null!=t.userRating}})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(22)),d=n(79),p=n(32),h=n(2738),f=Object(l.b)(i)(h.a);f.propTypes=a()({},f.propTypes,{metadataItemEntityID:s.a.string.isRequired,playerType:s.a.string.isRequired}),t.a=f},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(5),o=(n.n(a),
n(22)),s=n(2747);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(323)),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(s.a)(),Object(o.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(5),o=(n.n(a),n(1153)),s=n(405),l=n(1156);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),Object(l.a)(),function(e,t){
if(e&&t)return o.a.findWhere(e.Channel,{id:t.channelID})})}t.a=i;var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(22),l=n(405)},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(53),a=n.n(r),o=n(48),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(53),a=n.n(r),o=n(48),s=n.n(o)},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(D.default)("No upcoming airings");if(Object(M.a)(t,n)){var s=n-Date.now()/1e3;return s<=60?Object(D.default)("About to end"):Object(b.a)(s)}if(Object(I.a)(t)&&Object(S.a)(t,{minutes:60})){var l=1e3*t-Date.now()
;if(l<=P)return r&&i?Object(D.default)("Starting now on {channel}",{channel:i}):Object(D.default)("Starting now");var c=Object(y.a)(l);return r&&i?Object(D.default)("Starting in {duration} on {channel}",{duration:c,channel:i}):Object(D.default)("Starting in {duration}",{duration:c})}return(a?g.a:m.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(72)),v=n(27),g=n(1157),m=n(2748),y=n(375),b=n(319),I=n(1154),S=n(1155),M=n(1162),D=n(3),C=n(2749),O=n.n(C),P=6e4,j=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(v.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,P-Date.now()%P)},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(D.default)("Now on {channel}",{channel:r}),a()(f.b,{className:O.a.separator}),s):s)},t}(h.Component);j.defaultProps={showFullTime:!1,showChannel:!1},t.a=j},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 v=Object(c.default)(e,r),g=void 0
;return g=Object(f.a)(e)?Object(o.default)("Yesterday"):Object(d.a)(e)?Object(h.a)(e)?Object(o.default)("Tonight"):Object(o.default)("Today"):Object(p.a)(e)?Object(o.default)("Tomorrow"):Object(u.a)(e)?Object(s.a)(e):Object(o.default)("{dayOfWeekAbbreviated}, {monthAbbreviated} {dayNumber}",{dayOfWeekAbbreviated:Object(s.a)(e,{abbreviate:!0}),monthAbbreviated:Object(l.a)(e,{abbreviate:!0}),dayNumber:a.a.unix(e).date()}),
t?Object(o.default)("{1} at {2} on {3}",g,v,t):Object(o.default)("{1} at {2}",g,v)}t.a=i;var r=n(48),a=n.n(r),o=n(3),s=n(1158),l=n(786),c=n(406),u=n(1159),d=n(407),p=n(1160),h=n(1161),f=n(572)},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(48),s=n.n(o),l=n(36),c=n(3);t.a=a},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(48),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()().add(1,"day").isSame(t,"day")}t.a=i;var r=n(48),a=n.n(r)},function(e,t,n){"use strict";function i(e){return!(null==e||!Object(a.a)(e))&&parseInt(Object(r.default)(e,"HH"),10)>16}t.a=i;var r=n(406),a=n(407)},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(48),a=n.n(r)},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(5),o=(n.n(a),n(22)),s=n(2752);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.episodeIndex
;if(t>0||0===t)return e.noLeadingZero||(t=Object(o.a)(t)),e.useLongName?Object(s.default)("Episode {episodeNumber}",{episodeNumber:t}):Object(s.default)("E{episodeNumber}",{episodeNumber:t});if(e.date&&e.dateFormat)return a()(e.date).format(e.dateFormat);if(e.date){var n=a()(e.date);return Object(s.default)("{monthNumber}/{dayNumber}/{shortYear}",{monthNumber:n.month()+1,dayNumber:n.date(),shortYear:n.format("YY")})}return""}var r=n(48),a=n.n(r),o=n(667),s=n(3);t.a=i},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,f=e.parentRoute,v=e.originallyAvailableAt,g=Object(d.a)({seasonIndex:l,noLeadingZero:!0}),m=Object(u.a)({episodeIndex:r,date:v,noLeadingZero:!0});return o&&f?a()("span",{className:t},void 0,r>0&&!!g&&a()(c.a,{tabIndex:n,title:s,to:f},void 0,g),r>0&&!!g&&h,a()(c.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(72)),c=n(20),u=n(1164),d=n(2753),p=a()(l.b,{separator:"\xb7"}),h=a()(l.b,{separator:"\xb7"});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(5),o=(n.n(a),n(22)),s=n(790)
;t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(d.createSelector)(v.a,f.a,Object(g.a)(),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=h.a.pick(n.tagItem,"id","tag","tagType","librarySectionType","librarySectionKey");return o()({server:e,provider:t,reasonID:n.reasonID},i)})}function r(e){return c.a.createElement(m.a,e)}var a=n(6),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),
n(7)),h=n.n(p),f=n(37),v=n(50),g=n(400),m=n(2767);t.a=Object(u.b)(i)(r)},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=Object(s.q)(e.type),n=e.Media&&e.Media[0];return{type:t&&t.mediaType,bitrate:n&&n.bitrate}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(26),l=n(2771);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(5),o=(n.n(a),n(22)),s=n(2772);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{duration:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).duration}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(576);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(5),o=(n.n(a),n(22)),s=n(2776);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(5),o=(n.n(a),n(22)),s=n(2779);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(5),o=(n.n(a),n(22)),s=n(2780);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){return e.get("ui").get("mediaSubscriptionModal")}n.d(t,"d",function(){return b}),
n.d(t,"b",function(){return I}),n.d(t,"g",function(){return M}),n.d(t,"a",function(){return D}),n.d(t,"f",function(){return C}),n.d(t,"c",function(){return O}),n.d(t,"e",function(){return P})
;var r,a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(39),u=n(19),d=n(577),p=n(1175),h=n(110),f=n(109),v=n(1176),g=n(66),m=n(35),y=n(26),b=Object(c.a)("ui/modal/initMediaSubscriptionModal"),I=Object(c.a)("ui/modal/clearMediaSubscriptionModal"),S=Object(c.a)("ui/modal/fetchMediaSubscription"),M=Object(c.a)("ui/modal/saveMediaSubscription"),D=Object(c.a)("ui/modal/changeMediaSubscriptionTemplateMode"),C=(Object(c.a)("ui/modal/clearMediaSubscriptionModalError"),
Object(c.a)("ui/modal/moveMediaSubscriptionModal")),O=Object(c.a)("ui/modal/deleteMediaSubscriptionModal"),P=Object(h.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(g.d)(e,t)}),void n(S(a));var s=Object(g.k)(e,t),l=Object(g.e)(e,t),c=l.get("grandparentSubscriptionID")||l.get("subscriptionID")
;if(c)return r.set({mediaSubscription:new d.a({key:c},{server:s})}),void n(S(a));var h=u.join("/media/subscriptions/template",{guid:l.get("guid")}),f=s.getXHROptions(h);o.a.ajax(f).done(function(e){var t=new p.a(e,{parse:!0,server:s}),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(f.a)({key:"mediaSubscription",getModel:i}),r["ui/modal/saveMediaSubscription"]=function(e,t){var n=i(e),r=Object(g.k)(e,t),a=n.get("mediaSubscription"),s=t.targetLibrarySectionID,c=t.targetSectionLocationID,d=void 0===c?null:c,p=t.prefs;Object(m.a)(function(){n.set({isMediaSubscriptionSaving:!0,mediaSubscriptionSaveError:null})})
;var h=a.get("key"),f=a.getSaveParams(),v=o.a.extend(!0,{},f,{includeGrabs:1,targetLibrarySectionID:s,targetSectionLocationID:d,prefs:p}),b=u.join(l.a.result(a,"url"),v);if(!h){var I=Object(y.q)(a.get("target").get("type"));b=b+"&"+a.get("parameters")+"&type="+I.id}var S=r.getXHROptions(b,{type:h?"PUT":"POST"});o.a.ajax(S).done(function(i){if(a.set(a.parse(i)),n.set({templates:void 0,isMediaSubscriptionSaving:!1}),t.metadataItemEntityID){var r=Object(g.e)(e,t);if(r){
var o,s=a.get("target").get("type"),l=Object(y.u)(s),c=l?"grandparentSubscriptionID":"subscriptionID",u=l?"grandparentSubscriptionType":"subscriptionType";r.set((o={},o[c]=a.id,o[u]=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(m.a)(function(){n.set({isMediaSubscriptionMoving:!0,mediaSubscriptionMoveError:null})}),Object(v.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(m.a)(function(){r.set({isMediaSubscriptionDeleting:!0,mediaSubscriptionDeleteError:null})}),a.destroy({wait:!0}).done(function(){if(r.set({isMediaSubscriptionDeleting:!1}),t.metadataItemEntityID){var n=Object(g.e)(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";var i=n(24),r=n(65),a=n(121),o=n(577),s=i.a.extend({name:"MediaSubscriptionTemplateCollection",context:["server"],url:"/media/subscriptions/template",model:o.a,augmentResponseText:function(e,t){
return t===r.a.xml?Object(a.b)(e):e},augmentResponse:function(e){return e.SubscriptionTemplate}});t.a=s},function(e,t,n){"use strict";function i(e,t){var n=e.server,i=s.a.result(e,"url"),r=n.getXHROptions(l.join([i,"move"],{after:t}),{type:"PUT"});return a.a.ajax(r).promise()}t.a=i;var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(19)},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(12),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.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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(2806)),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.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()(h.a,{name:t},void 0,n),p.a.createElement(f.a,a()({name:t,size:g.e.SMALL},i)))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(142),f=n(227),v=n(165),g=n(23);t.a=Object(v.a)(i)},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(c.a)(),Object(l.a)(),function(e,t){return o.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),n(7)),o=n.n(a),s=n(164),l=n(22),c=n(328);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.q)(t);if(!s)return!1;var l=o.length;return n&&!i&&s.mediaType===r.d&&l>1}t.a=i;var r=n(58),a=n(26)},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(2826)),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(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(20)),f=n(207),v=n(45),g=n(3),m=n(25),y=n(31),b=n(196),I=n(383),S=n(401),M=n(23),D=n(1182),C=n(2828),O=n.n(C),P=r()(m.a,{name:"plex-icon-edit-560"}),j=r()(m.a,{name:"plex-icon-favorite-empty-560"}),T=r()(m.a,{
name:"plex-icon-favorite-full-560"}),w=r()(m.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.itemServerEntityID,o=e.itemProviderEntityID,s=e.metadataItemEntityID,l=e.containerKey,c=e.listType,u=e.route,d=e.title,p=e.viewPercent,v=e.unviewedLeafCount,C=e.mediaCount,E=e.isMultiVersion,x=e.isSmart,A=e.isFavorite,N=e.isMatching,L=e.isProcessing,k=e.isAnalyzing,_=e.isRefreshing,R=e.isTrash,z=e.showUnplayedBadge,U=e.showUnplayedNumberBadge,B=e.showLink,F=e.showLinkOnly,V=e.showPlay,H=e.showEdit,Q=e.showSelect,Y=e.showMore,G=e.showFavorite,W=e.showUnfavorite,K=e.showRemove,q=e.canDrag,Z=e.hasActiveSelection,X=e.isSelected,J=e.isOtherItemSelected,$=e.isConflictingTypeSelected,ee=e.isModifierKeyPressed,te=e.isDragging,ne=e.onMouseEnter,ie=e.onPlayPress,re=e.onEditPress,ae=e.onFavoritePress,oe=e.onUnfavoritePress,se=e.onRemovePress,le=e.onSelectPress,ce=e.onDeselectPress,ue=this.state.isActionsMenuOpen,de=Q&&(ee||J)
;return F?r()("div",{className:(t||"")+" "+(O.a.overlay||"")},void 0,B&&r()(h.a,{className:O.a.link,to:u})):r()("div",{className:(t||"")+" "+(O.a.overlay||"")+" "+(Z&&O.a.hasActiveSelection||"")+" "+(X&&O.a.isSelected||"")+" "+($&&O.a.isConflictingTypeSelected||"")+" "+(Q&&ee&&O.a.isModifierKeyPressed||"")+" "+(te&&O.a.isDragging||"")+" "+(_&&O.a.isRefreshing||"")+" "+(R&&O.a.isTrash||"")+" "+(ue&&O.a.isActionsMenuOpen||""||""),onMouseEnter:ne},void 0,r()("div",{className:O.a.background
}),z&&r()("div",{className:O.a.unplayedTagContainer,"data-qa-id":"metadataPosterUnwatchedBadge"},void 0,r()("div",{className:O.a.unplayedTag})),U&&r()("div",{"data-qa-id":"metadataPosterUnwatchedNumberBadge",className:O.a.unplayedBadge},void 0,v),E&&r()("div",{className:O.a.versionBadge,"data-qa-id":"metadataPosterMultipleVersionBadge"},void 0,r()(m.a,{name:"plex-icon-files-560",className:O.a.versionBadgeIcon}),C),x&&!A&&r()("div",{className:O.a.smartBadge,"data-qa-id":"metadataPosterSmartBadge"
},void 0,r()(m.a,{name:"plex-icon-settings-560",className:O.a.smartBadgeIcon})),x&&A&&r()("div",{className:O.a.favoriteBadge,"data-qa-id":"metadataPosterFavoriteBadge"},void 0,r()(m.a,{name:"plex-icon-favorite-full-560",className:O.a.favoriteBadgeIcon})),!!p&&r()(D.a,{className:O.a.progress,progress:p}),_&&r()("div",{className:O.a.refreshingSpinnerContainer},void 0,r()(y.a,{className:O.a.refreshingSpinner})),N&&r()("div",{className:O.a.refreshingCircle},void 0,r()(m.a,{
name:"plex-icon-search-560","aria-label":Object(g.default)("Matching")})),L&&r()("div",{className:O.a.refreshingCircle},void 0,r()(m.a,{name:"plex-icon-tagging-560","aria-label":Object(g.default)("Downloading Metadata")})),k&&r()("div",{className:O.a.refreshingCircle},void 0,r()(m.a,{name:"plex-icon-analyzing-560","aria-label":Object(g.default)("Analyzing")})),R&&r()("div",{className:O.a.trashCircle},void 0,r()(m.a,{name:"plex-icon-trash-560","aria-label":Object(g.default)("In Trash")
})),B&&r()(h.a,{className:O.a.link,to:u}),de&&!$&&r()(h.a,{className:O.a.selectCoverButton,onPress:le}),de&&$&&r()(f.a,{className:O.a.selectCoverButton,component:h.a,tooltip:Object(g.default)("A different type is selected"),tooltipAttachment:M.f.TOP_CENTER,tooltipTarget:this._selectButtonID,showOnFocus:!1,hideOnPress:!1}),V&&r()(b.a,{className:B?O.a.playButton:O.a.playCoverButton,circleClassName:O.a.playCircle,component:q?"div":"button",tabIndex:"-1",title:d,
"data-qa-id":"metadataPosterPlayButton",onPress:ie}),H&&r()(h.a,{className:O.a.editButton,tabIndex:"-1","aria-label":Object(g.default)("Edit {title}",{title:d}),"data-qa-id":"metadataPosterEditButton",onPress:re},void 0,P),G&&r()(h.a,{className:O.a.favoriteButton,tabIndex:"-1","aria-label":Object(g.default)("Add {title} to favorites",{title:d}),"data-qa-id":"metadataPosterFavoriteButton",onPress:ae},void 0,j),W&&r()(h.a,{className:O.a.favoriteButton,tabIndex:"-1",
"aria-label":Object(g.default)("Remove {title} from favorites",{title:d}),"data-qa-id":"metadataPosterUnfavoriteButton",onPress:oe},void 0,T),K&&r()(h.a,{className:O.a.removeButton,tabIndex:"-1","aria-label":Object(g.default)("Remove {title}",{title:d}),onPress:se},void 0,w),Y&&r()(S.a,{"data-qa-id":"metadataPosterMoreButton",className:O.a.moreButton,tabIndex:"-1",serverEntityID:n,providerEntityID:i,itemServerEntityID:a,itemProviderEntityID:o,metadataItemEntityID:s,containerKey:l,listType:c,
showPlay:!1,showQueuePlexMix:!1,showEdit:!1,isMenuOpen:ue,onMenuOpenChange:this.onActionsMenuOpenChange}),Q&&r()(I.a,{id:this._selectButtonID,className:O.a.selectButton,circleClassName:O.a.selectCircle,tabIndex:"-1",title:d,isSelected:X,isDisabled:$,onPress:le}),X&&r()(h.a,{className:O.a.deselectCoverButton,onPress:ce}))},t}(p.Component);t.a=E},function(e,t,n){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.callback,n=e.axisLockDuration,i=void 0===n?l:n,r=e.sensitivity,u=void 0===r?c:r,d=e.maxAbsDelta,p=void 0===d?a.a:d,h=void 0,f=void 0;return function(e){e.preventDefault(),(void 0===f||e.timeStamp-f>=i)&&(h=Math.abs(e[o])>Math.abs(e[s])?o:s,f=e.timeStamp);var n=e[h]*u;if(n){var r=Math.max(0,Math.min(p,Math.abs(n)));r*=n>0?1:-1,r=(e.nativeEvent||e).webkitDirectionInvertedFromDevice?r:-r,t(r)}}}t.a=i
;var r=n(2835),a=n.n(r),o="deltaX",s="deltaY",l=250,c=.5},function(e,t,n){"use strict";function i(){return Object(a.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(11),a=n(5),o=(n.n(a),
n(136)),s=n(128),l=n(79),c=n(778),u=n(797),d={onSeek:o.m},p=Object(c.a)(u.a);t.a=Object(r.b)(i,d)(p)},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(5),a=(n.n(r),n(158)),o=n(212)},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(1078)),c=n(2880),u=n.n(c);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){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){S.default.apply(void 0,["DragDropContext","backend"].concat(Array.prototype.slice.call(arguments)))
;var t=C(e),n=D(t);return function(e){var t,i,s=e.displayName||e.name||"Component",u=(i=t=function(t){function i(){return r(this,i),a(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return o(i,t),c(i,[{key:"getDecoratedComponentInstance",value:function(){return(0,m.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"getManager",value:function(){return n.dragDropManager}},{
key:"getChildContext",value:function(){return n}},{key:"render",value:function(){var t=this;return p.default.createElement(e,l({},this.props,{ref:function(e){t.child=e}}))}}]),i}(d.Component),t.DecoratedComponent=e,t.displayName="DragDropContext("+s+")",t.childContextTypes=M,i);return(0,b.default)(u,e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.unpackBackendForEs5Users=t.createChildContext=t.CHILD_CONTEXT_TYPES=void 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="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=s;var d=n(0),p=i(d),h=n(1),f=i(h),v=n(2891),g=n(162),m=i(g),y=n(807),b=i(y),I=n(587),S=i(I),M=t.CHILD_CONTEXT_TYPES={dragDropManager:f.default.object.isRequired},D=t.createChildContext=function(e,t){return{dragDropManager:new v.DragDropManager(e,t)}},C=t.unpackBackendForEs5Users=function(e){var t=e
;return"object"===(void 0===t?"undefined":u(t))&&"function"==typeof t.default&&(t=t.default),(0,m.default)("function"==typeof t,"Expected the backend to be a function or an ES6 module exporting a default function. Read more: http://react-dnd.github.io/react-dnd/docs-drag-drop-context.html"),t}},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(580),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(347),a=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){var i=n(1193),r=n(481),a=n(585),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(799),a=n(801),o=n(802),s=n(803),l=n(804),c=n(805),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(2899),a=n(2918),o=n(2920),s=n(2921),l=n(2922);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(529),a=n(480),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(2937),s=i(o),l=n(2945),c=i(l),u=n(580),d=n(586),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(2940),a=n(2941);e.exports=i},function(e,t,n){
var i=n(2942),r=n(448),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(799),a=n(801),o=n(802),s=n(805),l=n(2943),c=n(1203),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"!==(void 0===e?"undefined":r(e))||null===e||"object"!==(void 0===t?"undefined":r(t))||null===t)return!1
;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty,o=0;o<n.length;o+=1){if(!a.call(t,n[o]))return!1;var s=e[n[o]],l=t[n[o]];if(s!==l||"object"===(void 0===s?"undefined":r(s))||"object"===(void 0===l?"undefined":r(l)))return!1}return!0}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&&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){
var t,n,i=e.DecoratedComponent,s=e.createHandler,h=e.createMonitor,g=e.createConnector,m=e.registerHandler,b=e.containerDisplayName,S=e.getType,D=e.collect,P=e.options,j=P.arePropsEqual,T=void 0===j?C.default:j,w=i.displayName||i.name||"Component",E=(n=t=function(e){function t(e,n){r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.handleChange=i.handleChange.bind(i),i.handleChildRef=i.handleChildRef.bind(i),(0,
y.default)("object"===c(i.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://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",w,w),i.manager=i.context.dragDropManager,i.handlerMonitor=h(i.manager),i.handlerConnector=g(i.manager.getBackend()),i.handler=s(i.handlerMonitor),
i.disposable=new v.SerialDisposable,i.receiveProps(e),i.state=i.getCurrentState(),i.dispose(),i}return o(t,e),u(t,[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return this.decoratedComponentInstance}},{key:"shouldComponentUpdate",value:function(e,t){return!T(e,this.props)||!(0,M.default)(t,this.state)}}]),u(t,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.disposable=new v.SerialDisposable,
this.currentType=null,this.receiveProps(this.props),this.handleChange()}},{key:"componentWillReceiveProps",value:function(e){T(e,this.props)||(this.receiveProps(e),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose(),this.isCurrentlyMounted=!1}},{key:"receiveProps",value:function(e){this.handler.receiveProps(e),this.receiveType(S(e))}},{key:"receiveType",value:function(e){if(e!==this.currentType){this.currentType=e
;var t=m(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 v.CompositeDisposable(new v.Disposable(a),new v.Disposable(i)))}}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,
M.default)(e,this.state)||this.setState(e)}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)}},{key:"handleChildRef",value:function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)}},{key:"getCurrentState",value:function(){var e=D(this.handlerConnector.hooks,this.handlerMonitor);return e}},{key:"render",value:function(){return p.default.createElement(i,l({},this.props,this.state,{ref:O(i)?this.handleChildRef:null}))}
}]),t}(d.Component),t.DecoratedComponent=i,t.displayName=b+"("+w+")",t.contextTypes={dragDropManager:f.default.object.isRequired},n);return(0,I.default)(E,i)}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"==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},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}}();t.default=s;var d=n(0),p=i(d),h=n(1),f=i(h),v=n(2960),g=n(240),m=(i(g),n(162)),y=i(m),b=n(807),I=i(b),S=n(808),M=i(S),D=n(1204),C=i(D),O=function(e){
return Boolean(e&&e.prototype&&"function"==typeof e.prototype.render)}},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]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,o.isValidElement)(t)){return void e(t,n)}var r=t;i(r);var a=n?function(t){return e(t,n)}:e;return(0,l.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}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(0),s=n(2968),l=function(e){return e&&e.__esModule?e:{default:e}
}(s)},function(e,t,n){"use strict";function i(e,t){return t===e||null!==t&&null!==e&&(0,a.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(808),a=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){"use strict";function i(e,t){return"string"==typeof e||"symbol"===(void 0===e?"undefined":r(e))||t&&(0,o.default)(e)&&e.every(function(e){return i(e,!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;var a=n(347),o=function(e){return e&&e.__esModule?e:{default:e}}(a)},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";Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.isFirefox=void 0;var i=n(2991),r=function(e){return e&&e.__esModule?e:{default:e}}(i);t.isFirefox=(0,r.default)(function(){return/firefox/i.test(navigator.userAgent)}),t.isSafari=(0,r.default)(function(){return Boolean(window.safari)})},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),function(e){var t=Object(c.q)(e.type),n=t&&t.mediaType;return{metadataItemEntityID:e.metadataItem,
mediaType:n}})}function r(e,t){return{onRemovePress:function(n){e(Object(s.k)({playerType:t.playerType,playQueueItemEntityID:t.playQueueItemEntityID}))}}}var a=n(11),o=n(5),s=(n.n(o),n(153)),l=n(811),c=n(26),u=n(3e3);t.a=Object(a.b)(i,r)(u.a)},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(Object(l.a)(),c.c,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return!!e.source&&t.ownerId})}function r(){
return Object(s.createSelector)(d.a,u.a,i(),function(e,t,n){var i=e.find(function(e){var i=t[e];return i&&i.id===n});return i&&t[i]})}function a(){return Object(s.createSelector)(Object(l.a)(),r(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{attribution:e.attribution,hasOwner:!!t,avatar:t&&t.thumb,name:t&&t.title}})}var o=n(11),s=n(5),l=(n.n(s),n(22)),c=n(50),u=n(3005),d=n(3006),p=n(3007);t.a=Object(o.b)(a)(p.a)},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(3014)),c=n.n(l);t.a=i},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(3015)),c=n.n(l);t.a=i},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(80),a=n(38),o=n(43)},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;case"home.recommended":return r.j;default:return t}}t.a=i;var r=n(32)},function(e,t,n){"use strict"
;function i(e,t){return Object(r.a)(e,function(e){return t.reduce(function(t,n){return e&&n in e&&(t[n]=e[n]),t},{})})}t.a=i;var r=n(276)},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]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.identifier,a=e.title,o=t.friendlyName,s=t.sourceTitle,l=void 0;return i===r.d?l=s||o:n.title?l=n.title:a&&(l=a),l}t.a=i;var r=n(41)
},function(e,t,n){"use strict";function i(e,t){if(e&&t)for(var n=0,i=e.length;n<i;n++){var r=e[n],a=r.key,o=r.hubKey;if(o===t||a===t)return r}}t.a=i},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){var t=e.type,n=e.aspectRatio,i=e.titleCount,o=e.context,l=parseInt(s.a.posterTitleHeight,10),c=parseInt(s.a.posterTitlePadding,10),u=void 0,d=void 0,p=void 0,h=void 0,f=void 0;return Object(r.a)(o)?(u=Math.max(2,i-1),d=300,p=200,
f=2,h=6,c*=2):(u=t===a.e?i+3:i,p=n>1?180:80,d=n>1?240:120,f=n>1?2:3,h=n>1?8:11),{titleHeight:u*l+c,minCellWidth:p,preferredCellWidth:d,minColumns:f,maxColumns:h}}t.a=i;var r=n(1222),a=n(197),o=n(44),s=n.n(o)},function(e,t,n){"use strict";function i(e){return e===r.a||e===r.d}t.a=i;var r=n(32)},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(6),o=n.n(a),s=n(0),l=n.n(s),c=n(1220),u=n(3025),d=n(3029)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.metricsContext},Object(a.a)(),s.a,o.a,function(e,t,n,i){if(t){var r={key:t.key,typeKey:t.typeKey,title:t.title,content:t.content,context:t.context||e};return Object(l.a)(n,i,r)}})}t.a=i;var r=n(5),a=(n.n(r),n(592)),o=n(37),s=n(50),l=n(813)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){
return t.sourceDirectory},function(e,t){return t.metricsContext},Object(s.a)(),Object(o.a)(),Object(a.a)(),function(e,t,n,i,r){if(e&&r){var a={key:r.key,typeKey:r.typeKey,title:r.title,content:r.content,context:r.context||t};return Object(l.a)(n,i,e,a)}})}t.a=i;var r=n(5),a=(n.n(r),n(592)),o=n(51),s=n(34),l=n(590)},function(e,t,n){"use strict";function i(e){
var t=e.metadataListEntityID,n=e.metadataItemEntityIDs,i=e.metricsContext,r=e.containerKey,o=e.listType,l=e.listSubtype,c=e.listContext,g=e.columnAdjustment,m=e.populatedRange,y=s()(e,["metadataListEntityID","metadataItemEntityIDs","metricsContext","containerKey","listType","listSubtype","listContext","columnAdjustment","populatedRange"]),b=y.serverEntityID,I=y.providerEntityID,S=y.hubIdentifier,M=Object(h.b)(o,c,{providerEntityID:I,subtype:l,isExternal:S.indexOf("external")>-1})
;return u.a.createElement(f.a,a()({},y,{containerKey:r,keyPropName:"metadataItemEntityID",items:n,itemsOffset:m.start,layout:Object(d.a)(o,l,c,g,M.length),cellRenderer:Object(p.a)({serverEntityID:b,providerEntityID:I,metadataListEntityID:t,containerKey:r,listType:o,listSubtype:l,listContext:c,titleComponents:M,metricsContext:i},v.a)}))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=(n(32),n(412),n(485)),p=n(138),h=n(187),f=n(473),v=n(593);t.a=i},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(5),a=(n.n(r),n(22))},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,u=e.showStreams;return a()(s.Fragment,{},void 0,a()(d.a,{},void 0,a()(g.a,{},void 0,a()(v.a,{},void 0,a()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}))),a()(y.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()(I.a,{},void 0,a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(S.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),M,a()(d.a,{},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,type:r}),u&&a()(h.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),a()(f.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(248)),c=n(281),u=n(129),d=n(96),p=n(348),h=n(1229),f=n(144),v=n(104),g=n(139),m=n(253),y=n(213),b=n(817),I=n(198),S=n(1236),M=a()(u.a,{});i.defaultProps={showStreams:!0},t.a=i},function(e,t,n){"use strict";function i(){return Object(m.createSelector)(function(e){return e.ui.prePlayPage.decisionMediaItem},Object(b.a)(),Object(I.a)(),function(e,t,n){return{mediaItem:e,mediaItems:t.Media,
canShowMoreSubtitlesAction:n}})}var r=n(6),a=n.n(r),o=n(12),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),n(231)),b=n(22),I=n(3048),S=n(55),M=n(252),D=n(3049),C={dispatchMakePrePlayVideoDecision:M.f,dispatchSelectMetadataItemStream:y.e},O=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(D.a,a()({},t,{onAudioStreamSelect:this.onAudioStreamSelect,
onSubtitlesStreamSelect:this.onSubtitlesStreamSelect}))},t}(v.Component);t.a=Object(S.a)(i,C)(O)},function(e,t,n){"use strict";function i(e,t,n,i){return!(!(e.ownerFeatures&&e.ownerFeatures.indexOf(r.k)>-1)||!t||!n||!n.isLibraryItem||n.isExtra||i)}t.a=i;var r=n(81)},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(103)),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"
;var i=n(6),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(816),g=n(3058),m={dispatchResetMetadataItemSubtitles:v.c},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.onModalClose=function(){i.props.dispatchResetMetadataItemSubtitles(),i.props.onModalClose()},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){
return h.a.createElement(g.a,r()({},this.props,{onModalClose:this.onModalClose}))},t}(p.Component);t.a=Object(f.b)(null,m)(y)},function(e,t,n){"use strict";var i=(n(36),n(19)),r=n(24),a=n(3057),o=r.a.extend({name:"SubtitlesCollection",context:["server","key","language","title","mediaItemID","minimumScore","hearingImpaired"],model:a.a,url:function(){var e={language:this.language};return this.title&&(e.title=this.title),this.mediaItemID&&(e.mediaItemID=this.mediaItemID),
this.minimumScore&&(e.minimumScore=this.minimumScore),null!=this.hearingImpaired&&(e.hearingImpaired=this.hearingImpaired),i.join([this.key,"/subtitles"],e)}});t.a=o},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(387),a=/(^[^-]+)\-/},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(3078)),c=n.n(l);i.defaultProps={className:c.a.tertiaryTitleSpacer},t.a=i},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(5),o=(n.n(a),n(22)),s=n(3081);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,l=e.summary,S=e.showStreams;return a()(s.Fragment,{},void 0,a()(c.a,{},void 0,a()(v.a,{},void 0,a()(f.a,{},void 0,r)),a()(m.a,{},void 0,a()(f.a,{},void 0,o),a()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),a()(b.a,{},void 0,a()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(h.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}))),I,a()(c.a,{},void 0,a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),S&&a()(d.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(p.a,{},void 0,l)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(129)),c=n(96),u=n(348),d=n(1229),p=n(144),h=n(349),f=n(104),v=n(139),g=n(253),m=n(213),y=n(817),b=n(198),I=a()(l.a,{});i.defaultProps={showStreams:!0},t.a=i},function(e,t,n){"use strict";n.d(t,"b",function(){return u}),n.d(t,"a",function(){return d})
;var i,r=n(6),a=n.n(r),o=n(39),s=n(378),l=n(153),c=n(177),u=Object(o.a)("ui/player/playQueue/toggleAutoPlay"),d=a()({},l.j,(i={},i[l.b]=function(e,t){var n,i=t.playerType,r=e.get("user").id,o=Object(c.c)(e,i),s=o.get("playQueue"),l=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=l.get("restorePlayQueue");l.save("restorePlayQueue",a()({},d,(n={},n[r]=u,n)))},i[l.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(c.c)(e,n),r=e.get("experienceSettings"),a=r.get("autoPlay");Object(s.a)(e).changeAutoPlay(i,r,!a)},i))},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.children,i=e.isPlayQueueLoading;return a()("div",{className:(t||"")+" "+(i&&u.a.playQueueIsLoading||""||"")},void 0,i?d:n)}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(3110),u=n.n(c),d=a()(l.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e){return!!e.remotePlayer},function(e){return e.isFullscreen},Object(O.a)(),Object(P.a)(),Object(C.a)(),j.a,function(e,t,n,i,r,a){var o=n.isOpen,s=n.openState,l=s===T.b
;return{isOpen:o,isServerlessPlayer:o&&(!i||!r),isMiniPlayer:l,isRemotePlayer:e,isFullscreen:t,hasFullscreen:Object(I.c)("fullscreenManager").hasFullscreen,restorePlayQueuePayload:a}})}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(29)),I=n(15),S=n(153),M=n(69),D=n(136),C=n(233),O=n(79),P=n(472),j=n(3111),T=n(190),w=n(99),E=n(3),x={dispatchRestorePlayQueue:S.m,dispatchEndPlayback:M.f,
dispatchUpdatePlayerError:D.z},A=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.onEnterFullscreen=function(){Object(I.c)("fullscreenManager").enter()},i.onExitFullscreen=function(){Object(I.c)("fullscreenManager").exit()},i.onToggleFullscreen=function(){i.props.isFullscreen?i.onExitFullscreen():i.onEnterFullscreen()},r=n,d()(i,r)}return h()(t,e),
t.prototype.componentDidMount=function(){this._restorePlayQueue(),this.props.isServerlessPlayer&&this.props.dispatchEndPlayback({playerType:this.props.playerType})},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.dispatchEndPlayback,i=t.isFullscreen,r=t.isOpen,a=t.isServerlessPlayer,o=t.playerType;this._restorePlayQueue(),a&&!e.isServerlessPlayer&&n({playerType:o});var s=Object(I.c)("fullscreenManager");!r&&e.isOpen&&i&&s.shouldExitOnPlayerClose&&this.onExitFullscreen()},
t.prototype.componentDidCatch=function(e,t){b.a.error(e.stack),this.props.dispatchEndPlayback({playerType:this.props.playerType}),this.props.dispatchUpdatePlayerError({playerType:this.props.playerType,errorMessage:Object(E.default)("There was an unexpected error during playback. Please visit our forums if you continue to experience problems.")})},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(w.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,e.dispatchUpdatePlayerError,s()(e,["component","isServerlessPlayer","restorePlayQueuePayload","dispatchRestorePlayQueue","dispatchEndPlayback","dispatchUpdatePlayerError"]));return n?null:g.a.createElement(t,a()({},i,{onEnterFullscreenPress:this.onEnterFullscreen,
onExitFullscreenPress:this.onExitFullscreen,onToggleFullscreen:this.onToggleFullscreen}))},t}(v.Component);t.a=Object(m.b)(i,x)(A)},function(e,t,n){"use strict";function i(e){var t=e.playerType,n=e.bufferStartMilliseconds,i=e.bufferEndMilliseconds,r=e.positionMilliseconds,o=c()(e,["playerType","bufferStartMilliseconds","bufferEndMilliseconds","positionMilliseconds"]);return s()(h.a,{},void 0,s()(f.a,{},void 0,s()(g.a,{playerType:t,bufferStartMilliseconds:n,bufferEndMilliseconds:i,
positionMilliseconds:r,showBuffer:!0}),p.a.createElement(v.a,a()({component:m.a,playerType:t},o))))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=(n(99),n(1146)),f=n(1147),v=n(1148),g=n(1185),m=n(3117);t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return u});var i,r=n(39),a=n(19),o=n(221),s=n(110),l=n(177),c=Object(r.a)("ui/player/photoPlayer/fetchRelatedPhotos"),u=Object(s.a)((i={},
i["ui/player/photoPlayer/fetchRelatedPhotos"]=function(e){var t=Object(l.c)(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,provider:s.provider,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(2),r=n.n(i),a=n(0),o=(n.n(a),
n(67)),s=n(46),l=n(3156),c=r()(o.a,{},void 0,r()(l.a,{})),u=s.a.extend({component:function(){return c}});t.a=u},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(l.a.result(r,"url"),{headers:{"X-Plex-Token":n}})).then(function(e){return r.signIn(e)}).then(function(){u.a.trigger("navigate:refresh")}).fail(function(e){var t=Object(d.a)(e);u.a.trigger("show:alert",{message:Object(p.a)(t)})})}n.d(t,"b",function(){
return h}),n.d(t,"a",function(){return f});var r,a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(39),u=n(18),d=n(1055),p=n(1056),h=Object(c.a)("user/signIn/signInWithAuthToken"),f=(r={},r["user/signIn/signInWithAuthToken"]=function(e,t,n){i(e,{authToken:t.authToken})},r)},function(e,t,n){"use strict";function i(e){return c.a.createElement(f.a,a()({title:Object(p.default)("Plex is down for maintenance"),description:Object(p.default)("Don't worry, it will be back soon")},e),s()(u.a,{to:d.b,target:"_blank",
kind:h.b.PRIMARY},void 0,"status.plex.tv"))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(0),c=n.n(l),u=n(20),d=n(334),p=n(3),h=n(23),f=n(113);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createStructuredSelector)({server:Object(c.a)(),outOfDateServers:u.a,isDownForMaintenance:g,hasFailedResources:m,hasPlexSubscription:function(e){return e.user.hasPlexSubscription},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(11),o=n(5),s=(n.n(o),n(7)),l=n.n(s),c=n(34),u=n(1247),d=n(337),p=n(603),h=n(68),f=n(413),v=n(3177),g=Object(o.createSelector)(d.a,function(e){return!!l.a.findWhere(e,{isDownForMaintenance:!0})}),m=Object(o.createSelector)(d.a,function(e){return!!l.a.findWhere(e,{hasFailedResources:!0})});t.a=Object(a.b)(i,r)(v.a)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(7)),a=n.n(r),o=n(337),s=Object(i.createSelector)(o.a,function(e){return a.a.where(e,{isOutOfDate:!0})});t.a=s},function(e,t,n){"use strict";var i=n(1249);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(5),a=(n.n(r),n(394));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()(l.a,{className:m.a.serverMenu,target:t,isOpen:n,scrollerProps:I,maxHeight:b,onMenuClose:s},void 0,a()(u.a,{page:"serverPicker"},void 0,a()(f.a,{onPress:s}),r.map(function(e){return a()(v.a,{selectedProviderEntityID:i,serverEntityID:e},e)
}),o.map(function(e){return a()(h.a,{selectedProviderEntityID:i,providerEntityID:e},e)})))}n.d(t,"a",function(){return b}),n.d(t,"b",function(){return I});var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(56)),c=n(54),u=n(3199),d=n(44),p=n.n(d),h=n(3200),f=n(3201),v=n(3204),g=n(3206),m=n.n(g),y=parseInt(p.a.serverMenuItemHeight,10),b=5*y,I={className:m.a.serverMenuScroller,scrollDirection:c.VERTICAL,autoScroll:!0};t.c=i},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(12),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(20),m=n(49),y=n(3),b=n(31),I=n(73),S=n(282),M=n(184),D=r()(I.a,{},void 0,r()(b.a,{})),C=r()(S.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()(M.a,{title:Object(y.default)("There was an unexpected error"),description:Object(y.default)("Please retry, or visit our forums if you continue to experience problems")
},void 0,a?Object(y.default)("Retrying\u2026"):r()(g.a,{kind:m.PRIMARY,onPress:this.onRetry},void 0,Object(y.default)("Retry"))):r()(M.a,{title:Object(y.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";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(5),s=(n.n(o),n(120)),l=n(1253),c=n(84),u=n(74),d=n(3219),p=Object(o.createSelector)(function(e){return e.ui.metadataListPage},u.a,function(e,t){return{metadataListEntityID:e.metadataList,activeSelectionType:t.activeSelectionType}
}),h=Object(s.a)(d.a,i,r),f=Object(a.b)(p)(h);t.a=f},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(39),r=n(111),a=Object(i.a)(r.D)},function(e,t,n){"use strict";function i(){return Object(f.createSelector)(v.a,D.a,function(e,t){return t.activeSelectionItems.map(function(t){return e[t.model]})})}function r(){return Object(f.createSelector)(y.a,function(e){for(var t={},n=h()(e),i=Array.isArray(n),r=0,n=i?n:d()(n);;){var a;if(i){if(r>=n.length)break;a=n[r++]}else{
if(r=n.next(),r.done)break;a=r.value}var o=a;t[o]=Object(b.b)(e[o])}return t})}function a(){return Object(f.createSelector)(g.a,function(e){for(var t={},n=h()(e),i=Array.isArray(n),r=0,n=i?n:d()(n);;){var a;if(i){if(r>=n.length)break;a=n[r++]}else{if(r=n.next(),r.done)break;a=r.value}var o=a;t[o]=Object(m.b)(e[o])}return t})}function o(){return Object(f.createSelector)(r(),a(),i(),D.a,I.a,function(e,t,n,i,r){var a=i.activeSelectionType,o=n.map(function(n){return{model:n,
provider:t[n.providerEntityID],server:e[n.serverEntityID]}}),s=Object(C.a)(r,o,a),l=s.showMarkPlayed||s.showMarkUnplayed;return c()({activeSelectionType:a,showTogglePlayed:l},s)})}function s(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metricsPage:t.metricsPage};return{onPlaySelectedPress:function(){e(M.n(n))},onShufflePress:function(){e(M.s(n))},onPlaySelectedNextPress:function(){e(M.o(n))},onAddToQueuePress:function(){e(M.a(n))},onFavoritePress:function(){
e(M.h(n))},onUnfavoritePress:function(){e(M.u(n))},onMarkPlayedConfirm:function(){e(M.i(n))},onMarkUnplayedConfirm:function(){e(M.j(n))},onEditPress:function(){e(M.g(n))},onRefreshPress:function(){e(M.p(n))},onAnalyzePress:function(){e(M.b(n))},onMergePress:function(){e(M.k(n))},onSyncPress:function(){e(M.t(n))},onOptimizePress:function(){e(M.m(n))},onDeleteConfirm:function(){e(M.c(c()({},n,{options:{skipRedirect:!t.allowRedirectOnDelete}})))},onDeselectAllPress:function(){e(M.d(n))}}}
var l=n(6),c=n.n(l),u=n(3221),d=n.n(u),p=n(53),h=n.n(p),f=n(5),v=(n.n(f),n(115)),g=n(132),m=n(37),y=n(163),b=n(50),I=n(185),S=n(55),M=n(341),D=n(74),C=n(3224),O=n(3225);t.a=Object(S.a)(o,s)(O.a)},function(e,t,n){"use strict";function i(e,t){if(e)return p.a;switch(t){case I.f:return v.a;case I.e:return f.a;case I.d:return h.a;default:return g.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,I=e.selectedSort,S=e.isDirectoryList,C=e.isFolder,O=e.metadataItemEntityIDs,P=e.totalSize,j=e.populatedRange,T=e.firstItemType,w=e.firstItemSubtype,E=e.isPending,x=e.isPopulated,A=e.error,N=e.columnAdjustment,L=e.hasGutter,k=e.onPageRequest,_=e.onListScrollIndexChange,R=e.onListUpdate,z=e.onMeasure,U=e.scrollIndex,B=P||O.length
;if(x&&B){var F=d||T,V=p||w,H=i(S,f);return o()(H,{className:M.a.metadataListPageContent,scrollerClassName:(M.a.metadataListScroller||"")+" "+(L&&M.a.hasGutter||""||""),serverEntityID:n,providerEntityID:r,metadataListEntityID:a,containerKey:s,containerTitle:l,listType:F,listSubtype:V,listContext:h,typeKey:v,isFolder:C,activeSort:g,selectedSort:I,scrollIndex:U,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:S?"metadataDirectoryEntityID":"metadataItemEntityID",items:O,
itemsOffset:j.start,size:B,columnAdjustment:N,onPageRequest:k,onListScrollIndexChange:_,onListUpdate:R,onMeasure:z},void 0,t)}return E?D:A?o()(m.a,{},void 0,o()(b.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()(m.a,{},void 0,o()(y.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(3)),u=n(32),d=(n(412),n(31)),p=n(1256),h=n(1257),f=n(1262),v=n(1265),g=n(836),m=n(140),y=n(188),b=n(284),I=n(62),S=n(3267),M=n.n(S),D=o()(m.a,{},void 0,o()(y.a,{},void 0,o()(d.a,{})));r.defaultProps={listContext:u.b,listStyle:I.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.sourceDirectory,o=e.containerKey,l=e.containerTitle,c=e.activeSort,v=e.listType,g=e.listSubtype,m=e.listContext,y=e.columnAdjustment,b=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","sourceDirectory","containerKey","containerTitle","activeSort","listType","listSubtype","listContext","columnAdjustment"]),I=Object(f.b)(v,m,{activeSort:c,subtype:g,providerEntityID:n});return u.a.createElement(d.a,a()({
listType:v,listContext:m,layout:Object(p.a)(v,g,m,y,I.length),cellRenderer:Object(h.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,sourceDirectory:r,containerKey:o,containerTitle:l,listType:v,listContext:m,titleComponents:I})},b))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(209),p=(n(32),n(832)),h=n(1223),f=n(187);n(93);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.listContext,v=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listContext"]);return u.a.createElement(d.a,a()({listType:l,listContext:c,layout:p.a,cellRenderer:Object(h.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:l,listContext:c,containerKey:r,containerTitle:o},f.a)},v))}
var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(209),p=(n(32),n(1258)),h=n(138),f=n(1259);t.a=i},function(e,t,n){"use strict";var i=n(335),r=n(44),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(d.a)(),h.a,p.a,f.a,Object(y.a)(),Object(g.a)(),Object(m.a)(),Object(b.a)(),function(e){
return e.ui.audioVideoPlayer.isPaused},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],o=arguments[9],s=arguments[10];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,isPlaying:o,isPlayerPaused:s}})}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(u.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(S.a,e):l.a.createElement(M.a,e)}var o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(5),u=(n.n(c),
n(69)),d=n(22),p=n(37),h=n(50),f=n(185),v=n(55),g=n(408),m=n(1260),y=n(598),b=n(833),I=n(339),S=n(3232),M=n(3236);t.a=Object(v.a)(i,r,I.a)(a)},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]:{},n=t.summary;return Object(a.a)(e.identifier)===l.a?Object(c.a)(n):n})}t.a=i;var r=n(5),a=(n.n(r),n(938)),o=n(22),s=n(51),l=n(939),c=n(956)},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(5),o=(n.n(a),n(22)),s=n(3233);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.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(d.a,a()({listType:l,listContext:c,layout:p.a,cellRenderer:Object(h.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:l,listContext:c,containerKey:r,containerTitle:o},f.a)},v))}
var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(209),p=(n(32),n(1263)),h=n(138),f=n(1264);t.a=i},function(e,t,n){"use strict";var i=n(335),r=n(44),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)(),b.a,y.a,I.a,Object(w.a)(),Object(T.a)(),Object(C.a)(),Object(O.a)(),Object(j.a)(),Object(P.a)(),E.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(N.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(A.e)(i,r,a,n),showSelect:Object(A.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(M.editMetadataItem)({serverEntityID:n,providerEntityID:i,
metadataItemEntityID:a,metricsPage:o}))},onSelectItem:function(t){e(Object(D.j)(p()({metadataListEntityID:r,id:a},t)))},onDeselectItem:function(t){e(Object(D.b)(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(6),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(5),m=(n.n(g),
n(22)),y=n(37),b=n(50),I=n(185),S=n(55),M=n(167),D=n(135),C=n(408),O=n(1260),P=n(594),j=n(597),T=n(1227),w=n(598),E=n(74),x=n(479),A=n(278),N=n(232),L=n(339),k=n(44),_=n.n(k),R=n(3238),z=n(3240),U=parseInt(_.a.summaryCellPadding,10),B=Object(x.a)(R.a),F=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(S.a)(i,r,L.a)(F)},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.isFolder,y=e.activeSort,b=e.selectedSort,I=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","containerTitle","listType","listSubtype","listContext","typeKey","isFolder","activeSort","selectedSort"]);return u.a.createElement(d.a,a()({layout:p.a,cellRenderer:Object(h.a)({serverEntityID:t,
providerEntityID:n,metadataListEntityID:i,containerKey:r,containerTitle:o,listType:l,listSubtype:c,listContext:v,typeKey:g,isFolder:m,activeSort:y,selectedSort:b},f.a)},I))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(209),p=(n(32),n(835)),h=n(138),f=n(605);t.a=i},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},function(e,t){
return t.isFolder},Object(a.a)(),c.a,function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments[5],c=n===o.b,u=Object(s.a)(e,t);return Object(l.c)(e,t,n,{isFolder:i,keys:c?a[u]:void 0,sorts:c?r.sorts:void 0})})}t.a=i;var r=n(5),a=(n.n(r),n(234)),o=n(32),s=n(606),l=n(1267),c=n(3258)},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,d=a.isFolder;if(o&&o.length){return(u&&u.length&&!d?r(u):i(e)).reduce(function(e,t){return-1!==o.indexOf(t.key)&&e.push(t),e},[])}switch(n){case c.h:switch(e){case l.j:return[k,H,J,Y];case l.e:return[Z,L,Y];case l.a:return[L,H,Y];case l.l:return[F,G]}}switch(t){case s.b:switch(e){case l.k:return[L];case l.l:return[L,K]}}
switch(e){case l.f:return[L,H,K,q];case l.k:return[L,H,X,$];case l.j:return[k,_];case l.e:return[L,R,q];case l.b:return[L];case l.a:return[L,z,H];case l.l:return[L,U,V,K];case l.g:case l.h:case l.c:case l.d:return[L]}return[]}t.b=i,t.a=r,t.c=a;var o=n(3),s=n(98),l=n(26),c=n(32),u=n(248),d=n(468),p=n(3242),h=n(1168),f=n(3246),v=n(1169),g=n(794),m=n(763),y=n(1170),b=n(788),I=n(1171),S=n(1261),M=n(1270),D=n(3249),C=n(1172),O=n(1173),P=n(764),j=n(3252),T=n(3254),w=n(476),E=n(3256),x=n(342),A={
flex:"2 1 350px"},N={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 p.a},
style:A},k={key:"season",ascKey:"season.index,season.titleSort",descKey:"season.index:desc,season.titleSort",title:function(){return Object(o.default)("Season")},component:function(){return p.a},style:A},_={key:"seasonShow",ascKey:"show.titleSort,index",descKey:"show.titleSort:desc,index",title:function(){return Object(o.default)("Show")},component:function(){return d.a},style:A},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 u.a},style:A},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:A},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 u.a},style:A},B={key:"trackArtist",title:function(){return Object(o.default)("Artist")},ascKey:"originalTitle",descKey:"originalTitle:desc",component:function(){return j.a},style:A},F={key:"combinedTitleTrackArtist",ascKey:"titleSort",descKey:"titleSort:desc",title:function(){return Object(o.default)("Track Title")},component:function(){return f.a},style:A},V={key:"trackAlbum",ascKey:"album.titleSort",
descKey:"album.titleSort:desc",title:function(){return Object(o.default)("Album")},component:function(){return d.a},style:A},H={key:"year",ascKey:"year",descKey:"year:desc",title:function(){return Object(o.default)("Year")},component:function(){return x.a},style:{flex:"0 1 150px"}},Q={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 w.a},style:{flex:"0 0 115px"}},G={key:"miniUserRating",ascKey:"userRating",descKey:"userRating:desc",title:function(){return Object(o.default)("Rating")},component:function(){return w.a},style:{flex:"0 0 75px",padding:0}},W={key:"contentRating",ascKey:"contentRating",descKey:"contentRating:desc",title:function(){return Object(o.default)("Content Rating")},
component:function(){return v.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 M.a;default:return y.a}},style:{flex:"0 1 150px"}},q={key:"progress",ascKey:"viewOffset",descKey:"viewOffset:desc",title:function(){return Object(o.default)("Progress")},component:function(){return D.a},style:{flex:"0 1 150px"}},Z={key:"miniProgress",ascKey:"viewOffset",
descKey:"viewOffset:desc",title:function(){return Object(o.default)("Progress")},component:function(){return S.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 P.a},style:{flex:"0 1 150px"}},J={key:"seasonCount",ascKey:"childCount",descKey:"childCount:desc",title:function(){return Object(o.default)("Episodes")},component:function(){
return b.a},style:{flex:"0 1 150px"}},$={key:"unwatchedCount",ascKey:"unviewedLeafCount",descKey:"unviewedLeafCount:desc",title:function(){return Object(o.default)("Unplayed")},component:function(){return T.a},style:{flex:"0 1 150px"}},ee={key:"playCount",ascKey:"viewCount",descKey:"viewCount:desc",title:function(){return Object(o.default)("Plays")},component:function(){return E.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 m.a},style:N},ne={key:"dateViewed",ascKey:"lastViewedAt",descKey:"lastViewedAt:desc",title:function(){return Object(o.default)("Date Viewed")},component:function(){return I.a},style:N},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 C.a},style:N},re={key:"resolution",ascKey:"mediaHeight",descKey:"mediaHeight:desc",title:function(){return Object(o.default)("Resolution")},component:function(){return O.a},style:{flex:"0 1 150px"}},ae={key:"bitrate",ascKey:"mediaBitrate",descKey:"mediaBitrate:desc",title:function(){return Object(o.default)("Bitrate")},component:function(){return h.a},style:{flex:"0 1 150px"}},oe={
movie:[L,H,Q,Y,W,K,q,ee,te,ne,ie,re,ae],show:[L,H,Q,Y,W,X,$,te,ne,ie],season:[k,_,Y,te],episode:[L,R,H,Q,Y,K,q,ee,te,ne,ie,re,ae],artist:[L,Y,te],album:[L,z,H,Q,Y,te,ie],track:[L,U,B,V,H,Y,K,q,ee,te,ae],collection:[L,Y]},se=[L,k,_,R,z,U,B,V,H,Q,Y,W,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(25)),c=n(3244),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(5),o=(n.n(a),n(22)),s=n(791);t.a=Object(r.b)(i)(s.a)},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"),fileInputButtonLabel:Object(l.default)("Choose OPML File"),fileImportLabel:Object(l.default)("Import podcasts from an OPML file instead"),
urlImportLabel:Object(l.default)("Import podcasts from a URL instead"),hasFileImportFeature:!0,onModalClose:i})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3)),c=n(3279);t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(42),b=n(3),I=n(3281),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.onChange=function(e){
if(e.target.files&&e.target.files.length){var t=e.target.files[0];r.setState({filename:t.name})}r.props.onChange(e)},r.state={filename:null},r}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.inputClassName,i=e.buttonText,a=(e.isDisabled,e.showFilename),s=l()(e,["className","inputClassName","buttonText","isDisabled","showFilename"]),c=this.state.filename;return o()("span",{},void 0,o()(y.a,{className:t,component:"label"
},void 0,i,m.a.createElement("input",r()({},s,{className:n,type:"file",onChange:this.onChange}))),a?o()("span",{className:(S.a.filename||"")+" "+(!c&&S.a.noFilename||""||"")},void 0,c||Object(b.default)("No file selected")):null)},t}(g.Component);M.defaultProps={inputClassName:S.a.fileInput,showFilename:!1},t.a=M},function(e,t,n){"use strict";var i=n(16),r=n(3289),a=n(107),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(24),a=n(508),o=n(3290),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(o.createSelector)(function(e,t){return t.activeFilters},Object(s.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.q)(l.f).id,Object(l.q)(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(c.a)(n,o)})}t.a=i;var r=n(6),a=n.n(r),o=n(5),s=(n.n(o),n(51)),l=n(26),c=n(840),u="hdonly"},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(7),a=n.n(r),o=(n(36),n(417)),s=n(1277),l=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(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(6),a=n.n(r),o=n(11),s=n(5),l=(n.n(s),n(216)),c=n(119),u=n(3296),d={dispatchUpdateAiredProgress:l.k};t.a=Object(o.b)(i,d)(u.a)},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,
options:{type:c.d,identifier:t.channelIdentifier}};return{dispatchStartLiveTVPlayback:function(){e(Object(s.l)(n))}}}var a=n(11),o=n(5),s=(n.n(o),n(186)),l=n(22),c=n(58),u=n(3307);t.a=Object(a.b)(i,r)(u.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(5),a=(n.n(r),n(3)),o=n(1281)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.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(o.default)("HD Channels Only")}]})}t.a=i
;var r=n(5),a=(n.n(r),n(51)),o=n(3)},function(e,t,n){"use strict";function i(e){for(var t=[],n=o.a.unix(e),i=0;i<p;i++){var r=o()().add(i,"days"),a=Object(u.a)(r),s=r.date()===n.date();t.push({title:a,value:r.unix(),isSelected:s})}return t}function r(){return Object(l.createSelector)(function(e){return e.ui.channelGridPage},function(e){return{dateOptions:i(e.startTime)}})}var a=n(48),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(216)),u=n(843),d=n(3338),p=8,h={dispatchSetStartTime:c.i}
;t.a=Object(s.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(103)),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";var i=n(11),r=n(5),a=(n.n(r),n(216)),o=n(1281),s=n(3344),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.className,n=e.typeKey,i=e.activeFilters,r=e.activeFilterLabel,o=e.activeSort,s=e.filters,l=e.selectedFilter,d=e.showSpinner,y=e.showCustomFilter,M=e.onFilterSelect,D=c.a.groupBy(s,function(e){var t=e.filterType;return t===p.a?t:p.b}),C=D[p.a],O=D[p.b];return a()(u.a,{className:(t||"")+" "+(b.a.filtersScroller||""),autoScroll:!0},void 0,a()(v.a,{to:Object(f.a)({typeKey:n,sort:o}),isSelected:c.a.isEmpty(i)},"all",Object(h.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=!(!l||l.filter!==e.filter);return a()(m.a,{typeKey:n,activeFilters:i,activeSort:o,filter:e.filter,filterKey:e.key,title:e.title,showSpinner:d&&t,onFilterSelect:M},e.filter)}),y&&S,y&&a()(v.a,{to:Object(f.a)({typeKey:n,customFilter:!0})},"customFilter",Object(h.default)("Custom Filter...")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(7)),c=n.n(l),u=n(71),d=n(243),p=(n(36),n(285)),h=n(3),f=(n(89),n(256)),v=n(103),g=n(3345),m=n(3346),y=n(3348),b=n.n(y),I=a()(d.a,{}),S=a()(d.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(6),a=n.n(r),o=n(7),s=(n.n(o),n(36),n(285))},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(7),a=n.n(r)},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(6),a=n.n(r),o=n(7);n.n(o),n(36)},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(53),c=n.n(l),u=n(541)},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(o.a)(),Object(l.a)(c.b),s.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(5),o=(n.n(a),n(34)),s=n(70),l=n(274),c=n(81),u=n(3352);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="tidal"},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(o.a,function(e){return{hasTidal:(e.find(function(e){return e.type===l.b})||{}).state===s.a}})}var r=n(11),a=n(5),o=(n.n(a),n(3363)),s=n(660),l=n(661),c=n(3364);t.a=Object(r.b)(i)(c.a)},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},function(e,t){return t.isFolder},Object(M.a)(),Object(I.a)(),function(e,t,n,r){var a=t?Object(D.b)(e):Object(D.a)(r.sorts),o=n.reduce(function(e,t){return e[t.key]=t,e},{});return{allTableColumns:i(r.sorts,a),activeTableColumnsByKey:o,activeTableColumns:n}})}
var a=n(12),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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),n(234)),S=n(257),M=n(1266),D=n(1267),C=n(3375),O={dispatchSelectLibraryTableColumn:S.selectLibraryTableColumn,dispatchDeselectLibraryTableColumn:S.deselectLibraryTableColumn},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.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)(P)},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!==C.c&&e.operator!==C.e||!E.test(e.value)||t[o].type!==O.b?t[o].type===O.b?(s=e.operator,l=f.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(12),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(48),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),
n(7)),S=n.n(I),M=n(283),D=n(37),C=n(417),O=n(613),P=n(257),j=n(1296),T=n(1297),w=n(3378),E=/^\-([0-9]+)([a-zA-Z]+)$/,x=Object(b.createSelector)(j.a,function(e){return e.reduce(function(e,t){return e[t.key]=t,e},{})}),A=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):[]}),N=Object(b.createSelector)(D.a,M.a,T.a,x,A,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=S.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:P.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(w.a,n):null},t}(g.Component);t.a=Object(y.b)(N,L)(k)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(283)),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){var t=e.ui.libraryPage.details;return t?t.fieldTypes:void 0}t.a=i},function(e,t,n){"use strict";function i(e){
return r.d===e||r.f===e}var r=n(417);t.a=i},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({container:r.a.string,containerOpen:r.a.string,input:r.a.string,inputOpen:r.a.string,inputFocused:r.a.string,suggestionsContainer:r.a.string,suggestionsContainerOpen:r.a.string,suggestionsList:r.a.string,suggestion:r.a.string,suggestionFirst:r.a.string,suggestionHighlighted:r.a.string,sectionContainer:r.a.string,sectionContainerFirst:r.a.string,sectionTitle:r.a.string})},function(e,t,n){
"use strict";var i=n(6),r=n.n(i),a=n(12),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(3410),m=(n.n(g),n(52)),y=n(3411),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(){return Object(r.createSelector)(function(e,t){return t.activeFilters},function(e,t){return t.activeFilterLabel},Object(s.a)(),function(e,t,n){if(o.a.isEmpty(e)||!n)return Object(c.default)("All");var i=[],r=e.reduce(function(e,t){return(t.type===l.a?e.boolean:e.other).push(t),e},{boolean:[],other:[]}),a=r.boolean,s=r.other
;if(1===a.length){var u=a[0],d=o.a.findWhere(n.filters,{filter:u.key,filterType:l.a});d&&i.push(d.title)}return 1===s.length&&t&&i.push(t),i.length?i.join(" "):Object(c.default)("Filtered")})}t.a=i;var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(234),l=n(285),c=n(3)},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(function(e,t){return t.activeFilters},function(e,t){return t.selectedType},function(e){return e.ui.libraryPage},Object(I.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&&y.a.findWhere(u,{key:r}),filterOptions:i,filterOptionQuery:a,showSpinner:!l&&!c,showError:!!c,showSearchInput:s.length>12}})}var r=n(6),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(5),m=(n.n(g),
n(7)),y=n.n(m),b=n(257),I=n(3424),S=n(3425),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 f.a.createElement(S.a,a()({onFilterSelect:this.onFilterSelect,onFilterDeselect:this.onFilterDeselect,onSearch:this.onSearch},this.props))},t}(h.Component);t.a=Object(v.b)(i,b)(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.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(d.a,g,l.map(function(e){var s=e.key,l=e.descKey,u=e.defaultDirection,d=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(f.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(h.default)("Ascending"):Object(h.default)("Descending")},s,d)}))}var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(366),h=n(3),f=(n(89),n(256)),v=n(103),g=p.a.directions,m=g.ASCENDING,y=g.DESCENDING;t.a=i},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(6),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(3429));t.a=Object(s.b)(r)(c.a)},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(39),r=n(111),a=Object(i.a)(r.H),o=Object(i.a)(r.f),s=(Object(i.a)(r.x),Object(i.a)(r.T))},function(e,t,n){"use strict";function i(e){var t=e.ticks,n=e.pixelProportion,i=e.majorTickGap,r=e.minorTickGap,a=v.a.where(t,{type:m.a}),o=v.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(1),h=(n.n(p),n(0)),f=(n.n(h),
n(7)),v=n.n(f),g=n(3440),m=n(1307),y=n(3441),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}(h.Component);I.defaultProps={majorTickGap:20,minorTickGap:5},t.a=I},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(){
return Object(u.createSelector)(function(e,t){return t.start},function(e,t){return t.end},Object(h.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(),f.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(g.a)(t,e):e})})}function s(){return Object(u.createSelector)(Object(h.a)(),i(),o(),a(),b.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(m.k)({type:v.g,ids:t}))},onDeselectItems:function(t){
e(Object(m.c)({ids:t}))}}}var c=n(11),u=n(5),d=(n.n(u),n(7)),p=n.n(d),h=n(119),f=n(115),v=n(26),g=n(615),m=n(135),y=n(595),b=n(74),I=n(596),S=n(3443);t.a=Object(c.b)(s,l)(S.a)},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(u.a)(),Object(c.a)(),Object(h.a)(),Object(p.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.j)(o()({metadataListEntityID:t.metadataListEntityID},n)))},onDeselectItem:function(n){e(Object(d.b)(o()({metadataListEntityID:t.metadataListEntityID},n)))}}}var a=n(6),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(22)),u=n(34),d=n(135),p=n(594),h=n(597),f=n(74),v=n(3444);t.a=Object(s.b)(i,r)(v.a)},function(e,t,n){"use strict"
;function i(e){function t(e){var t=e.viewportWidth+":"+e.viewportHeight;if(t===P)return j;T=e.viewportHeight;var n=e.viewportWidth-2*g,i=p.reduce(function(e,t){return e+t.height},0);w=n/u,E=I?(I-g)/i:w;var r=E*i;return P=t,j={height:r,width:n}}function n(e){Object(l.a)(void 0!==T,"`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*w)+y+g,
cellY:Math.round(t.top*E)+y+g,cellWidth:Math.round(n.width*w)-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!==T,"`getListStyle` must be called before `getRangesForPosition`")
;var t=e+T-1,n=e-f*T,i=t+f*T,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 P=void 0,j=void 0,T=void 0,w=void 0,E=void 0;return{getListStyle:t,getPositionForIndex:n,getRangesForPosition:o,getRelativeIndex:i}}t.a=i;var r=n(6),a=n.n(r),o=n(7),s=n.n(o),l=n(36)},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(y.createSelector)(I.a,function(e){return{disableReloadThreshold:!!e.activeSelectionType}})}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(135)),I=n(74),S=n(3447),M={dispatchPopulateMetadataListRange:b.g,dispatchDeselectAllMetadataListItems:b.a},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";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(266),a=n(1307)},function(e,t,n){"use strict";function i(e){if(e.postalCode&&!/^\d{5}$/.test(e.postalCode))return Object(v.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,v=e.postalCode,b=e.value,M=e.options,D=e.settings,C=e.parentSetting;return n===f.c.GROUP?l()("div",{},void 0,D.map(function(t){return t.hidden?null:d.a.createElement(r,o()({key:t.id},t,{parentSetting:e}))})):n===f.c.BOOL?l()(p.a,{name:t,labelText:C&&C.label||a,checkboxText:a,helpText:s,initialValue:b}):n===f.c.DOUBLE?l()(g.a,{name:t,labelText:a,min:e.min,max:e.max,stepSize:e.step,initialValue:b,valueModifier:S[t]
}):n===f.c.LOCATION?l()(y.a,{name:t,labelText:a,helpText:s,initialValue:{country:c,postalCode:v},validations:I,countries:u}):n===f.c.SELECT&&i?l()(m.a,{labelText:a,helpText:s,options:M}):(h.a.warn("Unsupported provider setting type:[%s]",n),null)}var a=n(6),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(545),h=n(29),f=n(314),v=n(3),g=n(1034),m=n(3467),y=n(3469),b=n(719),I=[i],S={playbackSpeed:b.a};t.a=r},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(12),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(29),m=n(314),y=n(3),b=n(287),I=n(3476),S=n(3477),M=n(3478),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,t=e.optionsError,n=e.locationsError,r=e.id;i.props.onTogglePress(r),
(t||n)&&i.props.onOptionsFetchErrorDismiss(r)},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.onOptionsFetchErrorDismiss,
o()(l,["updateError","onUpdateSetting","onTogglePress","onOptionsFetchErrorDismiss"])),d=c?Object(y.default)("Unable to save settings"):null,p=n||i?Object(y.default)("There was an error loading the options"):d;return a===m.c.GROUP?v.a.createElement(I.a,r()({},u,{errorMessage:p,onSubmit:this.onSubmit,onTogglePress:this.onTogglePress})):a===m.c.LOCATION?v.a.createElement(S.a,r()({},u,{errorMessage:p,onSubmit:this.onSubmit,onTogglePress:this.onTogglePress
})):a===m.c.SELECT&&s?v.a.createElement(M.a,r()({},u,{errorMessage:p,onSubmit:this.onSubmit,onTogglePress:this.onTogglePress})):a===m.c.DOUBLE||a===m.c.BOOL?v.a.createElement(b.a,r()({closedNode:t},u,{errorMessage:p,onSubmit:this.onSubmit,onTogglePress:this.onTogglePress})):(g.a.warn("Unsupported provider setting type:[%s]",a),null)},t}(f.Component);t.a=D},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.onTogglePress
;return a()(d.a,{className:((o?f.a.isOpen:f.a.isClosed)||"")+" "+(n||""),errorMessage:o?r:null,onPress:o?null:s},void 0,a()(p.a,{},void 0,o&&a()(l.a,{kind:c.PRIMARY,onPress:s},void 0,Object(u.default)("Cancel")),!o&&a()(l.a,{kind:c.PRIMARY},void 0,Object(u.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(20)),c=n(49),u=n(3),d=n(491),p=n(616),h=n(3473),f=n.n(h);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(203),v=n(35),g=function(e){function t(){return o()(this,t),l()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.componentDidMount=function(){this._populate(this.props)},t.prototype.componentDidUpdate=function(e){var t=this.props.machineIdentifier;t&&t!==e.machineIdentifier&&this._populate(this.props)},t.prototype._populate=function(e){
var t=e.machineIdentifier,n=e.dispatchSetPrimaryServer;t&&Object(v.a)(function(){n({machineIdentifier:t})})},t.prototype.render=function(){return r()(p.Fragment,{},void 0,this.props.children)},t}(p.Component),m={dispatchSetPrimaryServer:f.k};t.a=Object(h.b)(null,m)(g)},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(5),s=(n.n(o),n(120)),l=n(1253),c=n(84),u=n(74),d=n(3483),p=Object(o.createSelector)(function(e){return e.ui.metadataListPage},u.a,function(e,t){return{metadataListEntityID:e.metadataList,activeSelectionType:t.activeSelectionType}
}),h=Object(s.a)(d.a,i,r),f=Object(a.b)(p)(h);t.a=f},function(e,t,n){"use strict";function i(e,t){if(e)return p.a;switch(t){case I.f:return v.a;case I.e:return f.a;case I.d:return h.a;default:return g.a}}function r(e){
var t=e.children,n=e.serverEntityID,r=e.providerEntityID,a=e.metadataListEntityID,s=e.sourceDirectory,l=e.containerKey,u=e.containerTitle,d=e.listTitle,p=e.listType,h=e.listSubtype,f=e.listContext,v=e.listStyle,g=e.typeKey,I=e.activeSort,S=e.selectedSort,C=e.isDirectoryList,O=e.isFolder,P=e.metadataItemEntityIDs,j=e.totalSize,T=e.populatedRange,w=e.firstItemType,E=e.firstItemSubtype,x=e.isPending,A=e.isPopulated,N=e.error,L=e.columnAdjustment,k=e.hasGutter,_=e.onPageRequest,R=e.onListScrollIndexChange,z=e.onListUpdate,U=e.onMeasure,B=e.scrollIndex,F=j||P.length
;if(A&&F){var V=p||w,H=h||E,Q=i(C,v);return o()(Q,{className:M.a.metadataListPageContent,scrollerClassName:(M.a.metadataListScroller||"")+" "+(k&&M.a.hasGutter||""||""),serverEntityID:n,providerEntityID:r,metadataListEntityID:a,sourceDirectory:s,containerKey:l,containerTitle:u,listType:V,listSubtype:H,listContext:f,typeKey:g,isFolder:O,activeSort:I,selectedSort:S,scrollIndex:B,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:C?"metadataDirectoryEntityID":"metadataItemEntityID",
items:P,itemsOffset:T.start,size:F,columnAdjustment:L,onPageRequest:_,onListScrollIndexChange:R,onListUpdate:z,onMeasure:U},void 0,t)}return x?D:N?o()(m.a,{},void 0,o()(b.a,{title:d?Object(c.default)("There was an unexpected error loading {listTitle}",{listTitle:d}):Object(c.default)("There was an unexpected error loading this list")})):o()(m.a,{},void 0,o()(y.a,{title:Object(c.default)("Nothing to see here"),description:d?Object(c.default)("There are no items in {listTitle}",{listTitle:d
}):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(3)),u=n(32),d=(n(412),n(31)),p=n(1256),h=n(1257),f=n(1262),v=n(1265),g=n(836),m=n(140),y=n(352),b=n(618),I=n(62),S=(n(93),n(3487)),M=n.n(S),D=o()(m.a,{},void 0,o()(y.a,{},void 0,o()(d.a,{})));r.defaultProps={listContext:u.b,listStyle:I.c},t.a=r},function(e,t){e.exports={innerEmptyPage:"InnerEmptyPage-innerEmptyPage-9fpLM EmptyPage-emptyPage-2AM9u",
innerEmptyPageContent:"InnerEmptyPage-innerEmptyPageContent--Yoft EmptyPage-content-10PgB"}},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(338)),a=n(466),o=Object(i.createSelector)(Object(r.a)("isProvidersPopulated"),Object(r.a)("providersError"),a.a,function(e,t,n){var i=!(!e&&!t),r=n.every(function(e){var t=e.server,n=e.provider;return!t.isPending&&(!n||n.isPopulated||n.error)});return i&&r});t.a=o},function(e,t,n){"use strict";function i(e){
var t=e.eventSource,n=e.events,i=e.predicate,r=void 0===i?function(){return!0}:i,l=e.waitDuration,c=void 0===l?s:l,u=a.a.Deferred(),d=function(){r(t)&&(h=clearTimeout(h),t.off(p),u.resolve(t))},p=n.reduce(function(e,t){return e[t]=d,e},{}),h=setTimeout(function(){o.a.warn('Model "%s" events %o did not pass the predicate within %dms',t.name,n,c),t.off("add",p),u.reject(t)},c);return t.on(p),u.promise()}t.a=i;var r=n(13),a=n.n(r),o=n(29),s=2500},function(e,t,n){"use strict";function i(e){
return new o.default([],a()({count:s,excludes:["playlists"],libraryHubsOnly:!0,includeEmpty:!0,includeFeaturedTags:!0,includeTypeFirst:!0,includeStations:!0},e))}n.d(t,"a",function(){return s}),t.b=i;var r=n(6),a=n.n(r),o=n(221),s=16},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(d.a)(),Object(c.a)(),Object(l.a)(),Object(u.a)(),function(e,t,n,i){var r=t?n:e.provider,l=t?i:e.server,c=Object(a.a)(r),u=c&&Object(o.a)(c.directories,e.directoryKey)
;return Object(s.a)(r,l,u)})}t.a=i;var r=n(5),a=(n.n(r),n(397)),o=n(1219),s=n(1218),l=n(3525),c=n(1325),u=n(620),d=n(850)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(a.a,Object(o.a)(),function(e,t){return e[t.hub]})}t.a=i;var r=n(5),a=(n.n(r),n(475)),o=n(423)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(s.a)(),function(e,t){var n=void 0;return e&&e.title?n=e.title:t&&t.title&&(n=t.title),
n||Object(a.default)("Unknown")})}t.a=i;var r=n(5),a=(n.n(r),n(3)),o=n(1325),s=n(850)},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({directoryKey:r.a.string.isRequired,hubIdentifier:r.a.string,hubKey:r.a.string,id:r.a.string.isRequired,key:r.a.string,provider:r.a.shape({identifier:r.a.string,providerIdentifier:r.a.string,title:r.a.string}),server:r.a.shape({friendlyName:r.a.string,machineIdentifier:r.a.string.isRequired,sourceTitle:r.a.string}),style:r.a.string,subtype:r.a.string,
title:r.a.string,type:r.a.string})},function(e,t,n){"use strict";var i=n(1),r=n.n(i);r.a.shape({homeHubID:r.a.string.isRequired,error:r.a.object,isPending:r.a.bool.isRequired,isPopulated:r.a.bool.isRequired,hub:r.a.string,provider:r.a.string,server:r.a.string})},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(Object(p.a)(),Object(d.a)(),function(e,t){return{title:e,sourceTitle:t}})}function r(e,t){return{onToggleRemoveHomeHub:function(){
t.onToggleRemoveHomeHub(t.homeHubID)}}}var a=n(6),o=n.n(a),s=n(1),l=n.n(s),c=n(11),u=n(5),d=(n.n(u),n(1324)),p=n(1326),h=n(3548),f=Object(c.b)(i,r)(h.a);f.propTypes=o()({},f.propTypes,{homeHubID:l.a.string.isRequired}),t.a=f},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(337)),a=Object(i.createSelector)(r.a,function(e){return e.filter(function(e){return e.isFullServer})});t.a=a},function(e,t,n){"use strict";function i(e){return e.experienceSettings.homeSettings.preferredServerID}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),h=n(0),f=(n.n(h),n(42)),v=n(45),g=n(49),m=n(3565),y=n(3570),b=n(3573),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.onMenuButtonPress=function(){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(){r.setState({isMenuOpen:!1})},r.onActionButtonPress=function(){var e=r.state.selectedServerIdentifiers
;r.props.onActionPress({entityID:e.entityID,machineIdentifier:e.machineIdentifier})},r.onSelectEligibleServer=function(e){var t=e.machineIdentifier,n=e.entityID,i=r.state.selectedServerIdentifiers;n===i.entityID&&t===i.machineIdentifier||r.setState({selectedServerIdentifiers:{entityID:n,machineIdentifier:t}})},r.state={isMenuOpen:!1,selectedServerIdentifiers:n.preferredServerIdentifiers||n.serverIdentifiers[0]},r._menuButtonID=Object(v.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverIdentifiers,n=e.actionDescription,i=this.state,a=i.isMenuOpen,o=i.selectedServerIdentifiers;return r()(h.Fragment,{},void 0,r()(y.a,{id:this._menuButtonID,isMenuOpen:a,serverEntityID:o.entityID,onPress:this.onMenuButtonPress}),r()(f.a,{kind:g.PRIMARY,className:I.a.continueButton,onPress:this.onActionButtonPress},void 0,n),r()(m.a,{target:this._menuButtonID,isOpen:a,serverIdentifiers:t,onMenuClose:this.onMenuClose,onPress:this.onSelectEligibleServer}))},t}(h.Component)
;p.a.shape({machineIdentifier:p.a.string.isRequired,entityID:p.a.string.isRequired});t.a=S},function(e,t,n){"use strict";function i(e){var t=e.server,n=e.provider,i=e.sourceDirectory,l=e.libraryKey,c=e.libraryDirectories,u=void 0===c?[]:c,d=Object(o.a)(n,i);if(!d)return[];var p=[],h=u.find(function(e){return"folder"===e.key});return h&&p.push({key:"folder",title:Object(a.default)("Folders"),route:r.join(Object(s.a)(d.key,t,n),{source:i.key,key:i.key,folderKey:r.join([l,h.key]),content:1})}),p}
t.a=i;var r=n(19),a=n(3),o=n(591),s=n(484)},function(e,t,n){"use strict";var i=n(48),r=n.n(i),a=n(7),o=n.n(a),s=n(17),l=n(16),c=n(65),u=n(768),d=n(121),p=s.a.extend({name:"CalendarModel",context:["server"],url:"/media/subscriptions/scheduled",sessionAttrs:{visibleDays:l.a.integer,time:l.a.integer},syncedRelations:{scheduled:{relationClass:u.default,rootPropertyName:"MediaGrabOperation"}},derivedAttrs:{startTime:function(){
var e=this.get("visibleDays"),t=r.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=r.a.unix(this.get("time")),n=t.endOf("day");return e>1?n.add(e-2,"days").unix():n.unix()},daysOfWeek:function(){var e=r.a.unix(this.get("startTime")),t=r.a.unix(this.get("endTime")),n=t.diff(e,"days");return o.a.times(Math.min(n+1,7),function(t){return e.clone().add(t,"days").unix()})},days:function(){
var e=r.a.unix(this.get("startTime")),t=r.a.unix(this.get("endTime")),n=t.diff(e,"days");return o.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&&r.a.unix(e.get("beginsAt")).isBefore(r.a.unix(this.get("startTime")))},hasFutureEvents:function(){var e=this.get("lastEvent")
;return!!e&&r.a.unix(e.get("beginsAt")).isAfter(r.a.unix(this.get("endTime")))}},defaults:function(){return{visibleDays:7,time:r()().unix()}},augmentResponseText:function(e,t){return t===c.a.xml?Object(d.b)(e):e}});t.a=p},function(e,t,n){"use strict";var i=n(24),r=n(65),a=n(121),o=n(577),s=i.a.extend({name:"MediaSubscriptionCollection",context:["server"],model:o.a,url:"/media/subscriptions",augmentResponseText:function(e,t){return t===r.a.xml?Object(a.b)(e):e}});t.a=s},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(5),o=(n.n(a),n(3638));t.a=Object(r.b)(i)(o.a)},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(3)),c=n(188);t.a=i},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e,t){return t.linkedKey},function(e,t){return t.metricsContext
},P.a,function(e,t,n){var i={isLibraryProvider:!0},r={};return t&&(r.context=t),Object(T.a)(n,i,e,r)})}function r(){return Object(y.createSelector)(function(e,t){return t.mediaSubscriptionID},function(e,t){return t.status},function(e){return e.experienceSettings.timeFormat},i(),Object(C.a)(),Object(D.a)(),Object(O.a)(),function(e,t,n,i,r,a,o){var s=t===S.b.COMPLETE,l=t===S.b.ERROR,c=I.a.pick(r,"type","title","grandparentTitle","index","parentIndex","originallyAvailableAt"),u=f()({
providerEntityID:o,prePlayRoute:i,isComplete:s,hasError:l,hasSubscription:!!e,showPlay:s&&!!i,timeFormat:n},c);return a?(u.isRecording=!0,u.isPostProcessing=a.Context.status===S.b.POST_PROCESSING,u.recordingProgress=a.progress):(u.isRecording=!1,u.isPostProcessing=!1),u})}var a=n(12),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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(5),b=(n.n(y),n(7)),I=n.n(b),S=n(567),M=n(353),D=n(1180),C=n(22),O=n(854),P=n(50),j=n(55),T=n(143),w={
dispatchPlayRecording:M.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 m.a.createElement(t,f()({},n,{onPlayPress:this.onPlayPress}))},t}(g.Component);t.a=Object(j.a)(r,w)(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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(30),f=n(117),v=n(3642);t.a=i},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(3)),c=n(815),u=n(600);t.a=i},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(3)),c=n(1156),u=n(600);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.error,n=e.onPress;return a()(c.a,{className:h.a.errorButton,component:l.a,tooltip:t,tooltipClassName:h.a.errorTooltip,tooltipAttachment:d.f.BOTTOM_CENTER,onPress:n},void 0,a()(u.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(20)),c=n(207),u=n(25),d=n(23),p=n(3645),h=n.n(p)
;t.a=i},function(e,t,n){"use strict";function i(e){var t=c.a.unix(e);return Object(h.default)("{month} {dayNumber}",{month:Object(p.a)(e),dayNumber:t.date()})}function r(e){var t=c.a.unix(e);return Object(h.default)("{month} {dayNumber}, {year}",{month:Object(p.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(48),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=(n.n(d),n(786)),h=n(3),f=n(3649),v=n.n(f);t.a=a},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(6),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(5),m=(n.n(g),n(353)),y=n(35),b=n(3651),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(y.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,m)(I)},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(214)),v=(n.n(f),n(27)),g=n(482),m=n(251),y=n(44),b=n.n(y),I=n(1346),S=n(3680),M=n.n(S),D=parseInt(b.a.recordingPriorityPaneWidth,10),C=parseInt(b.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!==m.e)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()(g.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,n){
"use strict";function i(){return Object(p.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar.scheduled},Object(v.a)(),function(e,t){return f.a.find(e,function(e){return s.a.unix(e.beginsAt).isAfter()&&e.mediaSubscriptionID===t.key})})}function r(){return Object(p.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(v.a)(),i(),function(e,t,n){
var i=f.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 u.a.createElement(g.a,e)}var o=n(48),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(11),p=n(5),h=(n.n(p),n(7)),f=n.n(h),v=n(3672),g=n(3673);t.a=Object(d.b)(r)(a)},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(214)),g=(n.n(v),n(411)),m=(n.n(g),n(122)),y=(n.n(m),n(324)),b=n(27),I=n(251),S=n(1346),M=n(3681),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(m.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)}},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(g.getEmptyImage)())},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,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&&y.c||"")+" "+(a&&l&&y.e||"")+" "+(s&&l&&y.d||""||"")},void 0,o()(S.a,{serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:i,connectDragSource:u})))},t}(f.Component)
;t.a=Object(v.DropTarget)(I.e,O,r)(Object(v.DragSource)(I.e,C,i)(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(193)),f=n(118),v=n(419),g=n(134),m=n(102),y=n(610),b=n(45),I=n(27),S=n(3),M=n(31),D=n(146),C=n(23),O=n(1349),P=n(3703),j=n.n(P),T=r()(y.a,{}),w=r()(m.a,{},void 0,r()(D.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(b.a)(),r}return u()(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.isSearchPending,n=e.query,i=e.allowSearchAllServers,a=e.searchAllServers,o=e.onSearchAllChange,s=this.state.isSearchMenuOpen
;return r()(h.a,{},void 0,r()(g.a,{},void 0,Object(S.default)("Search"),i&&T,i&&r()(f.a,{id:this._searchMenuButtonID,title:a?Object(S.default)("All Servers"):Object(S.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()(v.a,{},void 0,r()("span",{},void 0,t?Object(S.default)('Searching for "{query}"',{query:n
}):Object(S.default)('Results for "{query}"',{query:n})),t&&r()(M.a,{className:j.a.spinner,size:C.e.SMALL})),w)},t}(p.Component);t.a=E},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(12),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(56),m=n(3),y=n(103),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(g.a,n,r()(y.a,{isSelected:!t,onPress:this.onThisServerPress},void 0,Object(m.default)("This Server")),r()(y.a,{isSelected:t,onPress:this.onAllServersPress},void 0,Object(m.default)("All Servers")))},t}(f.Component);t.a=b
},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(function(e,t){return t.serverEntityIDs},C.a,D.a,function(e,t,n){return e.reduce(function(e,i){return t[i].providers.forEach(function(t){var r=n[t];e[t]={serverEntityID:i,identifier:r.identifier,title:r.title}}),e},{})})}function r(){return Object(M.a)(i(),function(e){return e})}function a(){return Object(b.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 S.a.map(n,function(e){return{providerEntityID:e.providerEntityID,title:e.title,isSearchPending:e.isSearchPending,isSearchPopulated:e.isSearchPopulated,hubs:S.a.values(e.hubs)}})})}function o(){return Object(b.createSelector)(r(),a(),O.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(53),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),n(7)),S=n.n(I),M=n(276),D=n(132),C=n(163),O=n(70),P=n(35),j=n(354),T=n(855),w={fetchSearchPage:j.b,clearSearchPage:j.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(P.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(P.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 m.a.createElement(T.a,this.props)},t}(g.Component);t.a=Object(y.b)(o,w)(E)},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(function(e){return e.ui.playlistPage.playlist},function(e){return e.ui.playlistPage.playlistItemList},S.a,I.a,function(e,t,n,i){var r=i[e],a=r&&r.playlistType===D.g,o=t&&t.metadataItems.length;if(a&&o){
return i[n[t.metadataItems[0]].metadataItem].librarySectionID}})}function r(e,t){return Object(b.createSelector)(function(e){return e.ui.playlistPage},M.a,j.a,i(),function(e,t,n,i){var r=e.playlist,a=e.isPlaylistPending,o=e.playlistError;return{metadataItemEntityID:r,librarySectionID:i,showSpinner:a,showError:!a&&!!o,columnAdjustment:t.columnAdjustment,activeSelectionType:n.activeSelectionType,multiSelectToolbarComponent:w.a}})}function a(e){var t=e.ui.playlistPage;return{
serverEntityID:t.serverEntityID,metadataKey:t.metadataKey}}function o(e,t){e(O.d({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataKey:t.metadataKey})),e(O.b())}var s=n(12),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(5),I=(n.n(b),n(115)),S=n(494),M=n(70),D=n(26),C=n(120),O=n(290),P=n(84),j=n(74),T=n(856),w=n(1388),E={dispatchChangeQuickSearchSettings:P.changeQuickSearchSettings},x=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.onLibraryChange=function(){i.props.dispatchChangeQuickSearchSettings({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,providerIdentifier:i.props.selectedProviderID,sectionID:i.props.librarySectionID})},r=n,p()(i,r)}return f()(t,e),t.prototype.componentDidMount=function(){this.onLibraryChange()},
t.prototype.componentDidUpdate=function(e){this.props.librarySectionID!==e.librarySectionID&&this.onLibraryChange()},t.prototype.componentWillUnmount=function(){this.props.dispatchChangeQuickSearchSettings({serverEntityID:this.props.serverEntityID,providerEntityID:this.props.providerEntityID,providerIdentifier:null,sectionID:null})},t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeQuickSearchSettings,l()(e,["dispatchChangeQuickSearchSettings"]));return m.a.createElement(T.a,t)},
t}(g.Component),A=Object(C.a)(x,a,o);t.a=Object(y.b)(r,E)(A)},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(5),a=(n.n(r),n(19)),o=n(22)},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){var n=t.metricsPage
;return c.a.createElement(u.a,a()({},e,{page:n}))}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(0),c=n.n(l),u=n(270);i.contextTypes={metricsPage:s.a.string.isRequired},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(64)),f=n(27),v=n(127),g=n(468),m=n(3713),y=n(147),b=n(129),I=n(3731),S=n(96),M=n(148),D=n(144),C=n(291),O=n(171),P=n(104),j=n(139),T=n(253),w=n(409),E=n(213),x=n(198),A=(n(62),
r()(b.a,{})),N=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.metadataKey,s=e.title,l=e.type,c=e.year,u=e.summary,d=e.thumb,p=e.art,f=e.listType,b=e.listStyle,N=e.isListReady,L=e.pageWidth,k=e.pageHeight,_=e.scrollTop,R=e.posterWidth,z=e.posterTop,U=this.state,B=U.isContentMeasured,F=U.contentWidth,V=U.contentHeight,H=!!p,Q=!(!B||!a);return r()(y.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()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(S.a,{},void 0,r()(j.a,{},void 0,r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(E.a,{},void 0,r()(P.a,{},void 0,s),r()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(x.a,{},void 0,r()(P.a,{},void 0,c),r()(w.a,{},void 0,r()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
})))),A,!!u&&r()(S.a,{},void 0,r()(D.a,{},void 0,u))),r()(M.a,{},void 0,Q&&r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,initialSize:1/0,listType:f,listStyle:b,showArtwork:H,component:m.a,viewportWidth:F,viewportHeight:k,contentHeight:V,scrollTop:_}),N&&r()(S.a,{},void 0,r()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(O.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=N},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(3),a=n(197)},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(3720)),c=n(3721),u=n(31),d=n(3722),p=n.n(d),h=a()(u.a,{});t.a=i},function(e,t,n){
"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.hubEntityIDs;return e.showSpinner?a()("div",{className:p.a.spinnerContainer},void 0,h):a()(u.a,{className:p.a.relatedList,serverEntityID:t,providerEntityID:n,hubEntityIDs:i,listContext:l.h,columnAdjustment:1})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(32)),c=n(31),u=n(589),d=n(3737),p=n.n(d),h=a()(c.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(64)),f=n(27),v=n(3),g=n(127),m=n(147),y=n(129),b=n(96),I=n(148),S=n(348),M=n(144),D=n(3738),C=n(292),O=n(857),P=n(171),j=n(104),T=n(139),w=n(253),E=(n(62),n(3751)),x=n(3757),A=n(3759),N=r()(y.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(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,y=e.listType,L=e.listStyle,k=e.isListReady,_=e.pageWidth,R=e.pageHeight,z=e.scrollTop,U=e.posterWidth,B=e.posterTop,F=this.state,V=F.isContentMeasured,H=F.contentWidth,Q=F.contentHeight,Y=!(!V||!s),G=!(!V||!a);return r()(m.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,metadataKey:l,type:u,thumb:p,art:f,pageWidth:_,pageHeight:R,scrollTop:z,posterWidth:U,posterTop:B},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(b.a,{},void 0,r()(T.a,{},void 0,r()(j.a,{},void 0,c),r()(w.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),N,r()(b.a,{},void 0,r()(S.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),r()(M.a,{},void 0,d))),r()(I.a,{},void 0,Y&&r()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:s,component:A.a,showArtwork:!!f,viewportWidth:H,viewportHeight:R,contentHeight:Q,scrollTop:z,listStyle:L}),G&&r()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:y,listStyle:L,component:C.a,initialSize:20,showArtwork:!!f,viewportWidth:H,viewportHeight:R,contentHeight:Q,scrollTop:z}),k&&r()(b.a,{},void 0,!!o&&r()(O.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:o,title:Object(v.default)("Music Videos")}),r()(E.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(P.a,{serverEntityID:t,providerEntityID:n}),r()(D.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=L},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(210),m=n(1310),y=n(1311),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(y.a)({aspectRatios:i,columns:a});return Object(m.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(g.a,r()({layout:i,cellRenderer:t},n))},t}(f.Component);b.defaultProps={columnAdjustment:0},
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(64)),f=n(27),v=n(127),g=n(147),m=n(129),y=n(96),b=n(148),I=n(144),S=n(292),M=n(171),D=n(104),C=n(139),O=n(253),P=n(213),j=(n(62),r()(m.a,{})),T=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.metadataKey,s=e.title,l=e.minYear,c=e.maxYear,u=e.type,d=e.summary,p=e.thumb,f=e.art,m=e.listType,T=e.listStyle,w=e.isListReady,E=e.pageWidth,x=e.pageHeight,A=e.scrollTop,N=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),F=!(!_||!a);return r()(g.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,metadataKey:o,type:u,thumb:p,art:f,pageWidth:E,pageHeight:x,scrollTop:A,posterWidth:N,posterTop:L},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(C.a,{},void 0,r()(D.a,{},void 0,s)),r()(P.a,{},void 0,(U||B)&&r()(D.a,{},void 0,U?l+" \u2014 "+c:c),r()(O.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),j,!!d&&r()(y.a,{},void 0,r()(I.a,{},void 0,d))),r()(b.a,{},void 0,F&&r()(v.a,{serverEntityID:t,
providerEntityID:n,metadataListEntityID:a,listType:m,listStyle:T,component:S.a,initialSize:20,showArtwork:!!f,viewportWidth:R,viewportHeight:x,contentHeight:z,scrollTop:A}),w&&r()(y.a,{},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=T},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,d=e.grandparentThumb,T=e.art,w=e.pageWidth,E=e.pageHeight,x=e.scrollTop,A=e.posterWidth,N=e.posterTop,L=e.record;return a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,posterType:"show",attribution:g.a,metadataKey:r,type:o,thumb:d,art:T,pageWidth:w,pageHeight:E,scrollTop:x,posterWidth:A,posterTop:N},void 0,a()(p.a,{},void 0,a()(C.a,{},void 0,a()(D.a,{},void 0,a()(l.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),a()(O.a,{},void 0,a()(D.a,{},void 0,a()(c.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),a()(P.a,{},void 0,a()(b.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:L}),a()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),j,a()(p.a,{},void 0,a()(f.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(m.a,{metadataItemEntityID:i},void 0,a()(y.a,{
metadataItemEntityID:i,showFullTime:!0,showChannel:!0})),a()(v.a,{},void 0,s),a()(h.a,{},void 0,a()(p.a,{},void 0,a()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(S.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(248)),c=n(281),u=n(147),d=n(129),p=n(96),h=n(148),f=n(348),v=n(144),g=n(858),m=n(1363),y=n(1364),b=n(1365),I=n(291),S=n(171),M=n(349),D=n(104),C=n(139),O=n(213),P=n(198),j=a()(d.a,{});t.a=i},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(5),o=(n.n(a),n(405)),s=n(1340);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(c.a)(),Object(l.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(5),l=(n.n(s),
n(1153)),c=n(405),u=n(1341);t.a=Object(o.b)(i)(u.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,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(5),o=(n.n(a),
n(22)),s=n(37),l=n(3763);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(42)),f=n(27),v=n(3),g=n(478),m=n(250),y=n(23),b=n(3764),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()(h.a,{"data-qa-id":"preplayRecordButton",className:I.a.recordButton,size:y.e.SMALL,onPress:this.onRecordPress
},void 0,r()(g.a,{className:o?I.a.recordingIcon:I.a.recordIcon,type:l||s||a}),o?Object(v.default)("Recording Scheduled"):Object(v.default)("Record"),r()(m.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(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()(l.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()(u.a,{},void 0,a()(c.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(147)),c=n(96),u=n(148),d=n(291),p=n(171),h=n(1228);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,h=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()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataKey:r,type:o,subtype:s,thumb:f,art:v,pageWidth:g,pageHeight:m,scrollTop:y,posterWidth:b,posterTop:I},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,summary:h
}),a()(u.a,{},void 0,a()(c.a,{},void 0,a()(d.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(147)),c=n(96),u=n(148),d=n(171),p=n(819);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,h=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()(l.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,metadataKey:r,type:o,subtype:s,thumb:f,art:v,pageWidth:g,pageHeight:m,scrollTop:y,posterWidth:b,posterTop:I},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,summary:h}),a()(u.a,{},void 0,a()(c.a,{},void 0,a()(d.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(147)),c=n(96),u=n(148),d=n(171),p=n(819);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.title,s=e.type,c=e.year,P=e.summary,j=e.thumb,T=e.art,w=e.pageWidth,E=e.pageHeight,x=e.scrollTop,A=e.posterWidth,N=e.posterTop,L=e.record;return a()(l.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,attribution:f.a,metadataKey:r,type:s,thumb:j,art:T,pageWidth:w,pageHeight:E,scrollTop:x,posterWidth:A,posterTop:N
},void 0,a()(u.a,{},void 0,a()(M.a,{},void 0,a()(S.a,{},void 0,o)),a()(D.a,{},void 0,a()(S.a,{},void 0,c)),a()(C.a,{},void 0,a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:L}),a()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),O,a()(u.a,{},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(v.a,{metadataItemEntityID:i},void 0,a()(g.a,{metadataItemEntityID:i,showFullTime:!0,showChannel:!0
})),a()(h.a,{},void 0,P),a()(d.a,{},void 0,a()(u.a,{},void 0,a()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(b.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(147)),c=n(129),u=n(96),d=n(148),p=n(348),h=n(144),f=n(858),v=n(1363),g=n(1364),m=n(1365),y=n(291),b=n(171),I=n(349),S=n(104),M=n(139),D=n(213),C=n(198),O=a()(c.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.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()(c.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()(d.a,{},void 0,a()(u.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(3)),c=n(147),u=n(96),d=n(148),p=n(291),h=n(857),f=n(171),v=n(1237);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(64)),f=n(27),v=n(127),g=n(147),m=n(129),y=n(96),b=n(148),I=n(144),S=n(292),M=n(104),D=n(139),C=n(253),O=(n(62),r()(m.a,{})),P=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.metadataKey,s=e.title,l=e.type,c=e.summary,u=e.art,d=e.listType,p=e.listStyle,f=e.pageWidth,m=e.pageHeight,P=e.scrollTop,j=this.state,T=j.isContentMeasured,w=j.contentWidth,E=j.contentHeight,x=!(!T||!a);return r()(g.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i,showPoster:!1,metadataKey:o,type:l,art:u,pageWidth:f,pageHeight:m,scrollTop:P},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(D.a,{},void 0,r()(M.a,{},void 0,s),r()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),O,!!c&&r()(y.a,{},void 0,r()(I.a,{},void 0,c))),r()(b.a,{},void 0,x&&r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:d,listStyle:p,component:S.a,
initialSize:1e3,showArtwork:!!u,viewportWidth:w,viewportHeight:m,contentHeight:E,scrollTop:P})))},t}(p.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(64)),f=n(27),v=n(58),g=n(147),m=n(129),y=n(96),b=n(148),I=n(144),S=n(139),M=n(3766),D=r()(m.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.thumb,f=e.pageWidth,m=e.pageHeight,C=e.scrollTop,O=e.posterWidth,P=e.posterTop,j=this.state,T=j.contentWidth,w=j.contentHeight,E=j.isContentMeasured;return r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,showPoster:l!==v.c,metadataKey:a,type:s,thumb:d||p,art:u,pageWidth:f,pageHeight:m,scrollTop:C,
posterWidth:O,posterTop:P},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(S.a,{},void 0,o)),D,!!c&&r()(y.a,{},void 0,r()(I.a,{},void 0,c))),r()(b.a,{},void 0,E&&r()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,playlistType:l,contentHeight:w,viewportWidth:T,viewportHeight:m,scrollTop:C})))},t}(p.Component);t.a=C},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(5),a=(n.n(r),n(115)),o=n(860)},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(26)),f=n(25),v=n(279),g=n(247),m=n(1183),y=n(3789),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,P=e.onSelectPress,j=e.onDeselectPress,T=e.onRemovePress,w=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||""||"")},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:P,onDeselectPress:j,onRemovePress:T}),w&&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";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(64)),f=n(27),v=n(127),g=n(468),m=n(147),y=n(129),b=n(96),I=n(148),S=n(144),M=n(291),D=n(292),C=n(171),O=n(104),P=n(139),j=n(253),T=n(213),w=(n(62),r()(y.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(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.metadataKey,s=e.title,l=e.type,c=e.summary,u=e.thumb,d=e.art,p=e.listType,f=e.listStyle,y=e.isListReady,E=e.pageWidth,x=e.pageHeight,A=e.scrollTop,N=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:A,posterWidth:N,posterTop:L},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(b.a,{},void 0,r()(P.a,{},void 0,r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(T.a,{},void 0,r()(O.a,{},void 0,s),r()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),w,!!c&&r()(b.a,{},void 0,r()(S.a,{},void 0,c))),r()(I.a,{},void 0,U&&r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:p,
listStyle:f,component:D.a,initialSize:20,showArtwork:!!d,viewportWidth:R,viewportHeight:x,contentHeight:z,scrollTop:A}),y&&r()(b.a,{},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(C.a,{serverEntityID:t,providerEntityID:n}))))},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(64)),f=n(27),v=n(127),g=n(147),m=n(129),y=n(96),b=n(148),I=n(348),S=n(144),M=n(858),D=n(3798),C=n(291),O=n(292),P=n(171),j=n(349),T=n(104),w=n(139),E=n(213),x=n(198),A=(n(62),r()(m.a,{})),N=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.metadataKey,s=e.title,l=e.type,c=e.year,u=e.summary,d=e.thumb,p=e.art,f=e.listType,m=e.listStyle,N=e.isListReady,L=e.pageWidth,k=e.pageHeight,_=e.scrollTop,R=e.posterWidth,z=e.posterTop,U=e.record,B=this.state,F=B.isContentMeasured,V=B.contentWidth,H=B.contentHeight,Q=!(!F||!a)
;return r()(g.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,attribution:M.a,metadataKey:o,type:l,thumb:d,art:p,pageWidth:L,pageHeight:k,scrollTop:_,posterWidth:R,posterTop:z},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(y.a,{},void 0,r()(w.a,{},void 0,r()(T.a,{},void 0,s)),r()(E.a,{},void 0,r()(T.a,{},void 0,c)),r()(x.a,{},void 0,r()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,record:U}),r()(j.a,{serverEntityID:t,
providerEntityID:n,metadataItemEntityID:i}))),A,r()(y.a,{},void 0,r()(I.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(S.a,{},void 0,u))),r()(b.a,{},void 0,Q&&r()(v.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:f,listStyle:m,component:O.a,initialSize:20,showArtwork:!!p,viewportWidth:V,viewportHeight:k,contentHeight:H,scrollTop:_}),N&&r()(y.a,{},void 0,r()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(P.a,{serverEntityID:t,
providerEntityID:n}))))},t}(p.Component);t.a=N},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(64)),f=n(27),v=n(19),g=n(3),m=n(127),y=n(147),b=n(129),I=n(96),S=n(148),M=n(144),D=n(1379),C=n(292),O=n(171),P=n(1380),j=n(349),T=n(104),w=n(139),E=n(198),x=(n(62),n(1381)),A=n.n(x),N=r()(b.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(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.metadataKey,s=e.title,l=e.type,c=e.subtype,u=e.summary,d=e.saved,p=e.thumb,f=e.art,b=e.hero,x=e.allEpisodes,L=e.listType,k=e.listStyle,_=e.isListReady,R=e.pageWidth,z=e.pageHeight,U=e.scrollTop,B=e.posterWidth,F=e.posterTop,V=this.state,H=V.isContentMeasured,Q=V.contentWidth,Y=V.contentHeight,G=!(!H||!a);return r()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,
metadataKey:o,type:l,subtype:c,thumb:p,art:f,hero:b,pageWidth:R,pageHeight:z,scrollTop:U,posterWidth:B,posterTop:F},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(I.a,{},void 0,r()(w.a,{},void 0,r()(T.a,{},void 0,s)),r()(E.a,{},void 0,r()(P.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),N,r()(I.a,{},void 0,r()(M.a,{dangerouslySetInnerHTML:{__html:u}}),null!=d&&r()(D.a,{
className:A.a.addToSavedButton,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(S.a,{},void 0,G&&r()(m.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:L,listStyle:k,component:C.a,initialSize:20,previewSize:x?null:3,listTitle:x?Object(g.default)("All Episodes"):Object(g.default)("Recent Episodes"),titleButtonTitle:x?Object(g.default)("See Recent Episodes"):Object(g.default)("See All Episodes"),titleButtonRoute:v.join(window.location.hash,{
allEpisodes:x?void 0:1},{parseParams:!0}),showArtwork:!!f,viewportWidth:Q,viewportHeight:z,contentHeight:Y,scrollTop:U}),_&&r()(I.a,{},void 0,r()(O.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=L},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(c.c,Object(l.a)(),function(e,t){return{providerIdentifier:e.identifier,saved:t.saved,subtype:t.subtype}})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,
metadataItemEntityID:t.metadataItemEntityID};return{onPress:function(t){e(Object(s.f)(n))}}}var a=n(11),o=n(5),s=(n.n(o),n(231)),l=n(22),c=n(37),u=n(3801),d=Object(a.b)(i,r)(u.a);t.a=d},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(5),o=(n.n(a),n(22)),s=n(3803);t.a=Object(r.b)(i)(s.a)},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(72)),f=n(64),v=n(27),g=n(3),m=n(127),y=n(788),b=n(792),I=n(147),S=n(129),M=n(96),D=n(148),C=n(348),O=n(144),P=n(291),j=n(292),T=n(857),w=n(171),E=n(602),x=n(349),A=n(104),N=n(139),L=n(253),k=n(213),_=n(198),R=n(1235),z=(n(62),r()(h.b,{})),U=r()(S.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(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.onDeckMetadataItemEntityID,s=e.extrasMetadataListEntityID,l=e.metadataKey,c=e.title,u=e.type,d=e.year,p=e.summary,h=e.thumb,v=e.art,S=e.listType,B=e.listStyle,F=e.isListReady,V=e.pageWidth,H=e.pageHeight,Q=e.scrollTop,Y=e.posterWidth,G=e.posterTop,W=this.state,K=W.isContentMeasured,q=W.contentWidth,Z=W.contentHeight,X=!(!K||!a);return r()(I.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i,metadataKey:l,type:u,thumb:h,art:v,pageWidth:V,pageHeight:H,scrollTop:Q,posterWidth:Y,posterTop:G},void 0,r()(f.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(M.a,{},void 0,r()(N.a,{},void 0,r()(A.a,{},void 0,c)),r()(k.a,{},void 0,r()(A.a,{},void 0,d),r()(L.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()(_.a,{},void 0,r()(A.a,{},void 0,r()(R.a,{},void 0,o?r()("span",{},void 0,Object(g.default)("On Deck")," ",z,r()(b.a,{
serverEntityID:t,providerEntityID:n,metadataItemEntityID:o})):r()(y.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()(M.a,{},void 0,r()(C.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(O.a,{},void 0,p))),r()(D.a,{},void 0,X&&r()(m.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:S,
listStyle:B,component:j.a,initialSize:20,showArtwork:!!v,viewportWidth:q,viewportHeight:H,contentHeight:Z,scrollTop:Q}),F&&r()(M.a,{},void 0,r()(P.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),!!s&&r()(T.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:s,title:Object(g.default)("Extras")}),r()(w.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);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(64)),f=n(27),v=n(19),g=n(3),m=n(127),y=n(147),b=n(129),I=n(96),S=n(148),M=n(144),D=n(1379),C=n(292),O=n(171),P=n(1380),j=n(349),T=n(104),w=n(139),E=n(198),x=(n(62),n(1381)),A=n.n(x),N=r()(b.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(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.metadataKey,s=e.title,l=e.type,c=e.subtype,u=e.summary,d=e.saved,p=e.thumb,f=e.art,b=e.hero,x=e.allEpisodes,L=e.listType,k=e.listStyle,_=e.isListReady,R=e.pageWidth,z=e.pageHeight,U=e.scrollTop,B=e.posterWidth,F=e.posterTop,V=this.state,H=V.isContentMeasured,Q=V.contentWidth,Y=V.contentHeight,G=!(!H||!a);return r()(y.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,
metadataKey:o,type:l,subtype:c,thumb:p,art:f,hero:b,pageWidth:R,pageHeight:z,scrollTop:U,posterWidth:B,posterTop:F},void 0,r()(h.a,{ignorePosition:!0,onMeasure:this.onContentMeasure},void 0,r()(I.a,{},void 0,r()(w.a,{},void 0,r()(T.a,{},void 0,s)),r()(E.a,{},void 0,r()(P.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),r()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),N,r()(I.a,{},void 0,r()(M.a,{dangerouslySetInnerHTML:{__html:u}}),null!=d&&r()(D.a,{
className:A.a.addToSavedButton,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}))),r()(S.a,{},void 0,G&&r()(m.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,listType:L,listStyle:k,component:C.a,initialSize:20,previewSize:x?null:3,listTitle:x?Object(g.default)("All Episodes"):Object(g.default)("Recent Episodes"),titleButtonTitle:x?Object(g.default)("See Recent Episodes"):Object(g.default)("See All Episodes"),titleButtonRoute:v.join(window.location.hash,{
allEpisodes:x?void 0:1},{parseParams:!0}),showArtwork:!!f,viewportWidth:Q,viewportHeight:z,contentHeight:Y,scrollTop:U}),_&&r()(I.a,{},void 0,r()(O.a,{serverEntityID:t,providerEntityID:n}))))},t}(p.Component);t.a=L},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(5),a=(n.n(r),n(19)),o=n(22)},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(5),o=(n.n(a),n(119)),s=n(3809);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.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()(l.a,{target:u,isOpen:h,size:d.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(c.default)("Unable to load items")),I&&a()("span",{className:f.a.emptyContainer
},void 0,Object(c.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(56)),c=n(3),u=n(31),d=n(23),p=n(3811),h=n(3813),f=n.n(h),v=a()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(p.a,d.a,h.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(g.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(c.m(n))},onPlayLiveTVPress:function(){e(Object(l.l)(n))},onPlayTrailerPress:function(){e(c.n(n))},onPlayRadioPress:function(){e(c.o(n))},onShufflePress:function(){e(c.q(n))},onMarkPlayedConfirm:function(){e(v.markMetadataItemPlayed(o()({},n,{skipConfirm:!0})))},onMarkUnplayedConfirm:function(){e(v.markMetadataItemUnplayed(o()({},n,{skipConfirm:!0})))},onEditPress:function(){e(v.editMetadataItem(n))},onSyncPress:function(){e(v.syncMetadataItem(n))},
onGetInfoPress:function(){e(v.getMetadataItemInfo(n))}}}var a=n(6),o=n.n(a),s=n(5),l=(n.n(s),n(186)),c=n(69),u=n(22),d=n(37),p=n(50),h=n(185),f=n(55),v=n(167),g=n(278),m=n(3814);t.a=Object(f.a)(i,r)(m.a)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(c.a,function(e){return{isAlbum:e.activeSelectionType===s.c}})}function r(e,t){return{onRemovePress:function(){e(l.h())}}}var a=n(11),o=n(5),s=(n.n(o),n(58)),l=n(290),c=n(74),u=n(3822);t.a=Object(a.b)(i,r)(u.a)
},function(e,t,n){"use strict";function i(e){return e.get("ui").get("playlistsPage")}n.d(t,"b",function(){return g}),n.d(t,"d",function(){return m}),n.d(t,"c",function(){return y});var r,a=n(39),o=n(424),s=n(434),l=n(107),c=n(109),u=n(223),d=n(66),p=n(135),h=n(131),f=n(116),v="ui/playlistsPage/fetchSorts",g=Object(a.a)("ui/playlistsPage/initPlaylistPage"),m=(Object(a.a)(v),Object(a.a)("ui/playlistsPage/populateSorts")),y=(Object(a.a)("ui/playlistsPage/fetchLibraryDetails"),
Object(a.a)("ui/playlistsPage/populateLibraryDetails")),b=(r={},r["ui/playlistsPage/initPlaylistPage"]=function(e,t){var n=i(e),r=Object(f.i)(e,t),a=Object(d.i)(e,t),c=t.serverEntityID,u=t.libraryKey,p=t.containerKey,h=c===n.get("serverEntityID"),v=u===n.get("libraryKey"),g=p===n.get("containerKey");if(!(h&&v&&g)){var m=new l.default({containerKey:p},{server:r,provider:a}),y=n.get("libraryDetails"),b=n.get("sorts");h&&v||(y=u&&new o.a({key:u},{server:r,provider:a}),b=new s.a([],{
url:"/playlists/sorts",server:r})),n.restoreDefaults({serverEntityID:c,libraryKey:u,containerKey:p,playlists:m,libraryDetails:y,sorts:b})}},r["ui/playlistsPage/fetchLibraryDetails"]=Object(c.a)({key:"libraryDetails",getModel:i}),r["ui/playlistsPage/populateLibraryDetails"]=Object(u.a)({key:"libraryDetails",fetchActionType:"ui/playlistsPage/fetchLibraryDetails",getModel:i}),r[v]=Object(c.a)({key:"sorts",getModel:i}),r["ui/playlistsPage/populateSorts"]=Object(u.a)({key:"sorts",fetchActionType:v,
getModel:i}),r[h.a]=function(e,t,n){var r=t.metadataItemEntityID,a=t.containerKeyPattern,o=Object(f.i)(e,t),s=i(e),l=s.get("playlists");r||l&&l.server===o&&a&&l.get("containerKey").match(a)&&n(Object(p.h)({metadataListEntityID:l.entityID()}))},r);t.a=b},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(115)),a=Object(i.createSelector)(function(e){return e.ui.prePlayPage.metadataItem},r.a,function(e,t){var n=t[e]||{};return!(!n||!n.isPreFetched)});t.a=a},function(e,t,n){"use strict"
;var i=n(5),r=(n.n(i),n(163)),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";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(118)),f=n(419),v=n(134),g=n(102),m=n(610),y=n(45),b=n(27),I=n(3),S=n(31),M=n(217),D=n(146),C=n(1349),O=n(23),P=n(3856),j=n.n(P),T=r()(m.a,{}),w=r()(g.a,{},void 0,r()(D.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(y.a)(),r}return u()(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.isSearchPending,n=e.query,i=e.allowSearchAllServers,a=e.searchAllServers,o=e.onSearchAllChange,s=this.state.isSearchMenuOpen;return r()(M.a,{},void 0,r()(v.a,{},void 0,Object(I.default)("Search"),i&&T,i&&r()(h.a,{id:this._searchMenuButtonID,title:a?Object(I.default)("All Servers"):Object(I.default)("This Server"),hasMenu:!0,isMenuOpen:s,isSelected:!0,onPress:this.onSearchMenuButtonPress}),i&&r()(C.a,{target:this._searchMenuButtonID,isOpen:s,isSearchAll:a,
onMenuClose:this.onSearchMenuClose,onSearchAllChange:o})),r()(f.a,{},void 0,r()("span",{},void 0,t?Object(I.default)('Searching for "{query}"',{query:n}):Object(I.default)('Results for "{query}"',{query:n})),t&&r()(S.a,{className:j.a.spinner,size:O.e.SMALL})),w)},t}(p.Component);t.a=E},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(function(e){return e.ui.playlistPage.playlist},function(e){return e.ui.playlistPage.playlistItemList},S.a,I.a,function(e,t,n,i){
var r=i[e],a=r&&r.playlistType===C.g,o=t&&t.metadataItems.length;if(a&&o){return i[n[t.metadataItems[0]].metadataItem].librarySectionID}})}function r(e,t){return Object(b.createSelector)(function(e){return e.ui.playlistPage},M.a,T.a,i(),function(e,t,n,i){var r=e.playlist,a=e.isPlaylistPending,o=e.playlistError;return{metadataItemEntityID:r,librarySectionID:i,showSpinner:a,showError:!a&&!!o,columnAdjustment:t.columnAdjustment,activeSelectionType:n.activeSelectionType,
multiSelectToolbarComponent:E.a}})}function a(e){var t=e.ui.playlistPage;return{serverEntityID:t.serverEntityID,metadataKey:t.metadataKey}}function o(e,t){e(P.d({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataKey:t.metadataKey})),e(P.b())}var s=n(12),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(5),I=(n.n(b),n(115)),S=n(494),M=n(70),D=n(41),C=n(26),O=n(120),P=n(290),j=n(84),T=n(74),w=n(856),E=n(1388),x={
dispatchChangeQuickSearchSettings:j.changeQuickSearchSettings},A=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.onLibraryChange=function(){i.props.dispatchChangeQuickSearchSettings({serverEntityID:i.props.serverEntityID,providerEntityID:i.props.providerEntityID,providerIdentifier:D.d,sectionID:i.props.librarySectionID})},r=n,p()(i,r)}return f()(t,e),
t.prototype.componentDidMount=function(){this.onLibraryChange()},t.prototype.componentDidUpdate=function(e){this.props.librarySectionID!==e.librarySectionID&&this.onLibraryChange()},t.prototype.componentWillUnmount=function(){this.props.dispatchChangeQuickSearchSettings({serverEntityID:this.props.serverEntityID,providerEntityID:this.props.providerEntityID,providerIdentifier:null,sectionID:null})},t.prototype.render=function(){var e=this.props,t=(e.dispatchChangeQuickSearchSettings,
l()(e,["dispatchChangeQuickSearchSettings"]));return m.a.createElement(w.a,t)},t}(g.Component),N=Object(O.a)(A,a,o);t.a=Object(y.b)(r,x)(N)},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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(352),c=n(3868),u=n.n(c);t.a=i},function(e,t,n){"use strict";var i=n(21),r=n(18),a=n(15),o=n(3905),s=n(1397),l=n(3913),c=n.n(l),u=i.a.Layout.extend({
className:"friends-container col-sm-12 col-md-12",template:c.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=a.c("appModel"),n=t.get("user");if(n.get("restricted"))return void r.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.addListeners()},addListeners:function(){this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.sentInvites,"reset add remove",this.onInvitesChange)},updateHeaders:function(){var e=!!this.invites.length,t=!!this.sentInvites.length,n=e||t
;this.ui.friendListHeader.toggleClass("hidden",!n),this.ui.inviteListHeader.toggleClass("hidden",!e),this.ui.pendingListHeader.toggleClass("hidden",!t),this.ui.friendListHeader.toggleClass("top",!e),this.ui.inviteListHeader.toggleClass("top",e)},onRender:function(){this.friendList.show(new o.a({collection:this.collection})),this.inviteList.show(new s.a({collection:this.invites})),this.pendingList.show(new s.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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=n(15),u=n(521),d=n(3),p=n(388),h=n(3909),f=n.n(h),v=a.a.ItemView.extend({className:"friend-server-status-container",template:f.a,events:{"click .server-share-edit-btn":"onEditClick"},initialize:function(){var e=c.c("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=c.c("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(u.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=s.a.indexOf(this.attachedServers,e);t>-1&&this.attachedServers.splice(t,1),this.stopListening(e)},onServerShareAdd:function(e){this.addServerShare(e),this.render()},onServerShareRemove:function(e){this.removeServerShare(e),this.render()},
onServerAdd:function(e){this.collection.findWhere({machineIdentifier:e.id})&&(this.attachServer(e),this.render())},onEditClick:function(e){e.preventDefault();var t=r()(e.currentTarget);if(!t.isDisabled()){var n,i=t.hasClass("owned"),a=this.collection.findWhere({owned:i});a&&(n=a.get("machineIdentifier")),l.a.trigger("show:modal",new p.a({model:this.model,defaultPaneType:i?"ownedServer":"sharedServer",defaultPaneID:n}))}}});t.a=v},function(e,t,n){"use strict";var i=n(86),r=n(3911),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(13),r=n.n(i),a=n(21),o=n(18),s=n(15),l=n(40),c=n(3),u=n(370),d=n(1396),p=n(388),h=n(444),f=n(3917),v=n.n(f),g=a.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:v.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=s.c("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 u.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 d.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=s.c("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(),r()(e.currentTarget).isDisabled()||o.a.trigger("show:modal",new h.a({model:this.model,isEditing:!0}))},onEditClick:function(e){e.preventDefault(),o.a.trigger("show:modal",new p.a({type:"home",homeUser:this.model,isAdmin:this.isAdmin}))},onDeleteClick:function(e){e.preventDefault(),l.a.execute("removeHomeUser",{homeUser:this.model})}});t.a=g},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",NINJA:"EB90125F",CUSTOM:"custom"};i.settings=[{value:i.PRODUCTION,title:"Production"},{value:i.QA,title:"QA"},{value:i.NINJA,title:"Ninja"},{value:i.CUSTOM,title:"Custom"}],t.a=i},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";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(3)},function(e,t,n){"use strict";var i=n(1249);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(737);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(39),a=n(18),o=Object(r.a)("user/linkAccount/navigateRefresh"),s=(i={},i["user/linkAccount/navigateRefresh"]=function(e,t,n){a.a.trigger("navigate:refresh")},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=h.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(53),s=n.n(o),l=n(6),c=n.n(l),u=n(13),d=n.n(u),p=n(39),h=n(19),f=n(109),v=n(265),g=n(152),m=n(1407),y=Object(p.a)("ui/onlineMediaSourcePage/initOnlineMediaSourcesPage"),b=Object(p.a)("ui/onlineMediaSourcePage/fetchAvailableProviders"),I=Object(p.a)("ui/onlineMediaSourcePage/fetchOptOutStatuses"),S=Object(p.a)("ui/onlineMediaSourcePage/updateOptOutStatuses"),M=Object(p.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 m.a([],{server:a})}),n(b()),n(I())},a["ui/onlineMediaSourcePage/fetchAvailableProviders"]=Object(f.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(g.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(v.a)())},function(e){a.set({isUpdatePending:!1,updateError:Object(g.a)(e)})})},a["ui/onlineMediaSourcePage/clearOnlineMediaSourcesUpdateError"]=function(e,t){i(e).set("updateError",null)},a)},function(e,t,n){"use strict";var i=n(24),r=n(3982),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";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(31)),l=n(3989),c=n.n(l),u=a()(s.a,{});t.a=i},function(e,t,n){"use strict";var i=n(654),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";function i(e){switch(e){case 1:return Object(P.default)("Abort");case 2:return Object(P.default)("Network");case 3:return Object(P.default)("Decode");case 4:return Object(P.default)("Codec")}}
var r=n(2),a=n.n(r),o=n(53),s=n.n(o),l=n(999),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(122)),b=n.n(y),I=n(36),S=n(29),M=n(4019),D=n(775),C=n(527),O=n(966),P=n(3),j=n(4020),T=n(4021),w=n.n(T),E=2,x=function(e){function t(n,r){d()(this,t);var a=h()(this,e.call(this,n,r));return a._nativeSeek=function(e){a._mediaEl.currentTime=e},a.onMetadataLoad=function(){var e=a.props,t=e.positionSeconds,n=e.onDurationMillisecondsChange
;Object(O.a)()||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(){var e=a.props.positionSeconds;if(Object(O.a)()&&e&&(a._mediaEl.currentTime=e),a.props.onCanPlay){var t;(t=a.props).onCanPlay.apply(t,arguments)}},a.onPositionUpdate=function(){if(a._mediaEl){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>a.props.bufferingDetectionLimit&&(S.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===E?S.a.warn("[Player] An HTML media error occurred: "+r+"; the player will attempt to recover"):(S.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._mediaEl.ended;(a.props.onSeek||a._nativeSeek)(e),!a.props.paused&&t&&a._play()},a.onPause=function(){a._mediaEl.ended||a.props.onPause&&a.props.onPause()},a.onPlay=function(){a.props.onPlay&&a.props.onPlay()},
a.state={isStarted:!1},a._mediaListeners={loadedmetadata:a.onMetadataLoad,canplay:a.onCanPlay,progress:a.onProgress,ended:a.onEnded,error:a.onError,pause:a.onPause,play:a.onPlay},a._lastPositionMilliseconds=null,a._lastPositionChangeTime=0,a._isBuffering=!1,a._isUnmounting=!1,a}return v()(t,e),t.prototype.componentDidMount=function(){var e=this;this._mediaEl=Object(C.a)(this.props.mediaType,this.props.allowRecycleElement);var t=this._mediaEl;t.className=w.a.mediaElement,
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(I.a)(this.props.src===e.src,"Use a new `key` when changing `src`")
;var n=this.props,i=n.lastSeekPositionSeconds,r=n.paused,a=n.volume,o=n.playbackSpeed,s=n.isReadyToPlay,l=n.audioStream,c=n.subtitleStream,u=n.subtitleSize,d=n.hasBurnedSubtitles,p=n.isStreamChangeInProgress,h=n.onStreamChange,f=this._mediaEl,v=null!=i&&i!==e.lastSeekPositionSeconds,g=(!!e.audioStream&&e.audioStream.id)!==(!!l&&l.id),m=(!!e.subtitleStream&&e.subtitleStream.id)!==(!!c&&c.id),y=e.isStreamChangeInProgress&&!p,b=e.subtitleSize!==u;v&&this.onSeek(i),
r===e.paused||f.ended||(r?this._pause():this._play()),a!==e.volume&&(f.volume=Math.max(0,Math.min(a/100,1))),o!==e.playbackSpeed&&(f.playbackRate=o),!s||e.isReadyToPlay||r||this._play(),h&&(g&&!p||m&&!p||y||b&&d)&&h()},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"),this._mediaEl.className="",
s()(this._mediaListeners).forEach(function(t){e._mediaEl.removeEventListener(t,e._mediaListeners[t])}),this.props.allowRecycleElement&&Object(C.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(),S.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.height,n=e.width,i=e.placement,r=e.edgeGutterX,o=e.edgeGutterY,s=e.isStackedAbove,l=e.onTick,c=void 0;if(i===D.b)c={display:"none"};else{switch(c={position:"absolute",width:n===M.b?"100%":n+"px",height:t===M.a?"100%":t+"px"},i){case D.a:c.bottom=o||0,c.left=r||0;break;case D.c:c.top=o||0,c.left=r||0}s&&(c.zIndex=1)}return a()("div",{style:c},void 0,this.state.isStarted?a()(j.a,{onPositionUpdate:this.onPositionUpdate,onTick:l}):null)},t}(m.Component);x.defaultProps={
mediaType:"video",positionSeconds:0,placement:D.c,width:M.b,height:M.a,edgeGutterX:0,edgeGutterY:0,volume:100,playbackSpeed:1,allowRecycleElement:!1,isReadyToPlay:!0},t.a=x},function(e,t,n){"use strict";var i,r,a,o,s,l,c,u,d,p,h,f,v,g,m,y,b,I,S,M,D,C,O,P,j,T,w,E,x,A,N,L,k,_,R,z,U=Math.pow(2,32)-1;!function(){var e;if(O={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],
stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in O)O.hasOwnProperty(e)&&(O[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);P=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),T=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),j=new Uint8Array([0,0,0,1]),
w=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),E=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),x={video:w,audio:E},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),N=new Uint8Array([0,0,0,0,0,0,0,0]),k=new Uint8Array([0,0,0,0,0,0,0,0]),_=k,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),z=k,
A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),i=function(e){var t,n,i,r=[],a=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)a+=r[t].byteLength;for(n=new Uint8Array(a+8),i=new DataView(n.buffer,n.byteOffset,n.byteLength),i.setUint32(0,n.byteLength),n.set(e,4),t=0,a=8;t<r.length;t++)n.set(r[t],a),a+=r[t].byteLength;return n},r=function(){return i(O.dinf,i(O.dref,L))},a=function(e){
return i(O.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},o=function(){return i(O.ftyp,P,j,P,T)},y=function(e){return i(O.hdlr,x[e])},s=function(e){return i(O.mdat,e)},m=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0])
;return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),i(O.mdhd,t)},g=function(e){return i(O.mdia,m(e),y(e.type),c(e))},l=function(e){return i(O.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},c=function(e){return i(O.minf,"video"===e.type?i(O.vmhd,A):i(O.smhd,N),r(),I(e))},u=function(e,t){for(var n=[],r=t.length;r--;)n[r]=M(t[r]);return i.apply(null,[O.moof,l(e)].concat(n))},
d=function(e){for(var t=e.length,n=[];t--;)n[t]=f(e[t]);return i.apply(null,[O.moov,h(4294967295)].concat(n).concat(p(e)))},p=function(e){for(var t=e.length,n=[];t--;)n[t]=D(e[t]);return i.apply(null,[O.mvex].concat(n))},h=function(e){
var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(O.mvhd,t)},b=function(e){var t,n,r=e.samples||[],a=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)t=r[n].flags,a[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return i(O.sdtp,a)},I=function(e){
return i(O.stbl,S(e),i(O.stts,z),i(O.stsc,_),i(O.stsz,R),i(O.stco,k))},function(){var e,t;S=function(n){return i(O.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?e(n):t(n))},e=function(e){var t,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]))
;return i(O.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(O.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length]).concat(a).concat([r.length]).concat(o))),i(O.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},
t=function(e){return i(O.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))}}(),v=function(e){
var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return i(O.tkhd,t)},M=function(e){var t,n,r,a,o,s,l
;return t=i(O.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/(U+1)),l=Math.floor(e.baseMediaDecodeTime%(U+1)),n=i(O.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,l>>>24&255,l>>>16&255,l>>>8&255,255&l])),o=92,"audio"===e.type?(r=C(e,o),i(O.traf,t,n,r)):(a=b(e),r=C(e,a.length+o),i(O.traf,t,n,r,a))},f=function(e){return e.duration=e.duration||4294967295,
i(O.trak,v(e),g(e))},D=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),i(O.trex,t)},function(){var e,t,n;n=function(e,t){var n=0,i=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),
[0,0,n|i|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,a,o,s;for(a=e.samples||[],t+=20+16*a.length,r=n(a,t),s=0;s<a.length;s++)o=a[s],
r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,61440&o.flags.degradationPriority,15&o.flags.degradationPriority,(4278190080&o.compositionTimeOffset)>>>24,(16711680&o.compositionTimeOffset)>>>16,(65280&o.compositionTimeOffset)>>>8,255&o.compositionTimeOffset])
;return i(O.trun,new Uint8Array(r))},e=function(e,t){var r,a,o,s;for(a=e.samples||[],t+=20+8*a.length,r=n(a,t),s=0;s<a.length;s++)o=a[s],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size]);return i(O.trun,new Uint8Array(r))},C=function(n,i){return"audio"===n.type?e(n,i):t(n,i)}}(),e.exports={ftyp:o,mdat:s,moof:u,moov:d,initSegment:function(e){var t,n=o(),i=d(e)
;return t=new Uint8Array(n.byteLength+i.byteLength),t.set(n),t.set(i,n.byteLength),t}}},function(e,t,n){"use strict";var i=n(235),r=n(1413),a=function(){a.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new u(0,0),new u(0,1),new u(1,0),new u(1,1)],this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))},this)};a.prototype=new i,a.prototype.push=function(e){var t,n,i
;if("sei_rbsp"===e.nalUnitType&&(t=r.parseSei(e.escapedRBSP),t.payloadType===r.USER_DATA_REGISTERED_ITU_T_T35&&(n=r.parseUserData(t)))){if(e.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return void(--this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=r.parseCaptionPackets(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},
a.prototype.flush=function(){if(!this.captionPackets_.length)return void this.ccStreams_.forEach(function(e){e.flush()},this);this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2&&this.dispatchCea608Packet(e)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(e){e.flush()},this)},a.prototype.reset=function(){
this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},a.prototype.dispatchCea608Packet=function(e){this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},a.prototype.setsChannel1Active=function(e){
return 4096==(30720&e.ccData)},a.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)};var o={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,
566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},s=function(e){return null===e?"":(e=o[e]||e,String.fromCharCode(e))},l=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],c=function(){
for(var e=[],t=15;t--;)e.push("");return e},u=function(e,t){u.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,a;if((t=32639&e.ccData)===this.lastControlCode_)return void(this.lastControlCode_=null);if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,
t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,
this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),
this.displayed_=c();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=c();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=c()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))i=(3&i)<<8,a=s(i|r),this[this.mode_](e.pts,a),
this.column_++;else if(this.isExtCharacter(i,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),i=(3&i)<<8,a=s(i|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),
1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var o=l.indexOf(7968&t);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(e.pts,o)),o!==this.row_&&(this.clearFormatting(e.pts),this.row_=o),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])
}else this.isNormalChar(i)&&(0===r&&(r=null),a=s(i),a+=s(r),this[this.mode_](e.pts,a),this.column_+=a.length)}};u.prototype=new i,u.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},u.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,
this.startPts_=0,this.displayed_=c(),this.nonDisplayed_=c(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},u.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,
this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},u.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},u.prototype.isExtCharacter=function(e,t){
return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},u.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},u.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},u.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},u.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},u.prototype.isNormalChar=function(e){return e>=32&&e<=127},u.prototype.setRollUp=function(e,t){
if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=c(),this.displayed_=c()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},u.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,n)},
u.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},u.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},u.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},u.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]=""
;for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},u.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},e.exports={CaptionStream:a,Cea608Stream:u}},function(e,t,n){"use strict";var i=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++
;if(r+=e[t++],!n.payload&&4===i){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}t+=r,i=0,r=0}return n},r=function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},a=function(e,t){var n,i,r,a,o=[];if(!(64&t[0]))return o;for(i=31&t[0],n=0;n<i;n++)r=3*n,a={type:3&t[r+2],pts:e},
4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],o.push(a));return o},o=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===r[0]&&(o++,r.shift()),n[a]=e[o];return n};e.exports={parseSei:i,parseUserData:r,parseCaptionPackets:a,discardEmulationPreventionBytes:o,USER_DATA_REGISTERED_ITU_T_T35:4}},function(e,t,n){"use strict";var i=n(235),r=function(e,t){var n=1
;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},a=function(e){var t,n;a.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(void 0===n&&(n=e.dts),e.dts=r(e.dts,n),e.pts=r(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.discontinuity=function(){n=void 0,t=void 0}};a.prototype=new i,e.exports={TimestampRolloverStream:a,handleRollover:r}},function(e,t,n){"use strict"
;var i,r,a=n(867).parseType,o=function(e){return new Date(1e3*e-20828448e5)},s=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},l=function(e){var t,n,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=n)if(n=i.getUint32(t),t+=4,n<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:
r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+e[t]&31)}return r},c={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),
height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:i(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,i,r,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},s=31&e[5];for(i=6,r=0;r<s;r++)n=a.getUint16(i),i+=2,
o.sps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;for(t=e[i],i++,r=0;r<t;r++)n=a.getUint16(i),i+=2,o.pps.push(new Uint8Array(e.subarray(i,i+n))),i+=n;return o},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],
streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:a(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]
},i=8;i<e.byteLength;)n.compatibleBrands.push(a(e.subarray(i,i+4))),i+=4;return n},dinf:function(e){return{boxes:i(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:i(e.subarray(8))}},hdlr:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:a(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;i++){if(0===e[i]){i++;break}n.name+=String.fromCharCode(e[i])}
return n.name=decodeURIComponent(escape(n.name)),n},mdat:function(e){return{byteLength:e.byteLength,nals:l(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,r={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(i+=4,r.creationTime=o(n.getUint32(i)),i+=8,r.modificationTime=o(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=8,r.duration=n.getUint32(i)):(r.creationTime=o(n.getUint32(i)),i+=4,
r.modificationTime=o(n.getUint32(i)),i+=4,r.timescale=n.getUint32(i),i+=4,r.duration=n.getUint32(i)),i+=4,t=n.getUint16(i),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:i(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:i(e)}},mp4a:function(e){
var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=i(e.subarray(28))[0]),n},moof:function(e){return{boxes:i(e)}},moov:function(e){return{boxes:i(e)}},mvex:function(e){return{boxes:i(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),
flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,i.creationTime=o(t.getUint32(n)),n+=8,i.modificationTime=o(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=8,i.duration=t.getUint32(n)):(i.creationTime=o(t.getUint32(n)),n+=4,i.modificationTime=o(t.getUint32(n)),n+=4,i.timescale=t.getUint32(n),n+=4,i.duration=t.getUint32(n)),n+=4,i.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,i.matrix=new Uint32Array(e.subarray(n,n+36)),
n+=36,n+=24,i.nextTrackId=t.getUint32(n),i},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){
var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},r=n.getUint16(22);for(t=24;r;t+=12,r--)i.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,
sapDeltaTime:268435455&n.getUint32(t+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:i(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=n.getUint32(4);for(t=8;r;t+=4,r--)i.chunkOffsets.push(n.getUint32(t));return i},stsc:function(e){
var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;i;t+=12,i--)r.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:i(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={
version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)i.entries.push(n.getUint32(t));return i},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=n.getUint32(4);for(t=8;r;t+=8,r--)i.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return i},styp:function(e){return c.ftyp(e)},tfdt:function(e){var t={
version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],a=2&i.flags[2],o=8&i.flags[2],s=16&i.flags[2],l=32&i.flags[2],c=65536&i.flags[0],u=131072&i.flags[0]
;return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),a&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),o&&(i.defaultSampleDuration=n.getUint32(t),t+=4),s&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),c&&(i.durationIsEmpty=!0),!r&&u&&(i.baseDataOffsetIsMoof=!0),i},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,i={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===i.version?(n+=4,
i.creationTime=o(t.getUint32(n)),n+=8,i.modificationTime=o(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=8,i.duration=t.getUint32(n)):(i.creationTime=o(t.getUint32(n)),n+=4,i.modificationTime=o(t.getUint32(n)),n+=4,i.trackId=t.getUint32(n),n+=4,n+=4,i.duration=t.getUint32(n)),n+=4,n+=8,i.layer=t.getUint16(n),n+=2,i.alternateGroup=t.getUint16(n),n+=2,i.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,i.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,
i.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,i.height=t.getUint16(n)+t.getUint16(n+2)/16,i},traf:function(e){return{boxes:i(e)}},trak:function(e){return{boxes:i(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,
sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],a=4&n.flags[2],o=1&n.flags[1],l=2&n.flags[1],c=4&n.flags[1],u=8&n.flags[1],d=i.getUint32(4),p=8;for(r&&(n.dataOffset=i.getInt32(p),p+=4),a&&d&&(t={flags:s(e.subarray(p,p+4))},p+=4,
o&&(t.duration=i.getUint32(p),p+=4),l&&(t.size=i.getUint32(p),p+=4),u&&(t.compositionTimeOffset=i.getUint32(p),p+=4),n.samples.push(t),d--);d--;)t={},o&&(t.duration=i.getUint32(p),p+=4),l&&(t.size=i.getUint32(p),p+=4),c&&(t.flags=s(e.subarray(p,p+4)),p+=4),u&&(t.compositionTimeOffset=i.getUint32(p),p+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{
version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};i=function(e){for(var t,n,i,r,o,s=0,l=[],u=new ArrayBuffer(e.length),d=new Uint8Array(u),p=0;p<e.length;++p)d[p]=e[p];for(t=new DataView(u);s<e.byteLength;)n=t.getUint32(s),i=a(e.subarray(s+4,s+8)),r=n>1?s+n:e.byteLength,o=(c[i]||function(e){return{data:e}})(e.subarray(s+8,r)),o.size=n,o.type=i,l.push(o),s=r;return l},r=function(e,t){var n
;return t=t||0,n=new Array(2*t+1).join(" "),e.map(function(e,i){return n+e.type+"\n"+Object.keys(e).filter(function(e){return"type"!==e&&"boxes"!==e}).map(function(t){var i=n+"  "+t+": ",r=e[t];if(r instanceof Uint8Array||r instanceof Uint32Array){var a=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return a?1===a.length?i+"<"+a.join("").slice(1)+">":i+"<\n"+a.map(function(e){
return n+"  "+e}).join("\n")+"\n"+n+"  >":i+"<>"}return i+JSON.stringify(r,null,2).split("\n").map(function(e,t){return 0===t?e:n+"  "+e}).join("\n")}).join("\n")+(e.boxes?"\n"+r(e.boxes,t+1):"")}).join("\n")},e.exports={inspect:i,textify:r,parseTfdt:c.tfdt,parseHdlr:c.hdlr,parseTfhd:c.tfhd,parseTrun:c.trun}},function(e,t,n){(function(i){var r;!function(){var a={};(function(e){function t(){t=function(){},Hs.Symbol||(Hs.Symbol=Qs)}function n(){t();var e=Hs.Symbol.iterator
;e||(e=Hs.Symbol.iterator=Hs.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&Vs(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[Hs.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=Hs,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&&Vs(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(Gs))?(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 P(){
var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function j(e,t,n){var i=w();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 T(e){if(e.a>=e.j){if(!e.c)return Promise.reject();e.a=1,e.b=e.f}var t=new P
;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 w(){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 A(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),A(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 N(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 F(e,t){return{
uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t}}function V(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():T(i).then(function(){return V(this,t,n,i,r,a,o)}.bind(this),function(){throw e});throw e}.bind(e))}function H(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 Q(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 G(e,t){var n=0;return e.forEach(function(e){n+=t(e)?1:0}),n}function W(){this.a={}}function K(){this.a=new W}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 P,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 Ne(this,e).then(function(e){if(e){for(var t=new P,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){Ne(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 Pe(t,n,i,r,a){var o=we(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){Te(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 je(e,t,n){if(1==n.length&&""==n[0])return Promise.reject(new g(2,6,6e3));var i=new P,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 Te(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 we(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=[];Ae(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 Ae(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==Q(n,e.serverCertificate,be)&&n.push(e.serverCertificate),e.initData&&e.initData.forEach(function(e){-1==Q(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 Ne(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=F([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 Fe(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 Ve(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 He(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 Qe(){
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 Ge(e,t){e.b=new P,e.c=[]
;var n=new Uint8Array(t);return e.a.push(n),e.a.flush(),e.b}function We(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 We(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]?Ge(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 P},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 P,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=H(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 Pt(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 jt(e,t){for(var n=e.periods.length-1;0<n;--n)if(t+$s>=e.periods[n].startTime)return n;return 0}function Tt(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 wt(){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 At(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__?Nt(t):t})}function Nt(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 W,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 Ft(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,Vt(this)}function Vt(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,Ht(this)}.bind(t)),t.a.addEventListener("playing",function(){this.g=!1,Ht(this)}.bind(t)),t.a.addEventListener("pause",function(){Ht(this)}.bind(t)),t.b.addEventListener("unloading",function(){this.g=!0,Ht(this)}.bind(t)),
t.a.addEventListener("ended",function(){e.setTimeout(function(){this.a&&this.a.ended&&(this.g=!0,Ht(this))}.bind(this),5e3)}.bind(t))}function Ht(e){Promise.resolve().then(function(){this.dispatchEvent(new $("caststatuschanged")),Yt(this)||Kt(this,0)}.bind(e))}function Qt(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())&&(Gt(e),e.i=!1,!0)}function Gt(e){Kt(e,0,{contentId:e.b.Ib(),streamType:e.b.P()?"LIVE":"BUFFERED",duration:e.a.duration,contentType:""})}function Wt(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),Wt(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,F(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 Pn(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function jn(e,t,n,i){var r,a=(new Mn).W("sidx",function(e){r=Tn(t,i,n,e)});if(e&&a.parse(e),r)return r;throw new g(2,3,3004)}function Tn(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 wn(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 An(e){
var t=Nn(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=Nn(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 Nn(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=An(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=An(t),179!=e.id)throw new g(2,3,3013);if(e=kn(e),t=An(t),183!=t.id)throw new g(2,3,3012);t=new xn(t.a);for(var n=0;t.ea();){var i=An(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,Vn,"presentationTimeOffset"))||0,i=hn(e,Vn,"timescale"),r=1;i&&(r=rn(i)||1),n=n/r||0,i=Un(e,Vn);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,Vn,"RepresentationIndex");var o=hn(e,Vn,"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=Fn(e,t,i,s,o.start,o.end,r,n),{createSegmentIndex:r.createSegmentIndex,findSegmentPosition:r.findSegmentPosition,getSegmentReference:r.getSegmentReference,initSegmentReference:i,aa:n}}function Fn(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?jn(t,r,i,s):(new _n).parse(t,e,i,s),l.Za(t,0==u),h=new wn(t),c&&En(h,d)})},findSegmentPosition:function(e){return h.find(e)},getSegmentReference:function(e){return h.get(e)}}}function Vn(e){return e.bb}function Hn(e,t){var n=Un(e,Qn),i=Gn(e),r=pn(e,Qn),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 wn(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 Qn(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 Gn(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 Wn(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=Fn(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 wn(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=F([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,F(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=F(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 Pi(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 ji(e){return e.a==e.b.length?null:(e=Pi(e,/[^ \t\n]*/gm))?e[0]:null}function Ti(){this.a=0}
function wi(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=Pi(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 Ai(e){return new Promise(function(t){var n=Ai.parse(e);t({uri:e,data:n.data,headers:{"content-type":n.contentType}})})}function Ni(){this.h=this.c=null,this.I=1,this.u={},this.A={},this.L={},this.a={},this.b=null,this.l="",this.s=new Ti,this.j=this.i=null,this.f=wl,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=wi(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=wi(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 Fi(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 Vi(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():Qi(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 Fi(e,t){return tr(t,"TYPE"),Vi(e,t,[]).then(function(e){return e.stream})}function Vi(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?Hi(c):null).then(function(e){return this.a[i]?this.a[i]:(this.u[t.id]=e,this.a[i]=e)}.bind(e))}
function Hi(e){return e?(e=e.split("/")[0],parseInt(e,10)):null}function Qi(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=wi(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 wn(e);var h=Gi(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=Tl[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 Gi(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 Wi(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=Wi(t,null,a[0],n,0),c=Gi(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=Wi(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=F(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 We(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=Pl[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=jl[t][r]
;return a?Promise.resolve(a):"text"==t?n&&"vtt"!=n?Promise.resolve("application/mp4"):Promise.resolve("text/vtt"):(t=F([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,F([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=Fe.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=N(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[jt(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 Pr(e,"audio")}function Or(e){return Pr(e,"video")}function Pr(e,t){var n=e.c[t];return n?n.pa||n.stream:null}function jr(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,jt(this.b,e)),Zr(this,this.c.text,0)}}.bind(e))}function Tr(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 wr(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)jr(e,t);else if(i){
var r=Tt(e.b,t);n&&r!=i.xa?Ar(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=Fe(e,t)),e}.bind(e))||Ar(e)}function Ar(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 Nr(e,t,n){var i=hr(e.a.Na),r=jt(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 P,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 P,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[Tt(e.b,t.Ka)].startTime+t.ka.endTime:Math.max(n,t.Ic),r=Tt(e.b,t.stream),a=jt(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=Ve(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[Tt(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=Vr(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 Hr(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?Fr(this,t,e):(t.Wa=!0,e.severity=2,Jr(this,e)))}.bind(e))}function Fr(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 Vr(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 Hr(e,t,n,i,r,a,o){return r.containsEmsgBoxes&&(new Mn).W("emsg",e.ce.bind(e,i,a)).parse(o),Qr(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 Qr(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=Tt(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 Gr(e,t){if(t.xa!=Tt(e.b,t.stream)){var n=t.xa,i=ie(e.c);i.every(function(e){return e.xa==n})&&i.every(Wr)&&kr(e,n).then(function(){if(!this.f&&i.every(function(e){var t=Tt(this.b,e.stream);return Wr(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));Nr(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 Wr(e){return!e.ya&&null==e.ra&&!e.sa&&!e.ua}function Kr(e,t){var n=F(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){T(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 P;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 P};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 P,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=F(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(Ta);return t=Oa(i,e.streams.filter(wa),t),i=e.streams.filter(Ea).map(Pa),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=Pa(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=Pa(e);e.variantIds.forEach(function(e){e=i[e],
e.primary=e.primary||t.primary,e.video=t})}),ie(i)}function Pa(e){var t=e.segments.map(function(e,t){return Ca(t,e)});return t=new wn(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=ja(e.initSegmentKey)),t}function ja(e){var t="offline:segment/"+e;return new yn(function(){return[t]},0,null)}function Ta(e){return"audio"==e.contentType}function wa(e){return"video"==e.contentType}function Ea(e){return"text"==e.contentType}function xa(){return Na().then(function(){var e=new ea
;return e.init().then(function(){return e})})}function Aa(){return Na().then(function(){return ta()})}function Na(){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=Al,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=Fl,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 Fa(){
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 Va(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 Ha(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=Ga(this),q(this.m,this.f,"error",this.Xd.bind(this))}function Qa(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 Ga(t){t.da=new MediaSource;var n=new P;return q(t.m,t.da,"sourceopen",n.resolve),t.f.src=e.URL.createObjectURL(t.da),n}function Wa(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:""})}),H(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=Tt(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=Ga(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:w(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{
retryParameters:w(),dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10}},streaming:{retryParameters:w(),failureCallback:e.dd.bind(e),rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1},abrFactory:wt,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):wr(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!=Ha)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=Po(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 Po(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 jo(e){Ql.push(e)}function To(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 wo(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 Ao(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Ao(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 No(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 P,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=H(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 Fo(){return Promise.reject(Error("The key system specified is not supported."))}function Vo(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Ho(){throw new TypeError("Illegal constructor.")}function Qo(){throw new TypeError("Illegal constructor.")}function Yo(t){Wl=t,Kl=new Uint8Array([0]).buffer,
navigator.requestMediaKeySystemAccess=Wo,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ko,e.MediaKeys=Zo,e.MediaKeySystemAccess=qo}function Go(e){var t=Wl;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function Wo(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=Wl;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 P,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 P;var o=Go("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 Ps(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 js(e,t,n,i){return(e=ws(e,n,i))?e:Ts(t,n,i)}function Ts(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 ws(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=As($l,e):ec.test(e)?n=As(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=As(ic,e));return n}function As(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 Ns(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?Al:Nl[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=Pi(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=ji(t);n;)_s(e,n),Pi(t,/[ \t]+/gm),n=ji(t);return e}var Fs,Vs="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},Hs=void 0!==e&&e===this?this:void 0!==i&&null!=i?i:this,Qs=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=Hs.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 Gs=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Fs=m.prototype,Fs.fa="",Fs.Aa="",Fs.ja="",Fs.Oa=null,Fs.Y="",Fs.va="",Fs.toString=function(){var e=[],t=this.fa;if(t&&e.push(M(t,Ws,!0),":"),t=this.ja){e.push("//");var n=this.Aa;n&&e.push(M(n,Ws,!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("")},Fs.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 Ws=/[#\/\?@]/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("&")},P.prototype.resolve=function(){},P.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?N(t.retryParameters):w(),t.uris=N(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 j(t.retryParameters,!1,n);return T(o).then(function(){return V(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,W.prototype.push=function(e,t){this.a.hasOwnProperty(e)?this.a[e].push(t):this.a[e]=[t]},W.prototype.get=function(e){return(e=this.a[e])?e.slice():null
},W.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),Fs=Se.prototype,Fs.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)},Fs.configure=function(e){this.f=e},Fs.init=function(e,t){var n={},i=[];return this.da=t,this.m=e.offlineSessionIds,Pe(this,e,t||0<e.offlineSessionIds.length,n,i),i.length?je(this,n,i):(this.L=!0,Promise.resolve())},
Fs.keySystem=function(){return this.b?this.b.keySystem:""},Fs.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)},Fs.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)},Fs.Cc=function(e){this.f.delayLicenseRequestUntilPlayed&&this.l.paused&&!this.ca?this.K.push(e):ke(this,e)},Fs.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)}},Fs.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)},Fs.Nd=function(){for(var e=0;e<this.K.length;e++)ke(this,this.K[e]);this.ca=!0,this.K=[]},Fs.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))},Qe.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},Qe.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)},Qe.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]}),We.prototype.destroy=function(){return this.f=this.c=null,Promise.resolve()},We.prototype.ze=function(e){this.f=e},We.prototype.setDisplayer=We.prototype.ze,We.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)}},
We.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))},Fs=qe.prototype,Fs.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))},Fs.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 Qe,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]=[])}},Fs.Gb=function(){var e=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:He(this.g.buffered),audio:He($e(this,"audio")),video:He($e(this,"video")),text:e}},Fs.remove=function(e,t,n){return"text"==e?this.a.remove(t,n):it(this,e,this.Sc.bind(this,e,t,n))},Fs.endOfStream=function(e){return rt(this,function(){e?this.f.endOfStream(e):this.f.endOfStream()}.bind(this))},Fs.ha=function(e){
return rt(this,function(){this.f.duration=e}.bind(this))},Fs.S=function(){return this.f.duration},Fs.Rc=function(e,t){this.b[e].appendBuffer(t)},Fs.Sc=function(e,t,n){n<=t?this.Ma(e):this.b[e].remove(t,n)},Fs.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)},Fs.gd=function(e){this.g.currentTime-=.001,this.Ma(e)},Fs.Be=function(e,t){0>t&&(t+=.001),this.b[e].timestampOffset=t,
this.Ma(e)},Fs.ye=function(e,t,n){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=n,this.b[e].appendWindowStart=t,this.Ma(e)},Fs.Le=function(e){this.c[e][0].p.reject(new g(2,3,3014,this.g.error?this.g.error.code:0))},Fs.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",wt),wt.prototype.stop=function(){this.h=null,this.c=!1,this.g=[],this.f=null},wt.prototype.stop=wt.prototype.stop,wt.prototype.init=function(e){this.h=e},wt.prototype.init=wt.prototype.init,wt.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},wt.prototype.chooseVariant=wt.prototype.chooseVariant,wt.prototype.enable=function(){this.c=!0},wt.prototype.enable=wt.prototype.enable,
wt.prototype.disable=function(){this.c=!1},wt.prototype.disable=wt.prototype.disable,wt.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)}},
wt.prototype.segmentDownloaded=wt.prototype.segmentDownloaded,wt.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},wt.prototype.getBandwidthEstimate=wt.prototype.getBandwidthEstimate,wt.prototype.setVariants=function(e){this.g=e},wt.prototype.setVariants=wt.prototype.setVariants,wt.prototype.configure=function(e){this.a=e},wt.prototype.configure=wt.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;Fs=Lt.prototype,Fs.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()},
Fs.X=function(){return this.b},Fs.Xb=function(){return this.w},Fs.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)},Fs.$b=function(e){this.i=e,this.b&&Rt({type:"appData",appData:this.i})},Fs.cast=function(e){return this.h?gl?this.b?Promise.reject(new g(1,8,8002)):(this.f=new P,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))},Fs.tb=function(){this.b&&(_t(this),ml&&(kt(this),ml.stop(function(){},function(){}),ml=null))},Fs.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)},Fs.set=function(e,t,n){this.a[e][t]=n,Rt({type:"set",targetName:e,property:t,value:n})},Fs.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()},Fs.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))},Fs.Ec=function(e,t){return this.a[e][t]},Fs.Hc=function(e,t){Rt({type:"call",targetName:e,methodName:t,args:Array.prototype.slice.call(arguments,2)})},Fs.oe=function(e,t){
var n=Array.prototype.slice.call(arguments,2),i=new P,r=this.s.toString();return this.s++,this.c[r]=i,Rt({type:"asyncCall",targetName:e,methodName:t,args:n,id:r}),i},Fs.xc=function(e){var t=this.u();this.f=new P,this.j=!0,this.Ub(t,e)},Fs.Qd=function(e){gl="available"==e,this.g()},Fs.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()},Fs.Jd=function(e,t){var n=At(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,Fs=Ut.prototype,Fs.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},Fs.Ge=function(){
this.dispatchEvent(new $("caststatuschanged"))},Fs.He=function(){this.f.dispatchEvent(new $(this.h.paused?"pause":"play"))},Fs.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))},Fs.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)},Fs.Ve=function(e,t){this.a.X()?this.a.set("video",e,t):this.c[e]=t},Fs.Ue=function(e){this.a.X()||this.f.dispatchEvent(new $(e.type,e))},Fs.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)},Fs.ge=function(e){this.a.X()||this.g.dispatchEvent(e)},
Fs.Ie=function(e,t){this.a.X()&&("video"==e?this.f.dispatchEvent(t):"player"==e&&this.g.dispatchEvent(t))},c(Ft,zt),l("shaka.cast.CastReceiver",Ft),Ft.prototype.isConnected=function(){return this.m},Ft.prototype.isConnected=Ft.prototype.isConnected,Ft.prototype.xd=function(){return this.g},Ft.prototype.isIdle=Ft.prototype.xd,Ft.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()})},Ft.prototype.destroy=Ft.prototype.destroy,Fs=Ft.prototype,Fs.Bc=function(){this.f=0,this.i=!0,this.m=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Ht(this)},Fs.Fc=function(e,t){this.b&&(this.Vb(),Wt(this,{type:"event",targetName:e,event:t},this.c))},Fs.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),Wt(this,{type:"update",update:t},this.c),Yt(this)},Fs.fd=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume()
;e&&Wt(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.c),Wt(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.c)},Fs.Td=function(e){var t=At(e.data);switch(t.type){case"init":this.f=0,this.l=!1,this.i=!0,Qt(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))}},Fs.Ed=function(e){var t=At(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(){Gt(this)}.bind(this)).catch(function(e){var n="LOAD_FAILED";7==e.category&&7e3==e.code&&(n="LOAD_CANCELLED"),Wt(this,{requestId:Number(t.requestId),type:n},this.h)}.bind(this));break;default:Wt(this,{requestId:Number(t.requestId),
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.h)}},Fs.Mc=function(e,t,n){Wt(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=Pn(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=Pn(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",wn),
wn.prototype.destroy=function(){return this.a=null,Promise.resolve()},wn.prototype.destroy=wn.prototype.destroy,wn.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},wn.prototype.find=wn.prototype.find,wn.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])},
wn.prototype.get=wn.prototype.get,wn.prototype.offset=function(e){for(var t=0;t<this.a.length;++t)this.a[t].startTime+=e,this.a[t].endTime+=e},wn.prototype.offset=wn.prototype.offset,wn.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},wn.prototype.merge=wn.prototype.Pb,wn.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=[]},wn.prototype.evict=wn.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!=An(t).id)throw new g(2,3,3008);var a=An(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=An(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=An(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=An(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),Fs=ti.prototype,Fs.configure=function(e){this.b=e},Fs.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))},Fs.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()},Fs.update=function(){ni(this).catch(function(e){this.a&&this.a.onError(e)}.bind(this))},Fs.onExpirationUpdated=function(){},Fs.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}},Fs.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=Hn(e,this.j);else if(e.v.eb)l=Wn(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}},Fs.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))},Fs.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))},Fs.qe=function(e,t,n){return e=F(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",Ai),Ai.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",Ai),l("shaka.hls.HlsParser",Ni),Fs=Ni.prototype,Fs.configure=function(e){this.h=e},Fs.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))},Fs.stop=function(){
return this.h=this.c=null,this.u={},this.A={},this.m=null,Promise.resolve()},Fs.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)}},Fs.onExpirationUpdated=function(){};var Pl={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},jl={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"}};Ni.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 Tl={"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=Ai.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)}},wl="VOD",El={oa:wl,Uc:"EVENT",hc:"LIVE"};Dl.m3u8=Ni,Ml["application/x-mpegurl"]=Ni,Ml["application/vnd.apple.mpegurl"]=Ni,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)}}}}},Fs=sr.prototype,Fs.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},Fs.Ua=function(){return this.g},Fs.Pd=function(){var e=this.h||0>this.g?0:this.g
;this.a.playbackRate&&this.a.playbackRate!=e&&ur(this,this.a.playbackRate)},Fs.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)},Fs.Ac=function(){q(this.b,this.a,"seeking",this.j.bind(this))},Fs.Bd=function(){this.i=this.a.currentTime,this.j()},Fs=pr.prototype,Fs.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},Fs.Ua=function(){return this.a.Ua()},Fs.$a=function(){this.g.$a()},Fs.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)}},Fs.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=jt(this.g,this.a.currentTime);e!=this.i&&(-1!=this.i&&this.A(),this.i=e),e=Ve(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))},Fs=Sr.prototype,Fs.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()},Fs.configure=function(e){this.h=e,this.A=new j({
maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},Fs.init=function(){var e=hr(this.a.Na);return e=this.a.uc(this.b.periods[jt(this.b,e)]),e.variant||e.text?Nr(this,e).then(function(){this.a&&this.a.Fd&&this.a.Fd()}.bind(this)):Promise.reject(new g(2,5,5005))},Fs.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),Gr(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))}},Fs.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},Fs=La.prototype,Fs.configure=function(){},Fs.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})})},Fs.stop=function(){return Promise.resolve()},Fs.update=function(){},Fs.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 Al="center",Nl={LEFT:"left",RIGHT:"right",CENTER:Al,START:"start",END:"end"};Ra.textAlign=Nl;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 Fl="normal",Vl={NORMAL:Fl,ITALIC:"italic",OBLIQUE:"oblique"};Ra.fontStyle=Vl,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,Fa.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},Fa.prototype.cancel=function(e){return this.c?Promise.resolve():(this.b=!0,this.h=e,this.j.forEach(function(e){e()}),this.i)},c(Ha,zt),l("shaka.Player",Ha),Ha.prototype.destroy=function(){return this.L=!0,Qa(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))},
Ha.prototype.destroy=Ha.prototype.destroy,Ha.version="v2.3.3";var Hl={};Ha.registerSupportPlugin=function(e,t){Hl[e]=t},Ha.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)},Ha.probeSupport=function(){return Re().then(function(e){e={manifest:Jn(),media:Ze(),drm:e}
;for(var t in Hl)e[t]=Hl[t]();return e})},Ha.prototype.load=function(e,t,n){var i=this.zb(),r=new Fa;this.Da=r,this.dispatchEvent(new $("loading"));var a=Date.now();return Va(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))},Ha.prototype.load=Ha.prototype.load,Ha.prototype.configure=function(e){A(this.c,e,to(this),eo(),""),Wa(this)},Ha.prototype.configure=Ha.prototype.configure,Ha.prototype.getConfiguration=function(){var e=to(this);return A(e,this.c,to(this),eo(),""),e},Ha.prototype.getConfiguration=Ha.prototype.getConfiguration,Ha.prototype.re=function(){this.c=to(this),Wa(this)},
Ha.prototype.resetConfiguration=Ha.prototype.re,Ha.prototype.md=function(){return this.f},Ha.prototype.getMediaElement=Ha.prototype.md,Ha.prototype.pc=function(){return this.s},Ha.prototype.getNetworkingEngine=Ha.prototype.pc,Ha.prototype.Ib=function(){return this.Cb},Ha.prototype.getManifestUri=Ha.prototype.Ib,Ha.prototype.P=function(){return!!this.b&&this.b.presentationTimeline.P()},Ha.prototype.isLive=Ha.prototype.P,Ha.prototype.wa=function(){return!!this.b&&this.b.presentationTimeline.wa()},
Ha.prototype.isInProgress=Ha.prototype.wa,Ha.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},Ha.prototype.isAudioOnly=Ha.prototype.wd,Ha.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}},Ha.prototype.seekRange=Ha.prototype.te,Ha.prototype.keySystem=function(){return this.l?this.l.keySystem():""},Ha.prototype.keySystem=Ha.prototype.keySystem,
Ha.prototype.drmInfo=function(){return this.l?this.l.b:null},Ha.prototype.drmInfo=Ha.prototype.drmInfo,Ha.prototype.ub=function(){return this.l?this.l.ub():1/0},Ha.prototype.getExpiration=Ha.prototype.ub,Ha.prototype.sc=function(){return this.pb},Ha.prototype.isBuffering=Ha.prototype.sc,Ha.prototype.zb=function(){return this.L?Promise.resolve():(this.dispatchEvent(new $("unloading")),Qa(this).then(function(){return this.Ta||(this.Ta=$a(this).then(function(){this.Ta=null}.bind(this))),this.Ta
}.bind(this)))},Ha.prototype.unload=Ha.prototype.zb,Ha.prototype.Ua=function(){return this.g?this.g.Ua():0},Ha.prototype.getPlaybackRate=Ha.prototype.Ua,Ha.prototype.Oe=function(e){this.g&&ur(this.g.a,e),this.a&&Tr(this.a,1!=e)},Ha.prototype.trickPlay=Ha.prototype.Oe,Ha.prototype.ad=function(){this.g&&ur(this.g.a,1),this.a&&Tr(this.a,!1)},Ha.prototype.cancelTrickPlay=Ha.prototype.ad,Ha.prototype.ud=function(){if(!this.b||!this.g)return[];var e=jt(this.b,hr(this.g)),t=this.I[e]||{}
;return vt(this.b.periods[e],t.audio,t.video)},Ha.prototype.getVariantTracks=Ha.prototype.ud,Ha.prototype.td=function(){if(!this.b||!this.g)return[];var e=jt(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))},Ha.prototype.getTextTracks=Ha.prototype.td,Ha.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)}},
Ha.prototype.selectTextTrack=Ha.prototype.we,Ha.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)}},Ha.prototype.selectVariantTrack=Ha.prototype.xe,Ha.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)},Ha.prototype.getAudioLanguagesAndRoles=Ha.prototype.jd,Ha.prototype.sd=function(){return this.a?Ka(Mr(this.a).textStreams):[]},Ha.prototype.getTextLanguagesAndRoles=Ha.prototype.sd,Ha.prototype.hd=function(){return this.a?It(Mr(this.a).variants).map(function(e){return e.language}).filter(z):[]},Ha.prototype.getAudioLanguages=Ha.prototype.hd,Ha.prototype.rd=function(){return this.a?Mr(this.a).textStreams.map(function(e){
return e.language}).filter(z):[]},Ha.prototype.getTextLanguages=Ha.prototype.rd,Ha.prototype.ue=function(e,t){if(this.a){var n=Mr(this.a);this.Ba=e,this.ib=t||"",so(this,n)}},Ha.prototype.selectAudioLanguage=Ha.prototype.ue,Ha.prototype.ve=function(e,t){if(this.a){var n=Mr(this.a);this.Ca=e,this.hb=t||"",so(this,n)}},Ha.prototype.selectTextLanguage=Ha.prototype.ve,Ha.prototype.Mb=function(){return this.u?this.u.isTextVisible():this.qb},Ha.prototype.isTextTrackVisible=Ha.prototype.Mb,
Ha.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],jr(this.a,e)):(e=this.a,e.w=!0,e.c.text&&(Xr(e.c.text),delete e.c.text)))},Ha.prototype.setTextTrackVisibility=Ha.prototype.Ae,Ha.prototype.od=function(){return this.b?new Date(1e3*this.b.presentationTimeline.c+1e3*this.f.currentTime):null},Ha.prototype.getPlayheadTimeAsDate=Ha.prototype.od,Ha.prototype.qd=function(){
return this.b?new Date(1e3*this.b.presentationTimeline.c):null},Ha.prototype.getPresentationStartTimeAsDate=Ha.prototype.qd,Ha.prototype.Gb=function(){return this.ca?this.ca.Gb():{total:[],audio:[],video:[],text:[]}},Ha.prototype.getBufferedInfo=Ha.prototype.Gb,Ha.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=jt(this.b,hr(this.g)),r=this.b.periods[i]
;(i=this.I[i])&&(t=Pt(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:N(this.j.switchHistory),stateHistory:N(this.j.stateHistory)}},
Ha.prototype.getStats=Ha.prototype.getStats,Ha.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),jr(this.a,c).then(function(){if(!this.L){var e=this.b.periods.indexOf(s),i=Pr(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))},Ha.prototype.addTextTrack=Ha.prototype.addTextTrack,Ha.prototype.ac=function(e,t){this.mb.width=e,this.mb.height=t},Ha.prototype.setMaxHardwareResolution=Ha.prototype.ac,Ha.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},Ha.prototype.retryStreaming=Ha.prototype.Jc,Ha.prototype.Fa=function(){return this.b},Ha.prototype.getManifest=Ha.prototype.Fa,Fs=Ha.prototype,Fs.dd=function(e){var t=[1001,1002,1003];this.P()&&0<=t.indexOf(e.code)&&(e.severity=1,this.Jc())},Fs.cc=function(e){e.forEach(ut.bind(null,this.l,this.a?Cr(this.a):null,this.a?Or(this.a):null));var t=G(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))},Fs.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)},Fs.Ee=function(e,t){this.h&&this.h.segmentDownloaded(e,t)},Fs.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}))},Fs.Ce=function(){co(this)},Fs.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})}},Fs.De=function(){if(this.w){var e=this.w
;e.c.forEach(e.m.bind(e,!0))}this.a&&xr(this.a)},Fs.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=Tt(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}},Fs.$c=function(){this.ta=!1,this.c.abr.enabled&&this.h.enable(),this.K&&(wr(this.a,this.K,this.ic),this.K=null),this.A&&(Er(this.a,this.A,!0),this.A=null)},Fs.Id=function(){this.i&&this.i.update&&this.i.update()},Fs.Sd=function(){this.g&&this.g.$a()},Fs.Fe=function(e,t){qa(this,e,!0),
this.a&&(wr(this.a,e,t||!1),lo(this))},Fs.Sa=function(e){if(!this.L){var t=new $("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}},Fs.Wd=function(e){this.w?this.w.s(e):this.ob.push(e)},Fs.fb=function(e){this.dispatchEvent(e)},Fs.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))}}},Fs.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)},Fs.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){A(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 Aa()},Hl.offline=ho,l("shaka.polyfill.installAll",function(){
for(var e=0;e<Ql.length;++e)Ql[e]()});var Ql=[];l("shaka.polyfill.register",jo),jo(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",To),document.addEventListener("webkitfullscreenerror",To),document.addEventListener("mozfullscreenchange",To),document.addEventListener("mozfullscreenerror",To),
document.addEventListener("MSFullscreenChange",To),document.addEventListener("MSFullscreenError",To)}}),jo(function(){var t=navigator.userAgent;t&&0<=t.indexOf("CrKey")&&delete e.indexedDB});var Yl;jo(function(){0>navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==wo||(Yl=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=wo)}),jo(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})}},Ao.prototype.createMediaKeys=function(){var e=new Lo(this.keySystem);return Promise.resolve(e)},Ao.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),Fs=_o.prototype,Fs.generateRequest=function(e,t){this.a=new P;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},Fs.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},Fs.update=function(e){this.b=new P;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},Fs.close=function(){try{this.c.close(),this.closed.resolve(),X(this.f)}catch(e){this.closed.reject(e)}return this.closed},Fs.remove=function(){
return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},Fs.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}))},Fs.Kd=function(){this.a?(Uo(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Uo(this,"usable"),this.b.resolve(),this.b=null)},Fs.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 Gl;Fs=Bo.prototype,Fs.forEach=function(e){this.a&&e(this.a,Gl)},Fs.get=function(e){if(this.has(e))return this.a},
Fs.has=function(e){var t=Gl;return!(!this.a||!be(new Uint8Array(e),new Uint8Array(t)))},Fs.entries=function(){},Fs.keys=function(){},Fs.values=function(){},Ho.prototype.createSession=function(){},Ho.prototype.setServerCertificate=function(){},Qo.prototype.getConfiguration=function(){},Qo.prototype.createMediaKeys=function(){};var Wl="";qo.prototype.createMediaKeys=function(){var e=new Zo(this.a);return Promise.resolve(e)},qo.prototype.getConfiguration=function(){return this.b},Fs=Zo.prototype,
Fs.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},Fs.setServerCertificate=function(){return Promise.resolve(!1)},Fs.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)},Fs.$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))},Fs.Yd=function(e){(e=Jo(this,e.sessionId))&&(ts(e,"usable"),e.a&&e.a.resolve(),e.a=null)},Fs.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),Fs=$o.prototype,Fs.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=Go("addKey");try{this.f[r](this.c,n,i,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},Fs.generateRequest=function(e,t){return es(this,t,null)},Fs.load=function(e){
return"persistent-license"==this.g?es(this,null,e):Promise.reject(Error("Not a persistent session."))},Fs.update=function(e){var t=new P;return this.dc(t,e),t},Fs.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Go("cancelKeyRequest");try{this.f[e](this.c,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},Fs.remove=function(){
return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};var Kl;Fs=ns.prototype,Fs.forEach=function(e){this.a&&e(this.a,Kl)},Fs.get=function(e){if(this.has(e))return this.a},Fs.has=function(e){var t=Kl;return!(!this.a||!be(new Uint8Array(e),new Uint8Array(t)))},Fs.entries=function(){},Fs.keys=function(){},Fs.values=function(){},jo(function(){
!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?Yo("webkit"):HTMLMediaElement.prototype.generateKeyRequest?Yo(""):e.MSMediaKeys?(Gl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=No,e.MediaKeys=Lo,e.MediaKeySystemAccess=Ao,
navigator.requestMediaKeySystemAccess=xo):(navigator.requestMediaKeySystemAccess=Fo,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vo,e.MediaKeys=Ho,e.MediaKeySystemAccess=Qo))}),jo(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=[];jo(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)}),jo(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}}}),jo(function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Is)}}),jo(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 Ns(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"==js(c,f,p,"tts:direction")&&(h.writingDirection=1),v=js(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=js(c,f,p,"tts:origin"))&&null!=(v=rc.exec(v))&&(h.region.x=Number(v[1]),h.region.y=Number(v[2])),(v=js(c,f,p,"tts:extent"))&&null!=(v=rc.exec(v))&&(h.region.width=Number(v[1]),h.region.height=Number(v[2])),(v=js(c,f,p,"tts:textAlign"))&&(h.positionAlign=sc[v],h.lineAlign=oc[v],h.textAlign=Nl[v.toUpperCase()]),(v=js(c,f,p,"tts:displayAlign"))&&(h.displayAlign=kl[v.toUpperCase()]),(v=js(c,f,p,"tts:color"))&&(h.color=v),(v=js(c,f,p,"tts:backgroundColor"))&&(h.backgroundColor=v),
(v=js(c,f,p,"tts:fontFamily"))&&(h.fontFamily=v),(v=js(c,f,p,"tts:fontWeight"))&&"bold"==v&&(h.fontWeight=700),(v=js(c,f,p,"tts:wrapOption"))&&"noWrap"==v&&(h.wrapLine=!1),(v=js(c,f,p,"tts:lineHeight"))&&v.match(ac)&&(h.lineHeight=v),(v=js(c,f,p,"tts:fontSize"))&&v.match(ac)&&(h.fontSize=v),(v=js(c,f,p,"tts:fontStyle"))&&(h.fontStyle=Vl[v.toUpperCase()]),(f=Ts(f,p,"tts:textDecoration"))&&Ps(h,f),(c=ws(c,p,"tts:textDecoration"))&&Ps(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=Pi(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()),Pi(c,/[ \t]+/gm),s=ji(c);s;)_s(o,s),Pi(c,/[ \t]+/gm),s=ji(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(218))},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="never",r="samenetwork",a="always"},function(e,t,n){"use strict";function i(e,t){return e?d.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(173),o=n.n(a),s=n(304),l=n.n(s),c=n(77),u=n(7),d=n.n(u),p=n(36),h=n(29),f=n(202),v=n(912),g=c.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=d.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=d.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)},c.c.wrapError(this,n);var u=this._getStorage(),p=this._getStorageKey(),h=this.attributes;if(!1!==u.getInstance().excludeDefaults){var f=d.a.result(this,"defaults");h=Object(v.a)(f,h)}h=i(d.a.result(this,"sessionAttrs"),h);var g=this.serialize(h),m=u.set(p,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?d.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)},c.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?d.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)},c.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(d.a.isObject(e))return e;try{t=JSON.parse(e);t=i(d.a.result(this,"sessionAttrs"),t)}catch(t){var n=d.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(p.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=d.a.extend({},r,{silent:!0}),s=e.call(this,a,o);return d.a.extend(t,this.changed),s},
this.releaseCapturedChangeEvents=function(){d.a.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),d.a.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}},_getStorageKey:function(){var e=d.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";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";function i(e,t){if(e.get("isCloud")&&t.get("identifier")===a.a)return{machineIdentifier:o.b,protocol:"https",address:"node.plexapp.com",port:"32443"};var n=e.get("connections"),i=n.filter(function(e){return e.get("isConnected")&&!e.get("isLoopback")}),s=i.length?i.reduce(r.a):null;return s?{machineIdentifier:e.get("originalMachineIdentifier")||e.get("machineIdentifier"),
protocol:s.get("scheme"),address:s.getAddressFromUri(),port:s.get("port")}:void 0}t.a=i;var r=n(515),a=n(41),o=n(80)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(16),o=n(108),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(6),a=n.n(r),o=n(39),s=n(379),l=n(99),c="ui/player/localCompanionPlayer/mirrorLocalDetails",u=Object(o.a)("ui/player/localCompanionPlayer/runLocalCompanionPlaybackAction"),d=Object(o.a)("ui/player/localCompanionPlayer/setTransientServer"),p=Object(o.a)(c),h=(i={},i["ui/player/localCompanionPlayer/runLocalCompanionPlaybackAction"]=function(e,t,n){var i=t.type,r=t.action,o=r.type,c=r.payload,u=void 0===c?{}:c,d=e.get("ui"),p=i===s.b?l.b:l.a,h=d.get(p+"Player")
;h.get("isOpen")&&h.get("playQueue")&&n({type:o,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";n.d(t,"a",function(){return p});var i=n(7),r=n.n(i),a=n(75),o=n(18),s=n(94),l=n(15),c=n(40),u=n(673),d=n(4093),p="unknown",h=a.a.extend({mixins:[s.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(u.a)(e.get("version"))||p)===Object(l.c)("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(){c.a.execute("checkForServerUpdates",{server:e,download:!1})}):this.isDismissedUpdate(t)||o.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)&&o.a.trigger("show:bar","alertbar",new d.a({model:e}))}});t.b=h},function(e,t,n){"use strict";function i(e,t){var n=Object(d.a)(e,t)
;return n?n.machineIdentifier===l.b?s.a.Deferred().resolve(a()({},n,{transcoderVideo:!1,transcoderVideoRemuxOnly:!1,transcoderAudio:!1})).promise():(n.transcoderVideo=e.get("transcoderVideo")||!1,n.transcoderVideoRemuxOnly=e.get("transcoderVideoRemuxOnly")||!1,n.transcoderAudio=e.get("transcoderAudio")||!1,n.version=e.get("shortVersion"),n.myPlexSubscription=e.get("myPlexSubscription"),n.isVerifiedHostname="https"===n.protocol&&!u.a.isValidAddress(n.address),Object(c.a)(e).then(function(e){
return n.accessToken=e,n})):s.a.Deferred().reject().promise()}t.a=i;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(80),c=n(4096),u=n(655),d=n(1420)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(17),o=n(16),s=n(4128),l=a.a.extend({name:"MultiSelectModel",sessionAttrs:{activeSelectionRange:o.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(17),r=n(16),a=n(4142),o=n(1427),s=i.a.extend({name:"QueryParseModel",context:["server"],url:function(){return this.get("key")},sessionAttrs:{key:r.a.string},syncedAttrs:{type:r.a.string},syncedRelations:{rule:{relationClass:o.a,rootPropertyName:"Rule",deferred:!0},limits:{relationClass:a.a,rootPropertyName:"Limit",deferred:!0}}});t.a=s},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=i.a.extend({name:"QueryRuleModel",syncedAttrs:{field:r.a.string,fieldTitle:r.a.string,value:r.a.string,valueTitle:r.a.string,operator:r.a.string,type:r.a.string},syncedRelations:{rules:function(){return{relationClass:n(4144).default,rootPropertyName:"Rule",deferred:!0}}}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(872),a=i.a.extend({name:"SearchCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=n(4158),o=i.a.extend({name:"MomentListModel",context:["server","provider"],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(4218),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";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1452),r=n(4229);n.n(r);i.a.start()},function(e,t,n){"use strict";var i=n(21),r=n(1495),a=(n(4007),n(4015)),o=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(106),r=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(e){
return r.stringify.apply(r,arguments)}},function(e,t,n){n(1455),e.exports=n(106).Object.assign},function(e,t,n){var i=n(150);i(i.S+i.F,"Object",{assign:n(1457)})},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(361),r=n(642),a=n(426),o=n(427),s=n(894),l=Object.assign;e.exports=!l||n(301)(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(303),r=n(895),a=n(1459);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(638),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(896),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(896),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(1463),__esModule:!0}},function(e,t,n){n(1464),e.exports=n(106).Number.parseFloat},function(e,t,n){var i=n(150),r=n(1465);i(i.S+i.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(e,t,n){var i=n(201).parseFloat,r=n(897).trim;e.exports=1/i(n(644)+"-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(1467),__esModule:!0}},function(e,t,n){n(1468),e.exports=n(106).Number.parseInt},function(e,t,n){var i=n(150),r=n(1469);i(i.S+i.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(e,t,n){var i=n(201).parseInt,r=n(897).trim,a=n(644),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(1471),e.exports=n(106).Object.keys},function(e,t,n){var i=n(427),r=n(361);n(898)("keys",function(){
return function(e){return r(i(e))}})},function(e,t,n){e.exports={default:n(1473),__esModule:!0}},function(e,t,n){n(645),n(902),e.exports=n(649).f("iterator")},function(e,t,n){var i=n(638),r=n(501);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(647),r=n(425),a=n(648),o={};n(359)(o,n(219)("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(298),r=n(299),a=n(361);e.exports=n(360)?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(201).document;e.exports=i&&i.documentElement},function(e,t,n){"use strict";var i=n(1479),r=n(1480),a=n(428),o=n(303)
;e.exports=n(899)(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(904),n(1486),n(1487),n(1488),e.exports=n(106).Symbol},function(e,t,n){
var i=n(502)("meta"),r=n(300),a=n(302),o=n(298).f,s=0,l=Object.isExtensible||function(){return!0},c=!n(301)(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(361),r=n(642),a=n(426);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(637);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(303),r=n(905).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(650)("asyncIterator")},function(e,t,n){n(650)("observable")},function(e,t,n){"use strict";var i=n(7),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(13);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(13)
;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(13);n.n(i).a.fn.triggerReflow=function(){var e=this[0];return e&&e.offsetHeight,this}},function(e,t,n){"use strict";function i(){c.a.trigger("initialize:app")
;var e=Object(f.a)();return e=e.then(E.a),e=e.then(I.a),e=e.then(D.a),e=e.then(b.a),e=e.then(d.a),e=e.then(u.a),e=e.then(M.a),e=e.then(C.a),y.a.get("allowCloudPubSub")&&(e=e.then(function(){return Object(p.a)()})),e=e.then(v.a),e=e.then(S.a),e=e.then(m.a),e=e.then(w.a),e=e.then(h.a),e=e.then(T.a),e=e.then(O.a),e=e.then(g.a),e=e.then(P.a),e=e.then(x.a),e=e.then(j.a)}t.a=i;var r=n(1496),a=(n.n(r),n(1497)),o=(n.n(a),n(1498)),s=(n.n(o),n(1499)),l=(n.n(s),n(1500)),c=(n.n(l),
n(18)),u=n(1501),d=n(1503),p=n(1504),h=n(1522),f=n(1524),v=n(1526),g=n(1527),m=n(1529),y=n(57),b=n(1530),I=n(1531),S=n(1708),M=n(1710),D=n(1712),C=n(1717),O=n(1729),P=n(1731),j=n(1772),T=n(1775),w=n(1777),E=n(1779),x=n(1782)},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(13))},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(13))},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(13))},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(13))},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(13))},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(13),a=n.n(r),o=n(1502),s=n(236)},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]):o.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:s.stringifyParams(C)),delete e.data),M.forEach(function(e){var t=e.match(d);t&&delete f[t[1]]});var O=s.stringifyParams(f);O&&M.push(O),e.url=y+"?"+D.concat(M).join("&")}n&&!u.test(n)&&o.a.warn('Sending %s request with Content-Type "%s". This can result in an unnecessary OPTIONS preflight request.',t,n)}}
t.a=i;var r=n(7),a=n.n(r),o=n(29),s=n(19),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(e){return c.a.isString(e)&&e.trim().length>0}function r(e,t){var n=Object(f.a)();return Object(u.a)("[appModelInitializer] Generating new %s [%s]",t,n),e.set(t,n),h.a.set(t,n)}function a(e,t){
var n=void 0,a=e.get(t);return i(a)?n=h.a.set(t,a):(n=h.a.get(t),n=n.then(function(n){if(!i(n))return u.a.error("[appModelInitializer] Invalid %s found in storage [%s]",t,a),r(e,t);e.set(t,n)},function(){return Object(u.a)("[appModelInitializer] Failed to read %s from storage",t),r(e,t)})),n}function o(e){var t=h.a.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t)}),t}function s(){var e=Object(p.c)("appModel")
;return Object(d.a)(a(e,"clientID"),a(e,"anonymousClientID"),o(e))}t.a=s;var l=n(7),c=n.n(l),u=n(29),d=n(305),p=n(15),h=n(202),f=n(429)},function(e,t,n){"use strict";function i(e){return e.get("isCloud")}function r(){if(s.a.hasWebSocket){new u.a({name:"CloudServerEventManager",appModel:Object(l.c)("appModel"),isValidServer:i,supportsLongPolling:!0,allowMultipleConnections:!0,ServerEventConnection:d.a,ServerRetryManager:c.a}).start()}return o.a.Deferred().resolve().promise()}t.a=r
;var a=n(13),o=n.n(a),s=n(90),l=n(15),c=n(909),u=n(652),d=n(1505)},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(75),l=n(90),c=n(18),u=n(94),d=n(19),p=n(15),h=n(306),f=n(91),v=n(236),g=s.a.extend({lastModified:null,eTag:null,mixins:u.a,url:function(){var e=p.c("appModel"),t=e.get("user"),n="/sub/"+this.requestType+"/"+t.id+"/"+e.get("clientID"),i=new h.a({scheme:"websockets"===this.requestType?"wss":"https",address:"pubsub.plex.tv"});return this.server.resolveUrl(n,{
connection:i,appendToken:!0})},initialize:function(e){o.a.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPingTimeout","onPollSuccess","onPollError"),this.server=e.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),l.a.hasWebSocket?(this._deferred=r.a.Deferred(),this.requestType="websockets",this.socket=new window.WebSocket(o.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&&(v.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=d.join(o.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=r.a.ajax(e).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(e){if(e){var t=f.a.parseXML(e);if(o.a.isObject(t)){var n=t.command;c.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(1507),__esModule:!0}},function(e,t,n){n(1508),e.exports=n(106).Number.isInteger},function(e,t,n){var i=n(150);i(i.S,"Number",{isInteger:n(1509)})},function(e,t,n){var i=n(300),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(29);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(a.a)(e)?e.substring(0,50):"no response"
;return r.a.warn("[Parser] Unable to parse JSON: "+n.message+" ("+t+")"),{}}}var r=n(29),a=n(1513);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(","):[]}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";Object.defineProperty(t,"__esModule",{value:!0});var i={allowFlash:!0,allowServerUpdates:!0,allowHttpsMediaServerConnections:!0,allowMediaServerRelayConnections:!0,allowMultipleWebSocketConnections:!0,allowCloudSyncServers:!0,shouldCreateFlexModels:!0,shouldCreateStateTree:!0,shouldRequestHTMLFromCloudProvider:!0,allowCloudPubSub:!0,allowLoopbackDiscovery:"http:"===window.location.protocol,allowSSO:!1,bufferingDetectionLimit:500};t.default=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(57),a=void 0},function(e,t,n){"use strict";var i=n(24),r=n(1521),a=i.a.extend({name:"ConnectionSourceCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"ConnectionSourceModel",context:["server"],
sessionAttrs:{id:r.a.string}});t.a=a},function(e,t,n){"use strict";function i(){if(Object(d.c)("appModel").get("settings").get("companion")){var e=Object(d.c)("appModel"),t=e.get("cloudServer"),n=e.get("clientID");t&&t.get("authorized")&&n&&n!==h&&(h=n,c.a.info('[Companion] Registering player with plex.tv, clientID="%s"',n),Object(d.c)("companionProxy").registerPlayer(t,n).done(function(){c.a.info('[Companion] Registered player with plex.tv, clientID="%s"',n)}).fail(function(e){e||(e={}),h=null,
c.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(d.c)("appModel"),t=e.get("cloudServer"),n=e.get("clientID");if(t.get("authorized")&&n){c.a.info('[Companion] Unregistering player with plex.tv, clientID="%s"',n);return Object(d.c)("companionProxy").unregisterPlayer(t,n).done(function(){return c.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 c.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(d.c)("appModel").get("settings"),t=e.get("companion"),n=Object(d.c)("companionProxy");if(f!==t)return f=t,t?(p.a.subscribe(),l.a.when(n.subscribe(Object(d.c)("localCompanionCommandHandler")))):(p.a.unsubscribe(),
l.a.when(n.unsubscribe(),r()))}function o(){var e=Object(d.c)("appModel"),t=e.get("cloudServer");i(),e.on("change:clientID",i),t.on("change:authorized",i);var n=Object(d.c)("appModel").get("settings");return n.on("change:companion",a),n.get("companion")?a().then(function(){var e=Object(d.c)("companionProxy"),t=e.getDeepLink();return t.fail(function(){c.a.warn("[Companion] Ignoring error getting deep link")}),Object(u.a)(t)}):l.a.Deferred().resolve().promise()}t.a=o
;var s=n(13),l=n.n(s),c=n(29),u=n(159),d=n(15),p=n(1523),h=null,f=null},function(e,t,n){"use strict";var i=n(18),r=n(15),a={subscribe:function(){i.a.on("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},unsubscribe:function(){i.a.off("cloudServer:processRemoteControlCommand",this.onCloudServerCommand,this)},onCloudServerCommand:function(e){var t=e.Command,n={supportsTimeline:!1,path:t.path,commandID:t.commandID,query:{key:[t.queryKey],offset:[t.queryOffset],
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(r.c)("localCompanionCommandHandler")(n)}};t.a=a},function(e,t,n){
"use strict";function i(){s.a.init("https://540fa70dba644b8dbd34d61a56bd1e72@sentry.io/160686");var e={lifecycle:"started",release:"3.77.4-ae9ba53",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(13),a=n.n(r),o=(n(1525),n(430)),s=n(915)},function(e,t,n){"use strict";n(29)},function(e,t,n){"use strict";function i(e){
return e.get("isFullOwnedServer")||e.get("isFullServer")&&e.supports("sharedUserNotifications")}function r(){if(s.a.hasWebSocket){new u.a({name:"MediaServerEventManager",appModel:Object(l.c)("appModel"),isValidServer:i,supportsLongPolling:!1,allowMultipleConnections:d.a.get("allowMultipleWebSocketConnections"),ServerEventConnection:Object(l.c)("mediaServerEventConnection"),ServerRetryManager:c.a}).start()}return o.a.Deferred().resolve().promise()}t.a=r
;var a=n(13),o=n.n(a),s=n(90),l=n(15),c=n(916),u=n(652),d=n(57)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(s.c)("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(o.a)(t.start())}t.a=i;var r=n(6),a=n.n(r),o=n(159),s=n(15),l=n(430),c=n(1528)},function(e,t,n){"use strict";function i(){return"bundled"}t.a=i},function(e,t,n){"use strict";function i(){Object(c.a)("[Providers] Initializing..."),Object(u.c)("providerManager").start(),Object(c.a)("[Providers] Finished initialization")}
function r(){Object(c.a)("[Providers] Resetting..."),Object(u.c)("providerManager").stop(),i()}function a(){return i(),l.a.on("reset:providers",r),s.a.Deferred().resolve().promise()}t.a=a;var o=n(13),s=n.n(o),l=n(18),c=n(29),u=n(15)},function(e,t,n){"use strict";function i(){if(!o.a.hasReplaceState)return a.a.Deferred().resolve().promise();var e=a.a.Deferred(),t=window.location,n=c.a.parseQueryString(t.search),i=void 0;try{i=JSON.parse(n.alerts),delete n.alerts}catch(e){}if(i){
l.a.set("alerts",i);var r=""+s.join([""+t.origin+t.pathname],n)+t.hash;window.history.replaceState({},"",r)}return e.resolve().promise()}var r=n(13),a=n.n(r),o=n(90),s=n(19),l=n(57),c=n(63);t.a=i},function(e,t,n){"use strict";function i(){return o.a.registerAll(s),a.a.Deferred().resolve().promise()}t.a=i;var r=n(13),a=n.n(r),o=n(40),s=n(1532)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1533);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(1580);n.d(t,"refreshMetadata",function(){return r.a});var a=n(1608);n.d(t,"analyzeItems",function(){return a.a});var o=n(1609);n.d(t,"analyzeSection",function(){return o.a});var s=n(1611);n.d(t,"markWatched",function(){return s.a});var l=n(1612);n.d(t,"markUnwatched",function(){return l.a});var c=n(1613);n.d(t,"unmatch",function(){return c.a});var u=n(1614);n.d(t,"splitApart",function(){return u.a});var d=n(1615);n.d(t,"merge",function(){return d.a});var p=n(1616)
;n.d(t,"deleteItems",function(){return p.a});var h=n(1617);n.d(t,"deleteMediaItem",function(){return h.a});var f=n(1621);n.d(t,"deleteVersions",function(){return f.a});var v=n(1622);n.d(t,"deleteSection",function(){return v.a});var g=n(1623);n.d(t,"deleteSectionThumbnails",function(){return g.a});var m=n(1624);n.d(t,"deletePlaylist",function(){return m.a});var y=n(1625);n.d(t,"updateLibrary",function(){return y.a});var b=n(1626);n.d(t,"optimize",function(){return b.a});var I=n(1627)
;n.d(t,"cleanBundles",function(){return I.a});var S=n(1628);n.d(t,"emptyTrash",function(){return S.a});var M=n(1629);n.d(t,"match",function(){return M.a});var D=n(1630);n.d(t,"autoMatch",function(){return D.a});var C=n(1631);n.d(t,"changeArtwork",function(){return C.a});var O=n(1632);n.d(t,"rate",function(){return O.a});var P=n(1633);n.d(t,"enableVersionGenerator",function(){return P.a});var j=n(1634);n.d(t,"disableVersionGenerator",function(){return j.a});var T=n(1635)
;n.d(t,"reprocessVersionGenerator",function(){return T.a});var w=n(1636);n.d(t,"deleteVersionGenerator",function(){return w.a});var E=n(1637);n.d(t,"deleteAllVersionGenerators",function(){return E.a});var x=n(1638);n.d(t,"updateChannel",function(){return x.a});var A=n(1639);n.d(t,"uninstallChannel",function(){return A.a});var N=n(1640);n.d(t,"stopMedia",function(){return N.a});var L=n(1643);n.d(t,"connectServer",function(){return L.a});var k=n(1644);n.d(t,"reconnectServer",function(){return k.a
});var _=n(1645);n.d(t,"signInServer",function(){return _.a});var R=n(1646);n.d(t,"removeServer",function(){return R.a});var z=n(1647);n.d(t,"checkForServerUpdates",function(){return z.a});var U=n(1648);n.d(t,"installServerUpdates",function(){return U.a});var B=n(1649);n.d(t,"showClaimServerAlertBar",function(){return B.a});var F=n(1653);n.d(t,"signIn",function(){return F.a});var V=n(1654);n.d(t,"signUp",function(){return V.a});var H=n(1655);n.d(t,"showSyncModal",function(){return H.a})
;var Q=n(1681);n.d(t,"showHomeWarningsModal",function(){return Q.a});var Y=n(1694);n.d(t,"deleteSyncItem",function(){return Y.a});var G=n(1695);n.d(t,"refreshSyncLists",function(){return G.a});var W=n(1696);n.d(t,"removeDevice",function(){return W.a});var K=n(1697);n.d(t,"removeFriend",function(){return K.a});var q=n(1698);n.d(t,"acceptInvite",function(){return q.a});var Z=n(1699);n.d(t,"rejectInvite",function(){return Z.a});var X=n(1700);n.d(t,"shareServer",function(){return X.a});var J=n(1701)
;n.d(t,"removeServerShare",function(){return J.a});var $=n(1702);n.d(t,"removeHomeUser",function(){return $.a});var ee=n(1703);n.d(t,"validateUsername",function(){return ee.a});var te=n(1704);n.d(t,"toggleGuest",function(){return te.a});var ne=n(1705);n.d(t,"lockUser",function(){return ne.a});var ie=n(1706);n.d(t,"signOut",function(){return ie.a});var re=n(1707);n.d(t,"remotePlaybackUnlock",function(){return re.a})},function(e,t,n){"use strict";var i=n(1534);n.d(t,"j",function(){return i.a})
;var r=n(1535);n.d(t,"a",function(){return r.a});var a=n(1536);n.d(t,"f",function(){return a.a});var o=n(1537);n.d(t,"g",function(){return o.a});var s=n(1542);n.d(t,"i",function(){return s.a});var l=n(1559);n.d(t,"c",function(){return l.a});var c=n(1560);n.d(t,"b",function(){return c.a});var u=n(1561);n.d(t,"h",function(){return u.a});var d=n(1563);n.d(t,"k",function(){return d.a});var p=n(1564);n.d(t,"d",function(){return p.a});var h=n(1565);n.d(t,"e",function(){return h.a})},function(e,t,n){
"use strict";function i(e){return Object(r.c)("serverConnectionTestManager").queueConnectionTest(e)}var r=n(15);t.a=i},function(e,t,n){"use strict";function i(e){return Object(r.c)("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 a.a.Deferred().resolve(t.id).promise();var i=t.resolveUrl("/identity",{connection:n}),r=s.a.extend(t.getXHROptions(i),{timeout:t.connectionTestTimeout})
;Object(l.a)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+i);var o=a.a.ajax(r).promise();return o=o.then(function(e){var n=a.a.Deferred(),i=c.a.parseXML(e),r=i&&i.machineIdentifier;return r?(Object(l.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(){l.a.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+i)}),o}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(29),c=n(63);t.a=i},function(e,t,n){"use strict";function i(){
var e=Object(s.c)("appStore"),t=Object(s.c)("appModel"),n=t.get("ui"),i=t.get("user"),u=t.get("fakeRouter"),d=i.server,p=i.clearAccessToken();return p.fail(function(){a.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.g)({budget:1/0})),r.a.trigger("clearAll:cache"),d.cache.store(d)}),Object(o.a)(p)}
var r=n(18),a=n(29),o=n(159),s=n(15),l=n(203),c=n(236);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(53),c=n.n(l),u=n(431),d=1e3/60,p=0,h=0,f=void 0,v=void 0},function(e,t,n){e.exports={default:n(1540),__esModule:!0}},function(e,t,n){n(1541),e.exports=n(106).Object.getPrototypeOf},function(e,t,n){var i=n(427),r=n(901);n(898)("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(o.c)("appModel").get("user"),n=t.get("signedIn"),i=t.id!==e.homeUser.id,a=e.allowGuestLock,c=!!e.isRemoteUser,u=i||a,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(o.c)("appModel").get("user"),i=s.a.execute("resetUser")
;return i=i.then(function(){return n.activateStoredUser(t.homeUser.id),a.a.trigger("reset:servers"),a.a.trigger("reset:providers"),n.signIn(e,{lockState:l.a.lockStates.UNLOCKED})}),i.done(function(){Object(o.c)("metrics").trackEvent({event:"client:switchuser",interaction:!0})}),i}var a=n(18),o=n(15),s=n(40),l=n(307);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";var i=n(17),r=n(16),a=i.a.extend({name:"UserFeatureModel",idAttribute:"uuid",syncedAttrs:{uuid:r.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(24),r=n(1547),a=i.a.extend({name:"StoredUserCollection",model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(17),o=n(16),s=n(1548),l=n(921),c=n(917),u=n(922),d=n(923),p=n(918),h=n(659),f=a.a.extend({name:"StoredUserModel",additionalRelations:["servers"],syncedAttrs:{id:o.a.integer,authToken:o.a.string,username:o.a.string,email:o.a.string,title:o.a.string,thumb:o.a.string,pin:o.a.string,home:o.a.boolean,restricted:o.a.boolean,guest:o.a.boolean,hasAllEntitlements:o.a.boolean,lastPrimaryServerID:o.a.string},syncedRelations:{subscription:{relationClass:h.a},subscriptions:{
relationClass:p.a},roles:{relationClass:d.a},entitlements:{relationClass:l.a},providers:{relationClass:u.a},servers:{relationClass:s.a},features:{relationClass:c.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=f},function(e,t,n){"use strict";var i=n(24),r=n(920),a=i.a.extend({name:"StoredServerCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1550),a=i.a.extend({name:"StoredConnectionCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(1551),o=i.a.extend({name:"StoredConnectionModel",idAttribute:"uri",syncedAttrs:{uri:r.a.string,scheme:r.a.string,address:r.a.string,port:r.a.string,
relay:r.a.boolean},syncedRelations:{sources:{relationClass:a.a}}});t.a=o},function(e,t,n){"use strict";var i=n(24),r=n(1552),a=i.a.extend({name:"StoredConnectionSourceCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"StoredConnectionSourceModel",syncedAttrs:{id:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"UserEntitlementModel",syncedAttrs:{id:r.a.string}});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=i.a.extend({name:"UserProviderModel",syncedAttrs:{id:r.a.string,territory:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"UserRoleModel",syncedAttrs:{id:r.a.string}});t.a=a},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(173),a=n.n(r);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(160),o=n(91),s=a.a.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(e){
var t=r.a.isObject(e)?e:o.a.parseXML(e);return o.a.parseInteger(t,"id"),o.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"}:a.a.prototype.getSaveParams.apply(this,arguments)}});t.a=s},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"UserProfileModel",context:["server"],url:"/api/v2/user/profile",syncedAttrs:{
autoSelectAudio:r.a.boolean,autoSelectSubtitle:r.a.integer,defaultAudioLanguage:r.a.string,defaultSubtitleLanguage:r.a.string,defaultSubtitleAccessibility:r.a.integer}});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.homeUser,n=a.c("appModel"),i=n.get("user"),l=t.get("uuid")||i.get("uuid"),c={includeSubscriptions:1,pin:e.pin},u=r.join(["/api/v2/home/users/",l,"/switch"],c),d=t.server.getXHROptions(u,{type:"POST",xhrFields:{withCredentials:o.a.get("allowSSO")}});return Object(s.a)(d)}
var r=n(19),a=n(15),o=n(57),s=n(662);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.c)("appModel").get("user").hashPIN(e.pin,l)?t:n:t}var r=n(13),a=n.n(r),o=n(15),s=n(174);t.a=i},function(e,t,n){"use strict";function i(e){
var t=a.a.Deferred(),n=e.item,i=n.server,r=e.media||s.a.first(n.get("Media")),o=e.part||r&&s.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=c.join(["/library/parts/",o.id],f),g=s.a.extend(i.getXHROptions(v),{type:"PUT"}),m=a.a.ajax(g);return m.done(function(){Object(u.a)(r,p,h),n.trigger("change:streams"),t.resolve()}),m.fail(function(e){l.a.trigger("show:alert",{
type:"error",message:Object(d.default)("There was a problem selecting the stream for this item.")}),t.reject(e)}),t.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(19),u=n(1562),d=n(3);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(7),a=n.n(r),o=n(261);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=c.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=d.join(["/:/",t],n),l=s.a.ajax(e.server.getXHROptions(o));return l.done(function(){a(e,i),r(e,i)}),l}),l=s.a.when.apply(s.a,o);return l.fail(function(){var e
;e=i?Object(p.default)("There was a problem marking this item as watched."):Object(p.default)("There was a problem marking this item as unwatched."),u.a.trigger("show:alert",{type:"error",message:e})}),l}function r(e,t){if(Object(h.t)(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(h.q)(e.get("type")),r=e.parent;if(r&&r.get("isMetadataList")&&(r=r.parent),r&&(n=Object(h.q)(r.get("type"))),n&&n.typeString===i.parent){var o,s=Object(h.t)(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(13),s=n.n(o),l=n(7),c=n.n(l),u=n(18),d=n(19),p=n(3),h=n(26);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=s.a.extend(r.getXHROptions(o),{type:"DELETE"});t=a.a.ajax(u),t.done(function(){var t=e.item.get("Media");t.splice(s.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(c.default)("Ensure that media deletion is enabled for library content in your server settings."):Object(c.default)("There was a problem deleting this item.");l.a.trigger("show:alert",{type:"error",message:t})}),t}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3);t.a=i},function(e,t,n){"use strict";function i(e){var t=p.a.execute("deleteFile",e);return t.done(function(){var t=e.item,n=r(t.get("parentKey"),e);if(!n)return void a(e);var i=n.get("children")
;i.fetchRange({size:1}).then(function(){if(i.getCollection().length>0)return void o(n,e);n.trigger("destroy",n,n.collection);var s=r(t.get("grandparentKey"),e);if(!s)return void a(l()({},e,{skipRedirect:!1}));var c=s.get("children");c.fetchRange({size:1}).then(function(){c.getCollection().length>0?o(s,l()({},e,{skipRedirect:!1})):a(e)})})}),t}function r(e,t){if(!e)return!1;var n=new h.a({key:e},{server:t.item.server,onlyIfCached:!0});return!u.a.isEmpty(n)&&n}function a(e){if(!e.skipRedirect){
if(e.refreshPage)return void d.a.trigger("navigate:refresh");var t=e.item,n=t.get("isLibraryItem")&&t.parent,i=t.get("librarySectionID")||n&&n.get("librarySectionID");i?d.a.trigger("navigate","section",{serverID:t.server.id,sectionID:i,replace:!0}):d.a.trigger("navigate:back")}}function o(e,t){t.skipRedirect||d.a.trigger("navigate","details",{serverID:e.server.id,key:e.get("key"),type:e.get("type"),replace:!0})}var s=n(6),l=n.n(s),c=n(7),u=n.n(c),d=n(18),p=n(40),h=n(92);t.a=i},function(e,t,n){
"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"TranscodeSessionModel",context:["server"],url:function(){return"/transcode/sessions/"+this.id},syncedAttrs:{key:r.a.string,progress:r.a.float,throttled:r.a.boolean,speed:r.a.float,duration:r.a.integer,videoDecision:r.a.string,audioDecision:r.a.string,protocol:r.a.string,container:r.a.string,videoCodec:r.a.string,audioCodec:r.a.string,audioChannels:r.a.integer,width:r.a.string,height:r.a.string,transcodeHwDecoding:r.a.string,
transcodeHwEncoding:r.a.string,timeStamp:r.a.integer,minOffsetAvailable:r.a.integer,maxOffsetAvailable:r.a.integer}});t.a=a},function(e,t,n){"use strict";function i(e,t){return e?e===r.d:/^(\/sync\/[\w\d-\/]*)?\/library\//.test(t)}t.a=i;var r=n(41)},function(e,t,n){"use strict";function i(e){a||(a=Object(r.n)().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(26),a=void 0;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";var i=n(24),r=n(1571),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(17),r=n(16),a=i.a.extend({name:"ChapterModel",context:["server","section"],syncedAttrs:{id:r.a.integer,tag:r.a.string,index:r.a.integer,startTimeOffset:r.a.integer,endTimeOffset:r.a.integer,
thumb:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1573),a=i.a.extend({name:"ConcertCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"ConcertModel",context:["server","section"],syncedAttrs:{id:r.a.integer,at:r.a.integer,tag:r.a.string,venue:r.a.string,city:r.a.string,country:r.a.string,url:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1575),a=i.a.extend({
name:"OverlayCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"OverlayModel",context:["server","section"],syncedAttrs:{key:r.a.string,marginTop:r.a.integer,marginRight:r.a.integer,marginBottom:r.a.integer,marginLeft:r.a.integer,width:r.a.integer,height:r.a.integer,alignHorizontal:r.a.string,alignVertical:r.a.string,relative:r.a.string,imageScaling:r.a.string,marginScaling:r.a.string}});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===v.a})}function o(){
return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){return e[[t.beginsAt,t.channelIdentifier,t.endsAt].join("-")]=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(f.a)(e,t,n)}t.a=c;var u=n(53),d=n.n(u),p=n(6),h=n.n(p),f=n(432),v=n(511),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";function i(){return{context:"hub.home.quicklinks",hubIdentifier:"home.quicklinks",size:2,style:"list",totalSize:2,type:"directory",Directory:[{content:1,context:"content.categories",key:"/library/sections/categories",subtype:"news",title:Object(r.default)("Categories"),type:"genre"},{content:1,context:"content.channels",key:"/library/sections/channels",subtype:"news",title:Object(r.default)("Channels")}]}}
t.a=i;var r=n(3)},function(e,t,n){"use strict";var i=n(24),r=n(97),a=n(1579),o=i.a.extend({name:"MetadataDirectoryCollection",context:["server","provider"],model:a.a,modelId:function(e){var t=e.key,n=e.filter,i=t;return n&&(i+="?"+n),i},responseType:function(){return Object(r.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(19),r=n(17),a=n(16),o=n(97),s=n(38),l=n(43),c=n(26),u=r.a.extend({name:"MetadataDirectoryModel",context:["server","provider"],entityType:l.f,
entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(s.a)(this.entityType,e.key,e.filter,this.provider.entityID())},responseType:function(){return Object(o.a)(this.server)},syncedAttrs:{key:a.a.string,title:a.a.string,containerKey:a.a.string,typeKey:a.a.string,type:a.a.string,subtype:a.a.string,thumb:a.a.string,icon:a.a.string,content:a.a.boolean,context:a.a.string,filter:a.a.string},augmentResponse:function(e){var t=e.key,n=e.filter
;if(n)return e.containerKey=t,e.typeKey=i.join([t,"all"],n),e;var r=t.match(/\/library\/sections\/(\d+)\/collection/);if(r){var a=r[1],o=Object(c.q)(c.d).id,s="/library/sections/"+a,l=s+"/all?type="+o;return e.containerKey=s,e.typeKey=l,e.content=!0,e}var u=t.match(/\/library\/sections\/(\d+)\/all\?type=(\d+)/);if(u){var d=u[1],p=u[2],h="/library/sections/"+d+"?type="+p;e.key=h,e.typeKey=t,e.content=!0}return e}});t.a=u},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]),a.a.when.apply(a.a,s.a.map(n,function(e){var n="/library/metadata/"+e.id+"/refresh",i=s.a.extend(t.server.getXHROptions(n),{type:"PUT"});return a.a.ajax(i).promise()})).fail(function(e){503===e.status?l.a.trigger("show:modal",new u.a({model:t.server})):l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem refreshing.")})})}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(433);t.a=i},function(e,t,n){"use strict"
;var i=n(160),r=n(434),a=n(1582),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(7),r=n.n(i),a=n(19),o=n(17),s=n(16),l=n(310),c=n(97),u=n(312),d=n(1583),p=o.a.extend({mixins:[l.a],name:"PlaylistListModel",context:["server","section"],idAttribute:"key",
collectionName:"playlists",responseType:function(){return Object(c.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),a.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:s.a.boolean,currentPageStart:s.a.integer,
currentPageSize:s.a.integer,populatedRange:s.a.object},syncedAttrs:{totalSize:s.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=u.a.addVersionHeader(2,n)
;return o.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(24),r=n(1584),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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(19),l=n(17),c=n(16),u=n(237),d=n(670),p=l.a.extend({name:"PlaylistModel",
context:["server","containerKey"],idAttribute:"ratingKey",rootPropertyName:"Playlist",urlRoot:"/playlists",saveUrl:function(){return this.server.supports("truePlaylistsPath")?o.a.result(this,"url"):"/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([o.a.result(this,"url"),"/items/",e,"/move"],n),a=o.a.extend(this.server.getXHROptions(i),{type:"PUT"}),l=r.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([o.a.result(this,"url"),"/items/",e]),i=o.a.extend(this.server.getXHROptions(n),{
type:"DELETE"}),a=r.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=[o.a.result(this,"url")],l={};this.isNew()?(l.type=this.get("playlistType"),l.title=this.get("title"),l.smart=this.get("smart")?1:0):a.push("/items"),e.get("playQueueID")?l.playQueueID=e.get("playQueueID"):l.uri=u.a.uri(e,t)
;var c=s.join(a,l),d=o.a.extend(e.server.getXHROptions(c),{type:i}),p=r.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";var i=n(7),r=n.n(i),a=n(19),o=n(366),s=n(26),l=n(107),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(s.q)("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(s.q)(this.section.get("type")).id;return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===Object(s.q)("show").id||t===Object(s.q)("season").id?t=Object(s.q)("episode").id:t!==Object(s.q)("artist").id&&t!==Object(s.q)("track").id||(t=Object(s.q)("album").id):/^recentlyViewedShows$/.test(e)&&(t=Object(s.q)("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"))===o.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";function i(e,t){switch(e){case c.INT:case c.ENUM:
return l.a.parseInteger(t);case c.BOOL:return l.a.parseBoolean(t);default:return t}}var r=n(53),a=n.n(r),o=n(17),s=n(16),l=n(63),c={INT:"int",TEXT:"text",BOOL:"bool",ENUM:"enum",DOUBLE:"double"},u=o.a.extend({idAttribute:"id",url:"/:/prefs",context:["server"],syncedAttrs:{id:s.a.string,label:s.a.string,default:s.a.oneOfType(s.a.integer,s.a.string,s.a.boolean,s.a.array),summary:s.a.string,value:{type:s.a.oneOfType(s.a.integer,s.a.string,s.a.boolean,s.a.array),save:!0},
type:s.a.oneOf(c.INT,c.TEXT,c.BOOL,c.ENUM,c.DOUBLE),group:s.a.string,advanced:s.a.boolean,option:s.a.string,hidden:s.a.boolean,enumValues:s.a.array,values:s.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=o.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(3),r=n(262),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(17),r=n(16),a=i.a.extend({name:"FilterOptionModel",context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:r.a.encodedString,type:r.a.string,field:r.a.string,value:r.a.string,title:r.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(7),r=n.n(i),a=n(24),o=n(1590),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(17),r=n(16),a=n(513),o=i.a.extend({name:"LinearFilterModel",
context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{secondary:r.a.boolean,key:r.a.string,title:r.a.string},syncedRelations:{options:{relationClass:a.a}},defaults:{secondary:!1}});t.a=o},function(e,t,n){"use strict";var i=n(24),r=n(1592),a=i.a.extend({name:"LocationCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"LocationModel",context:["server","section"],
rootPropertyName:"Location",syncedAttrs:{id:r.a.integer,path:{type:r.a.string,save:!0}}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(932),a=i.a.extend({name:"MediaTypeCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(24),o=n(933),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(24),r=n(1596),a=i.a.extend({name:"PlaylistItemCollection",context:["server","provider","playlist"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(92),o=n(38),s=n(43),l=i.a.extend({name:"PlaylistItemModel",context:["server","provider","playlist"],entityType:s.i,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state
;return Object(o.a)(this.entityType,e.playlistItemID||e.key,this.server.entityID())},idAttribute:"playlistItemID",syncedAttrs:{playlistItemID:r.a.string,key:r.a.string,type:r.a.string},syncedRelations:{metadataItem:{relationClass:a.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";var i=n(24),r=n(238),a=i.a.extend({name:"ProviderActionCollection",context:["server","provider"],model:r.a})
;t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1599),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(17),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(24),r=n(1601),a=i.a.extend({name:"ProviderSettingOptionsCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"ProviderSettingOptionsModel",context:["server","provider"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:r.a.string,title:r.a.string,type:r.a.string,selected:r.a.boolean}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(1603),a=i.a.extend({
name:"ProviderDirectoryCollection",context:["server","provider"],model:r.a,modelId:function(e){return e.key||e.hubKey}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"ProviderDirectoryModel",context:["server","provider"],sessionAttrs:{scanFilesError:r.a.object},syncedAttrs:{id:r.a.string,key:r.a.string,hubKey:r.a.string,title:r.a.string,icon:r.a.string,type:r.a.string,subtype:r.a.string,agent:r.a.string,refreshing:r.a.boolean,updatedAt:r.a.integer,
scannedAt:r.a.integer,context:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(41),r=n(3),a=n(238),o=n(940),s=n(60),l=n(315),c=l.a.extend({name:"LegacyLibraryProviderModel",defaults:function(){var e=this.server,t=e.get("isFullServer"),n=e.get("isFullOwnedServer"),l=[{type:s.b.CONTENT,key:"/library/sections"},{type:s.b.MATCH,key:"/library/matches"},{type:s.b.METADATA,key:"/library/metadata"}];return t&&l.push({type:s.b.SEARCH,key:"/hubs/search"},{type:s.b.PLAY_QUEUE,key:"/playQueues"},{
type:s.b.PLAYLIST,key:"/playlists"},{type:s.b.TIMELINE,key:"/:/timeline"},{type:s.b.ACTIONS,actions:[{id:a.b.SCROBBLE,key:"/:/scrobble",reverseKey:"/:/unscrobble"},{id:a.b.RATE,key:"/:/rate"}]}),n&&l.push({type:s.b.MANAGE}),{identifier:i.d,title:Object(r.default)("Library"),types:["video","audio","photo"],protocols:n?["stream","download"]:["stream"],features:new o.a(l,{parse:!0,server:e})}}});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+=" "+m(i(n(4)).call(e,"Internet Required",{hash:{},data:t}))+" "}function l(e,t){var r="";return r+=" "+m(i(n(4)).call(e,"Plex Pass Required",{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+m(i(n(4)).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(4)).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(4)).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(4)).call(e,"Settings",{hash:{},data:t}))+" "}function f(e,t){var r="";return r+=" "+m(i(n(4)).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.hasPlexSubscription,{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.hasPlexSubscription,{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(4)).call(t,"Ignore",{hash:{},data:o}))+"</button> ",v=r.if.call(t,t&&t.hasPlexSubscription,{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(674),r=n(941).default,a=n(676).default,o=n(675),s=n(1607),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(675),u=n(676).default,d=n(674).COMPILER_REVISION,p=n(674).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";function i(e){var t=e.items
;return a.a.when.apply(a.a,s.a.map(t,function(e){var t="/library/metadata/"+e.id+"/analyze",n=s.a.extend(e.server.getXHROptions(t),{type:"PUT"});return a.a.ajax(n).promise()}))}var r=n(13),a=n.n(r),o=n(7),s=n.n(o);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.a.ajax(o);e.done(function(){n.resolve()}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem analyzing the library.")}),n.reject(e)}),e.always(function(e){
d.hide()})}var n=a.a.Deferred(),i=e.section,r="/library/sections/"+i.id+"/analyze",o=s.a.extend(i.server.getXHROptions(r),{type:"PUT"}),d=new u.a({title:Object(c.default)("Analyze Library"),message:Object(c.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(c.default)("Analyze"),cancelLabel:Object(c.default)("Cancel"),async:!0}),p=d.promise;return p.done(t),
p.fail(function(){n.reject()}),l.a.trigger("show:modal",d),n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);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(4)).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(4)).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(c.t)(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(l.default)("Are you sure you want to mark {1} as watched?",v):Object(l.default)("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":g=f?Object(l.default)("Are you sure you want to mark all episodes of {1} as watched?",v):Object(l.default)("Are you sure you want to mark these episodes as watched?");break;default:
g=f?Object(l.default)("Are you sure you want to mark {1} as watched?",v):Object(l.default)("Are you sure you want to mark these items as watched?")}var m=new u.a({title:Object(l.default)("Mark as Watched"),message:g});t=m.promise.then(function(){return s.a.execute("updateWatchedStatus",r)}),o.a.trigger("show:modal",m)}else t=s.a.execute("updateWatchedStatus",r);return t}var r=n(7),a=n.n(r),o=n(18),s=n(40),l=n(3),c=n(26),u=n(61);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(c.t)(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(l.default)("Are you sure you want to mark {1} as unwatched?",v):Object(l.default)("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":
g=f?Object(l.default)("Are you sure you want to mark all episodes of {1} as unwatched?",v):Object(l.default)("Are you sure you want to mark these episodes as unwatched?");break;default:g=f?Object(l.default)("Are you sure you want to mark {1} as unwatched?",v):Object(l.default)("Are you sure you want to mark these items as unwatched?")}var m=new u.a({title:Object(l.default)("Mark as Unwatched"),message:g});t=m.promise.then(function(){return s.a.execute("updateWatchedStatus",r)}),
o.a.trigger("show:modal",m)}else t=s.a.execute("updateWatchedStatus",r);return t}var r=n(7),a=n.n(r),o=n(18),s=n(40),l=n(3),c=n(26),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.item,n="/library/metadata/"+t.id+"/unmatch",i=s.a.extend(t.server.getXHROptions(n),{type:"PUT"}),r=a.a.ajax(i);return r.fail(function(){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem unmatching this item.")})}),r.promise()}
var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=s.a.extend(i.server.getXHROptions(r),{type:"PUT"}),u=a.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||l.a.trigger("navigate:back"),n.resolve()}),u.fail(function(e){l.a.trigger("show:alert",{type:"error",
message:Object(c.default)("There was a problem splitting this item apart.")}),n.reject(e)}),u.always(function(e){o.hide()})}var n=a.a.Deferred(),i=e.item,r="/library/metadata/"+i.id+"/split",o=new u.a({title:Object(c.default)("Split Apart"),message:Object(c.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()}),l.a.trigger("show:modal",o),n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);t.a=i
},function(e,t,n){"use strict";function i(e){function t(){var e=a.a.ajax(d);e.done(function(){n.resolve()}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem merging these items.")}),n.reject(e)}),e.always(function(e){p.hide()})}var n=a.a.Deferred(),i=e.item,r=s.a.pluck(e.items,"id").join(","),o="/library/metadata/"+i.id+"/merge?ids="+r,d=s.a.extend(i.server.getXHROptions(o),{type:"PUT"}),p=new u.a({title:Object(c.default)("Merge"),
message:Object(c.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()}),l.a.trigger("show:modal",p),n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e,t){return c.a.map(e,function(e){return d.a.execute("deleteItem",{item:e,skipRedirect:t})})}function r(e){var t=e.items,n=e.item,r=e.skipConfirmation,o=e.skipRedirect;t||(t=[n]),n||(n=c.a.first(t))
;var l=n.get("Media");if(1===t.length&&l.length>1&&n.server.supports("specificMediaDeletion"))return d.a.execute("deleteMediaItem",{item:n});var u;if(r)u=s.a.when.apply(s.a,i(t,o));else{var p=a({item:n,items:t});u=p.promise.then(function(){return s.a.when.apply(s.a,i(t,o)).always(function(){p.hide()})})}return u}function a(e){var t,n,i=e.item,r=e.items,a=r.length>1,o=i.get("type"),s=h.q(o);o===h.d?(t=s.title,
n=Object(p.default)("Are you sure you want to delete {1}? This cannot be undone.",i.get("title"))):a?(t=s.plural,n=Object(p.default)("Are you sure you want to delete {1} items from your filesystem?",r.length)):(t=s.title,n=Object(p.default)("Are you sure you want to delete this item from your filesystem?"));var l={title:Object(p.default)("Delete {1}",t),message:n,confirmLabel:Object(p.default)("Delete"),cancelLabel:Object(p.default)("Cancel"),async:!0,hasDanger:!0}
;(a||h.u(o))&&(l.requireDoubleConfirm=!0,l.doubleConfirmMessage=Object(p.default)("Multiple files may be deleted."),l.doubleConfirmLabel=Object(p.default)("Yes, I'm sure"));var c=new f.a(l);return u.a.trigger("show:modal",c),c}var o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(18),d=n(40),p=n(3),h=n(26),f=n(61);t.a=r},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 c.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 p.a({model:n}),a=r.promise;return a.done(function(e){t.resolve(i[e])}),a.fail(function(){t.reject()}),l.a.trigger("show:modal",r),t.promise()}function a(){var e=new d.a({title:Object(u.default)("Delete File"),message:Object(u.default)("Are you sure you want to delete this file from your filesystem?"),
confirmLabel:Object(u.default)("Delete"),cancelLabel:Object(u.default)("Cancel"),async:!0,hasDanger:!0});return l.a.trigger("show:modal",e),e}var o=n(13),s=n.n(o),l=n(18),c=n(40),u=n(3),d=n(61),p=n(1618);t.a=i},function(e,t,n){"use strict";var i=n(677),r=n(1619),a=n.n(r),o=i.a.extend({name:"SelectMediaFileModal",template:a.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(1620)).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(4)).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(942).default,r=n(189);e.exports=r(i)},function(e,t,n){"use strict";function i(e){var t=e.item,n=t.server,i=t.get("Media"),a=l.a.filter(i,function(e){return!!e.proxyType}),s=r({item:t,versions:a});return s.promise.then(function(){var e=u.join(["/library/metadata/",t.id],{proxy:1}),r=l.a.extend(n.getXHROptions(e),{type:"DELETE"
}),p=o.a.ajax(r);return p.done(function(){l.a.each(a,function(e){i.splice(l.a.indexOf(i,e),1)}),t.trigger("change:Media",t,t.get("Media"))}),p.fail(function(e){var t=403===e.status?Object(d.default)("Ensure that media deletion is enabled for library content in your server settings."):Object(d.default)("There was a problem deleting these versions.");c.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(d.default)("Are you sure you want to delete {1} versions of {2}?",i.length,n.get("title"));else{var a=l.a.first(i);t=Object(d.default)("Are you sure you want to delete the {1} version of {2}?",a.title,n.get("title"))}var o=new p.a({title:r?Object(d.default)("Delete Versions"):Object(d.default)("Delete Version"),message:t,confirmLabel:Object(d.default)("Delete"),cancelLabel:Object(d.default)("Cancel"),async:!0,hasDanger:!0})
;return c.a.trigger("show:modal",o),o}var a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(18),u=n(19),d=n(3),p=n(61);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=s.c("appStore").dispatch,t=this.server.entityID();t&&e(c.b({serverEntityID:t})),n.resolve()}),e.fail(function(e){o.a.trigger("show:alert",{type:"error",message:Object(l.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(l.default)("Delete Library"),message:Object(l.default)("Are you sure you want to delete {1}?",i.get("title")),confirmLabel:Object(l.default)("Delete"),cancelLabel:Object(l.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:Object(l.default)("This cannot be undone."),doubleConfirmLabel:Object(l.default)("Yes, I'm sure"),async:!0,hasDanger:!0}),d=r.promise;return d.done(t),d.fail(function(){n.reject()}),
o.a.trigger("show:modal",r),n.promise().always(function(){r.hide()}),n.promise()}var r=n(13),a=n.n(r),o=n(18),s=n(15),l=n(3),c=n(131),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.a.ajax(r);return e.done(function(e){l.a.trigger("show:alert",{type:"success",message:Object(c.default)("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",
message:Object(c.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=s.a.extend(n.server.getXHROptions(i),{type:"DELETE"}),o=new u.a({title:Object(c.default)("Delete Preview Thumbnails"),message:Object(c.default)("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),confirmLabel:Object(c.default)("Delete"),
cancelLabel:Object(c.default)("Cancel"),async:!0,hasDanger:!0}),d=o.promise;return d=d.then(function(){return t()}),l.a.trigger("show:modal",o),d}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=e.item.destroy();t.done(function(){e.skipRedirect||o.a.trigger("navigate:back"),n.resolve()}),t.fail(function(e){o.a.trigger("show:alert",{type:"error",
message:i?Object(s.default)("There was a problem deleting the album."):Object(s.default)("There was a problem deleting the playlist.")}),n.reject(e)}),t.always(function(e){r.hide()})}var n=a.a.Deferred(),i="photo"===e.item.get("playlistType"),r=new l.a({title:i?Object(s.default)("Delete Album"):Object(s.default)("Delete Playlist"),message:Object(s.default)("Are you sure you want to delete {1}? This cannot be undone.",e.item.get("title")),confirmLabel:Object(s.default)("Delete"),
cancelLabel:Object(s.default)("Cancel"),async:!0,hasDanger:!0}),c=r.promise;return c.done(t),c.fail(function(){n.reject()}),o.a.trigger("show:modal",r),n.promise()}var r=n(13),a=n.n(r),o=n(18),s=n(3),l=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.a.ajax(g);e.done(function(){n.resolve()}),e.fail(function(e){if(503===e.status)l.a.trigger("show:modal",new d.a({model:p}));else{
var t=o?Object(c.default)("There was a problem canceling the update."):Object(c.default)("There was a problem updating the library.");l.a.trigger("show:alert",{type:"error",message:t})}n.reject(e)})}var n=a.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=s.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(c.default)("Refresh All"),message:Object(c.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(c.default)("Refresh"),cancelLabel:Object(c.default)("Cancel")}),y=m.promise;y.done(t),y.fail(function(){n.reject()}),l.a.trigger("show:modal",m)}else t();return n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61),d=n(433);t.a=i},function(e,t,n){"use strict"
;function i(e){function t(){var e=a.a.ajax(r);e.done(function(){l.a.trigger("show:alert",{type:"success",message:Object(c.default)("The database was optimized.")}),n.resolve()}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem optimizing this database.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=a.a.Deferred(),i=e.server,r=s.a.extend(i.getXHROptions("/library/optimize"),{type:"PUT"}),o=new u.a({
title:Object(c.default)("Optimize Database"),message:Object(c.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(c.default)("Optimize"),cancelLabel:Object(c.default)("Cancel"),async:!0}),d=o.promise;return d.done(t),d.fail(function(){n.reject()}),l.a.trigger("show:modal",o),n.promise()}
var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=a.a.ajax(r);e.done(function(){l.a.trigger("show:alert",{type:"success",message:Object(c.default)("Unused bundles are being removed.")}),n.resolve()}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem removing unused bundles.")}),n.reject(e)}),e.always(function(e){o.hide()})}
var n=a.a.Deferred(),i=e.server,r=s.a.extend(i.getXHROptions("/library/clean/bundles"),{type:"PUT"}),o=new u.a({title:Object(c.default)("Clean Bundles"),message:Object(c.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(c.default)("Clean"),cancelLabel:Object(c.default)("Cancel"),async:!0}),d=o.promise
;return d.done(t),d.fail(function(){n.reject()}),l.a.trigger("show:modal",o),n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(){s.a.each(o,function(e){var t="/library/sections/"+e+"/emptyTrash",n=s.a.extend(r.getXHROptions(t),{type:"PUT"});d.push(a.a.ajax(n))});var e=a.a.when.apply(a.a,d);e.done(function(){l.a.trigger("show:alert",{type:"success",message:Object(c.default)("The trash was emptied.")}),n.resolve()
}),e.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem emptying the trash.")}),n.reject(e)}),e.always(function(e){p.hide()})}var n=a.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(c.default)("Empty Trash"),
message:Object(c.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(c.default)("Empty"),cancelLabel:Object(c.default)("Cancel"),async:!0}),h=p.promise;return h.done(t),h.fail(function(){n.reject()}),l.a.trigger("show:modal",p),n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61)
;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=s.a.extend(t.server.getXHROptions(i),{type:"PUT"});return a.a.ajax(r).promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(19);t.a=i},function(e,t,n){"use strict";function i(e){
var t=a.a.Deferred(),n=e.item,i=e.agent,r={agent:i.id,manual:0},o=c.join(["/library/metadata/",n.id,"/matches"],r),p=s.a.extend(n.server.getXHROptions(o)),h=a.a.ajax(p);return h.done(function(e){var i=s.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=c.join(["/library/metadata/",n.id,"/match"],r),h=s.a.extend(n.server.getXHROptions(p),{type:"PUT"}),f=a.a.ajax(h);f.done(function(){
t.resolve()}),f.fail(function(){l.a.trigger("show:alert",{type:"error",message:Object(d.default)("There was a problem matching this item.")}),t.reject()})}else l.a.trigger("show:alert",{type:"error",message:Object(d.default)("No matches were found using this agent.")}),t.reject()}),h.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(d.default)("There was a problem searching for matches.")}),t.reject(e)}),t.promise()}
var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(19),u=n(91),d=n(3);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=s.a.extend(t.server.getXHROptions(i),{type:"PUT"}),o=a.a.ajax(r);return o.done(function(n){t.set(c[e.artworkType],n)}),o.promise()}var r=n(13),a=n.n(r),o=n(7),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=s.join("/:/rate",r),u=a.a.ajax(t.server.getXHROptions(c));return u.fail(function(){t.set("userRating",i),o.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem rating this item.")})}),u.promise()}var r=n(13),a=n.n(r),o=n(18),s=n(19),l=n(3)
;t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,n=s.a.result(t,"url")+"/"+e.ratingKey+"/enable",i=s.a.extend(t.server.getXHROptions(n),{type:"PUT"}),r=a.a.ajax(i).promise();return r.fail(function(e){l.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem enabling this version.")})}),r}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.generator,n=l.a.result(t,"url")+"/"+e.ratingKey+"/disable",i=r();return i.promise.then(function(){var e=l.a.extend(t.server.getXHROptions(n),{type:"PUT"}),r=o.a.ajax(e).promise();return r.fail(function(e){c.a.trigger("show:alert",{type:"error",message:Object(u.default)("There was a problem disabling this version.")})}),r.always(function(){i.hide()}),r})}function r(){var e=new d.a({title:Object(u.default)("Remove Version"),
message:Object(u.default)("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),confirmLabel:Object(u.default)("Remove"),cancelLabel:Object(u.default)("Cancel"),async:!0,hasDanger:!0});return c.a.trigger("show:modal",e),e}var a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(18),u=n(3),d=n(61);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.generator,n=e.ratingKey,i=s.a.result(t,"url");n&&(i+="/"+n),i+="/reprocess"
;var r=s.a.extend(t.server.getXHROptions(i),{type:"PUT"}),o=a.a.ajax(r).promise();return o.fail(function(e){var t=n?Object(c.default)("There was a problem processing this item."):Object(c.default)("There was a problem processing these items.");l.a.trigger("show:alert",{type:"error",message:t})}),o}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3);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){a.a.trigger("show:alert",{type:"error",message:Object(o.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(o.default)("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",t):Object(o.default)("Removing this item will delete all related versions. Are you sure you want to continue?"),i=new s.a({
title:Object(o.default)("Delete Versions"),message:n,confirmLabel:Object(o.default)("Remove"),cancelLabel:Object(o.default)("Cancel"),async:!0,hasDanger:!0});return a.a.trigger("show:modal",i),i}var a=n(18),o=n(3),s=n(61);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="+u.a.LOCAL,i=l.a.extend(e.server.getXHROptions(n),{type:"DELETE"}),r=o.a.ajax(i).promise();return r.fail(function(e){c.a.trigger("show:alert",{
type:"error",message:Object(d.default)("There was a problem deleting all versions.")})}),r.always(function(){t.hide()}),r.promise()})}function r(){var e=new p.a({title:Object(d.default)("Delete All Versions"),message:Object(d.default)("Are you sure you want to delete all versions? This cannot be undone."),confirmLabel:Object(d.default)("Delete"),cancelLabel:Object(d.default)("Cancel"),async:!0,hasDanger:!0});return c.a.trigger("show:modal",e),e}
var a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(18),u=n(317),d=n(3),p=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(e){var i=s.a.isObject(e)?e:c.a.parseXML(e);if(!i||!i.message&&!i.Directory)return void n();if(i.message)p||l.a.trigger("show:alert",{type:"success",message:i.message}),r.resolve();else{c.a.parseArray(i,"Directory");var o=i.Directory[0].key,u=a.a.ajax(d.getXHROptions(o));u.done(t),u.fail(n)}}function n(e){p||l.a.trigger("show:alert",{type:"error",
message:Object(u.default)("There was a problem checking for updates.")}),r.reject(e)}var i,r=a.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=a.a.ajax(d.getXHROptions(i));return f.done(t),f.fail(n),r.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(91),u=n(3);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=a.a.ajax(f)
;t.done(function(t){var r=s.a.isObject(t)?t:c.a.parseXML(t);i.set("installed",!1),r.message&&!e.skipConfirmation&&l.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(u.default)("Unable to Uninstall Plugin"),message:Object(u.default)("This plugin could not be uninstalled, but you can disable it in the server settings."),confirmLabel:Object(u.default)("OK"),cancelLabel:Object(u.default)("Ignore")})
;t.promise.done(function(){Object(d.a)("serverSettings",{serverID:i.server.id,group:"channels"})}),l.a.trigger("show:modal",t)}else l.a.trigger("show:alert",{type:"error",message:Object(u.default)("This plugin could not be uninstalled.")});n.reject(e)})}var n=a.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(u.default)("Uninstall Plugin"),
message:Object(u.default)("Are you sure you want to uninstall this plugin?")}),g=v.promise;g.done(t),g.fail(function(){n.reject()}),l.a.trigger("show:modal",v)}return n.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(91),u=n(3),d=n(161),p=n(61);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){o.a.trigger("show:alert",{type:"error",message:Object(s.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()}),o.a.trigger("show:modal",u),c.promise()}var r=n(13),a=n.n(r),o=n(18),s=n(3),l=n(1641);t.a=i},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(85),l=n(1642),c=n.n(l),u=s.a.extend({name:"stopMediaModal",className:"stop-media-modal select-modal modal modal-sm fade",template:c.a,ui:{stopMediaBtn:".stop-media-btn",messageContainer:".message-container",message:".message"},events:o.a.extend({"click .stop-media-btn":"onStopMediaClick"},s.a.prototype.events),initialize:function(){this.promise=r.a.Deferred()},onHide:function(e){s.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(4)).call(t,"Stop this item",{hash:{},data:o}))+'</h4> </div> <div class="modal-body"> <p class="confirm-message"> '+l(i(n(4)).call(t,"Do you wish to stop this item's playback?",{hash:{},data:o
}))+"<br/> "+l(i(n(4)).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(4)).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(4)).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===s.b,o=!e.value&&r===s.a;r===s.c||a||o?n||(n=setInterval(t,d)):(n=clearInterval(n),
i.get("isWaiting")&&i.set("remoteAccessState",s.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?s.d:s.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(l.default)("There was a problem connecting your server."):Object(l.default)("There was a problem disconnecting your server."),o.a.trigger("show:alert",{type:"error",message:n}),i.set("remoteAccessState",h),u.reject(t)}),u.promise()}var r=n(13),a=n.n(r),o=n(18),s=n(516),l=n(3);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(13),a=n.n(r),o=n(40);t.a=i},function(e,t,n){"use strict";function i(e,t){var n=t.getXHROptions("/api/claim/token"),i=s.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 s.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 s.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=s.a.Deferred(),g=t.server,m=Object(p.c)("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=c.a.isObject(e)?e:f.a.parseXML(e);n&&"invalid"===n.signInState?(u.a.trigger("show:alert",{type:"error",
message:Object(v.default)("The username or password is incorrect.")}),d.reject()):(g.set({myPlexSigninState:h.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(v.default)("The username or password is incorrect."):Object(v.default)("There was a problem signing in to Plex."),u.a.trigger("show:alert",{type:"error",message:n}),
d.reject(e)}),d.promise()}var o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(18),d=n(19),p=n(15),h=n(108),f=n(63),v=n(3);t.a=a},function(e,t,n){"use strict";function i(e){var t=new h.c({machineIdentifier:e},{onlyIfCached:!0});if(!u.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:h.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=u.a.extend(s.server.getXHROptions(t),{type:"DELETE"});e=l.a.ajax(n)}if(g){if(g.get("connected")&&g.get("myPlexSigninState")===h.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(){d.a.trigger("test:server",g),g.populate().fail(function(){a(g)})})}return e.always(function(){y.hide()}),e.promise()}
var n,o=p.c("appModel"),s=o.get("user"),c=e.device,g=e.server||i(c.get("clientIdentifier"))
;n=c?c.get("isPersonalCloudServer")?Object(f.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(f.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(f.default)("Are you sure you want to remove this server?");var m={
title:Object(f.default)("Remove Server"),message:n,confirmLabel:Object(f.default)("Remove"),cancelLabel:Object(f.default)("Cancel"),async:!0,hasDanger:!0};c&&(m.requireDoubleConfirm=!0,m.doubleConfirmMessage=Object(f.default)("Are you sure you want to remove this server?"),m.doubleConfirmLabel=Object(f.default)("Yes, I'm sure"));var y=new v.a(m),b=y.promise;return b=b.then(function(){return t()}),d.a.trigger("show:modal",y),b}
var s=n(13),l=n.n(s),c=n(7),u=n.n(c),d=n(18),p=n(15),h=n(108),f=n(3),v=n(61);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=s.a.extend(t.getXHROptions(i),{type:"PUT"}),o=e.initialState||"checking",c=t.get("desktop").get("update");c.set("state",o);var u=a.a.ajax(r).promise();return u.fail(function(){c.set("state","error")}),u}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(19);t.a=i},function(e,t,n){"use strict"
;function i(e){function t(){var e=n.get("desktop").get("update");return a.a.ajax(i).promise().then(function(){e.set("state","installing"),n.set("isInstallingServerUpdate",!0)},function(){e.set("state","error"),n.set("isInstallingServerUpdate",!1)})}var n=e.server,i=s.a.extend(n.getXHROptions("/updater/apply"),{type:"PUT"}),r=void 0;n.get("activeConnection").get("isLoopback")||(r=new u.a({title:Object(c.default)("Remote Installation"),confirmLabel:Object(c.default)("Continue"),
cancelLabel:Object(c.default)("Cancel"),message:Object(c.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}),l.a.trigger("show:modal",r));var o=r?r.promise:a.a.Deferred().resolve().promise();return o=o.then(function(){return t()})}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){
var t=Object(o.c)("appModel").get("settings"),n=t.get("dismissedUnclaimedServers"),i=n.indexOf(e.id)>-1,l=r.c.history.getFragment();i||/^\!\/setup/.test(l)||a.a.trigger("show:bar","alertbar",new s.a({model:e}))}t.a=i;var r=n(77),a=n(18),o=n(15),s=n(1650)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(90),o=n(15),s=n(76),l=n(30),c=n(161),u=n(264),d=n(1652),p=n.n(d),h=u.a.extend({name:"ClaimServerAlertBarView",className:"claim-server-alert-bar alert-bar notify",template:p.a,
events:r.a.extend({"click .claim-link":"onClaimClick","click .reload-link":"onReloadClick"},u.a.prototype.events),initialize:function(){u.a.prototype.initialize.apply(this,arguments);var e=Object(o.c)("appModel").get("settings"),t=e.get("viewedUnclaimedServers");this.model.id&&-1===t.indexOf(this.model.id)&&(Object(o.c)("metrics").trackView({page:l._6,mode:"banner"},{interaction:!1}),e.save("viewedUnclaimedServers",t.concat(this.model.id)))},serializeData:function(){return{
showInsecureMessage:a.a.isHostedHttps&&!this.model.get("isSecure")}},onClaimClick:function(e){e.preventDefault(),Object(o.c)("metrics").trackClick({action:s.g,page:l._6,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){u.a.prototype.onCloseClick.apply(this,arguments)
;var t=Object(o.c)("appModel").get("settings"),n=t.get("dismissedUnclaimedServers");this.model.id&&-1===n.indexOf(this.model.id)&&(Object(o.c)("metrics").trackClick({action:s.n,page:l._6,mode:"banner"}),t.save("dismissedUnclaimedServers",n.concat(this.model.id)))}});t.a=h},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){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(4)).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(4)).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function l(e,t){var r="";return r+=' <span class="message">'+d(i(n(4)).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(4)).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){"use strict";function i(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(l.c)("appModel").get("user"),n=void 0,i=void 0;if(e.username&&e.password){var r=s.join("/api/v2/users/signin",{includeSubscriptions:1});n=t.server.getXHROptions(r,{type:"POST",data:{login:e.username,password:e.password},xhrFields:{withCredentials:d.a.get("allowSSO")}}),i="password"}else{var g=s.join("/api/v2/user",{includeSubscriptions:1,"X-Plex-Token":e.accessToken});n=t.server.getXHROptions(g),i="code"}
var m=Object(v.a)(n);return m=m.then(function(n){return e.remember?c.a.restorePrevious():c.a.register(u.a.getInstance()),t.signIn(n)}),m.fail(function(t){var n=void 0;if(!e.silent){var i=t.responseText&&h.a.parseXML(t.responseText),r=i&&i.error,s=Array.isArray(r)?a.a.first(r):r;n=s?a.a.isObject(s)?Object(p.a)(s):s:Object(f.default)("There was a problem signing in to Plex."),o.a.trigger("show:alert",{type:"error",message:n})}}),m.done(function(){Object(l.c)("metrics").trackEvent({
event:"client:signin",interaction:!0,properties:{mode:i,firstRun:!!e.isFirstRun}})}),m}var r=n(7),a=n.n(r),o=n(18),s=n(19),l=n(15),c=n(202),u=n(517),d=n(57),p=n(367),h=n(63),f=n(3),v=n(662);t.a=i},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(c.c)("appModel").get("user"),n=s.a.pick(e,"username","email","password"),i=t.server.getXHROptions("/api/v2/users?includeSubscriptions=1",{type:"POST",data:n}),r=a.a.ajax(i).promise()
;return r=r.then(function(n){return e.remember?u.a.restorePrevious():u.a.register(d.a.getInstance()),t.signIn(n,{lockState:p.a.lockStates.UNLOCKED})}),r.fail(function(e){var t=void 0;if(422===e.status){var n=e.responseText&&f.a.parseXML(e.responseText),i=n&&n.error,r=Array.isArray(i)?s.a.first(i):i;t=r?s.a.isObject(r)?Object(h.a)(r):r:Object(v.default)("This account information is invalid.")}else t=Object(v.default)("There was a problem connecting to Plex.");l.a.trigger("show:alert",{
type:"error",message:t})}),r.done(function(){Object(c.c)("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:!!e.isFirstRun}})}),r}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(15),u=n(202),d=n(517),p=n(307),h=n(367),f=n(63),v=n(3);t.a=i},function(e,t,n){"use strict";function i(e){var t=s.c("appModel"),n=t.get("user"),i=e.item.server;if(i.get("myPlexSigninState")!==l.b){var r=Object(c.default)("This server needs to be connected to Plex to sync its content.")
;return void o.a.trigger("show:alert",{type:"error",message:r})}if(!i.get("allowSync"))return void o.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 d.a({collection:f});g.promise.done(function(e){v.device=f.get(e),o.a.trigger("show:modal",new p.a(v))}),o.a.trigger("show:modal",g)}else o.a.trigger("show:alert",{type:"error",
message:Object(c.default)("You are not signed in to any sync capable devices.")})}var r=n(7),a=n.n(r),o=n(18),s=n(15),l=n(108),c=n(3),u=n(679),d=n(1657),p=n(946);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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"Learn More",{hash:{},data:o}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(677),r=n(1658),a=n.n(r),o=i.a.extend({name:"selectDeviceModal",template:a.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(944)).call(e,e&&e.name,25,{hash:{},data:t}))+" "}function c(e,t){var r=""
;return r+=" "+h(i(n(944)).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(4)).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";var i=n(21),r=n(1660),a=n.n(r),o=i.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .try-again-link":"onTryAgainClick"},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});t.a=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(4)).call(t,"There was a problem syncing this media.",{hash:{},data:o}))+'</h4> <h4><a class="try-again-link" href="#">'+l(i(n(4)).call(t,"Try again",{hash:{},data:o
}))+"</a></h4> </div> </div> "})},function(e,t,n){"use strict";var i=n(21),r=n(7),a=n.n(r),o=n(15),s=n(40),l=n(237),c=n(26),u=n(680),d=n(947),p=n(1669),h=n(1677),f=n.n(h),v={video:"movie",audio:"track",photo:"photo"},g=i.a.Layout.extend({template:f.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=o.c("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(c.p)(r.get("firstItemType")).typeString):(n=r.has("childrenKey")?r.get("children"):r,i=Object(c.p)(r.get("type")).typeString),this.tempModel=new u.a({metadataType:i,title:l.a.title(r,{items:a}),rootTitle:this.getRootTitle(r),machineIdentifier:r.server.id,
clientIdentifier:this.device.get("clientIdentifier"),Location:{uri:l.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 d.a({model:this.tempModel,isSync:!0,isCloudSync:this.device.get("isCloudSync")})),
this.qualityRegion.show(new p.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(a.a.bind(function(){if(this.model){var e=this.model.get("version")||0,t=a.a.omit(this.tempModel.toJSON(),"children");t.version=e+1,this.model.set(this.model.parse(t))}},this)),n=n.then(a.a.bind(function(){
return s.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){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"VersionGeneratorMediaSettingsModel",context:["server"],syncedAttrs:{videoQuality:{type:r.a.integer,save:!0},videoResolution:{type:r.a.string,save:!0},maxVideoBitrate:{
type:r.a.integer,save:!0},audioBoost:{type:r.a.integer,save:!0},subtitleSize:{type:r.a.integer,save:!0},musicBitrate:{type:r.a.integer,save:!0},photoQuality:{type:r.a.integer,save:!0},photoResolution:{type:r.a.string,save:!0}}});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(19),o=n(17),s=n(16),l=n(310),c=n(65),u=n(121),d=n(1664),p=o.a.extend({mixins:[l.a],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",url:function(){
var e=a.join([r.a.result(this.generator,"url"),"items"]);return this.getPaginatedUrl(e)},sessionAttrs:{currentPageStart:s.a.integer,currentPageSize:s.a.integer,populatedRange:s.a.object},syncedAttrs:{totalSize:s.a.integer,identifier:s.a.string,mediaTagPrefix:s.a.string,mediaTagVersion:s.a.string,viewGroup:s.a.string,title:s.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(u.b)(e):e}});t.a=p},function(e,t,n){"use strict";var i=n(24),r=n(1665),a=i.a.extend({name:"VersionGeneratorMetadataCollection",context:["server","generator"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(17),o=n(16),s=n(92),l=a.a.extend({name:"VersionGeneratorMetadataModel",context:["server","generator"],
idAttribute:"ratingKey",syncedAttrs:r.a.extend({},s.a.prototype.syncedAttrs,{processingState:o.a.string,processingStateContext:o.a.string})});t.a=l},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"VersionGeneratorPolicyModel",context:["server"],syncedAttrs:{scope:{type:r.a.string,save:!0},value:{type:r.a.integer,save:!0},unwatched:{type:r.a.boolean,save:!0}},defaults:{unwatched:!1}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({
name:"VersionGeneratorStatusModel",context:["server"],syncedAttrs:{state:r.a.string,failureCode:r.a.string,failure:r.a.string,itemsCount:r.a.integer,itemsCompleteCount:r.a.integer,itemsSuccessfulCount:r.a.integer,itemsFailedCount:r.a.integer,itemsDisabledCount:r.a.integer,totalSize:r.a.integer}});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){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(4)).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(4)).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(4)).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(4)).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(33)).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(4)).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(4)).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(21),r=n(15),a=n(948),o=n(1670),s=n(1671),l=n(141),c=n(26),u=n(1672),d=n.n(u),p=i.a.ItemView.extend({className:"sync-quality-container form-group",template:d.a,events:{
"change select[name=videoQuality]":"onVideoQualityChange","change select[name=musicQuality]":"onMusicQualityChange","change select[name=photoQuality]":"onPhotoQualityChange"},initialize:function(e){var t=Object(r.c)("appModel").get("settings");this.mediaSettings=this.model.get("mediaSettings"),this.mediaSettings.has("audioBoost")||this.mediaSettings.set("audioBoost",t.get("audioBoost")),this.mediaSettings.has("subtitleSize")||this.mediaSettings.set("subtitleSize",t.get("subtitleSize")),
this.initVideoQuality(),this.initMusicQuality(),this.initPhotoQuality()},initVideoQuality:function(){this.availableVideoQualities=l.a.getAvailableQualities({lowestQualityIndex:a.a}).reverse();var e=Object(r.c)("appModel").get("settings"),t=this.mediaSettings.get("maxVideoBitrate"),n=t?l.a.getNearestIndexToBitrate(t):e.get(l.a.getSyncQualityAttribute());this.updateVideoQuality(l.a.getQualityByIndex(n))},initMusicQuality:function(){this.availableMusicQualities=o.a.getAvailableQualities().reverse()
;var e=Object(r.c)("appModel").get("settings"),t=this.mediaSettings.get("musicBitrate"),n=t?o.a.getNearestIndexToBitrate(t):e.get(o.a.getSyncQualityAttribute());this.updateMusicQuality(o.a.getQualityByIndex(n))},initPhotoQuality:function(){this.availablePhotoQualities=s.a.getAvailableQualities().reverse();var e=Object(r.c)("appModel").get("settings"),t=this.mediaSettings.get("photoQuality"),n=t?s.a.getNearestIndexToQuality(t):e.get(s.a.getSyncQualityAttribute())
;this.updatePhotoQuality(s.a.getQualityByIndex(n))},serializeData:function(){return{typeElement:Object(c.q)(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(r.c)("appModel").get("settings").save(e.getSyncQualityAttribute(),n),e.getQualityByIndex(n)},onVideoQualityChange:function(e){var t=this.saveQualityIndex(l.a,e.currentTarget.value);this.updateVideoQuality(t)},onMusicQualityChange:function(e){var t=this.saveQualityIndex(o.a,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(s.a,e.currentTarget.value)
;this.updatePhotoQuality(t)}});t.a=p},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(518),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(7),r=n.n(i),a=n(518),o=n(3),s=r.a.extend({},a.a,{type:"photo",qualities:{photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){
return[Object(o.default)("Low"),Object(o.default)("Medium"),Object(o.default)("High"),Object(o.default)("Highest")]}},getNearestIndexToQuality:function(e){return this.getNearestIndex(this.qualities.photoQuality,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){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(33)).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(4)).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(33)).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(442)).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(33)).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(1675)).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(33)).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(33)).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(33)).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(33)).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(4)).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===r.a.CONVERT_AUTOMATICALLY)return Object(a.default)("Convert Automatically");if(e.index===r.a.ORIGINAL)return Object(a.default)("Original");var t=e.bitrate||e.maxVideoBitrate,n=e.videoResolution
;if(!t&&!n)return Object(a.default)("Unknown");var i=[];if(t&&i.push(Object(s.default)(t)),n&&(!t||t>=1e3)){var l=r.a.getResolutionFromSize(n);i.push(Object(o.default)(l))}var c=i.join(", ");return e.description?c+" "+e.description:c}Object.defineProperty(t,"__esModule",{value:!0});var r=n(141),a=n(3),o=n(369),s=n(443);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(1676).default,r=n(189);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(951)},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(4)).call(e,"Sync",{hash:{},data:t}))}function l(e,t){return d(i(n(4)).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(4)).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(4)).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(21),r=n(161),a=n(1679),o=n.n(a),s=i.a.ItemView.extend({className:"modal-body",template:o.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),Object(r.a)("syncedContent",{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(4)).call(t,"This media is being synced.",{hash:{},data:o
}))+"</h4> <h4>"+l(i(n(4)).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){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(4)).call(t,"Sync",{hash:{},data:o}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){"use strict";function i(e){
var t=Object(s.c)("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 c.a({model:i,isEditing:!0,isEditWarning:!0});return r.promise.always(function(e){e||o.a.trigger("show:modal",new l.a({type:"home"}))}),o.a.trigger("show:modal",r),r.promise}var r=n(13),a=n.n(r),o=n(18),s=n(15),l=n(952),c=n(444);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=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(4)).call(t,"Welcome to Plex Home",{hash:{},data:o
}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+l(i(n(4)).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(4)).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(4)).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(4)).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(4)).call(t,"OK",{hash:{},data:o}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(264),r=n(1684),a=n.n(r),o=i.a.extend({className:"user-select-alert-bar",template:a.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"
;var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(47),c=n(18),u=n(15),d=n(40),p=n(3),h=n(952),f=n(953),v=n(1689),g=n.n(v),m=a.a.Layout.extend({className:"user-select-modal-pin-container",template:g.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.c("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"),c.a.trigger("show:alert",{type:"error",message:Object(p.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"),c.a.trigger("show:alert",{type:"error",message:Object(p.default)("This PIN could not be removed.")})}))}},savePIN:function(e){this.ui.loading.removeClass("hidden");var t={pin:e};this.currentPin&&(t.currentPin=this.currentPin);var n=this.model.save(t,{wait:!0});return n.done(s.a.bind(function(){this.model.unset("pin"),
this.model.unset("currentPin"),this.model.set("protected",!!e),this.model.id===this.user.id&&(e?this.user.set("pin",this.user.hashPIN(e)):this.user.unset("pin"),this.user.set("home",this.user.hasHome())),this.trigger("resolve",e),e&&this.user.get("homeUsers").length<2&&c.a.trigger("show:modal",new h.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=d.a.execute("switchUser",{
homeUser:this.model,pin:e,allowGuestLock:!this.isEditing});t.done(s.a.bind(function(){this.isEditing?(this.isEditConfirmation=!1,this.currentPin=e,this.render()):this.trigger("resolve",e)},this)),t.fail(this.whenRendered(function(){this.ui.digitContainer.addClass("shake"),this.ui.input.val(""),this.focusInput()})),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},renderPIN:function(){var e=this.getPIN(),t=e.length,n=this.isEditing&&!this.isEditConfirmation
;this.ui.digits.each(function(i,a){var o=e[i]||"";o&&!n&&(o="&bull;"),r()(a).toggleClass("current",i===t).html(o)})},onRender:function(){this.userList.show(new f.a({model:this.model,disabled:!0})),this.ui.pinForgotLink.toggleClass("hidden",this.model.get("restricted")),l.a.mobile||setTimeout(s.a.bind(this.focusInput,this),this.focusDelay)},onKeyDown:function(e){var t=e.which;if(13!==t&&8!==t&&46!==t&&229!==t){var n=t>=48&&t<=57,i=t>=96&&t<=105;n||i||e.preventDefault()}},onInput:function(e){
var t=r()(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){
r()(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 c.a.trigger("show:alert",{type:"error",message:Object(p.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){"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(7),a=n.n(r);t.a=i},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){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(4)).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(4)).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function d(e,t){var r=""
;return r+=" "+b(i(n(4)).call(e,"Enter PIN",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=' <p class="help-block"> '+b(i(n(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(15),s=n(40),l=n(925),c=n(307),u=n(174),d=n(1691),p=n(1692),h=n.n(p),f=i.a.Layout.extend({className:"user-select-modal-users-container",template:h.a,ui:{loading:".loading"},regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],initialize:function(e){var t=o.c("appModel");this.user=t.get("user"),this.homeUsers=this.user.get("homeUsers"),
this.user.server.populate().done(a.a.bind(this.onUserPopulated,this)).fail(a.a.bind(this.onError,this))},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new d.a({collection:e})),this.listenTo(this.body.currentView,"itemview:selectUser",this.onUserSelect)},selectUser:function(e){this.ui.loading.removeClass("hidden");var t=s.a.execute("switchUser",{homeUser:e,switchUser:!0,allowGuestLock:!0});t.done(a.a.bind(function(){this.trigger("resolve")},this)),
t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(a.a.bind(this.onHomeUsersPopulated,this)).fail(a.a.bind(this.onError,this))},onHomeUsersPopulated:function(e){s.a.execute("lockUser").always(a.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 l.a([t],{server:this.user.server,parent:this.user}))}else this.user.set("lockState",c.a.lockStates.UNLOCKED),this.trigger("resolve")},onUserSelect:function(e,t){t.get("protected")?this.trigger("change:pane","pin",{model:t,showBackButton:!0,focusDelay:0}):this.selectUser(t)}});t.a=f},function(e,t,n){"use strict";var i=n(86),r=n(953),a=i.a.extend({tagName:"ul",
className:"tile-list user-select-list",itemView:r.a});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){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(4)).call(t,"Select User",{hash:{},data:o}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></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="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){"use strict";function i(e){var t=e.syncItem,n=e.server;if(!t.server.get("connected"))return s.a.trigger("show:alert",{type:"error",message:Object(c.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){s.a.trigger("show:alert",{type:"error",message:Object(c.default)("There was a problem removing this sync item.")})}),e.always(function(){i.hide()}),e});return a=a.then(function(){return l.a.execute("refreshSyncLists",{server:n,silent:!0,skipContent:!0})})}function r(){var e=new u.a({title:Object(c.default)("Stop Syncing"),
message:Object(c.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(c.default)("Remove"),cancelLabel:Object(c.default)("Cancel"),async:!0,hasDanger:!0});return s.a.trigger("show:modal",e),e}var a=n(13),o=n.n(a),s=n(18),l=n(40),c=n(3),u=n(61);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.server,n=s.a.extend(t.getXHROptions("/sync/refreshSynclists"),{type:"PUT"}),i=a.a.ajax(n)
;return e.skipContent||(i=i.then(function(e){var n=s.a.extend(t.getXHROptions("/sync/refreshContent"),{type:"PUT"});return a.a.ajax(n)})),i.done(function(){e.silent||l.a.trigger("show:alert",{type:"success",message:Object(c.default)("Synced items were refreshed.")})}),i.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(3);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var e=i.destroy({wait:!0});return e.fail(function(){r.a.trigger("show:alert",{type:"error",
message:Object(a.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(a.default)("Deleting the Cloud Sync entry will stop Plex from being able to access any existing Cloud Sync content. You will need to create and upload new sync items."):Object(a.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(a.default)("Remove Device"),message:n,confirmLabel:Object(a.default)("Remove"),cancelLabel:Object(a.default)("Cancel"),async:!0,hasDanger:!0}),l=s.promise;return l=l.then(function(){return t()}),r.a.trigger("show:modal",s),l}var r=n(18),a=n(3),o=n(61);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=o.c("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})&&a.a.trigger("discover:servers")}),e.fail(function(){i&&n.set("home",!0),a.a.trigger("show:alert",{type:"error",message:Object(l.default)("There was a problem removing this friend.")})}),e.always(function(){s.hide()}),e.promise()}var n=e.friend,i=n.get("home"),s=r(e),c=s.promise;return c=c.then(function(){return t()}),a.a.trigger("show:modal",s),c}
function r(e){var t=e.friend,n=t.get("serverShares"),i=n.getLibraryCount({owned:!0}),r=n.getLibraryCount({owned:!1}),a=i+r,u=t.get("title"),d=Object(l.default)("Are you sure you want to remove {1}?",u),p=Object(s.a)(Object(l.default)("library"),a,Object(l.default)("libraries"))
;if(i&&r?d+=" "+Object(l.default)("You are sharing {1} {2} with each other.",a,p):i?d+=" "+Object(l.default)("You are sharing {1} {2} with this friend.",i,p):r&&(d+=" "+Object(l.default)("This friend is sharing {1} {2} with you.",r,p)),t.get("home")){var h=o.c("appModel"),f=h.get("user");f.get("homeUsers").get(f.id).get("admin")?d+=" "+Object(l.default)("This friend will be removed from your home."):d+=" "+Object(l.default)("You will be leaving your home.")}return new c.a({
title:Object(l.default)("Remove Friend"),message:d,confirmLabel:Object(l.default)("Remove"),cancelLabel:Object(l.default)("Cancel"),async:!0,hasDanger:!0})}var a=n(18),o=n(15),s=n(521),l=n(3),c=n(61);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")&&u.a.trigger("discover:servers"),v.resolve()}),
e.fail(function(e){u.a.trigger("show:alert",{type:"error",message:Object(p.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=d.c("appModel"),h=l.get("user"),f=h.get("homeUsers"),v=s.a.Deferred();c.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 s.a.Deferred().resolve().promise();var t
;t=e.homeUsers.length>1?e.signedInHomeUser.get("admin")?Object(p.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(p.default)("Are you sure you want to join this home? You will leave your current home."):Object(p.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(p.default)("Join Home"),message:t,confirmLabel:Object(p.default)("Join"),cancelLabel:Object(p.default)("Cancel"),hasDanger:!0});return u.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 u.a.trigger("show:modal",t),t.promise}return s.a.Deferred().resolve().promise()}var o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(18),d=n(15),p=n(3),h=n(61),f=n(444)
;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")){s.c("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),l=i.promise;return l=l.then(function(){return t()}),o.a.trigger("show:modal",i),l}function r(e){var t,n;return"requests"===e.subset?(t=Object(l.default)("Reject Invite"),
n=Object(l.default)("Are you sure you want to reject this invite?")):(t=Object(l.default)("Cancel Invite"),n=Object(l.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(l.default)("There was a problem rejecting this invite."):Object(l.default)("There was a problem canceling this invite."),o.a.trigger("show:alert",{type:"error",message:t})}var o=n(18),s=n(15),l=n(3),c=n(61);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 s.a.Deferred().resolve().promise();t=i.get("allLibraries")?[]:c.a.pluck(c.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=c.a.extend(n.server.getXHROptions(l),{
type:i.isNew()?"POST":"PUT",contentType:"application/json",data:a()(o)});return s.a.ajax(u).promise()}var r=n(173),a=n.n(r),o=n(13),s=n.n(o),l=n(7),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=a.c("appModel"),t=e.get("user");t.get("desktop").get("friends").fetch(),t.get("desktop").get("invites").fetch(),r.a.trigger("discover:servers")}),e.fail(function(){var e
;e=l.get("owned")?Object(o.default)("There was a problem removing this share."):Object(o.default)("There was a problem leaving this server."),r.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(o.default)("Stop Sharing"),i=Object(o.default)("Are you sure you want to stop sharing with this friend?")):(n=Object(o.default)("Leave Server"),
i=Object(o.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()}),r.a.trigger("show:modal",c),u}var r=n(18),a=n(15),o=n(3),s=n(61);t.a=i},function(e,t,n){"use strict";function i(e){function t(){var t=c.a.extend(n.server.getXHROptions(n.url()),{type:"DELETE"}),i=s.a.ajax(t);return i.done(function(){var e=p.get(n.id);e?(n.trigger("destroy",n,l),
n.get("restricted")?e.trigger("destroy",e,p):e.set("home",!1)):(l.reset([n]),n.set("admin",!0),p.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=d.c("appModel"),o=i.get("user"),l=o.get("homeUsers"),p=o.get("desktop").get("friends"),h=r(e),f=h.promise;return f=f.then(function(){return t()}),u.a.trigger("show:modal",h),f}function r(e){
var t,n,i,r=e.homeUser;return e.isSignedInUser?(t=Object(p.default)("Leave Home"),i=Object(p.default)("Leave"),n=r.get("admin")?Object(p.default)("You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted."):Object(p.default)("Are you sure you want to leave this home?")):(t=Object(p.default)("Remove User"),i=Object(p.default)("Remove"),
n=r.get("restricted")?Object(p.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(p.default)("You will no longer be able to switch to this user.")),new h.a({title:t,message:n,confirmLabel:i,cancelLabel:Object(p.default)("Cancel"),async:!0,hasDanger:!0})}function a(e){var t
;t=e.isSignedInUser?Object(p.default)("There was a problem leaving this home."):Object(p.default)("There was a problem removing this user."),u.a.trigger("show:alert",{type:"error",message:t})}var o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(18),d=n(15),p=n(3),h=n(61);t.a=i},function(e,t,n){"use strict";function i(e){var t=a.a.Deferred(),n="/api/users/validate?invited_email="+encodeURIComponent(e.username),i=s.a.extend(e.server.getXHROptions(n),{type:"POST"}),r=a.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(13),a=n.n(r),o=n(7),s=n.n(o),l=n(91);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()||s.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(c.default)("Unable to enable guest account"):Object(c.default)("Unable to disable guest account")),o.a.trigger("show:alert",{type:"error",message:i})}),r}var r=n(7),a=n.n(r),o=n(18),s=n(40),l=n(91),c=n(3);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.c("appModel"),n=t.get("user");if(!!n.get("features").get(p.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 d.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 u.a.execute("authenticateWithServer",{homeUser:e})}function o(e){var t=l.a.Deferred(),n=c.c("appModel"),i=n.get("user");return i.clearAccessToken().always(function(){i.signIn(e).always(function(){
t.resolve()})}),t.promise()}var s=n(13),l=n.n(s),c=n(15),u=n(40),d=n(664),p=n(81);t.a=i},function(e,t,n){"use strict";function i(){Object(s.c)("metrics").trackEvent({event:"client:signout",interaction:!0});var e=c.a.get("allowSSO");return l.a.execute("resetUser").then(function(){return u.a.restoreDefaults(),u.a.save()}).then(function(){if(e){return Object(s.c)("appModel").set({isSigningOut:!0}),Object(d.a)(),o.a.trigger("navigate","login"),a.a.Deferred().reject().promise()}
o.a.trigger("reset:servers"),o.a.trigger("reset:providers")})}var r=n(13),a=n.n(r),o=n(18),s=n(15),l=n(40),c=n(57),u=n(174),d=n(35);t.a=i},function(e,t,n){"use strict";function i(){var e=a.a.Deferred();return Object(o.c)("appModel").get("user").get("isLocked")?e.reject():e.resolve(),e.promise()}var r=n(13),a=n.n(r),o=n(15);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(a.a)();return e.done(function(){Object(r.c)("serverUpdateManager").start()}),e}t.a=i;var r=n(15),a=n(1709)
},function(e,t,n){"use strict";function i(){Object(f.a)("[Servers] Resetting...");var e=Object(v.c)("appStore"),t=Object(v.c)("appModel"),n=t.get("servers");Object(v.c)("serverManager").stop(),Object(v.c)("primaryServerManager").stop(),Object(v.c)("manualServerManager").stop(),Object(v.c)("serverConnectionManager").stop(),Object(v.c)("serverConnectionTestManager").reset(),Object(v.c)("companionServerManager").stop(),n.uninitialize(),n.reset(),n.initialize(),t.unset("primaryServer"),
t.unset("companionServer"),t.unset("transientServer"),e.dispatch(Object(b.g)({budget:1/0})),r()}function r(){Object(f.a)("[Servers] Initializing..."),a(),o(),s(),l(),c(),Object(v.c)("serverManager").start(),Object(v.c)("primaryServerManager").start(),Object(v.c)("manualServerManager").start(),Object(v.c)("serverConnectionManager").start(),Object(v.c)("companionServerManager").start(),Object(f.a)("[Servers] Finished initialization")}function a(){
var e=Object(v.c)("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.c)("appModel"),n=t.get("servers"),i=y.a.getActiveServers();i&&i.each(function(e){if(e.get("connections").length)try{var i=new m.c(e.toJSON(),{parent:t});n.add(i)}catch(e){f.a.warn(e)}})}function s(){var e=Object(v.c)("appModel"),t=e.get("servers"),n=g.a.get("primaryServer");if(n){
var i=new m.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.c)("appModel"),t=e.get("servers"),n=new m.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.c)("appModel"),t=e.get("servers"),n=new m.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(13),p=n.n(d),h=n(18),f=n(29),v=n(15),g=n(57),m=n(108),y=n(174),b=n(203)},function(e,t,n){"use strict";function i(){var e=Object(a.c)("appModel")
;return Object(r.a)(Object(o.a)(),e.get("experienceSettings").populate(),e.get("deviceSettings").populate())}t.a=i;var r=n(305),a=n(15),o=n(1711)},function(e,t,n){"use strict";function i(){var e=Object(o.c)("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(13),a=n.n(r),o=n(15),s=n(509),l=n(174)},function(e,t,n){"use strict";function i(){
var e=s.a.Deferred(),t=d.a.get("myPlexAccessToken");return t.done(function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken||u.a.register(d.a.getInstance())}),t.always(function(){e.resolve()}),e.promise()}function r(){var e=s.a.Deferred(),t=u.a.set(v,1);return t.done(function(){u.a.remove(v),e.resolve()}),t.fail(function(t){var n=new c.a;l.a.warn("Storage module swapped for "+n.name+' due to exception: "'+t+'"'),d.a.register(n),u.a.register(n,{ignorePrevious:!0}),e.resolve()}),e.promise()}
function a(){return i().then(r).then(f.a).then(h.a).then(p.a)}t.a=a;var o=n(13),s=n.n(o),l=n(29),c=n(1713),u=n(202),d=n(517),p=n(1714),h=n(1715),f=n(1716),v="plexTestToken"},function(e,t,n){"use strict";var i=n(683),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=a.a.populate().then(function(){var e=a.a.get("users"),t=!1;if(e.each(function(e){e.get("servers").each(function(e){"Plex Cloud"!==e.get("friendlyName")||e.get("platform")||(e.set("platform","Cloud"),t=!0)})}),t)return a.a.save()});return Object(r.a)(e)}t.a=i;var r=n(159),a=n(174)},function(e,t,n){"use strict";function i(){
var e=Object(l.c)("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!==c.a.ALWAYS){var l=t.save("subtitlesBurnLevel",i);l=l.then(function(){return n.save("subtitlesBurnLevel",void 0)}),o.push(l)}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(s.a)(o)})
;return Object(o.a)(i)}var r=n(7),a=n.n(r),o=n(159),s=n(305),l=n(15),c=n(373);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(p.c)("appModel"),t=e.get("experienceSettings"),n=e.get("settings"),i=n.populate().then(function(){var e=c.a.result(t,"defaults"),i=n.get("extrasPrefixCount"),r=n.get("localQuality"),o=n.get("remoteQuality"),l=h.a.get("resumePlayQueue"),u=[];if(null!=i&&i!==e.extrasPrefixCount){var p=t.save("extrasPrefixCount",i);p=p.then(function(){
return n.save("extrasPrefixCount",void 0)}),u.push(p)}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 s.a.Deferred().reject().promise();var r=i.reduce(function(e,t){
var i=n[t],r=Object(g.a)(m.m,i.serverID),a=Object(g.a)(m.k,v.d,r);return e[t]={serverEntityID:r,providerEntityID:a,playQueueID:i.playQueueID,playQueueType:f.a,playQueueRepeat:!1,playQueueOffset:Math.floor(i.position/1e3)},e},{});return t.save("restorePlayQueue",r)}).then(function(){return h.a.remove("resumePlayQueue")})),Object(d.a)(u)});return Object(u.a)(i)}var r=n(53),a=n.n(r),o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(159),d=n(305),p=n(15),h=n(202),f=n(239),v=n(41),g=n(38),m=n(43);t.a=i
},function(e,t,n){"use strict";function i(){var e=Object(r.c)("appModel").get("user"),t=Object(a.a)();return t.done(function(){new s.a(e).start(),(new o.a).start()}),t}t.a=i;var r=n(15),a=n(1718),o=n(1719),s=n(1722)},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.c)("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(13),a=n.n(r),o=n(15),s=n(202),l=n(174)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(75),o=n(18),s=n(94),l=n(15),c=n(1720),u=a.a.extend({mixins:s.a,announcementsUpdateDelay:36e5,initialize:function(){this.user=Object(l.c)("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&&o.a.trigger("show:bar","alertbar",new c.a({model:t}))}}});t.a=u},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(956),o=n(264),s=n(1721),l=n.n(s),c=o.a.extend({className:"alert-bar notify",template:l.a,events:r.a.extend({"click .info-link":"onInfoClick"},o.a.prototype.events),initialize:function(){
this.listenTo(this.model,"change:read",this.hide)},serializeData:function(){var e=this.model.get("content");return{content:Object(a.a)(e),url:this.model.get("url")}},onInfoClick:function(e){this.hide(),this.model.markAsRead()},onCloseClick:function(e){o.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(4)).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";var i=n(6),r=n.n(i),a=n(13),o=n.n(a),s=n(18),l=n(1723),c=n(265),u=n(3),d=n(204),p=n(61),h=n(444),f=l.a.prototype,v=l.a.extend({collectionNames:["homeDetails","homeUsers"],flexCollectionNames:["devices","friends","invites","socialNetworks"],populateActions:[c.c,d.i],handleInvalidToken:function(){var e=new p.a({title:Object(u.default)("Invalid Credentials"),
message:Object(u.default)("Your credentials have expired. Please sign in again."),confirmLabel:Object(u.default)("OK"),cancelLabel:Object(u.default)("Ignore")});e.promise.done(function(){s.a.trigger("navigate","login",{silent:!0})}),s.a.trigger("show:modal",e)},onIsSignedInChange:function(e,t){if(f.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){
f.onIsLockedChange.apply(this,arguments),t&&s.a.trigger("show:modal",new h.a({isForced:!0}))},onIsUnlockedChange:function(){}});t.a=v},function(e,t,n){"use strict";var i=n(75),r=n(18),a=(n(36),n(29)),o=n(94),s=n(15),l=n(307),c=n(174),u=n(365),d=i.a.extend({mixins:o.a,collectionNames:[],flexCollectionNames:[],populateActions:[],initialize:function(e){this.user=e,this.debouncedChangeTimeout=null},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(u.a)(i)+"Change"];n["change:"+i]=a,r&&a.call(e,t,r)}),this.listenTo(t,n);var i=Object(s.c)("appModel").get("settings"),r=i.get("autoLogin")||t.get("isUnlocked");Object(a.a)("[UserManager] autoLogin",r),r||this._lockIfInHome()},handleInvalidToken:function(){},_lockIfInHome:function(){var e=c.a.getActiveUser();e&&e.get("home")&&this.user.set("lockState",l.a.lockStates.LOCKED)},
_updateUser:function(e,t){if(t)t.copyFromUser(e);else{c.a.get("users").add(e.toJSON(),{parse:!0})}c.a.debouncedSave()},onHasInvalidTokenChange:function(e,t){t&&this.handleInvalidToken()},onIsUnlockedChange:function(e,t){},onUserChange:function(e){if(this.user.get("isSignedIn")){this.debouncedChangeTimeout&&clearTimeout(this.debouncedChangeTimeout);var t=c.a.getActiveUser();this.debouncedChangeTimeout=setTimeout(this._updateUser.bind(this,e,t),0)}},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},i=e.get("features");i.abortPendingPopulate(),i.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 r=Object(s.c)("appStore").dispatch
;this.populateActions.forEach(function(e){return r(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";r.a.trigger(t)},0))}});t.a=d
},function(e,t,n){"use strict";function i(e){return Object(r.a)(Object(a.a)(e).join("_"))}var r=n(684),a=n(1725);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";function i(e,t){var n={};for(var i in t)e.hasAttr(i)&&(n[i]=e.get(i));return n}function r(e){var t=e.directoryKey,n=e.hubModel,r=n.get("hubIdentifier"),a=Object(l.a)(r),u=a===r?t:"/hubs";return new s.d(o()({},i(n,s.a),{
provider:o()({},i(n.provider,s.b)),server:o()({},i(n.server,s.c)),hubIdentifier:a,id:c.b(n),directoryKey:u}))}t.a=r;var a=n(6),o=n.n(a),s=n(958),l=n(959),c=n(686)},function(e,t,n){"use strict";function i(e){var t=e.get("experienceSettings");t.get("homeSettings").set("settingsKey",Object(r.a)()),t.save()}t.a=i;var r=n(429)},function(e,t,n){"use strict";function i(e,t){var n=e.server,i=n.getXHROptions(c.a.result(e,"url"),{method:"POST",dataType:"json",data:s.a.stringify({urls:t},{
arrayFormat:"brackets"})||"urls="});return Object(u.a)(a.a.ajax(i),400).then(function(t){e.reset(t)},function(e){return a.a.Deferred().reject(e.status&&e.responseJSON.errors||[]).promise()})}var r=n(13),a=n.n(r),o=n(643),s=n.n(o),l=n(7),c=n.n(l),u=n(445);t.a=i},function(e,t,n){"use strict";function i(){var e=Object(p.a)(window.location.href),t=e.hashParams,n=s.a.parse(t.substr(1)),i=Object(l.a)(n.pinID);if(i){var r=Object(c.c)("appModel");Object(h.a)(r).set({pinIDInitial:i}),Object(u.a)(),
window.history.replaceState(null,null,Object(d.a)(window.location.href,"pinID"))}return a.a.Deferred().resolve().promise()}var r=n(13),a=n.n(r),o=n(643),s=n.n(o),l=n(364),c=n(15),u=n(35),d=n(1730),p=n(960),h=n(522);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(205);t.a=i},function(e,t,n){"use strict";function i(){
var e=Object(a.c)("fullscreenManager").initialize({dispatchEnterFullscreen:function(){Object(a.c)("appStore").dispatch(Object(o.d)())},dispatchExitFullscreen:function(){Object(a.c)("appStore").dispatch(Object(o.e)())}});return Object(r.a)(e)}t.a=i;var r=n(159),a=n(15),o=n(68)},function(e,t,n){"use strict";function i(e){a.a.flushDebouncedSave(),r.a.set("main.webMode",e)}t.a=i;var r=n(202),a=n(174)},function(e,t,n){"use strict";function i(){var e=Object(o.a)(window.location.href,"http:")
;a.a.get("allowSSO")?window.location=r.join(e,{secure:0},{parseParams:!0,recognizeHash:!0}):window.location=e}var r=n(19),a=n(57),o=n(924);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(47),o=n(15),s=n(76),l=n(30),c=n(446),u=n(1735),d=n(1741),p=n(85),h=n(1771),f=n.n(h),v={osx:"mac"},g=p.a.extend({mixins:[c.a],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",template:f.a,ui:{downloadBtn:".download-btn",paneTabs:".show-pane-btn",
loading:".server-download-loading"},regions:{paneRegion:".pane-region"},events:r.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=o.c("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide()}),this.downloadType=e.downloadType
;var i=new u.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")}),o.c("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:d.a},e},{});var e=a.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");o.c("metrics").trackClick({page:l.y,firstRun:!0,action:s.p,platform:this.downloadType,os:t}),this.hide()}});t.a=g},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(19),o=n(24),s=n(1736),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(17),r=n(16),a=n(1737),o=i.a.extend({name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",idAttribute:"name",syncedAttrs:{name:r.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(24),r=n(1738),a=i.a.extend({name:"DownloadServerPlatformCollection",
context:["server","type"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),o=n.n(a),s=n(17),l=n(16),c=n(1739),u=s.a.extend({name:"DownloadServerPlatformModel",context:["server","type"],rootPropertyName:"Platform",idAttribute:"id",syncedAttrs:{id:l.a.string,name:l.a.string,version:l.a.string,date:l.a.integer,requirements:l.a.string,fixed:l.a.string,added:l.a.string,info:l.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(24),r=n(1740),a=i.a.extend({name:"DownloadServerReleaseCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({
name:"DownloadServerReleaseModel",context:["server"],modelId:function(){return this.get("build")+"-"+this.get("distro")},syncedAttrs:{label:r.a.string,build:r.a.string,distro:r.a.string,url:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(21),o=n(523),s=n(1770),l=n.n(s),c=a.a.ItemView.extend({template:l.a,className:"download-server-pane",serializeData:function(){var e=this.model.toJSON(),t=!Object(o.c)()&&!Object(o.d)(),n=!t&&"_self";return r()({},e,{target:n,
shouldUseDownload:t,shouldUseDropup:e.releases.length>1})}});t.a=c},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a,t=e.platformID;return"linuxkonvergo"===t||"osxkonvergo"===t||"windowskonvergo"===t}t.a=i;var r=n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(524)},function(e,t,n){"use strict";n(47)
},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47),n(963),n(964)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(524)},function(e,t,n){"use strict";n(524)},function(e,t,n){"use strict";n(47),n(525),n(690)},function(e,t,n){"use strict";n(47),n(526),n(690)},function(e,t,n){"use strict";n(47)},function(e,t,n){
"use strict";n(524)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47),n(691),n(692)},function(e,t,n){"use strict";n(47),n(691),n(693)},function(e,t,n){"use strict";n(47),n(693),n(694)},function(e,t,n){"use strict";n(47),n(692),n(694)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},function(e,t,n){"use strict";n(47)},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>"+m(i(n(4)).call(e,"Requirements",{hash:{},data:t}))+": ",r=e&&e.requirements,r=typeof r===y?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===y?n.apply(e):n,(n||0===n)&&(i+=n),i+="</p>"}function c(e,t,a){var o,s=""
;return s+=' <div class="btn-group dropup download-server-btn-group"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '+m(i(n(4)).call(e,"Download",{hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',o=r.each.call(e,e&&e.releases,{hash:{},inverse:b.noop,fn:b.programWithDepth(6,u,t,e,a),data:t}),(o||0===o)&&(s+=o),s+=" </ul> </div> "}function u(e,t,n,i){var a,o=""
;return o+=' <li><a href="'+m((a=e&&e.url,typeof a===y?a.apply(e):a))+'" ',a=r.if.call(e,i&&i.shouldUseDownload,{hash:{},inverse:b.noop,fn:b.program(7,d,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,i&&i.target,{hash:{},inverse:b.noop,fn:b.programWithDepth(9,p,t,n),data:t}),(a||0===a)&&(o+=a),o+=' class="download-btn">'+m((a=e&&e.label,typeof a===y?a.apply(e):a))+"</a></li> "}function d(e,t){return"download"}function p(e,t,n){var i,r="";return r+='target="'+m((i=n&&n.target,
typeof i===y?i.apply(e):i))+'"'}function h(e,t,n){var i,a="";return a+=' <div class="download-server-btn-group"> ',i=r.each.call(e,e&&e.releases,{hash:{},inverse:b.noop,fn:b.programWithDepth(12,f,t,e,n),data:t}),(i||0===i)&&(a+=i),a+=" </div> "}function f(e,t,n,i){var a,o="";return o+=' <a href="'+m((a=e&&e.url,typeof a===y?a.apply(e):a))+'" ',a=r.if.call(e,i&&i.shouldUseDownload,{hash:{},inverse:b.noop,fn:b.program(7,d,t),data:t}),(a||0===a)&&(o+=a),o+=" ",a=r.if.call(e,i&&i.target,{hash:{},
inverse:b.noop,fn:b.programWithDepth(9,p,t,n),data:t}),(a||0===a)&&(o+=a),o+=' class="btn btn-primary download-btn">'+m((a=e&&e.label,typeof a===y?a.apply(e):a))+"</a> "}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="type-'+m((v=t&&t.type,typeof v===y?v.apply(t):v))+" platform-logo platform-"+m((v=t&&t.id,typeof v===y?v.apply(t):v))+'"></div> <h2><strong>'+m((v=t&&t.name,
typeof v===y?v.apply(t):v))+"</strong> "+m(i(n(4)).call(t,"Download",{hash:{},data:o}))+"</h2> <h5>"+m(i(n(4)).call(t,"Version",{hash:{},data:o}))+" "+m((v=t&&t.version,typeof v===y?v.apply(t):v))+"</h5> <h5>"+m(i(n(967)).call(t,t&&t.date,{hash:{},data:o}))+'</h5> <div class="more-info"> ',v=r.if.call(t,t&&t.requirements,{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.info,{hash:{},inverse:b.noop,fn:b.program(3,l,o),data:o}),(v||0===v)&&(g+=v),
g+=" </div> ",v=r.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:b.programWithDepth(11,h,o,t),fn:b.programWithDepth(5,c,o,t),data:o}),(v||0===v)&&(g+=v),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(33)).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(4)).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";function i(){return"ie"===o.a.id&&11===parseInt(o.a.version,10)&&s.a.trigger("show:bar","alertbar",new l.a({})),a.a.Deferred().resolve().promise()}t.a=i
;var r=n(13),a=n.n(r),o=n(47),s=n(18),l=n(1773)},function(e,t,n){"use strict";var i=n(264),r=n(1774),a=n.n(r),o=i.a.extend({className:"alert-bar notify",template:a.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+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+(0,this.escapeExpression)(i(n(4)).call(t,"Internet Explorer 11 will not be supported in a future update. Please upgrade to a modern browser.",{hash:{},data:o}))+"</span> "})},function(e,t,n){"use strict";function i(){function e(e,i,r){if((n||i instanceof window.KeyboardEvent&&"esc"===r)&&("function"!=typeof e.isSupported||e.isSupported()))return t[e.fn](t,i,r)}
var t=Object(c.c)("keyboardShortcuts"),n=!0;return l.a.on("anyModalOpen",function(){n=!1}),l.a.on("allModalsClosed",function(){n=!0}),t.shortcuts.forEach(function(t){s.a.bind(t.keys,e.bind(null,t))}),a.a.Deferred().resolve().promise()}t.a=i;var r=n(13),a=n.n(r),o=n(1776),s=n.n(o),l=n(18),c=n(15)},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(){function e(){function t(){n.removeEventListener("playing",t),n.removeEventListener("error",t),n.src="",n.removeAttribute("src"),Object(s.b)(n)}c.forEach(function(t){document.body.removeEventListener(t,e,!0)});var n=Object(s.a)("audio",!0);n.addEventListener("playing",t),n.addEventListener("error",t),n.src=o.a,n.play()}return Object(l.c)()||Object(l.d)()||c.forEach(function(t){
document.body.addEventListener(t,e,!0)}),a.a.Deferred().resolve().promise()}t.a=i;var r=n(13),a=n.n(r),o=n(1778),s=n(527),l=n(523),c=["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(){return new o.a,a.a.Deferred().resolve().promise()}t.a=i;var r=n(13),a=n.n(r),o=n(1780)},function(e,t,n){"use strict";var i,r=n(90),a=n(29),o=n(1781),s=(i={},i[a.a.LEVEL_LOG]={method:"log",color:"black"},i[a.a.LEVEL_DEBUG]={method:"debug",color:"#d500ff"},i[a.a.LEVEL_INFO]={method:"info",color:"blue"},i[a.a.LEVEL_WARN]={method:"warn",color:"#ff6600"},i[a.a.LEVEL_ERROR]={method:"error",color:"red"},i),l=o.a.extend({name:"ConsoleReporter",
hasSupport:function(){return r.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(173),r=n.n(i),a=n(75),o=n(90),s=n(18),l=n(94),c=a.a.extend({mixins:l.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(s.a,{
"log:message":this.onLog,"log:group":this.onLog,"log:groupCollapsed":this.onLog,"log:groupEnd":this.onLog}),this.onEnabled())},disable:function(){this.enabled&&(this.enabled=!1,this.stopListening(),this.onDisabled())},destroy:function(){this.destroyed||(this.disable(),this.destroyed=!0,this.onDestroyed())},_suspend:function(){this._suspended||(this._suspended=!0,this.onSuspended())},_resume:function(){this._suspended&&(this._suspended=!1,this.onResumed())},onLog:function(e){
if(this._suspended)return void(o.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 new c.a,new h.a,new u.a,new l.a,new p.a,new s.a,new f.a,new d.a,r.c.history.start(),o.a.Deferred().resolve().promise()}t.a=i;var r=n(77),a=n(13),o=n.n(a),s=n(1783),l=n(2393),c=n(2433),u=n(3689),d=n(3879),p=n(3891),h=n(3927),f=n(3954)},function(e,t,n){"use strict";var i=n(267),r=n(1792),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","!/settings/synced-content/:serverID(/:deviceID)":"syncedContent","!/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){e.exports={default:n(1785),__esModule:!0}},function(e,t,n){n(645),n(1786),e.exports=n(106).Array.from},function(e,t,n){"use strict"
;var i=n(635),r=n(150),a=n(427),o=n(1787),s=n(1788),l=n(895),c=n(1789),u=n(968);r(r.S+r.F*!n(1791)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,d,p=a(e),h="function"==typeof this?this:Array,f=arguments.length,v=f>1?arguments[1]:void 0,g=void 0!==v,m=0,y=u(p);if(g&&(v=i(v,f>2?arguments[2]:void 0,2)),void 0==y||h==Array&&s(y))for(t=l(p.length),n=new h(t);t>m;m++)c(n,m,g?v(p[m],m):p[m]);else for(d=y.call(p),n=new h;!(r=d.next()).done;m++)c(n,m,g?o(d,v,[r.value,m],!0):r.value)
;return n.length=m,n}})},function(e,t,n){var i=n(299);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&i(a.call(e)),t}}},function(e,t,n){var i=n(428),r=n(219)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},function(e,t,n){"use strict";var i=n(298),r=n(425);e.exports=function(e,t,n){t in e?i.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){
var i=n(637),r=n(219)("toStringTag"),a="Arguments"==i(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=o(t=Object(e),r))?n:a?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){var i=n(219)("iterator"),r=!1;try{var a=[7][i]();a.return=function(){r=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1
;var n=!1;try{var a=[7],o=a[i]();o.next=function(){return{done:n=!0}},a[i]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(18),o=n(268),s=n(80),l=n(970),c=o.a.extend({activity:function(){var e=this;this.populateView({primaryServer:!0}).done(function(t){var n=t.server;n.get("shared")?e.sync(n.id):e.alerts(n.id)})},alerts:function(e){var t=this.getPopulateOptions(e);this.showAlertsView(t,e)},legacyAlerts:function(e){
var t=this.getPopulateOptions(e);this.showAlertsView(t,e)},showAlertsView:function(e,t){this.populateView(e).done(function(){a.a.trigger("show:view",new l.a({settingsSection:"status",settingsGroup:"alerts",serverID:t}))})},sync:function(e,t){var n=this.getPopulateOptions(e);this.showSyncView(n,e,t)},legacySync:function(e,t){var n=this.getPopulateOptions(e);this.showSyncView(n,e,t)},syncedContent:function(e,t){var n=this.getPopulateOptions(e);this.showSyncView(n,e,t,"syncedContent")},
showSyncView:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"sync",c=this.populateView(r()({},e,{serverID:s.a}));c=c.then(function(){return i.populateView(e)}),c.done(function(){a.a.trigger("show:view",new l.a({settingsSection:"status",settingsGroup:"sync",serverID:t,deviceID:n,routeOrigin:o}))})},conversion:function(e){var t=this.getPopulateOptions(e);this.showConversionView(t,e)},legacyConversion:function(e){var t=this.getPopulateOptions(e)
;this.showConversionView(t,e)},showConversionView:function(e,t){this.populateView(e).done(function(){a.a.trigger("show:view",new l.a({settingsSection:"status",settingsGroup:"conversion",serverID:t}))})},nowPlaying:function(e){var t=this.getPopulateOptions(e);this.showNowPlayingView(t,e)},legacyNowPlaying:function(e){var t=this.getPopulateOptions(e);this.showNowPlayingView(t,e)},showNowPlayingView:function(e,t){this.populateView(e).done(function(){a.a.trigger("show:view",new l.a({
settingsSection:"status",settingsGroup:"now-playing",serverID:t}))})},getPopulateOptions:function(e){return{showLoading:!this.isReload(e)}}});t.a=c},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(13),a=n.n(r);t.a=i},function(e,t,n){e.exports={default:n(1795),__esModule:!0}},function(e,t,n){n(904),e.exports=n(106).Symbol.for},,function(e,t,n){"use strict";var i=n(696),r=n(695),a=n(1798)
;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){e.exports={container:"FullPage-container-17Y0c"}},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(160),o=n(91),s=a.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:o.a.parseXML(e);return t.Account&&(t=t.Account),
o.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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(19),l=n(1802),c=n(1803),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=[o.a.result(this,"url"),"items",e.id],n=s.join(t,e.getSaveParams()),i=o.a.extend(e.server.getXHROptions(n),{type:"PUT"}),a=r.a.ajax(i);return a.then(o.a.bind(function(e){this.set(this.parse(e))},this)),a.promise()}});t.a=u},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(19),l=n(160),c=n(311),u=n(237),d=n(91),p=n(312),h=l.a.extend({idAttribute:"ratingKey",
whitelistedAttrs:["guid","addedAt","composite","duration","key","leafCount","playlistType","ratingKey","smart","summary","title","type","allowSync"],defaults:function(){return{children:new c.default([],{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=p.a.addVersionHeader(2,n);return l.a.prototype.sync.call(this,e,t,i)},parse:function(e){var t=this.convert(e);return t.Playlist&&(t=t.Playlist),d.a.parseInteger(t,["duration","leafCount","addedAt"]),d.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([o.a.result(this,"url"),"/items/",e,"/move"],n),a=o.a.extend(this.server.getXHROptions(i),{type:"PUT"}),l=r.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([o.a.result(this,"url"),"/items/",e]),n=o.a.extend(this.server.getXHROptions(t),{type:"DELETE"
}),i=r.a.ajax(n);i.then(o.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=[o.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=u.a.uri(e,t);var l=s.join(i,a),c=o.a.extend(e.server.getXHROptions(l),{type:n
}),d=r.a.ajax(c);return d.then(o.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(24),a=n(317),o=n(441),s=r.a.extend({name:"VersionGeneratorCollection",context:["server"],model:o.a,url:function(){return i.join(["playlists",this.parent.id,"items"],{type:a.a.LOCAL})}});t.a=s},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(19),c=n(160),u=n(698),d=n(91),p=c.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=o.a.result(this,"url");return this._ajax("GET",e)},convert:function(e){var t=o.a.isObject(e)?e:d.a.parseXML(e);return d.a.parseBoolean(t,"playQueueShuffled"),d.a.parseInteger(t,["playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),d.a.parseArray(t,"Metadata"),t},
parse:function(e,t){o.a.isString(e)&&(e=d.a.replaceXMLElementNames(e,this.metadataElementNames,"Metadata"));var n=this.convert(e);n.id&&(n.playQueueID=n.id);var i=o.a.pick(n,this.whitelistedAttrs);return this.set(i,{silent:!0}),this.pendingChanges=this.changed,this.parseItems(n),i},parseItems:function(e){var t=this.get("collection"),n=e.Metadata,i=!!n.length,r=o.a.pluck(n,"playQueueItemID").indexOf(e.playQueueSelectedItemID),a=e.playQueueSelectedItemOffset,s=a-r;o.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 u.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 r.a.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var n={
after:t||-1},i=l.join([o.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=o.a.extend(this.server.getXHROptions(t),{type:e}),i=r.a.ajax(n);return i.done(o.a.bind(function(e){this.set(this.parse(e)),o.a.isEmpty(this.pendingChanges)||(o.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(1806),r=n(24),a=n(1807),o=r.a.extend({mixins:[i.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(17),a=n(16),o=n(432),s=n(1808),l=r.a.extend({name:"LyricsStreamModel",
context:["server","section"],rootPropertyName:"Lyrics",mergeStrategy:o.a,url:function(){return i.join(this.get("key"),{format:"xml"})},sessionAttrs:{follow:a.a.boolean,lyricsError:a.a.object},syncedAttrs:{id:a.a.integer,key:a.a.string,streamType:a.a.integer,index:a.a.integer,title:a.a.string,selected:a.a.boolean,codec:a.a.string,provider:a.a.string,format:a.a.string,minLines:a.a.integer,timed:a.a.boolean},syncedRelations:{lines:{relationClass:s.a,rootPropertyName:"Line"}},defaults:{follow:!0,
selected:!1,lyricsError:null}});t.a=l},function(e,t,n){"use strict";var i=n(24),r=n(1809),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(17),r=n(16),a=n(1810),o=i.a.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:r.a.integer,endOffset:r.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(24),r=n(1811),a=i.a.extend({name:"LyricsSpanCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"LyricsSpanModel",context:["server","section"],sessionAttrs:{active:r.a.boolean},syncedAttrs:{startOffset:r.a.integer,endOffset:r.a.integer,text:r.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(17),r=n(16),a=i.a.extend({name:"PlayQueueItemModel",context:["server","provider"],syncedAttrs:{url:r.a.string,UrlTemplateFilter:r.a.array},defaults:{UrlTemplateFilter:[]}});t.a=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,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(975);n(700);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(976),s=n(1824),l=n(1825),c=n(1842),u=n(1843),d=n(1844),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"),P=r(t,g,"mapDispatchToProps"),j=r(o,y,"mergeProps");return n(I,p({methodName:"connect",getDisplayName:function(e){
return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:P,initMergeProps:j,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(528),s=(n.n(o),n(981));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(701),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(1829),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(977),l=n(240),c=(i(l),n(979));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(980),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(1834),a=n(1839),o=n(1841),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(983),a=n(1837),o=n(1838),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(1836),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(218))},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(983),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(1840),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(981);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(982),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(1845)},function(e,t,n){"use strict";n(700)},function(e,t,n){"use strict";var i=n(21),r=n(3),a=n(1847),o=n(1850),s=n.n(o),l=i.a.Layout.extend({className:"alerts-container",template:s.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(){this.shared=this.model.get("shared"),this.page=1,this.listCollection=this.collection.clone(this.collection.page(this.page,{reverse:!0})),this.listCollection.stopListening()},serializeData:function(){
var e=this.collection.pages();return{shared:this.shared,page:this.page,pages:e,enablePrevious:this.page>1,enableNext:this.page<e}},updatePages:function(){var e=this.collection.pages();this.ui.pageCount.text(Object(r.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.shared||this.list.append(new a.a({collection:this.listCollection}))},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=l},function(e,t,n){
"use strict";var i=n(86),r=n(1848),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(21),r=n(7),a=n.n(r),o=n(15),s=n(3),l=n(1849),c=n.n(l),u=i.a.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:c.a,serializeData:function(){var e=Object(o.c)("appModel"),t=this.model.toJSON(),n={serverID:this.model.server.id,
serverName:a.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=a.a.escape(t.label),t.value=a.a.escape(t.value),"playing"===t._type&&(t.username=a.a.escape(t.username),t.title=a.a.escape(t.title),t.player=a.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(s.default)("Created");break;case 1:t.stateString=Object(s.default)("Progress for");break;case 2:t.stateString=Object(s.default)("Matching");break;case 3:t.stateString=Object(s.default)("Downloading metadata for");break;case 4:t.stateString=Object(s.default)("Loading metadata for");break;case 5:t.stateString=Object(s.default)("Finished processing");break;case 6:t.stateString=Object(s.default)("Analyzing");break;case 9:t.stateString=Object(s.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"status",{hash:{},inverse:Q.program(6,u,t),fn:Q.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"playing",{hash:{},inverse:Q.program(9,p,t),fn:Q.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"websocket",{hash:{},inverse:Q.program(13,v,t),fn:Q.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:Q.program(11,f,t),fn:Q.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r.state),0,{hash:{},inverse:Q.program(16,m,t),fn:Q.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r.state),5,{hash:{},inverse:Q.program(19,b,t),fn:Q.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r.state),6,{hash:{},inverse:Q.program(22,S,t),fn:Q.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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r.state),9,{hash:{},inverse:Q.program(25,D,t),fn:Q.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+=" "+Y(i(n(4)).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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"status",{hash:{},inverse:Q.program(36,E,t),fn:Q.program(30,P,t),data:t}),r||0===r?r:""}function P(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:Q.program(33,T,t),fn:Q.program(31,j,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function j(e,t){var r,a="";return a+=" "+Y(i(n(4)).call(e,(r=e&&e.event,null==r||!1===r?r:r.message),{hash:{},data:t}))+" "}function T(e,t){var a,o=""
;return o+=" "+Y(i(n(4)).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:Q.noop,fn:Q.program(34,w,t),data:t}),(a||0===a)&&(o+=a),o+=" "}function w(e,t){var r,a="";return a+=": "+Y(i(n(4)).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(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"timeline",{hash:{},inverse:Q.program(39,A,t),
fn:Q.program(37,x,t),data:t}),r||0===r?r:""}function x(e,t){var r,a="";return a+=" "+Y(i(n(4)).call(e,(r=e&&e.event,null==r||!1===r?r:r.stateString),{hash:{},data:t}))+' <a href="#!/server/'+Y(i(n(530)).call(e,e&&e.serverID,{hash:{},data:t}))+"/details?key="+Y(i(n(530)).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+Y((r=e&&e.event,r=null==r||!1===r?r:r.mediaTitle,typeof r===G?r.apply(e):r))+"</a> "}function A(e,t){var r;return r=i(n(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"playing",{
hash:{},inverse:Q.program(45,_,t),fn:Q.program(40,N,t),data:t}),r||0===r?r:""}function N(e,t){var n,i="";return i+=" ",n=r.if.call(e,(n=e&&e.event,null==n||!1===n?n:n.player),{hash:{},inverse:Q.program(43,k,t),fn:Q.program(41,L,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function L(e,t){var r,a="";return a+=" "+Y(i(n(4)).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 k(e,t){var r,a="";return a+=" "+Y(i(n(4)).call(e,"{1} started playing {2}.",(r=e&&e.event,null==r||!1===r?r:r.username),(r=e&&e.event,null==r||!1===r?r:r.title),{hash:{},data:t}))+" "}function _(e,t){var r;return r=i(n(33)).call(e,(r=e&&e.event,null==r||!1===r?r:r._type),"websocket",{hash:{},inverse:Q.noop,fn:Q.program(46,R,t),data:t}),r||0===r?r:""}function R(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:Q.program(49,U,t),fn:Q.program(47,z,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function z(e,t){var r="";return r+=" "+Y(i(n(4)).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{hash:{},data:t}))+" "}function U(e,t){var n;return n=r.if.call(e,(n=e&&e.event,null==n||!1===n?n:n.closed),{hash:{},inverse:Q.program(52,F,t),fn:Q.program(50,B,t),data:t}),n||0===n?n:""}function B(e,t){var r="";return r+=" "+Y(i(n(4)).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},
data:t}))+" "}function F(e,t){var r="";return r+=" "+Y(i(n(4)).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 V,H="",Q=this,Y=this.escapeExpression,G="function";return H+='<div class="striped-list-inner-item alert-list-inner-item"> ',V=i(n(33)).call(t,(V=t&&t.event,null==V||!1===V?V:V._type),"setting",{hash:{},inverse:Q.program(3,l,o),fn:Q.program(1,s,o),data:o}),(V||0===V)&&(H+=V),
H+=' <div class="server-alert-details"> <span class="server-alert-time">'+Y(i(n(967)).call(t,(V=t&&t.event,null==V||!1===V?V:V.time),t&&t.timeFormat,{hash:{},data:o}))+"</span> ",V=i(n(33)).call(t,(V=t&&t.event,null==V||!1===V?V:V._type),"setting",{hash:{},inverse:Q.program(29,O,o),fn:Q.program(27,C,o),data:o}),(V||0===V)&&(H+=V),H+=" </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+=' <div class="filter-bar-right"> <a class="previous-btn btn-gray ',n=r.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:h.noop,fn:h.program(2,l,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:h.noop,fn:h.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function l(e,t){
return"disabled"}function c(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(4)).call(e,"Alerts are restricted from shared users.",{hash:{},data:t}))+"</h4> </div> </div> "}function u(e,t){return' <div class="alert-list-container"></div> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var d,p="",h=this,f=this.escapeExpression
;return p+='<div class="filter-bar"> <span class="page-count">'+f(i(n(4)).call(t,"Page {1} of {2}",t&&t.page,t&&t.pages,{hash:{},data:o}))+"</span> ",d=r.unless.call(t,t&&t.shared,{hash:{},inverse:h.noop,fn:h.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" </div> ",d=r.if.call(t,t&&t.shared,{hash:{},inverse:h.program(6,u,o),fn:h.program(4,c,o),data:o}),(d||0===d)&&(p+=d),p+=" "})},function(e,t,n){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(1852),s=n(984),l=n(175),c=n(3),u=n(1854),d=n(1862),p=n(176),h=n(1864),f=n.n(h),v=i.a.Layout.extend({className:"conversion-container",template:f.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){this.playQueue=e.playQueue,this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new s.a(this.items,{playQueue:this.playQueue,includeSelectedItem:!0}),this.afterUpNextItems=new o.a(this.items,{playQueue:this.playQueue}),this.settings=this.model.get("desktop").get("settings"),
this.pausedSetting=this.settings.get("BackgroundQueueIdlePaused"),this.listenTo(this.upNextItems,"reset add remove",this.onUpNextChange),this.listenTo(this.afterUpNextItems,"reset add remove",this.onAfterUpNextChange)},serializeData:function(){return{shouldShowList:this.model.supports("streamReady"),shouldShowDivider:!!this.afterUpNextItems.length,minServerVersion:l.a.streamReady,hasPausedSetting:!!this.pausedSetting,isPaused:this.pausedSetting&&this.pausedSetting.get("value"),
errorMessage:this.getErrorMessage(),manageVersionsRoute:Object(p.a)(this.model.id,"manage","versions")}},toggleEmptyView:function(){var e=this.upNextItems.length+this.afterUpNextItems.length>0;e?this.emptyRegion.close():this.emptyRegion.show(new d.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(){var e={playQueue:this.playQueue},t={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting};this.upNextList.show(new u.a(a.a.extend({},e,{collection:this.upNextItems,
itemViewOptions:t,sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new u.a(a.a.extend({},e,{collection:this.afterUpNextItems,itemViewOptions:a.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()},onUpNextChange:function(){this.toggleEmptyView()},onAfterUpNextChange:function(){
this.ui.divider.toggleClass("hidden",!this.afterUpNextItems.length),this.toggleEmptyView()},onTogglePauseClick:function(e){e.preventDefault();var t=this.pausedSetting.get("value");this.ui.pauseBtn.toggleClass("hidden",!t),this.ui.resumeBtn.toggleClass("hidden",t),this.pausedSetting.set("value",!t),this.settings.first().save(this.pausedSetting.id,t?0:1)}});t.a=v},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(984),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(77),r=n(7),a=n.n(r),o=n(75),s=n(94),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 i.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={};a.a.each(a.a.functions(i.c.Collection.prototype),function(n){a.a.contains(this.blacklistedMethods,n)||(t[n]=function(){return e[n].apply(e,arguments)})},this),a.a.extend(this,t)},_proxyCollectionLength:function(e){var t=function(){this.length=e.length}
;this.listenTo(e,"all",t),t.call(this)},_proxyCollectionEvents:function(e){var t=function(t){var n=a.a.toArray(arguments),i="change"===t||"change:"===t.slice(0,7);"reset"===t&&(this.models=e.models),a.a.contains(this.whitelistedEvents,t)?(a.a.contains(["add","remove","destroy"],t)?n[2]=this:a.a.contains(["reset","sort"],t)&&(n[1]=this),this.trigger.apply(this,n)):i&&this.contains(n[1])&&this.trigger.apply(this,n)};this.listenTo(e,"all",t)},addFilter:function(e,t){return t||(t=e,
e=this.defaultFilterName),a.a.has(this._filters,e)&&this._invalidateCacheForFilter(e),this._filters[e]=this._createFilter(t),this._execFilters(),this.trigger("filtered:add",e),this},removeFilter:function(e){return e||(e=this.defaultFilterName),delete this._filters[e],this._invalidateCacheForFilter(e),this._execFilters(),this.trigger("filtered:remove",e),this},resetFilters:function(){return this._filters={},this._invalidateCache(),this._execFilters(),this.trigger("filtered:reset"),this},
getFilters:function(){return a.a.keys(this._filters)},hasFilter:function(e){return a.a.contains(this.getFilters(),e)},refilter:function(e){return a.a.isObject(e)&&e.cid?this.onSupersetAdd(e):(this._invalidateCache(),this._execFilters()),this},destroy:function(){return this.stopListening(),this.superset=null,this._collection.reset([]),this.length=0,this.trigger("filtered:destroy"),this},_createFilter:function(e,t){if(a.a.isFunction(e))return e;throw new Error("Unsupported filter type")},
_execFilters:function(e){e||(e={});var t=[];this.superset&&(t=this.superset.filter(a.a.bind(this._execFiltersOnModel,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length},_execFiltersOnModel:function(e){this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid];for(var n in this._filters)if(a.a.has(this._filters,n)&&(a.a.has(t,n)||(t[n]=this._filters[n](e)),!t[n]))return!1;return!0},
_invalidateCache:function(){this._filterResultCache={}},_invalidateCacheForFilter:function(e){for(var t in this._filterResultCache)a.a.has(this._filterResultCache,t)&&delete this._filterResultCache[t][e]},onSupersetAdd:function(e){if(this._filterResultCache[e.cid]={},this._execFiltersOnModel(e)){if(!this._collection.get(e.cid)){for(var t=this.superset.indexOf(e),n=0,i=t-1;i>=0;i-=1)if(this.contains(this.superset.at(i))){n=this.indexOf(this.superset.at(i))+1;break}this._collection.add(e,{at:n})}
}else this._collection.get(e.cid)&&this._collection.remove(e);this.length=this._collection.length},onSupersetRemove:function(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length},onSupersetReset:function(){this._execFilters({reset:!0})}});t.a=l},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(702),o=n.n(a),s=n(7),l=n.n(s),c=n(18),u=n(3),d=n(86),p=n(1855),h=n(61),f=d.a.extend({tagName:"ol",className:"list media-list playlist-items",itemView:p.a,sorted:!0,
itemEvents:{sort:"onSort"},initialize:function(){l.a.bindAll(this,"onItemMove")},onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new o.a(this.el,l.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("metadataItem"),o=a.get("title"),s=new h.a({title:Object(u.default)("Convert Immediately"),message:Object(u.default)("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",o)}),d=s.promise;d.done(function(){i.moveItem(t)}),d.fail(l.a.bind(this.render,this)),
c.a.trigger("show:modal",s)}});t.a=f},function(e,t,n){"use strict";var i=n(21),r=n(7),a=n.n(r),o=n(15),s=n(40),l=n(237),c=n(520),u=n(3),d=n(222),p=n(441),h=n(680),f=n(985),v=n(1861),g=n.n(v),m=i.a.Layout.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:g.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=c.a[this.type];"movie"===this.type&&(t=c.a.art);var n="episode"===this.type?"show":this.type;this.image=new d.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 l.a.title(this.metadataItem)}},".generator-target":{modelAttribute:"target",formatter:function(e){return this.model.get("syncItemId")?Object(u.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=o.c("appModel"),t=new h.a({id:this.model.get("syncItemId"),
clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return s.a.execute("deleteSyncItem",{syncItem:t,server:this.model.server})},deleteGenerator:function(){var e=new p.a({id:this.model.get("generatorID")},{server:this.model.server,playlistID:this.metadataItem.get("playlistID")});return s.a.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")})},onRender:function(){this.image.setElement(this.ui.poster),
this.statusRegion.show(new f.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",a.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){"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(48),a=n.n(r),o=n(3);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(48),a=n.n(r),o=n(3);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(48),a=n.n(r),o=n(3);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||{},'<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){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(4)).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(4)).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(4)).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(4)).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){
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(21),r=n(176),a=n(1863),o=n.n(a),s=i.a.ItemView.extend({template:o.a,serializeData:function(){return{manageVersionsRoute:Object(r.a)(this.model.id,"manage","versions")}}});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="row row-padded"> <h4 class="text-muted text-center"> <p>'+l(i(n(4)).call(t,"Conversions for sync and media optimization will appear here.",{hash:{},data:o}))+"</p> <p>"+l(i(n(4)).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){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(4)).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(4)).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(4)).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(4)).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(4)).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(21),r=n(175),a=n(1866),o=n(1925),s=n.n(o),l=i.a.Layout.extend({
className:"now-playing-container",template:s.a,regions:{filterBar:".filter-bar",list:".sessions-list-container"},modelEvents:{"change:shared":"onSharedChange"},shouldShowList:function(){return!this.shared&&!this.synced&&this.supported},initialize:function(){this.shared=this.model.get("shared"),this.synced=!this.model.get("isFullServer"),this.supported=this.model.supports("publicNowPlaying")||this.model.get("myPlexSubscription")},serializeData:function(){return{
shouldShowList:this.shouldShowList(),shared:this.shared,synced:this.synced,minServerVersion:r.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.shouldShowList()&&(this.list.show(new a.a({collection:this.collection})),this.refreshList())},onSharedChange:function(e,t){this.shared=t,this.render()}})
;t.a=l},function(e,t,n){"use strict";var i=n(86),r=n(1867),a=n(1869),o=i.a.extend({tagName:"ul",className:"tile-list session-tile-list",itemView:a.a,emptyView:r.a});t.a=o},function(e,t,n){"use strict";var i=n(21),r=n(1868),a=n.n(r),o=i.a.ItemView.extend({template:a.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(4)).call(t,"Nothing is currently being played.",{hash:{},data:o}))+" </h4> </div> "})},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(40),o=n(1870),s=n(320),l=n(1871),c=n(684),u=n(3),d=n(222),p=n(990),h=n(1900),f=n(531),v=n(1924),g=n.n(v),m=f.a.extend({className:"poster-item session-tile-list-item",template:g.a,screenshotPreferredIndex:"hd",screenshotInterval:null,
screenshotIntervalDelay:2e3,screenshotCount:0,ui:{poster:".media-poster",posterFade:".media-poster-fade",userPoster:".user-poster"},events:r.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 d.a({model:this.model,modelAttribute:"ratingKey",type:"clip",
getUrl:this.getPosterUrl,width:350,url:t||null}),this.userImage=new d.a({model:this.model,modelAttribute:"User",type:"friend",getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new d.a({model:this.model,modelAttribute:"Media",type:"clip",getUrl:r.a.bind(this.getScreenshotUrl,this),width:350});var n=this.model.get("Player");n&&n.state===s.a.states.PLAYING&&(this.screenshotInterval=setInterval(r.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")&&!Object(h.a)(this.model.get("Player")),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=r.a.first(e);if(t){var n=this.model.get("viewOffset")||0,i=this.screenshotCount*this.screenshotIntervalDelay+n+4e3;return Object(o.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=r.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:r.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(l.a)(e.state)}},".session-transcode":{modelAttribute:"TranscodeSession",formatter:function(e){return e&&(e.videoCodec||e.audioCodec)?Object(u.default)("Converting"):Object(u.default)("Direct Play")}},".session-transcode-throttled":{modelAttribute:"TranscodeSession",autohide:!0,formatter:function(e){return e&&"1"===e.throttled?Object(u.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(u.default)("Direct Stream");var i=this.model.get("Media")[0],r=e.sourceVideoCodec||i.videoCodec,a=Object(c.a)(r)+(e.transcodeHwDecoding?" (hw)":""),o=Object(c.a)(e.videoCodec)+(e.transcodeHwEncoding?" (hw)":"");return Object(u.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(u.default)("Direct Stream");var i=this.model.get("Media")[0],r=e.sourceAudioCodec||i.audioCodec,a=Object(c.a)(r),o=Object(c.a)(e.audioCodec);return Object(u.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!==s.a.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),this.screenshotCount=0):t.state!==s.a.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(r.a.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onStopClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),a.a.execute("stopMedia",{model:this.model})}});t.a=m},function(e,t,n){"use strict";function i(e,t,n){
var i=Object(r.a)(e,t);if(n=Object(o.a)(i,n)){var s=Object(a.a)(e,i,t);return"/library/parts/"+i.id+"/indexes/"+n+"/"+s}}var r=n(987),a=n(988),o=n(989);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){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTUwLjEzOCA4NS42MXYtNi4xNDZjMC0yLjE4NS0xLjMzOC00LjEzMy0zLjM2Ni00Ljk5NC03LjU5NS0zLjIyNC0xMi45MS0xMC43NjUtMTIuOTEtMTkuNDcgMC0xMS42MDMgOS40NDMtMjEuMTM5IDIxLjEzOC0yMS4xMzkgMTEuNjk1IDAgMjEuMTM5IDkuNTM2IDIxLjEzOSAyMS4xMzkgMCAxMy42OS0xMC41OSAyNi42MzQtMjYgMzAuNjF6TTU1IDI0Yy0xNy4xNTEgMC0zMSAxMy45ODUtMzEgMzFzMTMuODQ5IDMxIDMxIDMxIDMxLTEzLjk4NSAzMS0zMS0xMy44NDktMzEtMzEtMzF6IiBmaWxsPSIjMzFDNEYzIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTQzLjg5MSAyMy40NzlsMy4wMDUgNS4xODNjLTUuNDY5IDIuNjYxLTkuMTc1IDcuODczLTkuMTc1IDEzLjg1MmgzNC45OTRjMC01Ljk3OS0zLjcwNy0xMS4xOS05LjE3Ny0xMy44NTJsMy4wMDUtNS4xODNzLjE0My0uMjc1LS4xMjctLjQzYy0uMjctLjE1NS0uNDUxLjEwOS0uNDUxLjEwOWwtMy4wNSA1LjIyOWExOS4wMyAxOS4wMyAwIDAgMC03LjY5OC0xLjYwNmMtMi43NjMgMC01LjM3Ni41OC03LjY5NyAxLjYwNmwtMy4wNS01LjIyOXMtLjE3MS0uMjY0LS40NDItLjExYy0uMjcyLjE1NC0uMTM3LjQzLS4xMzcuNDNtMy4wMDUgMTAuMDRhMS42NiAxLjY2IDAgMCAxIDEuNjY0IDEuNjVjMCAuOTEtLjc0NyAxLjYyOC0xLjY2NCAxLjYyOC0uOTE2IDAtMS42NjQtLjcxOS0xLjY2NC0xLjYyNyAwLS45MS43NDgtMS42NTIgMS42NjQtMS42NTJtMTYuNjQyIDBhMS42NiAxLjY2IDAgMCAxIDEuNjY0IDEuNjUyYzAgLjkxLS43NDcgMS42MjctMS42NjQgMS42MjctLjkxNiAwLTEuNjY0LS43MTktMS42NjQtMS42MjcgMC0uOTEuNzQ4LTEuNjUyIDEuNjY0LTEuNjUybS0yNS45NiAxMS4wMTd2MjYuMzRjMCAxLjMwNyAxLjU5MyAzLjAxOCAyLjkxIDMuMDE4aDQuMTYzdjguOThjMCAyLjI4NiAxLjY3OSA0LjEyOCAzLjc2OCA0LjEyOCAyLjA4OSAwIDMuNzY4LTEuODQyIDMuNzY4LTQuMTI4di04Ljk4aDYuMDU2djguOThjMCAyLjI4NiAxLjY4IDQuMTI4IDMuNzY4IDQuMTI4czMuNzktMS44NDIgMy43OS00LjEyOHYtOC45OGg0LjE0YzEuMzE4IDAgMi45MS0xLjcxMSAyLjkxLTMuMDE4di0yNi4zNEgzNy41NzdtLTUuODA1LS41NTJjMi4wODMgMCAzLjc3IDEuODQ5IDMuNzcgNC4xMjh2MTUuNjI4YzAgMi4yNzktMS42ODggNC4xMjgtMy43NyA0LjEyOC0yLjA4MyAwLTMuNzcyLTEuODQ4LTMuNzcyLTQuMTI4VjQ4LjExYzAtMi4yNzkgMS42ODktNC4xMjggMy43NzItNC4xMjhtNDYuODg2IDBjMi4wODMgMCAzLjc3MiAxLjg0OSAzLjc3MiA0LjEyOHYxNS42MjhjMCAyLjI3OS0xLjY4OCA0LjEyOC0zLjc3MiA0LjEyOC0yLjA4MiAwLTMuNzctMS44NDgtMy43Ny00LjEyOFY0OC4xMWMwLTIuMjc5IDEuNjg3LTQuMTI4IDMuNzctNC4xMjgiIGZpbGw9IiNBNEM2MzkiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTU2LjU1IDM5LjE0NWg1LjExNHY1Ljc3Nmg0LjkyNHY0LjA0OGgtNC45MjR2MTQuMzY5YzAgMi4yMjUuOTk0IDMuMjY2IDMuMTQ4IDMuMjY2LjU0NSAwIDEuNDItLjA3IDEuNzUyLS4xMTh2NC4wNDhjLS41NjguMTQyLTEuNzc1LjI2LTIuODg4LjI2LTUuMTM3IDAtNy4xMjUtMS45NjQtNy4xMjUtNi45MzV2LTE0Ljg5SDUzVjQ0LjkyaDMuNTV2LTUuNzc2em0zNi4yMDMgNS43NzZsLTkuMjU1IDI1LjcwOGgtNS40NjlMNjguNzUgNDQuOTJoNS40Mmw2LjU1OCAyMC42NDJoLjExOGw2LjU4MS0yMC42NDJoNS4zMjZ6bS01MC40NzEgOS41NGMtLjA0LTQuMzk4IDMuNTM4LTYuNTExIDMuNjk5LTYuNjEzLTIuMDEyLTIuOTg3LTUuMTQ0LTMuMzk3LTYuMjYxLTMuNDQ2LTIuNjY3LS4yNzQtNS4yMDMgMS41OTQtNi41NTQgMS41OTRzLTMuNDQtMS41NTMtNS42NS0xLjUxYy0yLjkwNy4wNDItNS41ODUgMS43MTQtNy4wODQgNC4zNTQtMy4wMTcgNS4zMTgtLjc3MSAxMy4xOTUgMi4xNzEgMTcuNTEgMS40MzkgMi4xMDggMy4xNTMgNC40ODIgNS40MDQgNC4zOTcgMi4xNy0uMDg2IDIuOTg4LTEuNDIzIDUuNjA4LTEuNDIzIDIuNjIgMCAzLjM1OCAxLjQyMyA1LjY1MiAxLjM3OCAyLjMzNC0uMDQyIDMuODExLTIuMTUgNS4yMzktNC4yNjcgMS42NS0yLjQ1IDIuMzMtNC44MiAyLjM3MS00Ljk0Mi0uMDUtLjAyNC00LjU1LTEuNzczLTQuNTk1LTcuMDMxbS00LjMwOC0xMi45MTNjMS4xOTYtMS40NyAyLjAwMS0zLjUxMyAxLjc4LTUuNTQ5LTEuNzIuMDcyLTMuODA2IDEuMTY1LTUuMDQzIDIuNjMzLTEuMTA3IDEuMzAxLTIuMDc4IDMuMzc5LTEuODE1IDUuMzc1IDEuOTIuMTUxIDMuODgyLS45OSA1LjA3OC0yLjQ2IiBmaWxsPSIjRkZGIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxkZWZzPgogICAgICAgIDxyYWRpYWxHcmFkaWVudCBjeD0iMTQuOTM1JSIgY3k9IjEzLjY0NCUiIGZ4PSIxNC45MzUlIiBmeT0iMTMuNjQ0JSIgcj0iMTAwLjQyNiUiIGlkPSJhIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGRiIgc3RvcC1vcGFjaXR5PSIuMDk4IiBvZmZzZXQ9IjAlIi8+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIxMDAlIi8+CiAgICAgICAgPC9yYWRpYWxHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQgMjQpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTQuOTIxIDE0LjI0M0MxMC40NCA1LjY3NyAyMC4wNjIgMCAzMSAwYzEyLjAzNyAwIDIyLjQ4IDYuODc1IDI3LjYxNSAxNi45MUgzMUwxOC43OTcgMzguMDQ0SDQuOTIxVjE0LjI0M3oiIGZpbGw9IiNEQjQ0MzciIGZpbGwtcnVsZT0ibm9uemVybyIvPgogICAgICAgICAgICA8cGF0aCBkPSJNNC45MiAxNC4yNDVsMTMuODc3IDIzLjhoMjQuNDF2MTAuMjU5TDI5LjU0MyA2MS45NjZDMTMuMTA5IDYxLjIwNSAwIDQ3LjYyMSAwIDMxYzAtNi4xNyAxLjgwNy0xMS45MjMgNC45Mi0xNi43NTV6IiBmaWxsPSIjMEY5RDU4IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz4KICAgICAgICAgICAgPHBhdGggZD0iTTU4LjYxNSAxNi45MUEzMC44NDMgMzAuODQzIDAgMCAxIDYyIDMxYzAgMTcuMTEtMTMuODkgMzEtMzEgMzEtLjQ5MyAwLS45ODMtLjAxMi0xLjQ3LS4wMzVsMTMuNjc2LTIzLjkyTDMxIDE2LjkxaDI3LjYxNXoiIGZpbGw9IiNGRkNENDAiIGZpbGwtcnVsZT0ibm9uemVybyIvPgogICAgICAgICAgICA8cGF0aCBkPSJNMzEgMTYuOTFoMjcuNjE4TDMxIDI0LjI5di03LjM4ek00LjkyMSAxNC4yNUwyNS4wOSAzNC40MTNsLTYuMjkyIDMuNjMxTDQuOTIxIDE0LjI1em0yNC42MSA0Ny43MTFsNy4zODQtMjcuNTQ3IDYuMjkxIDMuNjMxLTEzLjY3NSAyMy45MTZ6IiBmaWxsLW9wYWNpdHk9Ii4xIiBmaWxsPSIjMDAwIi8+CiAgICAgICAgICAgIDxjaXJjbGUgZmlsbD0iI0YxRjFGMSIgY3g9IjMxIiBjeT0iMzEiIHI9IjE0LjA5MSIvPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM0Mjg1RjQiIGN4PSIzMSIgY3k9IjMxIiByPSIxMS4yNzMiLz4KICAgICAgICAgICAgPGNpcmNsZSBmaWxsPSJ1cmwoI2EpIiBjeD0iMzEiIGN5PSIzMSIgcj0iMzEiLz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMCAwaDExMHYxMTBIMHoiLz4KICAgICAgICA8ZyBmaWxsPSIjRTVBMDBEIj4KICAgICAgICAgICAgPHBhdGggZD0iTTc0LjA0MyA3MS41NzJDNzIuOTgxIDYxLjk5NiA2NC44NiA1NC41NDggNTUgNTQuNTQ4Yy05Ljg3MyAwLTE4LjAwMiA3LjQ2Ny0xOS4wNDggMTcuMDYyaC0zLjY2NUMyNi42MDcgNzEuNjEgMjIgNjYuNzc1IDIyIDYxLjA3M2MwLTQuOTQzIDMuNDY1LTkuMjc0IDguMDg4LTEwLjI4Ny0uMDY2LS42NjEtLjEtMS4zMzItLjEtMi4wMTJDMjkuOTg4IDM3Ljg1NCAzOC44MDYgMjkgNDkuNjg3IDI5YzcuOTkzIDAgMTQuODU0IDQuNzgyIDE3Ljk0NSAxMS42NDVhMTUuNTIgMTUuNTIgMCAwIDEgNC44MS0uNzczQzgxLjAzNSAzOS44NzIgODggNDcuMDkyIDg4IDU1Ljc0YzAgOC4yOTQtNS45IDE1LjI2Ny0xMy45NTcgMTUuODMyeiIgZmlsbC1ydWxlPSJub256ZXJvIi8+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik02MC4yNyA2OC40NGE3LjQ1MiA3LjQ1MiAwIDEgMCAuNTA1IDkuOThsMi4yNjYgMi4yNjZBMTAuNjIgMTAuNjIgMCAwIDEgNTUgODQuMzU1Yy01Ljg4IDAtMTAuNjQ1LTQuNzY2LTEwLjY0NS0xMC42NDUgMC01Ljg4IDQuNzY2LTEwLjY0NSAxMC42NDUtMTAuNjQ1IDIuOTQgMCA1LjYgMS4xOTEgNy41MjcgMy4xMTdsMy4xMTgtMy4xMTd2OC41MTZINTcuMTNsMy4xNC0zLjE0eiIvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZmlsbC1vcGFjaXR5PSIuMyIgZmlsbD0iI0ZGRiIgZD0iTTM4IDI1aDE3LjQzNGwxOS4yMzggMzAtMTkuMjM4IDMwSDM4bDE5LjIzOC0zMEwzOCAyNSIvPgogICAgPC9nPgo8L3N2Zz4K"},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTU1LjE4NCAyNy4yNTNjMTUuNTQ4IDAgMjguNTIgOS41MTIgMzEuNTI5IDIyLjE2LjI4IDEuMTc0LjQ3IDIuMzYyLS4wNzIgMy4xNTctLjc2NSAxLjEyNC0yLjUxNi45MTItMy43MjQuOTEyaC0yMi45OWMtMi4zMjIgMC00LjAwNy4wMy02LjE5OC0xLjA2LTEuNjkxLS44NDEtMi4yNzktMS41NDctMy40My0yLjg3NmE4LjQ2MSA4LjQ2MSAwIDAgMC02LjQxMS0yLjk0Yy00LjcwNCAwLTguNTIgMy44NTMtOC41MiA4LjYwNnMzLjgxNSA4LjYwNiA4LjUyIDguNjA2YTguNDI1IDguNDI1IDAgMCAwIDUuMzYxLTEuOTJjLjc2NS0uNjI1IDEuNzY1LTEuNzk0IDIuNDcyLTIuNTM5IDEuNzMtMS44MjEgNC40NDMtMi40MDMgNy41MzEtMi4yODRoMjQuNTZjMi42MDYtLjA2NCAzLjU1Ni40NTMgMy4wNjIgMi44NTItMi42OCAxMy4wMDMtMTUuODQ4IDIyLjg3Ni0zMS42ODcgMjIuODc2LTkuNTc3IDAtMTguMTc4LTMuNjEtMjQuMDczLTkuMzQyLS43MTEtLjY5MS0xLTEuNTc3LjAwNi0yLjE0Mi4zNzMtLjIwOS45MjUtLjMyNiAxLjY5LS4zMjhoMTYuNTA4YzEuNzY4LjEgMy4zNDMuNTYyIDQuNzQ3IDEuMzg3IDEuNjM5Ljk2NCAxLjkzNCAxLjYzIDMuMSAyLjg1MmE4LjQ1MiA4LjQ1MiAwIDAgMCA2LjEzNiAyLjYzNWM0LjcwMyAwIDguNTE5LTMuODUyIDguNTE5LTguNjA1IDAtNC43NTQtMy44MTUtOC42MDYtOC41Mi04LjYwNmE4LjQyNSA4LjQyNSAwIDAgMC01LjM2IDEuOTE5Yy0uNzY1LjYyNi0xLjc2NiAxLjc5NC0yLjQ3MiAyLjU0LTIuNjQyIDIuNzgtNy4wMTggMi4yODQtMTAuNTE1IDIuMjg0SDMyLjQ4NGMtMS45MzggMC00LjA5LjIwMS01Ljc3LS45MTMtMS4wNTgtLjcwMy0xLjc5LTEuODMtMi4zNTYtMy40NTdhMjQuMjQ3IDI0LjI0NyAwIDAgMS0uMzg0LTE0LjgwM2MuOTQzLTMuMTU0IDIuNDk4LTUuNjQ3IDcuMDkxLTUuNTIzaDE3LjA3NmMyLjQ5Mi0uMDk1IDQuNzQyLjI2NiA2LjQyNiAxLjM2OC45MjMuNjAzIDEuMjgyIDEuMTU5IDEuOTk1IDEuOTQyLjUyNS41NzcgMS4wOTYgMS4xNTIgMS41OCAxLjUxNCAxLjUxNiAxLjEzNSAzLjMzIDEuOTIgNS4zNjIgMS45MiA0LjcwNCAwIDguNTE4LTMuODUzIDguNTE4LTguNjA2IDAtNC43NTQtMy44MTMtOC42MDYtOC41MTgtOC42MDZhOC40NjQgOC40NjQgMCAwIDAtNi40ODggMy4wM2MtMS41MSAxLjc5Mi0zLjA3NyAyLjkyOS01LjExIDMuNDc4LTEuMzkuMzc1LTIuNTI0LjM2Ni0zLjkzLjM2NmgtMTQuOTZjLTIuOTUzLS4wMDgtMi44MzMtMS43MDctMS4wNzMtMy4yOSA1Ljg1OC01LjI4IDE0LjExLTguNTY3IDIzLjI0OS04LjU2NyIgZmlsbD0iIzQ1QUE0MiIvPgogICAgPC9nPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTQ0LjQyNSA0OS4xNzNoMjEuMTFjMC03LjU0My0zLjI3LTEyLjY4NS0xMi4xODctMTIuNjg1QzQyLjgxIDM2LjQ4OCAzMi4wOTQgNDMuMzkyIDI3IDUyYzEuNTc4LTE0Ljk0MSAxMi4yMjMtMjcgMjguMjUtMjcgMTMuNzM2IDAgMjYuNzUxIDEwLjU3IDI2Ljc1MSAyOC4xNHY2LjY4SDQ0LjUzOGMwIDkuMDkgNy44ODEgMTIuNjk0IDE2LjEzIDEyLjY5NCAxMC4wNCAwIDE2LjI2NS00LjU0MyAxNi4yNjUtNC41NDN2MTIuNzM1cy03LjAyIDQuMjkzLTE4LjIxNSA0LjI5M2MtMTQuNTQ1IDAtMjQuODEzLTEwLjQ5MS0yNC44MTMtMjMuNTM2IDAtMTAuMjQgNi4xNTQtMTguNDE1IDE0LjY3OS0yMS43ODktNC4xNSA0LjU4Ni00LjE2NCA5LjUwMi00LjE2NCA5LjUwMiIgZmlsbD0iIzMyNzdCQyIvPgogICAgPC9nPgo8L3N2Zz4K"
},function(e,t,n){e.exports=n.p+"desktop/common/img/devices/firefox.e8c991b3b5dcf1bb813ceaea5f428ab4.svg"},function(e,t,n){e.exports=n.p+"desktop/common/img/devices/gtv.9b15f518c4c922f2d6036fe6f13178a6.svg"},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTgzLjk5OSA1NS44N2MwLTQuOTAyLTEuMjY3LTkuNTA2LTMuNDktMTMuNTA3Qzg5Ljk4MiAyMC45MjYgNzAuMzYgMjQuMDY2IDY5LjI2OSAyNC4yOGE0OS44OTcgNDkuODk3IDAgMCAwLTExLjU1IDMuNzc0Yy0uNTIzLS4wMy0xLjA1LS4wNDUtMS41OC0uMDQ1LTEzLjIzOSAwLTI0LjMyIDkuMjM0LTI3LjE1NyAyMS42MTIgNi45NzgtNy44MjggMTEuODYxLTEwLjk4NiAxNC43ODYtMTIuMjUtLjQ2Ny40MTctLjkyNC44MzgtMS4zNzMgMS4yNjMtLjE1LjE0Mi0uMjk0LjI4NS0uNDQyLjQyNy0uMjk2LjI4NS0uNTkyLjU3LS44OC44NTgtLjE3My4xNzItLjM0LjM0NC0uNTEuNTE3LS4yNTUuMjYtLjUxMS41MjEtLjc2MS43ODQtLjE3OC4xODYtLjM1MS4zNzMtLjUyNi41NmE2OS4zNzYgNjkuMzc2IDAgMCAwLTIuMzggMi42NzUgODAuMzY1IDgwLjM2NSAwIDAgMC0xLjY1IDIuMDEyYy0uMTcyLjIxOC0uMzQ2LjQzNy0uNTE1LjY1NS0uMTYxLjIwNy0uMzE4LjQxNC0uNDc1LjYyMS0uMTc4LjIzNC0uMzU4LjQ2OC0uNTMxLjcwMS0uMTI0LjE2Ny0uMjQzLjMzMi0uMzY1LjQ5OGE4Ni40MjEgODYuNDIxIDAgMCAwLTMuNzE3IDUuNTA0bC0uMDM3LjA2Yy0uMjI3LjM2NS0uNDQ1LjcyNC0uNjU5IDEuMDhsLS4wMjIuMDM3YTg5LjQ5NCA4OS40OTQgMCAwIDAtMS41ODQgMi43NDZjLTIuNTA5IDQuNTQ3LTMuNzMgNy43MjQtMy43ODMgNy45MTMtNy45MjQgMjguMzI4IDE2LjgwNiAxNi4zNjUgMjAuMjU3IDE0LjU4YTI3Ljc0NyAyNy43NDcgMCAwIDAgMTIuMzI0IDIuODY4YzEyLjExNSAwIDIyLjQyMi03LjczMiAyNi4yNTgtMTguNTMxSDY3Ljc1N2MtMi4xNjYgMy42Ni02LjMzNiA2LjEzOC0xMS4xMjcgNi4xMzgtNy4wMiAwLTEyLjcxLTUuMzE4LTEyLjcxLTExLjg4aDM5Ljg1QTI4LjEzIDI4LjEzIDAgMCAwIDg0IDU1Ljg3aC0uMDAxem0tNS4yMDUtMjcuNDE3YzIuNCAxLjYyIDQuMzI0IDQuMTYyIDEuMDIgMTIuNzI2YTI3Ljk1NCAyNy45NTQgMCAwIDAtMTMuNjA3LTExLjI5M2MyLjU3OC0xLjI0NiA4Ljk2My0zLjg4IDEyLjU4Ny0xLjQzM3pNMjcuODA2IDgwLjgwNGMtMS45NTQtMi4wMDQtMi4zLTYuODg1IDIuMDEzLTE1Ljc4QTI3Ljk0MiAyNy45NDIgMCAwIDAgNDEuOTUgNzkuODUzYy0yLjc5MSAxLjUzNi0xMC4yMDIgNC45OTUtMTQuMTQ0Ljk1MnptMTYuMDUyLTI4Ljk2NmMuMjIzLTYuMzc2IDUuNzcyLTExLjQ4MiAxMi41OS0xMS40ODIgNi44MTkgMCAxMi4zNjggNS4xMDYgMTIuNTkgMTEuNDgyaC0yNS4xOHoiIGZpbGw9IiMxRUJCRUUiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMCAwaDExMHYxMTBIMHoiLz4KICAgICAgICA8cGF0aCBkPSJNMjIuMzkgNzEuMzM4VjQ3Ljc4NGg0LjcwN3YyMy41NTRIMjIuMzl6bTIuMzY1LTI2LjkxNmMtMS41MTkgMC0yLjc1NS0xLjIxNC0yLjc1NS0yLjcxQzIyIDQwLjE3MSAyMy4yMzYgMzkgMjQuNzU1IDM5YzEuNTE4IDAgMi43NTQgMS4xNzEgMi43NTQgMi43MTEgMCAxLjQ5Ny0xLjIzNiAyLjcxMS0yLjc1NCAyLjcxMXptMjEuMzQyLTQuOTAxYzkgMCAxNC42NjEgNi4yMjQgMTQuNjYxIDE2LjE4IDAgOS45NTUtNS42NiAxNi4xNTgtMTQuNjYxIDE2LjE1OC05LjAyMyAwLTE0LjY2Mi02LjIwMy0xNC42NjItMTYuMTU4IDAtOS45NTYgNS42MzktMTYuMTggMTQuNjYyLTE2LjE4em0wIDQuMjcyYy01Ljk0MyAwLTkuNjk1IDQuNTk4LTkuNjk1IDExLjkwOCAwIDcuMjg3IDMuNzUyIDExLjg4NSA5LjY5NSAxMS44ODUgNS45NDIgMCA5LjY3My00LjU5OCA5LjY3My0xMS44ODUgMC03LjMxLTMuNzMtMTEuOTA4LTkuNjczLTExLjkwOHpNNjMuOTkgNjIuNjJoNC43OTNjLjM0NyAzLjEwMiAzLjM2MiA1LjE0IDcuNDgzIDUuMTQgMy45NDggMCA2Ljc4OS0yLjAzOCA2Ljc4OS00LjgzNiAwLTIuNDMtMS43MTQtMy44ODItNS43Ny00Ljg4bC00LjA1NS0uOTc2Yy01Ljc0OC0xLjM4OC04LjQxNi00LjA3OC04LjQxNi04LjQzNyAwLTUuNCA0LjcwNy05LjExIDExLjM4Ny05LjExIDYuNjE1IDAgMTEuMTQ4IDMuNzEgMTEuMyA5LjExaC00LjcyOGMtLjI4Mi0zLjEyMy0yLjg2My01LjAxLTYuNjM3LTUuMDEtMy43NzQgMC02LjM1NSAxLjkwOC02LjM1NSA0LjY4NSAwIDIuMjEyIDEuNjQ5IDMuNTEzIDUuNjgzIDQuNTExbDMuNDQ4Ljg0NmM2LjQyIDEuNTE4IDkuMDg4IDQuMSA5LjA4OCA4LjY3NSAwIDUuODU3LTQuNjYzIDkuNTIyLTEyLjA4IDkuNTIyLTYuOTQxIDAtMTEuNjI2LTMuNTc5LTExLjkzLTkuMjR6IiBmaWxsPSIjRkZGIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t,n){e.exports=n.p+"desktop/common/img/devices/linux.f04c01f0c805e16c0a4f522f7ddd6de3.svg"},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iNDkuOTk0JSIgeTE9IjEuNjMxJSIgeDI9IjQ5Ljk5NCUiIHkyPSI5OC41NDMlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGRjFCMkQiIG9mZnNldD0iMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGMUIyRCIgb2Zmc2V0PSIzMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGMUIyRCIgb2Zmc2V0PSI2MSUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0E3MDAxNCIgb2Zmc2V0PSIxMDAlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjUwLjAwNSUiIHkxPSIuODQ4JSIgeDI9IjUwLjAwNSUiIHkyPSI5OS42MDIlIiBpZD0iYiI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM5QzAwMDAiIG9mZnNldD0iMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGNEI0QiIgb2Zmc2V0PSI3MCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0ZGNEI0QiIgb2Zmc2V0PSIxMDAlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTMwLjg0IDBDMTMuODA2IDAgMCAxMy44MTIgMCAzMC44NDdjMCAxNi41NDMgMTMuMDI2IDMwLjA0MiAyOS4zOCAzMC44MWEzMC43MzQgMzAuNzM0IDAgMCAwIDIyLjAyNS03LjgxNGMtMy42MTYgMi4zOTktNy44NDUgMy43NzQtMTIuMzYzIDMuNzc0LTcuMzQ4IDAtMTMuOTIzLTMuNjQ2LTE4LjM0OS05LjM5Mi0zLjQxMy00LjAyLTUuNjIzLTkuOTc1LTUuNzctMTYuNjU0di0xLjQ1NWMuMTQ3LTYuNjczIDIuMzU3LTEyLjYyNyA1Ljc2NC0xNi42NTQgNC40MjYtNS43NDYgMTEuMDA3LTkuMzg2IDE4LjM1NS05LjM4NiA0LjUxOCAwIDguNzQ3IDEuMzgxIDEyLjM2MyAzLjc4MUEzMC43MzMgMzAuNzMzIDAgMCAwIDMwLjk1NyAwaC0uMTE3eiIgZmlsbD0idXJsKCNhKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQgMjQpIi8+CiAgICAgICAgPHBhdGggZD0iTTIwLjY4NyAxMy40NjJjMi44MzYtMy4zNCA2LjQ4OS01LjM1MyAxMC40ODUtNS4zNTMgOC45OCAwIDE2LjI2MSAxMC4xODQgMTYuMjYxIDIyLjczOCAwIDEyLjU2LTcuMjggMjIuNzM3LTE2LjI2MSAyMi43MzctMy45OTYgMC03LjY0OS0yLjAxNC0xMC40NzktNS4zNTMgNC40MjYgNS43NDYgMTEgOS4zOTIgMTguMzQ5IDkuMzkyIDQuNTE4IDAgOC43NDctMS4zODEgMTIuMzYzLTMuNzc1IDYuMzEtNS42NTQgMTAuMjgyLTEzLjg2MSAxMC4yODItMjMuMDAxIDAtOS4xMzUtMy45NzItMTcuMzQ4LTEwLjI4OC0yMi45OTYtMy42MTYtMi40LTcuODQtMy43NzUtMTIuMzU3LTMuNzc1LTcuMzQ4IDAtMTMuOTIzIDMuNjQ2LTE4LjM0OSA5LjM5MiIgZmlsbD0idXJsKCNiKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQgMjQpIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTcxLjc2IDU0Ljk5NGMtLjA3NC03Ljc0IDYuMzQ0LTExLjQ2IDYuNjM1LTExLjY0LTMuNjEtNS4yNTctOS4yMjQtNS45NzgtMTEuMjMyLTYuMDY0LTQuNzgzLS40ODItOS4zMzIgMi44MDQtMTEuNzU1IDIuODA0LTIuNDI0IDAtNi4xNjYtMi43MzEtMTAuMTMzLTIuNjU3LTUuMjE1LjA3NS0xMC4wMTggMy4wMTctMTIuNzA2IDcuNjY0LTUuNDEyIDkuMzYtMS4zODQgMjMuMjIyIDMuODkzIDMwLjgxIDIuNTggMy43MTEgNS42NTMgNy44ODkgOS42OTMgNy43MzcgMy44OS0uMTUxIDUuMzYtMi41MDMgMTAuMDU5LTIuNTAzIDQuNyAwIDYuMDIzIDIuNTAzIDEwLjEzNiAyLjQyNSA0LjE4Ni0uMDczIDYuODM2LTMuNzg0IDkuMzk3LTcuNTEgMi45NjItNC4zMSA0LjE4LTguNDgzIDQuMjUzLTguNjk3LS4wOTItLjA0Mi04LjE2NC0zLjEyLTguMjQ1LTEyLjM3M20tNy43MjgtMjIuNzI1YzIuMTQ2LTIuNTg3IDMuNTg5LTYuMTg3IDMuMTkzLTkuNzY1LTMuMDg4LjEyNS02LjgyNyAyLjA0OS05LjA0NSA0LjYzNC0xLjk4NyAyLjI5LTMuNzI2IDUuOTQ4LTMuMjU1IDkuNDYgMy40NDIuMjY1IDYuOTYyLTEuNzQ1IDkuMTA3LTQuMzMiIGZpbGw9IiNGRkYiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxkZWZzPgogICAgICAgIDxyYWRpYWxHcmFkaWVudCBjeD0iODkuMjY3JSIgY3k9IjQ5LjcxMyUiIGZ4PSI4OS4yNjclIiBmeT0iNDkuNzEzJSIgcj0iOTIuNSUiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgLjYxMTIgMCAuMTkzKSIgaWQ9ImEiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRjlCRTAzIiBvZmZzZXQ9IjAlIi8+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNDQzdDMTkiIG9mZnNldD0iMTAwJSIvPgogICAgICAgIDwvcmFkaWFsR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgIDxwYXRoIGZpbGw9IiMxOTFBMUMiIGQ9Ik0wIDBoMTEwdjExMEgweiIvPgogICAgICAgIDxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik0zOCAyNWgxNy40MzRsMTkuMjM4IDMwLTE5LjIzOCAzMEgzOGwxOS4yMzgtMzBMMzggMjUiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iMTAwJSIgeTE9IjUwJSIgeDI9IjAlIiB5Mj0iNTAlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGNENFMUUiIG9mZnNldD0iMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0NDN0MxOSIgb2Zmc2V0PSIxMDAlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTc4LjQ3MyA1NWwtMjAuMy0yOC45ODZMNTEuNzI4IDI2bC0zLjIyMi4wMTRMNjguODA2IDU1IDUwLjc2IDgwLjc3N2gtMy4yMjJMNjUuNTg0IDU1bC0yMC4zLTI4Ljk4NkwzOC44NCAyNmwtMy4yMjMuMDE0IDE4LjA2MSAyNS43NjRIMTlWNTVoNDAuMTRMNDEuMDg0IDI5LjIyMmgzLjIyM0w2Mi4zNjEgNTVsLTIwLjMgMjloOS42NjdsMjAuMy0yOS0xOC4wNTQtMjUuNzc4aDMuMjIzTDc1LjI1IDU1bC0yMC4zIDI5aDkuNjY3bDE4LjAxLTI1Ljc3OGg4LjcwNlY1NWgtOS42MzlMNjMuNjUgODAuNzc3aC0zLjIyMnoiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iMTAwJSIgeTE9IjUwJSIgeDI9IjAlIiB5Mj0iNTAlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGOUJFMDMiIG9mZnNldD0iMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0U1QTAwRCIgb2Zmc2V0PSI0Ny43MzglIi8+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNDQzdDMTkiIG9mZnNldD0iMTAwJSIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPHJhZGlhbEdyYWRpZW50IGN4PSI4OS4yNjclIiBjeT0iNDkuNzEzJSIgZng9Ijg5LjI2NyUiIGZ5PSI0OS43MTMlIiByPSI5Mi41JSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAuNjExMiAwIC4xOTMpIiBpZD0iYiI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGOUJFMDMiIG9mZnNldD0iMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0NDN0MxOSIgb2Zmc2V0PSIxMDAlIi8+CiAgICAgICAgPC9yYWRpYWxHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTMxIDYyQzEzLjg3OSA2MiAwIDQ4LjEyMSAwIDMxIDAgMTMuODc5IDEzLjg3OSAwIDMxIDBjMTcuMTIxIDAgMzEgMTMuODc5IDMxIDMxIDAgMTcuMTIxLTEzLjg3OSAzMS0zMSAzMXptMC0xLjg2YzE2LjA5MyAwIDI5LjE0LTEzLjA0NyAyOS4xNC0yOS4xNFM0Ny4wOTMgMS44NiAzMSAxLjg2IDEuODYgMTQuOTA3IDEuODYgMzEgMTQuOTA3IDYwLjE0IDMxIDYwLjE0eiIgZmlsbD0idXJsKCNhKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQgMjQpIi8+CiAgICAgICAgPHBhdGggZmlsbD0idXJsKCNiKSIgZD0iTTIwLjM5OCAxMS42NTZoMTEuMjZsMTIuNDI0IDE5LjM3NS0xMi40MjUgMTkuMzc1SDIwLjM5OGwxMi40MjUtMTkuMzc1LTEyLjQyNS0xOS4zNzUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDI0KSIvPgogICAgPC9nPgo8L3N2Zz4K"
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iNTAlIiB5MT0iMCUiIHgyPSI1MCUiIHkyPSIxMDAlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMxQTgwRDMiIG9mZnNldD0iMCUiLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzFBNDU5MyIgb2Zmc2V0PSIxMDAlIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTg5LjkxMSA2OS44NmMtMS40MTcgMS43ODgtNC44OSAzLjA2NC00Ljg5IDMuMDY0bC0yNS44MyA5LjI3OFY3NS4zNmwxOS4wMS02Ljc3NGMyLjE1Ni0uNzczIDIuNDg4LTEuODY1LjczNC0yLjQzOS0xLjc1LS41NzUtNC45Mi0uNDEtNy4wNzguMzY2TDU5LjE5IDcwLjk3NHYtNy4xMDFsLjczLS4yNDdzMy42Ni0xLjI5NiA4LjgwNy0xLjg2NmM1LjE0Ny0uNTY3IDExLjQ1LjA3OCAxNi4zOTcgMS45NTMgNS41NzUgMS43NjIgNi4yMDMgNC4zNiA0Ljc4NyA2LjE0N3pNNjEuNjUgNTguMjF2LTE3LjVjMC0yLjA1NC0uMzc5LTMuOTQ2LTIuMzA3LTQuNDgyLTEuNDc3LS40NzMtMi4zOTMuODk4LTIuMzkzIDIuOTUyVjgzTDQ1LjEzIDc5LjI1VjI3YzUuMDI1LjkzMyAxMi4zNDUgMy4xMzggMTYuMjggNC40NjUgMTAuMDEgMy40MzYgMTMuNDAzIDcuNzEyIDEzLjQwMyAxNy4zNDggMCA5LjM5Mi01Ljc5OCAxMi45NTItMTMuMTY1IDkuMzk2ek0yMy40NDYgNzQuNjQ0Yy01LjcyMy0xLjYxMS02LjY3Ni00Ljk3LTQuMDY3LTYuOTA1IDIuNDEtMS43ODYgNi41MTEtMy4xMzEgNi41MTEtMy4xMzFsMTYuOTQ1LTYuMDI1djYuODY5bC0xMi4xOTQgNC4zNjRjLTIuMTU0Ljc3My0yLjQ4NSAxLjg2Ny0uNzM1IDIuNDQgMS43NTIuNTc0IDQuOTIzLjQxIDcuMDgtLjM2NGw1Ljg1LTIuMTIydjYuMTQ1Yy0uMzcyLjA2Ni0uNzg1LjEzMi0xLjE2OC4xOTYtNS44NS45NTYtMTIuMDgxLjU1Ny0xOC4yMjItMS40Njd6IiBmaWxsPSJ1cmwoI2EpIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMCAwaDExMHYxMTBIMHoiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjNjYyRDkxIiBkPSJNMTEgMzJoODh2NDZIMTF6Ii8+CiAgICAgICAgPHBhdGggZD0iTTY2LjkyNyA1NC4zODhsLTYuMTk2IDYuMjF2LTYuMjMxaC01LjM3OHYxNS44MzVoNS4zNzh2LTYuNDI0bDYuNDY5IDYuNDI0aDYuNzdsLTguMjIxLTguMjQyIDYuODA5LTYuODIzdjkuMzk4YzAgMy4xMiAxLjg3MiA2IDYuNTg2IDYgMi4yMzggMCA0LjI5Mi0xLjI3MiA1LjI5LTIuNDI0bDIuNDE4IDIuMDlIODhWNTQuMzg0aC01LjM3OHYxMC4yNGMtLjYwNSAxLjA2LTEuNDUgMS43MjYtMi43NTQgMS43MjYtMS4zMjMgMC0xLjkzLS43ODctMS45My0zLjMwMXYtOC42NjVoLTExLjAxbS0zMy4wNzMgMTUuODRsLTQuODQ2LTYuNzRoLTEuNjN2Ni43MjZIMjJWNTBoNy43MDZjNC40NDMgMCA4LjA2OSAzLjAyOSA4LjA2OSA2Ljc1NCAwIDIuMjczLTEuMzkgNC4zMDItMy41MSA1LjU0NGw1LjY5IDcuOTI3LTYuMS0uMDAyem0tMS40NjQtMTMuNDY3YzAtMS44OC0xLjUwOS0zLjM5My0zLjM1My0zLjM5M2gtMS42NjN2Ni43NTZoMS42NjNjMS44NDUgMCAzLjM1My0xLjUxNSAzLjM1My0zLjM2M3ptMjEuOTE3IDUuNTRjMCA0LjU3OC0zLjcxNCA4LjI0NC04LjI4IDguMjQ0YTguMjI2IDguMjI2IDAgMCAxLTguMjUxLTguMjQzIDguMjI2IDguMjI2IDAgMCAxIDguMjUtOC4yNDFjNC41NjYgMCA4LjI4IDMuNjY3IDguMjggOC4yNHptLTguMjgtNC4zM2MtMS40MjEgMC0yLjYzMSAxLjkzNS0yLjYzMSA0LjMzIDAgMi4zOTcgMS4yMDggNC4zMzUgMi42MyA0LjMzNSAxLjQ1MyAwIDIuNjYtMS45MzggMi42Ni00LjMzNCAwLTIuMzk3LTEuMjA2LTQuMzMxLTIuNjYtNC4zMzF6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t,n){e.exports=n.p+"desktop/common/img/devices/safari.ebe0357a3d1fcf188ad15d1f619f2c5a.svg"},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTEwMC45NDMgNDcuMzY5YzEuMjUzIDcuMjc2LTE4LjI5OSAxNi44MDYtNDMuNjc2IDIxLjI4NC0yNS4zNzMgNC40NzgtNDYuOTU5IDIuMjA1LTQ4LjIxLTUuMDc0LTEuMjUtNy4yNzggMTguMzA3LTE2LjgwNCA0My42OC0yMS4yODEgMjUuMzc1LTQuNDggNDYuOTU3LTIuMjA4IDQ4LjIwNiA1LjA3eiIgZmlsbD0iIzAzNEVBMiIvPgogICAgICAgIDxwYXRoIGQ9Ik03Ny4wNjEgNTguMTdsLS4xMy03LjU2NmgyLjM1NXY5LjUzN0g3NS45bC0yLjM1LTcuODI2aC0uMDVsLjEzIDcuODI2aC0yLjM0di05LjUzN2gzLjUzMmwyLjE4NiA3LjU2N2guMDUzem0tNDIuODA2LTYuNjczbC0xLjMwMyA4Ljc0NGgtMi41NjhsMS43NjMtOS42MzdoNC4yMzFsMS43NTYgOS42MzdoLTIuNTU4bC0xLjI2OC04Ljc0NGgtLjA1M3ptMTEuMDkyIDYuNDc0bDEuMTc2LTcuMzY3aDMuODc5bC4yMDYgOS42MzdINDguMjNsLS4wNjMtOC42NjRoLS4wNWwtMS41OSA4LjY2NGgtMi40MTNsLTEuNTktOC42NjRoLS4wNTJsLS4wNiA4LjY2NGgtMi4zODJsLjIxLTkuNjM3aDMuODgxbDEuMTc1IDcuMzY3aC4wNXptLTE4Ljk2OS0uNDQ4Yy0uNDg5LTEuMjQ4LTMuODY4LTEuODE4LTQuMjgzLTMuNzg3LS4xLS40ODMtLjA5LS44Ny0uMDIxLTEuMzAzLjI1Mi0xLjU2OSAxLjYzNS0yLjEzNSAzLjMyNy0yLjEzNSAxLjM0NyAwIDMuMjA3LjMyOCAzLjIwNyAyLjQyN3YuNjc3aC0yLjM3MnYtLjU5NWMwLS41MjYtLjMyOS0uODc0LS44ODUtLjg3NC0uNTk1IDAtLjgwMy4zMzgtLjg2OS42NDYtLjAyMi4xMS0uMDM1LjMxNC4wMS41MDguMjcgMS4xMjggMy44OCAxLjczIDQuMjggMy43NDguMDQuMjA1LjEyNi43NS4wMSAxLjU4My0uMjI1IDEuNjA1LTEuNjQyIDIuMjAxLTMuMzYyIDIuMjAxLTEuNzg5IDAtMy40NTktLjY0OC0zLjQ1OS0yLjc5NmwuMDAyLS43NDdoMi41NTF2LjkzM2MwIC41My4zNjIuODc2Ljk1OS44NzYuNjMyIDAgLjg0Ny0uMzI3LjkyNi0uNjQ4LjA0NC0uMTguMDcyLS40OC0uMDItLjcxNHptMzAuOTMtLjAxOGMtLjQ4NC0xLjIzNS0zLjgzLTEuODAxLTQuMjQtMy43NWEzLjM2IDMuMzYgMCAwIDEtLjAyMS0xLjI4N2MuMjQ3LTEuNTU3IDEuNjE5LTIuMTE3IDMuMjkyLTIuMTE3IDEuMzM0IDAgMy4xNzguMzI2IDMuMTc4IDIuNDAzdi42N2gtMi4zNTR2LS41OWMwLS41MjItLjMyMS0uODYyLS44NzItLjg2Mi0uNTkgMC0uNzkzLjMzMS0uODYxLjY0LS4wMjMuMTA0LS4wMzYuMzA3LjAwOS41LjI2NiAxLjExNiAzLjg0IDEuNzEyIDQuMjM5IDMuNzExLjA0MS4yMDIuMTIzLjc0LjAwOCAxLjU2Ni0uMjIxIDEuNTkxLTEuNjI1IDIuMTgtMy4zMjcgMi4xOC0xLjc3MSAwLTMuNDI2LS42NDMtMy40MjYtMi43N2wuMDA0LS43MzZoMi41MjRsLjAwMi45MjVjMCAuNTE3LjM2Ljg2My45NDcuODYzLjYyOSAwIC44NDEtLjMyMi45MTktLjY0MS4wNDItLjE4MS4wNzMtLjQ3My0uMDIxLS43MDV6bTcuOTkgMS4yOTVjLjY2IDAgLjg2Ni0uNDYzLjkxMS0uN2EyLjAzIDIuMDMgMCAwIDAgLjAyMi0uMzY4VjUwLjZoMi40MDZ2Ni45MTNjLjAwNS4xNzgtLjAxMi41NDItLjAyLjYzMy0uMTcgMS44LTEuNTczIDIuMzgzLTMuMzIgMi4zODMtMS43NSAwLTMuMTU1LS41ODQtMy4zMjItMi4zODNhOC4zMzMgOC4zMzMgMCAwIDEtLjAyLS42MzNWNTAuNmgyLjQwM3Y3LjEzMmMwIC4xMjQuMDA1LjI2NS4wMjMuMzY4LjA1MS4yMzcuMjUxLjcuOTE2Ljd6bTE5Ljg0Mi0uMTAyYy42ODkgMCAuOTMtLjQ0MS45NzQtLjY5OC4wMTctLjExLjAyMi0uMjQ1LjAyMS0uMzY3di0xLjM5OWgtLjk3NnYtMS40MDdoMy4zNzN2Mi41ODdjLS4wMDMuMTgtLjAwNy4zMTMtLjAzNS42MzUtLjE1OSAxLjc1My0xLjY2IDIuMzc5LTMuMzQ1IDIuMzc5LTEuNjkgMC0zLjE4OC0uNjI2LTMuMzQ5LTIuMzc5YTcuOSA3LjkgMCAwIDEtLjAzNC0uNjM1bC4wMDItNC4wNThjMC0uMTcxLjAyMS0uNDc0LjA0LS42MzUuMjEtMS44MDEgMS42NTItMi4zOCAzLjM0LTIuMzhzMy4xNjQuNTc2IDMuMzQgMi4zOGMuMDMuMzA3LjAyLjYzNS4wMi42MzV2LjMyMWgtMi4zOTh2LS41NGMuMDAyLjAwMi0uMDAzLS4yMjktLjAzMS0uMzY2LS4wNC0uMjEzLS4yMjQtLjcwMi0uOTQ4LS43MDItLjY5NCAwLS44OTcuNDYzLS45NDguNzAyYTIuMTkgMi4xOSAwIDAgMC0uMDQuNDU1djQuNDA3Yy0uMDAyLjEyMi4wMDUuMjU2LjAyNC4zNjcuMDQyLjI1OC4yODEuNjk4Ljk3LjY5OHoiIGZpbGw9IiNGRkYiLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTM0LjI1IDQ2Yy00Ljg3NSAwLTguODQyIDMuOTY2LTguODQyIDguODQyIDAgNC44NzQgMy45NjcgOC44NCA4Ljg0MiA4Ljg0czguODQxLTMuOTY2IDguODQxLTguODRjMC00Ljg3Ni0zLjk2Ni04Ljg0Mi04Ljg0LTguODQyem0wIDE0LjUwNmMtMy4wOTIgMC01LjYwNS0yLjU0LTUuNjA1LTUuNjY0IDAtMy4xMjQgMi41MTMtNS42NjQgNS42MDUtNS42NjQgMy4wOTEgMCA1LjYwNyAyLjU0IDUuNjA3IDUuNjY0IDAgMy4xMjMtMi41MTYgNS42NjQtNS42MDcgNS42NjR6bS0xNC4yMTktNS41MThjMS4yNS45NTMgMS44ODMgMi4xNzQgMS44ODMgMy42MjUgMCAxLjM1Mi0uNjI1IDIuNjcxLTEuNzE3IDMuNjItMS4wOTcuOTQ5LTIuNjAyIDEuNDczLTQuMjQgMS40NzMtMy40MDYgMC01LjM2NC0yLjI4My01LjQ0NS0yLjM3OGwtLjI3OC0uMzMgMi41NDctMS43Mi4yMjEuMTY1Yy40MS4zMDcgMS41MiAxLjAyMiAyLjk1NiAxLjAyMiAxLjcgMCAyLjcxNi0uOTQxIDIuNzE2LTEuODUyIDAtLjM4OCAwLTEuMTk1LTMuMjAxLTIuMjEzLTEuNjQ2LS41MjItMi43NS0xLjA0LTMuNTg4LTEuNjgtMS4yNS0uOTUyLTEuODg1LTIuMTcyLTEuODg1LTMuNjI0IDAtMS4zNTIuNjI2LTIuNjcxIDEuNzE5LTMuNjE5IDEuMDk2LS45NSAyLjYtMS40NzQgNC4yMzgtMS40NzQgMy40MDYgMCA1LjM2NCAyLjI4IDUuNDQ3IDIuMzc4bC4yNzYuMzMtMi41NDUgMS43Mi0uMjItLjE2NWMtLjQxMy0uMzA4LTEuNTI2LTEuMDIzLTIuOTU4LTEuMDIzLTEuNyAwLTIuNzE1Ljk0My0yLjcxNSAxLjg1MyAwIC4zODggMCAxLjE5NSAzLjIwMSAyLjIxMyAxLjY0Ni41MjIgMi43NSAxLjA0IDMuNTg4IDEuNjh6bTM4LjcyIDEuMTF2LTkuNDY1aDMuMTU5VjYzLjUybC0xMC42NTktOS45MnY5LjQwNmgtMy4xNThWNDYuMTZsMTAuNjU4IDkuOTM2em0xNy0xMC4wMzNjNC44NzYgMCA4Ljg0MiAzLjk2NiA4Ljg0MiA4Ljg0MSAwIDQuODc1LTMuOTY2IDguODQxLTguODQyIDguODQxLTQuODc0IDAtOC44NC0zLjk2Ni04Ljg0LTguODQgMC00Ljg3NiAzLjk2Ni04Ljg0MiA4Ljg0LTguODQyem0wIDE0LjUwNWMzLjA5IDAgNS42MDYtMi41NDEgNS42MDYtNS42NjQgMC0zLjEyMi0yLjUxNS01LjY2My01LjYwNi01LjY2My0zLjA5MiAwLTUuNjA1IDIuNTQtNS42MDUgNS42NjNzMi41MTMgNS42NjQgNS42MDUgNS42NjR6bTE0LjIxOS01LjgxYy0xLjI1LS45NTQtMS44ODItMi4xNzMtMS44ODItMy42MjUgMC0xLjM1Mi42MjUtMi42NyAxLjcxNy0zLjYyIDEuMDk2LS45NSAyLjYwMS0xLjQ3NCA0LjIzOS0xLjQ3NCAzLjQwNiAwIDUuMzY0IDIuMjgzIDUuNDQ1IDIuMzc5bC4yNzguMzMtMi41NDYgMS43Mi0uMjIyLS4xNjVjLS40MS0uMzA3LTEuNTItMS4wMjItMi45NTUtMS4wMjItMS43IDAtMi43MTcuOTQxLTIuNzE3IDEuODUyIDAgLjM4OCAwIDEuMTk1IDMuMjAyIDIuMjEzIDEuNjQ2LjUyMiAyLjc1IDEuMDQgMy41ODggMS42OEM5OS4zNjcgNTUuOTggMTAwIDU3LjIgMTAwIDU4LjY1YzAgMS4zNTQtLjYyNiAyLjY3Mi0xLjcxOCAzLjYyLTEuMDk2Ljk1LTIuNiAxLjQ3NC00LjIzOCAxLjQ3NC0zLjQwNyAwLTUuMzY0LTIuMjgxLTUuNDQ1LTIuMzc4bC0uMjc5LS4zMyAyLjU0Ny0xLjcyLjIyLjE2NWMuNDEyLjMwNyAxLjUyNSAxLjAyMiAyLjk1NyAxLjAyMiAxLjcgMCAyLjcxNi0uOTQyIDIuNzE2LTEuODUzIDAtLjM4OCAwLTEuMTk1LTMuMjAyLTIuMjExLTEuNjQ2LS41MjMtMi43NS0xLjA0LTMuNTg4LTEuNjh6IiBmaWxsPSIjRkZGIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64, "
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNMCAwaDExMHYxMTBIMHoiLz4KICAgICAgICA8cGF0aCBkPSJNODAuMjYgNTEuNDYzdi04LjM3aDYuNjA4djkuMjUxYzAgMy45MDktNi42MDggNC43MDgtNi42MDgtLjg4em0tOS4xMDQgNS44NzRWNDYuMDNjMC0xLjc4NiAxLjU2LTIuOTM3IDMuMzc3LTIuOTM3aDIuNzl2OS44MzljMCA3LjA0NiAxMi42MjkgNy4xMDIgMTIuNjI5LS4xNDdWNDMuMjRoMy42N2MxLjMgMCAyLjM1IDEuNTI4IDIuMzUgMi45Mzd2MTEuNmMwIDIuMzM5LTEuOTAzIDMuOTY1LTQuMjU4IDMuOTY1aC0xNS44NmMtMi43OSAwLTQuNjk4LTEuNjQ0LTQuNjk4LTQuNDA1eiIgZmlsbD0iIzAwOUFDNyIvPgogICAgICAgIDxwYXRoIGQ9Ik02NC41NTYgNjcuMjU2aC00LjkxOVY1MS4zNWg0LjkxOXYxNS45MDd6bS01LjM5NS0yMS40MmMwLTEuNTQ4IDEuMzEtMi43NzcgMi44OTYtMi43NzcgMS42MjYgMCAyLjkzNSAxLjIzIDIuOTM1IDIuNzc2IDAgMS41NDctMS4zMDkgMi43NzctMi45MzUgMi43NzctMS41ODcgMC0yLjg5Ni0xLjI3LTIuODk2LTIuNzc3em0tNC41NjIgMjEuNDJINDkuNjhWNTEuMzVoNC45MnYxNS45MDd6bS01LjM5NS0yMS40MmMwLTEuNTQ4IDEuMjctMi43NzcgMi44NTctMi43NzcgMS42NjYgMCAyLjk3NSAxLjIzIDIuOTc1IDIuNzc2IDAgMS41NDctMS4zMSAyLjc3Ny0yLjk3NSAyLjc3Ny0xLjU4NyAwLTIuODU3LTEuMjctMi44NTctMi43Nzd6bS03LjMzOC0xLjQyOWg1LjE5NnMtNC45NTggMTcuOTctNS42MzIgMjAuMDcyYy0uNTU2IDEuNjI3LTEuNzg2IDIuOTM2LTMuNjUgMi45MzYtMi4xMDIgMC0zLjA5NC0xLjU0Ny0zLjU3LTIuOTM2LS40MzYtMS40MjgtMy42NS0xMy4yODgtMy42NS0xMy4yODhzLTMuMjEzIDExLjg2LTMuNjg5IDEzLjI4OGMtLjQzNiAxLjM4OS0xLjQyOCAyLjkzNi0zLjU3IDIuOTM2LTEuODI0IDAtMy4wOTQtMS4zMS0zLjYxLTIuOTM2LS42NzQtMi4xMDItNS42MzItMjAuMDcyLTUuNjMyLTIwLjA3Mmg1LjE1N2w0LjMyMyAxNi44NnMzLjI5My0xMi42NTUgMy44MDgtMTQuNDhjLjU1Ni0xLjc4NSAxLjYyNy0yLjU3OCAzLjIxNC0yLjU3OCAxLjU0NyAwIDIuNjU3Ljc5MyAzLjE3MyAyLjU3OC41NTUgMS44MjUgMy44NDggMTQuNDggMy44NDggMTQuNDhsNC4yODQtMTYuODZ6IiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz4KICAgIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTI3IDM0LjkyOWwyMi44ODUtMy4xMDcuMDEgMjIuMDA2LTIyLjg3NC4xM0wyNyAzNC45Mjh6bTIyLjg3NSAyMS40MzVsLjAxNyAyMi4wMjYtMjIuODc0LTMuMTM1LS4wMDItMTkuMDM5IDIyLjg1OS4xNDh6bTIuNzc0LTI0Ljk0OUw4Mi45OTMgMjd2MjYuNTQ4bC0zMC4zNDQuMjRWMzEuNDE2ek04MyA1Ni41NzFMODIuOTkzIDgzbC0zMC4zNDQtNC4yNy0uMDQzLTIyLjIwOCAzMC4zOTQuMDV6IiBmaWxsPSIjMERBREVBIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEwIiBoZWlnaHQ9IjExMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZmlsbD0iIzE5MUExQyIgZD0iTTAgMGgxMTB2MTEwSDB6Ii8+CiAgICAgICAgPHBhdGggZD0iTTI3IDM0LjkyOWwyMi44ODUtMy4xMDcuMDEgMjIuMDA2LTIyLjg3NC4xM0wyNyAzNC45Mjh6bTIyLjg3NSAyMS40MzVsLjAxNyAyMi4wMjYtMjIuODc0LTMuMTM1LS4wMDItMTkuMDM5IDIyLjg1OS4xNDh6bTIuNzc0LTI0Ljk0OUw4Mi45OTMgMjd2MjYuNTQ4bC0zMC4zNDQuMjRWMzEuNDE2ek04MyA1Ni41NzFMODIuOTkzIDgzbC0zMC4zNDQtNC4yNy0uMDQzLTIyLjIwOCAzMC4zOTQuMDV6IiBmaWxsPSIjRTgxMTIzIi8+CiAgICA8L2c+Cjwvc3ZnPgo="
},function(e,t){
e.exports="data:image/svg+xml;base64, "
},function(e,t,n){"use strict";function i(e){var t=e.product;return a.hasOwnProperty(t)||(a[t]=r.some(function(e){return e.test(t)})),a[t]}t.a=i;var r=[/alexa/i,/sonos/i],a={}},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=f.q(i),a=f.p(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===f.l||i===f.e||i===f.g)){
var l=new p.default([],{server:t.server,provider:t.provider,channel:t.channel});return l.fetch({url:s}).then(function(){var e=l.models.map(h.a);return u.a.Deferred().resolve(e).promise()})}return u.a.Deferred().resolve([Object(h.a)(t)]).promise()}if(f.o(i).id===a.id){var c=d.join([t.get("key"),"children"]),v=new p.default([],{server:t.server,provider:t.provider,channel:t.channel});return v.fetch({url:c}).then(function(){var e=v.models.map(h.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(6),l=n.n(s),c=n(13),u=n.n(c),d=n(19),p=n(311),h=n(1902),f=n(26)},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(7),a=n.n(r),o=n(973),s=0;t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(17),o=n(16),s=n(698),l=a.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:{key:o.a.string,playQueueID:o.a.string,isLocal:o.a.boolean,type:o.a.string,repeat:o.a.boolean,own:o.a.boolean,isUpdatePending:o.a.boolean,playQueueShuffled:o.a.boolean,playQueueSelectedItemID:o.a.string},sessionRelations:{playQueueItems:{relationClass:s.a}},derivedAttrs:{playQueueTotalCount:function(){
return this.get("playQueueItems").length},length: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.c)("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.c)("remoteCastPlayerManager").sendMessage({type:S.n})}function a(e){Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.a})}function o(e){
Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.d})}function s(e,t){C.playItem(e,t);var n=Object(I.c)("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.c)("remoteCastPlayerManager").sendMessage({type:S.c})}function c(e){C.pause(e),Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.b})}
function u(e,t){C.seek(e,t),Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.f,currentTime:t})}function d(e,t,n){Object(I.c)("remoteCastPlayerManager").setVolume(n)}function p(e,t){C.changeQualityIndex(e,t);var n=D.a.getQualityByIndex(t);Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.h,bitrate:n.bitrate})}function h(e,t,n){Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.j,stream:{type:t,id:n}})}function f(e,t,n){
Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.k,subtitleSize:n}),t.save("subtitleSize",n)}function v(e,t,n){Object(I.c)("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.c)("remoteCastPlayerManager").sendMessage({type:S.i,repeat:Object(M.a)(t)})}function y(e){Object(I.c)("remoteCastPlayerManager").sendMessage({type:S.e})}function b(e){
Object(I.c)("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(996),M=n(997),D=n(141),C=n(532)},function(e,t,n){"use strict";function i(e){
var t=e.get("playQueue");return Object(M.d)(t.get("type"))}function r(e){O.startPlayback(e);var t=Object(S.c)("remotePlexPlayerManager");e.get("playQueue").set("own",!1),t.startPlayback(e)}function a(e){var t=Object(S.c)("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.c)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/skipNext",{type:n})}function s(e){
var t=Object(S.c)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/skipPrevious",{type:n})}function l(e,t){O.playItem(e,t);var n=Object(S.c)("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.c)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/play",{type:n})}
function u(e){O.pause(e);var t=Object(S.c)("remotePlexPlayerManager"),n=i(e);t.sendCommand("/player/playback/pause",{type:n})}function d(e,t){O.seek(e,t);var n=Object(S.c)("remotePlexPlayerManager"),r=i(e);n.seek({type:r,offset:1e3*t})}function p(e,t,n){var r=Object(S.c)("remotePlexPlayerManager"),a=i(e);r.changeVolume({type:a,volume:n})}function h(e,t){}function f(e,t,n){var r,a=Object(S.c)("remotePlexPlayerManager"),o=i(e),s=C.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.c)("remotePlexPlayerManager"),r=i(e),a=e.get("repeatAll"),o=e.get("repeatOne"),s=D.b;a&&(s=o?D.c:D.a),n.sendCommand("/player/playback/setParameters",{type:r,repeat:s})}function b(e){var t=Object(S.c)("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.c)("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(379),D=n(449),C=n(151),O=n(532)},function(e,t,n){"use strict";function i(e){
var t=e.get("type"),n="channelDirectory"===t,i=n||Object(r.t)(t)||e.get("isFolder");return void 0===e.length&&!i}var r=n(26);t.a=i},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(1908),c=n.n(l),u=a.a.ItemView.extend({className:"player-slider",template:c.a,dragging:!1,ui:{thumb:".player-slider-thumb",track:".player-slider-track",progress:".player-slider-progress"},events:{mousedown:"onMouseDown",touchstart:"onTouchStart"},onlyAfterRender:["displayValue"],
initialize:function(e){s.a.bindAll(this,"onMouseMove","onMouseUp","onTouchMove","onTouchEnd"),this.$document=r()(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){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(13),r=n.n(i),a=n(21),o=n(18),s=n(707),l=n(709),c=n(1920),u=n.n(c),d=a.a.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:u.a,events:{"click .info-btn":"onInfoClick"},initialize:function(e){this.mediaActions=new s.a({},{item:this.model}),r()(".dropdown.open .dropdown-toggle").dropdown("toggle")},serializeData:function(){return{}},bindingsModel:"mediaActions",bindings:{".delete-btn":{
modelAttribute:"showDelete",manual:!0,autohide:!0},".info-btn":{modelAttribute:"showInfo",manual:!0,autohide:!0}},onClose:function(){this.mediaActions.stopListening()},onInfoClick:function(e){e.preventDefault(),o.a.trigger("show:modal",new l.a({model:this.model}))}});t.a=d},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(999),a=n.n(r),o=n(1914),s=n.n(o),l={h264:10,
hevc:30};t.a=i},function(e,t,n){n(1913),e.exports=n(106).Number.isFinite},function(e,t,n){var i=n(150),r=n(201).isFinite;i(i.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){e.exports={default:n(1915),__esModule:!0}},function(e,t,n){n(1916),e.exports=n(106).Number.isNaN},function(e,t,n){var i=n(150);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){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>'+N(i(n(4)).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="'+N((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(33)).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+=" "+N(i(n(4)).call(e,"Delete File",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=" "+N(i(n(4)).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+=" "+N((n=e&&e.file,typeof n===L?n.apply(e):n))+" "}function v(e,t){var r="";return r+=" "+N(i(n(1919)).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="'+N(i(n(4)).call(e,"Please check the permissions for this file.",{hash:{},data:t}))+'">'+N(i(n(4)).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function y(e,t){var r=""
;return r+=' <span class="label label-danger" data-toggle="tooltip" title="'+N(i(n(4)).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+N(i(n(4)).call(e,"Unavailable",{hash:{},data:t}))+"</span> "}function b(e,t,a){var o,s="";return s+=' <div class="media"> <div class="props"> <h4>'+N(i(n(4)).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">'+N(i(n(4)).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+N((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>'+N(i(n(4)).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,T,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(33)).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>"+N(i(n(4)).call(e,"Video",{hash:{},data:t}))+"</h4> "}function C(e,t){var r;return r=i(n(33)).call(e,e&&e.streamType,"2",{hash:{},inverse:k.program(30,P,t),fn:k.program(28,O,t),data:t}),r||0===r?r:""}function O(e,t){var r=""
;return r+=" <h4>"+N(i(n(4)).call(e,"Audio",{hash:{},data:t}))+"</h4> "}function P(e,t){var r;return r=i(n(33)).call(e,e&&e.streamType,"3",{hash:{},inverse:k.noop,fn:k.program(31,j,t),data:t}),r||0===r?r:""}function j(e,t){var r="";return r+=" <h4>"+N(i(n(4)).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function T(e,t){var r="";return r+=' <div class="props"> <h4>'+N(i(n(4)).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function w(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="'+N((r=e&&e.url,typeof r===L?r.apply(e):r))+'" target="_blank">'+N(i(n(4)).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,A="",N=this.escapeExpression,L="function",k=this
;return A+='<div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><i class="glyphicon remove-2"></i></button> <h4 class="modal-title"><i class="modal-icon glyphicon circle-info"></i> '+N(i(n(4)).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)&&(A+=x),A+='"> ',x=r.if.call(t,t&&t.hasFiles,{hash:{},inverse:k.noop,fn:k.program(3,l,o),data:o}),(x||0===x)&&(A+=x),A+=" ",x=r.each.call(t,t&&t.media,{hash:{},inverse:k.noop,fn:k.programWithDepth(20,b,o,t),data:o}),(x||0===x)&&(A+=x),A+=" </div> </div> ",x=r.if.call(t,t&&t.key,{hash:{},inverse:k.noop,fn:k.programWithDepth(35,w,o,t),data:o}),(x||0===x)&&(A+=x),A+=" </div> </div> "})},function(e,t,n){var i=n(19).getLastSegment,r=n(189);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){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+='<li><a class="info-btn" href="#" tabindex="-1">'+(0,this.escapeExpression)(i(n(4)).call(t,"Get Info",{hash:{},data:o}))+"</a></li> "})},function(e,t,n){"use strict";var i=n(21),r=n(535),a=n(1922),o=n.n(a),s=i.a.ItemView.extend({className:"hidden",template:o.a,bindings:{".media-progress-pct":{
modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var n=this.model,i="track"===n.get("type")?0:Object(r.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){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){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="media-poster-container ',n=r.unless.call(e,e&&e.showActions,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='" href="'+m((n=e&&e.url,typeof n===g?n.apply(e):n))+'"> '}function l(e,t){return"hide-actions"}function c(e,t){var n,i="";return i+=' <div class="media-poster-container ',
n=r.unless.call(e,e&&e.showActions,{hash:{},inverse:v.noop,fn:v.program(2,l,t),data:t}),(n||0===n)&&(i+=n),i+='"> '}function u(e,t){return"hidden"}function d(e,t){return" </a> "}function p(e,t){return" </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var h,f="",v=this,g="function",m=this.escapeExpression;return h=r.if.call(t,t&&t.url,{hash:{},inverse:v.program(4,c,o),fn:v.program(1,s,o),data:o}),(h||0===h)&&(f+=h),
f+=' <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 ',h=r.unless.call(t,t&&t.showStopButton,{hash:{},inverse:v.noop,fn:v.program(6,u,o),data:o}),(h||0===h)&&(f+=h),f+='"> <button class="stop-btn media-poster-btn btn-link" tabindex="-1"> <i class="glyphicon remove-2"></i> <span class="media-poster-btn-text">'+m(i(n(4)).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">'+m(i(n(4)).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">'+m(i(n(4)).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> ',h=r.if.call(t,t&&t.url,{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){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(4)).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(4)).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=" "+v(i(n(4)).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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(90),c=n(15),u=n(40),d=n(108),p=n(3),h=n(161),f=n(1927),v=n(176),g=n(1940),m=n.n(g),y=a.a.Layout.extend({
className:"sync-container",template:m.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=c.c("appModel");this.routeOrigin=e.routeOrigin,
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")===d.b,this.collection.length&&(this.selectedDevice||(this.selectedDevice=this.collection.first()),this.fetchTranscodeJobs())},serializeData:function(){return{showDeviceDropdown:this.collection.length>0,
showCloudSyncFilterBarButton:this.selectedDevice&&this.selectedDevice.get("isCloudSync"),shared:this.shared,hasTouchScreen:l.a.hasTouchScreen,signedIn:this.signedIn,allowSync:this.allowSync,sync:this.model.get("sync"),selectedDevice:this.selectedDevice?this.selectedDevice.toJSON():null,devices:this.collection.toJSON(),plexPassInfo:this.getPlexPassInfo()}},fetchTranscodeJobs:function(){this.transcodeJobs.fetch({reset:!0,scope:"page"}),
this.transcodeJobTimeout=setTimeout(s.a.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay)},showList:function(){this.selectedDevice?this.container.show(new f.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(p.default)("The server needs a Plex Pass to use sync."),buttonText:Object(p.default)("Learn More"),target:"_blank",showButton:!this.shared}:{
url:Object(v.a)(this.model.id,"settings","general"),message:Object(p.default)("The server needs to be signed in with a Plex Pass to use sync."),buttonText:Object(p.default)("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},onSharedChange:function(e,t){this.shared=t,this.render()},onDeviceDropdownClick:function(e){e.preventDefault();var t=r()(e.currentTarget).data("id")
;this.selectedDevice=this.collection.get(t),Object(h.a)(this.routeOrigin,{serverID:this.model.id,deviceID:t,replace:!0,trigger:!1}),this.render()},onDeviceClick:function(e){e.preventDefault();var t=r()(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(),r()(e.currentTarget).toggleClass("selected"),this.$el.toggleClass("force-hover")},
onRefreshClick:function(e){e.preventDefault();var t=u.a.execute("refreshSyncLists",{server:this.model});this.selectedDevice&&t.always(this.whenRendered(function(){this.selectedDevice.get("syncList").fetch({scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=c.c("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});t.a=y},function(e,t,n){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(323),s=n(3),l=n(1930),c=n(1939),u=n.n(c),d=i.a.Layout.extend({className:"sync-device-items-container",template:u.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:["onDebouncedSyncItemsChange"],initialize:function(e){this.server=e.server,
this.onDebouncedSyncItemsChange=a.a.debounce(this.onDebouncedSyncItemsChange,100),this.listenTo(this.model,{"change:syncList":this.onSyncListChange,"change:syncList.change:syncItems.reset":this.onDebouncedSyncItemsChange,"change:syncList.change:syncItems.update":this.onDebouncedSyncItemsChange}),this.fetchSyncList()},fetchSyncList:function(){var e=this.model.get("syncList");e&&e.fetch({scope:"page"}).always(this.onDebouncedSyncItemsChange)},onSyncListChange:function(){this.fetchSyncList()},
onDebouncedSyncItemsChange:function(){var e=this.model.get("syncList"),t=void 0;e&&(t=e.clone(),t.resetToServer(this.server.id)),this.ui.loading.addClass("hidden");var n=!t||0===t.getCollection().length;this.ui.empty.toggleClass("hidden",!n);var i=!t||t.get("isActive");if(this.ui.deviceMessage.toggleClass("hidden",i),!i){var r=t.device,a=r.get("lastSeenAt")
;a&&this.ui.deviceMessageText.text(Object(s.default)("{1} was last seen {2}. Syncing will resume next time you launch Plex on this device.",r.get("name"),Object(o.a)(a)))}t?this.list.show(new l.a({collection:t.getCollection(),itemViewOptions:{server:this.server}})):this.list.close()}});t.a=d},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(48),a=n.n(r),o=n(1929);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";var i=n(86),r=n(1931),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(77),r=n(21),a=n(7),o=n.n(a),s=n(18),l=n(40),c=n(319),u=n(312),d=n(3),p=n(986),h=n(222),f=n(1932),v=n(1933),g=n(946),m=n(1938),y=n.n(m),b=r.a.Layout.extend({tagName:"li",
className:"poster-item media-tile-list-item sync-tile-list-item",template:y.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,r=150;"episode"===t?t="show":"clip"===t||"userPlaylistItem"===t?r=250:"directory"===t&&(t="audio"===n?"track":"photo"===n?"photo":"movie"),
this.$el.addClass(t),this.image=new h.a({server:this.server,type:t,width:r}),this.progressModel=new i.c.Model({current:0});var a=this.server.get("desktop").get("transcodeJobs");this.metadataItems=new f.a([],{server:this.server,device:this.model.device,syncItemId:this.model.id}),this.listenTo(this.metadataItems,"reset",this.onMetadataItemsReset),this.listenTo(a,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),
this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(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 d=0,p=c.length;d<p;d++)for(var h=c[d].Part,f=0,v=h.length;f<v;f++){var g=h[f],m=u.a.getSyncStateFromPart(g);u.a.failedRegex.test(m)&&(i="failed"),u.a.processingRegex.test(m)&&(i="processing"),u.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 p.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(c.a)(n.get("remaining"));if(this.progressModel.set("progress",i),"download"===r)this.progressModel.set("text",i.toString()+"%"),this.ui.transcodeTimeRemaining.text(Object(d.default)("Downloading"));else if("upload"===r)this.progressModel.set("text",i.toString()+"%"),this.ui.transcodeTimeRemaining.text(Object(d.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(),s.a.trigger("show:modal",new v.a({model:this.model,collection:this.metadataItems}))},onEditClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),s.a.trigger("show:modal",new g.a({model:this.model
}))},onDeleteClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),l.a.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});t.a=b},function(e,t,n){"use strict";var i=n(24),r=n(65),a=n(121),o=n(1001),s=i.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(a.b)(e):e}});t.a=s},function(e,t,n){"use strict"
;var i=n(1934),r=n(85),a=n(1937),o=n.n(a),s=r.a.extend({name:"syncStatusModal",template:o.a,regions:{list:".sync-status-list-container"},onRender:function(){r.a.prototype.onRender.apply(this,arguments),this.list.show(new i.a({collection:this.collection,itemViewOptions:{syncItem:this.model}}))}});t.a=s},function(e,t,n){"use strict";var i=n(86),r=n(1935),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(21),r=n(7),a=n.n(r),o=n(319),s=n(312),l=n(3),c=n(222),u=n(1936),d=n.n(u),p=i.a.ItemView.extend({tagName:"li",className:"sync-status-list-item",template:d.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 c.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(a.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(o.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 l=r[a],c=s.a.getSyncStateFromPart(l);s.a.failedRegex.test(c)&&(e=s.a.getSyncStateContextFromPart(l)),s.a.processingRegex.test(c)&&(e="downloading"===c?"downloading":"processing"),s.a.waitingRegex.test(c)&&"processing"!==e&&(e=l.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(4)).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+d(i(n(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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 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(4)).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){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){
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(4)).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){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">'+M((n=e&&e.selectedDevice,n=null==n||!1===n?n:n.name,typeof n===S?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:D.noop,fn:D.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="'+M((a=e&&e.id,typeof a===S?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+M((a=e&&e.name,typeof a===S?a.apply(e):a))+"</span>",a=i(n(33)).call(e,(a=r&&r.selectedDevice,null==a||!1===a?a:a.id),e&&e.id,{hash:{},inverse:D.noop,fn:D.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:D.program(12,f,t),fn:D.program(10,h,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function h(e,t){return' <div class="row"> <div class="sync-device-container col-sm-12 col-md-12"></div> </div> '}function f(e,t){var r=""
;return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+M(i(n(4)).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function v(e,t){var n,i="";return i+=" ",n=r.if.call(e,e&&e.sync,{hash:{},inverse:D.program(18,y,t),fn:D.program(15,g,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function g(e,t){var n,i="";return i+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+M((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.message,
typeof n===S?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:D.noop,fn:D.program(16,m,t),data:t}),(n||0===n)&&(i+=n),i+='"> <a class="btn btn-sm btn-primary" href="'+M((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.url,typeof n===S?n.apply(e):n))+'" target="'+M((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.target,typeof n===S?n.apply(e):n))+'">'+M((n=e&&e.plexPassInfo,n=null==n||!1===n?n:n.buttonText,
typeof n===S?n.apply(e):n))+"</a> </p> </div> "}function m(e,t){return"hidden"}function y(e,t){var r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+M(i(n(4)).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 b,I="",S="function",M=this.escapeExpression,D=this;return I+='<div class="filter-bar"> ',b=r.if.call(t,t&&t.showDeviceDropdown,{hash:{},inverse:D.noop,
fn:D.program(1,s,o),data:o}),(b||0===b)&&(I+=b),I+=' <div class="filter-bar-right"> ',b=r.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:D.noop,fn:D.program(5,u,o),data:o}),(b||0===b)&&(I+=b),I+=" ",b=r.if.call(t,t&&t.showCloudSyncFilterBarButton,{hash:{},inverse:D.noop,fn:D.program(7,d,o),data:o}),(b||0===b)&&(I+=b),I+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',b=r.if.call(t,t&&t.allowSync,{hash:{},inverse:D.program(14,v,o),
fn:D.program(9,p,o),data:o}),(b||0===b)&&(I+=b),I+=" "})},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}function r(){return Object(o.createSelector)(function(e,t){return t.settingsSection},function(e,t){return t.settingsGroup},Object(c.a)(),Object(l.a)(),function(e,t,n,r){var a=i(n,e,t);return{isInstallingServerUpdate:!(!r||!r.isInstallingServerUpdate),isUnavailable:!(!r||!r.isUnavailable),
isUnauthorized:!(!r||!r.isUnauthorized),isHostedHttps:s.a.isHostedHttps,hasHttpsConnections:!(!r||!r.hasHttpsConnections),isSettingAccessible:!!a,isSettingsPending:!(!r||!r.desktop.isSettingsPending),friendlyName:r?r.friendlyName:"",pageComponent:a&&a.pageComponent,paneComponent:a&&a.paneComponent}})}var a=n(11),o=n(5),s=(n.n(o),n(90)),l=n(34),c=n(1002),u=n(2254);t.a=Object(a.b)(r)(u.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e){
return e?e.desktop.settings:[]})}t.a=i;var r=n(5),a=(n.n(r),n(34))},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID;return a()(v.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()(p.a,{className:y.a.upsell,icon:"plex-icon-marketing-dvr-560",title:Object(u.default)("Introducing Live TV & DVR"),
text:Object(u.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()(d.a,{
message:Object(u.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:c.a,kind:f.b.PRIMARY,to:"https://support.plex.tv/articles/225877427-supported-dvr-tuners-and-antennas/",target:"_blank"},{open:"openLinkUnsupported",
close:"closeLinkUnsupported",component:c.a,kind:f.b.PRIMARY,to:"https://support.plex.tv/articles/community-supported-tuners/",target:"_blank"}]})),i?a()(l.a,{kind:f.b.PRIMARY,size:f.e.LARGE,onPress:r},void 0,Object(u.default)("Set Up Plex DVR")):a()(h.a,{serverEntityID:t,modalMetricsProperties:{context:"dvrSetup"}})),i&&a()(g.a,{serverEntityID:t,hasDVRFeature:i}))})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(42)),c=n(20),u=n(3),d=n(179),p=n(1003),h=n(1004),f=n(23),v=n(712),g=n(2083),m=n(2110),y=n.n(m);t.a=i},function(e,t,n){e.exports={default:n(1945),__esModule:!0}},function(e,t,n){n(1946),e.exports=n(106).Object.setPrototypeOf},function(e,t,n){var i=n(150);i(i.S,"Object",{setPrototypeOf:n(1947).set})},function(e,t,n){var i=n(300),r=n(299),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(635)(Function.call,n(906).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(1949),__esModule:!0}},function(e,t,n){n(1950);var i=n(106).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(150);i(i.S,"Object",{create:n(647)})},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(53),a=n.n(r),o=n(6),s=n.n(o),l=n(1952)},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(1953),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(1954);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={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={
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(42)),f=n(3),v=n(450),g=n(23),m=n(176),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.hasPlexSubscription;return t?t&&n?Object(f.default)("Claim Server"):t&&!n?Object(f.default)("Get a Plex Pass"):void 0:Object(f.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.hasPlexSubscription;if(o&&a)return null;var s=this.state.isPlexPassModalOpen,l=i&&!o,c=Object(m.a)(t,"settings","general");return r()(h.a,{kind:g.b.PRIMARY,size:g.e.LARGE,to:l?void 0:c,onPress:l?this.onPlexPassPress:void 0},void 0,this.getButtonText(),l&&r()(v.a,{metricsProperties:n,isOpen:s,onModalClose:this.onPlexPassModalClose}))},t}(p.Component);t.a=y},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(122),v=n.n(f),g=n(537),m=n(452),y=n(269),b=n(453),I=n(52),S=n(27),M=n(454),D=n.n(M),C=n(325),O=n(1972),P=n.n(O),j=Object(y.a)(D.a.modalSpeed),T={appear:P.a.enter,appearActive:P.a.enterActive,enter:P.a.enter,enterActive:P.a.enterActive,leave:P.a.leave,leaveActive:P.a.leaveActive},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.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===C.j?b.e(e):t===C.e&&(e.preventDefault(),e.stopPropagation(),i.props.onModalClose(),b.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(S.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(){b.f(v.a.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(b.d,j),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()(g.a,{isOpen:o,closeTimeout:j},void 0,r()(m.a,{className:P.a.modalContainer,transitionName:T,transitionAppearTimeout:j,transitionEnterTimeout:j,transitionLeaveTimeout:j},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||P.a[a],ref:"modal"},i))))},t}(p.Component);w.defaultProps={backdropClassName:P.a.modalBackdrop,size:I.MEDIUM,preventCloseOnBackdropPress:!1},t.a=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(!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(1961),h=i(p),f=n(1965),v=i(f),g=n(1006),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(1962),c=i(l),u=n(0),d=i(u),p=n(1),h=i(p),f=n(1963),v=(i(f),n(1964)),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(1966),u=i(c),d=n(1968),p=i(d),h=n(1969),f=i(h),v=n(1970),g=n(0),m=i(g),y=n(1),b=i(y),I=n(122),S=n(1006),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(1967),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(1005),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(1005),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){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(7),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"
;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,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(5),f=(n.n(h),n(19)),v=n(154),g=n(204),m=n(1975),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.g})(b)},function(e,t,n){"use strict";var i=n(6),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(42),m=n(20),y=n(59),b=n(82),I=n(78),S=n(27),M=n(19),D=n(76),C=n(3),O=n(539),P=n(31),j=n(95),T=n(23),w=n(1008),E=n.n(w),x=n(1982),A=n.n(x),N=n(1983),L=n.n(N),k=n(1009),_=n.n(k),R=n(1984),z=n.n(R),U=n(1985),B=n.n(U),F=n(1010),V=n(1987),H=n.n(V),Q=o()(P.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(S.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()(j.a,{onModalClose:d},void 0,o()(I.a,{className:H.a.header},void 0,o()("div",{className:H.a.plexPassTitle},void 0,Object(C.default)("Plex Pass")),Object(C.default)("Enhance your Plex experience with exclusive premium features")),o()(y.a,{innerClassName:H.a.body},void 0,o()(F.a,{img:_.a,title:Object(C.default)("Mobile Sync"),
description:Object(C.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),o()(F.a,{img:L.a,title:Object(C.default)("Live TV & DVR"),description:Object(C.default)("Connect a tuner and antenna to access free OTA broadcasts")}),o()(F.a,{img:B.a,title:Object(C.default)("Trailers & Extras"),description:Object(C.default)("See movie trailers, cast interviews, and other bonus features")}),o()(F.a,{img:E.a,title:Object(C.default)("Camera Upload"),
description:Object(C.default)("Sync photos from your mobile devices to Plex Media Server")}),o()(F.a,{img:z.a,title:Object(C.default)("Automagic phototagging"),description:Object(C.default)("Auto-tag your photos to easily classify and find photos in libraries of any size")}),o()(F.a,{img:A.a,title:Object(C.default)("Gracenote Music Magic"),description:Object(C.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")}),o()("div",{className:H.a.moreFeatures
},void 0,o()(m.a,{className:H.a.link,to:i,target:"_self"},void 0,Object(C.default)("...plus more exclusive features!")))),o()(b.a,{className:H.a.footer},void 0,l&&o()("div",{className:H.a.spinnerContainer},void 0,Q),o()("div",{className:(H.a.plansContainer||"")+" "+(l&&H.a.isPlansPending||""||"")},void 0,!l&&c&&s.map(function(e){return v.a.createElement(O.a,r()({key:e.id},t,{action:D.W,plan:e.id}),o()(g.a,{className:H.a.planButton,to:M.join(n,{plan:e.id,continue:window.location.href}),
target:"_self",kind:T.b.PRIMARY,size:T.e.LARGE},void 0,e.formattedPrice," \u2014 ",e.name))}),!l&&u&&v.a.createElement(O.a,r()({},t,{action:D.W,plan:"unknown"}),o()(g.a,{className:H.a.planButton,to:n,target:"_self",kind:T.b.PRIMARY,size:T.e.LARGE},void 0,Object(C.default)("Subscribe")))),o()("div",{},void 0,Object(C.default)("Subscribe today"),o()("span",{className:H.a.linkSeparator},void 0,"\u2014"),v.a.createElement(O.a,r()({},t,{action:D.x}),o()(m.a,{className:H.a.link,to:a,target:"_self"
},void 0,Object(C.default)("or give Plex Pass as a gift!"))))))},t}(f.Component);t.a=Y},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",compactScroller:"Scroller-compactScroller-rzREb"}},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={modalHeader:"ModalHeader-modalHeader-1Kf9R"}},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,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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(1981),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="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0IDQpIj4KICAgIDxwYXRoIGQ9Ik0xMi41MzIgMTUuMjcyQzExLjIzMiAxNi41NzIgMTEuMjMyIDE4LjY4OCAxMi41MzIgMTkuOTg3IDEzLjE2MyAyMC42MTYgMTMuOTk5IDIwLjk2MiAxNC44ODkgMjAuOTYyIDE1Ljc3OSAyMC45NjIgMTYuNjE2IDIwLjYxNSAxNy4yNDYgMTkuOTg3IDE4LjU0NiAxOC42ODcgMTguNTQ2IDE2LjU3MSAxNy4yNDYgMTUuMjcyIDE1Ljk4NSAxNC4wMTUgMTMuNzkzIDE0LjAxNSAxMi41MzEgMTUuMjcyTDEyLjUzMiAxNS4yNzJ6TTE2LjMwNCAxOS4wNDRDMTUuNTQ5IDE5Ljc5OSAxNC4yMzEgMTkuNzk5IDEzLjQ3NiAxOS4wNDQgMTIuNjk2IDE4LjI2NCAxMi42OTYgMTYuOTk1IDEzLjQ3NiAxNi4yMTUgMTMuODUzIDE1LjgzOCAxNC4zNTYgMTUuNjMxIDE0Ljg5MSAxNS42MzEgMTUuNDI2IDE1LjYzMSAxNS45MjcgMTUuODM4IDE2LjMwNiAxNi4yMTUgMTcuMDgzIDE2Ljk5NSAxNy4wODMgMTguMjY0IDE2LjMwNSAxOS4wNDRMMTYuMzA0IDE5LjA0NHpNNS45MzIgMjIuODE1QzUuNjcyIDIyLjU1NSA1LjI0OSAyMi41NTUgNC45ODkgMjIuODE1IDQuNzI5IDIzLjA3NSA0LjcyOSAyMy40OTggNC45ODkgMjMuNzU4TDguNzYgMjcuNTI5QzguODkxIDI3LjY2IDkuMDYxIDI3LjcyNCA5LjIzMiAyNy43MjQgOS40MDMgMjcuNzI0IDkuNTczIDI3LjY1OSA5LjcwNCAyNy41MjkgOS45NjQgMjcuMjY5IDkuOTY0IDI2Ljg0NiA5LjcwNCAyNi41ODZMNS45MzIgMjIuODE1eiIvPgogICAgPHBhdGggZD0iTTMxLjQ2MSw1LjMzMyBMMzIuMzIyLDQuNDcyIEMzMi41ODIsNC4yMTIgMzIuNTgyLDMuNzg5IDMyLjMyMiwzLjUyOSBMMjguOTg5LDAuMTk2IEMyOC43MjksLTAuMDY0IDI4LjMwNiwtMC4wNjQgMjguMDQ2LDAuMTk2IEwyNy4xODUsMS4wNTcgTDI2LjMyNCwwLjE5NiBDMjYuMDY0LC0wLjA2NCAyNS42NDEsLTAuMDY0IDI1LjM4MSwwLjE5NiBDMjUuMTIxLDAuNDU2IDI1LjEyMSwwLjg3OSAyNS4zODEsMS4xMzkgTDI2LjI0MiwyIEwyNS4xODUsMy4wNTcgTDI0LjMyNCwyLjE5NiBDMjQuMDY0LDEuOTM2IDIzLjY0MSwxLjkzNiAyMy4zODEsMi4xOTYgQzIzLjEyMSwyLjQ1NiAyMy4xMjEsMi44NzkgMjMuMzgxLDMuMTM5IEwyNC4yNDIsNCBMMjIuNzE0LDUuNTI4IEMyMi40NTQsNS43ODggMjIuNDU0LDYuMjExIDIyLjcxNCw2LjQ3MSBMMjIuOTA5LDYuNjY3IEwxOC40MjgsMTEuMTQ4IEMxNy4zMDQsMTAuNDc1IDE2LjA4OCwxMC4xMjEgMTQuODgsMTAuMTIxIEMxMi4xMDUsMTAuMTIxIDkuOTAzLDExLjkxMiA5LjMwNywxNC41NTQgQzUuNjk0LDE0LjAxIDIuODAyLDE1LjQ5MyAxLjU3NiwxOC40NDkgQzAuMjUzLDIxLjY0MiAxLjI0NywyNS42NjkgNC4wNDgsMjguNDcgQzUuOTg1LDMwLjQwNyA4LjU0LDMxLjUxOCAxMS4wNTcsMzEuNTE4IEMxMy4zMjUsMzEuNTE4IDE1LjM1NCwzMC42MTcgMTYuNjI1LDI5LjA0NiBDMTcuNSwyNy45NjMgMTguNDAyLDI2LjA5NSAxNy45NjIsMjMuMjA5IEMxOS43MTgsMjIuODA4IDIxLjE1NSwyMS42NjggMjEuODgzLDIwLjA2NCBDMjIuNzIsMTguMjE5IDIyLjUyMywxNi4wMjMgMjEuMzcsMTQuMDkyIEwyNS44NTEsOS42MTEgTDI2LjA0Niw5LjgwNiBDMjYuMzA2LDEwLjA2NiAyNi43MjksMTAuMDY2IDI2Ljk4OSw5LjgwNiBMMjguNTE3LDguMjc4IEwyOS4zNzgsOS4xMzkgQzI5LjUxLDkuMjY4IDI5LjY4MSw5LjMzNCAyOS44NTEsOS4zMzQgQzMwLjAyMSw5LjMzNCAzMC4xOTIsOS4yNjkgMzAuMzIzLDkuMTM5IEMzMC41ODMsOC44NzkgMzAuNTgzLDguNDU2IDMwLjMyMyw4LjE5NiBMMjkuNDYsNy4zMzMgTDMwLjUxNyw2LjI3NiBMMzEuMzc4LDcuMTM3IEMzMS41MDksNy4yNjggMzEuNjc5LDcuMzMzIDMxLjg1LDcuMzMzIEMzMi4wMjEsNy4zMzMgMzIuMTkxLDcuMjY4IDMyLjMyMiw3LjEzOCBDMzIuNTgyLDYuODc4IDMyLjU4Miw2LjQ1NSAzMi4zMjIsNi4xOTUgTDMxLjQ1OSw1LjMzMiBMMzEuNDYxLDUuMzMzIFogTTI2LjUxOSw4LjM5MSBMMjYuMzI0LDguMTk2IEMyNi4wNjQsNy45MzYgMjUuNjQxLDcuOTM2IDI1LjM4MSw4LjE5NiBMMjAuMDQ4LDEzLjUyOSBDMTkuODIsMTMuNzU3IDE5Ljc4OCwxNC4xMTYgMTkuOTcyLDE0LjM4MSBDMjEuMTE5LDE2LjAyOSAyMS4zOCwxNy45NDkgMjAuNjY5LDE5LjUxNCBDMjAuMDMzLDIwLjkxNyAxOC43MzYsMjEuODIzIDE3LjExLDIyLjAwNSBDMTYuOTIzLDIyLjAyNiAxNi43NTMsMjIuMTI1IDE2LjY0MywyMi4yNzggQzE2LjUzMiwyMi40MyAxNi40OTIsMjIuNjIzIDE2LjUzMiwyMi44MDYgQzE3LjAwMSwyNC45OTQgMTYuNjczLDI2Ljg2MiAxNS41ODcsMjguMjA5IEMxNC41NzEsMjkuNDY2IDEyLjkyLDMwLjE4NiAxMS4wNTYsMzAuMTg2IEM4Ljg4OSwzMC4xODYgNi42NzcsMjkuMjE3IDQuOTg5LDI3LjUyOSBDMi41NjUsMjUuMTA1IDEuNjg4LDIxLjY2MiAyLjgwNiwxOC45NjEgQzMuNjQ1LDE2LjkzNiA1LjQ4MiwxNS43NzYgNy44NDYsMTUuNzc2IEM4LjQzNSwxNS43NzYgOS4wNjMsMTUuODQ3IDkuNzEsMTUuOTg1IEM5Ljg5NCwxNi4wMiAxMC4wODcsMTUuOTg1IDEwLjIzOSwxNS44NzMgQzEwLjM5MSwxNS43NjQgMTAuNDkxLDE1LjU5NCAxMC41MTIsMTUuNDA2IEMxMC43NzEsMTMuMDgxIDEyLjU2NSwxMS40NTUgMTQuODc3LDExLjQ1NSBDMTUuOTgyLDExLjQ1NSAxNy4xMDgsMTEuODMyIDE4LjEzNCwxMi41NDYgQzE4LjM5OCwxMi43MzEgMTguNzU3LDEyLjY5OCAxOC45ODYsMTIuNDcgTDI0LjMxOSw3LjEzNyBDMjQuNTc5LDYuODc3IDI0LjU3OSw2LjQ1NCAyNC4zMTksNi4xOTQgTDI0LjEyNCw1Ljk5OSBMMjguNTE1LDEuNjA4IEwzMC45MDYsMy45OTkgTDI2LjUxNSw4LjM5IEwyNi41MTksOC4zOTEgWiIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzIDQpIj4KICAgIDxwYXRoIGQ9Ik0yNSwxNiBDMjAuNTg4LDE2IDE3LDE5LjU4OCAxNywyNCBDMTcsMjguNDEyIDIwLjU4OCwzMiAyNSwzMiBDMjkuNDEyLDMyIDMzLDI4LjQxMiAzMywyNCBDMzMsMTkuNTg4IDI5LjQxMiwxNiAyNSwxNiBaIE0yNSwzMC42NjcgQzIxLjMyNCwzMC42NjcgMTguMzMzLDI3LjY3NiAxOC4zMzMsMjQgQzE4LjMzMywyMC4zMjQgMjEuMzI0LDE3LjMzMyAyNSwxNy4zMzMgQzI4LjY3NiwxNy4zMzMgMzEuNjY3LDIwLjMyNCAzMS42NjcsMjQgQzMxLjY2NywyNy42NzYgMjguNjc2LDMwLjY2NyAyNSwzMC42NjcgWiIvPgogICAgPHBhdGggZD0iTTI1LDIwIEMyMi43OTUsMjAgMjEsMjEuNzk1IDIxLDI0IEMyMSwyNi4yMDUgMjIuNzk1LDI4IDI1LDI4IEMyNy4yMDUsMjggMjksMjYuMjA1IDI5LDI0IEMyOSwyMS43OTUgMjcuMjA1LDIwIDI1LDIwIFogTTI1LDI2LjY2NyBDMjMuNTI5LDI2LjY2NyAyMi4zMzMsMjUuNDcxIDIyLjMzMywyNCBDMjIuMzMzLDIyLjUyOSAyMy41MjksMjEuMzMzIDI1LDIxLjMzMyBDMjYuNDcxLDIxLjMzMyAyNy42NjcsMjIuNTI5IDI3LjY2NywyNCBDMjcuNjY3LDI1LjQ3MSAyNi40NzEsMjYuNjY3IDI1LDI2LjY2NyBaIi8+CiAgICA8cGF0aCBkPSJNMzIuMzMzIDkuMzMzTDEuNjY2IDkuMzMzQzEuMjk4IDkuMzMzLjk5OSA5LjYzMi45OTkgMTBMLjk5OSAyNi44MDFDLjk5OSAyOC4xOTcgMi4xNTggMjkuMzMzIDMuNTgzIDI5LjMzM0wxNC4zMzIgMjkuMzMzIDE0LjMzMiAyOCAzLjU4MyAyOEMyLjg5MiAyOCAyLjMzMiAyNy40NjMgMi4zMzIgMjYuODAxTDIuMzMyIDEwLjY2NiAzMS42NjUgMTAuNjY2IDMxLjY2NSAxNS45OTMgMzIuOTk4IDE1Ljk5MyAzMi45OTggMTBDMzIuOTk4IDkuNjMyIDMyLjY5OSA5LjMzMyAzMi4zMzEgOS4zMzNMMzIuMzMzIDkuMzMzek0zMSAwTDMgMEMxLjg5NyAwIDEgLjg5NyAxIDIuMDAxTDEgNy4zMzNDMSA3LjcwMSAxLjI5OSA4IDEuNjY3IDhMMzIuMzM0IDhDMzIuNzAyIDggMzMuMDAxIDcuNzAxIDMzLjAwMSA3LjMzM0wzMy4wMDEgMi4wMDFDMzMuMDAxLjg5NyAzMi4xMDQgNC40NDA4OTIxZS0xNiAzMS4wMDEgNC40NDA4OTIxZS0xNkwzMSAwek0zMS42MiAxLjc3MkwyNi43MjUgNi42NjcgMjMuMjc3IDYuNjY3IDI4LjYxIDEuMzM0IDMwLjk5OSAxLjMzNEMzMS4yODYgMS4zMzQgMzEuNTI2IDEuNTE4IDMxLjYxOSAxLjc3M0wzMS42MiAxLjc3MnpNMTIuNjExIDEuMzMzTDE2LjA1OSAxLjMzMyAxMC43MjYgNi42NjYgNy4yNzggNi42NjYgMTIuNjExIDEuMzMzek01LjM5MiA2LjY2N0wyLjYxMSA2LjY2NyA3Ljk0NCAxLjMzNCAxMC43MjUgMS4zMzQgNS4zOTIgNi42Njd6TTE3Ljk0NCAxLjMzM0wyMS4zOTIgMS4zMzMgMTYuMDU5IDYuNjY2IDEyLjYxMSA2LjY2NiAxNy45NDQgMS4zMzN6TTIzLjI3NyAxLjMzM0wyNi43MjUgMS4zMzMgMjEuMzkyIDYuNjY2IDE3Ljk0NCA2LjY2NiAyMy4yNzcgMS4zMzN6TTMgMS4zMzNMNi4wNTkgMS4zMzMgMi4zMzQgNS4wNTggMi4zMzQgMi4wMDFDMi4zMzQgMS42MzMgMi42MzMgMS4zMzMgMy4wMDEgMS4zMzNMMyAxLjMzM3pNMjguNjExIDYuNjY3TDMxLjY2NyAzLjYxMSAzMS42NjcgNi42NjcgMjguNjExIDYuNjY3eiIvPgogIDwvZz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8cGF0aCBmaWxsPSIjQ0M3QjE5IiBkPSJNMjYuNjY3LDguNjY3IEwyNi42NjcsMC42NjcgQzI2LjY2NywwLjI5OSAyNi4zNjgsMCAyNiwwIEwxNy42NTYsMCBDMTcuNDc5LDAgMTcuMzA5LDAuMDcxIDE3LjE4NCwwLjE5NSBMMC44NjEsMTYuNTI4IEMwLjYwMSwxNi43ODggMC42MDEsMTcuMjExIDAuODYxLDE3LjQ3MSBMOS4xOTQsMjUuODA0IEM5LjMxOSwyNS45MjkgOS40ODksMjYgOS42NjYsMjYgQzkuODA5LDI2LjAzNyAxMC4wMTcsMjUuOTI3IDEwLjE0MiwyNS44IEwyNi40NzUsOS4xMzMgQzI2LjU5Niw5LjAwOSAyNi42NjYsOC44NDEgMjYuNjY2LDguNjY2IEwyNi42NjcsOC42NjcgWiBNMjUuMzMzLDguMzk1IEw5LjY2MSwyNC4zODYgTDIuMjc2LDE3LjAwMSBMMTcuOTMyLDEuMzM0IEwyNS4zMzMsMS4zMzQgTDI1LjMzMyw4LjM5NSBaIE0yMS4zMzMsOCBDMjIuODA0LDggMjQsNi44MDQgMjQsNS4zMzMgQzI0LDMuODYyIDIyLjgwNCwyLjY2NiAyMS4zMzMsMi42NjYgQzE5Ljg2MiwyLjY2NiAxOC42NjYsMy44NjIgMTguNjY2LDUuMzMzIEMxOC42NjYsNi44MDQgMTkuODYyLDggMjEuMzMzLDggWiBNMjEuMzMzLDQgQzIyLjA2OSw0IDIyLjY2Niw0LjU5NyAyMi42NjYsNS4zMzMgQzIyLjY2Niw2LjA2OSAyMi4wNjksNi42NjYgMjEuMzMzLDYuNjY2IEMyMC41OTcsNi42NjYgMjAsNi4wNjkgMjAsNS4zMzMgQzIwLDQuNTk3IDIwLjU5Nyw0IDIxLjMzMyw0IFogTTI0LjY2NywxNy4zMzMgQzI4LjcwOSwxNy4zMzMgMzIsMjAuNjI0IDMyLDI0LjY2NiBDMzIsMjguNzA4IDI4LjcwOSwzMS45OTkgMjQuNjY3LDMxLjk5OSBDMjAuNjI1LDMxLjk5OSAxNy4zMzQsMjguNzA4IDE3LjMzNCwyNC42NjYgQzE3LjMzNCwyMC42MjQgMjAuNjI0LDE3LjMzMyAyNC42NjcsMTcuMzMzIFogTTI0LjY2NywzMC42NjcgQzI3Ljk3NSwzMC42NjcgMzAuNjY3LDI3Ljk3NSAzMC42NjcsMjQuNjY3IEMzMC42NjcsMjEuMzU5IDI3Ljk3NSwxOC42NjcgMjQuNjY3LDE4LjY2NyBDMjEuMzU5LDE4LjY2NyAxOC42NjcsMjEuMzU5IDE4LjY2NywyNC42NjcgQzE4LjY2NywyNy45NzUgMjEuMzU5LDMwLjY2NyAyNC42NjcsMzAuNjY3IFogTTI3LjUyOSwyMi4xOTMgTDI3LjUyOCwyMi4xOTMgQzI3Ljc5MiwyMS45MzIgMjguMjEyLDIxLjkzOSAyOC40NzIsMjIuMTk2IEMyOC43MzEsMjIuNDU3IDI4LjcyOCwyMi44OCAyOC40NjgsMjMuMTQgTDI0LjQzNSwyNy4xNCBDMjQuMzA5LDI3LjI2NCAyNC4xNCwyNy4zMzMgMjMuOTY0LDI3LjMzMyBDMjMuNzc0LDI3LjMxMyAyMy42MTYsMjcuMjYyIDIzLjQ4OSwyNy4xMzQgTDIwLjg1NiwyNC40NjIgQzIwLjU5OSwyNC4yIDIwLjYwMSwyMy43NzggMjAuODY0LDIzLjUxOSBDMjEuMTI0LDIzLjI2MyAyMS41NSwyMy4yNjMgMjEuODA3LDIzLjUyNyBMMjMuOTcsMjUuNzIyIEwyNy41MjksMjIuMTkzIFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMgNCkiLz4KPC9zdmc+Cg=="
},function(e,t){
e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj4KICA8ZyBmaWxsPSIjQ0M3QjE5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzIDQpIj4KICAgIDxwYXRoIGQ9Ik0yNSwxNiBDMjAuNTg4LDE2IDE3LDE5LjU4OCAxNywyNCBDMTcsMjguNDEyIDIwLjU4OCwzMiAyNSwzMiBDMjkuNDEyLDMyIDMzLDI4LjQxMiAzMywyNCBDMzMsMTkuNTg4IDI5LjQxMiwxNiAyNSwxNiBaIE0yNSwzMC42NjcgQzIxLjMyNCwzMC42NjcgMTguMzMzLDI3LjY3NiAxOC4zMzMsMjQgQzE4LjMzMywyMC4zMjQgMjEuMzI0LDE3LjMzMyAyNSwxNy4zMzMgQzI4LjY3NiwxNy4zMzMgMzEuNjY3LDIwLjMyNCAzMS42NjcsMjQgQzMxLjY2NywyNy42NzYgMjguNjc2LDMwLjY2NyAyNSwzMC42NjcgWiIvPgogICAgPHBhdGggZD0iTTI5LjM2NCwyMy40MTYgTDIzLjMyMywyMC4wODMgQzIzLjExNiwxOS45NyAyMi44NjQsMTkuOTc0IDIyLjY2MiwyMC4wOTIgQzIyLjQ1OCwyMC4yMTIgMjIuMzM0LDIwLjQzMSAyMi4zMzQsMjAuNjY3IEwyMi4zMzQsMjcuMzU1IEMyMi4zMzQsMjcuNTkxIDIyLjQ1OSwyNy44MSAyMi42NjMsMjcuOTMgQzIyLjc2NywyNy45OTEgMjIuODg0LDI4LjAyMiAyMywyOC4wMjIgQzIzLjExMSwyOC4wMjIgMjMuMjIzLDI3Ljk5NCAyMy4zMjQsMjcuOTM4IEwyOS4zNjUsMjQuNTgzIEMyOS41NzcsMjQuNDY2IDI5LjcwOSwyNC4yNDIgMjkuNzA4LDIzLjk5OSBDMjkuNzA4LDIzLjc1NiAyOS41NzYsMjMuNTM0IDI5LjM2NCwyMy40MTYgWiBNMjMuNjY3LDI2LjIyMSBMMjMuNjY3LDIxLjc5NiBMMjcuNjY2LDI0LjAwMyBMMjMuNjY3LDI2LjIyMiBMMjMuNjY3LDI2LjIyMSBaIi8+CiAgICA8cGF0aCBkPSJNMzIuMzMzIDkuMzMzTDEuNjY2IDkuMzMzQzEuMjk4IDkuMzMzLjk5OSA5LjYzMi45OTkgMTBMLjk5OSAyNi44MDFDLjk5OSAyOC4xOTcgMi4xNTggMjkuMzMzIDMuNTgzIDI5LjMzM0wxNC4zMzIgMjkuMzMzIDE0LjMzMiAyOCAzLjU4MyAyOEMyLjg5MiAyOCAyLjMzMiAyNy40NjMgMi4zMzIgMjYuODAxTDIuMzMyIDEwLjY2NiAzMS42NjUgMTAuNjY2IDMxLjY2NSAxNS45OTMgMzIuOTk4IDE1Ljk5MyAzMi45OTggMTBDMzIuOTk4IDkuNjMyIDMyLjY5OSA5LjMzMyAzMi4zMzEgOS4zMzNMMzIuMzMzIDkuMzMzek0zMSAwTDMgMEMxLjg5NyAwIDEgLjg5NyAxIDIuMDAxTDEgNy4zMzNDMSA3LjcwMSAxLjI5OSA4IDEuNjY3IDhMMzIuMzM0IDhDMzIuNzAyIDggMzMuMDAxIDcuNzAxIDMzLjAwMSA3LjMzM0wzMy4wMDEgMi4wMDFDMzMuMDAxLjg5NyAzMi4xMDQgNC40NDA4OTIxZS0xNiAzMS4wMDEgNC40NDA4OTIxZS0xNkwzMSAwek0zMS42MiAxLjc3MkwyNi43MjUgNi42NjcgMjMuMjc3IDYuNjY3IDI4LjYxIDEuMzM0IDMwLjk5OSAxLjMzNEMzMS4yODYgMS4zMzQgMzEuNTI2IDEuNTE4IDMxLjYxOSAxLjc3M0wzMS42MiAxLjc3MnpNMTIuNjExIDEuMzMzTDE2LjA1OSAxLjMzMyAxMC43MjYgNi42NjYgNy4yNzggNi42NjYgMTIuNjExIDEuMzMzek01LjM5MiA2LjY2N0wyLjYxMSA2LjY2NyA3Ljk0NCAxLjMzNCAxMC43MjUgMS4zMzQgNS4zOTIgNi42Njd6TTE3Ljk0NCAxLjMzM0wyMS4zOTIgMS4zMzMgMTYuMDU5IDYuNjY2IDEyLjYxMSA2LjY2NiAxNy45NDQgMS4zMzN6TTIzLjI3NyAxLjMzM0wyNi43MjUgMS4zMzMgMjEuMzkyIDYuNjY2IDE3Ljk0NCA2LjY2NiAyMy4yNzcgMS4zMzN6TTMgMS4zMzNMNi4wNTkgMS4zMzMgMi4zMzQgNS4wNTggMi4zMzQgMi4wMDFDMi4zMzQgMS42MzMgMi42MzMgMS4zMzMgMy4wMDEgMS4zMzNMMyAxLjMzM3pNMjguNjExIDYuNjY3TDMxLjY2NyAzLjYxMSAzMS42NjcgNi42NjcgMjguNjExIDYuNjY3eiIvPgogIDwvZz4KPC9zdmc+Cg=="
},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={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,n){"use strict";var i=n(17),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(24),r=n(541),a=n(1990),o=i.a.extend({name:"MediaGrabberDeviceChannelCollection",context:["server"],
model:a.a,comparator:function(e,t){return Object(r.a)(e.get("identifier"),t.get("identifier"))}});t.a=o},function(e,t,n){"use strict";var i=n(17),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(17),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";var i=n(24),r=n(1993),a=i.a.extend({name:"DVRSetupErrorMessageCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),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(17),r=n(16),a=n(1995),o=n(1015),s=n(1996),l=n(1016),c=n(1997),u=n(2e3),d=n(714),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:u.a},regions:{relationClass:s.a},lineupGroup:{relationClass:c.a},selectedCountry:{relationClass:o.a,deferred:!0},selectedLanguage:{relationClass:d.a,deferred:!0},selectedRegion:{
relationClass:l.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(24),r=n(1015),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(24),r=n(1016),a=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(1998),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(24),r=n(1999),a=i.a.extend({name:"EPGCountryRegionCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),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(24),r=n(714),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(24),r=n(2002),a=i.a.extend({name:"EPGChannelCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),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(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(123)),f=n(1017),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)(b.a,function(e){return{step:e.step}})}var r=n(12),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(5),m=(n.n(g),
n(542)),y=n(155),b=n(180),I=n(2006),S=n(2054),M=n(2059),D=n(2062),C=n(2065),O=n(2068),P=n(2074),j={clearDVRSetup:y.g},T=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(S.a,n);case m.b.UNSUPPORTED_DEVICE:return f.a.createElement(M.a,n)
;case m.b.DEVICE_CHANNELS:return f.a.createElement(I.a,n);case m.b.EPG:return f.a.createElement(O.a,n);case m.b.EPG_MAPPING:return f.a.createElement(C.a,n);case m.b.CHANNEL_MAPPING:return f.a.createElement(P.a,n);case m.b.EPG_DOWNLOAD:return f.a.createElement(D.a,n)}},t}(h.Component);t.a=Object(v.b)(i,j)(T)},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=l[e]||s.a.last(l);return{times:e+1,remindAfter:a()().add(t,"days").unix()}}
var r=n(48),a=n.n(r),o=n(7),s=n.n(o),l=[7,30,60,90,180];t.a=i},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(O.a,P.a,Object(C.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(S.default)("Antenna"),n));break;case"1":e.push((i={},i[t]=Object(S.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(D.p({serverEntityID:n}))},dispatchFetchDeviceChannels:function(){e(D.o({serverEntityID:n}))},dispatchFetchEPGCountries:function(){e(Object(M.fetchEPGCountries)({serverEntityID:n}))},dispatchCancelScanDeviceChannels:function(t){e(D.c({serverEntityID:n,deviceID:t}))},onDeviceSourceSelect:function(t){e(D.A({serverEntityID:n,source:t}))},onScanDeviceChannels:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e(D.y(f()({serverEntityID:n
},t)))},onCountrySelect:function(t){e(Object(M.selectEPGCountry)({serverEntityID:n,countryCode:t}))},onClearDeviceScanPrefs:function(){e(D.h({serverEntityID:n}))}}}var a=n(12),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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),n(35)),S=n(3),M=n(543),D=n(155),C=n(1018),O=n(180),P=n(381),j=n(2007),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.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(I.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(I.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(j.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(6),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(71),m=n(42),y=n(181),b=n(206),I=n(142),S=n(227),M=n(59),D=n(112),C=n(3),O=n(124),P=n(329),j=n(382),T=n(717),w=n(718),E=n(23),x=n(1019),A=n(2031),N=n(2051),L=n(2053),k=n.n(L),_=o()(w.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,w=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,F=!(!B||c||s),V=!!f.length,H=!!w.length,Q=[{
"":Object(C.default)("Select Country")}].concat(p),Y=i.channels.some(function(e){return null!=e.signalQuality||null!=e.signalStrengh}),G=!(i&&i.channels.length&&!c&&d);return o()(P.a,{errorMessage:a,onModalClose:z},void 0,o()(M.a,{className:k.a.deviceInfoBody,scrollDirection:E.d.NONE},void 0,o()(y.b,{className:k.a.deviceInfoForm,onSubmit:this.onScanDeviceChannelsPress},void 0,o()("div",{className:k.a.channelInfo},void 0,o()(N.a,{channelCount:B,hasSignalStrength:Y,isChannelsPending:s,
channelScanActivity:c,hasScanPrefs:V,hasScanNetworks:H}),o()("div",{},void 0,o()(O.a,{type:c?"button":"submit",kind:c||B||s?E.b.DEFAULT:E.b.PRIMARY,size:E.e.MEDIUM,isSpinning:u,isDisabled:!d||u,onPress:c?R:null},void 0,c?Object(C.default)("Stop scanning"):Object(C.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()(b.a,{},void 0,o()(S.a,{className:k.a.channelScanSourceSelect,name:"deviceSource",value:U,values:l,isDisabled:!!c,onChange:this.onDeviceSourceSelect})),h&&o()(b.a,{className:k.a.countryInputGroup},void 0,o()(I.a,{},void 0,Object(C.default)("Country")),o()(S.a,{name:"countrySelect",value:d,values:Q,isDisabled:!!c,onChange:this.onCountrySelect}))),o()("div",{className:k.a.deviceChannelsContainer},void 0,o()(g.a,{className:F?k.a.deviceChannels:k.a.deviceChannelsInfo,autoScroll:!0
},void 0,o()(A.a,{selectedDevice:i,channelCount:B,isChannelsPending:s,channelScanActivity:c,scanPrefs:f,scanNetworks:w,hasScannedChannels:L})))))),o()(j.a,{},void 0,o()(D.a,{},void 0,o()(m.a,{kind:E.b.DEFAULT,size:E.e.MEDIUM,onPress:z},void 0,Object(C.default)("Cancel"))),o()(D.a,{},void 0,_,o()(T.a,{dvrID:n,isDisabled:G}))))},t}(f.Component);R.defaultProps={scanPrefs:[],scanNetworks:[]},t.a=R},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={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={buttonBar:"ModalFooterButtonBar-buttonBar-3X6qj"}},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){e.exports={sectionError:"FormSectionError-sectionError-3ZuKe",sectionErrorIcon:"FormSectionError-sectionErrorIcon--74cE"}},function(e,t){e.exports={
footer:"DVRSetupModalFooter-footer-VLPNT ModalFooter-modalFooter-30WIB"}},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,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()(f.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(6),o=n.n(a),s=n(2),l=n.n(s),c=n(12),u=n.n(c),d=n(1),p=(n.n(d),
n(0)),h=n.n(p),f=n(1021),v=n(452),g=n(269),m=n(710),y=n(454),b=n.n(y),I=n(2018),S=n.n(I),M=Object(g.a)(b.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[m.TOP_LEFT]={placement:"top-start"},r[m.TOP_CENTER]={placement:"top"},r[m.TOP_RIGHT]={placement:"top-end"},r[m.BOTTOM_LEFT]={placement:"bottom-start"},r[m.BOTTOM_CENTER]={placement:"bottom"},r[m.BOTTOM_RIGHT]={
placement:"bottom-end"},r[m.MIDDLE_LEFT]={placement:"left"},r[m.MIDDLE_RIGHT]={placement:"right"},r);i.defaultProps={attachment:m.BOTTOM_CENTER},t.a=i},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 P(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 j(e,t,n){
return S(n,h(t,n))}function T(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 w(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=T(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[w(s)],r}function x(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function A(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 N(e,t,n){return(void 0===n?e:e.slice(0,A(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=j(this.state,this.popper,this.reference),e.placement=P(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=N(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 F(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 V(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=F(this.reference,this.state))}function H(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function Q(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)),H(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=j(r,t,e),o=P(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding)
;return t.setAttribute("x-placement",o),n}function G(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 W(e,t){if(!G(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=T(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=w(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=w(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=N(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(!G(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=w(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:W,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:Q,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 V.call(this)}}]),e}();De.Utils=("undefined"!=typeof window?window:e).PopperUtils,De.placements=ye,De.Defaults=Me,t.a=De}).call(t,n(218))},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,n){"use strict";function i(e){
var t=e.children,n=a()(e,["children"]);return l.a.createElement("div",n,t)}var r=n(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s);t.a=i},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={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(13),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(13),a=n.n(r);t.a=i},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(12),a=n.n(r),o=n(6),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(452),p=(n(1022),n(1023),function(e,t){return s()({position:"absolute",zIndex:e},t)});t.a=i},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={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,n){
"use strict";function i(e){var t=e.selectedDevice,n=e.channelCount,i=e.isChannelsPending,r=e.channelScanActivity,o=e.scanPrefs,l=e.scanNetworks,c=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(d.default)("Scanning channels"))):o.length?s()(v.a,{className:y.a.settings,prefs:o}):l.length?s()(f.a,{className:y.a.settings,networks:l}):i?s()("div",{className:y.a.container
},void 0,s()("div",{className:y.a.message},void 0,Object(d.default)("Loading channels"))):n?s()("div",{},void 0,t.channels.map(function(e){return u.a.createElement(g.a,a()({key:e.identifier},e))})):c?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(d.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(d.default)("Awaiting channel scan")))}var r=n(6),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(3),p=n(25),h=n(272),f=n(1031),v=n(1032),g=n(2042),m=n(2050),y=n.n(m);t.a=i},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={help:"FormHelp-help-3VCuq"}},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,n){"use strict";function i(e){
var t=e.formGroupClassName,n=e.formLabelClassName,i=e.inputClassName,r=e.name,o=e.labelText,l=e.helpText,u=e.showErrors,d=e.errors,g=c()(e,["formGroupClassName","formLabelClassName","inputClassName","name","labelText","helpText","showErrors","errors"]);return s()(h.a,{className:t},void 0,s()(v.a,{className:n,showErrors:u,errors:d,name:r,labelText:o}),p.a.createElement(m.a,a()({className:i,name:r,type:"number",hasError:u},g)),l&&s()(f.a,{},void 0,l))}
var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(206),f=n(384),v=n(457),g=n(165),m=n(1033),y=n(2038),b=n.n(y);i.defaultProps={inputClassName:b.a.input},t.a=Object(g.a)(i)},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){e.exports={input:"NumberInputGroup-input-yz7KY TextInput-input-1VMum input-input-1P2Vi"}},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){e.exports={sliderContainer:"SliderInputGroup-sliderContainer-2Dx08 input-input-1P2Vi",slider:"SliderInputGroup-slider-1x6JA Slider-slider-2oLVT",sliderValue:"SliderInputGroup-sliderValue-2oLoo"}},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(1035)),c=n(2049),u=n.n(c);t.a=i},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={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(c.default)("Scanning for channels... This may take some time."):a?Object(c.default)("We need some more information before proceeding with the channel scan."):o?Object(c.default)("Please select a network before proceeding with the channel scan."):i?Object(c.default)("Fetching device channels"):t?n?Object(c.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(c.default)("We found {channelCount} channels. If these don't look right, you can scan again.",{channelCount:t}):Object(c.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(1),l=(n.n(s),n(0)),c=(n.n(l),n(3)),u=n(2052),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(m.createSelector)(D.a,C.a,P,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(M.j)({serverEntityID:n}))},dispatchFetchDevices:function(){e(Object(M.q)({serverEntityID:n}))},onAddDevice:function(t){e(Object(M.b)({serverEntityID:n,uri:t}))},onSelectDevice:function(t){e(Object(M.z)({serverEntityID:n,deviceID:t}))}}}var a=n(12),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(5),y=(n.n(m),n(7)),b=n.n(y),I=n(35),S=n(327),M=n(155),D=n(180),C=n(381),O=n(2055),P=Object(m.createSelector)(function(e){return e.ui.dvrSettingsUI.dvrSetup.devices},function(e){return b.a.filter(e,function(e){return!e.parentID&&e.status===S.b.ALIVE})}),j=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 v.a.createElement(O.a,t)},t}(f.Component);t.a=Object(g.b)(i,r)(j)},function(e,t,n){"use strict";var i=n(6),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(71),m=n(42),y=n(273),b=n(206),I=n(142),S=n(192),M=n(59),D=n(112),C=n(3),O=n(31),P=n(124),j=n(329),T=n(382),w=n(717),E=n(23),x=n(1019),A=n(2058),N=n.n(A),L=o()(O.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()(j.a,{errorMessage:i,onModalClose:c
},void 0,o()(M.a,{},void 0,h&&o()("div",{},void 0,Object(C.default)("We found hardware we recognize!")),!h&&o()("div",{},void 0,Object(C.default)("Looking for compatible devices...")),o()("div",{className:N.a.manualDeviceButtonContainer},void 0,o()(y.a,{kind:E.b.PRIMARY,direction:d?E.a.UP:E.a.DOWN,isSelected:!1,onPress:this.onShowDeviceAddressPress},void 0,Object(C.default)("Don't see your HDHomeRun device? Enter its network address manually"))),o()("div",{className:N.a.manualDeviceContainer
},void 0,d&&o()("div",{},void 0,o()(b.a,{},void 0,o()(I.a,{},void 0,Object(C.default)("HDHomeRun Device Address")),o()(S.a,{type:"text",name:"manualDeviceInput",className:N.a.manualDeviceInput,value:this.state.manualDeviceAddress,placeholder:Object(C.default)("IP address or hostname"),onChange:this.onDeviceAddressChange}),o()(P.a,{className:N.a.addDeviceButton,kind:E.b.PRIMARY,size:E.e.LARGE,isDisabled:!p,isSpinning:a,onPress:this.onAddDevicePress
},void 0,Object(C.default)("Connect"))))),!h&&o()("div",{className:N.a.spinnerContainer},void 0,L),h&&o()("div",{},void 0,o()("div",{className:N.a.deviceCount},void 0,1===s.length?Object(C.default)("1 device found"):Object(C.default)("{deviceCount} devices found",{deviceCount:s.length})),o()(g.a,{className:N.a.devices,scrollDirection:E.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:N.a.device,serverEntityID:t,deviceID:e.key,
isSelectable:!0,isSelected:i,includeUri:!0,onSelectDevice:l},e))})))),o()(T.a,{},void 0,o()(D.a,{},void 0,o()(m.a,{kind:E.b.DEFAULT,size:E.e.MEDIUM,onPress:c},void 0,Object(C.default)("Cancel"))),o()(D.a,{},void 0,o()(w.a,{isDisabled:!n}))))},t}(f.Component);t.a=k},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){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(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(5),o=(n.n(a),n(180)),s=n(2060);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()(v.a,{title:Object(p.default)("Unsupported Tuner"),onModalClose:s},void 0,a()(u.a,{className:M.a.unsupportedDeviceBody,scrollDirection:y.d.NONE},void 0,a()("div",{className:M.a.imageContainer},void 0,a()(f.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(p.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()(h.a,{
message:Object(p.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:c.a,kind:y.b.PRIMARY,to:"https://support.plex.tv/articles/community-supported-tuners/",target:"_blank"}]}))),a()(g.a,{},void 0,a()(d.a,{},void 0,a()(l.a,{kind:y.b.DEFAULT,size:y.e.MEDIUM,onPress:s},void 0,Object(p.default)("Cancel"))),a()(d.a,{},void 0,a()(m.a,{
dvrID:n,label:Object(p.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(42)),c=n(20),u=n(59),d=n(112),p=n(3),h=n(179),f=n(544),v=n(329),g=n(382),m=n(717),y=n(23),b=n(44),I=n.n(b),S=n(2061),M=n.n(S),D=parseInt(I.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,n){"use strict";function i(){return Object(u.createSelector)(function(e,t){return t.serverEntityID},Object(d.a)(),g.a,function(e,t,n){var i=n.selectedDVR;if(i&&t){var r=i.epgIdentifier,a=Object(h.a)(f.k,r,e);return t.indexOf(a)>-1?r:void 0}})}function r(){return Object(u.createSelector)(g.a,m.a,Object(p.a)(),Object(v.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(5),d=(n.n(u),n(720)),p=n(34),h=n(38),f=n(43),v=n(1036),g=n(180),m=n(381),y=n(2063);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()(c.a,{},void 0,a()("div",{className:m.a.message
},void 0,a()("div",{},void 0,Object(p.default)("Setup complete!")),a()("div",{},void 0,Object(p.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()(h.a,{size:90,progress:o}),a()("div",{className:m.a.spinnerMessage
},void 0,s)))),a()(u.a,{},void 0,a()(d.a,{},void 0,a()(l.a,{kind:v.b.DEFAULT,size:v.e.MEDIUM,onPress:g},void 0,Object(p.default)("Close")),a()(l.a,{kind:v.b.PRIMARY,size:v.e.MEDIUM,to:"#!/server/"+y+"/provider/"+b,isDisabled:!i},void 0,Object(p.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(42)),c=n(59),u=n(82),d=n(112),p=n(3),h=n(272),f=n(329),v=n(23),g=n(2064),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(){return Object(f.createSelector)(I.a,S.a,Object(m.a)(),function(e,t,n){return{setupErrorMessage:t,progress:(g.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(1),d=(n.n(u),n(0)),p=n.n(d),h=n(11),f=n(5),v=(n.n(f),
n(7)),g=n.n(v),m=n(328),y=n(35),b=n(155),I=n(180),S=n(381),M=n(2066),D={findBestEPGLineup:b.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(y.a)(function(){e.findBestEPGLineup({serverEntityID:e.serverEntityID})})},t.prototype.render=function(){return p.a.createElement(M.a,this.props)},t}(d.Component);t.a=Object(h.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()(h.a,{errorMessage:t,onModalClose:i},void 0,a()(c.a,{},void 0,a()("div",{className:m.a.message},void 0,a()("div",{},void 0,Object(d.default)("We're finding the best guide for your channels and location.")),a()("div",{},void 0,Object(d.default)("This should only take a few moments."))),a()("div",{className:m.a.spinnerContainer},void 0,a()(p.a,{size:90,progress:n
}))),a()(f.a,{},void 0,a()(u.a,{},void 0,a()(l.a,{kind:v.b.DEFAULT,size:v.e.MEDIUM,onPress:i},void 0,Object(d.default)("Cancel")))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(59),u=n(112),d=n(3),p=n(272),h=n(329),f=n(382),v=n(23),g=n(2067),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(g.createSelector)(Object(m.a)(),S.a,M.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(6),d=n.n(u),p=n(1),h=(n.n(p),n(0)),f=n.n(h),v=n(11),g=n(5),m=(n.n(g),n(34)),y=n(35),b=n(543),I=n(155),S=n(180),M=n(381),D=n(2069),C=n(2070),O=d()({dvrSetupNextStep:I.l,selectEPGLineup:I.B
},b),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.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(D.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(y.a)(function(){var t=e.serverEntityID;e.fetchEPGLanguages({serverEntityID:t}),e.selectEPGLineup({lineupUUID:null})})},t.prototype.render=function(){
return f.a.createElement(C.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)(P)},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(42)),f=n(20),v=n(181),g=n(206),m=n(142),y=n(227),b=n(192),I=n(59),S=n(112),M=n(3),D=n(31),C=n(329),O=n(382),P=n(718),j=n(23),T=n(2071),w=n(2073),E=n.n(w),x=r()(P.a,{}),A=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(M.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,w=e.onSubmit,A=e.onModalClose,N=this.state,L=N.showXMLTVEntry,k=N.xmlTVPath,_=N.programGuideTitle,R=u,z=!(!u||!P),U=!(!u||!d),B=[{"":Object(M.default)("Select Language")}].concat(l),F=[{"":Object(M.default)("Select Region")
}].concat(c),V="Windows"===n?"C:\\path\\to\\your\\xmltv_file.xml":"/path/to/your/xmltv_file.xml";return r()(v.b,{className:E.a.form,onSubmit:w},void 0,r()(C.a,{errorMessage:i,onModalClose:A},void 0,r()(I.a,{},void 0,r()("div",{className:E.a.message},void 0,r()("div",{},void 0,Object(M.default)("To download an electronic guide we need to know your location.")),r()(f.a,{kind:j.b.PRIMARY,onPress:this.onShowXMLTVEntryPress
},void 0,L?Object(M.default)("Don't use XMLTV? Click here to select your location instead."):Object(M.default)("Have an XMLTV guide on your server? Click here to use that instead."))),L&&r()("div",{},void 0,u&&r()(g.a,{},void 0,r()(m.a,{},void 0,Object(M.default)("Language")),r()(y.a,{name:"languageSelect",values:B,value:o,onChange:this.onLanguageSelect})),r()(g.a,{},void 0,r()(m.a,{},void 0,Object(M.default)("XMLTV Guide")),r()(b.a,{name:"xmltvPath",placeholder:V,value:k,
onChange:this.onXMLTVPathChange})),r()(g.a,{},void 0,r()(m.a,{},void 0,Object(M.default)("Guide Title")),r()(b.a,{name:"programGuideTitle",value:_,onChange:this.onProgramGuideTitleChange}))),!L&&r()("div",{},void 0,R&&r()(g.a,{},void 0,r()(m.a,{},void 0,Object(M.default)("Language")),r()(y.a,{name:"languageSelect",values:B,value:o,onChange:this.onLanguageSelect})),z&&r()(g.a,{},void 0,r()(m.a,{},void 0,Object(M.default)("Postal Code")),r()(T.a,{serverEntityID:t,postalCodeExample:P}),a&&r()(D.a,{
className:E.a.fetchingSpinner})),U&&r()(g.a,{},void 0,r()(m.a,{},void 0,Object(M.default)("Region")),r()(y.a,{className:E.a.regionInput,name:"regionSelect",values:F,value:s,onChange:this.onRegionSelect}),a&&r()(D.a,{className:E.a.fetchingSpinner})))),r()(O.a,{},void 0,r()(S.a,{},void 0,r()(h.a,{kind:j.b.DEFAULT,size:j.e.MEDIUM,onPress:A},void 0,Object(M.default)("Cancel"))),r()(S.a,{},void 0,x,r()(h.a,{type:"submit",kind:j.b.PRIMARY,size:j.e.MEDIUM,isDisabled:!p||a
},void 0,Object(M.default)("Continue"))))))},t}(p.Component);t.a=A},function(e,t,n){"use strict";function i(e){return{postalCode:e.ui.dvrSettingsUI.dvrSetup.epgSettings.postalCode}}var r=n(6),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(35),m=n(543),y=n(2072),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(122),h=n.n(p),f=n(192),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(e,t){if(e){var n=I.a.parseXML(e.responseText);if(n.message)return n.message}else{if(!t)return;var i=I.a.parseXML(t.responseText);if(i.message)return i.message}
return Object(M.default)("Unable to load channel mappings")}function r(){return Object(m.createSelector)(O.a,P.a,j.a,Object(C.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:b.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(6),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(5),y=(n.n(m),n(7)),b=n.n(y),I=n(63),S=n(35),M=n(3),D=n(155),C=n(1037),O=n(180),P=n(381),j=n(1038),T=n(2075),w={fetchLineupChannels:D.r,fetchChannelMap:D.n,selectEPGLineup:D.B,clearChannelMapError:D.d,saveDVR:D.v,
addDVRDevice:D.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 v.a.createElement(T.a,o()({onLineupSelect:this.onLineupSelect,onSubmit:e?this.onAddDeviceSubmit:this.onSaveDVRSubmit},this.props))},t}(f.Component);t.a=Object(g.b)(r,w)(E)
},function(e,t,n){"use strict";function i(e){for(var t=e.dvrID,n=e.setupErrorMessage,i=e.selectedLineupUUID,r=e.availableLineups,o=e.lineupChannels,s=e.channelMappings,D=e.isChannelMappingsPending,C=e.isLineupChannelsPending,P=e.isSavingDVR,j=e.channelMappingsErrorMessage,T=e.formState,w=e.allChannelMappingsEnabled,E=e.allChannelMappingsDisabled,x=e.onAllChannelMappingsEnabledChange,A=e.onFormStateChange,N=e.onLineupSelect,L=e.onModalClose,k=e.onSubmit,_=D||C,R=!!r.length,z=[{
"":Object(f.default)("Select Guide")}].concat(r),U=i?decodeURIComponent(i.match(/#(.+?)$/)[1]):void 0,B=!1,F=!1,V=0;V<s.length&&(!B||!F);V++){var H=s[V];null==H.signalQuality&&null==H.signalStrengh||(B=!0),(H.isDeviceChannelHD||H.isLineupChannelHD)&&(F=!0)}return a()(u.b,{className:O.a.form,formState:T,onChange:A,onSubmit:k},void 0,a()(m.a,{errorMessage:n,onModalClose:L},void 0,j&&a()(p.a,{className:O.a.channelMappingsBody,scrollDirection:I.d.NONE},void 0,a()("div",{
className:O.a.centeredContainer},void 0,j)),!j&&a()(p.a,{className:O.a.channelMappingsBody,scrollDirection:I.d.NONE},void 0,R&&a()("div",{},void 0,a()("div",{className:O.a.programGuideLabel},void 0,Object(f.default)("Guide")),a()("div",{className:O.a.programGuideSelectContainer},void 0,a()(d.a,{name:"programGuide",values:z,value:i,onChange:N}))),!R&&a()("div",{className:O.a.programGuideTitle},void 0,U),_&&a()("div",{className:O.a.centeredContainer},void 0,a()(v.a,{
label:Object(f.default)("Loading channel mappings")})),!_&&i&&a()(l.a,{className:O.a.scroller,autoScroll:!0},void 0,a()(M.a,{showSignalStrength:B,allChannelMappingsEnabled:w,allChannelMappingsDisabled:E,onAllChannelMappingsEnabledChange:x}),s.map(function(e){var t=e.key,n=e.deviceIdentifier,i=e.name,r=e.enabled,s=e.lineupIdentifier,l=e.drm,c=e.signalStrengh,u=e.signalQuality,d=e.isDeviceChannelHD,p=e.isLineupChannelHD,h=e.isChannelMissing;return a()(S.a,{name:t,initialValue:{enabled:r,
lineupIdentifier:s},deviceIdentifier:n,channelName:i,drm:l,signalStrength:u||c,isDeviceChannelHD:d,isLineupChannelHD:p,isChannelMissing:h,showResolution:F,lineupChannels:o},t)}))),a()(y.a,{},void 0,a()(h.a,{},void 0,a()(c.a,{kind:I.b.DEFAULT,size:I.e.MEDIUM,onPress:L},void 0,Object(f.default)("Cancel"))),a()(h.a,{},void 0,a()(b.a,{dvrID:t}),a()(g.a,{type:"submit",kind:I.b.PRIMARY,size:I.e.MEDIUM,isSpinning:P},void 0,Object(f.default)("Continue"))))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(71)),c=n(42),u=n(181),d=n(227),p=n(59),h=n(112),f=n(3),v=n(31),g=n(124),m=n(329),y=n(382),b=n(718),I=n(23),S=n(1039),M=n(1040),D=n(1041),C=n(2081),O=n.n(C);t.a=Object(D.a)(i)},function(e,t){e.exports={badge:"Badge-badge-21NQR",isHidden:"Badge-isHidden-2p8gj",default:"Badge-default-VTVet",primary:"Badge-primary-3suJx",success:"Badge-success-3m8_X",danger:"Badge-danger-2rQka"}},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(332)),l=n(2078),c=n.n(l);t.a=i},function(e,t){e.exports={resolution:"EPGChannelResolution-resolution-rYFHt Badge-badge-21NQR"}},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={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={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){e.exports={modal:"DVRSetupModal-modal-3IeKF Modal-medium-1UIAd Modal-modal-3Z1JS"}},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(2084);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(3)),c=n(31),u=n(2085);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(o.f)({serverEntityID:n,dvrID:i}))},
onReloadGuidePress:function(){e(Object(o.e)({serverEntityID:n,dvrID:i}))},onCancelReloadGuidePress:function(){e(Object(o.a)({serverEntityID:n,dvrID:i}))}}}var r=n(11),a=n(5),o=(n.n(a),n(540)),s=n(1036),l=n(2086),c=Object(a.createStructuredSelector)({epgDownloadActivity:Object(s.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(72)),f=n(20),v=n(27),g=n(123),m=n(30),y=n(3),b=n(25),I=n(157),S=n(23),M=n(2089),D=n(1017),C=n(2105),O=n(2109),P=n.n(O),j={context:g.k},T=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(v.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:P.a.dvr},void 0,r()("div",{className:P.a.header},void 0,r()("div",{className:P.a.name},void 0,Object(y.default)("DVR"),r()(h.b,{className:P.a.separator}),i),r()(f.a,{className:P.a.deleteLink,kind:S.b.PRIMARY,onPress:this.onRemoveDVRPress
},void 0,Object(y.default)("Delete DVR"))),r()("div",{className:P.a.actions},void 0,r()("div",{},void 0,o?r()(f.a,{kind:S.b.DEFAULT,title:Object(y.default)("Cancel refresh"),onPress:l},void 0,r()(b.a,{className:P.a.actionIcon,name:"plex-icon-remove-560"}),o.title," (",o.progress,"%)",r()(h.b,{className:P.a.separator}),o.subtitle):r()(f.a,{kind:S.b.PRIMARY,onPress:s},void 0,r()(b.a,{className:P.a.actionIcon,name:"plex-icon-reload-560"
}),Object(y.default)("Refresh Guide"))),r()("div",{},void 0,r()(f.a,{kind:S.b.PRIMARY,onPress:this.onDVRSettingsPress},void 0,r()(b.a,{className:P.a.actionIcon,name:"plex-icon-settings-560","aria-label":Object(y.default)("DVR Settings")}),Object(y.default)("DVR Settings")))),r()("div",{className:P.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()(f.a,{kind:S.b.PRIMARY,onPress:this.onAddDevicePress},void 0,r()(b.a,{className:P.a.addDeviceIcon,name:"plex-icon-add-560"}),Object(y.default)("Add Device")),r()(I.a,{isOpen:u,metricsPage:m.s,title:Object(y.default)("Delete DVR"),
message:Object(y.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(y.default)("Delete"),kind:S.b.DANGER,onConfirm:this.onRemoveDVRConfirm,onCancel:this.onRemoveDVRCancel}),r()(C.a,{isOpen:d,serverEntityID:t,dvrID:n,metricsProperties:j,onModalClose:this.onDVRSettingsModalClose}),r()(D.a,{isOpen:this.state.isAddDeviceModalOpen,serverEntityID:t,dvrID:n,
metricsProperties:j,onModalClose:this.onModalClose}))},t}(p.Component);t.a=T},function(e,t){e.exports={separator:"DashSeparator-separator-4CyEF"}},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(){return Object(g.createSelector)(function(e,t){return t.tunerCount},Object(D.a)(),Object(I.a)(),function(e,t,n){var i=y.a.filter(n,function(e){return e.type===b.a.GRABBER_GRAB&&parseInt(e.Context.deviceID,10)===t.key});return{hasPrefs:!(!t.prefs||!t.prefs.length),channelCount:t.channels.length,activeRecordingCount:i.length}})}var r=n(6),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(5),m=(n.n(g),
n(7)),y=n.n(m),b=n(164),I=n(328),S=n(35),M=n(155),D=n(459),C=n(2090),O={fetchDeviceChannels:M.o,removeDVRDevice:M.t},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.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(S.a)(function(){e.props.fetchDeviceChannels({serverEntityID:n,dvrID:i,deviceID:r})})},t.prototype.render=function(){return f.a.createElement(C.a,a()({onRemoveDevicePress:this.onRemoveDevicePress},this.props))},t}(h.Component);t.a=Object(v.b)(i,O)(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(72)),f=n(20),v=n(123),g=n(3),m=n(25),y=n(327),b=n(1020),I=n(2091),S=n(23),M=n(544),D=n(2100),C=n(1025),O=n(2104),P=n.n(O),j={context:v.k},T=r()(b.a,{}),w=r()(m.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,v=e.hasPrefs,b=e.status,O=e.canRemoveDevice,E=e.onRemoveDevicePress,x=b===y.b.DEAD,A=p.filter(function(e){return e.enabled}).length,N=void 0;return N=c?1===c?Object(g.default)("1 channel"):Object(g.default)("{channelCount} channels",{channelCount:c}):Object(g.default)("No channels"),r()("div",{className:P.a.device
},void 0,r()(M.a,{className:P.a.deviceImage,serverEntityID:t,model:a,thumb:s,width:100,height:100}),r()("div",{className:P.a.details},void 0,r()("div",{},void 0,r()("span",{className:P.a.model},void 0,a),u&&T,v&&r()(f.a,{className:P.a.deviceSettingsButton,kind:S.b.PRIMARY,onPress:this.onDeviceSettingsPress},void 0,r()(m.a,{className:P.a.deviceSettingsIcon,name:"plex-icon-settings-560","aria-label":Object(g.default)("Device Settings")}))),r()(C.a,{className:P.a.uri,uri:o}),x&&r()("div",{
className:P.a.deviceWarning},void 0,r()("div",{className:P.a.deviceWarningIconContainer},void 0,w),Object(g.default)("Device not found. Ensure your device is powered on and connected to your network.")),!x&&r()("div",{className:P.a.info},void 0,r()("div",{},void 0,1===l?Object(g.default)("1 tuner"):Object(g.default)("{tunerCount} tuners",{tunerCount:l}),!!d&&r()("span",{},void 0,r()(h.b,{className:P.a.separator}),Object(g.default)("{activeRecordingCount} recording now",{activeRecordingCount:d
}))),r()("div",{},void 0,N,r()(h.b,{className:P.a.separator}),r()(f.a,{kind:S.b.PRIMARY,onPress:this.onManageChannelsPress},void 0,Object(g.default)("{enabledChannelsCount} enabled",{enabledChannelsCount:A}))))),O&&r()("div",{className:P.a.removeDeviceContainer},void 0,r()(f.a,{className:P.a.removeDevice,onPress:E},void 0,r()(m.a,{name:"plex-icon-remove-560","aria-label":Object(g.default)("Remove Device")}))),r()(I.a,{serverEntityID:t,dvrID:n,deviceID:i,metricsProperties:j,
isOpen:this.state.isManageChannelsModalOpen,onModalClose:this.onManageChannelsModalClose}),r()(D.a,{serverEntityID:t,dvrID:n,deviceID:i,metricsProperties:j,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(b.a)(),Object(y.a)(),function(e,t){return{dvrID:e.key,deviceID:t.key}})}
var r=n(6),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(5),m=(n.n(g),n(155)),y=n(459),b=n(547),I=n(2092),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:m.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(30)),c=n(117),u=n(2093);t.a=i},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(Object(O.a)(),Object(C.a)(),Object(M.a)(),Object(D.a)(),P.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(S.p({serverEntityID:n,dvrID:i,deviceID:r}))},
dispatchFetchLineupChannels:function(t){e(S.r({serverEntityID:n,lineupUUID:t}))},dispatchFetchDeviceChannels:function(){e(S.o({serverEntityID:n,dvrID:i,deviceID:r}))},dispatchFetchChannelMap:function(){e(S.n({serverEntityID:n}))},dispatchCancelScanDeviceChannels:function(){e(S.c({serverEntityID:n,deviceID:r}))},dispatchClearDeviceScanPrefs:function(){e(S.h({serverEntityID:n}))},onScanDeviceChannels:function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(S.y(f()({
serverEntityID:n,dvrID:i,deviceID:r,country:t},a)))},onSubmit:function(t){Object(I.a)(function(){e(S.u({serverEntityID:n,dvrID:i,deviceID:r,data:t}))})},onDismissSaveError:function(){Object(I.a)(function(){e(S.e())})}}}var a=n(12),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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),n(35)),S=n(155),M=n(1037),D=n(1018),C=n(459),O=n(547),P=n(180),j=n(1038),T=n(2094),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.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(T.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(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(42)),f=n(181),v=n(59),g=n(82),m=n(112),y=n(78),b=n(241),I=n(3),S=n(31),M=n(124),D=n(191),C=n(95),O=n(721),P=n(1041),j=n(23),T=n(2097),w=n(2099),E=n.n(w),x=r()(S.a,{}),A=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.onScanDeviceChannelsButtonPress=function(){
var e=i.props,t=e.scanPrefs,n=e.scanNetworks,r=e.channelScanActivity,a=e.onScanDeviceChannels,o=e.onCancelScanDeviceChannels;t.length||n.length||(r?o():a(i.props.country))},i.onSubmit=function(e){var t=i.props,n=t.scanPrefs,r=t.scanNetworks,a=t.onSubmit;if(n.length||r.length){var o=i.props.scanPrefs.length?{prefs:e}:e;i.props.onScanDeviceChannels(i.props.country,o)}else a(e)},r=n,l()(i,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,S=e.allChannelMappingsEnabled,P=e.allChannelMappingsDisabled,w=e.isCancellingChannelScan,A=e.scanPrefs,N=e.scanNetworks,L=e.channelScanActivity,k=e.onAllChannelMappingsEnabledChange,_=e.onFormStateChange,R=e.onModalClose,z=L&&!w,U=i||a||o,B=s||l||c,F=!z&&U,V=L?parseInt(L.Response.channels,10):0,H=void 0
;H=1===V?Object(I.default)("Scanning channels. 1 channel found."):V>1?Object(I.default)("Scanning channels. {channelCount} channels found.",{channelCount:V}):Object(I.default)("Scanning channels. No channels found.");var Q=!(!A.length&&!N.length),Y=t.some(function(e){return null!=e.signalQuality||null!=e.signalStrengh
}),G=Y?Object(I.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(I.default)('Click "Scan Channels" to refresh this list, or create a new DVR to use a different lineup.');return B?r()(O.a,{message:Object(I.default)("Unable to load channel mappings"),onModalClose:R}):r()(f.b,{className:E.a.form,formState:p,onChange:_,onSubmit:this.onSubmit},void 0,r()(C.a,{onModalClose:R
},void 0,r()(y.a,{},void 0,Object(I.default)("Manage Channels")),F&&r()(v.a,{},void 0,r()("div",{className:E.a.centeredContainer},void 0,x)),!F&&!!d&&r()("div",{},void 0,r()(D.a,{errorMessage:Object(b.a)(d,Object(I.default)("There was a problem saving your changes. Please try again."))})),!F&&r()(v.a,{className:L?void 0:E.a.manageChannelsBody,scrollDirection:L?j.d.VERTICAL:j.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()(M.a,{type:Q?"submit":"button",size:j.e.MEDIUM,isSpinning:w,isDisabled:w,onPress:this.onScanDeviceChannelsButtonPress},void 0,z?Object(I.default)("Stop scanning"):Object(I.default)("Scan channels")))),r()(T.a,{channelMappings:t,lineupChannels:n,showSignalStrength:Y,channelScanActivity:L,scanPrefs:A,scanNetworks:N,allChannelMappingsEnabled:S,allChannelMappingsDisabled:P,onAllChannelMappingsEnabledChange:k})),r()(g.a,{},void 0,r()(m.a,{},void 0,r()(h.a,{
kind:j.b.DEFAULT,size:j.e.MEDIUM,onPress:R},void 0,Object(I.default)("Cancel")),r()(M.a,{type:"submit",kind:j.b.PRIMARY,size:j.e.MEDIUM,isDisabled:F||!!L,isSpinning:u},void 0,Object(I.default)("Save"))))))},t}(p.Component);A.defaultProps={scanPrefs:[],scanNetworks:[]},t.a=Object(P.a)(A)},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(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()(c.a,{size:90,progress:r.progress})):o.length?a()(l.a,{className:v.a.scroller,autoScroll:!0},void 0,a()(d.a,{prefs:o})):s.length?a()(u.a,{
networks:s}):t.length?a()(l.a,{className:v.a.scroller,autoScroll:!0},void 0,a()(h.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,d=e.isDeviceChannelHD,h=e.isLineupChannelHD,f=e.isChannelMissing;return a()(p.a,{name:t,initialValue:{enabled:o,lineupIdentifier:s},deviceIdentifier:i,
channelName:r,drm:l,signalStrength:u||c,isChannelMissing:f,showResolution:y,isDeviceChannelHD:d,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(71)),c=n(272),u=n(1031),d=n(1032),p=n(1039),h=n(1040),f=n(2098),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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(30),f=n(117),v=n(2101);t.a=i},function(e,t,n){
"use strict";function i(){return Object(g.createSelector)(function(e,t){return t.dvrID},Object(b.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(6),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(5),m=(n.n(g),n(35)),y=n(155),b=n(459),I=n(2102),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.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,onModalClose:this.onModalClose}))},t}(h.Component);t.a=Object(v.b)(i,{saveDeviceSettings:y.x,clearDeviceSettingsSaveError:y.i})(S)},function(e,t,n){"use strict";var i=n(6),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(42),m=n(181),y=n(59),b=n(82),I=n(112),S=n(78),M=n(241),D=n(3),C=n(124),O=n(191),P=n(458),j=n(95),T=n(23),w=n(544),E=n(2103),x=n.n(E),A=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.onModalClose;return o()(m.b,{className:x.a.form,onSubmit:u},void 0,o()(j.a,{onModalClose:d},void 0,o()(S.a,{},void 0,Object(D.default)("Device Settings")),c?o()(O.a,{errorMessage:Object(M.a)(c,Object(D.default)("There was a problem saving your changes. Please try again."))}):null,o()(y.a,{},void 0,o()("div",{className:x.a.container},void 0,o()(w.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(P.a,r()({key:t},e))}))))),o()(b.a,{},void 0,o()(I.a,{},void 0,o()(g.a,{kind:T.b.DEFAULT,size:T.e.MEDIUM,onPress:d},void 0,Object(D.default)("Cancel")),o()(C.a,{type:"submit",isSpinning:l,kind:T.b.PRIMARY,size:T.e.MEDIUM
},void 0,Object(D.default)("Save"))))))},t}(f.Component);t.a=A},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-4CyEF",
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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(30),f=n(117),v=n(2106);t.a=i},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(b.a)(),function(e){return{prefs:e.prefs,isSaving:e.isSaving,saveError:e.saveError}})}var r=n(6),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(5),m=(n.n(g),n(35)),y=n(155),b=n(547),I=n(2107),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.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,onModalClose:this.onModalClose}))},t}(h.Component)
;t.a=Object(v.b)(i,{saveDVRSettings:y.w,clearDVRSettingsSaveError:y.f})(S)},function(e,t,n){"use strict";var i=n(6),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(42),m=n(181),y=n(59),b=n(82),I=n(112),S=n(78),M=n(241),D=n(3),C=n(124),O=n(191),P=n(458),j=n(95),T=n(23),w=n(2108),E=n.n(w),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.onModalClose;return o()(m.b,{className:E.a.form,onSubmit:a},void 0,o()(j.a,{onModalClose:s},void 0,o()(S.a,{},void 0,Object(D.default)("DVR Settings")),i?o()(O.a,{errorMessage:Object(M.a)(i,Object(D.default)("There was a problem saving your changes. Please try again."))
}):null,o()(y.a,{},void 0,t.map(function(e){var t=e.id;return v.a.createElement(P.a,r()({key:t},e))})),o()(b.a,{},void 0,o()(I.a,{},void 0,o()(g.a,{kind:T.b.DEFAULT,size:T.e.MEDIUM,onPress:s},void 0,Object(D.default)("Cancel")),o()(C.a,{type:"submit",isSpinning:n,kind:T.b.PRIMARY,size:T.e.MEDIUM},void 0,Object(D.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-4CyEF",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(){return Object(I.createSelector)(Object(M.a)(),function(e){return e.reduce(function(e,t){var n=Object(C.a)(t);return e[n]?e[n].push(t.entityID):e[n]=[t.entityID],e},{})})}function r(){return Object(I.createSelector)(Object(D.a)(),Object(j.a)(),i(),function(e,t,n){return{sectionTypes:O.f.getAll(),librariesBySectionType:n,librariesCount:e.libraries.length,
isLibrariesPopulated:e.isLibrariesPopulated,librariesError:e.librariesError,isLibraryRefreshing:t}})}function a(e,t){var n={serverEntityID:t.serverEntityID};return{dispatchFetchLibraries:function(){e(S.g(n))},onAddLibraryPress:function(){e(P.a(v()({},n,{redirect:!1})))},onUpdateLibrariesPress:function(){e(P.o(n))},onCancelUpdatePress:function(){e(P.b(n))}}}var o=n(12),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(6),v=n.n(f),g=n(1),m=(n.n(g),
n(0)),y=n.n(m),b=n(11),I=n(5),S=(n.n(I),n(100)),M=n(548),D=n(1043),C=n(722),O=n(130),P=n(183),j=n(389),T=n(2189),w=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchFetchLibraries()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchLibraries,s()(e,["dispatchFetchLibraries"]));return y.a.createElement(T.a,t)},t}(m.Component);t.a=Object(b.b)(r,a)(w)},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(15),o=n(155),s=n(264),l=n(176),c=n(2113),u=n.n(c),d=s.a.extend({className:"alert-bar notify",template:u.a,events:r.a.extend({"click .setup-link":"onSetupClick"},s.a.prototype.events),serializeData:function(){return{model:this.model.get("model"),make:this.model.get("make"),dvrSettingsRoute:Object(l.a)(this.options.machineIdentifier,"manage","dvr")}},disableDevice:function(){var e=Object(a.c)("appStore"),t=this.options.serverEntityID;t&&e.dispatch(Object(o.C)({
serverEntityID:t,deviceID:this.model.id,enabled:!1}))},onSetupClick:function(){this.hide(),this.disableDevice()},onCloseClick:function(e){s.a.prototype.onCloseClick.apply(this,arguments),this.disableDevice()}});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){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(4)).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(4)).call(t,"Learn more",{hash:{},data:o}))+"</a> "})
},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(40),l=n(2115),c=n(386),u=n(2124),d=n(2126),p=n.n(d),h=c.a.extend({template:p.a,ui:o.a.extend({sectionAgent:"#edit-section-agent",sectionScanner:"#edit-section-scanner",thumbnailsCheckbox:'input[name="enableBIFGeneration"]',agentGroup:".agent-group",scannerGroup:".scanner-group"},c.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(c.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 u.a({model:this.model,collection:this.model.settings,hideSettings:["enableAutoPhotoTags"]});this.sectionSettingsRegion.show(e)},renderSectionAgentSettings:function(){var e=new l.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)),r.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=r()(e.currentTarget),n=t.val();this.model.set("agent",n),this.agentSettingsRegion.close();var i=this.model.agents.get(n);if(i){var a=i.get("languages"),s=this.model.get("language");a.get(s)||this.model.set("language",a.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=r()(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(),s.a.execute("deleteSectionThumbnails",{section:this.model}).done(this.whenRendered(function(){
this.ui.thumbnailsCheckbox.prop("checked",!1)}))}});t.a=h},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(2116),s=n.n(o),l=a.a.ItemView.extend({template:s.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=r()(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(4)).call(e,"{1} Settings",e&&e.agentName,{hash:{},data:t
}))+'</div> <p class="setup-agent-disclaimer">'+d(i(n(4)).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(28)).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(17),r=n(16),a=n(2118),o=n(2119),s=i.a.extend({name:"AgentModel",context:["server"],idAttribute:"identifier",rootPropertyName:"Agent",sessionAttrs:{isPrimary:r.a.boolean,selected:r.a.boolean},sessionRelations:{attribution:{relationClass:a.a}},syncedAttrs:{
identifier:r.a.string,name:r.a.string,enabled:r.a.boolean,hasPrefs:r.a.boolean,order:r.a.string},syncedRelations:{languages:{relationClass:o.a,rootPropertyName:"Language"}}});t.a=s},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(65),o=i.a.extend({name:"AgentAttributionModel",context:["server"],responseType:a.a.text,syncedAttrs:{content:r.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(24),r=n(2120),a=i.a.extend({name:"LanguageCollection",context:["server"],model:r.a,comparator:"name"});t.a=a},function(e,t,n){"use strict";var i=n(1044),r=n(17),a=n(16),o=r.a.extend({name:"LanguageModel",context:["server"],idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:a.a.string},derivedAttrs:{name:function(){return Object(i.a)(this.get("code"))}}});t.a=o},function(e,t,n){"use strict";var i=n(551),r=n.n(i),a=n(7),o=n.n(a),s=r.a.extend({
constructor:function(e,t,n,i){this.exclusiveScanners=t,this.scannerName=n,r.a.call(this,e,i),this.filterBy(o.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(7),r=n.n(i),a=n(24),o=n(2123),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(17),r=n(16),a=i.a.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(2125),c=n.n(l),u=a.a.ItemView.extend({template:c.a,events:{
"change [name]":"onEditSectionSettingInputChange"},initialize:function(e){this.hideSettings=e.hideSettings},serializeData:function(){function e(e){return!s.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=r()(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(28)).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(33)).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(4)).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){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(4)).call(t,"Scanner",{hash:{},data:o}))+' <span class="control-error">'+c(i(n(4)).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(4)).call(t,"Agent",{hash:{},data:o}))+' <span class="control-error">'+c(i(n(4)).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(386),r=n(2128),a=n.n(r),o=i.a.extend({template:a.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(4)).call(t,"There was an error adding this library.",{hash:{},data:o}))+"</p> <p>"+l(i(n(4)).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){"use strict"
;var i=n(6),r=n.n(i),a=n(13),o=n.n(a),s=n(18),l=n(445),c=n(724),u=n(1046),d=n(386),p=n(2130),h=n(2133),f=n(2146),v=n.n(f),g=d.a.extend({template:v.a,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},ui:r()({},d.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(d.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 p.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 u.a({},{server:t
}),i=o.a.Deferred(),r=Object(c.a)(function(){return n.fetchAndNotUpdating()},{times:100,delay:2e3,maxDuration:18e4,cancel:i.promise()});Object(l.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 h.a({server:this.model.server});this.listenToOnce(t,"add:folder",this.onAddFolder),s.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=o()(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){"use strict";var i=n(21),r=n(2131),a=i.a.CollectionView.extend({itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(21),o=n(2132),s=n.n(o),l=a.a.ItemView.extend({template:s.a,className:"row",events:{"click .remove-path-btn":"onRemovePathClick"},serializeData:function(){
return r()({},a.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(7),r=n.n(i),a=n(18),o=n(3),s=n(236),l=n(1047),c=n(2138),u=n(2142),d=n(85),p=n(2145),h=n.n(p),f=d.a.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:h.a,events:r.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 l.default({},{server:e.server,includeFiles:1}),this.childrenPathList=new l.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=r.a.first(e)||this.rootPathList.get("paths").first();this.rootList.currentView.startLoadingItem(t),this.loadChildrenPaths(t)}))},loadChildrenPaths:function(e){s.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),a.a.trigger("show:alert",{type:"error",
message:Object(o.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 u.a({isRoot:!0,collection:this.rootPathList.get("paths")}),t=new u.a({collection:this.childrenPathList.get("paths")}),n=new c.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){"use strict";var i=n(24),r=n(2135),a=i.a.extend({name:"FileCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"FileModel",idAttribute:"key",rootPropertyName:"File",syncedAttrs:{key:r.a.string,title:r.a.string,path:r.a.string,network:r.a.boolean}});t.a=a},function(e,t,n){"use strict";var i=n(19),r=n(24),a=n(2137),o=r.a.extend({name:"FilePathCollection",
context:["server","includeFiles"],model:a.a,url:function(){var e={};return this.includeFiles&&(e.includeFiles=1),i.join(["/services/browse"],e)}});t.a=o},function(e,t,n){"use strict";var i=n(19),r=n(17),a=n(16),o=r.a.extend({name:"FilePathModel",context:["server","includeFiles"],idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:a.a.boolean},sessionRelations:{children:function(){var e={};return this.includeFiles&&(e.includeFiles=1),{relationClass:n(1047).default,options:{
url:i.join([this.id],e)}}}},syncedAttrs:{key:a.a.string,title:a.a.string,path:a.a.string,home:a.a.boolean,network:a.a.boolean}});t.a=o},function(e,t,n){"use strict";var i=n(21),r=n(3),a=n(2139),o=n(2141),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(21),r=n(2140),a=n.n(r),o=i.a.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item disabled",template:a.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(13),r=n.n(i),a=n(21),o=n(2143),s=a.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=r()(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(21),r=n(2144),a=n.n(r),o=i.a.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item",template:a.a,ui:{link:"a",spinner:".loading"
},serializeData:function(){return{filePath:this.model.toJSON(),isRoot:!this.model.parent}},select:function(e){this.ui.link.addClass("selected"),this.ui.spinner.toggleClass("hidden",!e)},unselect:function(){this.ui.link.removeClass("selected"),this.ui.spinner.addClass("hidden")}});t.a=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){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(4)).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(4)).call(t,"Cancel",{
hash:{},data:o}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+l(i(n(4)).call(t,"Add",{hash:{},data:o}))+"</button> </div> </form> </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"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(4)).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(4)).call(t,"Plex Cloud is searching for folders",{hash:{},data:o}))+' </span> <span class="add-folder-error hidden"> '+u(i(n(4)).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(4)).call(t,"Browse for media folder",{hash:{},data:o}))+' </button> </p> <p class="control-error">'+u(i(n(4)).call(t,"At least one folder is required.",{hash:{},data:o
}))+'</p> </div> <p class="help-block">'+u(i(n(4)).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(386),r=n(2148),a=n(2150),o=n(2152),s=n.n(o),l=i.a.extend({template:s.a,regions:{options:".section-options"},onRender:function(){
"photos"===this.model.sectionType.key?this.options.show(new a.a({model:this.model})):this.options.show(new r.a({model:this.model}))}});t.a=l},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(18),o=n(15),s=n(386),l=n(679),c=n(2149),u=n.n(c),d=s.a.extend({template:u.a,ui:{chooseLibrary:".choose-library"},events:{"click .choose-library":"onChooseLibraryClick"},modelEvents:{"change:agent":"onSectionAgentChange","change:scanner":"onSectionScannerChange"},
onlyAfterRender:["updateSelectedOffering"],initialize:function(){this.hasPremiumMusic=this.model.server.hasOwnerFeature("premium_music_metadata"),this.updateSelectedOffering()},serializeData:function(){var e=o.c("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=r()(e.currentTarget),n=t.data("agent"),i=t.data("scanner");if((n||i)&&!this.hasPremiumMusic)return void a.a.trigger("show:modal",new l.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(4)).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(4)).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(4)).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:o}))+"</li> <li>"+d(i(n(4)).call(t,"Smart mixes based on track or mood",{hash:{},data:o}))+"</li> <li>"+d(i(n(4)).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(4)).call(t,"Create a basic music library",{
hash:{},data:o}))+" </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(21),r=n(18),a=n(15),o=n(679),s=n(2151),l=n.n(s),c=i.a.Layout.extend({template:l.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=a.c("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):r.a.trigger("show:modal",new o.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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"No thanks",{hash:{},data:o}))+" </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="section-options" />'
})},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(323),l=n(130),c=n(386),u=n(2154),d=n.n(u),p=c.a.extend({template:d.a,ui:o.a.extend({sectionTypes:".wizard-block",sectionTitle:"#edit-section-title",sectionLanguage:"#edit-section-language"},c.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(c.a.prototype.onlyAfterRender),initialize:function(e){this.populateCollections(),this.isDefaultSection=e.isDefaultSection},serializeData:function(){
var e=c.a.prototype.serializeData.apply(this,arguments);e.sectionTypes=l.f.getAll();var t=this.getSectionType();t&&(e.currentSectionKey=t.key);var n=this.model.get("updatedAt");return n&&(e.updatedAt=Object(s.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=r.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=l.f.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=r()(e.currentTarget);if(t.hasClass("selectable")){var n=t.data("key"),i={type:n},a=l.f.get(n)
;this.model.get("title")||(i.title=a.title),this.model.set(i)}},onEditSectionTitleChange:function(e){var t=r()(e.currentTarget);this.model.set("title",t.val()),this.showValidationResult(this.validate(this.model))},onEditSectionLanguageChange:function(e){var t=r()(e.currentTarget);this.model.set("language",t.val()),this.showValidationResult(this.validate(this.model))},onSectionTypeChange:function(e,t){this.updateSectionTypesWizardBlocks();var n=l.f.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=l.f.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(4)).call(e,"Select your library type",{hash:{},data:t}))+"</p> "}function c(e,t){var r="";return r+=" <label>"+m(i(n(4)).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(33)).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(4)).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(4)).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(4)).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(4)).call(t,"Name",{hash:{},data:o}))+' <span class="control-error">'+m(i(n(4)).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(4)).call(t,"Language",{hash:{},data:o}))+' <span class="control-error">'+m(i(n(4)).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){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(4)).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{hash:{},data:t}))+" "}function l(e,t){var r,a=""
;return a+=' <i class="modal-icon glyphicon pencil"></i> '+I(i(n(4)).call(e,"Edit {1}",(r=e&&e.section,null==r||!1===r?r:r.title),{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(33)).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(33)).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(4)).call(e,"Add folders",{hash:{},data:t}))+' </a> </li> <li> <a class="btn-gray change-pane-btn options-btn',a=i(n(33)).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(4)).call(e,"Options",{hash:{},data:t}))+' </a> </li> <li> <a class="btn-gray change-pane-btn advanced-btn',a=i(n(33)).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(4)).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(4)).call(e,"Select type",{hash:{},data:t}))+" "}function h(e,t){var r="";return r+=" "+I(i(n(4)).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(4)).call(e,"Add Library",{hash:{},data:t}))+" "}function m(e,t){var r="";return r+=" "+I(i(n(4)).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(4)).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(4)).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(61),r=n(2157),a=n.n(r),o=i.a.extend({template:a.a,initialize:function(e){
i.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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"No",{hash:{},data:o}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+d(i(n(4)).call(t,"Yes",{hash:{},data:o
}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(3),c=n(85),u=n(2159),d=n.n(u),p=c.a.extend({name:"importPlaylistsModal",className:"import-playlists-modal modal fade",template:d.a,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:o.a.extend({"click .import-btn":"onImportClick"},c.a.prototype.events),initialize:function(e){c.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"}),a=r.a.ajax(i);a.done(o.a.bind(function(){
s.a.trigger("show:alert",{type:"success",message:Object(l.default)("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()},this)),a.fail(function(){s.a.trigger("show:alert",{type:"error",message:Object(l.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(4)).call(t,"Import from iTunes",{hash:{},data:o
}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+p(i(n(4)).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(4)).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(4)).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(4)).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(4)).call(t,"Import",{hash:{},data:o}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(15),o=n(76),s=n(61),l=n(2161),c=n.n(l),u=s.a.extend({template:c.a,events:r.a.extend({"click .learn-more":"onLearnMoreClick"},s.a.prototype.events),onRender:function(){s.a.prototype.onRender.apply(this,arguments),Object(a.c)("metrics").trackView({page:"relayNotification",mode:"modal",action:o.n},{interaction:!1})},onHide:function(e){s.a.prototype.onHide.apply(this,arguments),Object(a.c)("metrics").trackClick({page:"relayNotification",mode:"modal",action:o.n})},
onLearnMoreClick:function(){Object(a.c)("metrics").trackClick({page:"relayNotification",mode:"modal",action:o.y})},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(4)).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(4)).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(4)).call(t,"OK",{hash:{},data:o}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(220),o=n(2163),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(7),r=n.n(i),a=n(160),o=n(91),s=a.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:o.a.parseXML(e);t.SharedServer&&(t=t.SharedServer),
o.a.parseInteger(t,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),o.a.parseBoolean(t,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),o.a.parseArray(t,"Section");var n=t.Section;return r.a.each(n,function(e){o.a.parseInteger(e,"id"),o.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(24),r=n(2165),a=i.a.extend({name:"ServerOverviewCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(2166),o=i.a.extend({name:"ServerOverviewModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",urlRoot:"/api/servers",syncedAttrs:{machineIdentifier:r.a.string,name:r.a.string,address:r.a.string,port:r.a.string,version:r.a.string,createdAt:r.a.integer,
updatedAt:r.a.integer},syncedRelations:{sections:{relationClass:a.a,rootPropertyName:"Section"}}});t.a=o},function(e,t,n){"use strict";var i=n(24),r=n(2167),a=i.a.extend({name:"SectionOverviewCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"SectionOverviewModel",context:["server"],rootPropertyName:"Section",syncedAttrs:{id:r.a.integer,key:r.a.string,type:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict"
;var i=n(21),r=n(370),a=n(2169),o=n.n(a),s=i.a.ItemView.extend({template:o.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 r.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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(13),r=n.n(i),a=n(21),o=n(2171),s=n(2174),l=n.n(s),c=a.a.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:l.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 o.a({collection:this.serverOverviews,itemViewOptions:{paneType:"ownedServer"}})),this.sharedServerList.show(new o.a({
collection:this.sharedServerShares,itemViewOptions:{paneType:"sharedServer"}}))},onChangePaneClick:function(e){e.preventDefault();var t=r()(e.currentTarget);if(!t.isDisabled()){var n=t.data("pane"),i=t.data("pane-id"),a={};"ownedServer"===n?a.serverOverview=this.model.get("serverOverviews").get(i):"sharedServer"===n&&(a.serverShare=this.model.get("serverShares").get(i)),this.trigger("change:pane",n,i,a)}}});t.a=c},function(e,t,n){"use strict";var i=n(86),r=n(2172),a=i.a.extend({
className:"server-nav-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(21),r=n(15),a=n(2173),o=n.n(a),s=i.a.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:o.a,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,"data-pane-id":this.model.id});var t=r.c("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){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(4)).call(t,"General",{hash:{},data:o}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+l(i(n(4)).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(4)).call(t,"Restrictions",{hash:{},data:o}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+l(i(n(4)).call(t,"Shared With Me",{hash:{},data:o}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(15),c=n(323),u=n(2176),d=n(2180),p=n.n(d),h=a.a.Layout.extend({template:p.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=l.c("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||s.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(c.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 u.a({model:this.model,serverOverview:this.serverOverview,itemViewOptions:this.itemViewOptions}))},onServerStatusClick:function(e){e.preventDefault()
;var t=r()(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"))}});t.a=h},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(2177),c=n(2179),u=n.n(c),d=a.a.CompositeView.extend({className:"share-server-container",template:u.a,itemView:l.a,itemViewContainer:".share-section-list",ui:{list:".share-section-list"},events:{"change input[name=share-all-libraries-cb]":"onAllLibrariesChange"},initialize:function(e){
s.a.bindAll(this,"render"),this.serverOverview=e.serverOverview,this.collection=this.serverOverview.get("sections");var t=this.model.get("serverShares");this.serverShare=t.findWhere({machineIdentifier:this.serverOverview.id});var n=[];n.push(this.serverOverview.populate()),this.serverShare&&(this.itemViewOptions={serverShare:this.serverShare},this.serverShare.isNew()||n.push(this.serverShare.populate())),this.listPromise=r.a.when.apply(r.a,n),
"pending"===this.listPromise.state()&&this.listPromise.always(this.render)},serializeData:function(){var e=this.listPromise.state(),t=!this.serverShare&&this.model.isNew(),n=this.serverShare&&this.serverShare.get("allLibraries");return{server:this.serverOverview.toJSON(),isPending:"pending"===e,hasFailed:"rejected"===e,hasSections:!!this.serverOverview.get("sections").length,allLibraries:t||n}},onAllLibrariesChange:function(e){this.ui.list.toggleClass("show-libraries",!e.currentTarget.checked)}
});t.a=d},function(e,t,n){"use strict";var i=n(21),r=n(7),a=n.n(r),o=n(130),s=n(2178),l=n.n(s),c=i.a.ItemView.extend({tagName:"li",className:"share-section-list-item",template:l.a,initialize:function(e){this.serverShare=e.serverShare},serializeData:function(){var e={section:this.model.toJSON(),typeIcon:o.f.get(this.model.get("type")).sectionTypeIcon,isChecked:!1};if(this.serverShare&&!this.serverShare.get("allLibraries")){var t=this.serverShare.get("Section");e.isChecked=!!a.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){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(4)).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(4)).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(4)).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(4)).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){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(4)).call(t,"Available",{hash:{},data:o
}))+'</span> <span class="server-status-label unavailable">'+l(i(n(4)).call(t,"Unavailable",{hash:{},data:o}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(4)).call(t,"Unauthorized",{hash:{},data:o}))+'</span> <span class="server-status-label unknown">'+l(i(n(4)).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(4)).call(t,"Info",{hash:{},data:o}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(4)).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(4)).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(4)).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(4)).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(4)).call(t,"Share",{hash:{},data:o}))+"</h4> </div> "})},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(13),o=n.n(a),s=n(21),l=n(1049),c=(n.n(l),
n(7)),u=n.n(c),d=n(15),p=n(668),h=n(81),f=n(130),v=n(2182),g=n.n(v),m=s.a.ItemView.extend({className:"form-horizontal",template:g.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=d.c("appModel"),n=t.get("user"),i=n.get("features").get(h.a),r=n.get("features").get(h.l);this.hasContentFilterFeature=n.get("features").get(h.c),this.canShareTuners=(!!e.homeUser||i)&&r,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:f.f.get("movies").sectionTypeIcon,showsIcon:f.f.get("tv").sectionTypeIcon,musicIcon:f.f.get("music").sectionTypeIcon,photosIcon:f.f.get("photo").sectionTypeIcon}},loadPresets:function(){u.a.each(this.filters,function(e,t){u.a.isEmpty(e.presets)||u.a.each(e.presets,function(e,n){var i=this.getSelectizeInputByFilterName(t,n),r=u.a.map(e,function(e){return{title:e,key:e}})
;i.addOption(r)},this)},this)},loadSections:function(){var e=d.c("appModel"),t=e.get("servers"),n=this.model.get("serverShares"),i=n.filter(function(e){return e.isActive()&&e.get("owned")}),r=u.a.compact(u.a.map(i,function(e){return t.get(e.get("machineIdentifier"))}));u.a.each(r,function(e){if(e.get("connected")){var t=e.get("sections");t.populate().done(u.a.bind(function(){this.loadFilters(t)},this))}},this)},loadFilters:function(e){e.each(function(e){var t=e.get("type")
;u.a.each(this.filters,function(n,i){u.a.contains(n.sectionTypes,t)&&this.loadFilterOptions(e,i)},this)},this)},loadFilterOptions:function(e,t){var n=new p.a({filter:t,filterType:"string"},{server:e.server,section:e}),i=n.get("options");i.populate().done(u.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=[]
;u.a.each(this.filters,function(t){e=u.a.union(e,t.sectionTypes)}),u.a.each(e,function(e){var t=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:u.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=o()(t),i=t.value,r=n.data("filter"),a=n.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===t.name){if(r){var s=this.changes[t.name]||this.model.get(t.name)||{};i?s[r]=i:s.hasOwnProperty(r)&&delete s[r],this.resetPlaceholders(a,{restore:u.a.isEmpty(s)}),i=s}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(4)).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(4)).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(4)).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(4)).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(4)).call(e,"Allow access to Live TV",{hash:{},data:t
}))+' </label> <p class="help-block"> '+v(i(n(4)).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(4)).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(4)).call(t,"Allow Camera Upload",{hash:{},data:o
}))+' </label> <p class="help-block">'+v(i(n(4)).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(4)).call(t,"Movies",{hash:{},data:o}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+v(i(n(4)).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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"TV Shows",{hash:{},data:o}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+v(i(n(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(15),c=n(323),u=n(3),d=n(130),p=n(2184),h=n.n(p),f=n(2185),v=n.n(f),g=a.a.ItemView.extend({template:h.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=l.c("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(c.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="",s.a.each(s.a.where(e,{shared:!0}),function(e){var n={section:e,
typeIcon:d.f.get(e.type).sectionTypeIcon};t+=v()(n)})):t=v()({section:{title:Object(u.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=r()(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(4)).call(t,"Available",{hash:{},data:o}))+'</span> <span class="server-status-label unavailable">'+l(i(n(4)).call(t,"Unavailable",{hash:{},data:o}))+'</span> <span class="server-status-label unauthorized">'+l(i(n(4)).call(t,"Unauthorized",{hash:{},data:o
}))+'</span> <span class="server-status-label unknown">'+l(i(n(4)).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(4)).call(t,"Info",{hash:{},data:o}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+l(i(n(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(40),c=n(2187),u=n.n(c),d=a.a.ItemView.extend({template:u.a,focusDelay:200,validationDelay:500,ui:{existingGroup:".existing-user-group",existingBtn:".add-existing-user-btn",restrictedGroup:".restricted-user-group",restrictedBtn:".add-restricted-user-btn"},events:{"keyup input":"onInputChange","change input":"onInputChange",
"click .add-existing-user-btn":"onAddExistingUserClick","click .add-restricted-user-btn":"onAddRestrictedUserClick"},initialize:function(e){this.paneID=e.paneID,this.type=e.type,this.homeUser=e.homeUser,this.changes={},this.validate=s.a.debounce(this.validate,500)},serializeData:function(){return{type:this.type}},flushChanges:function(){this.model.set(this.changes),this.homeUser&&this.homeUser.set(this.changes)},focusInput:function(){var e
;e=this.changes.restricted?this.$("[name=title]"):this.$("[name=username]"),e.removeClass("hidden"),e.focus()},validate:function(e){if(e){var t=l.a.execute("validateUsername",{username:e,server:this.model.server});t.done(s.a.bind(function(){this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),t.fail(s.a.bind(function(e,t){this.$el.removeClass("is-valid-username"),this.$el.addClass("is-invalid-username"),this.trigger("change:errorMessage",t)},this))}},
onRender:function(){"friend"===this.type&&setTimeout(s.a.bind(this.focusInput,this),this.focusDelay)},onInputChange:function(e){var t=e.currentTarget,n=t.name,i=t.value;i!==this.changes[n]&&(this.changes[n]=i,this.trigger("change:errorMessage",""),this.trigger("enable:submit",!!i),"username"===n&&this.validate(i))},onAddExistingUserClick:function(e){e.preventDefault();var t=r()(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=r()(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(4)).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(4)).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(i(n(4)).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(4)).call(e,"Name",{hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+d(i(n(4)).call(e,"Create a Managed User",{hash:{},data:t
}))+'</button> <p class="help-block">'+d(i(n(4)).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(4)).call(e,"Username or email",{hash:{},data:t
}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+d(i(n(4)).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(33)).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){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(33)).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(4)).call(e,"Add User",{hash:{},data:t
}))+" "}function u(e,t){var r="";return r+=" "+y(i(n(4)).call(e,"Invite Friend",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=" "+y(i(n(4)).call(e,"Save Changes",{hash:{},data:t}))+" "}function p(e,t){var r,a="";return a+=" ",r=i(n(33)).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(4)).call(e,"Add",{hash:{},data:t}))+" "}function f(e,t){var r=""
;return r+=" "+y(i(n(4)).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(4)).call(t,"Cancel",{hash:{},data:o
}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+y(i(n(4)).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";function i(e){
var t=e.serverEntityID,n=e.sectionTypes,i=e.librariesBySectionType,r=e.librariesCount,o=e.isLibrariesPopulated,d=e.librariesError,v=e.isLibraryRefreshing,y=e.onAddLibraryPress,b=e.onCancelUpdatePress,I=e.onUpdateLibrariesPress;return d&&!r?a()(h.a,{title:Object(u.default)("There was an unexpected error loading libraries.")}):o||d?a()(s.Fragment,{},void 0,a()("div",{className:g.a.header},void 0,a()("div",{className:g.a.headerTitle},void 0,Object(u.default)("{librariesCount} Libraries",{
librariesCount:r})),a()("div",{},void 0,a()(l.a,{className:g.a.button,size:c.SMALL,onPress:y},void 0,Object(u.default)("Add library")),v?a()(l.a,{className:g.a.button,size:c.SMALL,onPress:b},void 0,Object(u.default)("Cancel scan")):a()(l.a,{className:g.a.button,size:c.SMALL,onPress:I},void 0,Object(u.default)("Scan library files")))),n.map(function(e){var n=i[e.key];return n?a()(f.a,{serverEntityID:t,libraryEntityIDs:n,sectionTypeTitle:e.title},e.key):null})):a()(p.a,{
title:Object(u.default)("Loading libraries")},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(42)),c=n(52),u=n(3),d=n(31),p=n(73),h=n(113),f=n(2192),v=n(2203),g=n.n(v),m=a()(d.a,{});t.a=i},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:"ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.libraryEntityIDs,i=e.sectionTypeTitle;return a()(s.Fragment,{},void 0,a()("div",{className:u.a.title},void 0,i),a()("div",{className:u.a.divider}),n.map(function(e,n){return a()(l.a,{serverEntityID:t,libraryEntityID:e,rowIndex:n},e)}))}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(2202),u=n.n(c);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),Object(d.a)(),Object(s.b)(),function(e,t,n){return{title:e.title,route:t,type:Object(l.a)(e),refreshing:e.refreshing,isLibraryDeleteInProgress:!!n}})}function r(e,t){var n={serverEntityID:t.serverEntityID,libraryEntityID:t.libraryEntityID,metricsPage:t.metricsPage};return{onShareLibraryPress:function(){e(u.g(n))},onUpdateLibraryPress:function(){e(u.i(n))},
onCancelUpdateLibraryPress:function(){e(u.b(n))},onEditLibraryPress:function(){e(u.d(n))},onAnalyzeLibraryPress:function(){e(u.a(n))},onRefreshLibraryPress:function(){e(u.h(n))},onEmptyTrashLibraryPress:function(){e(u.e(n))},onDeleteLibraryPress:function(){e(u.c(n))}}}var a=n(5),o=(n.n(a),n(725)),s=n(553),l=n(722),c=n(55),u=n(726),d=n(1050),p=n(2194);t.a=Object(c.a)(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(20)),f=n(45),v=n(49),g=n(30),m=n(3),y=n(130),b=n(25),I=n(31),S=n(242),M=n(157),D=n(2196),C=n(2201),O=n.n(C),P=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(f.a)(),r}return u()(t,e),
t.getDerivedStateFromProps=function(e,t){return e.isLibraryDeleteInProgress!==t.isLibraryDeleteInProgress?!e.isLibraryDeleteInProgress&&t.isLibraryDeleteInProgress&&t.isDeleteModalOpen?{isDeleteModalOpen:!1,isLibraryDeleteInProgress:e.isLibraryDeleteInProgress}:{isLibraryDeleteInProgress:e.isLibraryDeleteInProgress}:null},t.prototype.render=function(){
var e=this.props,t=e.rowIndex,n=e.title,i=e.route,a=e.type,o=e.refreshing,s=e.isLibraryDeleteInProgress,l=e.onShareLibraryPress,c=e.onUpdateLibraryPress,u=e.onCancelUpdateLibraryPress,d=e.onEditLibraryPress,p=this.state.isActionsMenuOpen,f=Object(m.default)("Edit {library}",{library:n});return r()("div",{className:((t%2?O.a.alternateContainer:O.a.container)||"")+" "+(p&&O.a.isActionsMenuOpen||""||"")},void 0,r()(h.a,{className:O.a.underlay,title:f,onPress:d}),r()("div",{
className:O.a.titleContainer},void 0,r()("div",{className:O.a.iconContainer},void 0,o?r()(I.a,{className:O.a.spinner}):r()(b.a,{name:y.f.get(a).sectionTypeIcon})),r()(h.a,{className:O.a.title,title:n,to:i},void 0,n)),r()("div",{className:O.a.actions},void 0,r()(h.a,{className:O.a.action,title:f,onPress:d},void 0,Object(m.default)("Edit")),r()(S.a,{id:this._actionsMenuButtonID,className:O.a.action,icon:"plex-icon-more-560",title:Object(m.default)("More Actions"),onPress:this.onActionsPress
}),r()(D.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:o,onMenuClose:this.onActionsMenuClose,onSharePress:l,onUpdatePress:c,onCancelUpdatePress:u,onAnalyzePress:this.onAnalyzePress,onRefreshAllPress:this.onRefreshAllPress,onEmptyTrashPress:this.onEmptyTrashPress,onDeletePress:this.onDeletePress}),r()(M.a,{isOpen:this.state.isAnalyzeModalOpen,metricsPage:g.d,title:Object(m.default)("Analyze Library"),
message:Object(m.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(m.default)("Analyze"),onConfirm:this.onAnalyzeConfirm,onCancel:this.onAnalyzeCancel}),r()(M.a,{isOpen:this.state.isRefreshAllModalOpen,metricsPage:g.l,title:Object(m.default)("Refresh All Metadata"),
message:Object(m.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(m.default)("Refresh"),onConfirm:this.onRefreshAllConfirm,onCancel:this.onRefreshAllCancel}),r()(M.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:g.k,title:Object(m.default)("Empty Trash"),
message:Object(m.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(m.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),r()(M.a,{isOpen:this.state.isDeleteModalOpen,isConfirmButtonSpinning:s,isCancelButtonDisabled:s,metricsPage:g.h,kind:v.DANGER,
title:Object(m.default)("Delete Library"),message:Object(m.default)('The library "{libraryName}" will be removed from this server. Your media files will not be affected. This can\'t be undone. Continue?',{libraryName:n}),accordMessage:Object(m.default)('Yes, delete the library "{libraryName}"',{libraryName:n}),confirmLabel:Object(m.default)("Delete"),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel})))},t}(p.Component);t.a=P},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,n){"use strict";function i(e){var t=e.isLibraryRefreshing,n=e.onSharePress,i=e.onUpdatePress,r=e.onCancelUpdatePress,o=e.onAnalyzePress,l=e.onRefreshAllPress,c=e.onEmptyTrashPress,v=e.onDeletePress,g=s()(e,["isLibraryRefreshing","onSharePress","onUpdatePress","onCancelUpdatePress","onAnalyzePress","onRefreshAllPress","onEmptyTrashPress","onDeletePress"])
;return u.a.createElement(d.a,g,a()(p.a,{onPress:n},void 0,Object(h.default)("Share...")),t?a()(p.a,{onPress:r},void 0,Object(h.default)("Cancel Scan")):a()(p.a,{onPress:i},void 0,Object(h.default)("Scan Library Files")),a()(p.a,{onPress:o},void 0,Object(h.default)("Analyze")),a()(p.a,{onPress:l},void 0,Object(h.default)("Refresh All Metadata")),a()(p.a,{onPress:c},void 0,Object(h.default)("Empty Trash")),a()(p.a,{kind:f.b.DANGER,onPress:v},void 0,Object(h.default)("Delete")))}
var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(101),h=n(3),f=n(23);t.a=i},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(52)),c=n(2198),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){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={container:"ManageLibrarySummary-container-2i42A",isActionsMenuOpen:"ManageLibrarySummary-isActionsMenuOpen-2S0oY",actions:"ManageLibrarySummary-actions-Xad3M",underlay:"ManageLibrarySummary-underlay-3yXf2",
alternateContainer:"ManageLibrarySummary-alternateContainer-2wBQ- ManageLibrarySummary-container-2i42A",titleContainer:"ManageLibrarySummary-titleContainer-14le9",iconContainer:"ManageLibrarySummary-iconContainer-2GNNa",spinner:"ManageLibrarySummary-spinner-i5J6L",title:"ManageLibrarySummary-title-ah-Rn",action:"ManageLibrarySummary-action-2Wct9"}},function(e,t){e.exports={title:"SectionTypeLibraries-title-3B6e9",divider:"SectionTypeLibraries-divider-2acpq"}},function(e,t){e.exports={
header:"ManageLibrariesPane-header-1Q-gm",headerTitle:"ManageLibrariesPane-headerTitle-2WyRs",button:"ManageLibrariesPane-button-3nA1p"}},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(I.a)(),function(e){return{title:e.friendlyName}})}var r=n(6),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(5),m=(n.n(g),n(15)),y=n(916),b=n(652),I=n(34),S=n(390),M=n(2206),D=n(2208),C={dispatchClearLog:S.e,
dispatchLoadLogFile:S.h},O=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));r.onDrop=function(){var e;r._stopServerEventManager(),(e=r.props).dispatchLoadLogFile.apply(e,arguments)};var a=Object(m.c)("appModel");return r._serverEventManager=new b.a({name:"MediaServerLogEventManager",appModel:a,isValidServer:function(e){return e.entityID()===n.serverEntityID},supportsLongPolling:!1,ServerEventConnection:M.a,ServerRetryManager:y.a}),r}return d()(t,e),
t.prototype.componentDidMount=function(){var e=this;this.props.dispatchClearLog(),this._serverEventManager.start(),Object(m.c)("appModel").get("servers").forEach(function(t){var n=t.get("isResolved");n&&e._serverEventManager.onServerResolvedChange(t,n)})},t.prototype.componentWillUnmount=function(){this._stopServerEventManager()},t.prototype._stopServerEventManager=function(){this._isServerEventManagerStopped||(this._serverEventManager.stop(),this.props.dispatchClearLog(),
this._isServerEventManagerStopped=!0)},t.prototype.render=function(){return f.a.createElement(D.a,a()({onDrop:this.onDrop},this.props))},t}(h.Component);t.a=Object(v.b)(i,C)(O)},function(e,t,n){"use strict";function i(e,t,n){if(!t)return null;for(var i=s()(t),r=0,a=e.length-1,o=void 0;r<=a;){o=Math.floor((r+a)/2);var l=e[o],c=e[o+1];if(!c)return i.isAfter(l.time)?o:o+1;if(i.isSame(l.time))return n<o?o:o+1;if(i.isAfter(l.time)&&i.isBefore(c.time))return o+1
;i.isAfter(l.time)?r=o+1:i.isBefore(l.time)&&(a=o-1)}return Math.max(0,o)}function r(e,t){return i(e,t,-1/0)}function a(e,t){return i(e,t,1/0)}t.a=r,t.b=a;var o=n(48),s=n.n(o)},function(e,t,n){"use strict";var i,r=n(15),a=n(306),o=n(1052),s=n(728),l=n(390),c=[s.g],u=o.a.extend((i={name:"MediaServerLogEventConnection",url:function(){var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws");return this.server.resolveUrl("/:/websockets/notifications",{params:{filters:"log"},
connection:new a.a({uri:t}),appendToken:!0})},getMessageTypes:function(){return c}},i[s.g]=function(e){Object(r.c)("appStore").dispatch(Object(l.a)({message:e,serverEntityID:this.server.entityID()}))},i));t.a=u},function(e,t,n){"use strict";function i(e){switch(e.type){case a.i:return e.Setting;case a.o:return e.TimelineEntry;case a.l:return e.StatusNotification;case a.j:return e.ProgressNotification;case a.h:return e.PlaySessionStateNotification;case a.n:return e.SyncStateNotification;case a.c:
return e.BackgroundGeneratorStateNotification;case a.t:return e.VersionStateNotification;case a.d:return e.BackgroundProcessingQueueEventNotification;case a.q:case a.r:case a.p:return e.TranscodeSession;case a.s:return e.AutoUpdateNotification;case a.k:return e.ReachabilityNotification;case a.a:return e.AccountUpdateNotification;case a.b:return e.ActivityNotification;case a.f:return e.MediaGrabberDeviceNotification;case a.e:return e.MediaProviderContentNotification;case a.g:
return e.LogSentNotification}}function r(e,t){return(-1===t.indexOf(e.type)?[]:i(e))||[]}var a=n(728);t.a=r},function(e,t,n){"use strict";function i(e){var t=e.dataTransfer.items,n=t[0];return""!==n.type||"file"!==n.kind?C:t.length>1?D: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(54)),v=n(3),g=n(25),m=n(31),y=n(83),b=n(2211),I=n(2229),S=n(2243),M=n.n(S),D=1,C=2,O=a()(I.a,{}),P=a()(m.a,{}),j=function(e){function t(n,r){s()(this,t)
;var a=c()(this,e.call(this,n,r));return a.onDragOver=function(e){a.setState({isDraggingFile:!0,fileDragError:i(e)}),e.preventDefault()},a.onDragLeave=function(){a.setState({isDraggingFile:!1,fileDragError:null})},a.onDrop=function(e){if(e.preventDefault(),i(e))return void a.setState({isDraggingFile:!1,fileDragError:null});a.setState({isDroppingFile:!0});var t=e.dataTransfer.files[0],n=new window.FileReader;n.onload=function(){a.setState({title:t.name,isDraggingFile:!1,isDroppingFile:!1}),
a.props.onDrop({result:n.result})},n.readAsText(t)},a.state={title:n.title,isDraggingFile:!1,isDroppingFile:!1,fileDragError:null},a}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.metricsPage,n=e.metricsPane,i=this.state,r=i.title,o=i.isDraggingFile,s=i.isDroppingFile,l=i.fileDragError,c=o&&!s&&(l===D&&Object(v.default)("Only one file at a time")||l===C&&Object(v.default)("Only log files are allowed")||Object(v.default)("Load log file"));return a()(y.a,{metricsPage:t,
metricsProperties:{pane:n},scrollDirection:f.NONE,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop},void 0,a()(b.a,{title:r}),O,o?a()("div",{className:M.a.dropFileOverlay},void 0,l?a()(g.a,{className:M.a.icon,name:"plex-icon-circle-backslash-560"}):null,c,s?P:null):null)},t}(h.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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(270),p=n(1053),h=n(2210),f=n.n(h);t.a=i},function(e,t){e.exports={page:"Page-page-aq7i_"}},function(e,t,n){"use strict";function i(e,t){
var n=t.serverEntityID;return{onTextFilterChange:function(t){Object(o.a)(function(){e(s.b({serverEntityID:n,filter:t}))})},onTimeFilterChange:function(t,i){Object(o.a)(function(){e(s.c({serverEntityID:n,timeFilterStart:t,timeFilterEnd:i}))})},onToggleTimeFilter:function(){e(s.l({serverEntityID:n}))},onToggleRaw:function(){e(s.k())},onClearLog:function(){e(s.e({serverEntityID:n}))}}}var r=n(11),a=n(5),o=(n.n(a),n(35)),s=n(390),l=n(2212),c=Object(a.createSelector)(function(e){
return e.ui.serverLogPage},function(e){return{filter:e.filter,timeFilterStart:e.timeFilterStart,timeFilterEnd:e.timeFilterEnd,showTimeFilter:e.showTimeFilter,showRawText:e.showRawText,logLines:e.logLines,unfilteredLogLinesCount:e.unfilteredLogLinesCount}});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(72)),f=n(20),v=n(114),g=n(193),m=n(134),y=n(102),b=n(3),I=n(25),S=n(2217),M=n(2224),D=n(2226),C=n(2228),O=n.n(C),P=r()(h.b,{}),j=r()(h.b,{}),T=r()(S.a,{}),w=r()(I.a,{name:"plex-icon-timer-560"}),E=r()(I.a,{name:"plex-icon-circle-backslash-560"}),x=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.filter,n=e.timeFilterStart,i=e.timeFilterEnd,a=e.showTimeFilter,o=e.showRawText,s=e.title,l=e.unfilteredLogLinesCount,c=e.logLines,u=e.onTextFilterChange,d=e.onTimeFilterChange,h=e.onToggleTimeFilter,I=e.onToggleRaw,S=e.onClearLog,C=l-c.length;return r()(p.Fragment,{},void 0,r()(g.a,{},void 0,r()(m.a,{},void 0,s,P,Object(b.default)("Plex Media Server Logs"),C>0?r()("span",{className:O.a.controlsHiddenLinesCount
},void 0,j,Object(b.default)("{hiddenLinesCount} items hidden by filters",{hiddenLinesCount:C})):null),r()(y.a,{},void 0,T,r()(M.a,{filter:t,onTextFilterChange:u}),r()(v.a,{tooltip:Object(b.default)("Time Filter"),isSelected:a,onPress:h},void 0,w),r()(f.a,{className:O.a.rawButton,isSelected:o,onPress:I},void 0,Object(b.default)("Raw")),r()(v.a,{tooltip:Object(b.default)("Clear Logs"),onPress:S},void 0,E))),a?r()(D.a,{timeFilterStart:n,timeFilterEnd:i,onTimeFilterChange:d}):null)},t}(p.Component)
;t.a=x},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-2i2nn",bottomLeft:"ToolbarButton-bottomLeft-3shLl Tooltip-bottomLeft-2fPtV Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipLeftAlignArrow-NweCL",bottomCenter:"ToolbarButton-bottomCenter-1rHc9 Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt",
bottomRight:"ToolbarButton-bottomRight-3evr6 Tooltip-bottomRight-T6_Ik Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipRightAlignArrow-1ETgz"}},function(e,t){e.exports={pageHeader:"PageHeader-pageHeader-14-NY"}},function(e,t){e.exports={pageHeaderLeft:"PageHeaderLeft-pageHeaderLeft-OxyzP"}},function(e,t){e.exports={pageHeaderRight:"PageHeaderRight-pageHeaderRight-2a8wu"}},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return{
onResetLogLevels:function(){e(Object(o.i)({serverEntityID:n}))},onToggleLogLevel:function(t){e(Object(o.j)({serverEntityID:n,logLevel:t}))}}}var r=n(11),a=n(5),o=(n.n(a),n(390)),s=n(2218),l=Object(a.createSelector)(function(e){return e.ui.serverLogPage.logLevels},function(e){return{logLevels:e}});t.a=Object(r.b)(l,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(118)),f=n(56),v=n(243),g=n(45),m=n(52),y=n(3),b=n(2221),I=n(730),S=n(103),M=r()(v.a,{}),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMenuPress=function(){r.setState(function(e){return{isMenuOpen:!e.isMenuOpen}})},r.onMenuClose=function(){r.setState({isMenuOpen:!1})},r.onAllPress=function(){r.props.onResetLogLevels()},r.onLogLevelSelect=function(e){r.props.onToggleLogLevel(e)},r._buttonID=Object(g.a)(),r.state={isMenuOpen:!1},r}return u()(t,e),
t.prototype.render=function(){var e=this,t=this.props.logLevels,n=this.state.isMenuOpen,i=void 0;return i=t.length?1===t.length?Object(I.a)(t[0]):Object(y.default)("Custom"):Object(y.default)("All"),r()(p.Fragment,{},void 0,r()(h.a,{id:this._buttonID,title:i,hasMenu:!0,isMenuOpen:n,onPress:this.onMenuPress}),r()(f.a,{target:this._buttonID,isOpen:n,size:m.LARGE,onMenuClose:this.onMenuClose},void 0,r()(S.a,{isSelected:!t.length,onPress:this.onAllPress
},"all",Object(y.default)("All")),M,b.a.map(function(n,i){return r()(S.a,{value:n,isSelected:-1!==t.indexOf(n),onSelect:e.onLogLevelSelect},i,Object(I.a)(n))})))},t}(p.Component);t.a=D},function(e,t){e.exports={link:"PageHeaderBreadcrumbButton-link-30Jgz",button:"PageHeaderBreadcrumbButton-button-ZRyx6 DisclosureArrowButton-disclosureArrowButton-11LSb"}},function(e,t){e.exports={separator:"MenuSeparator-separator-vr6OL"}},function(e,t,n){"use strict";var i=[4,3,2,1,0];t.a=i},function(e,t,n){
"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(101),b=n(2223),I=n.n(b),S=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.onPress=function(e){var t=i.props,n=t.value,r=t.onSelect,a=t.onPress;r&&r(n),a&&a(e)},r=n,p()(i,r)}return f()(t,e),t.prototype.render=function(){
var e=this.props,t=e.children,n=e.className,i=e.iconComponent,a=e.isSelected,s=e.selectedIconName,c=e.selectedIconAriaLabel,u=l()(e,["children","className","iconComponent","isSelected","selectedIconName","selectedIconAriaLabel"]);return m.a.createElement(y.a,r()({className:(n||"")+" "+(a&&I.a.isSelected||""||"")},u,{onPress:this.onPress}),o()("div",{className:I.a.menuItemContainer},void 0,o()("div",{className:I.a.menuLabel},void 0,t),a&&o()("div",{className:I.a.selectedIcon},void 0,o()(i,{
name:s,"aria-label":c}))))},t}(g.Component);S.defaultProps={selectedIconName:"plex-icon-selected-560"},t.a=S},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";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(192)),f=n(52),v=n(3),g=n(2225),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.onTextFilterChange=function(e){r._clearOnTextFilterChangeTimeout(),r.setState({filter:e},function(){r._timeoutID=setTimeout(function(){r._timeoutID=null,r.props.onTextFilterChange(r.state.filter)},200)})},r.state={filter:n.filter,filterFromStore:n.filter},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){return e.filter!==t.filterFromStore?{filter:e.filter,
filterFromStore:e.filter}:null},t.prototype.componentWillUnmount=function(){this._clearOnTextFilterChangeTimeout()},t.prototype._clearOnTextFilterChangeTimeout=function(){this._timeoutID&&clearTimeout(this._timeoutID)},t.prototype.render=function(){var e=this.state.filter;return r()(h.a,{className:m.a.input,size:f.LARGE,name:"filter",initialValue:e,value:e,placeholder:Object(v.default)("Filter logs"),onChange:this.onTextFilterChange})},t}(p.Component);t.a=y},function(e,t){e.exports={
input:"ServerLogFilterInput-input-1ueuP 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(192)),f=n(52),v=n(3),g=n(2227),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._flushValues=function(){r._timeoutID=setTimeout(function(){r._timeoutID=null,r.props.onTimeFilterChange(r.state.timeFilterStart,r.state.timeFilterEnd)},200)},
r.onFilterStartChange=function(e){r._clearOnTextFilterChangeTimeout(),r.setState({timeFilterStart:e},r._flushValues)},r.onFilterEndChange=function(e){r._clearOnTextFilterChangeTimeout(),r.setState({timeFilterEnd:e},r._flushValues)},r.state={timeFilterStart:n.timeFilterStart,timeFilterStartFromStore:n.timeFilterStart,timeFilterEnd:n.timeFilterEnd,timeFilterEndFromStore:n.timeFilterEnd},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){
return e.timeFilterStart!==t.timeFilterStartFromStore||e.timeFilterEnd!==t.timeFilterEndFromStore?{timeFilterStart:e.timeFilterStart,timeFilterStartFromStore:e.timeFilterStart,timeFilterEnd:e.timeFilterEnd,timeFilterEndFromStore:e.timeFilterEnd}:null},t.prototype.componentWillUnmount=function(){this._clearOnTextFilterChangeTimeout()},t.prototype._clearOnTextFilterChangeTimeout=function(){this._timeoutID&&clearTimeout(this._timeoutID)},t.prototype.render=function(){
var e=this.state,t=e.timeFilterStart,n=e.timeFilterEnd;return r()("div",{className:m.a.container},void 0,r()(h.a,{className:m.a.input,size:f.LARGE,name:"timeFilterStart",initialValue:t,value:t,placeholder:"Jun 15, 2018 09:00:00",onChange:this.onFilterStartChange}),r()("span",{className:m.a.separator},void 0,Object(v.default)("to")),r()(h.a,{className:m.a.input,size:f.LARGE,name:"timeFilterEnd",initialValue:n,value:n,placeholder:"Jun 15, 2018 09:01:00",onChange:this.onFilterEndChange}))},t
}(p.Component);t.a=y},function(e,t){e.exports={container:"ServerLogTimeFilterInputs-container-2cnIR",separator:"ServerLogTimeFilterInputs-separator-6uUbh",input:"ServerLogTimeFilterInputs-input-sLDSi TextInput-input-1VMum input-input-1P2Vi"}},function(e,t){e.exports={controlsHiddenLinesCount:"ServerLogPageHeader-controlsHiddenLinesCount-2RVYn",rawButton:"ServerLogPageHeader-rawButton-b0m7A"}},function(e,t,n){"use strict";function i(e,t){var n=t.serverEntityID;return{
onTextFilterChange:function(){e(o.b.apply(void 0,arguments))},onTimeFilterChange:function(){e(o.c.apply(void 0,arguments))},onHighlightLine:function(t){e(Object(o.g)(t))},onClearFilter:function(){e(Object(o.d)({serverEntityID:n}))}}}var r=n(11),a=n(5),o=(n.n(a),n(390)),s=n(2230),l=Object(a.createSelector)(function(e){return e.ui.serverLogPage},function(e){return{filter:e.filter,timeFilterStart:e.timeFilterStart,timeFilterEnd:e.timeFilterEnd,logLevels:e.logLevels,showRawText:e.showRawText,
logLines:e.logLines}}),c=Object(r.b)(l,i)(s.a);t.a=c},function(e,t,n){"use strict";function i(){return{isSticky:!0,scrollIndex:0,scrollIndexAfterFilterChange:null,selectedLogLine:null}}function r(e){return!!(e.filter||e.timeFilterStart||e.timeFilterEnd||e.logLevels.length)}var a=n(2),o=n.n(a),s=n(6),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(20),b=n(209),I=n(3),S=n(335),M=n(2235),D=n(2238),C=n(2241),O=n(2242),P=n.n(O),j=Object(S.a)(26,10,{
outerPaddingTop:10,outerPaddingBottom:10}),T=function(e){function t(n,a){u()(this,t);var o=p()(this,e.call(this,n,a));return o.onScroll=function(){var e=o._scrollerRef.current;e.scrollTop+e.clientHeight>=e.scrollHeight?o.setState({isSticky:!0,scrollIndex:null}):e.scrollTop<o._lastScrollTop&&o.setState({isSticky:!1}),o._lastScrollTop=e.scrollTop},o.onJumpToContext=function(e){r(o.props)?o.setState({isSticky:!1,scrollIndexAfterFilterChange:e,selectedLogLine:null},function(){o.props.onClearFilter()
}):o.setState({isSticky:!1,scrollIndex:e,selectedLogLine:null})},o.onTextFilterChange=function(){var e;o.setState({scrollIndex:0,selectedLogLine:null}),(e=o.props).onTextFilterChange.apply(e,arguments)},o.onTimeFilterChange=function(){var e;o.setState({scrollIndex:0,selectedLogLine:null}),(e=o.props).onTimeFilterChange.apply(e,arguments)},o.onLogLinePress=function(e){o.setState({selectedLogLine:e}),o.props.onHighlightLine(e)},o.onModalClose=function(e){o.setState({selectedLogLine:null})},
o.onJumpToLatestPress=function(){o.setState({isSticky:!0})},o.renderLogLine=function(e){return m.a.createElement(M.a,l()({},e,{onLogLinePress:o.onLogLinePress}))},o.state=i(),o._scrollerRef=m.a.createRef(),o}return f()(t,e),t.getDerivedStateFromProps=function(e,t){return null==t.scrollIndexAfterFilterChange||r(e)?e.showRawText&&(!t.isSticky||t.scrollIndex||t.selectedLogLine)?i():null:{isSticky:!1,scrollIndex:t.scrollIndexAfterFilterChange,scrollIndexAfterFilterChange:null}},
t.prototype.render=function(){var e=this.props,t=e.filter,n=e.timeFilterStart,i=e.timeFilterEnd,r=e.logLevels,a=e.showRawText,s=e.logLines,c=this.state,u=c.isSticky,d=c.scrollIndex,p=c.selectedLogLine,h=!!p,f=h||a;return o()(g.Fragment,{},void 0,a?o()(C.a,{className:P.a.rawTextScroller,filter:t,logLevels:r,lines:s}):null,m.a.createElement(b.a,{className:f?P.a.hiddenPageContent:P.a.pageContent,scrollerClassName:P.a.pageContentScroller,smoothScroll:!1,keyPropName:"index",items:s,size:s.length,
layout:j,cellRenderer:this.renderLogLine,scrollIndex:u?s.length-1:d,ref:this._scrollerRef,onScroll:this.onScroll}),o()(y.a,{className:u?P.a.jumpLinkHidden:P.a.jumpLinkVisible,onPress:this.onJumpToLatestPress},void 0,Object(I.default)("Jump to latest")),h?m.a.createElement(D.a,l()({},p,{filter:t,timeFilterStart:n,timeFilterEnd:i,onJumpToContext:this.onJumpToContext,onTextFilterChange:this.onTextFilterChange,onTimeFilterChange:this.onTimeFilterChange,onClose:this.onModalClose})):null)},t
}(g.Component);t.a=T},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(){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(7),a=n.n(r)},function(e,t){e.exports={
scroller:"VirtualListScroller-scroller-3aWqh"}},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(){return Object(a.createSelector)(function(e){return e.ui.serverLogPage.highlightedLineIndex},function(e,t){return t.index},function(e,t){return{isHighlighted:e===t}})}var r=n(11),a=n(5),o=(n.n(a),n(2236));t.a=Object(r.b)(i)(o.a)},function(e,t,n){"use strict";function i(e){
return[m.a.levelError,m.a.levelWarning,m.a.levelInfo,m.a.levelDebug,m.a.levelVerbose][e]||m.a.levelUnknown}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(20)),v=n(87),g=n(2237),m=n.n(g),y=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(e){i.props.onLogLinePress({index:i.props.index,time:i.props.time,
thread:i.props.thread,level:i.props.level,message:i.props.message})},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.index,n=e.level,r=e.message,o=e.thread,s=e.time,l=e.isHighlighted,c=e.cellX,u=e.cellY,d=e.cellWidth,p=e.cellHeight,h=i(n);return a()(v.a,{cellX:c,cellY:u,cellWidth:d,cellHeight:p},void 0,a()(f.a,{className:(h||"")+" "+(l&&m.a.isHighlighted||""||""),tabIndex:t,onPress:this.onPress},void 0,a()("span",{className:m.a.fieldTime},void 0,s),a()("span",{
className:m.a.fieldThread},void 0,"[",o,"]"),a()("span",{className:m.a.fieldMessage},void 0,r)))},t}(h.Component);t.a=y},function(e,t){e.exports={line:"ServerLogLine-line-2WtKz",field:"ServerLogLine-field-madfJ",fieldTime:"ServerLogLine-fieldTime-17Mvx ServerLogLine-field-madfJ",fieldThread:"ServerLogLine-fieldThread-3Pag7 ServerLogLine-field-madfJ",fieldMessage:"ServerLogLine-fieldMessage-37X1l ServerLogLine-field-madfJ",levelError:"ServerLogLine-levelError-bOQc8 ServerLogLine-line-2WtKz",
levelWarning:"ServerLogLine-levelWarning-1Fzth ServerLogLine-line-2WtKz",levelInfo:"ServerLogLine-levelInfo-K81rV ServerLogLine-line-2WtKz",levelDebug:"ServerLogLine-levelDebug-mz-F9 ServerLogLine-line-2WtKz",levelVerbose:"ServerLogLine-levelVerbose-1mA-C ServerLogLine-line-2WtKz",levelUnknown:"ServerLogLine-levelUnknown-vHwX- ServerLogLine-line-2WtKz",isHighlighted:"ServerLogLine-isHighlighted-2uX6-"}},function(e,t,n){"use strict";function i(e){
return[x.a.containerError,x.a.containerWarning,x.a.containerInfo,x.a.containerDebug,x.a.containerVerbose][e]||x.a.containerUnknown}function r(e){return[x.a.levelError,x.a.levelWarning,x.a.levelInfo][e]}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(385)),g=n(71),m=n(42),y=n(20),b=n(56),I=n(101),S=n(45),M=n(226),D=n(52),C=n(325),O=n(3),P=n(25),j=n(730),T=n(23),w=n(2239),E=n(2240),x=n.n(E),A=o()(P.a,{name:"plex-icon-remove-560"
}),N=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onClosePress=function(e){r.props.onClose()},r.onShowContextPress=function(e){r.props.onJumpToContext(Math.max(r.props.index-10,0))},r.onFilterFromPress=function(){r.props.onTimeFilterChange({timeFilterStart:r.props.time,timeFilterEnd:r.props.timeFilterEnd})},r.onFilterToPress=function(){r.props.onTimeFilterChange({timeFilterStart:r.props.timeFilterStart,timeFilterEnd:r.props.time})},r.onThreadPress=function(){
r.props.onTextFilterChange({filter:Object(w.a)(r.props.filter,r.props.thread)})},r.onTimeMenuPress=function(){r.setState({isTimeMenuOpen:!r.state.isTimeMenuOpen})},r.onTimeMenuClose=function(){r.setState({isTimeMenuOpen:!1})},r.onKeyDown=function(e){e.keyCode===C.e&&(e.preventDefault(),e.stopPropagation(),r.props.onClose())},r._timeMenuButtonID=Object(S.a)(),r.state={isTimeMenuOpen:!1},r}return p()(t,e),t.prototype.componentDidMount=function(){document.addEventListener("keydown",this.onKeyDown)
},t.prototype.componentWillUnmount=function(){document.removeEventListener("keydown",this.onKeyDown)},t.prototype.render=function(){var e=this.props,t=e.level,n=e.time,a=e.thread,s=e.message,l=this.state.isTimeMenuOpen;return o()(g.a,{className:i(t),autoScroll:!0},void 0,o()(y.a,{className:x.a.closeButton,"aria-label":Object(O.default)("Close"),onPress:this.onClosePress},void 0,A),o()("p",{},void 0,o()("span",{className:x.a.label},void 0,Object(O.default)("Time")),o()(y.a,{kind:T.b.PRIMARY,
id:this._timeMenuButtonID,onPress:this.onTimeMenuPress},void 0,n,o()(v.a,{kind:T.b.PRIMARY,direction:l?M.UP:M.DOWN})),o()(b.a,{size:D.LARGE,isOpen:l,target:this._timeMenuButtonID,onMenuClose:this.onTimeMenuClose},void 0,o()(I.a,{onPress:this.onFilterFromPress},void 0,Object(O.default)("Filter from this time")),o()(I.a,{onPress:this.onFilterToPress},void 0,Object(O.default)("Filter to this time")))),o()("p",{},void 0,o()("span",{className:x.a.label},void 0,Object(O.default)("Level")),o()("span",{
className:r(t)},void 0,Object(j.a)(t))),o()("p",{},void 0,o()("span",{className:x.a.label},void 0,Object(O.default)("Thread")),o()(y.a,{kind:T.b.PRIMARY,onPress:this.onThreadPress},void 0,a)),o()("p",{},void 0,o()("span",{className:x.a.label},void 0,Object(O.default)("Message")),s),o()("div",{className:x.a.action},void 0,o()(m.a,{onPress:this.onShowContextPress},void 0,Object(O.default)("Clear Filters and Jump to Context"))))},t}(f.Component);t.a=N},function(e,t,n){"use strict";function i(e,t){
var n=e.replace(new RegExp("\\s?"+Object(r.a)(t)),"").trim();return n.length?t+" "+n:t}var r=n(205);t.a=i},function(e,t){e.exports={container:"ServerLogLineModal-container-36025",containerWithTimeFilter:"ServerLogLineModal-containerWithTimeFilter-HpbS0",closeButton:"ServerLogLineModal-closeButton-33oO- Link-link-2n0yJ",action:"ServerLogLineModal-action-3YbmG",label:"ServerLogLineModal-label-11MSO",containerError:"ServerLogLineModal-containerError-BFsDK ServerLogLineModal-container-36025",
containerWarning:"ServerLogLineModal-containerWarning-1L6UQ ServerLogLineModal-container-36025",containerInfo:"ServerLogLineModal-containerInfo-1xSNj ServerLogLineModal-container-36025",containerDebug:"ServerLogLineModal-containerDebug-1_0AQ ServerLogLineModal-container-36025",containerVerbose:"ServerLogLineModal-containerVerbose-3MAAh ServerLogLineModal-container-36025",containerUnknown:"ServerLogLineModal-containerUnknown-3YTiL ServerLogLineModal-container-36025",
levelError:"ServerLogLineModal-levelError-ATM6v",levelWarning:"ServerLogLineModal-levelWarning-3o-hU",levelInfo:"ServerLogLineModal-levelInfo-GC9mt"}},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(71)),f=n(730),v=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.filter!==this.props.filter||e.logLevels!==this.props.logLevels},t.prototype.render=function(){var e=this.props,t=e.className,n=e.lines;return r()(h.a,{className:t},void 0,r()("pre",{},void 0,n.reduce(function(e,t){return e+=t.time+" ["+t.thread+"] "+Object(f.a)(t.level)+" \u2014 "+t.message+"\n"},"")))},t}(p.Component);t.a=v},function(e,t){e.exports={pageContent:"ServerLog-pageContent-3VPW5 PageContent-pageContent-16mK6",hiddenPageContent:"ServerLog-hiddenPageContent-2lLY7",
pageContentScroller:"ServerLog-pageContentScroller-1gN08",rawTextScroller:"ServerLog-rawTextScroller-bQAXS",jumpLinkVisible:"ServerLog-jumpLinkVisible-3DIQ4 Link-link-2n0yJ",jumpLinkHidden:"ServerLog-jumpLinkHidden-1de4Q ServerLog-jumpLinkVisible-3DIQ4 Link-link-2n0yJ"}},function(e,t){e.exports={dropFileOverlay:"ServerLogPage-dropFileOverlay-30ow0",icon:"ServerLogPage-icon-3tZH8"}},function(e,t,n){"use strict";function i(){
return Object(y.createSelector)(Object(M.a)(D.h),Object(S.a)(),Object(I.a)("/diagnostics/databases"),Object(I.a)("/diagnostics/logs"),b.a(),b.c(),function(e,t,n,i,r,a){var o=t.diagnostics;return{machineIdentifier:t.machineIdentifier,downloadDatabasesUrl:n,downloadLogsUrl:i,cleanBundlesError:t.desktop.cleanBundlesError,optimizeDatabaseError:t.desktop.optimizeDatabaseError,isCleanBundlesInProgress:!!r,isOptimizeDatabaseInProgress:!!a,showDownloadDatabases:!(!n||!o||-1===o.indexOf("databases")),
showDownloadLogs:!(!i||!o||-1===o.indexOf("logs"))}})}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(553)),I=n(2245),S=n(34),M=n(274),D=n(81),C=n(183),O=n(2247),P={dispatchCleanBundles:C.d,dispatchOptimizeDatabase:C.j},j=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.onCleanBundlesPress=function(){i.props.dispatchCleanBundles({serverEntityID:i.props.serverEntityID,hideAlerts:!0})},i.onOptimizeDatabasePress=function(){i.props.dispatchOptimizeDatabase({serverEntityID:i.props.serverEntityID,hideAlerts:!0})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=(e.dispatchCleanBundles,e.dispatchOptimizeDatabase,s()(e,["dispatchCleanBundles","dispatchOptimizeDatabase"]));return g.a.createElement(O.a,a()({
onCleanBundlesPress:this.onCleanBundlesPress,onOptimizeDatabasePress:this.onOptimizeDatabasePress},t))},t}(v.Component);t.a=Object(m.b)(i,P)(j)},function(e,t,n){"use strict";function i(e){return Object(r.createSelector)(Object(o.a)(),function(t){if(!t||!t.activeConnection)return null;var n=t.activeConnection.uri,i=t.accessToken?{"X-Plex-Token":t.accessToken}:{};return a.join([n,e],i)})}t.a=i;var r=n(5),a=(n.n(r),n(19)),o=n(34)},function(e,t,n){"use strict";function i(e,t,n){
return e.reduce(function(e,i){return e[t(i)]=n(i),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(42)),f=n(20),v=n(716),g=n(49),m=n(3),y=n(25),b=n(179),I=n(176),S=n(2248),M=n.n(S),D=r()(y.a,{name:"plex-icon-selected-560"}),C=r()(y.a,{name:"plex-icon-remove-560"}),O=r()(y.a,{name:"plex-icon-selected-560"}),P=r()(y.a,{name:"plex-icon-remove-560"}),j=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.state={isCleanBundlesInProgress:!1,isOptimizeDatabaseInProgress:!1,isCleanBundlesComplete:!1,isOptimizeDatabaseComplete:!1},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){var n=e.isCleanBundlesInProgress!==t.isCleanBundlesInProgress,i=e.isOptimizeDatabaseInProgress!==t.isOptimizeDatabaseInProgress;if(!n&&!i)return null;var r={};return n&&(r.isCleanBundlesInProgress=e.isCleanBundlesInProgress,
r.isCleanBundlesComplete=t.isCleanBundlesInProgress&&!e.isCleanBundlesInProgress),i&&(r.isOptimizeDatabaseInProgress=e.isOptimizeDatabaseInProgress,r.isOptimizeDatabaseComplete=t.isOptimizeDatabaseInProgress&&!e.isOptimizeDatabaseInProgress),r},t.prototype.render=function(){
var e=this.props,t=e.machineIdentifier,n=e.downloadDatabasesUrl,i=e.downloadLogsUrl,a=e.cleanBundlesError,o=e.optimizeDatabaseError,s=e.isCleanBundlesInProgress,l=e.isOptimizeDatabaseInProgress,c=e.showDownloadDatabases,u=e.showDownloadLogs,d=e.onCleanBundlesPress,p=e.onOptimizeDatabasePress,y=this.state,S=y.isCleanBundlesComplete,j=y.isOptimizeDatabaseComplete;return r()("div",{},void 0,r()("div",{className:M.a.troubleshootingSection},void 0,r()("div",{className:M.a.buttonContainer
},void 0,r()(v.a,{className:M.a.button,isSpinning:l,onPress:p},void 0,Object(m.default)("Optimize Database")),j&&!o&&r()("div",{className:M.a.buttonStatusSuccess},void 0,D,r()("div",{className:M.a.textStatus},void 0,Object(m.default)("Optimize database complete"))),j&&o&&r()("div",{className:M.a.buttonStatusError},void 0,C,r()("div",{className:M.a.textStatus},void 0,o))),r()("div",{className:M.a.description
},void 0,Object(m.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."))),r()("div",{className:M.a.troubleshootingSection},void 0,r()("div",{className:M.a.buttonContainer},void 0,r()(v.a,{className:M.a.button,isSpinning:s,onPress:d},void 0,Object(m.default)("Clean Bundles")),S&&!a&&r()("div",{className:M.a.buttonStatusSuccess
},void 0,O,r()("div",{},void 0,Object(m.default)("Bundles cleaned"))),S&&a&&r()("div",{className:M.a.buttonStatusError},void 0,P,r()("div",{},void 0,a))),r()("div",{className:M.a.description},void 0,r()(b.a,{className:M.a.description,
message:Object(m.default)('Poster images and other metadata for items in your library are kept in "bundle" packages. When you remove items from your library, these bundles aren\u2019t immediately removed. Removing them can reduce the size of your install. By default, your server will automatically clean up old bundles once a week as part of {openScheduledTass}Scheduled Tasks{closeScheduledTass}.'),tags:[{open:"openScheduledTass",close:"closeScheduledTass",component:f.a,kind:g.PRIMARY,
to:Object(I.a)(t,"settings","butler")}]}))),(u||c)&&r()("div",{className:M.a.troubleshootingSection},void 0,r()("div",{className:M.a.buttonContainer},void 0,u&&r()(h.a,{className:M.a.button,to:i,target:"_self"},void 0,Object(m.default)("Download Logs")),c&&r()(h.a,{className:M.a.button,to:n,target:"_self"},void 0,Object(m.default)("Download Database"))),r()("div",{className:M.a.description
},void 0,Object(m.default)("The Plex Media Server logs and database can be helpful to developers and forum community members in diagnosing server issues."))),r()("div",{className:M.a.description},void 0,r()(b.a,{className:M.a.description,message:Object(m.default)("You can find additional documentation, guides and FAQs as well as our friendly Community Forums among our {openSupportLink}support resources{closeSupportLink}."),tags:[{open:"openSupportLink",close:"closeSupportLink",component:f.a,
kind:g.PRIMARY,to:"https://support.plex.tv",target:"_blank"}]})))},t}(p.Component);t.a=j},function(e,t){e.exports={troubleshootingSection:"ServerTroubleshootingPane-troubleshootingSection-2sPDn",buttonContainer:"ServerTroubleshootingPane-buttonContainer-32mhY",buttonStatus:"ServerTroubleshootingPane-buttonStatus-_ZS1z",buttonStatusSuccess:"ServerTroubleshootingPane-buttonStatusSuccess-12Jbj ServerTroubleshootingPane-buttonStatus-_ZS1z",
buttonStatusError:"ServerTroubleshootingPane-buttonStatusError-1Kyp1 ServerTroubleshootingPane-buttonStatus-_ZS1z",button:"ServerTroubleshootingPane-button-Av642",description:"ServerTroubleshootingPane-description-2JlKL"}},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(25)),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?s.a.createElement(c.a,n):null}var r,a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(516),c=n(25),u=n(2251),d=n.n(u),p=(r={},r[l.d]={className:d.a.unknown,name:"glyphicon circle-question-mark"},r[l.e]={className:d.a.unknown,name:"glyphicon circle-question-mark"},r[l.h]={className:d.a.error,name:"glyphicon circle-exclamation-mark"},r[l.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(25)),c=n(2253),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.serverEntityID,n=e.viewDataErrorMessage,i=e.isViewDataPending,r=e.isInstallingServerUpdate,o=e.isUnavailable,l=e.isUnauthorized,u=e.isHostedHttps,d=e.hasHttpsConnections,m=e.isSettingAccessible,y=e.isSettingsPending,I=e.friendlyName,w=e.settingsSection,E=e.settingsGroup,x=e.pageComponent,A=e.paneComponent,N=e.contentView,L=c()(e,["serverEntityID","viewDataErrorMessage","isViewDataPending","isInstallingServerUpdate","isUnavailable","isUnauthorized","isHostedHttps","hasHttpsConnections","isSettingAccessible","isSettingsPending","friendlyName","settingsSection","settingsGroup","pageComponent","paneComponent","contentView"])
;return r?s()(D.a,{friendlyName:I}):i?P:o?u&&!d?s()(M.a,{serverEntityID:e.serverEntityID}):s()(b.a,{friendlyName:I}):l?j:n?s()(S.a,{title:n}):m?x?p.a.createElement(x,a()({serverEntityID:t},Object(h.a)(w,E))):p.a.createElement(O.a,Object(h.a)(w,E),s()(C.a,{serverEntityID:t,settingsSection:w,settingsGroup:E}),A?s()(A,{serverEntityID:t}):s()(g.a,{view:N||v.a,viewOptions:L})):y?T:s()(S.a,{title:Object(f.default)("There was an unexpected error loading the settings")})}
var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2255),f=n(3),v=n(2256),g=n(557),m=n(31),y=n(738),b=n(739),I=n(73),S=n(113),M=n(740),D=n(741),C=n(2340),O=n(230),P=s()(I.a,{},void 0,s()(m.a,{})),j=s()(y.a,{}),T=s()(I.a,{},void 0,s()(m.a,{}));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(7),a=n.n(r),o=n(536)},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(77),a=n(13),o=n.n(a),s=n(21),l=n(7),c=n.n(l),u=n(18),d=n(19),p=n(15),h=n(40),f=n(161),v=n(2257),g=n(2268),m=n(2270),y=n(2299),b=n(391),I=n(2300),S=n(2302),M=n(2337),D=n.n(M),C=s.a.Layout.extend({className:"server-settings-container",template:D.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:I.a,group:"remoteAccess",title:"Remote Access",isVisible:function(e){return!e.get("isPersonalCloudServer")}},versions:{constructor:S.a,group:"versions",title:"Optimized Versions",isVisible:function(e){return!e.get("isPersonalCloudServer")}},agents:{constructor:v.a,group:"agents",title:"Agents",isVisible:!0},library:{constructor:b.a,group:"library",title:"Library"},channels:{constructor:g.a,
group:"channels",title:"Plugins",isVisible:!0},network:{constructor:b.a,group:"network",title:"Network"},transcoder:{constructor:b.a,group:"transcoder",title:"Transcoder"},languages:{constructor:y.a,group:"account.language",title:"Languages",isVisible:!0},dlna:{constructor:b.a,group:"dlna",title:"DLNA"},butler:{constructor:b.a,group:"butler",title:"Scheduled Tasks"},extras:{constructor:b.a,group:"extras",title:"Extras"}},initialize:function(e){this.defaultGroup=e.group||"general",
this.account=e.account,this.cloudAccount=e.cloudAccount,this.channelSettings=e.channelSettings,this.tempSettings=this.collection.cloneDeep(),this.tempAccount=this.account.clone(),this.tempChannelSettings=this.channelSettings.cloneDeep(),this.changes={};var t=Object(p.c)("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"});o.a.ajax(r)}this.listenTo(u.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 r.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:b.a,group:e,title:e};this.panes[e]=n,this.addGroup(e,n)}},this)},addGroup:function(e,t){var n=c.a.omit(t,"constructor");n.id=e,this.groups.add(n)},showPane:function(e){if(this.currentPane){if(this.currentPane.isActive)return this.currentPane;this.stopListening(this.currentPane),this.flushChanges()}var t=this.panes[e]
;if(!t||!this.groups.get(e))return void Object(f.a)("serverSettings",{serverID:this.model.id,group:"general"});var n=t.constructor,i=new n({model:this.model,collection:this.tempSettings,account:this.tempAccount,cloudAccount:this.cloudAccount,channelSettings:this.tempChannelSettings,group:t.group,changes:this.changes});return this.currentPane=i,this.pane.show(i),this.listenTo(this.currentPane,"save",this.saveChanges),i},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=d.join([r,"/set"],i);e.push(o.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 s=o.a.when.apply(o.a,e);s.done(c.a.bind(function(){var e=c.a.keys(this.changes);c.a.each(e,function(e){var t=this.tempSettings.get(e);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)),s.fail(c.a.bind(function(){this.currentPane&&this.currentPane.triggerMethod("after:save",!1)},this))}},getPrefixedChanges:function(e){var t={};return c.a.each(this.changes,function(n,i){0===i.lastIndexOf(e,0)&&(t[i.substring(e.length)]=n,delete this.changes[i])},this),t},onRender:function(){this.showPane(this.defaultGroup)},onClose:function(){this.currentPane=null},onSettingValueChange:function(e,t){
this.tempSettings.get(e.id).set("value",t)},onServerConnectedChange:function(e,t){if(t){this.stopListening(e,"change:connected",this.onServerConnectedChange);Object(p.c)("appModel").set("primaryServer",e)}},onToggleAdvancedClick:function(e){e.preventDefault();var t=this.$el.hasClass("show-advanced"),n=Object(p.c)("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")&&h.a.execute("checkForServerUpdates",{server:this.model,download:!1})}});t.a=C},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(26),c=n(550),u=n(2258),d=n(2261),p=n(2267),h=n.n(p),f=a.a.Layout.extend({template:h.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(l.q)(l.f)),this.agentTypes.push(Object(l.q)(l.k)),this.agentTypes.push(Object(l.q)(l.b)),this.agentTypes.push(Object(l.q)(l.a)),this.agentTypes.push(Object(l.q)(l.g)),this.currentType=s.a.first(this.agentTypes),
this.populateAgents()},serializeData:function(){return{currentType:this.currentType,agentTypes:this.agentTypes}},populateAgents:function(){this.agents=new c.a([],{server:this.model,mediaTypeID:this.currentType.id}),this.agents.populate({reset:!0,scope:"page"}).done(s.a.bind(this.onAgentsReset,this))},selectAgent:function(e){this.currentAgent&&this.currentAgent.set("selected",!1),this.currentAgent=e,e.set("selected",!0),this.ui.agentLabel.text(e.get("name")),this.additionalAgents=new c.a([],{
server:this.model,mediaTypeID:this.currentType.id,relatedAgentID:e.id}),this.contributors=new c.a([],{server:this.model,mediaTypeID:this.currentType.id,primaryAgentID:e.id}),this.contributorsList.show(new d.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"})),r.a.when.apply(r.a,e).done(s.a.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new u.a({collection:this.agents})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=s.a.bind(function(e){return e.id===this.currentAgent.id?(e.set("isPrimary",!0),!0):!!this.contributors.get(e.id)},this);this.contributors.reset(this.additionalAgents.filter(e))},
onAgentTypeClick:function(e){e.preventDefault();var t=r()(e.currentTarget),n=t.data("type");this.currentType=Object(l.q)(n),this.populateAgents(),this.ui.typeNavItems.removeClass("active"),t.parent("li").addClass("active")},onAgentClick:function(e){e.preventDefault();var t=r()(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(s.a.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});t.a=f},function(e,t,n){"use strict";var i=n(86),r=n(2259),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(21),r=n(2260),a=n.n(r),o=i.a.ItemView.extend({tagName:"li",template:a.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(702),r=n.n(i),a=n(86),o=n(2262),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(21),r=n(7),a=n.n(r),o=n(18),s=n(313),l=n(2263),c=n(733),u=n(2266),d=n.n(u),p=i.a.ItemView.extend({tagName:"li",className:"card card-sortable",template:d.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 s.a([],{server:this.model.server,url:"/:/plugins/"+this.model.id+"/prefs"});t.fetch().done(a.a.bind(function(){o.a.trigger("show:modal",new c.a({model:this.model,collection:t}))},this))},onInfoClick:function(e){e.preventDefault(),
o.a.trigger("show:modal",new l.a({model:this.model}))}});t.a=p},function(e,t,n){"use strict";var i=n(372),r=n(85),a=n(2264),o=n.n(a),s=r.a.extend({name:"agentInfoModal",className:"agent-info-modal modal fade",template:o.a,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")}},onRender:function(){r.a.prototype.onRender.apply(this,arguments),this.icon.show(new i.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){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(4)).call(e,"Directory Settings",{hash:{},data:t}))+" "}function l(e,t){var r="";return r+=" "+p(i(n(4)).call(e,"{1} Settings",e&&e.title,{hash:{},data:t}))+" "}function c(e,t){var r=""
;return r+=" "+p(i(n(28)).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(33)).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(4)).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(4)).call(t,"Save",{hash:{},data:o}))+"</span> </button> </div> </form> </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"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(4)).call(t,t&&t.name,{hash:{},data:o}))+" </label> "})},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(33)).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(4)).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(4)).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(7),r=n.n(i),a=n(391),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){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(28)).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(4)).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(7),r=n.n(i),a=n(3),o=n(2271),s=n(391),l=n(2294),c=n(2298),u=n.n(c),d=s.a.extend({template:u.a,regions:{signIn:".sign-in-region",update:".update-region"},
serializeData:function(){var e=s.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(){s.a.prototype.onRender.apply(this,arguments),this.signIn.show(new o.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){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(122)),s=n.n(o),l=n(11),c=n(15),u=n(46),d=n(2272),p=u.a.extend({template:function(){return""},mountReact:function(){var e=Object(c.c)("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(12),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),n(2273)),h=n(2274),f=n(2283);t.a=Object(u.b)(i)(r)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(a.a)(),function(e,t){return!!(e&&e.isClaimed&&t&&t.signedIn)})}
var r=n(5),a=(n.n(r),n(1054)),o=n(34);t.a=i},function(e,t,n){"use strict";function i(){return Object(I.createSelector)(Object(M.a)(),function(e){return!!e&&e.isPersonalCloudServer})}function r(){return Object(I.createSelector)(Object(S.a)(),function(e){return e&&e.username||null})}function a(){return Object(I.createSelector)(P,i(),r(),function(e,t,n){return{isSigningOut:e,isAbleToSignOut:!t,username:n}})}
var o=n(6),s=n.n(o),l=n(12),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(5),S=(n.n(I),n(1054)),M=n(34),D=n(228),C=n(392),O=n(2278),P=Object(I.createSelector)(D.a,function(e){return e.isBusy}),j={dispatchSignOutServer:C.e},T=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,j)(T)},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(c.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(l.a)(i.promise(),2e3)}function a(e,t,n,a){var o,l=e.get("user"),c=e.get("cloudServer");return s.a.ajax(c.getXHROptions("/api/claim/token",{headers:(o={},o["X-Plex-Token"]=n,o)})).promise().then(function(e){
return p.a.parseXML(e).token}).then(function(e){return s.a.ajax(t.getXHROptions(u.join("/myplex/claim",{token:e}),{type:"POST"}))}).then(function(){return i(e,t)}).then(function(){var e=Object(h.a)(t),n=void 0;return e&&(n=t.getXHROptions("/media/providers")),t.fetch(n)}).then(function(){return r(e,t,a)}).then(function(){var e=l.get("email"),n=t.get("desktop").get("cloudAccount");t.set({myPlexSigninState:d.b,myPlexUsername:e}),n.set({signedIn:!0,username:e})})}
var o=n(13),s=n.n(o),l=n(2276),c=n(724),u=n(19),d=n(108),p=n(63),h=n(1057);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(13),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(108);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(u.default)("Server signed in as")),a()("div",{className:f.a.messageDetails},void 0,i)),t&&a()(d.a,{className:f.a.button,kind:l.DEFAULT,size:c.MEDIUM,isSpinning:n,onPress:o
},void 0,Object(u.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(49)),c=n(52),u=n(3),d=n(124),p=n(2279),h=n(2282),f=n.n(h);t.a=i},function(e,t,n){"use strict";var i=n(11),r=n(5),a=(n.n(r),n(154)),o=n(1059),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)(I.a,Object(b.a)("isSignedIn"),Object(b.a)("restricted"),function(e,t,n){var i=void 0
;return i=t?j:Object(M.a)()?T:w,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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=(n.n(g),n(11)),y=n(5),b=(n.n(y),n(336)),I=n(228),S=n(392),M=n(462),D=n(2284),C=n(2286),O=n(2291),P=n(2292),j="SIGNED_IN_BUTTON",T="SIGNED_OUT_POLL_BUTTON",w="SIGNED_OUT_LAUNCH_BUTTON",E={dispatchClaimServer:S.a},x=(r={},r[j]=D.a,r[T]=O.a,r[w]=C.a,r),A=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()(P.a,{serverEntityID:t,isBusy:i,isUserRestricted:r,ClaimServerButtonConnectorComponent:x[n]})},t}(g.Component);t.a=Object(m.b)(i,E)(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(5),v=(n.n(f),
n(336)),g=n(392),m=n(735),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(228),v=n(392),g=n(244),m=n(736),y=n(393),b=n(735),I={
dispatchReadStoredPIN:g.d,dispatchCreatePIN:v.c,dispatchSignInThenClaimServer:v.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()(y.a,{component:m.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";function i(){return function(e,t,n){
function i(){var t=c.get("pinID");l===t&&Object(o.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(a.a)(e);s()}}var r=n(3),a=n(522),o=n(1060);t.a=i},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(o.c)("metrics"),g=v.toJSON(),m=Object(s.a)(g.context||{}),y={clientID:p,context:m};if(!Object(u.a)()){var b=r?Object(l.a)(window.location.href,{pinID:r
}):window.location.href;y.forwardUrl=b,h&&(y.skipSignInUrl=Object(c.a)(window.location.href,a.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),a.join(["https://app.plex.tv/auth",a.join(["#!/"],y)])})}var r=n(5),a=(n.n(r),n(19)),o=n(15),s=n(2289),l=n(2290),c=n(737),u=n(462);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(53),s=n.n(o),l=n(7),c=n.n(l);t.a=a},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(6),a=n.n(r),o=n(910),s=n(911),l=n(960);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(20),v=n(228),g=n(3),m=n(179),y=n(392),b=n(244),I=n(23),S=n(735),M=n(393),D={dispatchPreloadPIN:b.c,dispatchBeginPolling:b.b,dispatchStopPolling:b.g,dispatchSignInThenClaimServer:y.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()(M.a,{component:S.a,code:t,pinID:n,isSpinning:i,isDisabled:a||!n,onPress:this.onClaimServerPress}):r()(m.a,{message:Object(g.default)("Server claiming timed out. {openLink}Try again?{closeLink}"),tags:[{open:"openLink",close:"closeLink",component:f.a,
kind:I.b.PRIMARY,onPress:this.onStillTherePress}]})},t}(p.Component);t.a=Object(h.b)(v.a,D)(C)},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(3)),c=n(1059),u=n(2293),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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=n(15),u=n(40),d=n(3),p=n(2295),h=n(2297),f=n.n(h),v=a.a.ItemView.extend({tagName:"span",className:"check-for-updates-container",template:f.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){u.a.execute("checkForServerUpdates",{server:this.model.server,download:e.download,
initialState:e.initialState})},installUpdates:function(){u.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=c.c("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){s.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?u.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(),l.a.trigger("show:modal",new p.a({model:this.model}))}});t.a=v},function(e,t,n){"use strict";function i(e){return e?e.split("\n"):[]}
var r=n(85),a=n(2296),o=n.n(a),s=r.a.extend({name:"releaseNotesModal",template:o.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(4)).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(4)).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(4)).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(4)).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){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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"What's New",{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){var r="";return r+=" "+u(i(n(28)).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(4)).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(387),r=n(3),a=n(391),o=a.a.extend({prefix:"account.",serializeData:function(){var e=this.options.account,t=[],n=i.d.map(function(e){return{value:e,
label:i.b[e]}});return t.push({id:this.prefix+"autoSelectAudio",label:Object(r.default)("Automatically select audio and subtitle tracks"),summary:Object(r.default)("Automatically select audio and subtitle tracks in your preferred language when possible."),default:!1,value:e.get("autoSelectAudio"),type:"bool",group:"account.language",advanced:!1,hidden:!1}),t.push({id:this.prefix+"defaultAudioLanguage",label:Object(r.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(r.default)("Subtitle mode"),default:1,value:parseInt(e.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,enumValues:[{value:0,label:Object(r.default)("Manually selected")},{value:1,label:Object(r.default)("Shown with foreign audio")},{value:2,label:Object(r.default)("Always enabled")}]}),t.push({
id:this.prefix+"defaultSubtitleLanguage",label:Object(r.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=a.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=o},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(40),l=n(516),c=n(161),u=n(391),d=n(2301),p=n.n(d),h=u.a.extend({className:"remote-access-container",template:p.a,ui:{manualPortMappingMode:"#ManualPortMappingMode",manualPortMappingPort:"#ManualPortMappingPort",wanTotalMaxUploadRate:"#WanTotalMaxUploadRate",uploadContainer:".remote-access-upload-container",submitBtn:".submit-btn",message:".form-message"},events:{"change .remote-access-error-container input[id]":"onErrorInputChange",
"click .sign-in-link":"onSignInClick","click .remote-access-enable-btn":"onEnableClick","click .retry-btn":"onRetryClick","click .remote-access-disable-btn":"onDisableClick","change input[name=WanTotalMaxUploadRate]":"onTotalRateChange","keyup input[name=WanTotalMaxUploadRate]":"onTotalRateChange","change select[name=WanPerStreamMaxUploadRate]":"onPerStreamRateChange","submit #remote-access-upload-form":"onUploadFormSubmit"},initialize:function(e){this.cloudAccount=e.cloudAccount,
this.changes=e.changes,this.listenTo(this.cloudAccount,{"change:signInState":this.render,"change:remoteAccessState":this.render})},serializeData:function(){
var e=this.collection.get("PublishServerOnPlexOnlineKey"),t=this.collection.get("ManualPortMappingMode"),n=this.collection.get("ManualPortMappingPort"),i=this.collection.get("WanTotalMaxUploadRate"),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 s.a.execute("connectServer",{cloudAccount:this.cloudAccount,value:!0})},disconnect:function(){return s.a.execute("connectServer",{cloudAccount:this.cloudAccount,value:!1})},reconnect:function(){return s.a.execute("reconnectServer",{cloudAccount:this.cloudAccount})},saveChanges:function(){if(o.a.isEmpty(this.changes))return r.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){u.a.prototype.onInputChange.apply(this,arguments),this.ui.manualPortMappingPort.prop("disabled",!this.ui.manualPortMappingMode.prop("checked"))},onSignInClick:function(e){e.preventDefault(),Object(c.a)("serverSettings",{serverID:this.model.id,group:"general"})},onEnableClick:function(e){e.preventDefault(),this.connect()},onDisableClick:function(e){
e.preventDefault(),this.disconnect()},onRetryClick:function(e){e.preventDefault(),this.cloudAccount.set("remoteAccessState",l.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> '+F(i(n(4)).call(e,"Connecting server...",{hash:{},data:t}))+" </h4> "}function l(e,t){var r;return r=i(n(33)).call(e,(r=e&&e.cloudAccount,null==r||!1===r?r:r.remoteAccessState),"disconnecting",{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+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+F(i(n(4)).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:V.program(12,f,t),fn:V.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">'+F(i(n(4)).call(e,"Not available outside your network",{hash:{},data:t}))+"</h4> ",
a=r.if.call(e,e&&e.isSignedOut,{hash:{},inverse:V.program(10,h,t),fn:V.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">'+F(i(n(4)).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">'+F(i(n(4)).call(e,"Enable to access your server from anywhere.",{
hash:{},data:t}))+'</span> <button class="remote-access-enable-btn btn btn-sm btn-primary">'+F(i(n(4)).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function f(e,t){var a,o="";return o+=" ",a=i(n(33)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"unreachable",{hash:{},inverse:V.program(19,b,t),fn:V.program(13,v,t),data:t}),(a||0===a)&&(o+=a),o+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+F(i(n(4)).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:V.noop,fn:V.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">'+F(i(n(4)).call(e,"Not available outside your network",{hash:{},data:t
}))+'</h4> <span class="unreachable-description status-description help-block">'+F(i(n(4)).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/articles/200289506/" target="_blank">',"</a>",{hash:{},data:t}))+"</span> ",r=i(n(33)).call(e,(r=e&&e.cloudAccount,null==r||!1===r?r:r.mappingError),"jumboframes",{hash:{},inverse:V.program(16,m,t),fn:V.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">'+F(i(n(4)).call(e,"Tip:",{hash:{},data:t}))+"</span> "+F(i(n(4)).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(33)).call(e,(r=e&&e.cloudAccount,
null==r||!1===r?r:r.mappingError),"doublenat",{hash:{},inverse:V.noop,fn:V.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">'+F(i(n(4)).call(e,"Tip:",{hash:{},data:t
}))+"</span> "+F(i(n(4)).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/articles/200931138/" target="_blank">',"</a>",{hash:{},data:t}))+" </span> "}function b(e,t){var r=""
;return r+=' <h4 class="status-header text-success">'+F(i(n(4)).call(e,"Fully accessible outside your network",{hash:{},data:t}))+'</h4> <span class="status-description help-block"> '+F(i(n(4)).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> '+F(i(n(4)).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(245)).call(e,(r=e&&e.cloudAccount,
null==r||!1===r?r:r.remoteAccessState),"disconnecting",{hash:{},inverse:V.noop,fn:V.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:V.noop,fn:V.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">'+F(i(n(4)).call(e,"Private",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',a=r.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:V.program(29,O,t),fn:V.program(27,C,t),data:t}),(a||0===a)&&(o+=a),o+=" </span> ",a=r.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:V.program(33,j,t),fn:V.program(31,P,t),data:t}),(a||0===a)&&(o+=a),
o+=' <span class="mapping-label text-muted">'+F(i(n(4)).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',a=r.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:V.program(29,O,t),fn:V.program(35,T,t),data:t}),(a||0===a)&&(o+=a),o+=" </span> ",a=i(n(33)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"ok",{hash:{},inverse:V.program(33,j,t),fn:V.program(31,P,t),data:t}),(a||0===a)&&(o+=a),o+=' <span class="mapping-internet ',
a=i(n(245)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"ok",{hash:{},inverse:V.noop,fn:V.program(37,w,t),data:t}),(a||0===a)&&(o+=a),o+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+F(i(n(4)).call(e,"Internet",{hash:{},data:t}))+" </span> </div> </div> ",a=r.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:V.noop,fn:V.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">'+F((r=e&&e.cloudAccount,r=null==r||!1===r?r:r.privateAddress,typeof r===H?r.apply(e):r))+'</span> <span class="mapping-separator text-muted">'+F(i(n(4)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+F((r=e&&e.cloudAccount,r=null==r||!1===r?r:r.privatePort,typeof r===H?r.apply(e):r))+"</span> "}function O(e,t){var r="";return r+=' <span class="mapping-empty-value">'+F(i(n(4)).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}
function P(e,t){return' <i class="mapping-icon glyphicon left-arrow text-success"></i> '}function j(e,t){return' <i class="mapping-icon glyphicon remove-2 text-danger"></i> '}function T(e,t){var r,a="";return a+=' <span class="mapping-value">'+F((r=e&&e.cloudAccount,r=null==r||!1===r?r:r.publicAddress,typeof r===H?r.apply(e):r))+'</span> <span class="mapping-separator text-muted">'+F(i(n(4)).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+F((r=e&&e.cloudAccount,
r=null==r||!1===r?r:r.publicPort,typeof r===H?r.apply(e):r))+"</span> "}function w(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:V.noop,fn:V.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:V.noop,fn:V.program(40,x,t),data:t}),(a||0===a)&&(o+=a),
o+='"> <input type="checkbox" id="'+F((a=e&&e.mappingModeSetting,a=null==a||!1===a?a:a.id,typeof a===H?a.apply(e):a))+'" name="'+F((a=e&&e.mappingModeSetting,a=null==a||!1===a?a:a.id,typeof a===H?a.apply(e):a))+'" value="1" ',a=r.if.call(e,e&&e.isUnavailable,{hash:{},inverse:V.noop,fn:V.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:V.noop,fn:V.program(42,A,t),data:t}),(a||0===a)&&(o+=a),
o+="> "+F(i(n(4)).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+F((a=e&&e.mappingPortSetting,a=null==a||!1===a?a:a.id,typeof a===H?a.apply(e):a))+'" name="'+F((a=e&&e.mappingPortSetting,a=null==a||!1===a?a:a.id,typeof a===H?a.apply(e):a))+'" class="form-control" value="'+F((a=e&&e.mappingPortSetting,a=null==a||!1===a?a:a.value,typeof a===H?a.apply(e):a))+'" ',a=r.unless.call(e,e&&e.canEditPort,{hash:{},inverse:V.noop,
fn:V.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:V.noop,fn:V.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(33)).call(e,(a=e&&e.cloudAccount,null==a||!1===a?a:a.remoteAccessState),"unreachable",{hash:{},inverse:V.program(46,L,t),fn:V.program(44,N,t),data:t}),(a||0===a)&&(o+=a),
o+='</span> </button> </div> <p class="help-block">'+F(i(n(4)).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="https://support.plex.tv/articles/200931138/" target="_blank">',"</a>",{hash:{},data:t}))+"</p> </div> "}function x(e,t){return"disabled"}function A(e,t){return"checked"}function N(e,t){return F(i(n(4)).call(e,"Retry",{hash:{},data:t}))}
function L(e,t){return F(i(n(4)).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:V.noop,fn:V.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">'+F(i(n(4)).call(e,"No upload speed set",{hash:{},data:t
}))+'</div> <div class="form-group"> <div class="form-inline"> <div class="form-group"> '+F(i(n(4)).call(e,"Internet upload speed",{hash:{},data:t}))+' <input type="text" id="'+F((a=e&&e.totalRateSettingID,typeof a===H?a.apply(e):a))+'" name="'+F((a=e&&e.totalRateSettingID,typeof a===H?a.apply(e):a))+'" class="remote-access-upload-speed-control form-control" value="',a=r.if.call(e,e&&e.totalRateSettingValue,{hash:{},inverse:V.noop,fn:V.program(51,R,t),data:t}),(a||0===a)&&(o+=a),
o+='" > '+F(i(n(4)).call(e,"Mbps",{hash:{},data:t}))+' </div> <p class="help-block"> '+F(i(n(4)).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> "+F(i(n(4)).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:V.noop,
fn:V.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">'+F(i(n(4)).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 F((n=e&&e.totalRateSettingValue,typeof n===H?n.apply(e):n))}
function z(e,t){var r="";return r+=" "+F(i(n(28)).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="",F=this.escapeExpression,V=this,H="function";return B+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',U=i(n(33)).call(t,(U=t&&t.cloudAccount,null==U||!1===U?U:U.remoteAccessState),"connecting",{hash:{},inverse:V.program(3,l,o),fn:V.program(1,s,o),data:o}),
(U||0===U)&&(B+=U),B+=" </div> ",U=i(n(245)).call(t,(U=t&&t.cloudAccount,null==U||!1===U?U:U.remoteAccessState),"connecting",{hash:{},inverse:V.noop,fn:V.program(23,S,o),data:o}),(U||0===U)&&(B+=U),B+=" ",U=r.if.call(t,t&&t.hasUploadLimitSettings,{hash:{},inverse:V.noop,fn:V.program(48,k,o),data:o}),(U||0===U)&&(B+=U),B+=" "})},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(40),l=n(368),c=n(697),u=n(161),d=n(1061),p=n(2304),h=n(391),f=n(2334),v=n(2336),g=n.n(v),m=h.a.extend({mixins:[l.a],className:"versions-container",template:g.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 c.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 d.a({inline:!0})),!e||!t)return void this.enterState("error")
;var n=r.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()):r.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 p.a({collection:this.generators,itemViewOptions:{transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onExit:function(){this.stopListening(this.generators)}},error:{onEnter:function(){this.listRegion.show(new f.a({model:this.model}))}}},toggleMessage:function(){this.ui.message.toggleClass("hidden",!this.generators.length)},onRender:function(){this.enterNextState()},
onDeleteAllVersionsClick:function(e){e.preventDefault(),s.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){e.exports=function(){return""}},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(702),o=n.n(a),s=n(7),l=n.n(s),c=n(86),u=n(2305),d=n(2307),p=c.a.extend({tagName:"ol",
className:"list media-list playlist-items",itemView:d.a,emptyView:u.a,sorted:!0,onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new o.a(this.el,{onUpdate:l.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(21),r=n(2306),a=n.n(r),o=i.a.ItemView.extend({template:a.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(4)).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:o}))+"</p> <p>"+l(i(n(4)).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(21),r=n(18),a=n(40),o=n(682),s=n(3),l=n(2308),c=n(2309),u=n(556),d=n(2327),p=n(2333),h=n.n(p),f=i.a.ItemView.extend({className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:h.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 c.a({model:this.model,width:o.a.getPosterWidth("movie",60),height:60,rows:1,columns:1}),this.listenTo(this.transcodeJobs,"reset add remove",this.onTranscodeJobsChange)},resetState:function(){var e=["converting",l.a.PENDING,l.a.COMPLETE,l.a.FAILED];this.ui.status.removeClass(e.join(" "))},getState:function(e){
return this.transcodeJobs.findWhere({generatorID:this.model.id})?"converting":e.get("itemsFailedCount")>0?l.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(s.default)("1 failed item"):Object(s.default)("{1} failed items",e)}},".retry-btn":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,autohide:function(e){return this.getState(this.status)===l.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(),r.a.trigger("show:modal",new d.a({model:this.model,listModel:this.model.get("children"),transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onRetryClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),a.a.execute("reprocessVersionGenerator",{generator:this.model})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),
r.a.trigger("show:modal",new u.a({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),a.a.execute("deleteVersionGenerator",{generator:this.model})}});t.a=f},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(371),r=n(19),a=n(520),o=n(372),s=o.a.extend({background:!0,
setup:function(e){this.model=e.model,e.noPlaceholder||(this.placeholderClass=a.a.playlist);var t=Object(i.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},o=this.model.get("composite");o&&(this.url=this.model.server.resolveUrl(r.join(o,n),{appendToken:!0}))}});t.a=s},function(e,t,n){"use strict";var i=n(220),r=n(317),a=n(2311),o=i.a.extend({model:a.a,
url:"/clients/profiles?type="+r.a.LOCAL,parse:function(e){return this.convert(e,"Profile")}});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(160),o=n(91),s=a.a.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(e){var t=r.a.isObject(e)?e:o.a.parseXML(e);return o.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(220),r=n(317),a=n(2313),o=i.a.extend({model:a.a,url:"/library/tags?type="+r.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(7),r=n.n(i),a=n(160),o=n(91),s=a.a.extend({name:"VersionTargetModel",whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(e){var t=r.a.isObject(e)?e:o.a.parseXML(e);return o.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(21),r=n(2315),a=n.n(r),o=i.a.ItemView.extend({className:"modal-body",template:a.a,events:{"click .try-again-link":"onTryAgainClick"},serializeData:function(){return{status:this.options.status}},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","loading")}});t.a=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(4)).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(4)).call(t,"Try again",{hash:{},data:o}))+"</a></h4> </div> </div> "})},function(e,t,n){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(437),s=n(237),l=n(436),c=n(91),u=n(3),d=n(441),p=n(2317),h=n(947),f=n(2319),v=n(2321),g=n.n(v),m=i.a.Layout.extend({template:g.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 o.a({key:t},{server:this.model.server,onlyIfCached:!0});a.a.isEmpty(n)||(this.tempModel.section=n)}}else{var i,r=e.item,c=e.items,u=r.has("childrenKey")?r.get("children"):r,p=r.server;if(r.get("isSection"))i=r;else{var h=Object(l.a)(r);a.a.isEmpty(h)||(i=h)}this.tempModel=new d.a({title:s.a.title(r,{items:c}),targetTagID:this.targets.first().id,Location:{uri:s.a.uri(u,{items:c})}},{server:p,
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 h.a({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new f.a({model:this.tempModel,targets:this.targets,profiles:this.profiles})),this.locationRegion.show(new p.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(u.default)("Custom: {1}",n.profile))}var i=this.playlist.addContent(this.tempModel);i.done(this.whenRendered(function(){if(this.model){var e=a.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){"use strict";var i=n(21),r=n(2318),a=n.n(r),o=i.a.ItemView.extend({className:"convert-location-container form-group",template:a.a,events:{"change select[name=storageLocation]":"onLocationChange"},serializeData:function(){return{disableLocation:!this.model.isNew(),
selectedLocationID:this.model.get("locationID"),locations:this.model.section&&this.model.section.get("locations").toJSON()}},onLocationChange:function(e){this.model.set("locationID",parseInt(e.currentTarget.value,10))}});t.a=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(33)).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(1062)).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(4)).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(33)).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(4)).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(4)).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(21),r=n(7),a=n.n(r),o=n(948),s=n(141),l=n(2320),c=n.n(l),u=i.a.ItemView.extend({className:"convert-target-container form-group",template:c.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=s.a.getAvailableQualities({lowestQualityIndex:o.a}).reverse();var n=this.model.get("mediaSettings").get("maxVideoBitrate");if(n){var i=s.a.getNearestIndexToBitrate(n);this.selectedCustomQuality=s.a.getQualityByIndex(i)}else this.selectedCustomQuality=a.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=s.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(33)).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(442)).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(33)).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(33)).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(442)).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(4)).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(4)).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(4)).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){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(4)).call(e,"Optimize",{hash:{},data:t}))}function c(e,t){return p(i(n(4)).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(4)).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(4)).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(4)).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(21),r=n(2323),a=n.n(r),o=i.a.ItemView.extend({className:"modal-body loading-container",template:a.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(21),r=n(161),a=n(2325),o=n.n(a),s=i.a.ItemView.extend({className:"modal-body",template:o.a,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),Object(r.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(4)).call(t,"This media is being converted.",{hash:{},data:o}))+"</h4> <h4>"+l(i(n(4)).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){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(4)).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(7),r=n.n(i),a=n(1063),o=n(3),s=n(368),l=n(2328),c=n(85),u=n(2332),d=n.n(u),p=c.a.extend({mixins:[s.a],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",template:d.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=r.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(o.default)("{1} item",e):Object(o.default)("{1} items",e)}},".generator-total-size":{model:"status",modelAttribute:"totalSize",formatter:function(e){return e?Object(a.a)(e):Object(o.default)("0 files")}},".generator-failure-container":{model:"status",modelAttribute:"failure",manual:!0,
autohide:function(e){return!!e}},".generator-failure-message":{model:"status",modelAttribute:"failure",formatter:function(e){return e}}},populatePage:function(){this.enterState("loading");var e=this.listModel.populateRange({start:0,end:this.listModel.get("populatedRange").end+this.pageSize});return e.done(this.whenRendered(function(){this.enterState("base")})),e.fail(this.whenRendered(function(){this.enterState("error")})),e},onRender:function(){c.a.prototype.onRender.apply(this,arguments),
this.ui.body.on("scroll",this.handleScroll),this.model.fetch(),this.populatePage(),this.listRegion.show(new l.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){"use strict";var i=n(86),r=n(2329),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(21),r=n(40),a=n(435),o=n(3),s=n(222),l=n(2330),c=n(985),u=n(2331),d=n.n(u),p=i.a.Layout.extend({
tagName:"li",className:"striped-list-item version-generator-metadata-list-item",template:d.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 s.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(a.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 c.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(),r.a.execute("enableVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})},onRetryClick:function(e){e.preventDefault(),r.a.execute("reprocessVersionGenerator",{generator:this.model.generator,
ratingKey:this.model.id})}});t.a=p},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){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){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(4)).call(t,"There was a problem loading these items.",{hash:{},data:o}))+" </span> </div> </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,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(4)).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(4)).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(4)).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(4)).call(t,"Waiting",{hash:{},data:o}))+" </div> </div> </div> </div> </a> "})},function(e,t,n){"use strict";var i=n(21),r=n(175),a=n(2335),o=n.n(a),s=i.a.ItemView.extend({template:o.a,serializeData:function(){return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),minServerVersion:r.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(4)).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(4)).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(4)).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){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(4)).call(t,"Delete All Versions",{
hash:{},data:o}))+"</button> "+l(i(n(4)).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){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">'+u(i(n(4)).call(e,"Show Advanced",{hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+u(i(n(4)).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </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+='<div class="filter-bar"> ',
l=r.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+=' </div> <div class="settings-row row"> <div class="pane-region col-sm-12 col-md-12"></div> </div> '})},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,n=e.onReloadHttpPress,i=e.onReloadHttpAlwaysPress;return a()(l.a,{className:y.a.emptyPage},void 0,a()("div",{className:y.a.content},void 0,a()("img",{className:y.a.pmsLogo,src:f.a}),a()("div",{className:y.a.title
},void 0,Object(v.default)('The server "{serverName}" does not allow secure connections',{serverName:t})),a()("div",{className:y.a.description},void 0,Object(v.default)('Its "Secure connections" setting may be set to disabled, or you may need to adjust some settings on your network.'),b,a()(g.a,{message:Object(v.default)("You can {openLink}learn more about secure connections here{closeLink}."),tags:[{open:"openLink",close:"closeLink",component:u.a,
to:"https://support.plex.tv/hc/en-us/articles/206225077-How-to-Use-Secure-Server-Connections",kind:d.PRIMARY,target:"_blank"}]}),I,Object(v.default)("You can also allow insecure connections now, which will reload the app insecurely.")),a()(c.a,{className:y.a.button,kind:d.PRIMARY,size:p.LARGE,onPress:n},void 0,Object(v.default)("Allow once")),a()(c.a,{className:y.a.button,kind:d.PRIMARY,size:p.LARGE,onPress:i},void 0,Object(v.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(71)),c=n(42),u=n(20),d=n(49),p=n(52),h=n(463),f=n.n(h),v=n(3),g=n(179),m=n(2339),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(o.createSelector)(function(e,t){return t.settingsSection},function(e,t){return t.settingsGroup},function(e,t){var n=l.a.findWhere(u.a,{key:e});return l.a.findWhere(n.groups,{key:t}).title()})}function r(){return Object(o.createSelector)(Object(c.a)(),i(),function(e,t){return{friendlyName:e?e.friendlyName:"",sourceTitle:e?e.sourceTitle:"",
isShared:!(!e||!e.isShared),settingsTitle:t}})}var a=n(11),o=n(5),s=(n.n(o),n(7)),l=n.n(s),c=n(34),u=n(536),d=n(2341);t.a=Object(a.b)(r)(d.a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,n=e.sourceTitle,i=e.settingsTitle,r=e.isShared,o=r&&n?t+" ("+n+")":t;return a()(c.a,{},void 0,o,u,i)}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(229),u=a()(l.b,{});t.a=i},function(e,t){e.exports={header:"SettingsPageHeader-header-1ugtI"}},function(e,t){e.exports={
content:"SettingsPage-content-1vKVE PageContent-pageContent-16mK6"}},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(2345)),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(276),r=n(337),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(1),p=(n.n(d),n(0)),h=(n.n(p),n(64)),f=n(1064),v=n(743),g=n(45),m=n(729),y=n(30),b=n(3),I=n(270),S=n(1065),M=n(699),D=n(2349),C=n(2356),O=n(2361),P=n(1071),j=n(1072),T=n(2392),w=n.n(T),E="SettingsSidebarScrollTop",x=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));A.call(r);var a=m.a.get(E);return r.state={isMeasured:!1,scrollTop:a||0,isMenuOpen:!1},r._serverMenuButtonID=Object(g.a)(),r}
return u()(t,e),t.prototype.componentWillUnmount=function(){this.props.onClose()},t.prototype.render=function(){var e=this.props,t=e.manageableServerEntityIDs,n=e.serverMenuServerEntityID,i=e.selectedKey,a=e.isPlexCloudVisible,o=e.isWebhooksVisible,s=e.isUserSignedIn,l=e.isUserUnrestricted,c=e.isServerMenuServerEntityIDSelected,u=e.showAdvancedSettings,d=e.userTitle,g=e.settingsSection,m=e.settingsGroup,T=this.state,E=T.scrollTop,x=T.isMenuOpen,A=Object(M.c)();return r()(I.a,{page:y.Y,
isDelegated:!0},void 0,r()(h.a,{ignorePosition:!0,ignoreWidth:!0,onMeasure:this.onMeasure},void 0,r()(f.a,{},void 0,this.state.isMeasured?r()(v.a,{smoothScroll:!1,scrollTop:E,onScrollPositionChange:this.onScrollPositionChange},void 0,r()("div",{className:w.a.sidebarContent},void 0,s?r()(P.a,{title:d},void 0,r()(j.a,{selectableKey:"account",selectedKey:i,to:"#!/settings/account",title:Object(b.default)("Account")}),a&&l?r()(j.a,{selectableKey:"plex-cloud",selectedKey:i,
to:"#!/settings/plex-cloud",title:Object(b.default)("Plex Cloud")}):null,l?r()(j.a,{selectableKey:"online-media-sources",selectedKey:i,to:"#!/settings/online-media-sources",title:Object(b.default)("Online Media Sources")}):null,l?r()(j.a,{selectableKey:"devices",selectedKey:i,to:"#!/settings/devices",title:Object(b.default)("Authorized Devices")}):null,o&&l?r()(j.a,{selectableKey:"webhooks",selectedKey:i,to:"#!/settings/webhooks",title:Object(b.default)("Webhooks")}):null):null,s?r()(P.a,{
title:Object(b.default)("Family & Friends"),selectableKey:"users",selectedKey:i},void 0,r()(j.a,{selectableKey:"users--home",selectedKey:i,to:"#!/settings/users/home",title:Object(b.default)("Home Users")}),l?r()(j.a,{selectableKey:"users--friends",selectedKey:i,to:"#!/settings/users/friends",title:Object(b.default)("Sharing")}):null):null,r()(P.a,{title:Object(S.a)(),selectableKey:A,selectedKey:i},void 0,r()(j.a,{selectableKey:Object(M.c)("general"),selectedKey:i,to:"#!/settings/web/general",
title:Object(b.default)("General")}),r()(j.a,{selectableKey:Object(M.c)("quality"),selectedKey:i,to:"#!/settings/web/quality",title:Object(b.default)("Quality")}),u?r()(j.a,{selectableKey:Object(M.c)("debug"),selectedKey:i,to:"#!/settings/web/debug",title:Object(b.default)("Debug")}):null,r()(j.a,{selectableKey:Object(M.c)("player"),selectedKey:i,to:"#!/settings/web/player",title:Object(b.default)("Player")})),n?r()(p.Fragment,{},void 0,r()(C.a,{id:this._serverMenuButtonID,serverEntityID:n,
isMenuOpen:x,isSelected:c,onPress:this.onMenuButtonPress}),r()(D.a,{target:this._serverMenuButtonID,serverEntityIDs:t,selectedServerEntityID:n,isOpen:x,settingsSection:g,settingsGroup:m,onMenuClose:this.onMenuClose}),r()(O.a,{serverEntityID:n,selectedKey:i})):null)):null)))},t}(p.Component),A=function(){var e=this;this.onMeasure=function(){e.setState({isMeasured:!0})},this.onScrollPositionChange=function(t){var n=t.scrollTop;e.setState({scrollTop:n},function(){m.a.set(E,n)})},
this.onMenuButtonPress=function(){e.setState({isMenuOpen:!e.state.isMenuOpen})},this.onMenuClose=function(){e.setState({isMenuOpen:!1})}};t.a=x},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(e){var t=e.target,n=e.serverEntityIDs,i=e.selectedServerEntityID,r=e.settingsSection,o=e.settingsGroup,s=e.isOpen,c=e.onMenuClose;return a()(l.a,{
className:f.a.serverMenu,target:t,isOpen:s,scrollerProps:m,maxHeight:g,onMenuClose:c},void 0,n.map(function(e){return a()(u.a,{serverEntityID:e,isSelected:e===i,settingsSection:r,settingsGroup:o},e)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(56)),c=n(54),u=n(2350),d=n(44),p=n.n(d),h=n(2355),f=n.n(h),v=parseInt(p.a.serverMenuItemHeight,10),g=5*v,m={className:f.a.serverMenuScroller,scrollDirection:c.VERTICAL,autoScroll:!0};t.a=i},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(Object(m.a)(),function(e){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,sourceTitle:e.sourceTitle,activeConnection:e.activeConnection,isInstallingServerUpdate:e.isInstallingServerUpdate,isConnected:e.isConnected,isUnavailable:e.isUnavailable,isSecure:e.isSecure,isRelayed:e.isRelayed,isSettingsPending:e.desktop.isSettingsPending}})}var r=n(12),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(5),m=(n.n(g),n(34)),y=n(183),b=n(2351),I={dispatchPopulateSettings:y.k},S=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(e){(!e.isConnected&&this.props.isConnected||!e.isInstallingServerUpdate&&this.props.isInstallingServerUpdate||!e.isUnavailable&&this.props.isUnavailable)&&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.dispatchPopulateSettings,a()(e,["serverEntityID","dispatchPopulateSettings"]));return f.a.createElement(b.a,t)},t}(h.Component);t.a=Object(v.b)(i,I)(S)},function(e,t,n){"use strict";function i(e){
var t=e.isSelected,n=e.activeConnection,i=e.isConnected,r=e.isUnavailable,o=e.isSecure,s=e.isRelayed,p=e.machineIdentifier,f=e.friendlyName,v=e.sourceTitle,g=e.isInstallingServerUpdate,m=e.isSettingsPending,y=e.settingsSection,b=e.settingsGroup,I=Object(l.a)({activeConnection:n,isConnected:i,isRelayed:s,isUnavailable:r,sourceTitle:v}),S=I.isConnecting,M=I.statusWithSource,D=m||S||r;return a()(c.a,{className:D&&h.a.disabled||"",friendlyNameClassName:h.a.friendlyName,detailsClassName:h.a.details,
to:Object(d.a)(p,y||"settings",b||"general"),isDisabled:S,isSelected:t,identifier:p,title:f,details:M},void 0,a()(u.a,{className:h.a.icon,isInstallingServerUpdate:g,isSettingsPending:m,isUnavailable:r,isRelayed:s,isSecure:o,isConnected:i}))}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(464),u=n(1067),d=n(176),p=n(2354),h=n.n(p);t.a=i},function(e,t){e.exports={secureIcon:"ServerStatusIcon-secureIcon-itZ54",alertIcon:"ServerStatusIcon-alertIcon-eSzhd",
warningIcon:"ServerStatusIcon-warningIcon-ZSAqi"}},function(e,t){e.exports={spinner:"ServerSettingsStatusIcon-spinner-zyA9u"}},function(e,t){e.exports={disabled:"ServerSettingsServerMenuItem-disabled-PIAsv",friendlyName:"ServerSettingsServerMenuItem-friendlyName-2eYIl ServerMenuItem-serverMenuFriendlyName-37Gt7",details:"ServerSettingsServerMenuItem-details-soe_s ServerMenuItem-serverMenuDetails-1-Rfq",icon:"ServerSettingsServerMenuItem-icon-3bTVt"}},function(e,t){e.exports={
serverMenu:"ServerSettingsServerMenu-serverMenu-3CI7i MenuContainer-menu-2OAQT",serverMenuScroller:"ServerSettingsServerMenu-serverMenuScroller-2WzFg Menu-menuScroller-1TF6o Scroller-vertical-VScFL"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,isInstallingServerUpdate:e.isInstallingServerUpdate,isConnected:e.isConnected,isUnavailable:e.isUnavailable,
isSettingsPending:e.desktop.isSettingsPending,isSecure:e.isSecure,isRelayed:e.isRelayed,sourceTitle:e.sourceTitle}})}var r=n(11),a=n(5),o=(n.n(a),n(34)),s=n(2357);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.id,n=e.friendlyName,i=e.sourceTitle,r=e.isConnected,o=e.isInstallingServerUpdate,s=e.isSelected,d=e.isUnavailable,h=e.isSecure,f=e.isSettingsPending,v=e.isRelayed,g=e.isMenuOpen,m=e.onPress,y=void 0;return v&&i?y=Object(l.default)("Indirect ({serverName})",{
serverName:i}):v?y=Object(l.default)("Indirect"):i&&(y=i),a()(c.a,{className:p.a.button,secondaryTitleClassName:p.a.secondaryTitle,id:t,isMenuOpen:g,primaryTitle:n,secondaryTitle:y,isSelected:s,onPress:m},void 0,a()(u.a,{className:p.a.icon,isInstallingServerUpdate:o,isSettingsPending:f,isUnavailable:d,isRelayed:v,isSecure:h,isConnected:r}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3)),c=n(745),u=n(1067),d=n(2360),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.secondaryTitleClassName,i=e.id,r=e.isLoading,o=e.isMenuOpen,s=e.isDisabled,c=e.isSelected,h=e.primaryTitle,v=e.secondaryTitle,g=e.children,m=e.spinnerComponent,y=e.onPress;return a()(u.a,{id:i,className:(t||"")+" "+(s&&f.a.isDisabled||""||""),"aria-haspopup":!s,"data-qa-id":"serverMenuButton",isSelected:c,isDisabled:s,onPress:y},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,h),!s&&a()(l.a,{direction:o?d.UP:d.DOWN,isSelected:c})),v&&a()("span",{className:n},void 0,v)),r?a()(m,{size:p.SMALL,className:f.a.sidebarMenuSpinner}):g))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(385)),c=n(326),u=n(20),d=n(226),p=n(52),h=n(2359),f=n.n(h);i.defaultProps={className:f.a.sidebarMenuButton,secondaryTitleClassName:f.a.sidebarMenuSecondaryTitle,isMenuOpen:!1,
isSelected:!0,isDisabled:!1,isLoading:!1,spinnerComponent:c.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={button:"ServerSettingsServerMenuButton-button-24D7l SidebarMenuButton-sidebarMenuButton-khx_P",secondaryTitle:"ServerSettingsServerMenuButton-secondaryTitle-2Flnd SidebarMenuButton-sidebarMenuSecondaryTitle-2jpJL",
icon:"ServerSettingsServerMenuButton-icon-2pk73"}},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(m.a)(),Object(y.a)(),function(e,t){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName,isShared:e.isShared,isInstallingServerUpdate:e.isInstallingServerUpdate,isConnected:e.isConnected,isUnavailable:e.isUnavailable,isSettingsPending:e.desktop.isSettingsPending,settingsSections:t}})}
var r=n(12),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(5),m=(n.n(g),n(34)),y=n(1002),b=n(183),I=n(2362),S={dispatchPopulateSettings:b.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.isConnected,e.dispatchPopulateSettings,a()(e,["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(e){
var t=e.serverEntityID,n=e.machineIdentifier,i=e.selectedKey,r=e.isShared,o=e.isInstallingServerUpdate,s=e.isUnavailable,h=e.isSettingsPending,f=e.settingsSections;return o||s?a()(c.a,{serverEntityID:t}):h?null:f.map(function(e,t){if(r&&1===e.groups.length){var o=e.groups[0];return a()(d.a,{selectableKey:Object(l.a)(n,e.key,o.key),selectedKey:i,title:o.title,to:Object(p.a)(n,e.key,o.key)},t)}return a()(u.a,{title:e.title},t,e.groups.map(function(r,o){return a()(d.a,{
selectableKey:Object(l.a)(n,e.key,r.key),selectedKey:i,title:r.title,to:Object(p.a)(n,e.key,r.key)},""+t+o,r.statusIndicator)}))})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(699)),c=n(1068),u=n(1071),d=n(1072),p=n(176);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.machineIdentifier,i=e.allowChannelAccess,r=e.isFullOwnedServer,o=e.isInstallingServerUpdate,s=e.isConnected,y=e.isClaimed,b=e.isLibrariesPopulated,M=e.librariesError,D=e.contentProviders,C=e.isProvidersPopulated,O=e.providersError,P=e.showRecordingSchedule;if(!s||o)return l.a.createElement(m.a,e);var j=!C&&!O,T=!b&&!M;if(j||T)return S;var w=Object(h.a)(n,"settings","general"),E=Object(h.a)(n,"status","now-playing");return a()("div",{},void 0,r&&a()(c.a,{
title:Object(u.default)("Manage")},void 0,a()(p.a,{to:E,icon:"plex-icon-status-560",title:Object(u.default)("Status"),"data-qa-id":"sidebarStatus"},"status"),a()(p.a,{to:w,icon:"plex-icon-settings-560",title:Object(u.default)("Settings"),"data-qa-id":"sidebarSettings"},"settings",!y&&a()(d.a,{name:"plex-icon-alert-560",className:I.a.unclaimedIcon,"aria-label":Object(u.default)("Unclaimed")}))),!!D.length&&a()(c.a,{title:Object(u.default)("Live TV & DVR")},void 0,P&&a()(p.a,{
to:"#!/server/"+encodeURIComponent(n)+"/schedule",icon:"plex-icon-calendar-560",title:Object(u.default)("Recordings"),highlightActiveRoute:!0,"data-qa-id":"sidebarRecordingSchedule"},"schedule"),D.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(747),u=n(3),d=n(25),p=n(194),h=n(176),f=n(2369),v=n(2371),g=n(2384),m=n(2386),y=n(1070),b=n(2389),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.titleClassName,o=e.iconSrc,l=e.icon,u=e.iconComponent,d=e.iconNode,m=e.title,b=e.showSpinner,I=c()(e,["className","children","iconClassName","titleClassName","iconSrc","icon","iconComponent","iconNode","title","showSpinner"]),S=void 0;return o?S=s()(v.a,{className:y.a.iconImg,src:o}):l?S=s()(u,{name:l}):d&&(S=d),p.a.createElement(f.a,a()({className:t},I),s()("div",{className:y.a.container},void 0,s()("div",{className:i},void 0,b?s()(h.a,{
className:y.a.spinner}):S),m?s()("div",{className:r},void 0,m):null,Object(g.a)(n).length?s()("div",{className:y.a.children},void 0,n):null))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(326),f=n(20),v=n(208),g=n(2367),m=n(2368),y=n.n(m);i.defaultProps={className:y.a.sidebarLink,iconClassName:y.a.icon,titleClassName:y.a.title},t.a=i},function(e,t,n){"use strict";function i(e){var t=[];return a.a.Children.forEach(e,function(e){
a.a.isValidElement(e)&&t.push(e)}),t}t.a=i;var r=n(0),a=n.n(r)},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 o.a.createElement(h.a,e)}var r=n(1),a=(n.n(r),
n(0)),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(7)),u=n.n(c),d=n(211),p=n(51),h=n(2370),f=function(){return Object(l.createSelector)(Object(p.a)(),Object(d.a)(),function(e,t){var n=u.a.pick(e,"identifier","title");return n.isRefreshing=!!t,n})};t.a=Object(s.b)(f)(i)},function(e,t,n){"use strict";function i(e){return c.c.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(41)),u=n(194);t.a=r},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(277),b=n(3),I=n(194),S=n(559),M=n(2372),D=n(2376),C=n(2380),O=n(2383),P=n.n(O),j=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:P.a.librariesListHeader,role:"header"},void 0,o()("div",{className:P.a.librariesTitle},void 0,Object(b.default)("Libraries")),a&&m.a.createElement(M.a,r()({isHovered:s,onAddLibraryPress:p},h))),i&&o()(C.a,{serverEntityID:n,isSelected:c}),v&&o()(I.a,{icon:"plex-icon-add-560",title:Object(b.default)("Add Library"),onPress:p},"addLibrary"),f?o()(y.a,{message:Object(b.default)("There was an unexpected error loading libraries.")}):u.map(function(e){return o()(D.a,{serverEntityID:n,
libraryEntityID:e},e)}))},t}(g.Component);t.a=Object(S.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(45)),f=n(27),v=n(90),g=n(30),m=n(3),y=n(157),b=n(560),I=n(2374),S=n(2375),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.setState({isOptimizeModalOpen:!1}),r.props.onOptimizeDatabaseConfirm()},r.onOptimizeCancel=function(){r.setState({isOptimizeModalOpen:!1})},r.onCleanBundlesPress=function(e){r.setState({
isCleanBundlesModalOpen:!0})},r.onCleanBundlesConfirm=function(){r.setState({isCleanBundlesModalOpen:!1}),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(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.isHovered,i=e.isLibraryRefreshing,a=e.isOptimizeDatabaseInProgress,o=e.isCleanBundlesInProgress,s=v.a.hasTouchScreen||n||this.state.isActionsMenuOpen;return r()("div",{className:(t||"")+" "+(s&&M.a.isVisible||""||""),
role:"menu"},void 0,r()(b.a,{className:M.a.action,"data-qa-id":"sidebarLibrariesAddButton",icon:"plex-icon-add-560",title:Object(m.default)("Add Library"),onPress:this.props.onAddLibraryPress}),r()(b.a,{id:this._actionsMenuButtonID,className:M.a.action,"aria-haspopup":"true","data-qa-id":"sidebarLibrariesMoreButton",icon:"plex-icon-more-560",title:Object(m.default)("More Actions"),onPress:this.onActionsPress}),r()(I.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:g.p,
title:Object(m.default)("Optimize Database"),message:Object(m.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(m.default)("Optimize"),onConfirm:this.onOptimizeConfirm,onCancel:this.onOptimizeCancel}),r()(y.a,{isOpen:this.state.isCleanBundlesModalOpen,isConfirmButtonSpinning:o,isCancelButtonDisabled:o,metricsPage:g.e,
title:Object(m.default)("Clean Bundles"),message:Object(m.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(m.default)("Clean"),onConfirm:this.onCleanBundlesConfirm,onCancel:this.onCleanBundlesCancel}),r()(y.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:g.j,title:Object(m.default)("Empty Trash"),
message:Object(m.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(m.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}))},t}(p.Component);D.defaultProps={className:M.a.actions},t.a=D},function(e,t){e.exports={
sidebarIconButton:"SidebarIconButton-sidebarIconButton-3zxa5"}},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(d.a,f,a()(p.a,{onPress:n
},void 0,Object(h.default)("Share...")),t?a()(p.a,{onPress:r},void 0,Object(h.default)("Cancel Scan")):a()(p.a,{onPress:i},void 0,Object(h.default)("Scan Library Files")),a()(p.a,{onPress:o},void 0,Object(h.default)("Optimize Database")),a()(p.a,{onPress:l},void 0,Object(h.default)("Clean Bundles")),a()(p.a,{onPress:c},void 0,Object(h.default)("Empty Trash")))}var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(101),h=n(3);t.a=i},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)(function(e){return e.ui.quickSearch},function(e){return e.ui.background.isBackgroundPending},Object(b.a)(),function(e,t,n){var i=e.providerIdentifier,r=e.sectionID;t||(w=i,E=r);var a=t?w:i,o=t?E:r;return a===M.d&&o===n.key})}
function r(){return Object(m.createSelector)(Object(S.a)(),Object(b.a)(),Object(j.a)(),Object(I.b)(),i(),function(e,t,n,i,r){var a=t.key,o=t.title,s=void 0===o?"":o,l=t.refreshing;return{libraryKey:a,route:n,title:s.trim(),type:Object(D.a)(t),refreshing:l,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(y.g)({serverEntityID:t.serverEntityID}))},onShareLibraryPress:function(){e(P.g(n))},onUpdateLibraryPress:function(){e(P.i(n))},onCancelUpdateLibraryPress:function(){e(P.b(n))},onEditLibraryPress:function(){e(P.d(n))},onAnalyzeLibraryPress:function(){e(P.a(n))},onRefreshLibraryPress:function(){e(P.h(n))},onEmptyTrashLibraryPress:function(){e(P.e(n))},onDeleteLibraryPress:function(){e(P.c(n))},onDeleteLibraryComplete:function(){e(Object(O.i)({route:"dashboard"}))}}}
var o=n(12),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),n(100)),b=n(725),I=n(553),S=n(34),M=n(41),D=n(722),C=n(55),O=n(68),P=n(726),j=n(1050),T=n(2377),w=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(T.a,t)},t}(v.Component);t.a=Object(C.a)(r,a)(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),n(748)),f=n(45),v=n(49),g=n(30),m=n(3),y=n(130),b=n(157),I=n(749),S=n(560),M=n(2378),D=n(2379),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(f.a)(),r}return u()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isLibraryDeleteInProgress&&!e.isLibraryDeleteInProgress&&(this.props.onDeleteLibraryComplete(),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,f=e.onEditLibraryPress;return r()(h.a,{className:C.a.libraryListItem},void 0,r()(I.a,{"data-qa-id":"sidebarLibraryItem--"+t,to:n,icon:y.f.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(m.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:f,onAnalyzePress:this.onAnalyzePress,onRefreshAllPress:this.onRefreshAllPress,
onEmptyTrashPress:this.onEmptyTrashPress,onDeletePress:this.onDeletePress}),r()(b.a,{isOpen:this.state.isAnalyzeModalOpen,metricsPage:g.d,title:Object(m.default)("Analyze Library"),message:Object(m.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(m.default)("Analyze"),onConfirm:this.onAnalyzeConfirm,onCancel:this.onAnalyzeCancel}),r()(b.a,{
isOpen:this.state.isRefreshAllModalOpen,metricsPage:g.l,title:Object(m.default)("Refresh All Metadata"),message:Object(m.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(m.default)("Refresh"),onConfirm:this.onRefreshAllConfirm,onCancel:this.onRefreshAllCancel}),r()(b.a,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:g.k,title:Object(m.default)("Empty Trash"),
message:Object(m.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(m.default)("Empty"),onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),r()(b.a,{isOpen:this.state.isDeleteModalOpen,isConfirmButtonSpinning:s,isCancelButtonDisabled:s,metricsPage:g.h,kind:v.DANGER,
title:Object(m.default)("Delete Library"),message:Object(m.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(m.default)('Yes, delete the library "{libraryName}"',{libraryName:a}),confirmLabel:Object(m.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(d.a,m,a()(p.a,{onPress:n},void 0,Object(h.default)("Share...")),t?a()(p.a,{onPress:r
},void 0,Object(h.default)("Cancel Scan")):a()(p.a,{onPress:i},void 0,Object(h.default)("Scan Library Files")),a()(p.a,{onPress:o},void 0,Object(h.default)("Edit")),a()(p.a,{onPress:l},void 0,Object(h.default)("Analyze")),a()(p.a,{onPress:c},void 0,Object(h.default)("Refresh All Metadata")),a()(p.a,{onPress:v},void 0,Object(h.default)("Empty Trash")),a()(p.a,{kind:f.b.DANGER,onPress:g},void 0,Object(h.default)("Delete")))}var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(56),p=n(101),h=n(3),f=n(23);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,n){"use strict";function i(){return Object(m.createSelector)(Object(y.a)(),I.a,function(e,t){var n=e.entityID+"!/playlists",i=t[n],r={isLibraryProvider:!0
},a=Object(S.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(b.c(n))},onImportPress:function(){e(b.i(n))}}}var a=n(12),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(5),y=(n.n(m),n(34)),b=n(183),I=n(727),S=n(750),M=n(2381),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(56)),f=n(101),v=n(748),g=n(45),m=n(3),y=n(749),b=n(560),I=n(2382),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.onActionsPress=function(){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1},r._actionsMenuButtonID=Object(g.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:S.a.playlistsListItem},void 0,r()(y.a,{to:t,icon:"plex-icon-playlists-560",title:Object(m.default)("Playlists"),isSelected:i},"playlists"),n&&r()(b.a,{id:this._actionsMenuButtonID,className:(S.a.action||"")+" "+(this.state.isActionsMenuOpen&&S.a.isVisible||""||""),"data-qa-id":"sidebarPlaylistsMoreButton",icon:"plex-icon-more-560",title:Object(m.default)("More Actions"),
onPress:this.onActionsPress}),r()(h.a,{target:this._actionsMenuButtonID,isOpen:this.state.isActionsMenuOpen,onMenuClose:this.onActionsMenuClose},void 0,r()(f.a,{onPress:a},void 0,Object(m.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){e.exports={librariesListHeader:"SidebarServerLibraries-librariesListHeader-33wsS SidebarList-sidebarListHeader-1t0yz",librariesTitle:"SidebarServerLibraries-librariesTitle-3iqmv"}},function(e,t,n){"use strict";var i=n(11),r=n(5),a=(n.n(r),
n(336)),o=n(338),s=n(562),l=Object(r.createStructuredSelector)({isSignedIn:Object(a.a)("isSignedIn"),cloudProviderEntityIDs:Object(o.a)("providers")});t.a=Object(i.b)(function(e){return l(e)})(s.a)},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(Object(p.a)(),function(e){return{title:e.title,identifier:e.identifier,iconSrc:Object(f.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.a?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(5),d=(n.n(u),n(19)),p=n(51),h=n(41),f=n(439),v=n(194);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(5),o=(n.n(a),n(90)),s=n(57),l=n(394),c=n(2387);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(277)),f=n(1069),v=n.n(f),g=n(27),m=n(30),y=n(3),b=n(157),I=n(194),S=n(23),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(g.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.isInstallingServerUpdate,p=e.isPersonalCloudServer,f=e.hasHttpsConnections,g=e.hasFallbackConnections,M=e.isPersonalCloudServerRestarting,D=e.onTryAgainPress,C=e.onReloadHttpPress,O=e.onReloadHttpAlwaysPress,P=e.onRestartPress,j=e.onAllowFallbackPress,T=c&&n,w=f&&!g,E=void 0,x=void 0,A=void 0,N=void 0,L=void 0,k=void 0,_=void 0
;d?(E=!1,x=!1,A=!1,N=!1,L=!1,k=!1,_=Object(y.default)('Once the server "{serverName}" has finished installing the update, Plex will automatically try to reconnect to this server.',{serverName:t})):p?(E=!1,x=!1,A=!1,N=!1,L=s,k=!1,_=Object(y.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.")):(E=!o&&T,x=o&&T&&w,A=E||x,N=!A,L=!1,k=u&&!a,
_=A?Object(y.default)('Unable to connect to "{serverName}" securely.',{serverName:t}):Object(y.default)('The server "{serverName}" is unreachable. Make sure it\'s running, double check your network, and try again.',{serverName:t}));var R=l||i,z=R?Object(y.default)("Connecting"):Object(y.default)("Try again");return r()(h.a,{message:_},void 0,r()(I.a,{icon:"plex-icon-reload-560",title:z,showSpinner:R,isDisabled:R,onPress:D}),E&&r()("p",{className:v.a.sidebarMessage
},void 0,Object(y.default)("Do you want to allow insecure connections?")),E&&r()(I.a,{icon:"plex-icon-unlock-560",title:Object(y.default)("Allow once"),onPress:C}),E&&r()(I.a,{icon:"plex-icon-unlock-560",title:Object(y.default)("Allow always"),onPress:O}),L&&r()(I.a,{icon:"plex-icon-personal-cloud-560",title:Object(y.default)("Restart Cloud Server"),showSpinner:M,isDisabled:M,onPress:P}),x&&r()(I.a,{icon:"plex-icon-unlock-560",title:Object(y.default)("Allow insecure connection"),onPress:j
}),A&&r()(I.a,{to:"https://support.plex.tv/hc/en-us/articles/206225077",target:"_blank",icon:"plex-icon-help-560",title:Object(y.default)("Learn more")}),N&&r()(I.a,{to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560",title:Object(y.default)("Where is my server?")}),k&&r()(I.a,{icon:"plex-icon-remove-560",title:Object(y.default)("Remove server"),onPress:this.onRemoveServerPress}),k&&r()(b.a,{isOpen:this.state.isRemoveModalOpen,metricsPage:m.i,kind:S.b.DANGER,
title:Object(y.default)("Remove {serverName}",{serverName:t}),message:Object(y.default)("If this server is restarted, it will automatically be added to your account again.",t),confirmLabel:Object(y.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){e.exports={
header:"SettingsSidebarList-header-1RCTo SidebarList-sidebarListHeader-1t0yz"}},function(e,t){e.exports={icon:"SettingsSidebarListLink-icon-eICe1 SidebarLink-icon-34JWq",selectedIcon:"SettingsSidebarListLink-selectedIcon-caIG1 SettingsSidebarListLink-icon-eICe1 SidebarLink-icon-34JWq"}},function(e,t){e.exports={sidebarContent:"SettingsSidebar-sidebarContent-3yMjj"}},function(e,t,n){"use strict";var i=n(267),r=n(2394),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"}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(2395),a=n(268),o=n(3),s=n(2397),l=n(2410),c=n(2415),u=n(752),d=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;i.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();i.a.trigger("show:view",new c.a({model:n}))})},channels:function(e){this.populateView({serverID:e}).done(function(e){var t=new r.a({subset:"all"},{server:e.server}),n=t.get("channels");n.comparator=n.sortByTitle;var a=t.fetch({scope:"page"});a.done(function(){
i.a.trigger("show:view",new l.a({collection:n}))}),a.fail(function(){i.a.trigger("show:view",new u.a({title:Object(o.default)("Your plugins are unavailable.")}))})})}});t.a=d},function(e,t,n){"use strict";var i=n(19),r=n(17),a=n(16),o=n(310),s=n(2396),l=r.a.extend({mixins:[o.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(18),r=n(24),a=n(969),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(21),r=n(18),a=n(15),o=n(2398),s=n(333),l=n(84),c=n(2399),u=n(2401),d=n(2404),p=n(2405),h=n(2409),f=n.n(h),v=i.a.Layout.extend({className:"channel-container legacy-page",template:f.a,regions:{breadcrumbBar:".legacy-breadcrumb-bar",scroller:".legacy-content-scroller"},initialize:function(e){var t=Object(a.c)("appStore").dispatch;t(Object(s.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)&&r.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 c=this.model.channel||this.model,u=c.id?c.id:c.get("identifier");this.searchKey&&t(l.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),channelPlaceholder:this.searchPlaceholder,channelID:u,channelSearchKey:this.searchKey})),this.listType=o.a.getListType(this.model),r.a.trigger("show:background",{model:this.model,dim:!0})},getListConstructor:function(){switch(this.listType){case o.a.types.tileList:return p.a;case o.a.types.detailsList:return u.a;default:return d.a}},onRender:function(){var e=this.getListConstructor();this.scroller.show(new e({listModel:this.listModel,
collection:this.collection,paginated:!1}));var t=new c.a({model:this.model,currentListType:this.listType});this.listenTo(t,"change:listType",this.onListTypeChange),this.breadcrumbBar.show(t)},onClose:function(){(0,Object(a.c)("appStore").dispatch)(l.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){"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(7),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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=n(313),u=n(733),d=n(2400),p=n.n(d),h=a.a.Layout.extend({className:"breadcrumb-bar",template:p.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 c.a([],{server:this.model.server,url:this.prefsKey});t.fetch().done(s.a.bind(function(){l.a.trigger("show:modal",new u.a({model:this.model.channel||this.model,collection:t}))
},this))},onListClick:function(e){e.preventDefault();var t=r()(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(4)).call(t,"Posters",{hash:{},data:o}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(245)).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(4)).call(t,"Details",{hash:{},data:o}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(245)).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(4)).call(t,"List",{hash:{},data:o
}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=i(n(245)).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){"use strict";var i=n(86),r=n(2402),a=i.a.extend({tagName:"ul",className:"list media-list media-details-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(222),o=n(531),s=n(2403),l=n.n(s),c=o.a.extend({
className:"striped-list-item media-list-item media-details-list-item",template:l.a,ui:r.a.extend({poster:".media-poster"},o.a.prototype.ui),initialize:function(e){o.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.type;"episode"===e&&(e="show"),this.image=new a.a({model:this.model,type:e,getUrl:this.getPosterUrl,height:150})},bindings:r.a.extend({},o.a.prototype.bindings,{".media-count-badge":{modelAttribute:"Media",
formatter:function(e){return e&&e.length||0},autohide:function(e){return!/^(clip|userPlaylistItem)$/.test(this.model.get("type"))&&e>1}},".unwatched-count-badge":{modelAttribute:"unviewedLeafCount",autohide:function(e){return!(this.shared&&!this.multiuser)&&(!/^(artist|album)$/.test(this.model.get("type"))&&!!e)}},".media-tagline":{modelAttribute:"tagline",autohide:!0},".media-summary":{modelAttribute:"summary",autohide:!0}})});t.a=c},function(e,t,n){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(86),r=n(531),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(86),r=n(2406),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(7),r=n.n(i),a=n(2407),o=n(222),s=n(531),l=n(2408),c=n.n(l),u=s.a.extend({className:"poster-item media-tile-list-item",template:c.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){s.a.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=Object(a.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 o.a({model:this.model,type:t,getUrl:this.getPosterUrl,width:n})},
bindings:r.a.extend({},s.a.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=s.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=s.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){"use strict";function i(e){return a.a.isEmpty(e)?void 0:e.get("type")}t.a=i;var r=n(7),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"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){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";var i=n(13),r=n.n(i),a=n(21),o=n(15),s=n(333),l=n(2411),c=n(2414),u=n.n(c),d=a.a.Layout.extend({className:"container",template:u.a,ui:{navLinks:".nav a"},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"},initialize:function(){(0,Object(o.c)("appStore").dispatch)(Object(s.a)({allowLightPreset:!1})),this.videoCollection=this.collection.filterByType("video"),this.musicCollection=this.collection.filterByType("music"),this.photoCollection=this.collection.filterByType("photos")},serializeData:function(){
return{serverID:this.collection.server.id,allCount:this.collection.length,hasInstalledChannels:this.collection.length>0,videoCount:this.videoCollection.length,musicCount:this.musicCollection.length,photoCount:this.photoCollection.length}},onRender:function(){this.list.show(new l.a({collection:this.collection}))},onNavClick:function(e){this.ui.navLinks.removeClass("selected"),r()(e.currentTarget).addClass("selected")},onAllClick:function(e){e.preventDefault(),this.list.show(new l.a({
collection:this.collection}))},onVideoClick:function(e){e.preventDefault(),this.list.show(new l.a({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),this.list.show(new l.a({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),this.list.show(new l.a({collection:this.photoCollection}))}});t.a=d},function(e,t,n){"use strict";var i=n(86),r=n(2412),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(21),r=n(7),a=n.n(r),o=n(18),s=n(40),l=n(313),c=n(3),u=n(222),d=n(733),p=n(2413),h=n.n(p),f=i.a.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:h.a,ui:{poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){this.image=new u.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(c.default)("Video"):"music"===e?Object(c.default)("Music"):"photos"===e?Object(c.default)("Photo"):Object(c.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 l.a([],{server:this.model.server,url:this.model.id+"/:/prefs"}),n=t.fetch();n.done(a.a.bind(function(){o.a.trigger("show:modal",new d.a({model:this.model,collection:t}))},this)),n.always(a.a.bind(function(){this.$el.removeClass("active")},this))}},onUninstallClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active")
;var t=s.a.execute("uninstallChannel",{channel:this.model});t.done(a.a.bind(function(){this.model.trigger("destroy",this.model,this.model.collection)},this)),t.always(a.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(530)).call(t,t&&t.serverID,{hash:{},data:o}))+"/channel/"+p(i(n(530)).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){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+=' <p style="padding:20px">'+v(i(n(4)).call(e,"No plugins installed.",{hash:{},data:t}))+"</p> "}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(4)).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(4)).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(4)).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(4)).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(4)).call(t,"Plugins",{hash:{},data:o}))+"</h2> ",p=r.unless.call(t,t&&t.hasInstalledChannels,{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(21),r=n(7),a=n.n(r),o=n(707),s=n(2416),l=n(2418),c=n(2429),u=n(2431),d=n.n(u),p={movie:l.a,episode:l.a,clip:l.a,userPlaylistItem:l.a},h=i.a.Layout.extend({className:"details-container legacy-page",template:d.a,
regions:{actionBar:".legacy-action-bar",scroller:".legacy-content-scroller"},initialize:function(){var e=this.model.get("type");this.mediaActions=new o.a({},{item:this.model,type:e})},onRender:function(){var e,t=this.model.get("type");if(a()(p).has(t)){e=new(0,p[t])({model:this.model,mediaActions:this.mediaActions})}else e=new c.a({model:this.model});this.scroller.show(e),this.actionBar.show(new s.a({model:this.model,mediaActions:this.mediaActions}))}});t.a=h},function(e,t,n){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(18),s=n(15),l=n(69),c=n(709),u=n(2417),d=n.n(u),p={preventDefault:!0,stopPropagation:!1},h=i.a.ItemView.extend({className:"action-bar",template:d.a,ui:{primaryActions:".action-bar-nav",secondaryActions:".dropdown-menu",playBtn:".play-btn",infoBtn:".info-btn"},triggers:{"click .play-btn":"play","click .info-btn":a.a.extend({event:"info"},p)},onlyAfterRender:["onPlay","updateDropdown"],initialize:function(e){this.type=this.model.get("type"),
this.mediaActions=e.mediaActions,this.listenTo(this.mediaActions,"change",a.a.throttle(this.updateDropdown,50)),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),this.listenTo(o.a,{"shortcut:play":this.onPlay,"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},".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(s.c)("appStore").dispatch(Object(l.k)({serverModel:this.model.server,metadataItemModel:this.model}))}},
onInfo:function(){this.ui.infoBtn.isDisabled()||o.a.trigger("show:modal",new c.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+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="'+l(i(n(4)).call(t,"Play",{hash:{},data:o
}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+l(i(n(4)).call(t,"Share",{hash:{},data:o}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+l(i(n(4)).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="info-btn" href="#">'+l(i(n(4)).call(t,"Get Info",{hash:{},data:o}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){"use strict"
;var i=n(15),r=n(2419),a=n(2421),o=n(222),s=n(708),l=n(2422),c=n(2423),u=n(2425),d=n(2428),p=n.n(d),h=l.a.extend({mixins:r.a,className:"clip-details-row details-row",template:p.a,initialize:function(){l.a.prototype.initialize.apply(this,arguments),this.starRatingView=new s.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 o.a({model:this.model,type:this.model.get("type"),width:this.posterWidth});var e=this.model.server.get("isCloud"),t=i.c("appModel"),n=t.get("primaryServer");(!e||n&&!n.get("isCloudSyncServer"))&&(this.contentRatingFlag=new a.a({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new a.a({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new a.a({
model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new a.a({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new a.a({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40}))}});t.a=h},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(1073),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.q)(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(7),a=n.n(r),o=n(945),s=n(26);t.a=i},function(e,t,n){"use strict"
;var i=n(372),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(21),r=n(15),a=n(1073),o=n(69),s=i.a.Layout.extend({mixins:a.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.c)("appStore").dispatch(Object(o.k)({serverModel:this.model.server,metadataItemModel:this.model}))}});t.a=s},function(e,t,n){"use strict";var i=n(21),r=n(7),a=n.n(r),o=n(18),s=n(3),l=n(2424),c=n.n(l),u=i.a.ItemView.extend({className:"summary",template:c.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=a.a.map(a.a.compact(e.split("\n")),function(e){return a.a.escape(e).trim()});if(t.length)return"<p>"+t.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(o.a,"resize",this.onResize),
this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=e?Object(s.default)("More"):Object(s.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(){a.a.defer(a.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(4)).call(t,"More",{hash:{},data:o}))+"</button> </div> "})},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(40),c=n(261),u=n(151),d=n(2426),p=n.n(d),h=a.a.ItemView.extend({tagName:"span",className:"dropdown",template:p.a,modelEvents:{"change:Media":"render","change:streams":"render"},events:{
"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=u.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(c.a)(this.media,{streamType:this.streamType.id}),i=Object(c.a)(this.media,{streamType:this.streamType.id,selected:!0}),r=s.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=r()(e.currentTarget),n=t.data("id");l.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(751)).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(751)).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(751)).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(s.a)(l)),e.channels&&c.push(Object(o.a)(e.channels))),
c.length?t+" \u2014 "+c.join(" "):t}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),a=n(151),o=n(1075),s=n(1076);t.default=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=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(4)).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(4)).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(4)).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(4)).call(t,"Audio",{hash:{},data:o}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+l(i(n(4)).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(21),r=n(2430),a=n.n(r),o=i.a.ItemView.extend({className:"container",template:a.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(4)).call(t,"This media type does not have a details page.",{
hash:{},data:o}))+"</h1> </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(395),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,r=n(6),a=n.n(r),o=n(77),s=n(18),l=n(2434),c=n(195),u=n(2435),d=c.k.reduce(function(e,t){return e["!/"+t+"(/:serverID)(/:providerID)"]="typeFirstLanding",e},{}),p=l.a.extend({controller:new u.a,appRoutes:a()({"!/dashboard":"dashboard","!(/server/:serverID)/dashboard":"dashboard",
"!/provider/:providerID/list":"providerList","!/provider/:providerID/settings":"providerSettings","!(/server/:serverID)(/provider/:providerID)/list":"list","!/home(/:serverID)(/:providerID)":"typeFirstHomeList","!(/server/:serverID)/needsUpdate":"needsUpdate","":"dashboard","!/login":"login","!/logout":"logout","!/unauthorized":"unauthorized","!/logs":"logs","!/info":"info"},d,(i={},i["!/"+c.f+"(/:serverID)/:providerID/timeline"]="typeFirstTimeline",
i["!/"+c.a+"(/:serverID)/:providerID/guide"]="typeFirstGuide",i["!/"+c.a+"(/:serverID)/:providerID/schedule"]="typeFirstRecordingSchedule",i["*404"]="error",i)),onNavigateRefreshDashboard:function(){var e=o.c.history.getFragment();""===e||"!/dashboard"===e?o.c.history.loadUrl(""):s.a.trigger("navigate","dashboard")}});t.a=p},function(e,t,n){"use strict";var i=n(77),r=n(7),a=n.n(r),o=n(18),s=n(15),l=n(267),c=l.a.extend({initialize:function(){l.a.prototype.initialize.apply(this,arguments),
this.listenTo(o.a,{"navigate:back":this.onNavigateBack,"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard})},onNavigateBack:function(){var e=s.c("appModel"),t=e.get("history"),n=e.get("forwardHistory");if(t.length<2)return this.navigate("",{trigger:!0});n.unshift(t.pop()),this.navigate(a.a.last(t),{trigger:!0})},onNavigateForward:function(){var e=s.c("appModel"),t=e.get("forwardHistory")
;t.length&&this.navigate(t[0],{trigger:!0})},onNavigateRefresh:function(){i.c.history.loadUrl(i.c.history.getFragment())}});t.a=c},function(e,t,n){"use strict";var i=n(77),r=n(13),a=n.n(r),o=n(18),s=n(19),l=n(15),c=n(2436),u=n(80),d=n(438),p=n(2437),h=n(3152),f=n(3154),v=n(1243),g=n(3171),m=n(3175),y=n(3215),b=n(3284),I=n(3453),S=n(3454),M=n(752),D=n(3456),C=n(3458),O=n(3460),P=n(3462),j=n(3464),T=n(3479),w=n(3508),E=n(3574),x=n(3584),A=n(3625),N=n(3633),L=n(3686),k={signIn:v.a,error:M.a,
channelError:S.a,notFound:D.a,serverRequired:C.a,unauthorized:O.a,unavailable:P.a},_=c.a.extend({getViewByType:function(e){return k[e]},initialize:function(){c.a.prototype.initialize.apply(this,arguments),this.listenTo(o.a,"initialize:app",this.onAppInitialize)},typeFirst:function(e,t,n){var r=i.c.history.getFragment().slice(2).split("/"),s=r[0];return this.populateView().then(function(){return Object(d.a)()?(e&&!t&&(t=e,e=u.a),a.a.Deferred().resolve({navigationType:s,selectedServerID:e,
selectedProviderID:t,params:n}).promise()):(o.a.trigger("navigate","dashboard",{replace:!0}),a.a.Deferred().reject().promise())})},typeFirstHomeList:function(){this.typeFirst.apply(this,arguments).then(function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params;o.a.trigger("show:view",new T.a({selectedServerID:t,selectedProviderID:n,params:s.parseParams(i)}),{clearActiveNavigationType:!1})})},typeFirstLanding:function(){this.typeFirst.apply(this,arguments).then(function(e){
var t=e.navigationType,n=e.selectedServerID,i=e.selectedProviderID,r=e.params;o.a.trigger("show:view",new x.a({navigationType:t,selectedServerID:n,selectedProviderID:i,params:s.parseParams(r)}),{clearActiveNavigationType:!1})})},typeFirstTimeline:function(){this.typeFirst.apply(this,arguments).then(function(e){var t=e.navigationType,n=e.selectedServerID,i=e.selectedProviderID,r=e.params;o.a.trigger("show:view",new A.a({navigationType:t,selectedServerID:n,selectedProviderID:i,
params:s.parseParams(r)}),{clearActiveNavigationType:!1})})},typeFirstGuide:function(){this.typeFirst.apply(this,arguments).then(function(e){var t=e.navigationType,n=e.selectedServerID,i=e.selectedProviderID,r=e.params;o.a.trigger("show:view",new E.a({navigationType:t,selectedServerID:n,selectedProviderID:i,params:s.parseParams(r)}),{clearActiveNavigationType:!1})})},typeFirstRecordingSchedule:function(){this.typeFirst.apply(this,arguments).then(function(e){
var t=e.navigationType,n=e.selectedServerID,i=e.selectedProviderID,r=e.params;o.a.trigger("show:view",new N.a({navigationType:t,selectedServerID:n,selectedProviderID:i,params:s.parseParams(r)}),{clearActiveNavigationType:!1})})},dashboard:function(e,t){this.populateView().done(function(){var n=Object(d.a)()?w.a:b.a;o.a.trigger("show:view",new n({selectedServerID:e,params:s.parseParams(t)}),{clearActiveNavigationType:!1})})},list:function(e,t,n){var i=s.parseParams(n)
;this.populateView().done(function(){o.a.trigger("show:view",new y.a({selectedServerID:e,selectedProviderID:t,params:i}))})},providerList:function(e,t){var n=s.parseParams(t);this.populateView().done(function(){o.a.trigger("show:view",new I.a({selectedProviderID:e,params:n}))})},providerSettings:function(e){this.populateView().done(function(){var t=Object(d.a)()?L.a:j.a;o.a.trigger("show:view",new t({selectedProviderID:e}))})},needsUpdate:function(e){this.populateView().done(function(){
Object(l.c)("appModel").get("servers").findWhere({isOutOfDate:!0})?o.a.trigger("show:view",new m.a({selectedServerID:e})):o.a.trigger("navigate","dashboard",{replace:!0})})},logs:function(){o.a.trigger("show:view",new f.a({collection:Object(l.c)("logs")}))},info:function(){o.a.trigger("show:view",new h.a)},logout:function(){o.a.trigger("show:view",new g.a)},onAppInitialize:function(){this.appView=new p.a,this.appView.render()}});t.a=_},function(e,t,n){"use strict"
;var i=n(7),r=n.n(i),a=n(18),o=n(159),s=n(15),l=n(57),c=n(268),u=c.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(s.c)("appModel"),n=t.get("cloudServer");a.a.trigger("show:loading"),n.populate().done(function(){a.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"),s=r.get("features");Object(o.a)(s.populate()).done(function(){var t=i?e.viewFor("signIn"):e.viewFor("unavailable",{model:n});a.a.trigger("show:view",t)})})},error:function(){a.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)})||a.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(s.c)("appModel").get("user").get("isLocked")},handleAuthorized:function(e){var t=Object(s.c)("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)&&(a.a.trigger("show:view",this.viewFor("serverRequired")),!0)},handleServer:function(e){var t=e.server,n=e.options,i=this.viewFor,r=Object(s.c)("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&&a.a.trigger("show:view",c),!(!c&&!l))},handleChannelError:function(e){var t=e.options,n=!!t.channelID;return n&&a.a.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){var e=Object(s.c)("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")?a.a.trigger("navigate:refresh"):e?e.get("authorized")?a.a.trigger("navigate","dashboard"):a.a.trigger("show:view",r("unavailable",{model:e})):t?a.a.trigger("show:view",r("serverRequired")):a.a.trigger("navigate","login",{silent:!0})}).fail(function(){l.a.get("requiresSignIn")?a.a.trigger("show:view",r("unavailable",{model:i})):a.a.trigger("show:view",r("serverRequired"))})}});t.a=u},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=n(15),u=n(57),d=n(2438),p=n(2439),h=n(1061),f=n(264),v=n(2449),g=n(2451),m=n(2632),y=n(3113),b=n(3151),I=n.n(b),S=a.a.Layout.extend({el:"#plex",template:I.a,resizeDelay:200,ui:{content:"#content"},customRegions:{background:{prepend:!0,global:!0},content:{selector:"#content",global:!0,scrollable:!0,channelName:"content"},navbar:{prepend:!0,global:!0},alertbar:{selector:".alert-bar-container"},audioVideoPlayer:{append:!0,global:!0},
photoPlayer:{append:!0,global:!0}},openAlerts:{},initialize:function(){s.a.bindAll(this,"triggerResizeEvent");var e=c.c("appModel");this.user=e.get("user"),this.modals=[],s.a.each(s.a.keys(this.customRegions),function(e){var t=this.customRegions[e],n=t.selector||s.a.uniqueId("r");t.scrollable?this.addRegion(e,new d.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(l.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}),r()(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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clearActiveNavigationType;(void 0===n||n)&&c.c("appModel").unset("activeNavigationType");r()(".tooltip").remove(),this.hideBackground(this.currentView,e),
l.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=u.a.get("alerts");e&&e.length&&(u.a.set("alerts",null),this.showBar("alertbar",new f.a({alert:s.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=r()("body");e.transparent&&t.addClass("show-modal-transparent"),t.append(e.render().el)},hideModal:function(e){var t=s.a.indexOf(this.modals,e)
;t>-1&&this.modals.splice(t,1)[0].close(),e.transparent&&!s.a.findWhere(this.modals,{transparent:!0})&&r()("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;l.a.trigger("audio:fadeOut",{exceptKey:n}),e&&e.model&&l.a.trigger("hide:background",this.currentView.model)},lockAll:function(){this._isLocked=!0
;var e=s.a.map(s.a.keys(this.customRegions),function(e){return this[e]},this);s.a.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){s.a.each(s.a.keys(this.customRegions),function(e){if(!this.customRegions[e].global){var t=this[e];t.lockedView&&(t.lockedView=null)}},this)},restoreAll:function(){this._isLocked=!1;var e=c.c("appModel");e.get("authorized")&&this.showBar("navbar",new g.a({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),
this.showCustomRegion("photoPlayer",new y.a),this.showCustomRegion("audioVideoPlayer",new m.a)},triggerResizeEvent:function(){l.a.trigger("resize")},onRender:function(){this.backgroundView=new p.a,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=c.c("appModel");this.showBar("navbar",new g.a({model:n}),{prepend:!0});var i=this.user.get("locked");!1!==i&&null!==i||this.showAlertBar()}else this.hideBar("navbar"),l.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 p.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=S},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=a.a.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(e){s.a.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=r()(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(s.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(s.a.indexOf(this.scrollSubscribersCallbacks,e),1),
0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll)},onResize:function(){this.updateSize(),s.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(),s.a.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(e){
"sidebar"===e&&s.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(67)),s=n(2440),l=n(46),c=n(2443),u=r()(o.a,{},void 0,r()(c.a,{}),r()(s.a,{})),d=l.a.extend({className:"background-container",component:function(){return u}});t.a=d},function(e,t,n){"use strict";var i=n(12),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(5),g=(n.n(v),
n(15)),m=n(69),y=n(1077),b=n(99),I=n(2441),S=Object(v.createSelector)(y.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(g.c)("mediaComponent").getComponent({protocol:"http",isDirectPlay:!0}),isPlayerOpen:n}}),M={dispatchEndPlayback:m.f},D=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.isBackgroundPending,e.isPlayerOpen),n=r()(e,["isBackgroundPending","isPlayerOpen"]);return t?null:h.a.createElement(I.a,n)},t}(p.Component);D.defaultProps={playerType:b.a},t.a=Object(f.b)(S,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(1),p=(n.n(d),n(0)),h=(n.n(p),n(57)),f=n(2442),v=2e3,g=100,m=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(f.a)(n,t,-t,v);return i=Math.max(0,i),i&&(r.fadeOutTimeoutID=setTimeout(r.fadeOut,g)),{volume:i}},r.onDurationMillisecondsChange=function(e){r._currentDurationMilliseconds=e},r.onPositionMillisecondsChange=function(e){var t=Math.floor(e/1e3),n=r.state.shouldStopOnEnd?0:v;r.state.positionSeconds!==t&&r.setState({positionSeconds:t}),r._currentDurationMilliseconds-e<=n&&!r.fadeOutTimeoutID&&r.endThemeMusic()},
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.endThemeMusic())},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,shouldStopOnEnd:h.a.get("shouldStopThemeMusicOnNavigate")}},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.endThemeMusic=function(){if(this.state.shouldStopOnEnd){var e=this.props;(0,e.dispatchEndPlayback)({playerType:e.playerType}),this.reset()}else this.fadeOut()},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,o=a.component,s=a.playerType;return r()(o,{mediaType:"audio",isBackgroundMedia:!0,isThemeMusic:!0,src:t,playerType:s,positionSeconds:n,volume:i,
allowRecycleElement:!0,onDurationMillisecondsChange:this.onDurationMillisecondsChange,onPositionMillisecondsChange:this.onPositionMillisecondsChange,onEnd:this.onEnd},t)},t}(p.Component);t.a=m},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(5),v=(n.n(f),n(398)),g=n(1078),m=Object(f.createSelector)(function(e){return e.ui.background
},v.a,function(e,t){return{isTypeFirstEnabled:t,serverEntityID:e.server,providerEntityID:e.provider,url:e.imageUrl,allowLightPreset:e.allowLightPreset,isBackgroundPending:e.isBackgroundPending}}),y=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,o=e.isTypeFirstEnabled;return r()(g.a,{serverEntityID:t,providerEntityID:n,url:i,allowPreset:!0,allowLightPreset:a,isTypeFirstEnabled:o})},t}(p.Component);t.a=Object(h.b)(function(e){return m})(y)},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(5),a=(n.n(r),n(70)),o={}},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-dark.64cc1c942221cd2c153244bd8ecfb67a.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-light2.0f268b91ece99552363e05da5064bf33.png"},function(e,t,n){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(368),s=n(2450),l=n.n(s),c=i.a.ItemView.extend({mixins:[o.a],className:"alert transition-in",template:l.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"]),a.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(){a.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(33)).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(2),r=n.n(i),a=n(0),o=(n.n(a),n(18)),s=n(46),l=n(2452),c=r()(l.a,{}),u=s.a.extend({className:"nav-bar",
initialize:function(){this.listenTo(o.a,"change:language",this.render)},component:function(){return c}});t.a=u},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e){return e.history},d.a,u.a,c.a,y,function(e,t,n,i,r){var a=Object(f.a)(v.m,p.a),o=window.location.hash,s=/#!\/logout/.test(o),c=Object(l.c)("fullscreenManager").hasFullscreen;return{serverEntityID:a,hasHistory:e.length>1,userThumb:t.thumb,badgeCount:n.length+i.length,isFullscreen:r,isOnLogout:s,
canGoPremium:t.canGoPremium,canEnterFullscreen:Object(h.b)()&&c&&!r,canExitFullscreen:c&&r}})}function r(e,t){var n={onBackPress:function(e){s.a.trigger("navigate:back")},onEnterFullscreen:function(e){Object(l.c)("fullscreenManager").enter()},onExitFullscreen:function(e){Object(l.c)("fullscreenManager").exit()}};return Object(h.b)()&&(n.onSwitchAppLayout=function(){e(Object(g.n)())}),n}var a=n(11),o=n(5),s=(n.n(o),
n(18)),l=n(15),c=n(1079),u=n(1080),d=n(154),p=n(80),h=n(523),f=n(38),v=n(43),g=n(68),m=n(2454),y=Object(o.createSelector)(function(e){return e.isFullscreen},function(e){return e}),b=Object(a.b)(i,r)(m.a);t.a=b},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(561)),a=Object(i.createSelector)(r.a,function(e){return e.announcements});t.a=a},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.hasHistory,i=e.userThumb,r=e.badgeCount,o=e.canEnterFullscreen,s=e.canExitFullscreen,u=e.canGoPremium,v=e.isOnLogout,y=e.onBackPress,b=e.onSwitchAppLayout,I=e.onEnterFullscreen,S=e.onExitFullscreen;return v?null:a()("div",{className:g.a.container},void 0,a()("div",{className:g.a.left},void 0,a()(h.a,{className:g.a.button,to:"#",icon:"plex-icon-navbar-home-560",title:Object(l.default)("Home")}),a()(h.a,{className:g.a.button,icon:"plex-icon-navbar-back-560",
title:Object(l.default)("Back"),isDisabled:!n,onPress:y}),m),a()("div",{className:g.a.right},void 0,u?a()(f.a,{className:g.a.plexPassButton}):null,u?a()("div",{className:g.a.buttonSeparator}):null,b?a()(h.a,{className:g.a.button,icon:"plex-icon-navbar-TV-mode-560",title:Object(l.default)("Enter TV Layout"),onPress:b}):null,s?a()(h.a,{className:g.a.button,icon:"plex-icon-navbar-windowed-560",title:Object(l.default)("Exit Full Screen"),onPress:S}):null,o?a()(h.a,{className:g.a.button,
icon:"plex-icon-navbar-fullscreen-560",title:Object(l.default)("Enter Full Screen"),onPress:I}):null,o||s||b?a()("div",{className:g.a.buttonSeparator}):null,a()(p.a,{className:g.a.button}),a()(h.a,{className:g.a.button,to:"#!/settings/web/general",icon:"plex-icon-navbar-settings-560",title:Object(l.default)("Settings")}),a()(c.a,{className:g.a.button,iconComponent:h.a}),a()(d.a,{className:g.a.accountButton,serverEntityID:t,userThumb:i,badgeCount:r})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(3)),c=n(1081),u=n(2464),d=n(2609),p=n(2618),h=n(1115),f=n(2629),v=n(2631),g=n.n(v),m=a()(u.a,{});t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(17),o=n(16),s=n(704),l=n(2456),c=a.a.extend({sessionAttrs:{protocol:o.a.string.isRequired},syncedAttrs:{friendlyName:o.a.string.isRequired,capabilities:o.a.array,volume:o.a.integer.isRequired},defaults:{protocol:s.a,volume:100},augmentResponse:function(e){return r()({},e,{friendlyName:Object(l.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(53),a=n.n(r),o=n(205),s={amp:"&",apos:"'","#x27":"'","#x2F":"/","#39":"'","#47":"/",lt:"<",gt:">",nbsp:" ",quot:'"'}},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(s.a)(r),u=c||r||i
;return n&&n.get("playQueueID")===u?n:Object(o.a)(a()({providerModel:t,playQueueID:u},l))}t.a=i;var r=n(6),a=n.n(r),o=n(993),s=n(754)},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 o.default({containerKey:u},d),f=h.fetch()):(p=new s.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(13),a=n.n(r),o=n(107),s=n(92),l=n(991),c=n(376)},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=v.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 P=S[C],j=P.Part,T=0,w=j.length;T<w;T++){for(var E=j[T],x=E.Stream,A=0,N=x.length;A<N;A++){var L=x[A];if(L.streamType===b.id&&L.id===s){M=P,D=E;break}}if(D)break}if(D)break}if(!D)return l.a.Deferred().reject().promise()
;var k=(n={},n[b.key]=s,n);c&&(k.allParts=1);var _=d.join(["/library/parts/",D.id],k),R=u.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=l.a.ajax(R).done(function(){e.set("isStreamChangeInProgress",!1),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(p.c)("metrics").trackClick(o()({},y,{action:f.R,type:e.get("type"),streamType:a})),U.promise()}t.a=r;var a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(7),u=n.n(c),d=(n(36),n(19)),p=n(15),h=n(1082),f=n(76),v=n(151),g=n(236)},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(56)),f=n(45),v=n(3),g=n(242),m=n(2461),y=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.iconClassName,i=e.iconComponent,a=e.isCastApiAvailable,o=e.isRemotePlayer,s=e.hasCompanionServer,l=e.remotePlayerName,c=e.remotePlayerProduct,u=e.players,d=e.onPlayerSelect,f=e.onCastPress,g=e.onDisconnectPress;return r()(p.Fragment,{},void 0,r()(i,{className:t,iconClassName:n,id:this._menuButtonID,title:this.state.isMenuOpen?void 0:Object(v.default)("Select Player"),icon:o?"plex-icon-remote-player-on-560":"plex-icon-remote-player-off-560",isDisabled:!a&&!s,
isSelected:o,onPress:this.onPress}),r()(h.a,{target:this._menuButtonID,isOpen:this.state.isMenuOpen,onMenuClose:this.onMenuClose},void 0,r()(m.a,{isCastApiAvailable:a,isRemotePlayer:o,remotePlayerName:l,remotePlayerProduct:c,players:u,onPlayerSelect:d,onCastPress:f,onDisconnectPress:g})))},t}(p.Component);y.defaultProps={iconComponent:g.a},t.a=y},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(101)),f=n(243),v=n(3),g=n(25),m=n(2462),y=n(2463),b=n.n(y),I=r()(f.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()(h.a,{onPress:this.onDisconnectPress},"disconnect",r()(g.a,{name:"plex-icon-ban-560",className:b.a.disconnectIcon,"aria-label":Object(v.default)("Disconnect")
}),Object(v.default)("Disconnect"))],c&&r()(h.a,{onPress:this.onCastPress},"cast",Object(v.default)("Cast...")),c&&u&&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(v.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(101)),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-L2owq",remoteProduct:"RemotePlayerMenuItems-remoteProduct-3K34_",remotePlayerProduct:"RemotePlayerMenuItems-remotePlayerProduct-3Xx8U",emptyMessage:"RemotePlayerMenuItems-emptyMessage-_vLf3",disconnectIcon:"RemotePlayerMenuItems-disconnectIcon-3DaqB"}},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e){return e.ui.quickSearch},j,w,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(12),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(6),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(5),b=(n.n(y),n(100)),I=n(156),S=n(132),M=n(163),D=n(41),C=n(35),O=n(84),P=n(2465),j=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}),T=Object(I.a)(Object(y.createSelector)(function(e){return e.user.desktop.providers},S.a,function(e,t){return e.filter(function(e){var n=t[e].providerIdentifier||t[e].identifier;return n===D.i||n===D.j||n===D.e||n===D.f})}),function(e){return e}),w=Object(I.a)(Object(y.createSelector)(j,function(e){return e.user.desktop.providers},T,function(e,t,n){
return e?e.isCloud?t:[].concat(e.providers,n):[]}),function(e){return e}),E=h()({populateProviders:b.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(C.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(P.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(453),v=n(27),g=n(325),m=n(47),y=n(35),b=n(44),I=n.n(b),S=n(2466),M=n(2469),D=n(2608),C=n.n(D),O=parseInt(I.a.searchResultHeight,10),P=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=r._resultsRef.current,i=n.clientHeight,a=i+r.state.scrollTop,o=t+O>a||t<r.state.scrollTop;r.setState({scrollTop:o?t:r.state.scrollTop})},r.onWindowPress=function(e){if(r.state.isOpen){var t=r._searchRef.current;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 g.c:case g.k:a&&(e.stopPropagation(),e.preventDefault(),
e.keyCode===g.k?r.props.selectQuickSearchResult({offset:-1}):r.props.selectQuickSearchResult({offset:1}),r.isTabScoped&&(f.c(),r.isTabScoped=!1));break;case g.d:if(a){var o=m.a.platformID,s="osx"===o?e.metaKey:e.ctrlKey,l=e.shiftKey;f.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 g.e:
e.nativeEvent.stopImmediatePropagation(),r.isTabScoped&&(f.c(),r.isTabScoped=!1),a?r.setState({isOpen:!1}):r.props.changeQuickSearchQuery("");break;case g.j:if(a){if(!r.isTabScoped){var c=r._resultsRef.current;f.f(c),r.isTabScoped=!0}f.e(e)}}},r.onInputClick=function(e){r.isTabScoped&&(f.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(y.a)(function(){
r.props.fetchQuickSearch()})},r.onInputChange=function(e){Object(y.a)(function(){r.props.changeQuickSearchQuery(e)})},r._searchRef=h.a.createRef(),r._resultsRef=h.a.createRef(),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&&(f.b(),this.isTabScoped=!1)),null==n&&this.setState({scrollTop:0})},t.prototype.shouldComponentUpdate=function(e,t){return Object(v.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:C.a.container,ref:this._searchRef,onKeyDown:this.onKeyDown},r()(S.a,{query:i,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),this.state.isOpen&&h.a.createElement(M.a,{serverEntityID:t,providerEntityID:n,
scrollTop:this.state.scrollTop,ref:this._resultsRef,onScrollIntoView:this.onScrollIntoView,onScrollPositionChange:this.onScrollPositionChange}))},t}(p.Component);t.a=P},function(e,t,n){"use strict";var i=n(6),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(2467),v=n(27),g=n(18),m=n(25),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.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(){g.a.on("shortcut:search",this.focusInput)},t.prototype.shouldComponentUpdate=function(e,t){return Object(v.a)(this,e,t)},t.prototype.componentWillUnmount=function(){g.a.off("shortcut:search",this.focusInput)},t.prototype.render=function(){return h.a.createElement(f.a,r()({},this.props,{closeIcon:m.a,
searchIcon:m.a,onRef:this.onRef}))},t}(p.Component);t.a=y},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(20),g=n(27),m=n(2468),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(g.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()(v.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(6),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(71),m=(n(451),n(27)),y=n(30),b=n(270),I=n(2470),S=n(2474),M=n(2607),D=n.n(M),C=function(e){
function t(n){l()(this,t);var i=u()(this,e.call(this,n));return i.onWindowResize=function(){i.setState({maxHeight:i.getMaxHeight()})},i.state={maxHeight:i.getMaxHeight()},i}return p()(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize)},t.prototype.shouldComponentUpdate=function(e,t){return Object(m.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.forwardedRef,n=e.className,i=e.serverEntityID,r=e.providerEntityID,a=e.scrollTop,s=e.onScrollIntoView,l=e.onScrollPositionChange;return o()(b.a,{page:y.U},void 0,v.a.createElement(g.a,{className:(D.a.container||"")+" "+(n||""),style:this.state,scrollTop:a,ref:t,onScrollPositionChange:l},o()(I.a,{serverEntityID:i,providerEntityID:r}),o()(S.a,{serverEntityID:i,providerEntityID:r,
onScrollIntoView:s})))},t}(f.Component);t.a=v.a.forwardRef(function(e,t){return v.a.createElement(C,r()({},e,{forwardedRef:t}))})},function(e,t,n){"use strict";var i=n(6),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(5),g=(n.n(v),n(453)),m=n(37),y=n(50),b=n(70),I=n(84),S=n(2471),M={resetQuickSearch:I.resetQuickSearch,selectQuickSearchResult:I.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}),g.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)(y.a,m.a,function(e){return e.ui.quickSearch},b.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(d.default)("Search in {channelName}...",{channelName:t
}):n?Object(d.default)("Search all servers...",e):Object(d.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,d=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!=d){var b=encodeURIComponent(l),I=u.join(d,{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()(c.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(2472)),u=n(19),d=n(3);n(88),n(125);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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(20),p=n(2473),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(5),a=(n.n(r),n(70)),o=n(2475),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(6),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(2476);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(5),c=(n.n(l),n(51)),u=n(2477);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(6),o=n.n(a),s=n(2),l=n.n(s),c=n(12),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(3),v=n(31),g=n(2478),m=n(2606),y=n.n(m);t.a=r},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(2479),b=n(27),I=n(2481),S=n(1111),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(b.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()(y.a,{title:t},void 0,i.concat(a).map(function(e,t){return m.a.createElement(S.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(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(2480)),c=n.n(l);t.a=i},function(e,t){e.exports={hubTitle:"QuickSearchHubContainer-hubTitle-2B0GD"}},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(function(e,t){return t.metricsContext},I.a,b.a,Object(P.a)(),Object(y.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(T.c)(r.type,r.subtype)===T.b?N:L,s=Object(j.a)(o,null,r.type,r.subtype,r,D.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(x.a)(t,n,r,{context:e})},a)}else{
var l=i.tagItem||{},c=M.a.get(l.tagType),u=c&&c.typeString,p=Object(j.a)(L,null,u,null,l,D.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(E.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(6),d=n.n(u),p=n(1),h=(n.n(p),
n(0)),f=n.n(h),v=n(11),g=n(5),m=(n.n(g),n(453)),y=n(22),b=n(37),I=n(50),S=n(35),M=n(399),D=n(32),C=n(167),O=n(84),P=n(400),j=n(232),T=n(126),w=n(339),E=n(133),x=n(1095),A=n(2548),N=28,L=36,k=d()({resetQuickSearch:O.resetQuickSearch,selectQuickSearchResult:O.selectQuickSearchResult,playQuickSearchResult:O.playQuickSearchResult},C),_=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}),m.a()},i.onResultFocus=function(e){Object(S.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(A.a,d()({},this.props,{onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,onPlayPress:this.onPlayPress}))},t}(h.Component);t.a=Object(v.b)(i,k,w.a)(_)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i="analyzing"},function(e,t,n){"use strict";function i(e,t,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(13),a=n.n(r),o=n(19),s=n(152);t.a=i},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(19),o=n(677),s=n(2485),l=n.n(s),c=o.a.extend({name:"downloadVersionModal",template:l.a,serializeData:function(){var e=this.model;return{defaultLinkTarget:"_self",mediaItems:r.a.map(this.model.get("Media"),function(t,n){var i=r.a.clone(t)
;i.downloadUrl=e.getDownloadUrl(n);var o=e.getFilepath(n);return o&&(i.downloadName=a.getLastSegment(o)),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(245)).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(2486)).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(2487)).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(4)).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(369).default,r=n(189);e.exports=r(i)},function(e,t,n){var i=n(443).default,r=n(189);e.exports=r(i)},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(19),o=n(17),s=n(16),l=n(2489),c=n(308),u=n(237),d=n(26),p=n(2490),h={album:{title:"title",parentRatingKey:"artist.id",parentTitle:"artist.title"},track:{parentRatingKey:"album.id",parentTitle:"album.title",
grandparentRatingKey:"artist.id",grandparentTitle:"artist.title"}},f=o.a.extend({name:"MultiMetadataModel",context:["server","section"],rootPropertyName:"Common",isNew:function(){return!1},url:function(){return a.join([this.sectionUrl(),"common"],this.getUrlParams())},saveUrl:function(){return a.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:s.a.array.isRequired,originalSaveParams:s.a.object,poster:s.a.string,banner:s.a.string,art:s.a.string},syncedAttrs:{mixedFields:s.a.list.isRequired,key:{type:s.a.string,save:!0},ratingKey:{type:s.a.string,save:!0},parentRatingKey:{type:s.a.string,save:!0},grandparentRatingKey:{type:s.a.string,save:!0},title:{type:s.a.string,save:!0},titleSort:{
type:s.a.string,save:!0},originalTitle:{type:s.a.string,save:!0},parentTitle:{type:s.a.string,save:!0},grandparentTitle:{type:s.a.string,save:!0},year:{type:s.a.string,save:!0},tagline:{type:s.a.string,save:!0},summary:{type:s.a.string,save:!0},studio:{type:s.a.string,save:!0},contentRating:{type:s.a.string,save:!0},originallyAvailableAt:{type:s.a.string,save:!0},rating:{type:s.a.float,save:!0},userRating:{type:s.a.float,save:!0},index:{type:s.a.integer,save:!0},parentIndex:{type:s.a.integer,
save:!0}},sessionRelations:{preferences:{relationClass:c.a}},syncedRelations:{collections:{relationClass:l.a,rootPropertyName:"Collection",save:!0},directors:{relationClass:l.a,rootPropertyName:"Director",save:!0},producers:{relationClass:l.a,rootPropertyName:"Producer",save:!0},writers:{relationClass:l.a,rootPropertyName:"Writer",save:!0},genres:{relationClass:l.a,rootPropertyName:"Genre",save:!0},moods:{relationClass:l.a,rootPropertyName:"Mood",save:!0},countries:{relationClass:l.a,
rootPropertyName:"Country",save:!0},labels:{relationClass:l.a,rootPropertyName:"Label",save:!0},similar:{relationClass:l.a,rootPropertyName:"Similar",save:!0},roles:{relationClass:l.a,rootPropertyName:"Role",save:!0},tags:{relationClass:l.a,rootPropertyName:"Tag",save:!0},autotags:{relationClass:l.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 u.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(d.q)(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=o.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(24),r=n(1089),a=i.a.extend({name:"TagCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(2491),a=i.a.extend({name:"LockedFieldCollection",context:["server","section"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"LockedFieldModel",
context:["server","section"],idAttribute:"name",syncedAttrs:{name:{type:r.a.string,save:!0},locked:{type:r.a.boolean,save:!0}}});t.a=a},function(e,t,n){"use strict";var i=n(756),r=n(2493),a=n.n(r),o=i.a.extend({template:a.a,serializeData:function(){var e=this.model.get("preferences"),t=this.model.getSingleMetadataItem().get("preferences");return e.length?t.reduce(function(t,n){var i=e.get(n.id);return i?t.push(i.toJSON()):t.push(n.toJSON()),t},[]):t.toJSON()},flushChanges:function(){
var e=this.ui.form,t=e.serializeArray(),n=this.model.getSingleMetadataItem().get("preferences"),i=this.model.get("preferences");t.forEach(function(e){var t=i.get(e.name)||n.get(e.name),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(28)).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(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(90),c=n(92),u=n(2495),d=n(2497),p=n(2500),h=n.n(p),f=a.a.Layout.extend({template:h.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 u.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:l.a.hasFileUpload}},flushChanges:function(){this.model.set(this.changes)},
uploadFiles:function(e){if(e&&e.length){this.changes={},this.ui.upload.removeClass("show-success show-error");var t=this.collection.url(),n=s.a.extend(this.model.server.getXHROptions(t),{type:"POST",processData:!1}),i=[],a=s.a.bind(function(e){/image\//.test(e.type)&&(n.data=e,i.push(r.a.ajax(n)))},this);if(s.a.each(e,a),!i.length)return void this.ui.upload.addClass("show-error");this.ui.upload.addClass("show-progress"),this.monitorUpload(r.a.when.apply(r.a,i))}},uploadUrl:function(e){
this.changes={},this.ui.upload.removeClass("show-form"),this.ui.upload.addClass("show-progress"),this.ui.urlInput.val(""),e=this.collection.url()+"?url="+encodeURIComponent(e);var t=s.a.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(r.a.ajax(t))},monitorUpload:function(e){e.done(s.a.bind(function(){this.isClosed||this.ui.upload.addClass("show-success");var e={server:this.model.server,onlyIfCached:!0},t=new c.a({key:this.metadataItem.get("key")},e)
;s.a.isEmpty(t)||t.fetch({usePopulatedParams:!0,data:{includePreferences:"1"}}),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 d.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=r()(e.currentTarget),n=t.data("ratingKey");this.$(".artwork-option.selected").removeClass("selected"),t.addClass("selected"),this.changes[this.type]=n}});t.a=f},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(24),o=n(2496),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(17),r=n(16),a={POSTER:"poster",ART:"art",BANNER:"banner"
},o=i.a.extend({name:"ArtworkModel",context:["server","artworkType"],idAttribute:"ratingKey",rootPropertyName:"Photo",syncedAttrs:{key:r.a.string,ratingKey:r.a.string,thumb:r.a.string,selected:r.a.boolean}},{types:a});t.a=o},function(e,t,n){"use strict";var i=n(86),r=n(2498),a=i.a.extend({className:"artwork-options-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(21),r=n(520),a=n(682),o=n(372),s=n(2499),l=n.n(s),c=i.a.Layout.extend({tagName:"span",template:l.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 o.a({className:"media-poster-image",model:this.model,modelAttribute:"thumb",placeholderClass:r.a[t],width:n,height:a.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){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(4)).call(e,"enter a url",{hash:{},data:t}))+'</a> </div> <div class="upload-progress"> '+d(i(n(4)).call(e,"Uploading artwork...",{hash:{},data:t
}))+' </div> <div class="upload-success"> '+d(i(n(4)).call(e,"this artwork was uploaded successfully",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(4)).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <div class="upload-error"> '+d(i(n(4)).call(e,"there was an error uploading this artwork",{hash:{},data:t
}))+' <span class="upload-prompt-divider">&middot;</span> '+d(i(n(4)).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(4)).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(4)).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(4)).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(4)).call(e,"choose an image",{hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+d(i(n(4)).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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(3),l=n(1091),c=function(e,t){var n=r()(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 P={};P[h]=M,P.ratingKey=y,O=[P],
e.model["original.general."+i]=O}var j=[e.model.get(a)||e.model.get(i)],T=function(){var e=E.$dropdown_content.children();E.$dropdown.toggleClass("hidden",e.length<=1)},w=function(){o.a.defer(T)};n.data("autocompleteAttr",h),n.data("updateAttr",i),a&&n.data("altUpdateAttr",a);var E=n.selectize({options:O,items:j,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,!o()(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()})),T()})},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"),w()},onType:o.a.bind(function(e){if(E.canCreate(e)){var t=r()(E.$dropdown_content[0].childNodes[0]);E.setActiveOption(t)}w(),this.onLockableFieldChange({currentTarget:E.$input,force:!0})},e),onOptionAdd:function(e,t){var n=o.a.pick(t,h,"ratingKey");o.a.findWhere(O,n)||O.splice(O.length,0,t)},onChange:function(t){var r=this.options[t];if(r){if(p){var a=r.ratingKey===r[h];n.data("isText",a)}e.flushChanges()
;var s=e.model.changedAttributes();o.a.has(s,u)||o.a.has(s,d)?e.trigger("focusSubmit"):o.a.defer(function(){E.onBlur()}),e.trigger("reset_selectize:"+i),T()}}})[0].selectize;E.$dropdown.addClass("hidden")};t.a=c},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"MetadataAutocompleteResultModel",context:["server","section","multiMetadataItem","query"],idAttribute:"ratingKey",rootPropertyName:"Metadata",syncedAttrs:{elementName:r.a.string,ratingKey:r.a.string,
parentRatingKey:r.a.string,grandparentRatingKey:r.a.string,type:r.a.string,title:r.a.string,parentTitle:r.a.string,grandparentTitle:r.a.string,tag:r.a.string,tagType:r.a.integer}});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(28)).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(28)).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(28)).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(28)).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(4)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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 selectize"> '+c(i(n(28)).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(28)).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(28)).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(28)).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"> '+c(i(n(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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="";return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+(0,this.escapeExpression)(i(n(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(4)).call(t,"Rating",{hash:{},data:o}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+u(i(n(28)).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(28)).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(28)).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){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(220),c=n(2515),u=n(2517),d=n.n(u),p=a.a.CompositeView.extend({template:d.a,className:"files",itemView:c.a,
itemViewContainer:"ul",initialize:function(){this.collection=new l.a,this.populateParts().always(this.whenRendered(function(){this.$(".loading").addClass("hidden")}))},populateParts:function(){function e(e){var n=e.get("Media");if(n&&n.length)return s.a.each(n,t),n}function t(e){s.a.each(e.Part,n)}function n(e){i.push(e)}var i=this.collection,a=this.model.getSingleMetadataItem();return e(a)?r.a.Deferred().resolve():a.populate().then(function(){if(!e(a)&&a.has("childrenKey")){
var t=a.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){n.each(e)});n.each(e)}})},flushChanges:function(){}});t.a=p},function(e,t,n){"use strict";var i=n(21),r=n(2516),a=n.n(r),o=i.a.ItemView.extend({template:a.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){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(4)).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(7),r=n.n(i),a=n(15),o=n(175),s=n(81),l=n(1092),c=n(2527),u=n.n(c),d=l.a.extend({templatesByType:{movie:u.a,show:u.a,album:u.a,photo:u.a},serializeData:function(){var e=a.c("appModel"),t=e.get("user"),n=l.a.prototype.serializeData.apply(this,arguments),i=t.get("features").get(s.c);return r.a.extend(n,{
showLabels:this.model.server.supports("labels"),labelsMinVersion:o.a.labels,hasContentFilterFeature:i,plexPassUrl:t.server.get("plexPassUrl")}),n}});t.a=d},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(7),o=n.n(a),s=n(668),l=n(3),c=n(26),u=n(1091),d=function(e,t){var n=r()(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=o.a.pluck(h,"tag"),v=e.model["original.tag."+i];v||(v=o.a.clone(h),
e.model["original.tag."+i]=v);var g=o.a.difference(f,o.a.pluck(v,"tag"));if(g.length){var m=o.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 s.a({filter:i,filterType:"string"},{server:e.model.server,section:e.section,type:Object(c.q)(e.model.get("type")).id}).get("options").populate().then(o.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!o()(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(l.default)("blank")+")</span>")+"</div>"},option:function(e,t){return'<div class="item">'+(e.tag?t(e.tag):'<small class="autocomplete-annotate">('+Object(l.default)("blank")+")</small>")+"</div>"}}})};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){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(28)).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(28)).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){function s(e,t){var r,a="";return a+=' <div class="row"> <div class="col-md-12"> '+u(i(n(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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){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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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(28)).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){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(28)).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(28)).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(28)).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){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(28)).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(4)).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+h(i(n(4)).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(4)).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(4)).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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(3),c=n(446),u=n(1090),d=n(85),p=n(1093),h=n.n(p),f={playlist:["general"]},v=d.a.extend({mixins:[c.a],name:"editPlaylistModal",className:"edit-metadata-modal modal modal-lg fade",template:h.a,panes:{general:{constructor:u.a}},panesModel:"tempModel",events:o.a.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},d.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){d.a.prototype.initialize.apply(this,arguments);var t,n=e.model,i=[n];if(this.model=n,this.tempModel=n.clone(),!t){var a=r.a.Deferred();a.resolve(),t=a.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(s.a,"shortcut:save",this.saveChanges)},this)),t.fail(o.a.bind(function(){this.ui.message.text(Object(l.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(l.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 a=r.a.when.apply(r.a,i);a.done(o.a.bind(function(){this.hide()},this)),a.fail(function(){t.text(Object(l.default)("Your changes could not be saved."))}),a.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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(3),l=n(446),c=n(2530),u=n(85),d=n(2532),p=n(2534),h=n(2546),f=n.n(h),v=u.a.extend({mixins:[l.a],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",template:f.a,panes:{form:{constructor:d.a},results:{constructor:p.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),d.a.prototype.setupAgents.apply(this),p.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(s.default)("Match"):Object(s.default)("Fix Match")}}},
onRender:function(){u.a.prototype.onRender.apply(this,arguments),this.autoMatchDropdownRegion.show(new c.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=r()(e.currentTarget);if(!t.isDisabled()){
var n=t.closest("form");this.fetchResults(n),this.showPane("results")}},onSearchSubmit:function(e){e.preventDefault();var t=r()(e.currentTarget);t.find("search-btn").isDisabled()||(this.fetchResults(t),this.showPane("results"))}});t.a=v},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(40),s=n(2531),l=n.n(s),c=a.a.ItemView.extend({id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:l.a,collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},
serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var t=r()(e.currentTarget).data("id"),n=this.model.agents.get(t);o.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(4)).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 l.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(21),s=n(7),l=n.n(s),c=n(436),u=n(550),d=n(1045),p=n(2533),h=n.n(p),f=o.a.ItemView.extend({template:h.a,ui:{agentSelect:"#match-search-agent",languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){var e=Object(c.a)(this.model),t=e.get("agent"),n=this.setupAgents(t);n.then(l.a.bind(this.updateAgents,this,t)),n.then(l.a.bind(this.updateLanguages,this,t))},
serializeData:function(){var e=Object(c.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(c.a)(this.model),n=t.getSectionType(),i=new u.a([],{server:this.model.server,mediaTypeID:n.typeID}),r=n.exclusiveAgents,a=new d.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(c.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(4)).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(4)).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(4)).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(4)).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(4)).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(21),r=n(7),a=n.n(r),o=n(436),s=n(1094),l=n(2536),c=n(2545),u=n.n(c),d=i.a.Layout.extend({template:u.a,regions:{resultRegion:".result-region"},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=Object(o.a)(this.model),t={manual:1},n={reset:!0,timeout:0,data:t};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&a.a.extend(n,{data:a.a.extend(t,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),
this.model.results.populate(n).then(a.a.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){var e=this.model.results||new s.default([],{server:this.model.server,parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new l.a({collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});t.a=d},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({
name:"MatchResultModel",context:["server"],idAttribute:"guid",rootPropertyName:"SearchResult",syncedAttrs:{id:r.a.integer,guid:r.a.string,name:r.a.string,parentGUID:r.a.string,parentName:r.a.string,type:r.a.string,index:r.a.integer,score:r.a.integer,thumb:r.a.string,year:r.a.integer,matched:r.a.boolean},syncedRelations:{children:function(){return{relationClass:n(1094).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(86),r=n(2537),a=n(2539),o=i.a.extend({tagName:"ul",className:"list match-result-list",itemView:a.a,emptyView:r.a});t.a=o},function(e,t,n){"use strict";var i=n(21),r=n(2538),a=n.n(r),o=i.a.ItemView.extend({template:a.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(4)).call(t,"No matches found.",{hash:{},data:o}))+"</div> "})},function(e,t,n){"use strict";var i=n(21),r=n(40),a=n(2540),o=n(2544),s=n.n(o),l=i.a.Layout.extend({tagName:"li",className:"striped-list-item match-result-list-item row",template:s.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 a.a({collection:e})))}},onClick:function(e){e.preventDefault(),r.a.execute("match",{item:this.item,guid:this.model.id,name:this.model.get("name"),children:this.model.get("children")})}});t.a=l},function(e,t,n){"use strict";var i=n(2541),r=n(86),a=n(2542),o=r.a.extend({
mixins:[i.a],tagName:"ul",itemView:a.a,className:"list"});t.a=o},function(e,t,n){"use strict";var i=n(7),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(21),r=n(2543),a=n.n(r),o=i.a.ItemView.extend({tagName:"li",template:a.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(4)).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){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(4)).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){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){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(4)).call(e,"Location",{hash:{},data:t}))+": "+p(i(n(1062)).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(4)).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(4)).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(4)).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(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.searchResults});t.a=a},function(e,t,n){"use strict";function i(e){switch(e){case"movie":return[O.a,E.a];case"show":return[O.a,T.a];case"episode":return[O.a,S.a];case"artist":return[O.a,D.a];case"album":return[O.a,M.a];case"track":return[O.a,w.a];case"photo":
case"photoalbum":case"clip":return[O.a,P.a];case"playlist":return[O.a,j.a];case"collection":return[O.a,C.a];default:return[O.a,k.a]}}function r(e){return[_.a,k.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(122)),m=n.n(g),y=n(20),b=n(27),I=n(401),S=n(248),M=n(468),D=n(1105),C=n(1106),O=n(762),P=n(763),j=n(2584),T=n(764),w=n(765),E=n(342),x=n(143),A=n(2587),N=n(2594),L=n(2600),k=n(1110),_=n(2603),R=n(2605),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(b.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,b=t.metadataType,S=t.tag,M=t.tagTypeString,D=t.librarySectionType,C=t.reasonTitle,O=this.state.isActionsMenuOpen,P=d?b:M,j=c.protocols.livetv;return s()(y.a,{component:"div",
"data-qa-id":"quickSearchItemButton",className:(z.a.button||"")+" "+((u||O)&&z.a.selected||""||""),onPress:this.onItemPress,onFocus:this.onItemFocus},void 0,s()(y.a,{className:z.a.underlay,"data-qa-id":"quickSearchItemLink",tabIndex:"1",title:d?m:S,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()(A.a,{serverEntityID:n,providerEntityID:i,imageWidth:p,imageHeight:h,imageUrl:f,title:m,type:b,
isLiveTVItem:j,recordLink:Object(x.a)(l,c,g,{record:1}),onRecordPress:this.onLinkPress,onPlayPress:this.onPlayPress}):s()(N.a,{serverEntityID:n,providerEntityID:i,imageWidth:p,imageHeight:h,imageUrl:f,title:S,tagType:M,librarySectionType:D})),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&&!!C;return s()(L.a,{className:l?null:z.a.title,serverEntityID:n,providerEntityID:i,searchResultEntityID:r,metadataItemEntityID:o,
component:c?k.a:t,isSecondary:l,onPress:e.onLinkPress},a)})),d&&!j&&s()(I.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,showDelete:!1,
showDeleteVersion:!1,isMenuOpen:O,onMenuOpenChange:this.onActionsMenuOpenChange})))},t}(v.Component);U.defaultProps={isMetadataItem:!1},t.a=U},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(d.c,Object(u.a)(),Object(f.a)(),function(e,t,n){return o()({providerIdentifier:e.identifier,type:t.type,subtype:t.subtype,saved:t.saved,title:t.title,viewedLeafCount:t.viewedLeafCount,unviewedLeafCount:t.unviewedLeafCount,isRefreshing:!!t.metadataState,isAnalyzing:!!t.mediaState,
downloadUrl:t.downloadUrl,mediaItems:t.Media},n)})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,itemServerEntityID:t.itemServerEntityID,itemProviderEntityID:t.itemProviderEntityID,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.q(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.p(n)),t.onPress()},onQueuePlexMixPress:function(){e(c.i(n)),t.onPress()},onPlayPrimaryExtraPress:function(){e(c.n(n)),
t.onPress()},onPlayRadioPress:function(){e(c.o(n)),t.onPress()},onAddToSavedPress:function(){e(Object(l.f)(n)),t.onPress()},onMarkPlayedConfirm:function(){e(h.markMetadataItemPlayed(o()({},n,{skipConfirm:!0}))),t.onPress()},onMarkUnplayedConfirm:function(){e(h.markMetadataItemUnplayed(o()({},n,{skipConfirm:!0}))),t.onPress()},onEditPress:function(){e(h.editMetadataItem(n)),t.onPress()},onRefreshPress:function(){e(h.refreshMetadataItem(n)),t.onPress()},onAnalyzePress:function(){
e(h.analyzeMetadataItem(n)),t.onPress()},onFixMatchPress:function(){e(h.fixMetadataItemMatch(n)),t.onPress()},onUnmatchPress:function(){e(h.unmatchMetadataItem(n)),t.onPress()},onSplitApartPress:function(){e(h.splitMetadataItemApart(n)),t.onPress()},onSyncPress:function(){e(h.syncMetadataItem(n)),t.onPress()},onOptimizePress:function(){e(h.optimizeMetadataItem(n)),t.onPress()},onDownloadVersionPress:function(){e(h.downloadMetadataItemVersion(n)),t.onPress()},onDeletePress:function(){
e(h.deleteMetadataItem(o()({},n,{options:{skipRedirect:!t.allowRedirectOnDelete}}))),t.onPress()},onDeleteVersionPress:function(){e(h.deleteMetadataItemVersion(n)),t.onPress()},onGetInfoPress:function(){e(h.getMetadataItemInfo(n)),t.onPress()}}}var a=n(6),o=n.n(a),s=n(5),l=(n.n(s),n(231)),c=n(69),u=n(22),d=n(37),p=n(55),h=n(167),f=n(1096),v=n(339),g=n(2550);t.a=Object(p.a)(i,r,v.a)(g.a)},function(e,t,n){"use strict";function i(e,t){return!!g.a.find(e,function(e){return t[e]})}function r(e,t,n){
return n===M.b?e?Object(S.default)("Remove from My Podcasts"):Object(S.default)("Add to My Podcasts"):t===I.e||t===I.f?e?Object(S.default)("Remove from My TIDAL"):Object(S.default)("Add to My TIDAL"):e?Object(S.default)("Remove from My Shows"):Object(S.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(1),f=(n.n(h),n(0)),v=(n.n(f),
n(7)),g=n.n(v),m=n(101),y=n(243),b=n(76),I=n(41),S=n(3),M=n(98),D=n(539),C=n(1098),O=n(2551),P=n(1099),j=n(340),T=n(23),w=["showPlay","showPlayVersion","showPlayAll","showShuffle","showQueue","showPlayPlexMix","showQueuePlexMix","showPlayTrailer","showPlayMusicVideo","showAddToAlbum","showAddToPlaylist"],E=["showEdit","showMarkPlayed","showMarkUnplayed","showSettings","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showDelete","showDeleteVersion","showGetInfo"],x=o()(y.a,{}),A=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.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0}),r.props.onMenuDisable()},r.onAddToPlaylistClose=function(){r.setState({isAddToPlaylistModalOpen:!1}),r.props.onMenuEnable(),r.props.onPress()},r.state={isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1,
isPlayVersionModalOpen:!1,isSettingsModalOpen:!1,isAddToPlaylistModalOpen:!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=t.isAddToPlaylistModalOpen,u=i(w,e),d=i(E,e),p=u&&d;return o()("div",{},void 0,e.showPlay&&o()(m.a,{onPress:e.onPlayPress},void 0,e.playLabel||Object(S.default)("Play")),e.showPlayVersion&&o()(m.a,{
onPress:this.onPlayVersionPress},void 0,Object(S.default)("Play Version...")),e.showPlayAll&&o()(m.a,{onPress:e.onPlayAllPress},void 0,Object(S.default)("Play All")),e.showShuffle&&o()(m.a,{onPress:e.onShufflePress},void 0,Object(S.default)("Shuffle")),e.showPlayRadio&&o()(m.a,{onPress:e.onPlayRadioPress},void 0,Object(S.default)("Play Radio")),e.showQueue&&o()(m.a,{onPress:e.onPlayNextPress},void 0,Object(S.default)("Play Next")),e.showQueue&&o()(m.a,{onPress:e.onAddToQueuePress
},void 0,Object(S.default)("Add to Queue")),e.showPlayPlexMix&&o()(m.a,{onPress:e.onPlayPlexMixPress},void 0,Object(S.default)("Play Plex Mix")),e.showQueuePlexMix&&o()(m.a,{onPress:e.onQueuePlexMixPress},void 0,Object(S.default)("Queue Plex Mix")),e.showPlayTrailer&&o()(m.a,{onPress:e.onPlayPrimaryExtraPress},void 0,Object(S.default)("Play Trailer")),e.showPlayMusicVideo&&o()(m.a,{onPress:e.onPlayPrimaryExtraPress},void 0,Object(S.default)("Play Music Video")),e.showAddToAlbum&&o()(m.a,{
onPress:this.onAddToPlaylistPress},void 0,Object(S.default)("Add to Album...")),e.showAddToPlaylist&&o()(m.a,{onPress:this.onAddToPlaylistPress},void 0,Object(S.default)("Add to Playlist...")),e.showAddToSaved&&o()(m.a,{onPress:e.onAddToSavedPress},void 0,r(e.saved,e.providerIdentifier,e.subtype)),p&&x,e.showEdit&&o()(m.a,{onPress:e.onEditPress},void 0,Object(S.default)("Edit")),e.showSettings&&o()(m.a,{onPress:this.onSettingsPress
},void 0,Object(S.default)("Settings")),e.showMarkPlayed&&o()(m.a,{onPress:this.onMarkPlayedPress},void 0,Object(S.default)("Mark as Played")),e.showMarkUnplayed&&o()(m.a,{onPress:this.onMarkUnplayedPress},void 0,Object(S.default)("Mark as Unplayed")),e.showRefresh&&o()(m.a,{isDisabled:e.isRefreshing,onPress:e.onRefreshPress},void 0,Object(S.default)("Refresh Metadata")),e.showAnalyze&&o()(m.a,{isDisabled:e.isAnalyzing,onPress:e.onAnalyzePress
},void 0,Object(S.default)("Analyze")),e.showFixMatch&&o()(m.a,{onPress:e.onFixMatchPress},void 0,Object(S.default)("Fix Match...")),e.showMatch&&o()(m.a,{onPress:e.onFixMatchPress},void 0,Object(S.default)("Match...")),e.showUnmatch&&o()(m.a,{onPress:e.onUnmatchPress},void 0,Object(S.default)("Unmatch")),e.showSplitApart&&o()(m.a,{onPress:e.onSplitApartPress},void 0,Object(S.default)("Split Apart")),e.showSync&&o()(m.a,{onPress:e.onSyncPress
},void 0,Object(S.default)("Sync...")),e.showOptimize&&o()(m.a,{onPress:e.onOptimizePress},void 0,Object(S.default)("Optimize...")),e.showDownload&&o()(D.a,{action:b.o},void 0,o()(m.a,{to:e.downloadUrl&&e.downloadUrl(),target:e.downloadUrl&&"_self",download:!!e.downloadUrl,onPress:e.downloadUrl?e.onPress:e.onDownloadVersionPress},void 0,Object(S.default)("Download"))),e.showDelete&&o()(m.a,{kind:T.b.DANGER,onPress:e.onDeletePress
},void 0,Object(S.default)("Delete")),e.showDeleteVersion&&o()(m.a,{kind:T.b.DANGER,onPress:e.onDeleteVersionPress},void 0,Object(S.default)("Delete Version")),e.showGetInfo&&o()(m.a,{onPress:e.onGetInfoPress},void 0,Object(S.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
}),(e.showAddToAlbum||e.showAddToPlaylist)&&o()(j.a,{isOpen:c,serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:e.metadataItemEntityID,onModalClose:this.onAddToPlaylistClose}),o()(O.a,{isOpen:s,mediaItems:e.mediaItems,onCancel:this.onPlayVersionCancel,onItemSelect:this.onPlayVersionSelect}),o()(P.a,{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:e.metadataItemEntityID,isOpen:l,onModalClose:this.onSettingsClose}))},t
}(f.Component);t.a=A},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(y.default)("Play Version"),metricsPage:f.P},n),t.map(function(e,t){var n=[];if(e.bitrate&&n.push(Object(m.default)(e.bitrate)),e.videoResolution){var i=Object(v.a)(e),r=i?i.scanType:null;n.push(Object(g.default)(e.videoResolution,r))}var a=!!e.title,o=n.length>0;return s()(I.a,{value:t
},t,a?e.title:null,a&&o?S:null,o?n.join(", "):null,a||o?null:Object(y.default)("Unknown"))}))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(72),f=n(30),v=n(309),g=n(369),m=n(443),y=n(3),b=n(758),I=n(759),S=s()(h.b,{});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(){
return Object(v.createSelector)(Object(g.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(m.a)(function(){e(Object(y.updateMetadataSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,data:n}))})},onClearError:function(){
e(Object(y.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(5),g=(n.n(v),n(22)),m=n(35),y=n(167),b=n(2555),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(b.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()(h.b,{className:C.a.form,onSubmit:r},void 0,s()(S.a,{onModalClose:o},void 0,s()(m.a,{},void 0,Object(y.default)("Settings")),n&&s()(b.a,{
errorMessage:Object(y.default)("There was an error saving the settings")}),s()(f.a,{},void 0,i.map(function(e){return u.a.createElement(I.a,a()({key:e.id},e))})),s()(v.a,{},void 0,s()(g.a,{},void 0,s()(d.a,{onPress:o},void 0,Object(y.default)("Cancel")),s()(p.a,{kind:M.b.PRIMARY,type:"submit",isSpinning:t},void 0,Object(y.default)("Save"))))))}var r=n(6),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(42),p=n(716),h=n(181),f=n(59),v=n(82),g=n(112),m=n(78),y=n(3),b=n(191),I=n(458),S=n(95),M=n(23),D=n(2556),C=n.n(D);t.a=i},function(e,t){e.exports={form:"SettingsModalContent-form-3-N4q"}},function(e,t,n){"use strict";function i(e,t){return{onTitleChange:function(t){e(b.e({title:t}))},onDestinationSelect:function(t){var n=t.serverEntityID,i=t.providerEntityID;e(b.g({serverEntityID:n,providerEntityID:i}))},dispatchInitAddToPlaylistModal:function(){e(b.f({
serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metadataListEntityID:t.metadataListEntityID,playQueueID:t.playQueueID,smart:t.smart}))},dispatchClearAddToPlaylistModal:function(){e(b.c())},dispatchCreatePlaylist:function(){e(b.d())},dispatchAddToPlaylist:function(t){e(b.a({playlistID:t}))}}}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),
n(1100)),I=n(2561),S=Object(y.createSelector)(function(e){return e.ui.addToPlaylistModal},function(e){return{serverEntityID:e.server,providerEntityID:e.provider,metadataListEntityID:e.playlists,title:e.title,playlistType:e.type,isUpdating:e.isUpdating,hasError:!!e.error}}),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.onCreate=function(){i.props.dispatchCreatePlaylist()
},i.onAdd=function(e){i.props.dispatchAddToPlaylist(e)},r=n,d()(i,r)}return h()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchInitAddToPlaylistModal()},t.prototype.componentWillUnmount=function(){this.props.dispatchClearAddToPlaylistModal()},t.prototype.render=function(){var e=this.props,t=(e.dispatchInitAddToPlaylistModal,e.dispatchClearAddToPlaylistModal,e.dispatchCreatePlaylist,e.dispatchAddToPlaylist,
s()(e,["dispatchInitAddToPlaylistModal","dispatchClearAddToPlaylistModal","dispatchCreatePlaylist","dispatchAddToPlaylist"]));return g.a.createElement(I.a,a()({onCreatePress:this.onCreate,onPlaylistSelect:this.onAdd},t))},t}(v.Component);t.a=Object(m.b)(S,i)(M)},function(e,t,n){"use strict";function i(e){
var t=e.providerModel,n=e.itemProviderModel,i=e.metadataItemModel,c=e.metadataListModel,u=e.multiSelectModel,d=e.playQueueModel,p=e.smart,h=e.readOnly,f=u&&u.get("activeSelectionItems").pluck("model"),v=d?d.get("type"):Object(s.a)({metadataItemModel:i,metadataListModel:c,metadataItemModels:f}),g=t&&t.get("features"),m=g&&g.get(a.b.PLAYLIST),y=m&&m.get("key"),b={type:Object(l.q)(l.i).id,playlistType:v,smart:p?1:0,readOnly:h?1:0},I=y&&Object(r.join)(y,b),S={playlistType:v,containerKey:I}
;return d||(S.uri=Object(o.a)({providerFeatureType:a.b.PLAYLIST,providerModel:t,itemProviderModel:n,metadataItemModel:i,metadataListModel:c,metadataItemModels:f})),S}t.a=i;var r=n(19),a=n(60),o=n(2559),s=n(377),l=n(26)},function(e,t,n){"use strict";function i(e){if(e){if(e.some(function(e){return!!e.get("source")}))return void a.a.warn("[Playlists] failed to queue items multiple with sources");return"/library/metadata/"+e.map(function(e){return e.get("ratingKey")}).join(",")}}function r(e){
var t=e.providerFeatureType,n=e.providerModel,r=e.itemProviderModel,a=e.metadataItemModel,u=e.metadataListModel,d=e.metadataItemModels,p=n.get("features"),h=p&&p.get(t);if(!!h&&h.get("flavor")===s.c.UNIVERSAL){var f=a&&a.get("source"),v=f?a.get("source"):Object(c.a)(r.server.get("machineIdentifier"),r.get("identifier")),g=a&&a.get("key")||u&&u.get("containerKey")||i(d);return o.join([v,g])}return l.a.uri(a||u||d,{items:d})}t.a=r;var a=n(29),o=n(19),s=n(60),l=n(237),c=n(992)},function(e,t,n){
"use strict";function i(e){var t=e.providerModel,n=e.type,i=e.title,r=e.smart,l=void 0===r?0:r,c=e.playlistID,u=e.playQueueID,d=e.uri,p={uri:d,playQueueID:u};c||(p.title=i,p.smart=l?1:0,p.type=n);var h=t.get("features"),f=h&&h.get(s.b.PLAYLIST),v=f&&f.get("key"),g=o.join([v,c&&c+"/items"],p),m=c?"PUT":"POST",y=t.getXHROptions(g,{type:m});return a.a.ajax(y)}t.a=i;var r=n(13),a=n.n(r),o=n(19),s=n(60)},function(e,t,n){"use strict";function i(e){var t=e.playlistType,n=e.smart
;return"photo"===t?n?Object(I.default)("Create Album"):Object(I.default)("Add to Album"):n?Object(I.default)("Create Playlist"):Object(I.default)("Add to Playlist")}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(181)),v=n(192),g=n(59),m=n(82),y=n(78),b=n(49),I=n(3),S=n(124),M=n(191),D=n(95),C=n(127),O=n(2563),P=n(2567),j=n(2576),T=n.n(j),w=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),
t.prototype.componentDidUpdate=function(e){this.props.isUpdating||!e.isUpdating||this.props.hasError||this.props.onModalClose()},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,o=e.metadataListEntityID,s=e.title,l=e.smart,c=e.hasError,u=e.isUpdating,d=e.onModalClose,p=e.onDestinationSelect,h=e.onCreatePress,j=e.onPlaylistSelect,w=e.onTitleChange;return a()(D.a,{onModalClose:d
},void 0,a()(y.a,{},void 0,i(this.props)),!l&&t&&n&&a()(O.a,{className:T.a.listModalSubheader,serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,onDestinationSelect:p}),c&&a()(M.a,{errorMessage:Object(I.default)("Something went wrong. Make sure the destination is available and try again.")}),!l&&a()(g.a,{innerClassName:T.a.listModalInnerBody},void 0,o&&a()(C.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:o,component:P.a,initialSize:20,onPlaylistSelect:j})),a()(m.a,{
className:T.a.listModalFooter},void 0,a()(f.b,{className:T.a.createForm,onSubmit:h},void 0,a()(v.a,{focusOnMount:!0,"data-autofocus":!0,selectTextOnFocus:!0,name:"title",value:s,onChange:w}),a()(S.a,{className:T.a.createButton,type:"submit",kind:b.PRIMARY,isDisabled:!s,isSpinning:u},void 0,Object(I.default)("Create")))))},t}(h.Component);t.a=w},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.metadataLists});t.a=a},function(e,t,n){
"use strict";function i(){return Object(a.createSelector)(l.a,s.a,h,function(e,t,n){var i=n.map(function(e){return{name:e.server.isCloud?Object(u.default)("TIDAL"):e.server.friendlyName,serverEntityID:e.server.entityID,providerEntityID:e.provider.entityID}});return{destination:i.find(function(n){var i=n.serverEntityID,r=n.providerEntityID;return i===e.entityID&&r===t.entityID}),destinations:i}})}var r=n(11),a=n(5),o=(n.n(a),
n(60)),s=n(37),l=n(50),c=n(41),u=n(3),d=n(466),p=n(2564),h=Object(a.createSelector)(d.a,l.c,s.c,function(e,t,n){return e.filter(function(e){var i=e.server,r=e.provider;if(!r||!r.features)return!1;var a=t&&i.entityID===t.entityID,s=n&&r.entityID===n.entityID;return!(!a||!s)||(!i||!i.isShared&&!i.isCloud)&&((r.identifier===c.e||r.identifier===c.f||r.identifier===c.d)&&r.features.find(function(e){return e.type===o.b.PLAYLIST&&e.flavor===o.c.UNIVERSAL}))})}),f=Object(r.b)(i)(p.a);t.a=f
},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(273)),f=n(45),v=n(2565),g=n(23),m=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMenuButtonPress=function(){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._menuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.className,n=e.destination,i=e.destinations,a=e.onDestinationSelect,o=this.state.isMenuOpen;return!i||i.length<2?null:r()("div",{className:t},void 0,r()(h.a,{id:this._menuButtonID,direction:o?g.a.UP:g.a.DOWN,onPress:this.onMenuButtonPress},void 0,n.name),r()(v.a,{target:this._menuButtonID,isOpen:o,destinations:i,onMenuClose:this.onMenuClose,onDestinationSelect:a}))},t}(p.Component);t.a=m},function(e,t,n){"use strict";function i(e){
var t=e.target,n=e.isOpen,i=e.destination,r=e.destinations,o=e.onMenuClose,s=e.onDestinationSelect;return a()(l.a,{target:t,isOpen:n,size:u.e.LARGE,onMenuClose:o},void 0,r.map(function(e,t){return a()(c.a,{destination:e,isSelected:e===i,onMenuClose:o,onDestinationSelect:s},"playlist-destination-"+t)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(56)),c=n(2566),u=n(23);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(103)),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.onDestinationSelect(i.props.destination),i.props.onMenuClose()},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.destination,n=e.isSelected;return r()(h.a,{
isSelected:n,onPress:this.onPress},void 0,t.name)},t}(p.Component);t.a=f},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(12),o=n.n(a),s=n(6),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(209),b=n(31),I=n(2568),S=n(335),M=n(2575),D=n.n(M),C=Object(S.a)(50),O=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.renderPlaylistItem=function(e){var t=i.props,n=t.serverEntityID,r=t.providerEntityID,a=t.onPlaylistSelect;return m.a.createElement(I.a,l()({},e,{className:D.a.cell,serverEntityID:n,providerEntityID:r,onSelect:a}))},r=n,p()(i,r)}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.metadataItemEntityIDs,n=e.isPopulated,i=e.totalSize,a=o()(e,["metadataItemEntityIDs","isPopulated","totalSize"]);return n?m.a.createElement(y.a,l()({className:D.a.content,
scrollerClassName:D.a.contentScroller,keyPropName:"metadataItemEntityID",items:t,size:i,layout:C,cellRenderer:this.renderPlaylistItem},a)):r()(b.a,{className:D.a.spinner})},t}(g.Component);t.a=O},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return e?{isLoading:!1,playlistID:e.ratingKey,title:e.title,thumb:e.composite||e.thumb||""}:{isLoading:!0}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(2569),l=Object(r.b)(i)(s.a);t.a=l},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(20)),f=n(87),v=n(279),g=n(247),m=n(2574),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.onPress=function(){i.props.onSelect(i.props.playlistID)},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.providerEntityID,a=e.title,o=e.thumb,s=e.isLoading,l=e.cellIndex,c=e.cellX,u=e.cellY,d=e.cellWidth,p=e.cellHeight;return r()(f.a,{className:t,cellX:c,cellY:u,cellWidth:d,cellHeight:p},void 0,!s&&r()(h.a,{className:(y.a.container||"")+" "+(l%2&&y.a.alternate||""||""),onPress:this.onPress},void 0,r()(v.a,{className:y.a.card,serverEntityID:n,providerEntityID:i,component:g.a,width:40,height:40,url:o}),r()("span",{className:y.a.title},void 0,a)))
},t}(p.Component);t.a=b},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){switch(e){case c.c:return"plex-icon-radio-560";case c.b:return"plex-icon-folder-560"}}function r(e){var t=e.className,n=e.type,r=e.width,a=e.height,s=e.icon,l=i(s)||u.a[n];if(!l)return null;var c={fontSize:Math.max(14,Math.min(Math.round(r/4),42)),lineHeight:a+"px"};return o()(d.a,{name:l,
className:t,style:c})}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(761)),u=n(467),d=n(25);t.a=r},function(e,t){e.exports={placeholderIcon:"MetadataPosterCardIcon-placeholderIcon-2P76z"}},function(e,t){e.exports={alternate:"PlaylistListItem-alternate-3LodV",container:"PlaylistListItem-container-1zf1-",card:"PlaylistListItem-card-1lyuE PosterCard-card-1rN9g",title:"PlaylistListItem-title-2aEtH"}},function(e,t){e.exports={spinner:"PlaylistList-spinner-35vMZ",
content:"PlaylistList-content-BhpSb",contentScroller:"PlaylistList-contentScroller-10slM",cell:"PlaylistList-cell-2Crv3"}},function(e,t){e.exports={listModalSubheader:"AddToPlaylistModalContent-listModalSubheader-2iqJk",listModalInnerBody:"AddToPlaylistModalContent-listModalInnerBody-3Lr83",listModalFooter:"AddToPlaylistModalContent-listModalFooter-1urVO",createForm:"AddToPlaylistModalContent-createForm-7H1yU",createButton:"AddToPlaylistModalContent-createButton-19CeH"}},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(402));t.a=i},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(402));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(3)),c=n(2580);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(3));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(3)),c=n(26);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(2583));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(266));t.a=i},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(5),o=(n.n(a),n(22)),s=n(1107);t.a=Object(r.b)(i)(s.a)},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(3)),c=n(565);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(72)),c=n(402),u=a()(l.b,{});t.a=i},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(766),s=n(2593),l=n.n(s);i.defaultProps={className:l.a.card},t.a=i},function(e,t,n){"use strict";function i(e){return a()("svg",{className:e.className,viewBox:"0 0 560 560",xmlns:"http://www.w3.org/2000/svg"},void 0,l)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),a()("path",{d:"M216 170l190.5 110L216 390z"}));t.a=i},function(e,t){e.exports={playButton:"PlayButton-playButton-3WX8X",playCircle:"PlayButton-playCircle-3Evfd"}},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:"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={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(6),a=n.n(r),o=n(0),s=n.n(o),l=n(767),c=n(2599),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()(p.a,{serverEntityID:t,providerEntityID:n,url:f,width:v,height:g,transitionProps:m,
backgroundPosition:"center center",allowSizeBrackets:!0,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.f.get(s),M=S&&S.typeString,D=i(M);return o()(h.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(130)),u=n(399),d=n(2596),p=n(760),h=n(1104);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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2597),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,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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(2601),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){
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(u.a)(n,i,m,g),b={director:Object(c.default)("by"),actor:Object(c.default)("with"),section:Object(c.default)("in"),
autotag:Object(c.default)("tagged"),place:Object(c.default)("in")};return y?a()("span",{className:t},void 0,b[o]," ",a()(l.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(20)),c=n(3),u=(n(88),n(125),n(133));t.a=i},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(5),u=(n.n(c),n(400)),d=n(2604);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){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){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(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(332)),f=n(273),v=n(207),g=n(45),m=n(226),y=n(49),b=n(3),I=n(555),S=n(2610),M=n(2617),D=n.n(M),C=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onButtonPress=function(e){r.setState({
isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(e){r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._buttonID=Object(g.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.tooltipClassName,i=e.serverEntityID,a=e.userThumb,o=e.badgeCount;return r()(p.Fragment,{},void 0,r()(v.a,{className:t,tooltipClassName:n,id:this._buttonID,component:f.a,isSelected:!1,tooltip:this.state.isMenuOpen?null:Object(b.default)("Account"),
direction:this.state.isMenuOpen?m.UP:m.DOWN,onPress:this.onButtonPress},void 0,r()("div",{className:D.a.avatarContainer},void 0,r()("div",{className:(D.a.overlay||"")+" "+(this.state.isMenuOpen&&D.a.isMenuOpen||""||"")}),r()(I.a,{serverEntityID:i,width:30,height:30,url:a})),r()(h.a,{className:D.a.badge,kind:y.PRIMARY},void 0,o>0?o:null)),r()(S.a,{isOpen:this.state.isMenuOpen,target:this._buttonID,onMenuClose:this.onMenuClose}))},t}(p.Component);C.defaultProps={className:D.a.button,
tooltipClassName:D.a.tooltip},t.a=C},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(h.a,u.a,p.a,d.a,function(e,t,n,i){return{username:e.title,isSignedIn:e.signedIn,isRestricted:e.isRestricted,hasHome:!!e.home,isFullUser:e.isFullUser,announcementsCount:n.length,friendInvitesCount:i.length,appsURL:t?t.appsUrl:"https://plex.tv/downloads",helpURL:t?t.helpUrl:"https://support.plex.tv/articles/"}})}function r(e,t){return{onUsersPress:function(e){e.preventDefault(),
s.a.trigger("navigate","users")},onSwitchUserPress:function(t){setTimeout(function(){e(Object(c.a)())})},onSignInPress:function(e){e.preventDefault(),s.a.trigger("navigate","login")},onSignOutPress:function(e){e.preventDefault(),s.a.trigger("navigate","logout")},onKeyboardShortcutPress:function(e){e.preventDefault();var t=Object(l.c)("keyboardShortcuts");s.a.trigger("show:modal",new f.a({shortcuts:t.shortcuts}))}}}var a=n(11),o=n(5),s=(n.n(o),
n(18)),l=n(15),c=n(685),u=n(394),d=n(1079),p=n(1080),h=n(154),f=n(1112),v=n(2612),g=Object(a.b)(i,r)(v.a);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 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 n,i="";return i+=' <li> <span class="keyboard-shortcuts-keys"> ',n=r.each.call(e,e&&e.keys,{hash:{},inverse:m.noop,fn:m.program(3,c,t),data:t}),(n||0===n)&&(i+=n),i+=' </span> <span class="keyboard-shortcuts-label text-muted">'+g((n=e&&e.label,typeof n===v?n.apply(e):n))+"</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(4)).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";function i(e){
var t=e.isOpen,n=e.target,i=e.options,r=e.username,o=e.isSignedIn,s=e.hasHome,p=e.isFullUser,g=e.announcementsCount,m=e.friendInvitesCount,y=e.appsURL,b=e.helpURL,I=e.onUsersPress,S=e.onSwitchUserPress,M=e.onSignInPress,D=e.onSignOutPress,C=e.onKeyboardShortcutPress,O=e.onMenuClose;return a()(c.a,{isOpen:t,target:n,options:i,onMenuClose:O},void 0,r?a()(u.a,{},void 0,r):null,o?a()(d.a,{to:"#!/settings/account"},void 0,Object(h.default)("Account")):null,o?a()(l.a,{badgeLabel:m>0?m:null,onPress:I
},void 0,Object(h.default)("Users")):null,o?f:null,a()(l.a,{to:"#!/announcements",badgeLabel:g>0?g:null},void 0,Object(h.default)("Announcements")),a()(d.a,{to:y,target:"_self"},void 0,Object(h.default)("Get Plex apps")),a()(d.a,{to:b,target:"_self"},void 0,Object(h.default)("Help")),a()(d.a,{onPress:C},void 0,Object(h.default)("Keyboard Shortcuts")),v,s?a()(d.a,{onPress:S},void 0,Object(h.default)("Switch User...")):null,o?null:a()(d.a,{onPress:M
},void 0,Object(h.default)("Sign In")),o&&p?a()(d.a,{onPress:D},void 0,Object(h.default)("Sign Out")):null)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(2613)),c=n(56),u=n(2615),d=n(101),p=n(243),h=n(3),f=a()(p.a,{}),v=a()(p.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.badgeClassName,i=e.badgeLabel,r=e.badgeKind,o=s()(e,["children","badgeClassName","badgeLabel","badgeKind"]);return u.a.createElement(h.a,o,t,a()(d.a,{className:n,kind:r},void 0,i))}
var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(332),p=n(49),h=n(101),f=n(2614),v=n.n(f);i.defaultProps={className:v.a.badgeMenuItem,badgeClassName:v.a.badge,badgeKind:p.PRIMARY},t.a=i},function(e,t){e.exports={badgeMenuItem:"BadgeMenuItem-badgeMenuItem-3GW7S MenuItem-menuItem-1s02m",badge:"BadgeMenuItem-badge-3CgtT Badge-badge-21NQR"}},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(2616)),c=n.n(l);i.defaultProps={className:c.a.menuHeader},t.a=i},function(e,t){e.exports={menuHeader:"MenuHeader-menuHeader-1zqco"}},function(e,t){e.exports={button:"NavBarAccountButton-button-1Y4ek DisclosureArrowButton-disclosureArrowButton-11LSb",badge:"NavBarAccountButton-badge-2D07a Badge-badge-21NQR",
tooltip:"NavBarAccountButton-tooltip-MBMW8 Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt",avatarContainer:"NavBarAccountButton-avatarContainer-2fU5S",overlay:"NavBarAccountButton-overlay-2BHPA",isMenuOpen:"NavBarAccountButton-isMenuOpen-2kMP7"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(d,h,f,function(e,t,n){return{ownedServerEntityIDs:e,showActivityButton:!!e.length,
hasSessions:t.sessionsCount>0,hasConversions:t.backgroundTranscodeJobsCount>0,hasActivities:t.activitiesCount>0,hasLibraryRefreshing:n>0,activityButtonCount:t.sessionsCount+t.backgroundTranscodeJobsCount}})}var r=n(11),a=n(5),o=(n.n(a),n(156)),s=n(549),l=n(1113),c=n(1114),u=n(2619),d=Object(a.createSelector)(l.a,function(e){return e.map(function(e){return e.entityID})}),p=Object(o.a)(Object(a.createSelector)(l.a,function(e){return e.map(function(e){return e.desktop})}),function(e){return e
}),h=Object(a.createSelector)(p,function(e){return e.reduce(function(e,t){var n=t.sessions,i=void 0===n?[]:n,r=t.backgroundTranscodeJobs,a=void 0===r?[]:r,o=t.activities,s=void 0===o?[]:o;return e.sessionsCount+=i.length,e.backgroundTranscodeJobsCount+=a.length,e.activitiesCount+=s.filter(function(e){return!!c.a[e.type]}).length,e},{sessionsCount:0,backgroundTranscodeJobsCount:0,activitiesCount:0})}),f=Object(a.createSelector)(p,s.a,function(e,t){return e.reduce(function(e,n){
return e+=n.libraries.filter(function(e){var n=t[e];return!!n&&n.refreshing}).length},0)});t.a=Object(r.b)(i)(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(45)),f=n(3),v=n(2620),g=n(2625),m=n(1115),y=n(2628),b=n.n(y),I=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onActivityPress=function(e){r.setState({isMenuOpen:!r.state.isMenuOpen})},r.onMenuClose=function(){
r.setState({isMenuOpen:!1})},r.state={isMenuOpen:!1},r._buttonID=Object(h.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.iconClassName,i=e.labelClassName,a=e.showActivityButton,o=e.ownedServerEntityIDs,s=e.hasSessions,l=e.hasConversions,c=e.hasActivities,u=e.hasLibraryRefreshing,d=e.activityButtonCount;if(!a)return null;var h=s||l,y=c||u;return r()(p.Fragment,{},void 0,r()(m.a,{id:this._buttonID,className:(t||"")+" "+(h&&b.a.isHighlighted||""||""),
iconClassName:n,labelClassName:i,iconProps:{isActive:y},iconComponent:g.a,icon:"plex-icon-navbar-activity-560",title:Object(f.default)("Activity"),label:d?String(d):null,onPress:this.onActivityPress}),r()(v.a,{isOpen:this.state.isMenuOpen,target:this._buttonID,hasSessions:s,hasConversions:l,hasActivities:c,hasLibraryRefreshing:u,ownedServerEntityIDs:o,onMenuClose:this.onMenuClose}))},t}(p.Component);I.defaultProps={iconClassName:b.a.activityIcon,labelClassName:b.a.label},t.a=I},function(e,t,n){
"use strict";function i(e){return o()("div",{className:h.a.emptyMessage},void 0,Object(u.default)("No server activity"))}function r(e){var t=e.isOpen,n=e.target,i=e.ownedServerEntityIDs,r=e.hasSessions,a=e.hasConversions,s=e.hasActivities,l=e.hasLibraryRefreshing,u=e.onMenuClose,p=!(r||a||s||l);return o()(c.a,{className:(h.a.menu||"")+" "+((p?h.a.empty:h.a.wide)||""),isOpen:t,target:n,options:f,onMenuClose:u},void 0,p?v:i.map(function(e){return o()(d.a,{serverEntityID:e},e)}))}
var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(56)),u=n(3),d=n(2621),p=n(2624),h=n.n(p),f={placement:"bottom-end"},v=o()(i,{});t.a=r},function(e,t,n){"use strict";function i(){return Object(u.createSelector)(Object(p.a)(),function(e){return e.sessions?e.sessions:[]})}function r(){return Object(u.createSelector)(Object(p.a)(),function(e){return e.backgroundTranscodeJobs?e.backgroundTranscodeJobs:[]})}function a(){return Object(u.createSelector)(Object(p.a)(),function(e){
return e.activities?e.activities:[]})}function o(){return Object(u.createSelector)(Object(p.a)(),function(e){return e.libraries?e.libraries:[]})}function s(){return Object(u.createSelector)(o(),d.a,function(e,t){return e.reduce(function(e,n){var i=t[n];return i.refreshing&&e.push(i),e},[])})}function l(){return Object(u.createSelector)(Object(h.a)(),i(),r(),a(),s(),function(e,t,n,i,r){return{friendlyName:e.friendlyName,machineIdentifier:e.machineIdentifier,sessions:t,backgroundTranscodeJobs:n,
activities:i,libraries:r}})}var c=n(11),u=n(5),d=(n.n(u),n(549)),p=n(1043),h=n(34),f=n(2622),v=Object(c.b)(l)(f.a);t.a=v},function(e,t,n){"use strict";function i(e){var t=e.to,n=e.label,i=e.indicator,r=e.onPress;return s()(u.a,{className:y.a.splitButton,to:t,onPress:r},void 0,s()("span",{},void 0,n),s()("span",{className:y.a.statusButtonIndicator},void 0,i))}function r(e){var t=e.title,n=e.subtitle,i=e.progress,r=e.isPostProcessing;return s()("div",{className:y.a.splitButton},void 0,s()("span",{
className:y.a.activityTitleContainer},void 0,s()("span",{className:y.a.activityTitle,title:t},void 0,t,n?":":null),n?s()("span",{className:y.a.activitySubtitle,title:n},void 0,n):null),s()("span",{},void 0,null==i||r?s()(g.a,{size:d.SMALL}):s()(f.a,{progress:i,size:18,lineWidth:2,showProgressText:!1})))}function a(e){var t=e.friendlyName,n=e.machineIdentifier,a=e.sessions,o=e.backgroundTranscodeJobs,l=e.activities,c=e.libraries,u=e.onPress
;return a.length||o.length||l.length||c.length?s()("div",{className:y.a.statusContainer},void 0,s()("div",{className:y.a.statusTitle},void 0,t),a.length?s()(i,{to:"#!/settings/server/"+n+"/status/now-playing",label:Object(h.default)("Now Playing"),indicator:""+a.length,onPress:u}):null,o.length?s()(i,{to:"#!/settings/server/"+n+"/status/conversion",label:Object(h.default)("Conversions"),indicator:""+o.length,onPress:u}):null,l.length?l.map(function(e){
var t=e.uuid,n=e.type,i=e.title,a=e.subtitle,o=e.progress,l=e.Context,c=void 0===l?{}:l;return v.a[n]?s()(r,{title:i,subtitle:a,progress:o,isPostProcessing:c.status===p.b.POST_PROCESSING},t):null}):null,c.length?c.map(function(e){var t=e.uuid,n=e.title;return s()(r,{title:Object(h.default)("Scanning library files"),subtitle:n},t)}):null):null}var o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(101)),d=n(52),p=n(567),h=n(3),f=n(1027),v=n(1114),g=n(31),m=n(2623),y=n.n(m);t.a=a},function(e,t){
e.exports={statusContainer:"NavBarActivityMenuStatusItem-statusContainer-Ml8vj",splitButton:"NavBarActivityMenuStatusItem-splitButton-3DXXY MenuItem-menuItem-1s02m",statusButtonIndicator:"NavBarActivityMenuStatusItem-statusButtonIndicator-3D2d1",statusTitle:"NavBarActivityMenuStatusItem-statusTitle-2hIH6",activityTitleContainer:"NavBarActivityMenuStatusItem-activityTitleContainer-3mGhe",activityTitle:"NavBarActivityMenuStatusItem-activityTitle-2lqgR",
activitySubtitle:"NavBarActivityMenuStatusItem-activitySubtitle-3dSlx"}},function(e,t){e.exports={menu:"NavBarActivityMenu-menu-1AVWx MenuContainer-menu-2OAQT",emptyMessage:"NavBarActivityMenu-emptyMessage-cJRlg",wide:"NavBarActivityMenu-wide-JMy68",empty:"NavBarActivityMenu-empty-3wIz1 MenuContainer-medium-3u4Aw"}},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.name,i=e.isActive;return a()("span",{className:t},void 0,i?a()(c.a,{className:d.a.activityIndicator}):null,a()(l.a,{
className:d.a.icon,name:n}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(25)),c=n(31),u=n(2626),d=n.n(u);i.defaultProps={className:d.a.iconContainer,iconClassName:d.a.icon,name:"plex-icon-navbar-activity-560"},t.a=i},function(e,t){e.exports={iconContainer:"NavBarActivityIcon-iconContainer-24xhX",icon:"NavBarActivityIcon-icon-VJ4m7",activityIndicator:"NavBarActivityIcon-activityIndicator-3asEG Spinner-spinner-Niere spin-spin-2kLwt"}},function(e,t){e.exports={
button:"NavBarIconButton-button-eR0v0 IconButton-button-9An-7",icon:"NavBarIconButton-icon-2gdVP",tooltip:"NavBarIconButton-tooltip-2RzDy Tooltip-bottomCenter-2yj43 Tooltip-tooltip-9TKmA Tooltip-tooltipArrow-3GUCr Tooltip-tooltipTopArrow-NjH0D Tooltip-tooltipCenterAlignArrow-35uHt"}},function(e,t){e.exports={activityIcon:"NavBarActivityButton-activityIcon-1Db2G NavBarActivityIcon-iconContainer-24xhX",label:"NavBarActivityButton-label-2ZN0g",
isHighlighted:"NavBarActivityButton-isHighlighted-27qlk"}},function(e,t,n){"use strict";var i=n(6),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(20),m=n(123),y=n(3),b=n(450),I=n(2630),S=n.n(I),M=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onButtonPress=function(e){r.setState({isPlexPassModalOpen:!0})},r.onModalClose=function(e){r.setState({isPlexPassModalOpen:!1})},r.state={
isPlexPassModalOpen:!1},r}return p()(t,e),t.prototype.render=function(){return o()(f.Fragment,{},void 0,v.a.createElement(g.a,r()({},this.props,{onPress:this.onButtonPress}),Object(y.default)("Go Premium")),o()(b.a,{metricsProperties:{context:m.f},isOpen:this.state.isPlexPassModalOpen,onModalClose:this.onModalClose}))},t}(f.Component);M.defaultProps={className:S.a.button},t.a=M},function(e,t){e.exports={button:"NavBarPlexPassButton-button-2zlgP Link-link-2n0yJ"}},function(e,t){e.exports={
container:"NavBar-container-1T0BJ",side:"NavBar-side-2kZrH",button:"NavBar-button-diriI NavBarIconButton-button-eR0v0 IconButton-button-9An-7",buttonSeparator:"NavBar-buttonSeparator-1ZbV4",accountButton:"NavBar-accountButton-3EEZi NavBarAccountButton-button-1Y4ek DisclosureArrowButton-disclosureArrowButton-11LSb",plexPassButton:"NavBar-plexPassButton-wVK4v NavBarPlexPassButton-button-2zlgP Link-link-2n0yJ",left:"NavBar-left-2SrTG NavBar-side-2kZrH",right:"NavBar-right-2ZzDE NavBar-side-2kZrH"}
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(99)),s=n(46),l=n(2633),c=n(1240),u=n(3112),d=n.n(u),p=s.a.extend({className:d.a.container,component:function(){return r()(c.a,{component:l.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(h.a)(),Object(u.a)(),Object(d.a)(),Object(p.a)(),b,function(e,t,n,i,r,a){var o=void 0,s=void 0,l=void 0;if(i){var c=Object(m.q)(i.type)
;o=c&&c.mediaType,s=i.subtype,l=i.vast}var u=o===g.a,d=o===g.d;return i&&d&&a&&(l=v.a),{isMusic:u,isVideo:d,isPlayQueueLoading:t.isPlayQueueLoading,isMediaLoading:t.isMediaLoading,isPostPlayLoading:t.isPostPlayLoading,isBuffering:t.isBuffering,isSettingsVisible:t.isSettingsVisible,isChaptersVisible:t.isChaptersVisible,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:o,currentSubType:s,confirmPlaybackPayload:t.confirmPlaybackPayload,confirmOffsetPayload:t.confirmOffsetPayload,confirmRemoteToLocal:t.confirmRemoteToLocal,confirmLocalToRemote:t.confirmLocalToRemote,vast:l}})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),
n(280)),d=n(128),p=n(233),h=n(79),f=n(2635),v=n(2636),g=n(58),m=n(26),y=n(2637),b=Object(c.createSelector)(f.a,function(e){return e.debugHasForcedVideoAds}),I=Object(l.b)(i)(y.a);I.propTypes=a()({},I.propTypes,{isMiniPlayer:s.a.bool,playerType:s.a.string.isRequired}),t.a=I},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";function i(e){return e.deviceSettings}t.a=i},function(e,t,n){"use strict";var i={
url:"https://search.spotxchange.com/vast/2.0/85394?VPI=MP4&player_height=1080&player_width=1920&app%5Bname%5D=Plex&device%5Bdevicetype%5D=7&app%5Bbundle%5D=Chrome.Plex&device%5Bmake%5D=OSX&device%5Bmodel%5D=Plex%2520Web%2520(Chrome)",UrlTemplateFilter:[{template:"[referrer_url]",value:"http://www.watchup.com"},{template:"[description_url]",value:"Watchup"}]};t.a=i},function(e,t,n){"use strict";function i(e){return l.a.createElement(d.a,a()({},e,{playerType:c.a,mediaComponent:e.isMusic?u.a:p.b,
playerComponent:e.isMiniPlayer?f.a:h.a}))}var r=n(6),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(99),u=n(2638),d=n(1131),p=n(777),h=n(2698),f=n(3109);t.a=i},function(e,t,n){"use strict";function i(e){return s.a.createElement(u.a,a()({},e,{type:l.a,allowRecycleElement:!0}))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(1117),c=n(1118),u=n(1120);t.a=Object(c.a)(i)},function(e,t,n){"use strict";function i(){
return Object(b.createSelector)(Object(A.a)(),Object(T.a)(),Object(N.a)(),Object(E.a)(),Object(w.a)(),Object(x.a)(),Object(j.a)(),L.a,function(e,t,n,i,r,a,o,s){var l=e.playQueue,c=l.playQueueSelectedItemOffset,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:l.length,isLastPlayQueueItem:c+1===l.length,playbackTime:e.playbackTime,
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,bufferingDetectionLimit:S.a.get("bufferingDetectionLimit")};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(R.a)(n.version,M.a.decisionEndpoint),
d.hasBurnedSubtitles=a.selectedSubtitlesStream&&0!==a.selectedSubtitlesStream.id&&!t.subtitlesUrl),d.isDecisionDirectPlay&&"dash"===d.decisionProtocol&&(d.bufferingGoal=10,d.defaultBandwidthEstimate=s),d})}function r(e,t,n){var i=t;return f()({},n,e,i)}var a=n(12),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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),
n(29)),S=n(57),M=n(175),D=n(153),C=n(470),O=n(69),P=n(136),j=n(212),T=n(280),w=n(568),E=n(128),x=n(1128),A=n(79),N=n(774),L=n(2655),k=n(99),_=n(570),R=n(316),z=n(58),U=n(2656),B={dispatchMakeDecision:C.a,dispatchMakeNextDecision:C.b,dispatchRemoveDecision:C.d,dispatchRetryDecision:C.e,dispatchUpdatePlayerDuration:P.y,dispatchUpdatePlayerPosition:P.A,dispatchUpdatePlayerSeekRange:P.B,dispatchUpdatePlayerBuffering:P.x,dispatchPause:P.j,dispatchPlay:P.k,dispatchUpdatePlayerError:P.z,
dispatchSendTimeline:P.n,dispatchTickPlayer:P.t,dispatchShowPostPlay:D.q,dispatchPlayNextItem:D.h,dispatchEndPlayback:O.f},F=!0,V=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.onPlay=function(){i.props.dispatchPlay({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;F&&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
})):F&&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}})):F&&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;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||c?s===z.d&&t===k.a&&a>=r?m({playerType:t}):y({playerType:t,isApplicationInitiated:!0}):b({playerType:t})},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){this._itemStarting(this.props),
this.props.mediaType===z.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,S=u!==e.durationSeconds;if(m&&!v&&!g){var M=null!=f?1e3*f:1e3*c
;return void this._itemRestarting(this.props,{offset:M})}if(v)return this._hasRefreshedPlayQueue=!1,this._hasPreFetched=!1,this._itemStopping(e),this._itemStarting(this.props),void(r===z.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||S)&&(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!==z.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!==z.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.playbackTime,c=e.positionSeconds,u=e.durationSeconds,d=e.isPaused,p=e.decisionMediaIndex,h=e.decisionPartIndex,f=e.decisionPartCount,v=e.dispatchSendTimeline,g=a===z.c,m=d&&!g?_.c:_.d;v({playerType:r,providerEntityID:o,playQueueItemEntityID:s,shouldRefreshPlayQueue:i,options:g?{state:m}:{playbackTime:l,
positionSeconds:c,durationSeconds:u,mediaIndex:p,partIndex:h,partCount:f}})},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:_.e,continuing:i,playbackTime:e.playbackTime,positionSeconds:e.positionSeconds,durationSeconds:e.durationSeconds,mediaIndex:e.decisionMediaIndex,
partIndex:e.decisionPartIndex,partCount:e.decisionPartCount}}),e.mediaType!==z.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(U.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,onPlay:this.onPlay}))},t}(g.Component);V.defaultProps={preFetchSeconds:10,minSecondsForPostPlay:300},t.a=Object(y.b)(i,B,r)(V)},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(6),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(29),u=n(19),d=n(175),p=n(41),h=n(2642),f=n(373),v=n(987),g=n(988),m=n(2643),y=n(1124),b=n(63),I=n(1123),S=n(320),M=n(429),D=n(3),C={getPlayerDecision:function(e){var t=this
;return this.resolvePlayerDecision(e).then(null,function(n){return n.canDirectPlay&&n.generalDecisionCode===h.a?(c.a.warn("[PDE] Forcing transcode;",n.mdeDecisionText),t.resolvePlayerDecision(r()({},e,{allowDirectPlay:!1}))):n})},resolvePlayerDecision:function(e){l.a.defaults(e,{offset:0,minVersionForDASH:d.a.dash,minVersionForStreamingMKV:d.a.streamingMKV,transcoderOptions:{}});var t={playbackSessionID:e.playbackSessionID||Object(M.a)(),transcodeSessionID:e.transcodeSessionID||Object(M.a)(),
offset:e.offset},n=this.populateMedia(t,e);return n=n.then(l.a.bind(function(){return this.resolveMedia(t,e)},this)),n=n.then(function(){return o.a.when(t.url)}),n=n.then(function(e){return t.url=e,t})},populateMedia:function(e,t){var n=o.a.Deferred(),i=l.a.bind(n.resolve,n,e);return t.requireAnalysis&&Object(m.a)(t.item)?t.item.fetch({scope:"player"}).always(i):l.a.defer(i),n.promise()},resolveMedia:function(e,t){var n=l.a.extend({transcodeServer:this.resolveTranscodeServer(t)
},t),i=y.a.getMediaDecision(n);if(n.originalQualityDecisionOptions){var a=y.a.getMediaDecision(r()({},n,n.originalQualityDecisionOptions));i.canPlayOriginalQuality=a.canDirectPlay||a.canDirectStreamVideo}else i.canPlayOriginalQuality=i.canDirectPlay||i.canDirectStreamVideo;var s=i.media,u=o.a.Deferred();return l.a.extend(e,i),s?e.canPlay?"webkit"===s.protocol?(c.a.warn("[PDE] Webkit videos are not supported"),e.redirect=!0,
u.reject(e).promise()):"embed"===s.protocol?(c.a.warn("[PDE] An embed is required"),e.embed=!0,e.part=l.a.first(s.Part),u.reject(e).promise()):this.resolvePart(e,t):(c.a.warn("[PDE] Unable to play item;",e.errorMessage),u.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===S.a.types.VIDEO?r="transcoderVideo":e.type===S.a.types.MUSIC&&(r="transcoderAudio");var a=!i||i.get("identifier")===p.d||i.get("identifier")===p.a;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(v.a)(e.media,t.offset),e.offset=Object(g.a)(e.media,e.part,t.offset)):e.part=l.a.first(e.media.Part),e.media.indirect?this.resolveIndirect(e,t):this.resolveUrls(e,t)},
resolveIndirect:function(e,t){Object(c.a)("[PDE] Resolving indirect item");var n=t.item.resolveIndirect(e.media,e.part),i=l.a.bind(function(){return this.resolveMedia(e,t)},this),r=l.a.bind(function(){return o.a.Deferred().reject(e).promise()},this);return n=n.then(i,r)},resolveUrls:function(e,t){var n=o.a.Deferred();return this.validatePlayerType(e,t)?(this.validateSoftSubtitles(e,t)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,t):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),
c.a.group("[PDE] Player decision"),c.a.info("Player:",e.playerType),c.a.info("Protocol:",e.protocol),c.a.info("Direct Play:",e.canDirectPlay),c.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!==S.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===S.a.types.MUSIC?(e.protocol="http",e.playerType="html",!0):s&&t.hasFlash?(e.protocol="hls",e.playerType="flash",
!0):(e.errorMessage=n?Object(D.default)("Please update Plex Media Server. This feature requires {1} or later.",n):Object(D.default)("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){return e.useSoftSubtitles&&"html"!==e.playerType?(c.a.warn("[PDE] Only the HTML player supports soft subtitles"),!1):!e.useSoftSubtitles||e.canDirectPlay||t.allowDirectStreamVideoWithSoftSubtitles?e.useSoftSubtitles:(c.a.warn("[PDE] Unable to use soft subtitles without direct play"),!1)
},resolveDirectPlayUrl:function(e,t){var n=t.item,i=e.part,r={"X-Plex-Session-Identifier":e.playbackSessionID},a=i?i.key:n.get("key"),o={appendHeaders:!0,params:r};return(t.itemProvider||n.provider||n.server).resolveUrl(a,o)},resolveTranscoderUrl:function(e,t,n){var i=t.item,r=e.media,a=e.part,o=t.transcoderOptions;l.a.isFunction(o)&&(o=o(e)),o=l.a.extend({},e.transcoderQualityOptions,o,{"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 s=t.subtitlesBurnLevel;t.type===S.a.types.VIDEO&&(s===f.a.NEVER?o.subtitles=e.canDirectPlay?"none":"auto":e.useSoftSubtitles?(o.subtitles=e.canDirectPlay?"sidecar":"auto",s===f.a.AVOID&&(o.advancedSubtitles="text")):o.subtitles="burn");var u=t.profileExtra;l.a.isFunction(u)&&(u=u(e)),o["X-Plex-Client-Profile-Extra"]=u;var d=i.get("Media")[0],p=!!d&&"livetv"===d.origin
;("hls"===o.protocol&&!t.useOffsetHLS&&!p||"dash"===o.protocol&&!p)&&(Object(c.a)("[PDE] DASH and HLS should seek forward by default, offset=0"),delete o.offset),"hls"===o.protocol&&t.useOffsetHLS&&(e.useOffsetHLS=!0,o.offset&&(Object(c.a)("[PDE] HLS started with an offset, copyts=0"),o.copyts=0)),"hls"!==o.protocol&&"dash"!==o.protocol||!p||(o.copyts=0,e.offset=0),"http"===o.protocol&&(t.type===S.a.types.MUSIC?(e.useOffsetHTTP=!0,o.copyts=0):o.copyts=p?0:1),
"http"!==o.protocol||e.canDirectPlay||(o["X-Plex-Chunked"]=1),l.a.each(l.a.keys(o),function(e){null==o[e]&&delete o[e]});var h=t.type,v=t.transcoder,g=e.transcodeServer;if(h===S.a.types.VIDEO)return v.video(g,i,r,a,o,n);if(h===S.a.types.MUSIC)return v.music(g,i,o,n);if(h===S.a.types.PHOTO){o.fallbackServer=t.fallbackServer;var m="photo"===i.get("type")?i.getMediaKey():i.get("thumb");return v.image(g,m,o)}},resolveSubtitlesUrl:function(e,t){
var n=this.resolveTranscoderUrl(e,t),i=u.parseUrl(n).params,r=e.canDirectPlay?"/subtitles/:/transcode/universal/start":"/video/:/transcode/universal/subtitles";return e.transcodeServer.resolveUrl(r,{params:i})},resolveDecision:function(e,t){var n=e.transcodeServer,i=o.a.Deferred();if(t.type===S.a.types.PHOTO||n.get("isCloud")||!n.supports("decisionEndpoint"))return i.resolve(e).promise();var r=l.a.clone(e);this.validatePlayerTranscodeProtocol(r,t)
;var a=this.resolveTranscoderUrl(r,t,"decision"),s=o.a.ajax(n.getXHROptions(a,{timeout:2e3}));return s.done(function(t){var n=b.a.parseXML(t);n.generalDecisionCode&&(e.generalDecisionCode=b.a.parseInteger(n.generalDecisionCode),e.generalDecisionText=n.generalDecisionText),n.mdeDecisionCode&&(e.mdeDecisionCode=b.a.parseInteger(n.mdeDecisionCode),e.mdeDecisionText=n.mdeDecisionText),n.transcodeDecisionCode&&(e.transcodeDecisionCode=b.a.parseInteger(n.transcodeDecisionCode),
e.transcodeDecisionText=n.transcodeDecisionText),e.abr=b.a.parseBoolean(n.abr),Object(I.a)(e)?i.reject(e):i.resolve(e)}),s.fail(function(){c.a.warn("[PDE] Player decision failed; the transcode server may be a slow or outdated"),i.resolve(e)}),i.promise()}};t.a=C},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(7),a=n.n(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(770)},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,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(321)},function(e,t,n){"use strict";function i(e,t){var n=Object(r.parseUrl)(e),i=n.origin,a=n.pathname,o=n.params;return o.offset=t,Object(r.join)([i,a],o)}var r=n(19);t.a=i},function(e,t,n){"use strict";function i(e,t){Object(o.a)(t,"A transcoder ping requires a session identifier"),Object(s.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(13),a=n.n(r),o=n(36),s=n(29)
},function(e,t,n){"use strict";function i(e){return{startedAt:Object(p.a)(e.timeStamp),seekStartSeconds:Object(p.a)(e.minOffsetAvailable),seekEndSeconds:Object(p.a)(e.maxOffsetAvailable)}}function r(e){e.set({viewOffset:0,viewCount:1})}function a(e,t,n){var a=n.mediaIndex,o=n.partIndex,l=n.partCount,I=n.state,S=n.continuing,M=n.playbackTime,D=n.positionSeconds,C=n.durationSeconds,O=e.get("features").get(f.b.TIMELINE);if(!O)return s.a.Deferred().reject().promise();var P=t.get("metadataItem"),j={
ratingKey:P.get("ratingKey"),key:P.get("key"),playbackTime:M,playQueueItemID:t.get("playQueueItemID"),state:I,hasMDE:1};if(I===g.e&&S&&(j.continuing=1),null!=C){var T=1e3*D,w=1e3*C;if(l>1){var E=P.get("Media"),x=E[a],A=x.Part[o];j.time=Object(y.a)(x,A,T),j.duration=x.duration}else j.time=T,j.duration=w;j.duration=Math.max(j.time,j.duration)}Object(u.a)("[Player] Timeline, %s",j);var N=h.join(O.get("key"),j),L=t.provider.getXHROptions(N,{headers:{"X-Plex-Session-Identifier":n.playbackSessionID}})
;return s.a.ajax(L).promise().then(function(t){var n=Object(b.a)(t);return n.terminationCode&&(n.terminationCode=Object(p.a)(n.terminationCode)),n.generalDecisionCode&&(n.generalDecisionCode=Object(p.a)(n.generalDecisionCode)),n.mdeDecisionCode&&(n.mdeDecisionCode=Object(p.a)(n.mdeDecisionCode)),n.transcodeDecisionCode&&(n.transcodeDecisionCode=Object(p.a)(n.transcodeDecisionCode)),n.Bandwidths&&n.TranscodeSession&&(n.bandwidthTimeline={bandwidths:Object(d.a)(n.Bandwidths.Bandwidth),
transcodeSessionID:c.a.last(n.TranscodeSession.key.split("/"))}),n.CaptureBuffer&&n.CaptureBuffer.TranscodeSession&&(n.captureBuffer=i(n.CaptureBuffer.TranscodeSession)),n.TranscodeSession&&(n.transcodeSession=i(n.TranscodeSession)),(j.time>6e4||e.id===m.a)&&(n.playbackState===v.b?P.set("viewOffset",j.time):n.playbackState===v.a&&r(P)),n})}t.a=a;var o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(29),d=n(653),p=n(364),h=n(19),f=n(60),v=n(2650),g=n(570),m=n(41),y=n(1127),b=n(505)},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";n.d(t,"a",function(){return i});var i=5},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(2653)},function(e,t,n){"use strict";function i(e){return e.get("experienceSettings").get("volume")}t.a=i},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(178)),a=Object(i.createSelector)(r.a,function(e){return e.liveTVSessions});t.a=a},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(141)),a=Object(i.createSelector)(function(e){return e.experienceSettings.remoteQuality},function(e){var t=r.a.getQualityByIndex(e),n=t.bitrate;return null==n&&(n=2e5),1e3*n});t.a=a},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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=n(775),I=n(58),S=n(2657),M=n.n(S),D=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i));return r._mediaComponent=Object(y.c)("mediaComponent"),r}return f()(t,e),t.prototype.render=function(){var e=this.props,t=e.isDecisionPending,n=e.isDecisionDirectPlay,i=e.isDecisionDirectStreamAudio,a=e.isDecisionDirectStreamVideo,s=e.isPaused,c=e.decisionUrl,u=e.decisionProtocol,d=(e.decisionError,
e.media),p=e.mediaType,h=e.placement,f=e.shouldCoverWhenDecisionPending,v=l()(e,["isDecisionPending","isDecisionDirectPlay","isDecisionDirectStreamAudio","isDecisionDirectStreamVideo","isPaused","decisionUrl","decisionProtocol","decisionError","media","mediaType","placement","shouldCoverWhenDecisionPending"]);if(t)return f?o()("div",{className:M.a.isDecisionPending}):null;var g=this._mediaComponent.getComponent({protocol:u,isDirectPlay:n,isDirectStreamAudio:i,isDirectStreamVideo:a,media:d
}),y=p===I.a?b.b:h;return m.a.createElement(g,r()({},v,{key:c,src:c,paused:s,placement:y,media:d,mediaType:p,isDecisionDirectPlay:n,isDecisionDirectStreamAudio:i,isDecisionDirectStreamVideo:a}))},t}(g.Component);t.a=D},function(e,t){e.exports={isDecisionPending:"PlayerMedia-isDecisionPending-3d0gX"}},function(e,t,n){"use strict";function i(){
return Object(m.createSelector)(Object(O.a)(["confirmRemoteToLocal","isPostPlayVisible","isMediaLoading","isBuffering","isPaused","hasError"]),Object(P.a)(),Object(M.a)(),function(e,t,n){return!(!t||t.type!==L.g)||!(!n||e.confirmRemoteToLocal||e.isPostPlayVisible||e.isMediaLoading||e.isBuffering||e.isPaused||e.hasError)})}function r(){return Object(m.createSelector)(Object(C.a)("positionSeconds"),Object(P.a)(),Object(M.a)(),function(e,t,n){if(t&&t.type===L.g)return!0;if(n){
var i=t.Media[n.mediaIndex],r=i&&i.Part[n.partIndex];if(i&&i.duration&&r){return Object(T.a)(i,r,1e3*e)>.9*i.duration}}return!1})}function a(){return Object(m.createSelector)(Object(j.a)(),Object(P.a)(),Object(M.a)(),Object(D.a)(),i(),r(),Object(C.a)("hasError"),Object(C.a)("errorCode"),Object(C.a)("metricsPage"),Object(C.a)("metricsContext"),Object(C.a)("metricsAutoPlay"),Object(C.a)("playbackStartTime"),function(e,t,n,i,r,a,o,s,l,c,u,d){var p={decision:n,isPlaying:r,hasEnded:a,hasError:o,
errorCode:s,metricsPage:l,metricsContext:c,metricsAutoPlay:u,playbackStartTime:d};if(e&&(p.metricsServerType=Object(x.a)(e),p.metricsConnectionType=Object(E.a)(e.activeConnection)),i&&(p.playQueueItemID=i.playQueueItemID),t&&(p.metricsType=t.type,p.metricsIdentifier=t.identifier,t.type===L.g&&t.Media.length&&(p.metricsContainer=t.Media[0].container)),n){var h=Object(w.a)(n),f=t.Media[n.mediaIndex],v=f&&f.Part[n.partIndex],g=k.a.get("video").id,m=v&&b.a.findWhere(v.Stream,{streamType:g
}),y=k.a.get("audio").id,I=v&&b.a.findWhere(v.Stream,{streamType:y,selected:!0}),S=k.a.get("subtitles").id,M=v&&b.a.findWhere(v.Stream,{streamType:S,selected:!0});p.metricsProtocol=n.protocol,p.metricsOffset=n.positionSeconds,f&&(p.metricsContainer=f.container,p.metricsDuration=Object(N.a)(f.duration),p.metricsBitrate=Object(A.a)(f.bitrate),p.metricsOrigin=f.origin),m&&(p.metricsVideoCodec=m.codec,p.metricsVideoDecision=h.videoDecision),I&&(p.metricsAudioCodec=I.codec,
p.metricsAudioDecision=h.audioDecision),M&&M.id&&(p.metricsSubtitleFormat=M.codec,p.metricsSubtitleDecision=h.subtitleDecision)}return p})}var o=n(6),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(11)),m=n(5),y=(n.n(m),n(7)),b=n.n(y),I=n(15),S=n(136),M=n(280),D=n(128),C=n(158),O=n(471),P=n(168),j=n(472),T=n(1127),w=n(2659),E=n(687),x=n(688),A=n(2660),N=n(1133),L=n(26),k=n(151),_={START:"playback:itemstart",RESTART:"playback:itemrestart",
END:"playback:itemend",SESSION_END:"playback:sessionend",FAILURE:"playback:failure"},R={CAST:"cast",FAILED:"failed",COMPLETED:"completed",STOPPED:"stopped",SKIPPED:"skipped"},z={QUALITY:"quality",STREAMS:"streams"},U={dispatchSetPlayerPlaybackTime:S.o},B=function(e){function t(n,i){c()(this,t);var r=d()(this,e.call(this,n,i));return r.onTickTimeout=function(){r.flushPlaybackTimes(),r.setTickTimeout(r.props)},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._tickTimeout=null,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(),this.clearTickTimeout()},t.prototype.clearTickTimeout=function(){
this._tickTimeout&&(this._tickTimeout=clearTimeout(this._tickTimeout))},t.prototype.setTickTimeout=function(e){e.isPlaying&&(this.clearTickTimeout(),this.itemPlaybackTimestamp=Date.now(),this._tickTimeout=setTimeout(this.onTickTimeout,1e3))},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,l=e.isPlaying
;if(a&&!l?this.setTickTimeout(this.props):!a&&l&&this.clearTickTimeout(),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===L.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=Date.now()),this.hasEnded=i):this.flushPlaybackTimes(),this.itemDecision&&t&&this.itemDecision!==t){var r=void 0;if(this.itemDecision.qualityIndex!==t.qualityIndex?r=z.QUALITY:this.itemDecision.partIndex===t.partIndex&&(r=z.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=Date.now()-this.itemPlaybackTimestamp;this.itemPlaybackTimestamp=null,this.itemPlaybackMilliseconds+=e,this.sessionPlaybackMilliseconds+=e,this.setPlayerPlaybackTime(),
Object(I.c)("metrics").addPlaybackTime(e)}},t.prototype.trackItemStart=function(){this.itemID=this.props.playQueueItemID,this.itemDecision=this.props.decision,this.itemMetricsProperties=this.getItemMetricsProperties(),this.itemPlaybackTimestamp=Date.now(),this.itemPlaybackMilliseconds=0,this.sessionPlaybackCount+=1,this.hasEnded=this.props.hasEnded,this.hasError=this.props.hasError;var e=this.props.playbackStartTime,t=s()({},this.itemMetricsProperties)
;1===this.sessionPlaybackCount&&(t.latency=Date.now()-e),Object(I.c)("metrics").trackEvent({event:_.START,interaction:!0,properties:t}),Object(I.c)("metrics").incrementPlaybackCount(),this.setTickTimeout(this.props)},t.prototype.trackItemRestart=function(e){this.itemDecision=this.props.decision,this.itemMetricsProperties=this.getItemMetricsProperties(),Object(I.c)("metrics").trackEvent({event:_.RESTART,interaction:!0,properties:s()({},this.itemMetricsProperties,{reason:e})})},
t.prototype.trackItemEnd=function(){if(this.itemID){this.flushPlaybackTimes(),this.clearTickTimeout();var e=void 0;e=this.props.isRemotePlayer?R.CAST:this.hasError?R.FAILED:this.hasEnded?R.COMPLETED:this.hasStopped?R.STOPPED:R.SKIPPED,Object(I.c)("metrics").trackEvent({event:_.END,interaction:!0,properties:s()({},this.itemMetricsProperties,{playbackTime:Object(N.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.c)("metrics").trackEvent({event:_.SESSION_END,interaction:!0,properties:{serverType:this.props.metricsServerType,connectionType:this.props.metricsConnectionType,type:this.props.metricsType,playbackCount:this.sessionPlaybackCount,playbackTime:Object(N.a)(this.sessionPlaybackMilliseconds)}}),
this.sessionPlaybackMilliseconds=0,this.sessionPlaybackCount=0)},t.prototype.trackFailure=function(){Object(I.c)("metrics").trackEvent({event:_.FAILURE,interaction:!0,properties:{serverType:this.props.metricsServerType,connectionType:this.props.metricsConnectionType,type:this.props.metricsType,error:this.props.errorCode}})},t.prototype.setPlayerPlaybackTime=function(){this.props.dispatchSetPlayerPlaybackTime({playbackTime:this.itemPlaybackMilliseconds,playerType:this.props.playerType})},
t.prototype.render=function(){return null},t}(v.Component);t.a=Object(g.b)(a,U)(B)},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(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(1132)},function(e,t,n){"use strict";function i(){return Object(g.a)(["isOpen","isPaused","openState"])}function r(){return Object(f.createSelector)(i(),function(e){var t=e.isOpen,n=e.isPaused,i=e.openState,r=i===m.a;return{isEnabled:!t||!r||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(5),v=(n.n(f),n(15)),g=n(471),m=n(190),y=function(e){
function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r._screenSaverManager=Object(v.a)("screenSaverManager")?Object(v.c)("screenSaverManager"):null,r}return u()(t,e),t.prototype.componentDidMount=function(){this._toggleScreenSaver(this.props.isEnabled)},t.prototype.componentDidUpdate=function(e){e.isEnabled!==this.props.isEnabled&&this._toggleScreenSaver(this.props.isEnabled)},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}(p.Component);t.a=Object(h.b)(r)(y)},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(I.a)(["isPaused","isBuffering"]),S.a,function(e,t){return{volume:t,isPaused:e.isPaused,isBuffering:e.isBuffering}})}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(136)),I=n(471),S=n(569),M=(n(58),n(2663)),D={dispatchUpdatePlayerBuffering:b.x},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(6),r=n.n(i),a=n(12),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(2664),y=n.n(m),b=n(57),I=n(318),S=n(1134),M="405",D=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(M),r.onEnd()},r.state={isLoading:!0,ads:null,currentAdIndex:null,currentCreativeIndex:null,currentMedia:null},r._hasMediaStarted=!1,r._hasMediaFinished=!1,r._mediaComponent=Object(g.c)("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,y.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 y.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(),y.a.parser.clearUrlTemplateFilters()},t.prototype._loadXML=function(e){var t=this
;this._vastXHR&&this._vastXHR.abort(),this._resetPlaybackTimeout(),this.setState({isLoading:!0}),this._vastXHR=y.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;y.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,{bufferingDetectionLimit:b.a.get("bufferingDetectionLimit"),positionSeconds:n,paused:t,src:l.fileURL,mediaType:"video",onPositionMillisecondsChange:this.onPositionMillisecondsChange,onCanPlay:this.onCanPlay,onEnd:this.onEnd,
onError:this.onEnd}))},t}(f.Component);D.defaultProps={urlTemplateFilters:[],canPlayType:Object(I.a)()?function(){return!0}:S.a,onResponse:function(){},onSkipDelayChange:function(){},onPositionMillisecondsChange:function(){},onEnd:function(){}},t.a=D},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,P,j,T,w,E,x,A,N,L,k,_,R,z,U,B,F,V,H,Q,Y,G,W,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)?(V=parseInt(re,10),a.skipDelay=a.duration*(V/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(G=this.childsByName(ce,"CustomClick"),b=0,D=G.length;b<D;b++)o=G[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,P=q.length;S<P;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"),N=0,j=Z.length;N<j;N++)for(R=Z[N],X=this.childsByName(R,"MediaFile"),z=0,T=X.length;z<T;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,w=J.length;U<w;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"),F=0,E=$.length;F<E;F++)l=$[F],d.type=l.getAttribute("creativeType")||"text/html",d.htmlResource=this.parseNodeText(l);for(ee=this.childsByName(g,"IFrameResource"),H=0,x=ee.length;H<x;H++)y=ee[H],d.type=y.getAttribute("creativeType")||0,
d.iframeResource=this.parseNodeText(y);for(te=this.childsByName(g,"StaticResource"),Q=0,A=te.length;Q<A;Q++)ae=te[Q],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")),W=this.childsByName(v,"IconClickTracking"),ne=0,C=W.length;ne<C;ne++)f=W[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,P,j,T,w,E,x,A,N,L,k,_,R;for(a=new d(t),j=this.childsByName(e,"TrackingEvents"),l=0,v=j.length;l<v;l++)for(_=j[l],T=this.childsByName(_,"Tracking"),u=0,g=T.length;u<g;u++)k=T[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(w=this.childsByName(e,"NonLinear"),p=0,m=w.length;p<m;p++){for(O=w[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(A=this.childsByName(O,"StaticResource"),D=0,
I=A.length;D<I;D++)L=A[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")),N=this.childsByName(O,"NonLinearClickTracking"),P=0,S=N.length;P<S;P++)r=N[P],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,P,j,T,w,E,x,A,N,L,k,_,R,z,U,B;for(s=new c(t),w=this.childsByName(e,"Companion"),p=0,m=w.length;p<m;p++){for(o=w[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(A=this.childsByName(o,"StaticResource"),g=0,I=A.length;g<I;g++){for(R=A[g],a.type=R.getAttribute("creativeType")||0,N=this.childsByName(o,"AltText"),O=0,S=N.length;O<S;O++)i=N[O],a.altText=this.parseNodeText(i);a.staticResource=this.parseNodeText(R)}for(L=this.childsByName(o,"TrackingEvents"),P=0,M=L.length;P<M;P++)for(U=L[P],
k=this.childsByName(U,"Tracking"),j=0,D=k.length;j<D;j++)z=k[j],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"),T=0,C=_.length;T<C;T++)r=_[T],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(1),r=n.n(i);r.a.shape({url:r.a.string.isRequired,UrlTemplateFilter:r.a.array})},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.onResize=function(e){i.timeoutID=clearTimeout(i.timeoutID),i.timeoutID=setTimeout(i.onResizeTimeout,i.props.resizeDelay)},i.onResizeTimeout=function(){i.props.onScreenSizeChange({width:window.innerWidth,height:window.innerHeight})},a=n,o()(i,a)}return l()(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onResize),this.onResizeTimeout()},
t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onResize),this.timeoutID=clearTimeout(this.timeoutID)},t.prototype.render=function(){return null},t}(u.Component));d.defaultProps={resizeDelay:100},t.a=d},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(p.a)(),Object(d.a)(),Object(u.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(c.d)(o()({},t,{playerType:n})))},onModalClose:function(){e(Object(c.a)({playerType:n}))}}}var a=n(6),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(186)),u=n(2670),d=n(212),p=n(79),h=n(2671);t.a=Object(s.b)(i,r)(h.a)},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,M.c)}function p(e){return c(e,M.d)}function h(e){return u(e,M.e)}function f(e){return c(e,M.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>M.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(b.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(I.a)(e),o=Object(D.c)(e,t),s=o.get("liveTVSession"),l=s.get("startedAt");Object(C.a)(function(){if(s.set({currentPosition:n,lastSeekPosition:n}),m(o,n)){var e=i(s),c=e||l,u=n-c;r(Object(S.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(57),I=n(378),S=n(470),M=n(321),D=n(177),C=n(35)},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:o.a})).then(function(r,o,u){e.set(e.parse(r));var d=e.get("grabOperation");if(!d){var p=Object(s.a)(u,Object(l.default)("Could not tune channel"));return a.a.Deferred().reject({errorMessage:p}).promise()}
var h=d.get("metadataItem"),f=h.get("Media")[0],v=d.get("conflicts"),g=u.getResponseHeader("X-Plex-Activity"),m=d.get("beginsAt"),y=d.get("metadataItem"),b=y.get("transcodeSession"),I={dvrID:t,channelIdentifier:n,activityUUID:g,currentPosition:m,startedAt:m},S=!1;if(b&&i.currentMediaItem){var M=b.get("timeStamp"),D=b.get("minOffsetAvailable"),C=b.get("maxOffsetAvailable");if(M&&null!=D&&null!=C){I.captureBuffer={startedAt:M,seekStartSeconds:D,seekEndSeconds:C}
;var O=M+D,P=i.currentMediaItem.beginsAt,j=Math.max(O,P);Date.now()/1e3-j>c&&(S=!0)}}if(e.set(I),v&&v.length)return a.a.Deferred().reject({hasConflicts:!0,liveTVSession:e}).promise();if(!g)return a.a.Deferred().reject({errorMessage:Object(l.default)("Could not tune channel (No activity)")}).promise();var T=f&&f.Part;return T&&T.length?(h.set("isPreFetched",!0),S?a.a.Deferred().reject({confirmPlayback:S,liveTVSession:e}).promise():a.a.Deferred().resolve(e).promise()):a.a.Deferred().reject({
errorMessage:Object(l.default)("Could not tune channel (No parts)")}).promise()},function(e,t){return"abort"===t?a.a.Deferred().reject({errorMessage:Object(l.default)("Could not tune channel (Timed out)")}).promise():a.a.Deferred().reject({errorMessage:Object(l.default)("Could not tune channel")}).promise()})}t.a=i;var r=n(13),a=n.n(r),o=n(77),s=n(241),l=n(3),c=60},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(5),a=(n.n(r),n(776))},function(e,t,n){"use strict";function i(e,t){var n=Math.max(e,t),i=Date.now()-1e3*n;return Object(v.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(30)),v=n(703),g=n(3),m=n(758),y=n(759),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:f.G,
title:Object(g.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(g.default)("Watch from start (started {timeAgo} ago)",{timeAgo:o})),a()(y.a,{value:null},void 0,Object(g.default)("Watch Live"))):null},t}(h.Component);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(5),o=(n.n(a),n(69)),s=n(246),l=n(2673),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:l.m,title:Object(c.default)("Continue Playback"),message:Object(c.default)("Would you like to continue playback on {playerName}?",{playerName:n}),
confirmLabel:Object(c.default)("Yes"),cancelLabel:Object(c.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(30)),c=n(3),u=n(157);t.a=i},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e,t){return t.confirmOffsetPayload},u.a,function(e,t){var n=void 0;if(e){n=t[e.metadataItemEntityID]}return n?{viewOffset:n.viewOffset,duration:n.duration}:{}})}function r(e,t){var n=t.playerType,i=t.confirmOffsetPayload;return{
onConfirm:function(t){e(c.m(o()({},i,{confirmPlayback:!0,confirmOffset:!0,startOffsetMilliseconds:t})))},onCancel:function(){e(c.d({playerType:n}))}}}var a=n(6),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(69)),u=n(115),d=n(2675);t.a=Object(s.b)(i,r)(d.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,l=s>0;return a()(h.a,{isOpen:t,metricsPage:c.V,title:Object(p.default)("Resume Playback"),onItemSelect:r,onCancel:o
},void 0,a()(f.a,{value:n},void 0,Object(p.default)("Resume from {time}",{time:Object(d.a)(n)}),l&&v,l&&Object(u.a)(s)),a()(f.a,{value:0},void 0,Object(p.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(72)),c=n(30),u=n(319),d=n(322),p=n(3),h=n(758),f=n(759),v=a()(l.b,{});t.a=i},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(6),a=n.n(r),o=n(11),s=n(69),l=n(2677);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:l.q,title:Object(c.default)("Play Now"),message:Object(c.default)("This will clear changes made to the queue and play the selection instead."),confirmLabel:Object(c.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(30)),c=n(3),u=n(157);t.a=i},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(69),o=n(246),s=n(2679);t.a=Object(r.b)(null,i)(s.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:l.r,title:Object(c.default)("Continue Playback"),
message:Object(c.default)("Would you like to continue playback here?"),confirmLabel:Object(c.default)("Yes"),cancelLabel:Object(c.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(30)),c=n(3),u=n(157);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(u.a)(),Object(c.a)(),Object(l.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(s.e)({playerType:i,showError:a}):Object(s.c)({playerType:i}))}}}var a=n(11),o=n(5),s=(n.n(o),n(186)),l=n(212),c=n(233),u=n(79),d=n(2681);t.a=Object(a.b)(i,r)(d.a)},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()(c.a,{size:u.e.SMALL,isOpen:t,metricsPage:l.H,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(30)),c=n(117),u=n(23),d=n(2682);t.a=i},function(e,t,n){
"use strict";function i(e,t){
return e?t?Object(h.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(h.default)("All tuners are in use. Please ask the server owner to free up a tuner to continue watching Live TV."):t?Object(h.default)("Please select from one of the actions below."):Object(h.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()(g.a,{onModalClose:M},void 0,o()(p.a,{className:S.a.modalHeader},void 0,Object(h.default)("All Tuners are Currently in Use")),!!I&&o()(m.a,{kind:y.b.DANGER,message:Object(h.default)("There was an error trying to cancel the selected item, please try again")}),o()(c.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()(u.a,{},void 0,o()("div",{className:S.a.footerMessage},void 0,r&&o()(f.a,{conflicts:l,onModalClose:M})),o()(d.a,{},void 0,o()(v.a,{isSpinning:s,kind:y.b.PRIMARY,onPress:M},void 0,r||!n?Object(h.default)("OK"):Object(h.default)("Cancel")))))}
var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(59)),u=n(82),d=n(112),p=n(78),h=n(3),f=n(2683),v=n(124),g=n(95),m=n(721),y=n(23),b=n(2685),I=n(2688),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(2684)),g=n(3),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(v.a)(1e3*e);return o()("span",{},void 0,Object(g.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(48),a=n.n(r),o=n(3);t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.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(s.b)({
playerType:n,grabOperationKey:i}))}}}var a=n(11),o=n(5),s=(n.n(o),n(186)),l=n(22),c=n(2686);t.a=Object(a.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e,t,n,i){var r=e===d.e?n:t;return i?Object(u.default)("Stop watching {openSpan}{title}{closeSpan} and continue",{title:r}):Object(u.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,u=e.isRolling,d=e.onCancelConflictPress;return o()(c.a,{className:v.a.conflict,onPress:d},void 0,o()(p.a,{className:v.a.thumbnail,serverEntityID:t,url:s||l,width:53,height:80}),o()("div",{className:v.a.title},void 0,o()(h.a,{message:i(n,r,a,u),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(20)),u=n(3),d=n(26),p=n(182),h=n(179),f=n(2687),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(){return Object(o.createSelector)(Object(h.a)(),Object(p.a)(),Object(d.a)(),function(e,t){return t.mediaType},function(e,t){return t.isRemotePlayer},function(e,t,n,i,r){
var a=e.playQueue,o=e.repeatAll,s=e.errorMessage,l=e.errorCode,c=e.errorCategory,u=n&&n.entityID,d=a&&a.currentIndex,p={playQueueItemEntityID:u,showSkipButton:!!a&&(d<a.playQueueItems.length-1||o),showRetryButton:!!a&&i!==f.c&&!r,errorMessage:s,errorCode:l,errorCategory:c};return t&&(p.title=t.title),p})}function r(e,t){var n={playerType:t.playerType};return{onModalClose:function(){e(Object(c.f)(n))},onSkipPress:function(t){e(Object(s.h)(n))},onRetryPress:function(t){e(Object(u.i)(n)),
e(Object(l.e)(n))}}}var a=n(11),o=n(5),s=(n.n(o),n(153)),l=n(470),c=n(69),u=n(136),d=n(1129),p=n(168),h=n(79),f=n(58),v=n(2690);t.a=Object(a.b)(i,r)(v.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(f.default)('An error occurred trying to play "{title}".',{title:y
}):Object(f.default)("An error occurred trying to play this item."));return a()(v.a,{isOpen:t,metricsPage:h.N,size:m.e.SMALL,onModalClose:M},void 0,a()(g.a,{onModalClose:M},void 0,a()(p.a,{className:b.a.modalHeader},void 0,Object(f.default)("Playback Error")),a()(c.a,{},void 0,D,null!=o&&a()("p",{className:b.a.errorCode},void 0,Object(f.default)("Error code: {errorCode}",{errorCode:o}),s&&" ("+s+")")),(n||i)&&a()(u.a,{},void 0,a()(d.a,{},void 0,n&&a()(l.a,{onPress:I
},void 0,Object(f.default)("Skip")),i&&a()(l.a,{kind:m.b.PRIMARY,onPress:S},void 0,Object(f.default)("Retry"))))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(59),u=n(82),d=n(112),p=n(78),h=n(30),f=n(3),v=n(117),g=n(95),m=n(23),y=n(2691),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(g.createSelector)(function(e){return e.ui.audioVideoPlayer.openState},function(e){return e.ui.photoPlayer.openState},function(e,t){return t.playerType},function(e,t,n){return Object(C.a)({audioVideoOpenState:e,photoOpenState:t,playerType:n})})}function r(){return Object(g.createSelector)(i(),Object(S.a)(),M.a,function(e,t,n){return{allowShortcuts:e,isCurrentMediaTypeSeekable:t===P.a||t===P.d,volume:n}})}
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(11)),g=n(5),m=(n.n(g),n(18)),y=n(153),b=n(69),I=n(136),S=n(2693),M=n(569),D=n(30),C=n(2694),O=n(3),P=n(58),j=n(157),T={dispatchPlayPreviousItem:y.i,dispatchStepBack:I.r,dispatchSkipBack:I.p,dispatchTogglePlayPause:I.u,dispatchPlay:I.k,dispatchPause:I.j,dispatchSkipForward:I.q,dispatchStepForward:I.s,dispatchPlayNextItem:y.h,dispatchChangeVolume:I.h,dispatchEndPlayback:b.f},w=function(e){
function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onPreviousShortcut=function(){r.props.dispatchPlayPreviousItem({playerType:r.props.playerType})},r.onStepBackShortcut=function(){(r.props.isCurrentMediaTypeSeekable?r.props.dispatchStepBack:r.props.dispatchPlayPreviousItem)({playerType:r.props.playerType})},r.onSkipBackShortcut=function(){(r.props.isCurrentMediaTypeSeekable?r.props.dispatchSkipBack:r.props.dispatchPlayPreviousItem)({playerType:r.props.playerType})},
r.onPlayPauseShortcut=function(){r.props.dispatchTogglePlayPause({playerType:r.props.playerType})},r.onPlayShortcut=function(){r.props.dispatchPlay({playerType:r.props.playerType})},r.onPauseShortcut=function(){r.props.dispatchPause({playerType:r.props.playerType})},r.onSkipForwardShortcut=function(){(r.props.isCurrentMediaTypeSeekable?r.props.dispatchSkipForward:r.props.dispatchPlayNextItem)({playerType:r.props.playerType})},r.onStepForwardShortcut=function(){
(r.props.isCurrentMediaTypeSeekable?r.props.dispatchStepForward:r.props.dispatchPlayNextItem)({playerType:r.props.playerType})},r.onNextShortcut=function(){r.props.dispatchPlayNextItem({playerType:r.props.playerType})},r.onVolumeChange=function(e){r.props.dispatchChangeVolume({volume:e,playerType:r.props.playerType})},r.onVolumeIncrease=function(){r.onVolumeChange(Math.min(r.props.volume+10,100))},r.onVolumeDecrease=function(){r.onVolumeChange(Math.max(r.props.volume-10,0))},
r.onCloseShortcut=function(){r.setState({isCloseConfirmModalOpen:!0})},r.onCloseConfirmPress=function(e){r.props.dispatchEndPlayback({playerType:r.props.playerType})},r.onCloseCancelPress=function(e){r.setState({isCloseConfirmModalOpen:!1})},r.state={isCloseConfirmModalOpen:!1},r}return p()(t,e),t.prototype.componentDidMount=function(){this.props.allowShortcuts&&this._startListening()},t.prototype.componentDidUpdate=function(e){var t=this.props.allowShortcuts
;t&&!e.allowShortcuts?this._startListening():!t&&e.allowShortcuts&&this._stopListening()},t.prototype.componentWillUnmount=function(){this.props.allowShortcuts&&this._stopListening()},t.prototype._startListening=function(){m.a.on({"shortcut:skipPrevious":this.onPreviousShortcut,"shortcut:stepBackward":this.onStepBackShortcut,"shortcut:seekBackward":this.onSkipBackShortcut,"shortcut:playPause":this.onPlayPauseShortcut,"shortcut:play":this.onPlayShortcut,"shortcut:pause":this.onPauseShortcut,
"shortcut:seekForward":this.onSkipForwardShortcut,"shortcut:stepForward":this.onStepForwardShortcut,"shortcut:skipNext":this.onNextShortcut,"shortcut:increaseVolume":this.onVolumeIncrease,"shortcut:decreaseVolume":this.onVolumeDecrease,"shortcut:toggleFullScreen":this.onToggleFullscreenShortcut,"shortcut:stop":this.onCloseShortcut})},t.prototype._stopListening=function(){m.a.off({"shortcut:skipPrevious":this.onPreviousShortcut,"shortcut:stepBackward":this.onStepBackShortcut,
"shortcut:seekBackward":this.onSkipBackShortcut,"shortcut:playPause":this.onPlayPauseShortcut,"shortcut:play":this.onPlayShortcut,"shortcut:pause":this.onPauseShortcut,"shortcut:seekForward":this.onSkipForwardShortcut,"shortcut:stepForward":this.onStepForwardShortcut,"shortcut:skipNext":this.onNextShortcut,"shortcut:increaseVolume":this.onVolumeIncrease,"shortcut:decreaseVolume":this.onVolumeDecrease,"shortcut:toggleFullScreen":this.onToggleFullscreenShortcut,"shortcut:stop":this.onCloseShortcut
})},t.prototype.render=function(){return o()(j.a,{isOpen:this.state.isCloseConfirmModalOpen,metricsPage:D.f,title:Object(O.default)("Stop Playback"),message:Object(O.default)("Closing the player will stop playback. Any changes to the queue will be lost."),onConfirm:this.onCloseConfirmPress,onCancel:this.onCloseCancelPress})},t}(f.Component);t.a=Object(v.b)(r,T)(w)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){var t=void 0;if(e){
var n=Object(a.q)(e.type);t=n&&n.mediaType}return t})}t.a=i;var r=n(5),a=(n.n(r),n(26)),o=n(128)},function(e,t,n){"use strict";function i(e){var t=e.playerType,n=e.audioVideoOpenState,i=e.photoOpenState,o=t===a.a&&!!n,s=t===a.b&&!!i,l=0,c=0;return n===r.b?l+=1:n===r.a&&(l+=2),i===r.b?c+=1:i===r.a&&(c+=2),o&&l>=c||s&&c>l}t.a=i;var r=n(190),a=n(99)},function(e,t,n){"use strict";function i(){return Object(h.createSelector)(Object(v.a)(),Object(f.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(11)),h=n(5),f=(n.n(h),n(168)),v=n(79),g=n(435),m=n(26),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===m.e){c=r+" - "+Object(g.a)({seasonIndex:o,episodeIndex:a,date:s,noLeadingZero:!0,separator:" \xb7 "})}else if(t===m.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(p.b)(i)(y)},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,t){return e.isRemotePlayer||e.isMusic||e.isSettingsVisible||e.isChaptersVisible||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(325)),g=(n(99),n(98)),m=n(2699),y=n(31),b=n(2703),I=n(1141),S=n(1142),M=n(23),D=n(44),C=n.n(D),O=n(2727),P=n(1145),j=n(2876),T=n(2879),w=n(2881),E=n(2890),x=n(3017),A=n(3087),N=n(3096),L=n(3108),k=n.n(L),_=2e3,R=parseInt(C.a.playerControlsHeight,10),z=parseInt(C.a.playerControlsNarrowHeight,10),U=parseInt(C.a.playerInfoBarHeight,10),B=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!==v.k&&t!==v.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.hasFullscreen,i=e.isRemotePlayer,a=e.isPlayQueueLoading,o=e.isMediaLoading,s=e.isPostPlayLoading,l=e.isBuffering,c=e.isFullscreen,u=e.isSettingsVisible,d=e.isChaptersVisible,h=e.isPlayQueueVisible,f=e.isAlsoAiringVisible,v=e.isLyricsVisible,D=e.isPostPlayVisible,C=e.isAdVisible,L=e.isVideo,_=e.isMusic,B=e.isNarrowLayout,F=e.currentSubType,V=e.hasLiveTVProtocol,H=e.seekStartMilliseconds,Q=e.seekEndMilliseconds,Y=e.bufferStartMilliseconds,G=e.bufferEndMilliseconds,W=e.adPositionMilliseconds,K=e.adDurationMilliseconds,q=e.adSkipDelaySeconds,Z=e.onEnterFullscreenPress,X=e.onExitFullscreenPress,J=e.onToggleFullscreen,$=e.onAdSkipPress,ee=this.state,te=ee.hideControls,ne=ee.audioSettingsHeight,ie=(a||s||L&&(!C&&o||l))&&!D&&!f,re=!a&&u&&!d&&!h&&!f,ae=re&&_,oe=re&&L,se=!a&&!u&&d&&!h&&!f,le=!a&&h&&!f&&!u&&!d,ce=!a&&!h&&f&&!u&&!d,ue=L&&!a&&!s&&!h&&!f&&!D,de=(!C||h)&&(i||_||o||h||f||s||D),pe=F===g.a,he=V||C||pe,fe=B?z:R,ve=he?fe+U:fe,ge=te?null:"translateY("+-ve+"px)"
;return p()("div",{className:(k.a.fullPlayer||"")+" "+(L&&k.a.isVideo||"")+" "+(h&&k.a.isPlayQueueVisible||"")+" "+(te&&k.a.hideControls||""||""),onMouseMove:this.onInteraction,onMouseDown:this.onInteraction,onTouchStart:this.onInteraction,onTouchEnd:this.onInteraction,onMouseLeave:this.onMouseLeave},void 0,de&&p()(T.a,{playerType:t,isVideo:L,isMusic:_,allowBlur:_||h||f||D}),!h&&!f&&ie&&p()(y.a,{size:M.e.LARGE}),ue&&p()(m.a,{playerType:t,heightOffset:te?0:ve}),ue&&p()(S.a,{playerType:t,
onToggleFullscreen:J}),!a&&p()("div",{className:k.a.topBar,onMouseEnter:this.onControlsMouseEnter,onMouseLeave:this.onControlsMouseLeave},void 0,p()(I.a,{playerType:t,isFullscreen:c,hasFullscreen:n,onCastMenuChange:this.onCastMenuChange,onEnterFullscreenPress:Z,onExitFullscreenPress:X})),!a&&!h&&!v&&_&&p()(r,{bottom:ve},void 0,p()(j.a,{playerType:t,bottom:ae?ne:null})),!a&&!h&&v&&_&&p()(r,{bottom:ve},void 0,p()(w.a,{playerType:t})),ae&&p()(O.a,{playerType:t,
onDimensionsChange:this.onAudioSettingsDimensionsChange}),oe&&p()(N.a,{bottom:ve,playerType:t}),se&&p()(b.a,{bottom:ve,playerType:t}),le&&p()(r,{bottom:ve},void 0,p()(E.a,{playerType:t,isVideo:L,isMusic:_})),ce&&p()(r,{bottom:ve},void 0,p()(A.a,{playerType:t,isVideo:L,isMusic:_})),!a&&D&&!h&&!f&&p()(r,{bottom:ve},void 0,p()(x.a,{playerType:t})),!a&&p()("div",{className:k.a.bottomBar,style:{bottom:-ve,height:ve,WebkitTransform:ge,msTransform:ge,transform:ge},
onMouseEnter:this.onControlsMouseEnter,onMouseLeave:this.onControlsMouseLeave},void 0,p()(P.a,{playerType:t,isVideo:L,isMusic:_,isAdVisible:C,isPostPlayVisible:D,currentSubType:F,hasLiveTVProtocol:V,adSkipDelaySeconds:q,seekStartMilliseconds:H,bufferStartMilliseconds:Y,bufferEndMilliseconds:G,seekEndMilliseconds:Q,adPositionMilliseconds:W,adDurationMilliseconds:K,onAdSkipPress:$,onFollowMuteMenuChange:this.onFollowMuteMenuChange,onControlsMenuChange:this.onControlsMenuChange})))},t}(f.Component)
;t.a=B},function(e,t,n){"use strict";function i(){return Object(D.a)(["isOpen","isMediaLoading","isBuffering","isPaused","hasError","qualityIndex","positionSeconds","lastSeekPositionSeconds"])}function r(){return Object(b.createSelector)(i(),Object(S.a)(),Object(M.a)(),C.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,a.isDirectPlay=t.isDirectPlay),
i&&(a.size=i.subtitleSize),a})}var a=n(12),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(6),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),n(470)),S=n(280),M=n(128),D=n(471),C=n(70),O=n(373),P=n(778),j=n(2700),T={dispatchMakeDecision:I.a,dispatchRemoveDecision:I.d},w=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:O.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(j.a,f()({subtitlesUrl:t},n,{onSubtitlesError:this.onSubtitlesError})):null},t}(g.Component),E=Object(P.a)(w);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(2701),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=(n.n(f),
n(64)),g=n(45),m=n(29),y=n(19),b=n(779),I=n(2702),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._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(m.a)("[Subtitles] loading subtitles. position: %s url: %s",r._positionAtTimeOfRequest,t),r._abortStream(),
r._xhr=new window.XMLHttpRequest;var i=new p.a.parser.XhrStream(r._xhr),a=new p.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(m.a)("[Subtitles] Starting to render subtitles"),r._destroySubtitles(),r._clock=new p.a.renderers.AutoClock(r._getPosition,1e3),r._renderer=new p.a.renderers.WebRenderer(e,r._clock,document.getElementById(r._rendererID),r.props.rendererOptions),r._setSubtitleSize(),r._resizeSubtitles(),r._setClockState()},r.onSubtitlesConnectionTimeout=function(){Object(m.a)("[Subtitles] Connection inactivity timeout, reopening."),r._openSubtitlesConnection()},r.onSubtitlesFail=function(){
var e=r._xhr.readyState,t=r._xhr.status;r._errorCount++,m.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)},p.a.debugMode=!1,r.state={width:0,height:0},r._rendererID=Object(g.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(m.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.isDirectPlay,r=t.positionSeconds,a=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())},a&&(this._xhr.onprogress=function(t){Object(m.a)("[Subtitles] Received data, restarting connection timer."),clearTimeout(e._connectionTimeoutID),e._connectionTimeoutID=setTimeout(e.onSubtitlesConnectionTimeout,a)});var o=n;if(i){var s=Object(y.parseUrl)(n);s.params.offset=r,o=Object(y.join)([s.origin,s.pathname],s.params)}this._xhr.open("GET",o,!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(m.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(m.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(m.a)("[Subtitles] Clock State: paused"),void e.pause()):!n||a?(Object(m.a)("[Subtitles] Clock State: disabled"),void e.disable()):r?void 0:(Object(m.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()(v.a,{className:S.a.measure,onMeasure:this.onMeasure},void 0,r()("div",{id:this._rendererID,className:S.a.renderer}))},t}(f.Component);M.defaultProps={offset:0,delay:0,size:b.a.NORMAL,sizeMultiplier:1,heightOffset:0,consecutiveErrorsTolerance:3,connectionTimeout:null,retryTimeout:3e3,rendererOptions:{enableSvg:!1,preciseOutlines:!1}},t.a=M
},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 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.RotateX=P;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.RotateY=j;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.RotateZ=T;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.SkewX=w;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 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.SecondaryColor=A;var N=function(){function e(e){this._value=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}()
;e.OutlineColor=N;var 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 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.ColorKaraoke=F;var V=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.SweepingColorKaraoke=V;var H=function(){function e(e){this._duration=e}return Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),e}();e.OutlineKaraoke=H;var Q=function(){function e(e){this._value=e}
return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}();e.WrappingStyle=Q;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 G=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=G;var W=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=W;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,P=0,j=e.parts;P<j.length;P++){var T=j[P]
;if(T instanceof p.Italic)b.italic=T.value;else if(T instanceof p.Bold)b.bold=T.value;else if(T instanceof p.Underline)b.underline=T.value;else if(T instanceof p.StrikeThrough)b.strikeThrough=T.value;else if(T instanceof p.Border)b.outlineWidth=T.value,b.outlineHeight=T.value;else if(T instanceof p.BorderX)b.outlineWidth=T.value;else if(T instanceof p.BorderY)b.outlineHeight=T.value;else if(T instanceof p.Shadow)b.shadowDepthX=T.value,
b.shadowDepthY=T.value;else if(T instanceof p.ShadowX)b.shadowDepthX=T.value;else if(T instanceof p.ShadowY)b.shadowDepthY=T.value;else if(T instanceof p.Blur)b.blur=T.value;else if(T instanceof p.GaussianBlur)b.gaussianBlur=T.value;else if(T instanceof p.FontName)b.fontName=T.value;else if(T instanceof p.FontSize)b.fontSize=T.value;else if(T instanceof p.FontSizePlus)b.fontSize+=T.value;else if(T instanceof p.FontSizeMinus)b.fontSize-=T.value;else if(T instanceof p.FontScaleX)b.fontScaleX=T.value;else if(T instanceof p.FontScaleY)b.fontScaleY=T.value;else if(T instanceof p.LetterSpacing)b.letterSpacing=T.value;else if(T instanceof p.RotateX)b.rotationX=T.value;else if(T instanceof p.RotateY)b.rotationY=T.value;else if(T instanceof p.RotateZ)b.rotationZ=T.value;else if(T instanceof p.SkewX)b.skewX=T.value;else if(T instanceof p.SkewY)b.skewY=T.value;else if(T instanceof p.PrimaryColor)b.primaryColor=T.value;else if(T instanceof p.SecondaryColor)b.secondaryColor=T.value;else if(T instanceof p.OutlineColor)b.outlineColor=T.value;else if(T instanceof p.ShadowColor)b.shadowColor=T.value;else if(T instanceof p.Alpha)b.primaryAlpha=T.value,
b.secondaryAlpha=T.value,b.outlineAlpha=T.value,b.shadowAlpha=T.value;else if(T instanceof p.PrimaryAlpha)b.primaryAlpha=T.value;else if(T instanceof p.SecondaryAlpha)b.secondaryAlpha=T.value;else if(T instanceof p.OutlineAlpha)b.outlineAlpha=T.value;else if(T instanceof p.ShadowAlpha)b.shadowAlpha=T.value;else if(T instanceof p.Alignment);else if(T 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+=T.duration;else if(T instanceof p.WrappingStyle)C=T.value;else if(T instanceof p.Reset)b.reset(this.ass.styles.get(T.value));else if(T instanceof p.Position)c.style.position="absolute",c.style.left=(this._scaleX*T.x).toFixed(3)+"px",
c.style.top=(this._scaleY*T.y).toFixed(3)+"px";else if(T instanceof p.Move)c.style.position="absolute",
d.add("linear",[new s.Keyframe(0,new m.Map([["left",(this._scaleX*T.x1).toFixed(3)+"px"],["top",(this._scaleY*T.y1).toFixed(3)+"px"]])),new s.Keyframe(T.t1,new m.Map([["left",(this._scaleX*T.x1).toFixed(3)+"px"],["top",(this._scaleY*T.y1).toFixed(3)+"px"]])),new s.Keyframe(T.t2,new m.Map([["left",(this._scaleX*T.x2).toFixed(3)+"px"],["top",(this._scaleY*T.y2).toFixed(3)+"px"]])),new s.Keyframe(e.end-e.start,new m.Map([["left",(this._scaleX*T.x2).toFixed(3)+"px"],["top",(this._scaleY*T.y2).toFixed(3)+"px"]]))]);else if(T instanceof p.Fade)d.add("linear",[new s.Keyframe(0,new m.Map([["opacity","0"]])),new s.Keyframe(T.start,new m.Map([["opacity","1"]])),new s.Keyframe(e.end-e.start-T.end,new m.Map([["opacity","1"]])),new s.Keyframe(e.end-e.start,new m.Map([["opacity","0"]]))]);else if(T instanceof p.ComplexFade)d.add("linear",[new s.Keyframe(0,new m.Map([["opacity",T.a1.toFixed(3)]])),new s.Keyframe(T.t1,new m.Map([["opacity",T.a1.toFixed(3)]])),new s.Keyframe(T.t2,new m.Map([["opacity",T.a2.toFixed(3)]])),new s.Keyframe(T.t3,new m.Map([["opacity",T.a2.toFixed(3)]])),new s.Keyframe(T.t4,new m.Map([["opacity",T.a3.toFixed(3)]])),new s.Keyframe(e.end-e.start,new m.Map([["opacity",T.a3.toFixed(3)]]))]);else if(T instanceof p.Transform)for(var w=o<=T.start?0:o>=T.end?1:Math.pow((o-T.start)/(T.end-T.start),T.accel),E=0,x=T.tags;E<x.length;E++){
var A=x[E];A instanceof p.Border?(b.outlineWidth+=w*(A.value-b.outlineWidth),b.outlineHeight+=w*(A.value-b.outlineHeight)):A instanceof p.BorderX?b.outlineWidth+=w*(A.value-b.outlineWidth):A instanceof p.BorderY?b.outlineHeight+=w*(A.value-b.outlineHeight):A instanceof p.Shadow?(b.shadowDepthX+=w*(A.value-b.shadowDepthX),
b.shadowDepthY+=w*(A.value-b.shadowDepthY)):A instanceof p.ShadowX?b.shadowDepthX+=w*(A.value-b.shadowDepthX):A instanceof p.ShadowY?b.shadowDepthY+=w*(A.value-b.shadowDepthY):A instanceof p.Blur?b.blur+=w*(A.value-b.blur):A instanceof p.GaussianBlur?b.gaussianBlur+=w*(A.value-b.gaussianBlur):A instanceof p.FontSize?b.fontSize+=w*(A.value-b.fontSize):A instanceof p.FontSizePlus?b.fontSize+=w*A.value:A instanceof p.FontSizeMinus?b.fontSize-=w*A.value:A instanceof p.FontScaleX?b.fontScaleX+=w*(A.value-b.fontScaleX):A instanceof p.FontScaleY?b.fontScaleY+=w*(A.value-b.fontScaleY):A instanceof p.LetterSpacing?b.letterSpacing+=w*(A.value-b.letterSpacing):A instanceof p.RotateX?b.rotationX+=w*(A.value-b.rotationX):A instanceof p.RotateY?b.rotationY+=w*(A.value-b.rotationY):A instanceof p.RotateZ?b.rotationZ+=w*(A.value-b.rotationZ):A instanceof p.SkewX?b.skewX+=w*(A.value-b.skewX):A instanceof p.SkewY?b.skewY+=w*(A.value-b.skewY):A instanceof p.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(A.value,w):A instanceof p.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(A.value,w):A instanceof p.OutlineColor?b.outlineColor=b.outlineColor.interpolate(A.value,w):A instanceof p.ShadowColor?b.shadowColor=b.shadowColor.interpolate(A.value,w):A instanceof p.Alpha?(b.primaryAlpha+=w*(A.value-b.primaryAlpha),
b.secondaryAlpha+=w*(A.value-b.secondaryAlpha),b.outlineAlpha+=w*(A.value-b.outlineAlpha),b.shadowAlpha+=w*(A.value-b.shadowAlpha)):A instanceof p.PrimaryAlpha?b.primaryAlpha+=w*(A.value-b.primaryAlpha):A instanceof p.SecondaryAlpha?b.secondaryAlpha+=w*(A.value-b.secondaryAlpha):A instanceof p.OutlineAlpha?b.outlineAlpha+=w*(A.value-b.outlineAlpha):A instanceof p.ShadowAlpha&&(b.shadowAlpha+=w*(A.value-b.shadowAlpha))
}else T instanceof p.DrawingMode?0!==T.scale&&(D.scale=T.scale):T instanceof p.DrawingBaselineOffset?D.baselineOffset=T.value:T instanceof p.DrawingInstructions?(y.appendChild(D.toSVG(T,b.primaryColor.withAlpha(b.primaryAlpha))),M(!1)):T instanceof p.Text?(y.appendChild(document.createTextNode(T.value+"\u200c")),M(!1)):h.debugMode&&T instanceof p.Comment?(y.appendChild(document.createTextNode(T.value)),M(!1)):T instanceof p.NewLine&&M(!0)}for(var N=0,L=e.parts;N<L.length;N++){var T=L[N]
;if(T instanceof p.Position||T 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(o.createSelector)(Object(u.a)(),Object(c.a)(),Object(l.a)(),function(e,t,n){return{serverEntityID:e.serverEntityID,chapters:t.chapters,activeChapterIndex:n}})}function r(e,t){var n=t.playerType;return{onSeekTo:function(t){e(s.m({playerType:n,positionSeconds:t}))}}}var a=n(11),o=n(5),s=(n.n(o),n(136)),l=n(2704),c=n(568),u=n(79),d=n(2705);t.a=Object(a.b)(i,r)(d.a)},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(Object(a.a)("positionSeconds"),Object(o.a)(),function(e,t){return t&&t.chapters?t.chapters.findIndex(function(t){return Math.floor(t.startTimeOffset/1e3)<=e&&Math.floor(t.endTimeOffset/1e3)>e}):-1})}var r=n(5),a=(n.n(r),n(158)),o=n(168);t.a=i},function(e,t,n){"use strict";var i=n(6),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(3)),g=n(473),m=n(1139),y=n(2716),b=n(1140),I=n(138),S=n(2720),M=n.n(S),D=b.b(),C=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onHubCellScrollIndexChange=function(e){r.setState({scrollIndex:e,scrollIndexIsActiveChapter:!1})},r.state={scrollIndex:r.props.activeChapterIndex,scrollIndexIsActiveChapter:!0,activeChapterIndex:r.props.activeChapterIndex},r}return p()(t,e),t.getDerivedStateFromProps=function(e,t){return t.activeChapterIndex!==e.activeChapterIndex?{
scrollIndex:e.activeChapterIndex,scrollIndexIsActiveChapter:!0,activeChapterIndex:e.activeChapterIndex}:null},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.bottom,i=e.activeChapterIndex,a=e.chapters,s=e.onSeekTo;return o()(m.a,{className:M.a.container,bottom:n},void 0,o()(g.a,{hubIdentifier:"chapters",title:Object(v.default)("Chapter selection"),size:a.length,keyPropName:"index",items:a.map(function(e,t){return r()({},e,{isActive:t===i})}),layout:D,
cellRenderer:Object(I.a)({serverEntityID:t,onSeekTo:s},y.a),scrollIndex:this.state.scrollIndex,shouldCenterScrollIndex:this.state.scrollIndexIsActiveChapter,onListScrollIndexChange:this.onHubCellScrollIndexChange}))},t}(f.Component);t.a=C},function(e,t){e.exports={attribution:"AttributionBadge-attribution-1XPCz",tidal:"AttributionBadge-tidal-2hHYz"}},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(3)),f=n(25),v=n(1137),g=n(157),m=n(2709),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.state={isEntered:!1,isFocused:!1,isRemoveConfirmModalOpen:!1},i.onPress=function(){var e=i.props,t=e.isHomeHub,n=e.shouldConfirmHomeHubRemoval,r=e.onToggleHomeHub;t&&n?i.setState({isRemoveConfirmModalOpen:!0}):r()},i.onRemoveHomeHubConfirm=function(){i.setState({
isRemoveConfirmModalOpen:!1},i.props.onToggleHomeHub)},i.onRemoveHomeHubCancel=function(){i.setState({isRemoveConfirmModalOpen:!1})},i.onFocus=function(e){i.setState({isFocused:!0})},i.onBlur=function(e){i.setState({isFocused:!1})},i.onMouseEnter=function(e){i.setState({isEntered:!0})},i.onMouseLeave=function(e){i.setState({isEntered:!1})},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.allowHomeHubIndicator,n=e.className,i=e.isHomeHub,a=e.isVisible,o=e.shouldConfirmHomeHubRemoval,s=this.state,l=s.isEntered,c=s.isFocused,u=s.isRemoveConfirmModalOpen,d=i&&t,p=l||c;return r()("div",{className:(n||"")+" "+((a||p?y.a.isVisible:y.a.isHidden)||"")},void 0,d?r()(f.a,{className:(y.a.icon||"")+" "+((d&&!p?y.a.isVisible:y.a.isHidden)||""),name:"plex-icon-navbar-home-560"}):null,r()(v.a,{className:(y.a.button||"")+" "+((!d||p?y.a.isVisible:y.a.isHidden)||""),
isMonochrome:!0,isRemovable:i,tooltip:i?Object(h.default)("Remove from Home"):Object(h.default)("Add to Home"),onPress:this.onPress,onFocus:this.onFocus,onBlur:this.onBlur,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave}),o?r()(g.a,{isOpen:u,metricsPage:"",title:Object(h.default)("Remove From Home"),message:Object(h.default)("Please confirm you'd like to remove this content from your home screen. You can add it back later if you change your mind."),
onConfirm:this.onRemoveHomeHubConfirm,onCancel:this.onRemoveHomeHubCancel}):null)},t}(p.Component);b.defaultProps={className:y.a.container,shouldConfirmHomeHubRemoval:!1},t.a=b},function(e,t){e.exports={button:"AddOrRemoveButton-button-3FgmE IconButton-button-9An-7",icon:"AddOrRemoveButton-icon-2m9zy",iconRemovable:"AddOrRemoveButton-iconRemovable-3pNZ1 AddOrRemoveButton-icon-2m9zy"}},function(e,t){e.exports={container:"HubTitleToggleHomeHubButton-container-2IqMs",
icon:"HubTitleToggleHomeHubButton-icon-1jwJT AddOrRemoveButton-icon-2m9zy",button:"HubTitleToggleHomeHubButton-button-2V6cQ AddOrRemoveButton-button-3FgmE IconButton-button-9An-7",isHidden:"HubTitleToggleHomeHubButton-isHidden-2ozuy",isVisible:"HubTitleToggleHomeHubButton-isVisible-WlFUS"}},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e,t){return t.directoryKey},function(e,t){return t.homeHubID},Object(b.a)(),Object(M.a)(),D.a,function(e,t,n,i,r){
var a=!(!r||!n)&&n.type!==I.a;return t?{isHomeHub:!0,canAddHomeHub:!1,canRemoveHomeHub:!0}:{isHomeHub:i,canAddHomeHub:a&&!i&&!!e,canRemoveHomeHub:a&&i}})}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(474)),I=n(780),S=n(204),M=n(1138),D=n(398),C={dispatchAddHomeHubs:S.b,dispatchRemoveHomeHubs:S.j},O=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.onAddHomeHub=function(){var e=i.props;(0,e.dispatchAddHomeHubs)({isUserInitiated:!0,hubs:[{directoryKey:e.directoryKey,entityID:e.hubEntityID}]})},i.onRemoveHomeHub=function(){var e=i.props,t=e.dispatchRemoveHomeHubs,n=e.homeHubID,r=e.hubEntityID,a=[];n?a.push({homeHubID:n}):r&&a.push({entityID:r}),t({isUserInitiated:!0,hubs:a})},i.onToggleHomeHub=function(){
var e=i.props,t=e.canAddHomeHub;e.canRemoveHomeHub?i.onRemoveHomeHub():t&&i.onAddHomeHub()},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.canAddHomeHub,n=e.canRemoveHomeHub,i=e.component,r=(e.directoryKey,e.dispatchAddHomeHubs,e.dispatchRemoveHomeHubs,e.hubEntityID,e.isHomeHub),o=s()(e,["canAddHomeHub","canRemoveHomeHub","component","directoryKey","dispatchAddHomeHubs","dispatchRemoveHomeHubs","hubEntityID","isHomeHub"])
;return t||n?g.a.createElement(i,a()({},o,{isHomeHub:r,onAddHomeHub:this.onAddHomeHub,onRemoveHomeHub:this.onRemoveHomeHub,onToggleHomeHub:this.onToggleHomeHub})):null},t}(v.Component);t.a=Object(m.b)(i,C)(O)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(l.a,s.a,o.a,Object(a.a)(),function(e,t,n,i){if(i&&n&&t&&e.hubs){var r=c.a(i,n,t);return e.hubs.find(function(e){return e.id===r})}})}t.a=i;var r=n(5),a=(n.n(r),n(474)),o=n(37),s=n(50),l=n(344),c=n(686)
},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",hubActions:"HubCell-hubActions-28w1-",hubScrollButton:"HubCell-hubScrollButton-2Y7ri",hubScroller:"HubCell-hubScroller-2qgkr VirtualListScroller-scroller-3aWqh",title:"HubCell-title-UFv40 HubCellTitle-hubCellTitle-2abIn",attribution:"HubCell-attribution-2Ukv_",
titleSeparator:"HubCell-titleSeparator-_noi6 DashSeparator-separator-4CyEF",sourceTitle:"HubCell-sourceTitle-2X9oM",hubCellHeader:"HubCell-hubCellHeader-3s3KK HubCellHeader-hubCellHeader-2pvYN"}},function(e,t){e.exports={container:"AudioVideoStripeContainer-container-MI02O"}},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(20)),f=n(87),v=n(322),g=n(182),m=n(137),y=n(2718),b=n(1140),I=n(2719),S=n.n(I),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.onChapterPress=function(){var e=i.props,t=e.onSeekTo,n=e.startTimeOffset;t(Math.round(n/1e3))},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.index,i=e.thumb,a=e.tag,o=e.isActive,s=e.startTimeOffset,l=e.cellX,c=e.cellY,u=e.cellWidth,d=e.cellHeight,p=n;return r()(f.a,{cellX:l,cellY:c,cellWidth:u,cellHeight:d},void 0,r()(h.a,{className:(S.a.thumbWrapper||"")+" "+(o&&S.a.isActive||""||""),onPress:this.onChapterPress},void 0,r()(g.a,{serverEntityID:t,url:i,background:!0,backgroundSize:"contain",width:u,height:b.a(d)},p)),r()("div",{className:S.a.titleContainer},void 0,r()("div",{className:S.a.title
},void 0,Object(y.a)(n,a)),r()("div",{className:S.a.secondaryTitle},void 0,Object(v.a)(s))))},t}(p.Component);t.a=Object(m.a)(M)},function(e,t){e.exports={cell:"virtualized-cell-3KPHx",isMoving:"virtualized-isMoving-a-wk0"}},function(e,t,n){"use strict";function i(e,t){return t||Object(r.default)("Chapter {index}",{index:e})}t.a=i;var r=n(3)},function(e,t){e.exports={thumbWrapper:"VideoChapterCell-thumbWrapper-1ofw_",isActive:"VideoChapterCell-isActive-VaLoS",
titleContainer:"VideoChapterCell-titleContainer-2B15T",title:"VideoChapterCell-title-b2bbc",secondaryTitle:"VideoChapterCell-secondaryTitle-3vGCq"}},function(e,t){e.exports={container:"VideoChapters-container-1hROw AudioVideoStripeContainer-container-MI02O"}},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),o.a,function(e,t){return Object(l.a)(Object(s.a)(e.identifier,e.providerIdentifier),t)})}var r=n(5),a=(n.n(r),n(233)),o=n(185),s=n(514),l=n(755);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(15)),f=n(3),v=n(1081),g=n(404),m=n(2724),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.c)("appModel").on("change:history",this.onRouteChange)},t.prototype.componentWillUnmount=function(){Object(h.c)("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()(g.a,{
className:y.a.topButton,"data-qa-id":"minimizePlayerButton",icon:"plex-icon-player-collapse-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()(v.a,{className:y.a.castButton,onMenuChange:c}),i&&a&&r()(g.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()(g.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){e.exports={playerButton:"PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",isPrimary:"PlayerIconButton-isPrimary-cD9yV"}},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",remotePlayerName:"FullPlayerTopControls-remotePlayerName-32QaK",remotePlayerProduct:"FullPlayerTopControls-remotePlayerProduct-2k5kg"}},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(3)),f=n(196),v=n(2726),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.onToggleFullscreen()},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,"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:"PlayPauseOverlay-playButton-25OfW PlayButton-playButton-3WX8X",
pauseButton:"PlayPauseOverlay-pauseButton-hSFg5 PlayPauseOverlay-playButton-25OfW PlayButton-playButton-3WX8X",playCircle:"PlayPauseOverlay-playCircle-3ydPY PlayButton-playCircle-3Evfd"}},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(h.a)(),function(e){if(e){var t=l.a.findWhere(e.features,{type:c.b.SETTINGS});if(t){var n=l.a.findWhere(t.settings,{id:u.b.PLAYBACK_SPEED});if(n)return n}}})}function r(){
return Object(o.createSelector)(Object(p.a)("controllable"),Object(f.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(d.d({playerType:n,playbackSpeed:t}))}}}var o=n(5),s=(n.n(o),n(7)),l=n.n(s),c=n(60),u=n(314),d=n(136),p=n(158),h=n(233),f=n(1121),v=n(55),g=n(2728),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(3)),f=n(331),v=n(1143),g=n(1144),m=n(719),y=n(2731),b=n.n(y),I=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:b.a.slider,min:i.min,max:i.max,stepSize:i.step,value:this.state.playbackSpeed,onChange:this.onPlaybackSpeedChange}),Object(m.a)(n)))},t
}(p.Component);I.defaultProps={playbackSpeedSetting:{min:.5,max:2,step:.1}},t.a=I},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){e.exports={bottomBar:"BottomBar-bottomBar-gbDBa"}},function(e,t){e.exports={controlsContainer:"ControlsContainer-controlsContainer-1Wn7v"}},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()(c.a,{
className:h.a.skipAdButton,onPress:i},void 0,Object(u.default)("Skip Ad")):Object(u.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(u.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(20)),u=n(3),d=n(783),p=n(2736),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(){return Object(a.createSelector)(function(e,t){return t.isVideo},function(e,t){return t.isMusic},function(e,t){return t.isAdVisible},function(e,t){return t.disableNextButton},function(e,t){return t.disablePreviousButton
},function(e,t){return t.showRepeatButton},Object(c.a)(),Object(s.a)(),Object(o.a)(),Object(l.a)(),function(e,t,n,i,r,a,o,s,l,c){var h=o.isPostPlayVisible,f=o.positionSeconds,v=o.durationSeconds,g=o.controllable,m=v-f,y=s.subtype===p.a,b=s.subtype===p.b,I=l&&l.chapters&&l.chapters.length>0,S=e&&!y&&!h||b,M=!!g&&(!g.playbackSpeed&&t);return{positionSeconds:f,durationSeconds:v,hasLiveTVProtocol:c.protocols.includes("livetv"),
disableLyricsButton:!(s.hasPremiumLyrics||s.lyricsStreams&&s.lyricsStreams.length),disableNextButton:n||i,disablePreviousButton:n||r,disableQueueButton:n,disableSettingsButton:M,disableSkipForwardButton:m<=u.b,showChaptersButton:e&&!h&&I,showDuration:!h,showLyricsButton:t&&!b,showMenuButton:!h&&!y,showQueueButton:!0,showSettingsButton:(!Object(d.a)()&&t||e)&&!h&&!y,showShuffleButton:!y,showSkipBackButton:S,showSkipForwardButton:S}})}var r=n(11),a=n(5),o=(n.n(a),
n(568)),s=n(128),l=n(233),c=n(79),u=n(321),d=n(318),p=n(98),h=n(784),f=Object(r.b)(i)(h.a);t.a=f},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,p=e.subtype,f=e.positionSeconds,v=e.context,g=e.showStarRating,m=e.hasUserRating,y=e.showDuration,b=e.durationSeconds;if(!o||!s)return null;var I=Object(d.b)(s,v,{subtype:p,providerEntityID:r});return a()("div",{
className:(t||"")+" "+(g&&m&&h.a.hasUserRating||""||"")},void 0,I.map(function(e,t){return a()(l.a,{playerType:n,serverEntityID:i,providerEntityID:r,metadataItemEntityID:o,positionSeconds:f,component:e,isSecondary:t>0},t)}),y&&b&&null!=f?a()(u.a,{className:h.a.durationContainer,durationSeconds:b,positionSeconds:f,"data-qa-id":"mediaDuration"}):null,g?a()(c.a,{className:h.a.ratingContainer,serverEntityID:i,providerEntityID:r,metadataItemEntityID:o}):null)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(32),n(249)),c=n(476),u=n(2743),d=n(187),p=n(2781),h=n.n(p);i.defaultProps={className:h.a.container},t.a=i},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,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(2741));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()(P.a,{name:n,className:a})}function a(e){
return I.a.createElement(r,v()({icon:"plex-icon-star-empty-560",className:x.a.emptyStar},e))}function o(e){return I.a.createElement(r,v()({icon:"plex-icon-star-full-560",className:x.a.fullStar},e))}function s(){return m()(P.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(6),v=n.n(f),g=n(2),m=n.n(g),y=n(1),b=(n.n(y),
n(0)),I=n.n(b),S=n(7),M=n.n(S),D=n(269),C=n(27),O=n(3),P=n(25),j=n(331),T=n(785),w=n.n(T),E=n(2742),x=n.n(E),A=Object(D.a)(w.a.starPulseSpeed),N=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})},A))},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=M.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()(j.a,{className:x.a.slider,trackClassName:x.a.track,label:Object(O.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}(b.Component);N.defaultProps={starCount:5,value:0},t.a=N},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"
;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(20)),f=n(322),v=n(2744),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()(h.a,{className:t,
"data-qa-id":"mediaDuration",onPress:this.onTogglePress},void 0,this.state.isToggled?"-"+Object(f.a)(s):Object(f.a)(a)," / ",Object(f.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){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(c.a)(i,r,o,d)
;return p&&u?a()(l.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(20)),c=(n(88),n(125),n(133));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){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(1151));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=n.timeFormat,r=void 0===i?"h:mma":i;if(null==e)return"";var h=a.a.unix(e);if(Object(p.a)(e))return Object(o.default)("Yesterday");0===h.minutes()&&(r=r.replace("h:mm","h"));var f=Object(s.default)(e,r),v=void 0
;return v=Object(c.a)(e)?Object(d.a)(e)?Object(o.default)("Tonight"):Object(o.default)("Today"):Object(u.a)(e)?Object(o.default)("Tomorrow"):Object(l.a)(e)?Object(s.default)(e,"dddd"):Object(s.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(48),a=n.n(r),o=n(3),s=n(406),l=n(1159),c=n(407),u=n(1160),d=n(1161),p=n(572)},function(e,t){e.exports={separator:"MetadataTitleAirDate-separator-2i3bJ DashSeparator-separator-4CyEF"}
},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(5),o=(n.n(a),n(787)),s=n(2751);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(477));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(1164));i.defaultProps={longName:!0},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(r.a)(t)),e.useLongName?Object(a.default)("Season {seasonNumber}",{seasonNumber:t}):Object(a.default)("S{seasonNumber}",{seasonNumber:t}))}var r=n(667),a=n(3);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(5),o=(n.n(a),n(22)),s=n(2755);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(2756));t.a=i},function(e,t,n){"use strict";var i=n(3),r=n(262),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(){return Object(r.createSelector)(function(e,t){return t.listType
},Object(a.a)(),function(e,t){if(t&&!t.skipDetails&&!t.isExtra&&!t.radio&&(e!==s.g||t.type===s.h))return t.type===s.l&&t.subtype!==o.b?t.skipParent?t.grandparentKey:t.parentKey:t.key})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(98),s=n(26)},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(5),o=(n.n(a),
n(22)),s=n(408),l=n(402),c=Object(r.b)(i)(l.a);c.isDoubleLine=!0,t.a=c},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(5),o=(n.n(a),n(22)),s=n(2760);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(791));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(5),o=(n.n(a),n(22)),s=n(2762);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(239)),c=n(576),u=n(1107);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(5),o=(n.n(a),n(22)),s=n(2764);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";function i(){return Object(a.createSelector)(s.a,o.a,s.c,o.c,function(e,t,n,i){return e&&n&&e.machineIdentifier!==n.machineIdentifier?{sourceTitle:n.sourceTitle||n.friendlyName}:{}})}var r=n(11),a=n(5),o=(n.n(a),n(37)),s=n(50),l=n(2766);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.sourceTitle;return n?a()("span",{className:t},void 0,Object(l.default)("from {sourceTitle}",{sourceTitle:n})):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3));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=c.a.get(p),v=f.typeString,g=d||v+"="+o,m={filters:g,filterLabel:s},y=i.isLibraryProvider?r:h,b=Object(u.a)(n,i,y,m);return a()(l.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(20)),c=n(399),u=(n(88),n(125),n(133));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(5),o=(n.n(a),n(34)),s=n(2769);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(c.default)("on")," ",a()(l.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(20)),c=n(3);t.a=i},function(e,t,n){"use strict";function i(e){switch(e.split(":")[0]){case"addedAt":return r.a;case"duration":return l.a;case"lastViewedAt":return c.a;case"originallyAvailableAt":return d.a
;case"rating":return s.a;case"userRating":return h.a;case"viewCount":return u.a;case"mediaBitrate":return a.a;case"contentRating":return o.a;case"mediaHeight":return p.a;case"year":return f.a}}t.a=i;var r=n(1150),a=n(1168),o=n(1169),s=n(794),l=n(1170),c=n(1171),u=n(2777),d=n(1172),p=n(1173),h=n(476),f=n(342)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.type,i=e.bitrate,r=n===u.a?Object(l.a)(i):Object(c.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(951)),c=n(443),u=n(58);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(793));t.a=i},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(2774));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(3),f=n(2775),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(1151));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(5),o=(n.n(a),n(22)),s=n(2778);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(3));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(266));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(369))
;t.a=i},function(e,t){e.exports={container:"PlayerControlsMetadata-container-2wqMf",ratingContainer:"PlayerControlsMetadata-ratingContainer-1bg_5",hasUserRating:"PlayerControlsMetadata-hasUserRating-2bCRc",durationContainer:"PlayerControlsMetadata-durationContainer-3UDmW DurationRemaining-container-1F4w8"}},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(u.a)(),function(e){return{metadataItemEntityID:e&&e.entityID}})}
var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(573)),d=n(1149),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(){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(5),o=(n.n(a),n(573)),s=n(2784);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(250)),f=n(2811),v=n(2814),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(M.createSelector)(function(e,t){return t.subscriptionType},function(e){return"playlist"===e?"show":e})}function r(){return Object(M.createSelector)(Object(P.a)(),i(),function(e,t){var n=Object(L.s)(t);return e.filter(function(e){return Object(L.q)(e.type).id===n.id}).map(function(e){return{librarySectionID:e.key,locations:e.locations,title:e.title}})})}function a(){return Object(M.createSelector)(R.a,Object(T.a)(),Object(j.a)(),function(e){return e.ui.mediaSubscriptionModal
},w.a,E.a,i(),r(),function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments[5],o=arguments[6],s=arguments[7],l=C.a.omit(i,"templates","mediaSubscription"),c=r.key,u=r.grabOperations,d=void 0===u?[]:u,p=r.prefs,h=m()(r,["key","grabOperations","prefs"]),f=void 0,g=void 0,y=void 0;a.length>1?(g=C.a.findIndex(a,function(e){return e.selected}),f=a.map(function(e,t){var n,i=e.title;return n={},n[t]=i,n})):(g=0,f=h.title?[{0:h.title}]:null),
d.length&&(y=d.reduce(function(e,t){return t.conflicts&&t.conflicts.length?e.concat(t.conflicts):e},[]));var b=C.a.groupBy(p,function(e){return e.advanced?"advanced":"basic"});b.basic=C.a.indexBy(b.basic,"id");var I=Object(x.a)(n),S=I?I.directories[0]:null,M=S?S.hubKey||S.key:null;return v()({isTypeFirstEnabled:e,mediaSubscriptionKey:c,prefGroups:b,metadataType:o,libraries:s,initialMode:g,modes:f,conflicts:y,server:t,provider:n,source:M},l,h)})}
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(6),v=n.n(f),g=n(12),m=n.n(g),y=n(1),b=(n.n(y),n(0)),I=n.n(b),S=n(11),M=n(5),D=(n.n(M),n(7)),C=n.n(D),O=n(1174),P=n(548),j=n(51),T=n(34),w=n(2787),E=n(2788),x=n(397),A=n(35),N=n(3),L=n(26),k=n(130),_=n(183),R=n(398),z=n(721),U=n(2789),B=n(2790),F=n(2801),V=n(2809),H={dispatchAddLibrary:_.a,dispatchInitMediaSubscriptionModal:O.d,dispatchClearMediaSubscriptionModal:O.b,dispatchSaveMediaSubscription:O.g,
dispatchChangeMediaSubscriptionTemplateMode:O.a,dispatchMoveMediaSubscriptionModal:O.f,dispatchDeleteMediaSubscriptionModal:O.c},Q=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(A.a)(function(){r.props.dispatchChangeMediaSubscriptionTemplateMode({modeIndex:e})})},r.onMediaMove=function(){r.props.dispatchMoveMediaSubscriptionModal()},r.onCreatePress=function(){
var e=r.props,t=e.metadataType,n=e.serverEntityID,i=Object(L.s)(t),a=i.typeString,o=k.f.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(A.a)(function(){e.dispatchInitMediaSubscriptionModal({serverEntityID:t,mediaSubscriptionEntityID:n,metadataItemEntityID:i,showConflicts:r})})},t.prototype.render=function(){return this.props.mediaSubscriptionError?s()(z.a,{message:Object(N.default)("There was an unexpected error"),onModalClose:this.props.onModalClose
}):this.props.isMediaSubscriptionPending||!this.props.isMediaSubscriptionPopulated?s()(U.a,{onModalClose:this.props.onModalClose}):this.props.libraries.length?this.state.showConflicts?I.a.createElement(B.a,v()({},this.props,{onDelete:this.onDelete,onMediaMove:this.onMediaMove})):I.a.createElement(F.a,v()({},this.props,{onModeChange:this.onModeChange,onSubmit:this.onSubmit,onDelete:this.onDelete})):I.a.createElement(V.a,v()({},this.props,{onCreatePress:this.onCreatePress,onDelete:this.onDelete}))
},t}(b.Component);Q.defaultProps={showConflicts:!1},t.a=Object(S.b)(a,H)(Q)},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"MediaSubscriptionTargetModel",context:["server"],syncedAttrs:{guid:r.a.string,grandparentGuid:r.a.string,title:r.a.string,type:r.a.string,grandparentTitle:r.a.string,index:r.a.integer,parentIndex:r.a.integer,year:r.a.string,grandparentYear:r.a.integer,originallyAvailableAt:r.a.string,thumb:r.a.string,parentThumb:r.a.string,grandparentThumb:r.a.string}
});t.a=a},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(795)),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(5),r=(n.n(i),n(795)),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";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(31),c=n(1042),u=a()(l.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(42)),f=n(59),v=n(82),g=n(112),m=n(78),y=n(19),b=n(241),I=n(3),S=n(195),M=n(124),D=n(191),C=n(95),O=n(23),P=n(2791),j=n(578),T=n(2800),w=n.n(T),E=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.isTypeFirstEnabled,l=e.serverEntityID,c=e.server,u=e.provider,d=e.source,p=e.target,T=e.conflicts,E=e.onDelete,x=e.onMediaMove,A=e.onModalClose,N=encodeURIComponent(c.machineIdentifier),L=encodeURIComponent(u.identifier);return r()(C.a,{onModalClose:A
},void 0,r()(m.a,{},void 0,Object(I.default)("Conflict Detected")),o?r()("div",{},void 0,r()(D.a,{errorMessage:Object(b.a)(o,Object(I.default)("There was a problem saving your changes..."))})):null,i?r()("div",{},void 0,r()(D.a,{errorMessage:Object(b.a)(i,Object(I.default)("There was a problem canceling..."))})):null,r()(f.a,{autoScroll:!0},void 0,r()(j.a,{serverEntityID:l,target:p},void 0,r()("div",{className:w.a.message
},void 0,1===T.length?Object(I.default)("Conflicts with 1 recording"):Object(I.default)("Conflicts with {conflictCount} recordings",{conflictCount:T.length})),r()("div",{className:w.a.conflicts},void 0,T.map(function(e,t){var n=e.metadataItem;return r()(P.a,{metadataItemEntityID:n},t)})))),r()(v.a,{},void 0,r()(g.a,{},void 0,r()(M.a,{isSpinning:n,kind:O.b.DANGER,onPress:E},void 0,Object(I.default)("Cancel This")),r()(M.a,{isSpinning:a,kind:O.b.PRIMARY,onPress:x
},void 0,Object(I.default)("Prefer This")),t?r()(h.a,{kind:O.b.PRIMARY,onPress:A},void 0,Object(I.default)("Close")):r()(h.a,{kind:O.b.PRIMARY,to:s?y.join(["#!",S.a,N,L,"schedule"],{source:d}):"#!/server/"+N+"/schedule"},void 0,Object(I.default)("Manage")))))},t}(p.Component);E.defaultProps={conflicts:[]},t.a=E},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(5),u=(n.n(c),n(22)),d=n(2792);t.a=Object(l.b)(i)(r)},function(e,t,n){"use strict";function i(e){switch(e){case"movie":case"show":return[v.a];case"episode":return[f.a,g.a];case"playlist":default:return[v.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(6),o=n.n(a),s=n(2),l=n.n(s),c=n(12),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(2793),v=n(762),g=n(281),m=n(2794),y=n(2796),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(5),o=(n.n(a),n(22)),s=n(796);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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2795),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,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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(2798),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){e.exports={message:"MediaSubscriptionConflict-message-1ZbxO",conflicts:"MediaSubscriptionConflict-conflicts-3hyQu"}},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(42),b=n(20),I=n(181),S=n(59),M=n(82),D=n(112),C=n(78),O=n(241),P=n(3),j=n(25),T=n(124),w=n(191),E=n(95),x=n(23),A=n(2802),N=n(2804),L=n(2805),k=n(2808),_=n.n(k),R=o()(A.a,{}),z=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.onCancelPress=function(){r.setState({showCancelConfirmation:!0})},r.onBackPress=function(){r.setState({showCancelConfirmation:!1})},
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,showCancelConfirmation:!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.onSubmit,p=e.onDelete,h=l()(e,["mediaSubscriptionKey","isMediaSubscriptionSaving","mediaSubscriptionSaveError","isMediaSubscriptionDeleting","mediaSubscriptionDeleteError","prefGroups","onModalClose","onSubmit","onDelete"]),f=this.state,v=f.isAdvanced,g=f.showCancelConfirmation,A=g&&_.a.cancelConfirmation||v&&_.a.advancedForm||_.a.baseForm
;return o()(I.b,{className:A,onChange:this.onFormChange,onSubmit:d},void 0,o()(E.a,{onModalClose:u},void 0,o()(C.a,{},void 0,g?Object(P.default)("Cancel Recording"):Object(P.default)("Record Options")),i&&o()("div",{},void 0,o()(w.a,{errorMessage:Object(O.a)(i,Object(P.default)("There was a problem saving your changes. Please try again."))})),s&&o()("div",{},void 0,o()(w.a,{errorMessage:Object(O.a)(s,Object(P.default)("There was a problem with canceling this subscription. Please try again."))
})),o()(S.a,{},void 0,o()("div",{className:_.a.baseSettings},"base",m.a.createElement(L.a,r()({selectedLibrarySectionID:this.state.selectedLibrarySectionID,prefs:c.basic},h))),o()("div",{className:_.a.advancedSettings},"advanced",m.a.createElement(N.a,r()({prefs:c.advanced},h))),g?R:null),o()(M.a,{className:g?_.a.cancelConfirmationFooter:_.a.footer},void 0,g?null:o()(D.a,{},void 0,o()(b.a,{kind:x.b.PRIMARY,onPress:this.onAdvancedPress},void 0,o()(j.a,{className:_.a.advancedIcon,
name:"plex-icon-settings-560"}),v?Object(P.default)("Show Basic"):Object(P.default)("Show Advanced"))),g?o()(D.a,{},void 0,o()(y.a,{onPress:this.onBackPress},void 0,Object(P.default)("Back")),o()(T.a,{isSpinning:a,kind:x.b.DANGER,onPress:p},void 0,Object(P.default)("Yes"))):o()(D.a,{},void 0,t?o()(y.a,{kind:x.b.DANGER,onPress:this.onCancelPress},void 0,Object(P.default)("Cancel Recording")):o()(y.a,{kind:x.b.DEFAULT,onPress:u},void 0,Object(P.default)("Cancel")),o()(T.a,{type:"submit",
isSpinning:n,kind:x.b.PRIMARY},void 0,t?Object(P.default)("Save"):Object(P.default)("Record"))))))},t}(g.Component);t.a=z},function(e,t,n){"use strict";function i(){return a()("div",{className:c.a.cancelConfirmationMessage},void 0,a()("div",{},void 0,Object(s.default)("Are you sure you want to cancel this recording?")),a()("div",{},void 0,Object(s.default)("This will cancel any future scheduled recordings and stop any recordings already in progress.")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),
n(3)),l=n(2803),c=n.n(l);t.a=i},function(e,t){e.exports={cancelConfirmationMessage:"CancelRecordingConfirmation-cancelConfirmationMessage-3l-kt"}},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(6),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(458);t.a=i},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()(h.a,{serverEntityID:t,providerEntityID:n,target:i,useStaticHeight:b},void 0,a()(u.a,{flexWrap:"wrap"},void 0,a()(c.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()(c.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()(d.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(3)),c=n(1177),u=n(1178),d=n(2807),p=n(1179),h=n(578);t.a=i},function(e,t){e.exports={
grid:"FlexGrid-grid-Ws_Yk"}},function(e,t,n){"use strict";function i(e,t){var n=d.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[d.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()(f.a,{flexWrap:"wrap"},void 0,s()(h.a,{flexBasis:230,maxWidth:230},void 0,s()(g.a,{
labelText:Object(p.default)("Add to Library"),name:"targetLibrarySectionID",initialValue:n,size:v.e.SMALL,values:t.map(function(e,t){var n,i=e.title,r=e.librarySectionID;return n={},n[r]=i,n})})),s()(h.a,{flexBasis:230,maxWidth:230},void 0,l.length>1&&s()(g.a,{labelText:Object(p.default)("Location"),name:"targetSectionLocationID",size:v.e.SMALL,initialValue:null==a?r(l):a,values:l})))}var o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(7)),d=n.n(u),p=n(3),h=n(1177),f=n(1178),v=n(23),g=n(1179)
;t.a=a},function(e,t){e.exports={baseForm:"MediaSubscriptionForm-baseForm-2bT5U",advancedForm:"MediaSubscriptionForm-advancedForm-26WFw",cancelConfirmation:"MediaSubscriptionForm-cancelConfirmation-2aCvU",advancedSettings:"MediaSubscriptionForm-advancedSettings-3dyPl",baseSettings:"MediaSubscriptionForm-baseSettings-2ssnb",footer:"MediaSubscriptionForm-footer-2U6dh ModalFooter-modalFooter-30WIB",
cancelConfirmationFooter:"MediaSubscriptionForm-cancelConfirmationFooter-3JtIn 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(42)),f=n(20),v=n(59),g=n(82),m=n(112),y=n(78),b=n(241),I=n(3),S=n(26),M=n(130),D=n(25),C=n(124),O=n(191),P=n(95),j=n(23),T=n(578),w=n(2810),E=n.n(w),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.onDelete,d=Object(S.s)(a),p=d.typeString,w=M.f.get(p),x=w.title;return r()(P.a,{onModalClose:c},void 0,r()(y.a,{},void 0,Object(I.default)("Record Options")),s&&r()(O.a,{errorMessage:Object(b.a)(s,Object(I.default)("There was a problem with canceling this subscription. Please try again."))
}),r()(v.a,{},void 0,r()(T.a,{serverEntityID:t,target:i},void 0,r()("div",{className:E.a.errorMessage},void 0,Object(I.default)("{type} Library Required",{type:x})),r()("p",{},void 0,n?Object(I.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:x
}):Object(I.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:x})),r()(f.a,{kind:j.b.PRIMARY,onPress:l},void 0,r()(D.a,{name:"plex-icon-add-560",className:E.a.addIcon})," ",Object(I.default)("Create Library")))),r()(g.a,{},void 0,r()(m.a,{},void 0,n&&r()(C.a,{isSpinning:o,kind:j.b.DANGER,onPress:u},void 0,Object(I.default)("Cancel Recording")),r()(h.a,{onPress:c
},void 0,Object(I.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";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{isRecording:!!e,recordingProgress:e&&e.progress}})}var r=n(11),a=n(5),o=(n.n(a),n(1180)),s=n(2812);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()("div",{className:f.a.recordButton},void 0,a()(u.a,{className:t?f.a.playerButtonRecording:f.a.playerButton,icon:"plex-icon-player-record-560","data-qa-id":"recordButton",title:Object(l.default)("Record"),onPress:i}),t?a()(c.a,{size:v,containerClassName:f.a.recordingProgressBarContainer,backgroundClassName:f.a.recordingProgressBackground,lineWidth:2,progress:n,showProgressText:!1}):null)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(3)),c=n(272),u=n(404),d=n(44),p=n.n(d),h=n(2813),f=n.n(h),v=parseInt(p.a.playerIconButtonSize,10);t.a=i},function(e,t){e.exports={recordButton:"LiveTVRecordButton-recordButton-3o22m",recordingProgressBarContainer:"LiveTVRecordButton-recordingProgressBarContainer-2S-XB undefined",recordingProgressBackground:"LiveTVRecordButton-recordingProgressBackground-3vdcH CircularProgressBar-circularProgressBarBackground-1a1VU CircularProgressBar-circularProgressBarBackground-RvD8O",
playerButton:"LiveTVRecordButton-playerButton-3pFcS PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",playerButtonRecording:"LiveTVRecordButton-playerButtonRecording-2gpjK LiveTVRecordButton-playerButton-3pFcS PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7"}},function(e,t){e.exports={recordButtonContainer:"LiveTVRecord-recordButtonContainer-vuoUX"}},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(l.a)(),function(e){
var t=c.e,n=Object(d.a)(null,f,e.type,e.subtype,e,t);return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:e.entityID,type:e.type,metadataKey:e.key,imageWidth:n.width,imageHeight:n.height,imageUrl:n.url}})}function r(e,t){var n=t.playerType,i={playerType:n};return{onExpandPress:function(t){e(s.b(i))}}}var a=n(11),o=n(5),s=(n.n(o),n(782)),l=n(168),c=n(32),u=n(2816),d=n(232),p=n(44),h=n.n(p),f=parseInt(h.a.playerControlsPosterHeight,10)
;t.a=Object(a.b)(i,r)(u.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.cardClassName,i=e.serverEntityID,r=e.providerEntityID,o=e.metadataItemEntityID,s=e.metadataKey,d=e.type,h=e.disableExpandButton,f=e.imageWidth,v=e.imageHeight,g=e.imageUrl,m=e.isMusic,y=e.onExpandPress,b=m?"music":s;return a()("div",{className:t,style:{width:f}},void 0,a()("div",{className:p.a.cardContainer},void 0,a()(u.a,{className:p.a.expandButton,"data-qa-id":"expandPlayerButton",
icon:"plex-icon-player-expand-560",isDisabled:h,title:Object(l.default)("Expand Player"),onPress:y}),a()(c.a,{cardClassName:n,serverEntityID:i,providerEntityID:r,metadataItemEntityID:o,metadataKey:b,type:d,imageWidth:f,imageHeight:v,imageUrl:g,showLinkOnly:!0})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3)),c=n(346),u=n(404),d=n(2831),p=n.n(d);i.defaultProps={className:p.a.miniPlayerPoster,cardClassName:p.a.card},t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.className,n=e.serverEntityID,i=e.providerEntityID,r=e.metadataItemEntityID,o=e.itemServerEntityID,l=e.itemProviderEntityID,u=e.type,d=e.subtype,v=e.selectionType,m=e.activeSelectionType,y=e.isSelected,b=e.isOffscreen,I=e.visibleFace,S=e.imageWidth,M=e.imageHeight,D=e.imageUrl,C=e.imageTransitionProps,O=e.icon,P=e.isFolder,j=e.onImageLoad,T=e.onImageError,w=e.onSelectItem,E=e.onDeselectItem,x=c()(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","itemServerEntityID","itemProviderEntityID","type","subtype","selectionType","activeSelectionType","isSelected","isOffscreen","visibleFace","imageWidth","imageHeight","imageUrl","imageTransitionProps","icon","isFolder","onImageLoad","onImageError","onSelectItem","onDeselectItem"])
;return s()("div",{className:(t||"")+" "+(g.a[I]||"")+" "+(y&&g.a.isSelected||""||"")},void 0,s()(h.a,{serverEntityID:n,providerEntityID:i,itemServerEntityID:o,itemProviderEntityID:l,type:u,subtype:d,isOffscreen:b,url:D,width:S,height:M,transitionProps:C,icon:O,isFolder:P,onLoad:j,onError:T}),p.a.createElement(f.a,a()({serverEntityID:n,providerEntityID:i,itemServerEntityID:o,itemProviderEntityID:l,metadataItemEntityID:r,type:u,selectionID:r,selectionType:v,activeSelectionType:m,isSelected:y,
onSelectItem:w,onDeselectItem:E},x)))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(247),f=n(2818),v=n(2829),g=n.n(v);i.defaultProps={className:g.a.face},t.a=i},function(e,t,n){"use strict";function i(){return Object(h.createSelector)(function(e,t){return t.type},function(e,t){return t.listType},Object(g.a)(),I.c,b.c,S.a,Object(E.a)(),Object(m.a)(),Object(y.a)(),function(e,t,n){
var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments[5],o=arguments[6],s=arguments[7],l=arguments[8],c=n.subtype,u=n.title,d=n.viewCount,p=n.viewOffset,h=n.unviewedLeafCount,f=n.smart,v=n.icon,g=n.metadataState,m=n.mediaState,y=n.deletedAt,b=n.subscriptionID,I=n.subscriptionType,S=n.grandparentSubscriptionID,j=n.grandparentSubscriptionType,w=n.isFolder,E=n.isPlaylist,x=n.Media,N=Object(A.j)(i,r,a,n),L=!!r.features.subscribe,k=Object(A.e)(i,r,a,n),_=t===P.g&&Object(A.f)(i,r,a,n),R=t===P.g&&Object(A.o)(i,r,a,n),z=Object(A.m)(i,r,a,n),U=P.q(e),B=P.p(e),F=x.length,V=null!=b||null!=S,H=!!f&&E,Q=v===M.a,Y=g===D.b,G=g===D.c||g===D.a,W=!Y&&!G&&!!m,K=Y||G||W,q=!K&&!!y
;return{server:i,provider:r,route:o,title:u,viewCount:d,viewOffset:p,viewPercent:s,unviewedLeafCount:h,mediaCount:F,subscriptionType:I||j,type:e,subtype:c,isSubscribed:V,isMultiVersion:Object(T.a)(n),isSmart:H,isFavorite:Q,isMatching:Y,isProcessing:G,isAnalyzing:W,isRefreshing:K,isTrash:q,showLink:!!o,showUnplayedBadge:Object(C.a)(n,U),showUnplayedNumberBadge:Object(O.a)(n,B),showPlay:N,showRecord:L,showEdit:k,showFavorite:_,showUnfavorite:R,showSelect:z,showMore:!w,beginsAt:l&&l.beginsAt,
endsAt:l&&l.endsAt}})}function r(e,t){var n={serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,itemServerEntityID:t.itemServerEntityID||t.serverEntityID,itemProviderEntityID:t.itemProviderEntityID||t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage,metricsContext:t.metricsContext};return{onPlayPress:function(){e(Object(v.m)(c()({},n,{options:{containerKey:t.containerKey,listType:t.listType}})))},onPlayLiveTVPress:function(){
e(Object(f.l)(c()({},n,{options:{containerKey:t.containerKey,listType:t.listType}})))},onEditPress:function(){e(Object(w.editMetadataItem)(n))},onFavoritePress:function(){e(Object(w.favoriteMetadataItem)(n))},onUnfavoritePress:function(){e(Object(w.unfavoriteMetadataItem)(n))}}}function a(e){var t=(e.server,e.provider),n=s()(e,["server","provider"]),i=c()({},n,{itemServerEntityID:e.itemServerEntityID||e.serverEntityID,itemProviderEntityID:e.itemProviderEntityID||e.providerEntityID})
;return t.protocols.livetv?p.a.createElement(L.a,i):e.showSelect&&!e.showLinkOnly?p.a.createElement(_,i):p.a.createElement(k.a,i)}var o=n(12),s=n.n(o),l=n(6),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(5),f=(n.n(h),n(186)),v=n(69),g=n(22),m=n(2819),y=n(405),b=n(37),I=n(50),S=n(185),M=n(761),D=n(1086),C=n(2820),O=n(2822),P=n(26),j=n(55),T=n(1181),w=n(167),E=n(408),x=n(479),A=n(278),N=n(339),L=(n(88),n(2823)),k=n(1183),_=Object(x.a)(k.a);t.a=Object(j.a)(i,r,N.a)(a)},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(5),a=(n.n(r),n(535)),o=n(22)},function(e,t,n){"use strict";function i(e,t){var n=e.type,i=e.subtype,s=e.viewCount,l=e.viewOffset,c=e.saved;if(null!=c&&!c)return!1;var u=n===a.l&&i===r.b,d=n===a.e&&i===r.c;return(u||d||Object(o.a)(e,t))&&!s&&!l}t.a=i;var r=n(98),a=n(26),o=n(2821)},function(e,t,n){"use strict";function i(e,t){
var n=e.isLibraryItem,i=e.isFolder,a=e.isExtra;return n&&!i&&!a&&t.mediaType===r.d}t.a=i;var r=n(58)},function(e,t,n){"use strict";function i(e,t){var n=e.type,i=e.subtype,s=e.saved,l=e.unviewedLeafCount,c=e.isLibraryItem,u=e.isExtra;if(null!=s&&!s)return!1;var d=c&&!u&&o.t(n)&&t.mediaType===r.d,p=n===o.k&&(i===a.b||i===a.c);return(d||p)&&!!l}t.a=i;var r=n(58),a=n(98),o=n(26)},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(20)),f=n(45),v=n(27),g=n(478),m=n(196),y=n(566),b=n(250),I=n(2824),S=n(2827),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(f.a)(),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.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,f=e.endsAt,v=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()(g.a,{type:c
})),d&&r()(h.a,{className:M.a.link,to:o}),r()(I.a,{className:M.a.progress,beginsAt:p,endsAt:f}),v&&r()(m.a,{className:d?M.a.playButton:M.a.playCoverButton,circleClassName:M.a.playCircle,tabIndex:"-1",title:l,"data-qa-id":"metadataPosterPlayButton",onPress:D}),!v&&S&&r()(y.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}),v&&S&&r()(y.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";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(27)),f=n(2825),v=n(1182),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(h.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(f.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(535)},function(e,t){e.exports={progress:"PosterCardOverlayProgress-progress-16k0B",progressTrack:"PosterCardOverlayProgress-progressTrack-3luzP",progressBar:"PosterCardOverlayProgress-progressBar-3k291"}},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={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",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){e.exports={poster:"MetadataPosterCardFace-poster-L2P6r",face:"MetadataPosterCardFace-face--dz_D MetadataPosterCardFace-poster-L2P6r",isSelected:"MetadataPosterCardFace-isSelected-1XUgk",
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={miniPlayerPoster:"MiniPlayerPoster-miniPlayerPoster-13Yue",cardContainer:"MiniPlayerPoster-cardContainer-1675a",
expandButton:"MiniPlayerPoster-expandButton-11onC PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",card:"MiniPlayerPoster-card-1z_VB MetadataPosterCard-card-3bztR"}},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(5),o=(n.n(a),n(1096)),s=n(2833);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(6),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(7),m=n.n(g),y=n(45),b=n(3),I=n(757),S=n(404),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,showRefresh:!1,showSelect:!1,showShuffle:!1,showSplitApart:!1,showUnmatch:!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(y.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 m.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(b.default)("More Actions"),onPress:this.onPress}),v.a.createElement(I.a,o()({serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,target:this._menuButtonID,
isOpen:this.state.isMenuOpen},M,{onMenuClose:this.onMenuClose}))):null},t}(f.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(3)),f=n(1184),v=n(44),g=n.n(v),m=n(404),y=parseInt(g.a.playerVolumeSliderHeight,10),b=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onWheelDelta=function(e){r.props.onVolumeChange(e)},r.onWheel=Object(f.a)({callback:r.onWheelDelta,
maxAbsDelta:y/10}),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.volume,i=e.onPress,a="plex-icon-player-volume-mute-560";return n>60?a="plex-icon-player-volume-high-560":n>40?a="plex-icon-player-volume-mid-560":n>0&&(a="plex-icon-player-volume-low-560"),r()("span",{onWheel:this.onWheel},void 0,r()(m.a,{className:t,title:0===n?Object(h.default)("Unmute Volume"):Object(h.default)("Mute Volume"),"data-qa-id":"volumeButton",icon:a,onPress:i}))},t}(p.Component)
;t.a=b},function(e,t,n){e.exports={default:n(2836),__esModule:!0}},function(e,t,n){n(2837),e.exports=9007199254740991},function(e,t,n){var i=n(150);i(i.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},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(2839)),f=n(1184),v=n(44),g=n.n(v),m=n(2841),y=n.n(m),b=parseInt(g.a.playerVolumeSliderHeight,10),I=function(e){function t(n,i){o()(this,t)
;var r=l()(this,e.call(this,n,i));return r.onWheelDelta=function(e){r.onChange({positionDelta:e})},r.onChange=function(e){var t=e.positionDelta;r.props.onVolumeChange(t)},r.onWheel=Object(f.a)({callback:r.onWheelDelta,maxAbsDelta:b/10}),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.volume;return r()(h.a,{className:t,trackClassName:y.a.track,fillClassName:y.a.fill,showFill:!0,autoHideThumb:!0,stepSize:1,value:n,onChange:this.onChange,onWheel:this.onWheel})},t
}(p.Component);I.defaultProps={className:y.a.slider},t.a=I},function(e,t,n){"use strict";function i(e){return s.a.createElement(l.a,a()({},e,{isVertical:!0}))}var r=n(6),a=n.n(r),o=n(0),s=n.n(o),l=n(331),c=n(2840),u=n.n(c);i.defaultProps={className:u.a.slider,fillClassName:u.a.fill,thumbClassName:u.a.thumb,thumbTrackClassName:u.a.thumbTrack,trackClassName:u.a.track},t.a=i},function(e,t){e.exports={slider:"VerticalSlider-slider-25iZh Slider-slider-2oLVT",
fill:"VerticalSlider-fill-2HISo Slider-fill-35GFq",thumb:"VerticalSlider-thumb-hm7PP Slider-thumb-2QGiU Link-link-2n0yJ",thumbTrack:"VerticalSlider-thumbTrack-36XvC Slider-thumbTrack-21hGV",track:"VerticalSlider-track-1RVQf Slider-track-28JOS"}},function(e,t){e.exports={slider:"VolumeSlider-slider-1QXdT VerticalSlider-slider-25iZh Slider-slider-2oLVT",track:"VolumeSlider-track-2WJDz VerticalSlider-track-1RVQf Slider-track-28JOS",
fill:"VolumeSlider-fill-3XkYy VerticalSlider-fill-2HISo Slider-fill-35GFq"}},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(d.a)(),Object(u.a)(),function(e,t){var n=t.title,i=t.summary,r=t.originallyAvailableAt,a=t.addedAt;return{title:n,summary:i,index:e.playQueueSelectedItemOffset,size:e.length,dateTaken:r||Object(p.default)(a,"YYYY-MM-DD")}})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(22)),d=n(1116),p=n(406),h=n(2843),f=Object(l.b)(i)(h.a)
;f.propTypes=a()({},f.propTypes,{metadataItemEntityID:s.a.string.isRequired,playerType:s.a.string.isRequired}),t.a=f},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="";i&&(s+=Object(c.default)(i)),n&&(s+=s?" "+l.a+" "+n:" "+n);var h=!(!t||!t.length),v=!!s.length,g=!!o;return a()("div",{className:f.a.container},void 0,h?a()(d.a,{component:p.a,title:t}):null,v?a()(d.a,{component:p.a,isSecondary:h,title:s}):null,g?a()(d.a,{component:p.a,
isSecondary:h||v,title:Object(u.default)("{currentIndex} of {size}",{currentIndex:r+1,size:o})}):null)}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(266),u=n(3),d=n(249),p=n(469),h=n(2844),f=n.n(h);t.a=i},function(e,t){e.exports={container:"PhotoMetadataControls-container-1FKfK PlayerControlsMetadata-container-2wqMf"}},function(e,t){e.exports={controls:"PlayerControls-controls-e59ab",buttonGroup:"PlayerControls-buttonGroup-4L6Pw",
buttonGroupLeft:"PlayerControls-buttonGroupLeft-3vLk- PlayerControls-buttonGroup-4L6Pw",buttonGroupCenter:"PlayerControls-buttonGroupCenter-11q8i PlayerControls-buttonGroup-4L6Pw",buttonGroupRight:"PlayerControls-buttonGroupRight-18LS_ PlayerControls-buttonGroup-4L6Pw",volumeButton:"PlayerControls-volumeButton-hSQZX PlayerIconButton-playerButton-1DmNp IconButton-button-9An-7",balanceLeft:"PlayerControls-balanceLeft--vfZA",
volumeSlider:"PlayerControls-volumeSlider-9c0JE VolumeSlider-slider-1QXdT VerticalSlider-slider-25iZh Slider-slider-2oLVT",hasLandscapePoster:"PlayerControls-hasLandscapePoster-23Gat",hasSquarePoster:"PlayerControls-hasSquarePoster--hAg0"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{hasLiveTVProtocol:e.protocols.includes("livetv")}})}var r=n(11),a=n(5),o=(n.n(a),n(233)),s=n(2847);t.a=Object(r.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(p.a,a()({},o,{positionMilliseconds:i,durationMilliseconds:r,showBuffer:!0})):n?u.a.createElement(h.a,o):u.a.createElement(d.a,a()({},o,{showBuffer:!0}))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1185),p=n(2853),h=n(2855);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]:{},t=e.Media;return t&&t.length?{mediaItems:t}:{}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(2849);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=Object(y.a)(e);if(null==t||null==t.width||null==t.height)return E;var n=t.width,i=t.height,r=O,a=O;return n>i?r=Math.round(r*(n/i)):a=Math.round(a*(i/n)),{
containerWidth:r,containerHeight:a}}function r(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-P,height:n}}function a(e,t,n){var i=n===I.e.LARGE?T:j,r=t/2-i/2,a=e.x-t/2;if(a<0){var o=w,s=e.x-i/2;r=Math.max(s,o)}else if(a+t>window.innerWidth){var l=t-i-w,c=t-(window.innerWidth-e.x)-i/2;r=Math.min(c,l)}return{left:r}}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(322)),m=n(2850),y=n(309),b=n(182),I=n(23),S=n(44),M=n.n(S),D=n(2851),C=n.n(D),O=99,P=10,j=parseInt(M.a.seekBarTooltipSmallWidth,10),T=parseInt(M.a.seekBarTooltipLargeWidth,10),w=4,E={containerWidth:O,containerHeight:O},x=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.render=function(){
var e=this.props,t=e.tooltipClassName,n=e.serverEntityID,o=e.size,l=e.position,c=e.hoverValue,u=e.mediaItems,d=e.mediaIndex,p=e.partIndex,h=e.formatValue,f=e.isVisible;null!=c&&(this._formattedTime=h(c));var v=u&&u[d],g=v&&v.Part[p],y=Object(m.a)(g,c);y&&(this._imageUrl=y);var I=i(v),S=I.containerWidth,M=I.containerHeight,D=r(l,S,M),O=a(l,S,o);return s()("div",{className:f?C.a.visibleContainer:C.a.hiddenContainer,style:D},void 0,this._imageUrl&&s()(b.a,{className:C.a.thumbnail,serverEntityID:n,
url:this._imageUrl,width:S,height:M}),s()("div",{className:(t||"")+" "+(C.a[o]||""),style:O},void 0,this._formattedTime))},t}(v.Component);x.defaultProps={tooltipClassName:C.a.tooltip,size:I.e.SMALL,formatValue:g.a},t.a=x},function(e,t,n){"use strict";function i(e,t){if(e&&null!=t){var n=Object(r.a)(e);return null!=n?"/library/parts/"+e.id+"/indexes/"+n+"/"+Math.floor(t):void 0}}t.a=i;var r=n(989)},function(e,t){e.exports={visibleContainer:"SeekBarThumbnail-visibleContainer-3eifZ",
hiddenContainer:"SeekBarThumbnail-hiddenContainer-15Ujj SeekBarThumbnail-visibleContainer-3eifZ",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){return null!=e.durationMilliseconds?l.a.createElement(c.a,a()({fillClassName:d.a.seekBarFill,isDisabled:!0},e)):null}var r=n(6),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(797),u=n(2854),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(){return Object(s.createSelector)(v,Object(u.a)(),Object(c.a)(),Object(p.a)(),Object(d.a)(),Object(h.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(6),a=n.n(r),o=n(11),s=n(5),l=(n.n(s),n(186)),c=n(787),u=n(573),d=n(1186),p=n(212),h=n(79),f=n(2856),v=Object(s.createSelector)(function(e){return e.experienceSettings.timeFormat},function(e){return e.replace(":mm",":mm:ss")}),g={onSeek:l.i};t.a=Object(o.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(6),a=n.n(r),o=n(12),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(406),y=n(778),b=n(797),I=n(23),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),y=Math.min(v,h),S=i(this.props);return g.a.createElement(b.a,a()({},d,{positionMilliseconds:S,offsetMilliseconds:f,durationMilliseconds:v,
bufferStartMilliseconds:m,bufferEndMilliseconds:y,showBuffer:!0,canSeek:t,formatValue:this.formatPlayerTime,size:I.e.LARGE,onSeek:this.onSeek}))},t}(v.Component);S.defaultProps={beginsAt:0,endsAt:0,streamStartedAt:0,seekRangeStartedAtSeconds:0},t.a=Object(y.a)(S)},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(u.a,Object(l.a)(),Object(c.a)(),function(e,t,n){var i=Object(d.a)(t,n),r=i.disablePreviousButton,a=i.disableSkipForwardButton,o=i.disableNextButton;return{
showRecordButton:!!e.features.subscribe,showRepeatButton:!1,showSettingsButton:!0,showSkipBackButton:!0,showSkipForwardButton:!0,disablePreviousButton:r,disableSkipForwardButton:a,disableNextButton:o}})}function r(e,t){var n=t.playerType,i={playerType:n};return{onPreviousPress:function(t){e(s.h(i))},onSkipBackPress:function(t){e(s.j(i))},onSkipForwardPress:function(t){e(s.k(i))},onNextPress:function(t){e(s.g(i))}}}var a=n(11),o=n(5),s=(n.n(o),
n(186)),l=n(574),c=n(1186),u=n(37),d=n(2858),p=n(784),h=Object(a.b)(i,r)(p.a);t.a=h},function(e,t,n){"use strict";function i(e,t){var n=t.seekRangeStartedAtSeconds,i=t.seekStartSeconds,o=t.seekEndSeconds,s=e-n;return{disablePreviousButton:s<=r.a||s-i<=r.a,disableSkipForwardButton:o-s<=a,disableNextButton:o-s<=a}}t.a=i;var r=n(321),a=15},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(783)),c=n(2860),u=n(2863);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{isAlsoAiringVisible:e.isAlsoAiringVisible,positionSeconds:e.positionSeconds,channelTitle:t?t.channelTitle:Object(u.default)("Unknown")}})}function r(e,t){var n={playerType:t.playerType};return{onPress:function(t){e(Object(s.m)(n))}}}var a=n(11),o=n(5),s=(n.n(o),
n(186)),l=n(787),c=n(79),u=n(3),d=n(2861);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()(l.a,{className:n?d.a.isActive:void 0,onPress:i},void 0,a()(c.a,{className:d.a.icon,name:"plex-icon-player-guide-560"}),t)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(20)),c=n(25),u=n(2862),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(3)),c=n(25),u=n(179),d=n(2864),p=n(2867),h=n.n(p);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),Object(o.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(5),o=(n.n(a),n(2865)),s=n(79),l=n(2866);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(5),a=(n.n(r),n(574)),o=n(776),s=n(212)},function(e,t,n){"use strict";function i(e){var t=e.type,n=a()(e,["type"])
;return t===c.e?l.a.createElement(u.a,n):l.a.createElement(d.a,n)}var r=n(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(26),u=n(248),d=n(575);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(783)),c=n(2869),u=n(2873);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(h.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(d.g)(s()({metricsPage:n},t)))}}}var o=n(6),s=n.n(o),l=n(1),c=n.n(l),u=n(5),d=(n.n(u),n(231)),p=n(168),h=n(233),f=n(55),v=n(2870),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(6),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(2871);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(20)),f=n(56),v=n(101),g=n(45),m=n(238),y=n(3),b=n(25),I=n(2872),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(m.b.FOLLOW,!r.props.followed)},r.onMuteButtonPress=function(e){r._emitUpdateFollowMuteAction(m.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(g.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()(h.a,{id:this._menuButtonID,className:S.a.tag,onPress:this.onMenuButtonPress},void 0,r()(b.a,{name:s,className:(S.a.icon||"")+" "+(o||"")})," ",r()("span",{className:S.a.tagText},void 0,t),r()(f.a,{target:this._menuButtonID,isOpen:a,options:M,onMenuClose:this.onMenuClose
},void 0,null!=n&&r()(v.a,{onPress:this.onFollowButtonPress},void 0,n?Object(y.default)("Unfollow {tag}",{tag:t}):Object(y.default)("Follow {tag}",{tag:t})),null!=i&&r()(v.a,{onPress:this.onMuteButtonPress},void 0,i?Object(y.default)("Unblock {tag}",{tag:t}):Object(y.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(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(168)),d=n(2874),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(3)),c=n(2875),u=n.n(c);t.a=i},function(e,t){e.exports={container:"MetadataUpNext-container-3BvKX",upNext:"MetadataUpNext-upNext-3XxQS"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),Object(o.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(5),o=(n.n(a),n(168)),s=n(79),l=n(32),c=n(2877),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(h.d)(o,i,r,a)}else{var c=t-(S+y+n);s=Math.min(b,c),o=Object(h.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,h=e.context,f=e.imageUrl,v=e.bottom,g=Object(p.b)(s,h,{providerEntityID:r,subtype:l});return o()(c.a,{className:m.a.measure},void 0,function(e){var c=e.isMeasured,p=e.width,y=e.height;if(!c)return null;var b=v?v+M:0,I=i(p,y,0,s,l,h),S=void 0;if(b){var C=i(p,y,b,s,l,h);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()(u.a,{cardClassName:m.a.card,serverEntityID:n,providerEntityID:r,metadataItemEntityID:a,metadataKey:"music",type:s,imageWidth:I.width,imageHeight:I.height,imageUrl:f,showLinkOnly:!0}),o()("div",{className:m.a.titlesContainer},void 0,g.map(function(e,t){return o()(d.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(64)),u=(n(32),n(346)),d=n(249),p=n(187),h=n(126),f=n(44),v=n.n(f),g=n(2878),m=n.n(g),y=90,b=500,I=parseInt(v.a.pagePadding,10),S=2*I,M=I/2,D=.4;r.defaultProps={className:m.a.content},t.a=r},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(){return Object(a.createSelector)(function(e,t){return t.isMusic},Object(l.a)(),Object(s.a)(),o.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(11),a=n(5),o=(n.n(a),n(115)),s=n(128),l=n(79),c=n(1187);t.a=Object(r.b)(i)(c.a)},function(e,t){e.exports={backgroundContainer:"FullPlayerBackground-backgroundContainer-2UnXo"}},function(e,t,n){"use strict";function i(e){
return!(!e||!e.timed)}function r(){return Object(b.createSelector)(Object(D.a)(),Object(C.a)(),Object(M.a)(),Object(S.a)(),O.a,function(e,t,n,i,r){var a=P.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(6),o=n.n(a),s=n(12),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(5),I=(n.n(b),n(153)),S=n(128),M=n(168),D=n(79),C=n(472),O=n(70),P=n(32),j=n(2882),T={dispatchFetchPlayQueue:I.c,dispatchFetchPlayQueueItemLyrics:I.d},w=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(j.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,T)(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(64),v=n(71),g=n(3),m=n(25),y=(n(32),n(1003)),b=n(31),I=n(242),S=n(1004),M=n(346),D=n(575),C=n(765),O=n(579),P=n(104),j=n(139),T=n(409),w=n(213),E=n(198),x=n(798),A=n(126),N=n(2889),L=n.n(N),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;r.setState({isMeasured:!0,pageWidth:t})},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,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,N=t.selectedIndex,k=t.lyricsStreamsCount,_=t.hasTimedLyrics,R=t.isTimedLyricsActive,z=t.hasLyricsError,U=t.hasLyricsFeature,B=t.isLyricFindProvider,F=t.onPreviousPress,V=t.onNextPress,H=t.onTimedLyricsPress,Q=this.state,Y=Q.isMeasured,G=Q.isScrollerMeasured,W=Q.pageWidth,K=Q.scrollTop,q=Object(x.a)(W,c),Z=Object(A.d)(q,o,s,l)
;return U?r()(f.a,{className:L.a.measure,onMeasure:this.onContentMeasure},void 0,Y&&r()("div",{className:L.a.container},void 0,r()("div",{},void 0,r()(M.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()(D.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a
})),r()(w.a,{},void 0,r()(P.a,{},void 0,r()(C.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a}))),r()(E.a,{},void 0,r()(P.a,{},void 0,B&&Object(g.default)("Powered by {provider}",{provider:"LyricFind"})),r()(T.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(g.default)("Timed Lyrics"),isDisabled:!_,
onPress:H})),r()("span",{className:L.a.rightInfo},void 0,Object(g.default)("{selectedIndex} of {lyricsStreamsCount}",{selectedIndex:N+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(g.default)("Previous"),isDisabled:0===N,onPress:F})),r()("span",{className:L.a.rightInfo},void 0,r()(I.a,{icon:"plex-icon-page-next-560","data-qa-id":"nextLyricsPage",title:Object(g.default)("Next"),
isDisabled:N===k-1,onPress:V}))))),z&&r()("div",{className:L.a.innerContent},void 0,r()(O.a,{title:Object(g.default)("There was an error loading the lyrics")})),!z&&r()("div",{className:L.a.innerContent},void 0,r()(f.a,{className:L.a.measure,onMeasure:this.onScrollerMeasure},void 0,G&&r()(v.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()(b.a,{className:L.a.spinner}))))))):r()("div",{className:L.a.upsellContainer},void 0,r()(y.a,{
icon:"plex-icon-marketing-lyrics-560",title:Object(g.default)("Song Lyrics"),text:Object(g.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()(S.a,{serverEntityID:n,modalMetricsProperties:{context:"lyrics"}}))},t}(p.Component);t.a=k},function(e,t){e.exports={icon:"InnerErrorPage-icon-tWVPF ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"
}},function(e,t){e.exports={leftTitle:"PrePlayLeftTitle-leftTitle-Ev1KG"}},function(e,t){e.exports={primaryTitle:"PrePlayPrimaryTitle-primaryTitle-1r9P9"}},function(e,t){e.exports={rightTitle:"PrePlayRightTitle-rightTitle-VxiwU"}},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={
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";var i=n(12),r=n.n(i),a=n(6),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(5),y=(n.n(m),n(153)),b=n(233),I=n(472),S=n(41),M=n(35),D=n(410),C=n(44),O=n.n(C),P=n(2996),j=parseInt(O.a.playQueueItemHeight,10),T=Object(m.createSelector)(function(e){return e.ui.audioVideoPlayer},Object(I.a)(),Object(b.a)(),function(e,t,n){var i=e.playQueue,r=n.identifier===S.d,a=!i.isLocal&&r;return{serverEntityID:t.entityID,providerEntityID:n.entityID,playQueueID:i.playQueueID,isQueueRepeated:i.repeat,isQueueShuffled:i.playQueueShuffled,isPlayerPaused:e.isPaused,
isUpdatePending:i.isUpdatePending,playQueueItemEntityIDs:i.playQueueItems,playQueueSelectedItemOffset:i.playQueueSelectedItemOffset,playQueueLength:i.length,currentIndex:i.currentIndex,showAddToPlaylist:a}}),w={dispatchMovePlayQueueItem:y.e},E=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return 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(M.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:j*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:j*e.currentIndex}),this.props.isUpdatePending&&!e.isUpdatePending&&(this.shouldUpdateScrollTop=!1)},t.prototype.render=function(){var e=this.props,t=(e.dispatchMovePlayQueueItem,r()(e,["dispatchMovePlayQueueItem"])),n=this.state,i=n.moveIndex,a=n.scrollTop;return v.a.createElement(P.a,o()({moveIndex:i,scrollTop:a,onPlayQueueItemDragMove:this.onPlayQueueItemDragMove,
onPlayQueueItemDragEnd:this.onPlayQueueItemDragEnd,onScrollPositionChange:this.onScrollPositionChange},t))},t}(f.Component);t.a=Object(D.a)(Object(g.b)(T,w)(E))},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(2892);Object.defineProperty(t,"DragDropManager",{enumerable:!0,get:function(){return i(r).default}});var a=n(2954);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return i(a).default
}});var o=n(2955);Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return i(o).default}});var s=n(2956);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(2893),s=i(o),l=n(2897),c=i(l),u=n(580),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(2949),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(240),o=i(a),s=n(2894),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(2896);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(218),n(2895)(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(1190),o=i(a),s=n(2898),l=i(s),c=n(2936),u=i(c),d=n(1198),p=i(d),h=n(2948),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(1192),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(580),l=n(586),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(2900),a=n(2911),o=n(2917);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(2901),a=n(2907),o=n(2908),s=n(2909),l=n(2910);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(581);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(1195),a=n(2903),o=n(480),s=n(2905),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(2904),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(447),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(581),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(581),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(581),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(2912),a=n(2913),o=n(2914),s=n(2915),l=n(2916);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(583),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(583);e.exports=i},function(e,t,n){function i(e){return r(this.__data__,e)>-1}var r=n(583);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(583);e.exports=i},function(e,t,n){var i=n(582),r=n(447),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(584)
;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(584);e.exports=i},function(e,t,n){function i(e){return r(this,e).has(e)}var r=n(584);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(584);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(2926),a=n(2927),o=n(2928);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(2930),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(2932),r=n(2935),a=r(i);e.exports=a},function(e,t,n){var i=n(2933),r=n(2934),a=n(1196),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(582),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(586)},function(e,t,n){var i=n(2938),r=n(481),a=n(2939),o=n(585),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(1193),a=n(1199),o=n(1201);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(701),a=n(1200),o=n(347),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(529),a=n(448),o="[object Arguments]";e.exports=i},function(e,t,n){var i=n(2944),r=n(1202),a=n(1203),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(582),r=n(447),a=i(r,"Set");e.exports=a},function(e,t,n){var i=n(803),r=n(2946),a=n(481),o=n(2947),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(799),a=n(801),o=n(802),s=n(803),l=n(804),c=n(805),u=Math.min;e.exports=i},function(e,t,n){function i(e){return r(e)?e:[]}var r=n(585);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(162),s=i(o),l=n(347),c=i(l),u=n(1191),d=i(u),p=n(2950),h=i(p),f=n(1190),v=n(1198),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(162),h=i(p),f=n(347),v=i(f),g=n(2951),m=i(g),y=n(586),b=n(2953),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(2952),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(218))},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(1202),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,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)}Object.defineProperty(t,"__esModule",{
value:!0}),t.default=void 0;var o,s,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=n(1),d=function(e){return e&&e.__esModule?e:{default:e}}(u),p=n(1189),h=(s=o=function(e){function t(e,n){i(this,t);var a=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return a.backend=(0,
p.unpackBackendForEs5Users)(e.backend),a.childContext=(0,p.createChildContext)(a.backend,{window:function(){return e&&e.window?e.window:n&&n.window?n.window:"undefined"!=typeof window?window:void 0}()}),a}return a(t,e),l(t,[{key:"componentWillReceiveProps",value:function(e){if(e.backend!==this.props.backend||e.window!==this.props.window)throw new Error("DragDropContextProvider backend and window props must not change.")}},{key:"getChildContext",value:function(){return this.childContext}},{
key:"render",value:function(){return c.Children.only(this.props.children)}}]),t}(c.Component),o.propTypes={backend:d.default.oneOfType([d.default.func,d.default.object]).isRequired,children:d.default.element.isRequired,window:d.default.object},o.defaultProps={window:void 0},o.childContextTypes=p.CHILD_CONTEXT_TYPES,o.displayName="DragDropContextProvider",o.contextTypes={window:d.default.object},s);t.default=h},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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return P.default.apply(void 0,["DragLayer","collect[, options]"].concat(Array.prototype.slice.call(arguments))),(0,
I.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://react-dnd.github.io/react-dnd/docs-drag-layer.html",e),(0,I.default)((0,y.default)(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',t),
function(n){var i,s,h=t.arePropsEqual,v=void 0===h?C.default:h,m=n.displayName||n.name||"Component",y=(s=i=function(t){function i(e,t){r(this,i);var n=a(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return n.handleChange=n.handleChange.bind(n),n.manager=t.dragDropManager,(0,
I.default)("object"===c(n.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://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",m,m),n.state=n.getCurrentState(),n}return o(i,t),u(i,[{key:"getDecoratedComponentInstance",value:function(){return(0,
I.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"shouldComponentUpdate",value:function(e,t){return!v(e,this.props)||!(0,M.default)(t,this.state)}}]),u(i,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),
this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,M.default)(e,this.state)||this.setState(e)}}},{key:"getCurrentState",value:function(){var t=this.manager.getMonitor();return e(t,this.props)}},{key:"render",value:function(){var e=this
;return p.default.createElement(n,l({},this.props,this.state,{ref:function(t){e.child=t}}))}}]),i}(d.Component),i.DecoratedComponent=n,i.displayName="DragLayer("+m+")",i.contextTypes={dragDropManager:f.default.object.isRequired},s);return(0,g.default)(y,n)}}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"==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},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}}();t.default=s
;var d=n(0),p=i(d),h=n(1),f=i(h),v=n(807),g=i(v),m=n(240),y=i(m),b=n(162),I=i(b),S=n(808),M=i(S),D=n(1204),C=i(D),O=n(587),P=i(O)},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]:{};u.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var r=e;"function"!=typeof e&&((0,o.default)((0,
M.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://react-dnd.github.io/react-dnd/docs-drag-source.html',e),r=function(){return e}),(0,o.default)((0,l.default)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t);var a=(0,
g.default)(t);return(0,o.default)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),(0,o.default)((0,
l.default)(i),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),function(e){return(0,p.default)({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:a,registerHandler:f.default,createMonitor:y.default,createConnector:I.default,DecoratedComponent:e,getType:r,collect:n,options:i})}}
Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(162),o=i(a),s=n(240),l=i(s),c=n(587),u=i(c),d=n(1205),p=i(d),h=n(2964),f=i(h),v=n(2965),g=i(v),m=n(2966),y=i(m),b=n(2967),I=i(b),S=n(1208),M=i(S)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(809),a=i(r);t.isDisposable=a.default;var o=n(2961),s=i(o);t.Disposable=s.default;var l=n(2962),c=i(l);t.CompositeDisposable=c.default;var u=n(2963),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(809),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(809),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}}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")}function a(e){
Object.keys(e).forEach(function(t){(0,l.default)(u.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://react-dnd.github.io/react-dnd/docs-drag-source.html',u.join(", "),t),(0,
l.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://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),d.forEach(function(t){(0,l.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://react-dnd.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 o(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrag",value:function(){return!e.canDrag||e.canDrag(this.props,this.monitor)}},{key:"isDragging",value:function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()}},{key:"beginDrag",value:function(){var t=e.beginDrag(this.props,this.monitor,this.component)
;return t}},{key:"endDrag",value:function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=a;var s=n(162),l=i(s),c=n(240),u=(i(c),
["canDrag","beginDrag","isDragging","endDrag"]),d=["beginDrag"]},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 u(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(162),s=function(e){return e&&e.__esModule?e:{default:e}}(o),l=!1,c=!1,u=function(){function e(t){i(this,e),this.internalMonitor=t.getMonitor()}return a(e,[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"canDrag",value:function(){(0,s.default)(!l,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,
this.internalMonitor.canDragSource(this.sourceId)}finally{l=!1}}},{key:"isDragging",value:function(){(0,s.default)(!c,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return c=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{c=!1}}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){
return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){
return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}()},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:(0,o.default)({dragSource:function(e,n){e===a&&(0,l.default)(n,s)||(a=e,s=n,t())},dragPreview:function(e,t){e===u&&(0,l.default)(t,d)||(u=e,d=t,n())}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(1206),o=i(a),s=n(1207),l=i(s)},function(e,t,n){"use strict";function i(e,t){var n=e.ref;return(0,
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?(0,o.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}}):(0,o.cloneElement)(e,{ref:t})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(162),a=function(e){return e&&e.__esModule?e:{default:e}
}(r),o=n(0)},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]:{};u.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var r=e;"function"!=typeof e&&((0,o.default)((0,
M.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://react-dnd.github.io/react-dnd/docs-drop-target.html',e),r=function(){return e}),(0,o.default)((0,
l.default)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t);var a=(0,g.default)(t);return(0,o.default)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),(0,
o.default)((0,l.default)(i),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),function(e){return(0,p.default)({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:a,registerHandler:f.default,createMonitor:y.default,createConnector:I.default,DecoratedComponent:e,getType:r,collect:n,options:i})}}
Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(162),o=i(a),s=n(240),l=i(s),c=n(587),u=i(c),d=n(1205),p=i(d),h=n(2970),f=i(h),v=n(2971),g=i(v),m=n(2972),y=i(m),b=n(2973),I=i(b),S=n(1208),M=i(S)},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}}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")}function a(e){Object.keys(e).forEach(function(t){(0,l.default)(u.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://react-dnd.github.io/react-dnd/docs-drop-target.html',u.join(", "),t),(0,
l.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://react-dnd.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 o(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"receiveComponent",value:function(e){this.component=e
}},{key:"canDrop",value:function(){return!e.canDrop||e.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){e.hover&&e.hover(this.props,this.monitor,this.component)}},{key:"drop",value:function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);return t}}}]),t}();return function(e){return new t(e)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,
"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();t.default=a;var s=n(162),l=i(s),c=n(240),u=(i(c),["canDrop","hover","drop"])},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)}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(162),s=function(e){return e&&e.__esModule?e:{default:e}}(o),l=!1,c=function(){function e(t){i(this,e),this.internalMonitor=t.getMonitor()}return a(e,[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"canDrop",value:function(){(0,
s.default)(!l,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html");try{return l=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{l=!1}}},{key:"isOver",value:function(e){return this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{
key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",
value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}()},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:(0,o.default)({dropTarget:function(e,n){
e===r&&(0,l.default)(n,a)||(r=e,a=n,t())}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(1206),o=i(a),s=n(1207),l=i(s)},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(2975),s=i(o),l=n(2988),c=i(l),u=n(2989),d=i(u),p=n(1210),h=n(2992),f=n(2994),v=n(810),g=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}(v),m=function(){function e(t){r(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),
this.context=t.getContext(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new d.default,this.dragStartSourceIds=[],this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,
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),
this.asyncEndDragNativeItem=this.asyncEndDragNativeItem.bind(this),this.isNodeInDocument=this.isNodeInDocument.bind(this)}return a(e,[{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,
this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"addEventListeners",value:function(e){e.addEventListener&&(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))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(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))}},{key:"connectDragPreview",value: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]}}},{key:"connectDragSource",value: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)}}},{key:"connectDropTarget",value: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)}}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return(0,s.default)(t||{},{dropEffect:this.altKeyPressed?"copy":"move"})}},{key:"getCurrentDropEffect",value:function(){
return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return(0,s.default)(t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})}},{key:"getSourceClientOffset",value:function(e){return(0,h.getNodeClientOffset)(this.sourceNodes[e])}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType()
;return Object.keys(g).some(function(t){return g[t]===e})}},{key:"beginDragNativeItem",value:function(e){this.clearCurrentDragSourceNode();var t=(0,f.createNativeDragSource)(e);this.currentNativeSource=new t,this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"asyncEndDragNativeItem",value:function(){this.asyncEndDragFrameId=this.window.requestAnimationFrame(this.endDragNativeItem)}},{key:"endDragNativeItem",
value:function(){this.isDraggingNativeItem()&&(this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)}},{key:"isNodeInDocument",value:function(e){return!(!document.body.contains(e)&&!this.window)&&this.window.document.body.contains(e)}},{key:"endDragIfSourceWasRemovedFromDOM",value:function(){var e=this.currentDragSourceNode;this.isNodeInDocument(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()}},{
key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=(0,h.getNodeClientOffset)(e),this.currentDragSourceNodeOffsetChanged=!1;this.mouseMoveTimeoutTimer=setTimeout(function(){return t.mouseMoveTimeoutId=null,t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}},{key:"clearCurrentDragSourceNode",value:function(){
return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,this.window.clearTimeout(this.mouseMoveTimeoutTimer),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),this.mouseMoveTimeoutTimer=null,!0)}},{key:"checkIfCurrentDragSourceRectChanged",value:function(){var e=this.currentDragSourceNode
;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!(0,c.default)((0,h.getNodeClientOffset)(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))}},{key:"handleTopDragStartCapture",value:function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]}},{key:"handleDragStart",value:function(e,t){this.dragStartSourceIds.unshift(t)}},{key:"handleTopDragStart",value:function(e){var t=this,n=this.dragStartSourceIds
;this.dragStartSourceIds=null;var i=(0,h.getEventClientOffset)(e);this.monitor.isDragging()&&this.actions.endDrag(),this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});var r=e.dataTransfer,a=(0,f.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,p=c.offsetX,v=c.offsetY,g={anchorX:u,anchorY:d},m={offsetX:p,offsetY:v},y=(0,h.getDragPreviewOffset)(s,l,i,g,m);r.setDragImage(l,y.x,y.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()}}},{key:"handleTopDragEndCapture",value:function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()}},{key:"handleTopDragEnterCapture",value:function(e){if(this.dragEnterTargetIds=[],this.enterLeaveCounter.enter(e.target)&&!this.monitor.isDragging()){var t=e.dataTransfer,n=(0,f.matchNativeItemType)(t)
;n&&this.beginDragNativeItem(n)}}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleTopDragEnter",value:function(e){var t=this,n=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){this.altKeyPressed=e.altKey,(0,p.isFirefox)()||this.actions.hover(n,{clientOffset:(0,h.getEventClientOffset)(e)});n.some(function(e){return t.monitor.canDropOnTarget(e)})&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}
}},{key:"handleTopDragOverCapture",value:function(){this.dragOverTargetIds=[]}},{key:"handleDragOver",value:function(e,t){this.dragOverTargetIds.unshift(t)}},{key:"handleTopDragOver",value:function(e){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.altKeyPressed=e.altKey,this.actions.hover(n,{clientOffset:(0,h.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")}},{key:"handleTopDragLeaveCapture",value:function(e){this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&this.isDraggingNativeItem()&&this.endDragNativeItem()}},{
key:"handleTopDropCapture",value:function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"handleTopDrop",value:function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:(0,h.getEventClientOffset)(e)}),this.actions.drop({
dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()}},{key:"handleSelectStart",value: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()))}},{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}}]),e}()
;t.default=m},function(e,t,n){var i=n(481),r=n(800),a=n(2976),o=n(2977),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(800),a=n(806),o=n(1209),s=n(480);e.exports=i},function(e,t,n){function i(e){return o(e)?r(e,!0):a(e)}var r=n(2978),a=n(2985),o=n(806);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(2979),a=n(1200),o=n(347),s=n(2980),l=n(1209),c=n(2982),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(447),r=n(2981),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(666)(e))},function(e,t){function n(){return!1}e.exports=n
},function(e,t,n){var i=n(2983),r=n(804),a=n(2984),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(529),a=n(1197),o=n(448),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(978),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(666)(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(480),a=n(2986),o=n(2987),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+=1){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}
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(2990),s=i(o),l=n(1192),c=i(l),u=function(){function e(){r(this,e),this.entered=[]}return a(e,[{key:"enter",value:function(e){var t=this.entered.length,n=function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))};return this.entered=(0,s.default)(this.entered.filter(n),[e]),0===t&&this.entered.length>0}},{key:"leave",value:function(e){var t=this.entered.length;return this.entered=(0,
c.default)(this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}]),e}();t.default=u},function(e,t,n){var i=n(1199),r=n(481),a=n(1201),o=n(585),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(1194),a="Expected a function";i.Cache=r,e.exports=i},function(e,t,n){"use strict";function i(e){var t=e.nodeType===d?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){return"IMG"===e.nodeName&&((0,l.isFirefox)()||!document.documentElement.contains(e))}
function o(e,t,n,i){var r=e?t.width:n,a=e?t.height:i;return(0,l.isSafari)()&&e&&(a/=window.devicePixelRatio,r/=window.devicePixelRatio),{dragPreviewWidth:r,dragPreviewHeight:a}}function s(e,t,n,r,s){var c=a(t),d=c?e:t,p=i(d),h={x:n.x-p.x,y:n.y-p.y},f=e.offsetWidth,v=e.offsetHeight,g=r.anchorX,m=r.anchorY,y=o(c,t,f,v),b=y.dragPreviewWidth,I=y.dragPreviewHeight,S=s.offsetX,M=s.offsetY,D=0===S||S,C=0===M||M;return{x:D?S:function(){return new u.default([0,.5,1],[h.x,h.x/f*b,h.x+b-f]).interpolate(g)
}(),y:C?M:function(){var e=new u.default([0,.5,1],[h.y,h.y/v*I,h.y+I-v]),t=e.interpolate(m);return(0,l.isSafari)()&&c&&(t+=(window.devicePixelRatio-1)*I),t}()}}Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeClientOffset=i,t.getEventClientOffset=r,t.getDragPreviewOffset=s;var l=n(1210),c=n(2993),u=function(e){return e&&e.__esModule?e:{default:e}}(c),d=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")}
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(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,p=0;p<r-1;p++)u=t[p+1]-t[p],
d=n[p+1]-n[p],l.push(u),s.push(d),c.push(d/u);for(var h=[c[0]],f=0;f<l.length-1;f++){var v=c[f],g=c[f+1];if(v*g<=0)h.push(0);else{u=l[f];var m=l[f+1],y=u+m;h.push(3*y/((y+m)/v+(y+u)/g))}}h.push(c[c.length-1]);for(var b=[],I=[],S=void 0,M=0;M<h.length-1;M++){S=c[M];var D=h[M],C=1/l[M],O=D+h[M+1]-S-S;b.push((S-D-O)*C),I.push(O*C*C)}this.xs=t,this.ys=n,this.c1s=h,this.c2s=b,this.c3s=I}return r(e,[{key:"interpolate",value: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=a},function(e,t,n){"use strict";function i(e,t){for(var n in t){var i=t[n];i.configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n,i)}return e}function r(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t,n){var i=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=i?i:n}function s(e){var t=h[e],n=t.exposeProperty,a=t.matchesTypes,o=t.getData;return function(){function e(){var t,a;r(this,e),this.item=(t={},a={},a[n]=a[n]||{},a[n].get=function(){
return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},i(t,a),t)}return u(e,[{key:"mutateItemByReadingDataTransfer",value:function(e){delete this.item[n],this.item[n]=o(e,a)}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}()}function l(e){var t=Array.prototype.slice.call(e.types||[])
;return Object.keys(h).filter(function(e){return h[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}Object.defineProperty(t,"__esModule",{value:!0});var c,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}}();t.createNativeDragSource=s,t.matchNativeItemType=l;var d=n(810),p=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}(d),h=(c={},a(c,p.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),a(c,p.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return o(e,t,"").split("\n")}}),a(c,p.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){
return o(e,t,"")}}),c)},function(e,t,n){"use strict";function i(){return r||(r=new Image,r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=void 0},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(71)),f=n(20),v=n(207),g=n(3),m=n(25),y=n(340),b=n(2997),I=n(2998),S=n(3012),M=n(1213),D=n(1214),C=n(3016),O=n.n(C),P=r()(m.a,{name:"plex-icon-toolbar-add-to-playlist-560"}),j=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0})},r.onAddToPlaylistClose=function(){r.setState({isAddToPlaylistModalOpen:!1})},r.state={isAddToPlaylistModalOpen:!1},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.playQueueID,a=e.playQueueItemEntityIDs,o=e.playQueueSelectedItemOffset,s=e.playQueueLength,l=e.playerType,c=e.currentIndex,u=e.moveIndex,d=e.scrollTop,p=e.isPlayerPaused,m=e.showAddToPlaylist,C=e.onPlayQueueItemDragMove,j=e.onPlayQueueItemDragEnd,T=this.state.isAddToPlaylistModalOpen,w=o-c,E=w+a.length-1;return r()("div",{className:O.a.container},void 0,r()(D.a,{},void 0,r()(M.a,{title:Object(g.default)("Play Queue")}),r()("div",{
className:O.a.topContainer},void 0,r()("div",{className:O.a.topLeft},void 0,r()("span",{className:O.a.count},void 0,1===s?Object(g.default)("{itemCount} item",{itemCount:s}):Object(g.default)("{itemCount} items",{itemCount:s}))),r()("div",{className:O.a.topRight},void 0,m&&r()(v.a,{className:O.a.tooltipButton,"data-qa-id":"queueAddPlaylist","aria-label":Object(g.default)("Add to Playlist"),component:f.a,tooltip:Object(g.default)("Add to Playlist"),onPress:this.onAddToPlaylistPress
},void 0,P)))),r()(h.a,{className:O.a.content,scrollTop:d,smoothScroll:!1,autoScroll:!0},void 0,a.map(function(e,t){var n=null!=u,i=c===t,a=n&&u===t,o=n&&u===t+1;return r()(S.a,{sortIndex:t,opacity:Object(b.a)(t,w,E,s),playQueueItemEntityID:e,playerType:l,isDraggingBefore:a,isDraggingAfter:o,isCurrentItem:i,isPlayerPaused:p,onPlayQueueItemDragMove:C,onPlayQueueItemDragEnd:j},e)})),r()(I.a,{playerType:l}),m&&r()(y.a,{serverEntityID:t,providerEntityID:n,playQueueID:i,isOpen:T,
onModalClose:this.onAddToPlaylistClose}))},t}(p.Component);t.a=j},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){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(214)),v=(n.n(f),
n(27)),g=n(482),m=n(251),y=n(44),b=n.n(y),I=n(1211),S=n(3011),M=n.n(S),D=parseInt(b.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!==m.d)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()(g.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,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,c=e.isPlayerPaused,f=e.isItemDragging,y=e.connectDragSource,b=e.onRemovePress;return a()("div",{className:(v.a.container||"")+" "+(f&&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()(d.a,{isPaused:c}),!s&&y(a()("div",{className:v.a.moveControls,
"data-qa-id":"playQueueReorder"},void 0,m))),a()(h.a,{className:v.a.metadataContainer,sourceTextClassName:v.a.sourceText,durationContainerClassName:v.a.metadataDurationContainer,metadataItemEntityID:t,playerType:n,mediaType:i,sortIndex:r}),!s&&a()("div",{className:v.a.removeControls},void 0,a()(u.a,{className:v.a.removeButton,"data-qa-id":"playQueueRemove",icon:"plex-icon-remove-560",title:Object(l.default)("Remove"),kind:p.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(3)),c=n(25),u=n(242),d=n(588),p=n(23),h=n(3003),f=n(3010),v=n.n(f),g={.2:v.a.opacity20Precent,.4:v.a.opacity40Precent,.6:v.a.opacity60Precent,.8:v.a.opacity80Precent},m=a()(c.a,{name:"plex-icon-reorder-560"});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(269)),v=n(3002),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,n){"use strict";function i(){return Object(f.createSelector)(Object(g.a)(),function(e){var t=y.g,n=Object(I.c)(e.type,e.subtype,t)===I.a?M:D,i=Object(b.a)(n,null,e.type,e.subtype,e,t);return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,type:e.type,subtype:e.subtype,metadataKey:e.key,
duration:e.duration,title:e.title,context:t,imageWidth:i.width,imageHeight:i.height,imageUrl:i.url}})}function r(e,t){var n={playerType:t.playerType};return{onPlayPress:function(){e(Object(v.f)(c()({},n,{index:t.sortIndex}))),t.mediaType===m.d&&e(Object(v.s)(n))}}}function a(e){var t=(e.mediaType,s()(e,["mediaType"]));return p.a.createElement(S.a,t)}var o=n(12),s=n.n(o),l=n(6),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(11),f=n(5),v=(n.n(f),
n(153)),g=n(22),m=n(58),y=n(32),b=n(232),I=n(126),S=n(3004),M=64,D=36;t.a=Object(h.b)(i,r)(a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.titlesContainerClassName,i=e.sourceTextClassName,r=e.durationContainerClassName,o=e.serverEntityID,s=e.providerEntityID,v=e.metadataItemEntityID,m=e.type,y=e.subtype,b=e.metadataKey,I=e.title,S=e.duration,M=e.context,D=e.imageWidth,C=e.imageHeight,O=e.imageUrl,P=e.onPlayPress,j=Object(f.b)(m,M,{providerEntityID:s,subtype:y}),T="track"===m
;return a()("div",{className:t},void 0,a()("div",{className:g.a.cardContainer},void 0,a()(p.a,{className:g.a.card,serverEntityID:o,providerEntityID:s,metadataItemEntityID:v,metadataKey:b,title:Object(u.default)("Play {title}",{title:I}),type:m,imageWidth:D,imageHeight:C,imageUrl:O,onPlayPress:P})),a()("div",{className:n,"data-qa-id":"playQueueTitleContainer"},void 0,j.map(function(e,t){return a()(h.a,{serverEntityID:o,providerEntityID:s,metadataItemEntityID:v,component:e,isSecondary:t>0},t)
})),a()(d.a,{textClassName:i,serverEntityID:o,metadataItemEntityID:v}),!!S&&a()("div",{className:r},void 0,T?Object(c.a)(S):Object(l.a)(S)))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(375)),c=n(322),u=n(3),d=(n(32),n(1212)),p=n(766),h=n(249),f=n(187),v=n(3009),g=n.n(v);i.defaultProps={className:g.a.container,titlesContainerClassName:g.a.titlesContainer,sourceTextClassName:g.a.sourceText,durationContainerClassName:g.a.durationContainer},t.a=i},function(e,t,n){"use strict"
;var i=n(5),r=(n.n(i),n(178)),a=Object(i.createSelector)(r.a,function(e){return e.friends});t.a=a},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(561)),a=Object(i.createSelector)(r.a,function(e){return e.allFriends});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.textClassName,i=e.serverEntityID,r=e.attribution,o=e.avatar,s=e.name,c=e.hasOwner;return r?a()("div",{className:t},void 0,a()(u.a,{className:p.a.attribution,attribution:r})):c?a()("div",{className:t
},void 0,a()("span",{className:n},void 0,s),a()(l.a,{serverEntityID:i,url:o,width:h,height:h})):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(555)),c=n(44),u=(n.n(c),n(1136)),d=n(3008),p=n.n(d),h=parseInt(c.playlistBadgeSize,10);i.defaultProps={className:p.a.container},t.a=i},function(e,t){e.exports={container:"SourceBadge-container-3OfQB",text:"SourceBadge-text-Y8yYE",attribution:"SourceBadge-attribution-YBphY"}},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",sourceText:"AudioVideoPlayerPlayQueueMetadata-sourceText-2jMM6",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",sourceText:"AudioVideoPlayQueueItem-sourceText-1oT-k SourceBadge-text-Y8yYE",
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={dragPreview:"AudioVideoPlayQueueDragPreview-dragPreview-21bXe"}},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(6),o=n.n(a),s=n(2),l=n.n(s),c=n(12),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(214),S=(n.n(I),n(411)),M=(n.n(S),n(122)),D=(n.n(M),n(324)),C=n(27),O=n(251),P=n(1211),j=n(3013),T=n.n(j),w={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(M.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(S.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){return Object(C.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:(T.a.container||"")+" "+(t&&D.c||"")+" "+(n&&r&&D.e||"")+" "+(i&&r&&D.d||""||"")},void 0,b.a.createElement(P.a,o()({connectDragSource:s},c))))},t}(y.Component);t.a=Object(I.DropTarget)(O.d,E,r)(Object(I.DragSource)(O.d,w,i)(x))
},function(e,t){e.exports={container:"AudioVideoPlayQueueItemDragSource-container-3ncn7"}},function(e,t){e.exports={heading:"AudioVideoFullPlayerContentHeading-heading-1XO9q"}},function(e,t){e.exports={headingContainer:"AudioVideoFullPlayerContentHeadingContainer-headingContainer-2UyXv",divider:"AudioVideoFullPlayerContentHeadingContainer-divider-1A1d_"}},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(s.a)(),Object(o.a)(),Object(o.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(5),o=(n.n(a),n(128)),s=n(79),l=n(3018),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(71)),c=n(589),u=n(96),d=n(3038),p=n(3083),h=n(3086),f=n.n(h);t.a=i},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(S.a,function(e){return{provider:e}})}
var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(265)),I=n(474),S=n(37),M=n(3020),D=n(32),C=n(812),O=(n(88),{dispatchPopulateProvider:b.d}),P=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(C.a,a()({},n,{listContext:D.b})):null},t}(v.Component)
;t.a=Object(M.a)(Object(m.b)(i,O)(P),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(5),o=(n.n(a),n(166)),s=(n(36),n(1215));t.a=i},function(e,t,n){"use strict";function i(){return Object(s.a)(Object(l.a)(),["identifier","title"])}function r(){
return Object(s.a)(Object(c.a)(),["friendlyName","sourceTitle"])}function a(){return Object(o.createSelector)(i(),r(),Object(d.a)(),function(e,t,n){return Object(u.a)(e,t,n)})}t.a=a;var o=n(5),s=(n.n(o),n(1217)),l=n(51),c=n(34),u=n(1218),d=n(483)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),function(e){var t=Object(a.a)(e);return t?t.directories:[]})}t.a=i;var r=n(5),a=(n.n(r),n(397)),o=n(51)},function(e,t,n){"use strict";function i(e){
var t=e.metadataListEntityID,n=e.metadataItemEntityIDs,i=e.sourceDirectory,r=e.containerKey,o=e.listType,l=e.listSubtype,c=e.listContext,g=e.style,m=e.columnAdjustment,y=e.populatedRange,b=(e.route,s()(e,["metadataListEntityID","metadataItemEntityIDs","sourceDirectory","containerKey","listType","listSubtype","listContext","style","columnAdjustment","populatedRange","route"])),I=b.serverEntityID,S=b.providerEntityID,M=void 0;return M=g===d.a?f.a:Object(h.a)(o,l,c,m,1),
u.a.createElement(p.a,a()({},b,{containerKey:r,keyPropName:"metadataDirectoryEntityID",items:n,itemsOffset:y.start,layout:M,cellRenderer:Object(v.a)({serverEntityID:I,providerEntityID:S,metadataListEntityID:t,sourceDirectory:i,containerKey:r,hubStyle:g})}))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(1220),p=(n(32),n(412),n(473)),h=n(485),f=n(3024),v=n(1223);n(93);t.a=i},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(461),o=n(571),s=n(44),l=n.n(s),c=parseInt(l.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(o.a)(r()({},e,{preferredCellWidth:250,minCellWidth:200,minColumns:2,maxColumns:8,columnAdjustment:0}))},getCellHeight:function(e){return c}});t.a=u},function(e,t,n){"use strict";function i(){
return Object(r.createSelector)(c.a,Object(a.a)(),Object(s.a)(),Object(l.a)(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=arguments[3];return{directoryKey:t.key,directoryType:t.type,title:t.title,route:e?i:n}})}var r=n(5),a=(n.n(r),n(592)),o=n(55),s=n(1224),l=n(1225),c=n(398),u=n(3027);t.a=Object(o.a)(i)(u.a)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(178)),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,u=e.route;return a()(c.a,{className:t,cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,a()(l.a,{className:h.a.button,kind:d.b.DARK,size:d.e.LARGE,to:u},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(42)),c=n(87),u=n(137),d=n(23),p=n(3028),h=n.n(p);t.a=Object(u.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(a.a)(),Object(s.a)(),Object(l.a)(),c.a,u.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];return{directoryKey:n.key,directoryType:n.type,title:n.title,thumb:n.thumb,
icon:n.icon,imageWidth:t,imageHeight:Object(d.d)(t,n.type,n.subtype,e),route:o?r:i,isOtherItemSelected:!!a.activeSelectionType}})}var r=n(5),a=(n.n(r),n(592)),o=n(55),s=n(1224),l=n(1225),c=n(74),u=n(398),d=n(126),p=n(3030);t.a=Object(o.a)(i)(p.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,d=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,P=O||g;return a()(c.a,{className:t,cellX:r,cellY:o,cellWidth:s,cellHeight:d},void 0,P?a()("div",{className:f.a.placeholder,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(u.default)("Loading..."),!O&&(S||I)&&a()(l.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(20)),c=n(87),u=n(3),d=n(137),p=n(3031),h=n(3033),f=n.n(h);t.a=Object(d.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,h=e.imageUrl,f=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},void 0,!y&&h&&a()(d.a,{serverEntityID:t,providerEntityID:n,url:h,width:o,height:s}),!y&&f&&a()("div",{
className:g.a.iconContainer},void 0,a()(d.a,{serverEntityID:t,providerEntityID:n,url:f,width:o-m,height:s-m,backgroundSize:"contain"})),!y&&!h&&!f&&v&&a()("div",{className:g.a.titleContainer},void 0,a()("div",{className:g.a.titleItem},void 0,v)),a()("div",{className:g.a.overlay,onMouseEnter:I},void 0,a()("div",{className:g.a.overlayBackground}),a()(l.a,{className:g.a.overlayLink,to:r}),b&&a()(c.a,{className:g.a.overlaySelectCoverButton,component:l.a,
tooltip:Object(u.default)("A different type is selected"),tooltipAttachment:p.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(20)),c=n(207),u=n(3),d=n(760),p=n(23),h=n(44),f=n.n(h),v=n(3032),g=n.n(v),m=2*parseInt(f.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",overlay:"MetadataDirectoryPosterCard-overlay-1W6Fj MetadataPosterCardOverlay-overlay-1uMpL",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"}},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,P=e.titleComponents,j=e.isFeaturedHub,T=e.metadataKey,w=e.type,E=e.subtype,x=e.selectionType,A=e.activeSelectionType,N=e.isSelected,L=e.isUnavailable,k=e.imageWidth,_=e.imageHeight,R=e.imageUrl,z=e.onSelectItem,U=e.onDeselectItem,B=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","isUnavailable","imageWidth","imageHeight","imageUrl","onSelectItem","onDeselectItem"]),F=!T,V=F||L||M,H=Object(b.a)(P,C,w,E,O),Q=j?H.slice(0,2):[],Y=j?H.slice(2):H
;return s()(h.a,{className:t,cellX:u,cellY:d,cellWidth:v,cellHeight:I},void 0,V?s()(m.a,{imageWidth:k,imageHeight:_,isSelected:N}):p.a.createElement(g.a,a()({serverEntityID:n,providerEntityID:i,metadataItemEntityID:r,containerKey:l,listType:C,listContext:O,metadataKey:T,type:w,imageWidth:k,imageHeight:_,imageUrl:R,selectionType:x,activeSelectionType:A,isSelected:N,isOffscreen:D,onSelectItem:z,onDeselectItem:U},B)),s()("div",{"data-qa-id":"metadataTitleContainer",
className:j?S.a.continueWatchingTitleContainer:S.a.titleContainer},void 0,F&&Object(f.default)("Loading..."),!F&&!!Q.length&&s()("div",{className:S.a.splitTitleContainer},void 0,Q.map(function(t,a){return s()(y.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)})),!F&&Y.map(function(t,a){return t?s()(y.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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(87),f=n(3),v=n(137),g=(n(32),n(346)),m=n(599),y=n(249),b=n(187),I=n(3036),S=n.n(I);t.a=Object(v.a)(i)},function(e,t){e.exports={placeholder:"MetadataPosterCardPlaceholder-placeholder-pMf-q MetadataPosterCardFace-poster-L2P6r",
isSelected:"MetadataPosterCardPlaceholder-isSelected-34TSl MetadataPosterCardFace-isSelected-1XUgk"}},function(e,t){e.exports={titleContainer:"MetadataPosterCell-titleContainer-24DI6",continueWatchingTitleContainer:"MetadataPosterCell-continueWatchingTitleContainer-3yCAY",splitTitleContainer:"MetadataPosterCell-splitTitleContainer-RAVdF"}},function(e,t){e.exports={innerContent:"PrePlayMetadataInnerContent-innerContent-1BPzw"}},function(e,t,n){"use strict";function i(e,t){switch(t){case p.c:
switch(e){case h.e:return g.a}}switch(e){case h.e:return v.a;case h.f:return m.a;case h.c:return f.a}return f.a}function r(){return Object(u.createSelector)(Object(d.a)(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:e.type,subtype:e.subtype,title:e.title,year:e.year,summary:e.summary}})}function a(e){var t=i(e.type,e.subtype);return l.a.createElement(t,e)}var o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(11),u=n(5),d=(n.n(u),
n(22)),p=n(98),h=n(26),f=n(3039),v=n(1228),g=n(819),m=n(1237);t.a=Object(c.b)(r)(a)},function(e,t,n){"use strict";function i(e){var t=e.title,n=e.summary;return a()(s.Fragment,{},void 0,a()(c.a,{},void 0,a()(p.a,{},void 0,a()(d.a,{},void 0,t))),h,a()(c.a,{},void 0,a()(u.a,{},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(129)),c=n(96),u=n(144),d=n(104),p=n(139),h=a()(l.a,{});t.a=i},function(e,t){e.exports={divider:"PrePlayDivider-divider-1qvbj"}},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(64),v=n(273),g=n(27),m=n(3),y=n(23),b=n(3042),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:void 0,style:g},void 0,r()(f.a,{ignoreWidth:!0,ignorePosition:!0,onMeasure:this.onMeasure},void 0,n?r()("div",{dangerouslySetInnerHTML:n}):i)),p&&r()(v.a,{className:I.a.readMore,arrowClassName:I.a.readMoreArrow,direction:s?y.a.DOWN:y.a.UP,isSelected:!1,onPress:this.onTogglePress},void 0,s?Object(m.default)("Read More"):Object(m.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.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(3)),c=n(814),u=n(815),d=n(600);n(88),n(125);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";function i(){return Object(r.createSelector)(Object(o.a)(),Object(a.a)(),Object(s.a)(l.k),function(e,t,n){return Object(c.a)(e,n,t)})}var r=n(5),a=(n.n(r),n(22)),o=n(34),s=n(274),l=n(81),c=n(1230);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(273)),f=n(45),v=n(772),g=n(1125),m=n(261),y=n(3),b=n(151),I=n(3050),S=n(3056),M=n(601),D=n(23),C=n(815),O=n(600),P=n(3067),j=n.n(P),T=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(f.a)(),r._subtitlesStreamMenuButtonID=Object(f.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.metadataItemEntityID,i=e.mediaItem,a=e.canShowMoreSubtitlesAction,o=e.onAudioStreamSelect,s=e.onSubtitlesStreamSelect,l=this.state,c=l.isAudioStreamMenuOpen,u=l.isSubtitlesStreamMenuOpen;if(!i)return r()(C.a,{},void 0,r()(O.a,{label:Object(y.default)("Video")},void 0,r()("span",{className:j.a.loadingMessage},void 0,Object(y.default)("Loading..."))),r()(O.a,{label:Object(y.default)("Audio")},void 0,r()("span",{className:j.a.loadingMessage
},void 0,Object(y.default)("Loading..."))),r()(O.a,{label:Object(y.default)("Subtitles")},void 0,r()("span",{className:j.a.loadingMessage},void 0,Object(y.default)("Loading..."))));var d=b.a.get("audio").id,p=Object(m.a)(i,{streamType:d}),f=Object(v.a)(i),P=b.a.get("subtitles").id,T=Object(m.a)(i,{streamType:P}),w=Object(g.a)(i),E=a||T.length>1,x=r()(M.a,{serverEntityID:t,type:"audio",stream:f}),A=r()(M.a,{serverEntityID:t,type:"subtitles",stream:w});return r()(C.a,{},void 0,r()(O.a,{
label:Object(y.default)("Video")},void 0,r()(M.a,{serverEntityID:t,type:"video",mediaItem:i})),r()(O.a,{label:Object(y.default)("Audio")},void 0,p.length>1?r()(h.a,{id:this._audioStreamMenuButtonID,direction:c?D.a.UP:D.a.DOWN,onPress:this.onAudioStreamMenuButtonPress},void 0,x):x),r()(O.a,{label:Object(y.default)("Subtitles")},void 0,E?r()(h.a,{id:this._subtitlesStreamMenuButtonID,direction:u?D.a.UP:D.a.DOWN,onPress:this.onSubtitlesStreamMenuButtonPress},void 0,A):A),r()(I.a,{
target:this._audioStreamMenuButtonID,isOpen:c,serverEntityID:t,audioStreams:p,onMenuClose:this.onAudioStreamMenuClose,onStreamSelect:o}),r()(S.a,{target:this._subtitlesStreamMenuButtonID,isOpen:u,serverEntityID:t,metadataItemEntityID:n,subtitlesStreams:T,canShowMoreSubtitlesAction:a,onMenuClose:this.onSubtitlesStreamMenuClose,onStreamSelect:s}))},t}(p.Component);t.a=T},function(e,t,n){"use strict";function i(e){
var t=e.target,n=e.isOpen,i=e.serverEntityID,r=e.audioStreams,o=e.onMenuClose,s=e.onStreamSelect;return a()(l.a,{target:t,isOpen:n,size:u.e.LARGE,onMenuClose:o},void 0,r.map(function(e){return a()(d.a,{stream:e,onMenuClose:o,onStreamSelect:s},e.id,a()(c.a,{serverEntityID:i,type:"audio",stream:e}))}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(56)),c=n(601),u=n(23),d=n(1231);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){
return{serverShortVersion:e.shortVersion}})}var r=n(11),a=n(5),o=(n.n(a),n(34)),s=n(3052);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.type,n=e.stream,i=e.mediaItem,r=e.serverShortVersion,o=c()(e,["type","stream","mediaItem","serverShortVersion"]);if(!n&&!i)return s()("span",{},void 0,Object(g.default)("None"));if(r&&Object(f.a)(r,h.a.streamDisplayTitles)){var l=void 0;if("video"===t){var u=Object(v.a)(i);l=u?u.displayTitle:Object(g.default)("None")
}else l=n.displayTitle||n.language;return s()("span",{"aria-label":l,"data-qa-id":t+"Stream"},void 0,l)}var d=I[t];return p.a.createElement(d,a()({},o,{stream:n,mediaItem:i}))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(175),f=n(316),v=n(309),g=n(3),m=n(3053),y=n(3054),b=n(3055),I={audio:m.a,subtitles:y.a,video:b.a};t.a=i},function(e,t,n){"use strict";function i(e){var t=e.stream,n=e.separatorComponent,i=[];t.codec&&i.push(Object(c.a)(t.codec)),
t.channels&&i.push(Object(l.a)(t.channels));var r=t.language||Object(u.default)("Unknown"),o=i&&i.length>0?i.join(" "):null,s=o?Object(u.default)("{label}, {details}",{label:r,details:o}):r;return a()("span",{"aria-label":s,"data-qa-id":"audioStream"},void 0,r,o&&a()(n,{}),o)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1075)),c=n(1076),u=n(3);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.stream,n=e.separatorComponent,i=[];t.codec&&i.push(t.codec.toUpperCase()),
t.key&&i.push(Object(l.default)("External")),t.forced&&i.push(Object(l.default)("Forced"));var r=t.language||Object(l.default)("Unknown"),o=i&&i.length>0?i.join(" "):null,s=o?Object(l.default)("{label}, {details}",{label:r,details:o}):r;return a()("span",{"aria-label":s,"data-qa-id":"subtitlesStream"},void 0,r,o&&a()(n,{}),o)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3));t.a=i},function(e,t,n){"use strict";function i(e){var t=e.mediaItem,n=e.separatorComponent,i=void 0
;t.videoCodec&&(i=[t.videoCodec.toUpperCase()]);var r=Object(l.a)(t),o=r&&r.scanType,s=Object(c.default)(t.videoResolution,o)||Object(u.default)("Unknown"),d=i&&i.length>0?i.join(" "):null,p=d?Object(u.default)("{label}, {details}",{label:s,details:d}):s;return a()("span",{"aria-label":p,"data-qa-id":"videoStream"},void 0,s,d&&a()(n,{}),d)}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(309)),c=n(369),u=n(3);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(56)),f=n(101),v=n(3),g=n(1232),m=n(601),y=n(23),b=n(1231),I=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMoreSubtitlesPress=function(){r.setState({isSubtitlesModalOpen:!0})},r.onSubtitlesModalClose=function(){r.setState({isSubtitlesModalOpen:!1})},r.state={isSubtitlesModalOpen:!1},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.target,n=e.isOpen,i=e.serverEntityID,a=e.metadataItemEntityID,o=e.subtitlesStreams,s=e.canShowMoreSubtitlesAction,l=e.onMenuClose,c=e.onStreamSelect;return r()(p.Fragment,{},void 0,r()(h.a,{target:t,isOpen:n,size:y.e.LARGE,onMenuClose:l},void 0,o.map(function(e){return r()(b.a,{stream:e,onMenuClose:l,onStreamSelect:c},e.id,r()(m.a,{serverEntityID:i,type:"subtitles",stream:e}))}),s&&r()(f.a,{onPress:this.onMoreSubtitlesPress},void 0,Object(v.default)("More..."))),r()(g.a,{
metadataItemEntityID:a,isOpen:this.state.isSubtitlesModalOpen,onModalClose:this.onSubtitlesModalClose}))},t}(p.Component);t.a=I},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"SubtitleModel",rootPropertyName:"Stream",syncedAttrs:{id:r.a.integer,key:r.a.string,streamType:r.a.integer,codec:r.a.string,index:r.a.integer,language:r.a.string,languageCode:r.a.string,score:r.a.float,providerTitle:r.a.string,title:r.a.string,displayTitle:r.a.string,reason:r.a.string,
hearingImpaired:r.a.boolean,perfectMatch:r.a.boolean,downloaded:r.a.boolean}});t.a=a},function(e,t,n){"use strict";function i(e){var t=e.metadataItemEntityID,n=e.isOpen,i=e.onModalClose;return a()(c.a,{isOpen:n,metricsPage:l._5,onModalClose:i},void 0,a()(u.a,{metadataItemEntityID:t,onModalClose:i}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(30)),c=n(117),u=n(3059);t.a=i},function(e,t,n){"use strict";function i(){
return Object(o.createSelector)(Object(u.a)("profile"),Object(l.a)(),c.a,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],i=t.Media,r="";if(i&&i.length){var a=i[0],o=a.Part;o.length&&(r=Object(d.default)(o[0].file,55))}var s=n.subtitles,l=n.isSubtitlesPending,c=n.isSubtitlesPopulated,u=n.subtitlesError,p=n.subtitlesDownloadKey,h=n.isSubtitlesDownloaded,f=n.subtitlesDownloadError,v=l&&!u,g=c&&!u&&s.length>0,m=c&&!u&&0===s.length;return{mediaTitle:r,
defaultSubtitleLanguage:e.defaultSubtitleLanguage,subtitles:s,showSpinner:v,showSearchResults:g,showEmptyMessage:m,subtitlesDownloadKey:p,isSubtitlesDownloaded:h,hasSubtitlesError:!!u,subtitlesError:u,hasSubtitlesDownloadError:!!f,subtitlesDownloadError:f}})}function r(e,t){var n=t.metadataItemEntityID;return{onFetchSubtitles:function(t){var i=t.language,r=t.title;e(Object(s.b)({metadataItemEntityID:n,language:i,title:r}))},onDownloadSubtitle:function(t){
var i=t.key,r=t.codec,a=t.languageCode,o=t.providerTitle,l=t.hearingImpaired;e(Object(s.a)({metadataItemEntityID:n,key:i,codec:r,language:a,providerTitle:o,hearingImpaired:l}))}}}var a=n(11),o=n(5),s=(n.n(o),n(816)),l=n(22),c=n(3060),u=n(336),d=n(942),p=n(3061);t.a=Object(a.b)(i,r)(p.a)},function(e,t,n){"use strict";function i(e){return e.ui.subtitlesModal}t.a=i},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(53),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(227)),g=n(192),m=n(59),y=n(78),b=n(3062),I=n(3),S=n(31),M=n(191),D=n(95),C=n(23),O=n(3063),P=n(3066),j=n.n(P),T=r()(S.a,{}),w=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onSearch=function(){var e=r.state,t=e.language,n=e.title;r.props.onFetchSubtitles({language:t,title:n})},r.onLanguageChange=function(e){var t=o()(b.a).find(function(t){return b.a[t]===e});r.setState({language:t},r.onSearch)},r.onTitleChange=function(e){
r.searchTimeoutID&&clearTimeout(r.searchTimeoutID),r.setState({title:e},function(){r.searchTimeoutID=setTimeout(r.onSearch,500)})},r.state={language:Object(b.b)(n.defaultSubtitleLanguage),title:""},r.searchTimeoutID=null,r}return p()(t,e),t.prototype.componentDidMount=function(){this.onSearch()},t.prototype.componentDidUpdate=function(e,t){var n=this.props,i=n.isSubtitlesDownloaded,r=n.onModalClose;!e.isSubtitlesDownloaded&&i&&r()},t.prototype.componentWillUnmount=function(){
this.searchTimeoutID&&clearTimeout(this.searchTimeoutID)},t.prototype.render=function(){var e=this.props,t=e.mediaTitle,n=e.subtitles,i=e.showSpinner,a=e.showSearchResults,o=e.showEmptyMessage,s=e.hasSubtitlesError,l=e.subtitlesError,c=e.subtitlesDownloadKey,u=e.hasSubtitlesDownloadError,d=e.subtitlesDownloadError,p=e.onDownloadSubtitle,h=e.onModalClose,f=this.state.language;return r()("div",{className:j.a.modalContainer},void 0,r()(D.a,{onModalClose:h
},void 0,r()(y.a,{},void 0,Object(I.default)("Subtitles")),u?r()("div",{},void 0,r()(M.a,{errorMessage:d})):null,r()(m.a,{className:j.a.modalBody,scrollDirection:C.d.NONE},void 0,r()("div",{className:j.a.inputs},void 0,r()(v.a,{className:j.a.languageInput,name:"language",value:b.a[f],values:b.c,onChange:this.onLanguageChange}),r()(g.a,{className:j.a.titleInput,name:"title",placeholder:t,onChange:this.onTitleChange})),i&&r()("div",{className:j.a.centeredContainer},void 0,T),s&&r()("div",{
className:j.a.centeredContainer},void 0,l),a&&r()(O.a,{subtitles:n,subtitlesDownloadKey:c,onDownloadSubtitle:p}),o&&r()("div",{className:j.a.centeredContainer},void 0,Object(I.default)("No results")))))},t}(f.Component);t.a=w},function(e,t,n){"use strict";function i(){return[].concat(s).sort(o.c)}function r(e){if(l[e])return e;var t=Object(a.a)([e]);return l[t]?t:"en"}t.b=r,n.d(t,"c",function(){return c})
;var a=n(1234),o=n(387),s=["af","sq","ar","an","hy","az","eu","be","bn","bs","br","bg","my","ca","zh","zh-TW","cs","da","nl","en","eo","et","fi","fr","ka","de","gl","el","he","hi","hr","hu","is","id","it","ja","kn","kk","km","ko","ku","lv","lt","lb","mk","ml","ms","mn","no","oc","fa","pl","pt","pt-BR","ro","ru","sr","si","sk","sl","es","sw","sv","ta","te","tl","th","tr","uk","ur","vi"],l=s.reduce(function(e,t){return e[t]=o.b[t],e},{}),c=function(){return i().reduce(function(e,t){
return e.push(l[t]),e},[])}();t.a=l},function(e,t,n){"use strict";function i(e){var t=e.subtitles,n=e.subtitlesDownloadKey,i=e.onDownloadSubtitle;return a()(l.a,{},void 0,t.map(function(e){var t=e.key,r=e.title,o=e.displayTitle,s=e.providerTitle,l=e.score,u=e.codec,d=e.languageCode,p=e.hearingImpaired,h=e.perfectMatch,f=e.downloaded;return a()(c.a,{subtitleKey:t,title:r,displayTitle:o,providerTitle:s,score:l,codec:u,languageCode:d,hearingImpaired:p,perfectMatch:h,downloaded:f,
isDownloading:n===t,onDownloadSubtitle:i},t)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(71)),c=n(3064);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(20)),f=n(52),v=n(25),g=n(31),m=n(3065),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.onPress=function(){
var e=i.props,t=e.subtitleKey,n=e.codec,r=e.languageCode,a=e.providerTitle,o=e.hearingImpaired;(0,e.onDownloadSubtitle)({key:t,codec:n,languageCode:r,providerTitle:a,hearingImpaired:o})},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.title,n=e.displayTitle,i=e.score,a=e.perfectMatch,o=e.downloaded,s=e.isDownloading;return r()(h.a,{className:y.a.item,isDisabled:o||s,onPress:this.onPress},void 0,r()("div",{className:y.a.titles},void 0,r()("span",{
className:y.a.title},void 0,t),r()("span",{className:y.a.secondaryTitle},void 0,n)),r()("div",{className:y.a.score},void 0,a?r()(v.a,{className:y.a.perfectMatch,name:"plex-icon-star-full-560"}):null,i),s?r()("div",{className:y.a.centeredContainer},void 0,r()(g.a,{size:f.SMALL})):null,o?r()(v.a,{className:y.a.downloadedIcon,name:"plex-icon-selected-560"}):null,s||o?null:r()(v.a,{className:y.a.downloadIcon,name:"plex-icon-toolbar-sync-560"}))},t}(p.Component);t.a=b},function(e,t){e.exports={
item:"SubtitleRow-item-1suQR",downloadIcon:"SubtitleRow-downloadIcon-3pqWj SubtitleRow-icon-21El6 SubtitleRow-centeredContainer-2zmv_",titles:"SubtitleRow-titles-3FAr9",title:"SubtitleRow-title-1Jeyw",secondaryTitle:"SubtitleRow-secondaryTitle-17rEP SubtitleRow-title-1Jeyw",score:"SubtitleRow-score-1DVm2",perfectMatch:"SubtitleRow-perfectMatch-3N1Bn",centeredContainer:"SubtitleRow-centeredContainer-2zmv_",icon:"SubtitleRow-icon-21El6 SubtitleRow-centeredContainer-2zmv_",
downloadedIcon:"SubtitleRow-downloadedIcon-2F0Cd SubtitleRow-icon-21El6 SubtitleRow-centeredContainer-2zmv_"}},function(e,t){e.exports={modalContainer:"SubtitlesModalContent-modalContainer-3B7OA",modalBody:"SubtitlesModalContent-modalBody-3sIFe ModalBody-modalBody--5uHS",inputs:"SubtitlesModalContent-inputs-b332_",languageInput:"SubtitlesModalContent-languageInput-10IPx SelectInput-input-x1tNm input-input-1P2Vi",
titleInput:"SubtitlesModalContent-titleInput-sGHLR TextInput-input-1VMum input-input-1P2Vi",centeredContainer:"SubtitlesModalContent-centeredContainer-2fFRI"}},function(e,t){e.exports={loadingMessage:"PrePlayDetailsStreamsGroup-loadingMessage-27_nd"}},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(){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(5),a=(n.n(r),n(22))},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(5),a=(n.n(r),n(22))},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()(h.a,{},void 0,C&&a()(v.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()(p.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),y&&a()(g.a,{
onPress:S}),!y&&(b||!!I)&&a()(f.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(3)),c=n(576),u=n(790),d=n(3072),p=n(602),h=n(104),f=n(3076),v=n(1235),g=n(3079),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(3073)),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,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(793)),c=(n(88),n(125),n(133)),u=n(818);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(3)),c=n(818),u=n(3077),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){e.exports={tertiaryTitleSpacer:"PrePlayTertiaryTitleSpacer-tertiaryTitleSpacer-14zhL"}},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(3)),c=n(818),u=n(3080),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,n){"use strict";function i(e){var t=e.originallyAvailableAt;return a()(h.a,{},void 0,!!t&&Object(p.default)("{monthName} {day}, {year}",{
monthName:Object(d.a)(s()(t).unix()),day:Object(u.default)(t,"D"),year:Object(u.default)(t,"YYYY")}))}var r=n(2),a=n.n(r),o=n(48),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(266)),d=n(786),p=n(3),h=n(409);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(820)),c=(n(88),n(125),
n(409));t.a=i},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(Object(c.a)(),Object(l.a)(),u.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(d.b)({playerType:n}))},onPlay:function(){e(Object(s.k)({playerType:n}))}}}var a=n(11),o=n(5),s=(n.n(o),
n(136)),l=n(22),c=n(79),u=n(70),d=n(1238),p=n(3084);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(64)),f=n(330),v=n(3),g=n(32),m=n(272),y=n(196),b=n(247),I=n(1029),S=n(126),M=n(44),D=(n.n(M),n(3085)),C=n.n(D),O=parseInt(M.postPlayPosterWidth,10),P=parseInt(M.postPlayTitleHeight,10)+parseInt(M.postPlayAutoPlayHeight,10),j=10,T=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(S.d)(O,r.props.type,r.props.subtype,g.h),t-P),i=Object(S.e)(n,r.props.type,r.props.subtype,g.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:j},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:j})),!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,g=c.secondsLeft,S=j-g+1,M=S/j*100;return r()(h.a,{className:C.a.container,onMeasure:this.onContentMeasure},void 0,r()("div",{className:C.a.title},void 0,Object(v.default)("Playing Next")),u&&r()("div",{className:C.a.poster,style:{width:d,height:p}},void 0,r()(b.a,{serverEntityID:t,providerEntityID:n,type:i,width:d,
height:p,url:a}),o&&r()("div",{className:C.a.progress},void 0,r()(m.a,{size:d/4,lineWidth:3,progress:M,showProgressText:!1,easing:I.a}),r()("span",{className:C.a.timeLeft},void 0,g)),r()(y.a,{className:C.a.playButton,circleClassName:C.a.playCircle,"aria-label":Object(v.default)("Play Next"),onPress:l})),r()(f.a,{className:o?C.a.autoPlayOn:C.a.autoPlayOff,name:"autoPlayCheck",value:o,checkboxText:o?Object(v.default)("Auto Play On"):Object(v.default)("Auto Play Off"),onChange:s}))},t}(p.Component)
;t.a=T},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(a.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(11),a=n(5),o=(n.n(a),n(212)),s=n(3088);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.itemEntityIDs,r=e.playerType;return a()("div",{className:f.a.container},void 0,a()(p.a,{},void 0,a()(d.a,{title:Object(c.default)("Airing Now")})),a()(l.a,{className:f.a.content,autoScroll:!0},void 0,i.map(function(e){return a()(u.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(71)),c=n(3),u=n(3089),d=n(1213),p=n(1214),h=n(3095),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(186),o=n(3090)
;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(20)),c=n(3091),u=n(3094),d=n.n(u);t.a=i},function(e,t,n){
"use strict";function i(){return Object(a.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(l.a)(),Object(o.a)(),Object(s.a)(),function(e,t,n,i){var r=c.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(11),a=n(5),o=(n.n(a),n(22)),s=n(405),l=n(79),c=n(32),u=n(232),d=n(126),p=n(3092),h=64,f=36;t.a=Object(r.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(d.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()(c.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()(u.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(477)),c=(n(32),n(766)),u=n(249),d=n(187),p=n(3093),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,n){"use strict";function i(){return Object(b.createSelector)(Object(b.createStructuredSelector)({availableQualities:Object(j.a)("availableQualities"),transcodeServer:Object(E.a)(),
currentDecision:Object(C.a)(),currentBandwidth:Object(D.a)(),mediaItem:Object(O.a)(),canPlayAdaptiveBitrate:Object(M.a)()}),L.a)}function r(){return Object(b.createSelector)(Object(j.a)("controllable"),i(),Object(P.a)(),Object(E.a)(),Object(j.a)("qualityIndex"),Object(j.a)("serverEntityID"),Object(w.a)(),Object(T.a)(),Object(A.a)(),x.a,function(e,t,n,i,r,a,o,s,l,c){var u=o.protocols.includes(N.a);return{serverEntityID:a,metadataItemEntityID:s?s.entityID:null,availableQualities:t,
audioStreams:n.audioStreams,selectedAudioStream:n.selectedAudioStream,subtitlesStreams:n.subtitlesStreams,selectedSubtitlesStream:n.selectedSubtitlesStream,selectedSubtitlesSize:c.subtitleSize,autoPlay:c.autoPlay,canSetVideoQuality:e?!!e.quality:!!i.transcoderVideo&&!i.transcoderVideoRemuxOnly,canSetAudioStream:e?!!e.audioStream:!u,canSetSubtitleStream:e?!!e.subtitleStream:!u,canSetSubtitleSize:e?!!e.subtitleSize:!u,canSetAutoPlay:e?!!e.autoPlay:!u,canShowMoreSubtitlesAction:l,qualityIndex:r}})}
var a=n(6),o=n.n(a),s=n(12),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(5),I=(n.n(b),n(153)),S=n(136),M=n(3097),D=n(3098),C=n(280),O=n(1130),P=n(1128),j=n(158),T=n(168),w=n(233),E=n(774),x=n(70),A=n(3099),N=n(511),L=n(3100),k=n(3102),_={dispatchChangeQualityIndex:S.e,dispatchChangeStream:S.f,dispatchChangeSubtitleSize:S.g,dispatchSetAutoPlay:I.o},R=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(k.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,_)(R)},function(e,t,n){"use strict"
;function i(){return Object(r.createSelector)(function(e){return!!e.remotePlayer},Object(o.a)(),Object(a.a)(),function(e,t,n){return Object(s.a)()&&t.hasAdaptiveBitrate&&!e&&!n})}t.a=i;var r=n(5),a=(n.n(r),n(212)),o=n(774),s=n(821)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(l.a)(["bandwidthTimeline","positionSeconds"]),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:o.a.max(r,function(e){return parseInt(e.time,10)})})}t.a=i;var r=n(5),a=(n.n(r),n(7)),o=n.n(a),s=n(280),l=n(471)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e){return e.remotePlayer
},Object(o.a)(),Object(a.a)(),Object(s.a)(l.k),function(e,t,n,i){return Object(c.a)(t,i,n,e)})}var r=n(5),a=(n.n(r),n(168)),o=n(472),s=n(274),l=n(81),c=n(1230);t.a=i},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:v.a.ORIGINAL,explicitQuality:!1,conversionDescriptionSummary:p([Object(g.default)("Original"),d(n)]),conversionDescription:Object(g.default)("Play Original Quality"),conversionDescriptionExtra:n}}function a(e,t){var n={index:v.a.CONVERT_AUTOMATICALLY,explicitQuality:!1,conversionDescription:Object(g.default)("Convert Automatically")}
;if(e&&e.qualityIndex===v.a.CONVERT_AUTOMATICALLY&&t){var i=c({bitrate:Object(h.default)(t.bandwidth),resolution:t.resolution});n.conversionDescriptionSummary=Object(g.default)("Auto (Now: {bitrateWithResolution})",{bitrateWithResolution:i}),n.conversionDescriptionExtra=Object(g.default)("Now: {bitrateWithResolution}",{bitrateWithResolution:i})}else n.conversionDescriptionSummary=Object(g.default)("Convert Automatically");return n}function o(e){
var t=l(e.width,e.height,e.bitrate),n=u(t),i=n?Object(g.default)("Convert to"):Object(g.default)("Convert");return{index:v.a.ORIGINAL,explicitQuality:!1,conversionDescriptionSummary:Object(g.default)("Convert (Maximum)"),conversionDescription:p([i,n,d(Object(g.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(g.default)("Convert"),d(i)]),conversionDescription:p([Object(g.default)("Convert to"),r]),conversionDescriptionExtra:n.bitrate}}function l(e,t,n){var i=Object(f.a)(e,t,n);return{bitrate:Object(h.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(443),f=n(3101),v=n(518),g=n(3)},function(e,t,n){"use strict";function i(e,t,n){if(!e&&!t)return{resolution:"",description:"",descriptionExtra:""};var i=Object(o.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(s.default)("Medium"):t<=4e3?Object(s.default)("High"):t<=8e3?"":t<=1e4?"":t<=12e3?Object(s.default)("Medium"):Object(s.default)("High")}t.a=i;var o=n(949),s=n(3)},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(330)),f=n(779),v=n(1126),g=n(318),m=n(3),y=n(3103),b=n(1232),I=n(601),S=n(1143),M=n(3104),D=n(1144),C=n(23),O="more",P=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSubtitleStreamChange=function(e){e===O?r.onMoreSubtitlesPress():r.props.onSubtitleStreamChange(e)},r.onMoreSubtitlesPress=function(){r.setState({isSubtitlesModalOpen:!0})},r.onSubtitlesModalClose=function(){r.setState({isSubtitlesModalOpen:!1})},r.state={isSubtitlesModalOpen:!1},r}
return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.bottom,n=e.serverEntityID,i=e.metadataItemEntityID,a=e.availableQualities,o=e.audioStreams,s=e.selectedAudioStream,l=e.subtitlesStreams,c=e.selectedSubtitlesStream,u=e.selectedSubtitlesSize,d=e.autoPlay,P=e.qualityIndex,j=e.canSetVideoQuality,T=e.canSetAudioStream,w=e.canSetSubtitleStream,E=e.canSetSubtitleSize,x=e.canSetAutoPlay,A=e.canShowMoreSubtitlesAction,N=e.onQualityChange,L=e.onAudioStreamChange,k=e.onSubtitleSizeChange,_=e.onAutoPlayChange,R=w&&(A||l.length>1),z=R&&E&&!Object(g.a)(),U=j&&!!a.length&&null!=P&&a.findIndex(function(e){
return e.index===P})>-1,B=z&&c&&0!==c.id&&!Object(v.a)(c.codec),F=void 0;if(R&&(F=l.map(function(e){var t,i=r()(I.a,{serverEntityID:n,type:"subtitles",stream:e});return t={},t[""+e.id]=i,t}),A)){var V;F.push((V={},V[O]=Object(m.default)("More..."),V))}return r()(p.Fragment,{},void 0,r()(S.a,{bottom:t},void 0,U&&r()(D.a,{label:Object(m.default)("Quality")},void 0,r()(M.a,{qualityIndex:P,availableQualities:a,onQualityChange:N})),r()(D.a,{label:Object(m.default)("Audio Stream")
},void 0,T&&o.length>1?r()(y.a,{name:"audioStream",size:C.e.MEDIUM,value:""+s.id,values:o.map(function(e){var t,i=r()(I.a,{serverEntityID:n,type:"audio",stream:e});return t={},t[""+e.id]=i,t}),onChange:L}):r()(I.a,{serverEntityID:n,type:"audio",stream:s})),r()(D.a,{label:Object(m.default)("Subtitles")},void 0,R?r()(y.a,{name:"subtitleStream",size:C.e.MEDIUM,value:""+c.id,values:F,onChange:this.onSubtitleStreamChange}):r()(I.a,{serverEntityID:n,type:"subtitles",stream:c})),z&&r()(D.a,{
label:Object(m.default)("Subtitle Size"),isDisabled:!B},void 0,r()(y.a,{name:"subtitleSize",size:C.e.MEDIUM,value:u.toString(),values:f.a.settings.map(function(e){var t;return t={},t[e.value]=e.title,t}),onChange:k})),x&&r()(D.a,{label:Object(m.default)("Auto Play")},void 0,r()(h.a,{name:"autoPlay",size:C.e.SMALL,value:d,onChange:_}))),r()(b.a,{metadataItemEntityID:i,isOpen:this.state.isSubtitlesModalOpen,onModalClose:this.onSubtitlesModalClose}))},t}(p.Component);t.a=P},function(e,t,n){
"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(7),b=n.n(y),I=n(273),S=n(56),M=n(45),D=n(103),C=n(23),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(M.a)(),r}return f()(t,e),t.prototype.getSelectedValue=function(e,t){var n=b.a.find(e,function(e){return b.a.isString(e)?e===t:b.a.keys(e)[0]===t});return b.a.isString(n)?n:n[b.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()(I.a,{id:this._menuInputButtonID,size:n,kind:i,direction:this.state.isMenuOpen?C.a.UP:C.a.DOWN,
onPress:this.onToggleMenuPress},void 0,this.getSelectedValue(s,a),m.a.createElement(S.a,r()({isOpen:this.state.isMenuOpen,target:this._menuInputButtonID,onMenuClose:this.onMenuClose},c),s.map(function(t){if(b.a.isString(t))return o()(D.a,{isSelected:t===a,onPress:e.onSelectPress(t)},t,t);var n=b.a.keys(t),i=n[0];return o()(D.a,{isSelected:i===a,onPress:e.onSelectPress(i)},i,t[i])})))},t}(g.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(1),p=(n.n(d),n(0)),h=(n.n(p),n(7)),f=n.n(h),v=n(273),g=n(56),m=n(45),y=n(226),b=n(141),I=n(3),S=n(3105),M=n(23),D=n(3107),C=n.n(D),O="toggleShowAll",P={placement:"top-start"},j=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(m.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=!!f.a.findWhere(e,{index:b.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(I.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()(v.a,{id:this._menuInputButtonID,"data-qa-id":"videoQuality",size:M.e.MEDIUM,direction:this.state.isMenuOpen?y.UP:y.DOWN,onPress:this.onToggleMenuPress
},void 0,i.conversionDescriptionSummary,r()(g.a,{className:C.a.menu,isOpen:this.state.isMenuOpen,target:this._menuInputButtonID,options:P,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}(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(103)),f=n(3106),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){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){return a()(c.a,{isPlayQueueLoading:e.isPlayQueueLoading},void 0,l.a.createElement(u.a,e))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(1239),u=n(1145);t.a=i},function(e,t){e.exports={playQueueIsLoading:"MiniPlayerContainer-playQueueIsLoading-30Z4G"}},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(132)),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){e.exports={container:"AudioVideoPlayerView-container-kWiFs"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(99)),s=n(46),l=n(1240),c=n(3114),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";function i(){return Object(u.createSelector)(function(e,t){return t.isMiniPlayer},Object(v.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.length,r.firstIndex=a.playQueueSelectedItemOffset-o,r.currentMediaType=Object(m.q)(i.type).mediaType}return r.isVideo=r.currentMediaType===g.d,
r.isPhoto=r.currentMediaType===g.c,r})}function r(e,t){var n=t.playerType;return{onPlayPreviousItem:function(){e(d.i({playerType:n}))},onPlayNextItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e(d.h({playerType:n,autoPlay:t.autoPlay}))},onPlayItem:function(t){e(d.f({playerType:n,index:t}))},onTogglePlayPause:function(){e(p.u({playerType:n}))}}}var a=n(6),o=n.n(a),s=n(1),l=n.n(s),c=n(11),u=n(5),d=(n.n(u),
n(153)),p=n(136),h=n(280),f=n(128),v=n(79),g=n(58),m=n(26),y=n(3115),b=Object(c.b)(i,r)(y.a);b.propTypes=o()({},b.propTypes,{playerType:l.a.string.isRequired}),t.a=b},function(e,t,n){"use strict";function i(e){return!!e.playQueueItemEntityID&&!e.isPaused&&!e.isRemotePlayer&&e.isPhoto}var r=n(6),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(99),g=n(1131),m=n(777),y=n(3116),b=n(3150),I=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.onPlaybackDimensionsChange=function(e){var t=e.width,n=e.height;r.setState({mediaWidth:t,mediaHeight:n})},r.state={mediaHeight:0,mediaWidth:0},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._slideshowTimer=setTimeout(this.onSlideShowAdvance,5e3)},t.prototype._stopSlideshow=function(){this._slideshowTimer&&(this._slideshowTimer=clearTimeout(this._slideshowTimer))},t.prototype.render=function(){
var e=this.props,t=e.isMiniPlayer,n=e.isRemotePlayer,i=this.state,r=i.mediaWidth,o=i.mediaHeight;return f.a.createElement(g.a,a()({},this.props,{playerType:v.b,mediaWidth:r,mediaHeight:o,isRemotePlayer:n,isPostPlayVisible:!1,hasConflicts:!1,mediaComponent:m.b,playerComponent:t?b.a:y.a,onPlaybackDimensionsChange:this.onPlaybackDimensionsChange}))},t}(h.Component);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(64)),f=(n(99),n(31)),v=n(1241),g=n(3118),m=n(23),y=n(44),b=n.n(y),I=n(3119),S=n(3129),M=n(3131),D=n(3143),C=n(3149),O=n.n(C),P=parseInt(b.a.playerControlsHeight,10),j=parseInt(b.a.playerControlsNarrowHeight,10),T=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.onControlsMouseEnter=function(e){r.setState({
disableInteractionTimer:!0})},r.onControlsMouseLeave=function(e){r.setState({disableInteractionTimer:!1})},r.state={disableInteractionTimer:!1,isPhotoStripOpen:!1,isInformationOpen:!1,isControlsMenuOpen:!1,isCastMenuOpen:!1,hadRecentInteraction:!1},r}return u()(t,e),t.prototype.componentDidMount=function(){this._startInteractionTimer()},t.prototype.componentDidUpdate=function(e,t){var n=this.state.disableInteractionTimer,i=t.disableInteractionTimer,r=i&&!n,a=!i&&n
;r?this._startInteractionTimer():a&&this._stopInteractionTimer()},t.prototype.componentWillUnmount=function(){this._stopInteractionTimer()},t.prototype._startInteractionTimer=function(){this.state.disableInteractionTimer||(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.isVideo,p=a.isPhoto,y=a.size,b=a.firstIndex,C=a.width,T=a.height,w=a.canSkipPrevious,E=a.canSkipNext,x=a.errorMessage,A=a.positionMilliseconds,N=a.bufferStartMilliseconds,L=a.bufferEndMilliseconds,k=a.hasFullscreen,_=a.isFullscreen,R=a.isMediaLoading,z=a.isBuffering,U=a.isNarrowLayout,B=a.playerType,F=a.onExitFullscreenPress,V=a.onEnterFullscreenPress,H=a.onToggleFullscreen,Q=a.onPlayNextItem,Y=a.onPlayPreviousItem,G=a.onPlayItem,W=this.state,K=W.isControlsMenuOpen,q=W.isCastMenuOpen,Z=t||n,X=!(Z||i||K||q),J=!i&&!q,$=Z,ee=!p&&(R||z),te=U?j:P,ne=X?null:"translateY("+-te+"px)"
;return r()("div",{"data-qa-id":"photoPlayerContainer",className:(O.a.fullPlayer||"")+" "+(X&&O.a.hideControls||"")+" "+($&&O.a.dockControls||""||""),onMouseMove:this.onInteraction,onMouseDown:this.onInteraction,onTouchStart:this.onInteraction,onTouchEnd:this.onInteraction},void 0,p&&r()(g.a,{playerType:B,playQueueItemEntityID:c}),r()("div",{className:O.a.player},void 0,r()("div",{className:O.a.main},void 0,r()(h.a,{className:O.a.content,onMeasure:this.onContentMeasure},void 0,ee&&r()("div",{
className:O.a.spinner},void 0,r()(f.a,{size:m.e.LARGE})),r()(I.a,{serverEntityID:o,providerEntityID:s,playQueueItemEntityIDs:l,playQueueItemEntityID:c,firstIndex:b,size:y,errorMessage:x,width:C,height:T}),!u&&r()(S.a,{hideOverlays:J,isPhoto:p,isFullscreen:_,hasFullscreen:k,canSkipNext:E,canSkipPrevious:w,onPlayNextItem:Q,onPlayPreviousItem:Y,onCastMenuChange:this.onCastMenuChange,onEnterFullscreenPress:V,onExitFullscreenPress:F,onToggleFullscreen:H})),t&&r()(D.a,{className:O.a.mainFooter,
serverEntityID:o,providerEntityID:s,playQueueItemEntityIDs:l,playQueueItemEntityID:c,firstIndex:b,size:y,onPhotoPress:G})),n&&r()(M.a,{className:O.a.aside,playerType:B})),!u&&r()("div",{className:O.a.bottomBar,style:{bottom:-te,height:te,WebkitTransform:ne,msTransform:ne,transform:ne},onMouseEnter:this.onControlsMouseEnter,onMouseLeave:this.onControlsMouseLeave},void 0,r()(v.a,{playerType:B,isVideo:d,isPhoto:p,positionMilliseconds:A,bufferStartMilliseconds:N,bufferEndMilliseconds:L,
activatePhotoInformationButton:n,activatePhotoStripButton:t,showPhotoInformationButton:!0,showPhotoStripButton:!0,onPhotoInformationPress:this.onPhotoInformationTogglePress,onPhotoStripPress:this.onPhotoStripTogglePress,onControlsMenuChange:this.onControlsMenuChange})))},t}(p.Component);t.a=T},function(e,t,n){"use strict";function i(e){return Object(h.createSelector)(Object(f.a)(),m.a,g.a,y.a,function(t,n,i,r){return e(n,i,r,t)})}function r(){return i(I.e)}function a(){return i(I.f)}
function o(){return i(I.o)}function s(){return Object(h.createSelector)(Object(v.a)(),r(),a(),o(),function(e,t){return t.isVideo},function(e,t,n,i,r){return e?{playQueueItemEntityID:e.entityID,showEditButton:t,showFavoriteButton:n,showMenuButton:!0,showShuffleButton:!0,showUnfavoriteButton:i,showVolume:r}:{}})}var l=n(6),c=n.n(l),u=n(1),d=n.n(u),p=n(11),h=n(5),f=(n.n(h),n(22)),v=n(128),g=n(37),m=n(50),y=n(185),b=n(784),I=n(278),S=Object(p.b)(s)(b.a);S.propTypes=c()({},S.propTypes,{
providerEntityID:d.a.string.isRequired,metadataItemEntityID:d.a.string.isRequired,serverEntityID:d.a.string.isRequired,playerType:d.a.string.isRequired}),t.a=S},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(l.a)(),Object(s.a)(),o.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,o=r.Media,s=o[0],l=a===c.c,u=s&&s.Part&&s.Part[0],d=u&&u.key;return{serverEntityID:e.serverEntityID,
imageUrl:l?null:d}})}var r=n(11),a=n(5),o=(n.n(a),n(115)),s=n(128),l=n(79),c=n(26),u=n(1187);t.a=Object(r.b)(i)(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(3120)),f=n(3122),v=n(3128),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)),s&&l&&t&&!o?r()(h.a,{items:t,currentItem:n,size:i,firstIndex:a,width:s,height:l,renderSlide:this.renderSlide}):null)},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,s=e.width,l=e.height;if(!t||!t.length)return null;var d=t.indexOf(n),h=c.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,c=t[e]
;return a()(u.a,{className:n?p.a.currentSlide:p.a.slide,cellY:0,cellX:(e-d)*s,cellWidth:s,cellHeight:l},i,c&&o(c))}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(7)),c=n.n(l),u=n(87),d=n(3121),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(p.a)(),function(e){return{playQueueItem:e}})
}function r(e){var t=e.playQueueItem;return t&&t.type===h.g?c.a.createElement(f.a,o()({metadataItemEntityID:t.metadataItem},e)):null}var a=n(6),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),n(811)),h=n(26),f=n(3123);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&&l()(e).length?{isLoading:!1,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(53),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(11),h=n(5),f=(n.n(h),n(3124)),v=n(31),g=n(3125),m=o()(v.a,{});t.a=Object(p.b)(i)(r)},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.type,n=e.thumb,i=e.Media,r=i[0],a="clip"===t,o=r&&r.Part&&r.Part[0],s=o&&o.key;return a||!s?n:s})}t.a=i;var r=n(5),a=(n.n(r),n(22))},function(e,t,n){"use strict"
;var i=n(6),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(271)),g=n(3126),m=n(3),y=n(182),b=n(31),I=n(3127),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.url,a=e.maxWidth,s=e.maxHeight,l=Object(g.a)(a,s),c=l.width,u=l.height,d={width:"100%",height:"100%"},p=this.state,h=p.loading,f=p.error;return o()("div",{className:S.a.slideContainer},void 0,o()("div",{className:S.a.statusContainer},void 0,h&&!f&&M,f&&o()("div",{},void 0,Object(m.default)("Unable to load photo"))),o()(y.a,{serverEntityID:t,providerEntityID:n,url:i,width:c,height:u,style:d,minSize:!0,background:!0,
backgroundSize:"contain",transition:!0,transitionProps:r()({},v.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(371),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,n){"use strict";function i(e){
var t=e.hideOverlays,n=e.canSkipPrevious,i=e.canSkipNext,r=e.hasFullscreen,o=e.isFullscreen,s=e.isPhoto,h=e.onPlayNextItem,v=e.onPlayPreviousItem,g=e.onCastMenuChange,m=e.onEnterFullscreenPress,y=e.onExitFullscreenPress,b=e.onToggleFullscreen;return a()("div",{className:t?f.a.hideOverlays:void 0},void 0,!s&&a()(p.a,{className:f.a.playButton,playerType:l.b,isFullscreen:o,onEnterFullscreenPress:m,onExitFullscreenPress:y,onToggleFullscreen:b}),a()("div",{className:f.a.topBar},void 0,a()(d.a,{
playerType:l.b,isFullscreen:o,hasFullscreen:r,onCastMenuChange:g,onEnterFullscreenPress:m,onExitFullscreenPress:y})),a()(u.a,{className:f.a.leftButton,icon:"plex-icon-hub-prev-560",title:Object(c.default)("Previous Photo"),isDisabled:!n,onPress:v}),a()(u.a,{className:f.a.rightButton,icon:"plex-icon-hub-next-560",title:Object(c.default)("Next Photo"),isDisabled:!i,onPress:h}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(99)),c=n(3),u=n(242),d=n(1141),p=n(1142),h=n(3130),f=n.n(h)
;i.defaultProps={hideOverlays:!1},t.a=i},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";function i(){
return Object(g.createSelector)(Object(b.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(12),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(5),m=(n.n(g),n(1242)),y=n(168),b=n(79),I=n(3132),S={dispatchFetchRelatedPhotos:m.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,d=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()(l.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(u.default)("Video"):Object(u.default)("Photo")),g),a()("div",{className:v.a.line},void 0,!(!d||!f)&&a()("div",{},void 0,d," \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(u.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(71)),c=n(998),u=n(3),d=n(25),p=n(3133),h=n(3139),f=n(3142),v=n.n(f),g=a()(d.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(3)),c=n(3134),u=n(3138),d=n.n(u),p=a()("div",{});t.a=i},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(Object(I.a)(),Object(b.a)(),Object(y.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(6),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(5),m=(n.n(g),n(69)),y=n(474),b=n(51),I=n(34),S=n(99),M=n(813),D=n(3135),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:S.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:m.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,c=e.onPress;return a()("div",{className:h.a.hub,"data-qa-id":"relatedPhotoItem"},void 0,a()(l.a,{onPress:c},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()(u.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(20)),c=n(25),u=n(182),d=n(3136),p=n(3137),h=n.n(p),f=14,v=a()(c.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(182)),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(90)),f=n(19),v=n(3),g=n(31),m=n(3140),y=n(3141),b=n.n(y),I=f.join("https://tiles.unwiredlabs.com/v/o.json",{token:"59a999cb8f28fb0a54eb"}),S="https://www.google.com/maps/@",M=r()(g.a,{}),D=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(S,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:I,attributionControl:!1,interactive:!1,zoom:12,center:n}),this._map.on("render",this.onMapRender),
this._markerElement=document.createElement("div"),this._markerElement.className=b.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;if(!t.isExternalsSupported)return null;var s=o||a&&!e.mapboxgl,l=i||this.state.isTilesLoading;return r()("div",{className:n},void 0,r()("div",{className:b.a.control},void 0,r()("div",{className:b.a.underlay},void 0,l&&M,s&&r()("span",{className:b.a.error},void 0,Object(v.default)("Unable to load map."))),r()("div",{className:(b.a.map||"")+" "+(l&&b.a.loading||""||""),id:"map"})))},n}(p.Component)
;t.a=Object(m.a)(D,{hasSupport:function(){return h.a.hasWebGL},styles:["https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css"],scripts:["https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js"]})}).call(t,n(218))},function(e,t,n){"use strict";function i(e,t,n){if(P[t])return P[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),P[t]=i.promise(),P[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,r){u()(this,i);var a=p()(this,n.call(this,e,r));return a.state={externals:t.hasSupport()?M:O},a}return f()(i,n),i.prototype.componentWillMount=function(){var e=this;if(this.state.externals===M){var 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,isExternalsSupported:t!==O},this.props))},i}(b.Component);return n.displayName="WithExternals("+Object(S.a)(e)+")",n.WrappedComponent=e,n}
var s=n(6),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(297),g=n.n(v),m=n(13),y=n.n(m),b=n(0),I=n.n(b),S=n(166),M="waiting",D="loaded",C="error",O="unsupported",P={};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(7)),f=n.n(h),v=n(64),g=n(87),m=n(3144),y=n(3145),b=n(3148),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,p=u.width,h=u.height,b=a.indexOf(o)+s,S=[],M=[],D=0;if(d){D=Math.ceil(h);var C=Math.ceil(p/D),O=Object(m.a)({index:b,renderableWindow:C,length:l,cellPadding:2,cellWidth:D,width:p});M=f.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
}(p.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,n){"use strict";function i(){
return Object(o.createSelector)(Object(l.a)(),function(e){return{metadataItemEntityID:e.metadataItem}})}function r(){return Object(o.createSelector)(Object(s.a)(),function(e){return{url:e.url}})}var a=n(11),o=n(5),s=(n.n(o),n(3146)),l=n(811),c=n(3147),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)return{};var t=e.entityID,n=e.type;return{entityID:t,url:e.thumb,isVideo:"clip"===n}})}t.a=i
;var r=n(5),a=(n.n(r),n(22))},function(e,t,n){"use strict";var i=n(6),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(20)),g=n(271),m=n(182),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()(v.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()({},g.a)})):null},t}(f.Component);t.a=b},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){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",bottomBar:"PhotoFullPlayer-bottomBar-2pmIf PhotoFullPlayer-bar-2WMUP",seekBar:"PhotoFullPlayer-seekBar-3H_Xh SeekBar-seekBar-2UK3i Slider-slider-2oLVT",aside:"PhotoFullPlayer-aside-WshsF",hideControls:"PhotoFullPlayer-hideControls-1nwRe",controls:"PhotoFullPlayer-controls-1-Z6K",dockControls:"PhotoFullPlayer-dockControls-e5lzC"}},function(e,t,n){"use strict";function i(e){
return a()(c.a,{isPlayQueueLoading:e.isPlayQueueLoading},void 0,l.a.createElement(u.a,e))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(1239),u=n(1241);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="alert-bar-container"></div> <div id="content" class="scroll-container dark-scrollbar"></div> '})},function(e,t,n){"use strict"
;var i=n(21),r=n(47),a=n(15),o=n(3153),s=n.n(o),l=i.a.ItemView.extend({template:s.a,initialize:function(){var e=a.c("appModel");this.listenTo(e,"change:primaryServer",this.render),this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=a.c("appModel"),t=e.get("user"),n=e.get("primaryServer"),i={host:window.location.host,userAgent:window.navigator.userAgent,browser:r.a,user:t.toJSON(),hasPlexSubscription:t.get("hasPlexSubscription"),
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(822)).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(822)).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(822)).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(21),r=n(3155),a=n.n(r),o=i.a.ItemView.extend({className:"logs-container",template:a.a,ui:{textarea:"textarea"},collectionEvents:{add:"onAdd"},onlyAfterRender:["onAdd"],serializeData:function(){return{logs:this.collection.toJSONString()}},onAdd:function(e,t){this.ui.textarea.text(this.collection.toJSONString())}});t.a=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";function i(){return Object(I.createSelector)(S.a,function(e){return e.isFirstRun},function(e,t){return v()({isFirstRun:t,
isPollClient:Object(P.a)(),showEnterFullScreen:Object(M.a)()},e)})}var r=n(2),a=n.n(r),o=n(12),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(6),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(11),I=n(5),S=(n.n(I),n(228)),M=n(689),D=n(68),C=n(244),O=n(1244),P=n(462),j=n(1245),T=n(736),w=n(393),E=n(3157),x=n(3170),A={dispatchResetAuthCodeExchange:C.e,dispatchSwitchAppLayout:D.n,dispatchSignInWithAuthToken:O.b},N=a()(j.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?N:t?y.a.createElement(w.a,v()({component:T.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,A)(k)},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(228),y=n(244),b=n(393),I=n(3158),S={dispatchPreloadPIN:y.c,dispatchBeginPolling:y.b,dispatchStopPolling:y.g,dispatchSkipSignIn:y.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)(m.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(1),p=(n.n(d),n(0)),h=(n.n(p),n(71)),f=n(20),v=n(49),g=n(3),m=n(3159),y=n(3161),b=n(3165),I=n(3167),S=n(3169),M=n.n(S),D=r()(m.a,{}),C=r()(y.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()(h.a,{className:M.a.page,autoScroll:!0},void 0,o&&r()(I.a,{onSwitchLayoutPress:s}),a&&!d&&r()(f.a,{className:M.a.switchToSkipSignInLink,
kind:v.PRIMARY,onPress:this.onSwitchToSkipSignInPress},void 0,Object(g.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(g.default)("Sign in")),c&&r()(f.a,{kind:v.PRIMARY,onPress:this.onStillTherePress},void 0,Object(g.default)("Are you still there?")))),d&&r()(f.a,{className:M.a.addendumLink,kind:v.PRIMARY,onPress:l
},void 0,Object(g.default)("Skip and accept limited functionality")))},t}(p.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(3160)),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(3)),l=n(3162),c=n(3164),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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3163),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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(49),p=n(52),h=n(124),f=n(3166),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()(l.a,{className:h.a.link,kind:c.DEFAULT,onPress:t},void 0,Object(u.default)("Enter TV Full Screen"),a()(d.a,{className:h.a.icon,name:"plex-icon-navbar-tv-mode-560"}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(20)),c=n(49),u=n(3),d=n(25),p=n(3168),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(6),r=n.n(i),a=n(12),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(228),y=n(244),b=n(736),I=n(393),S={dispatchReadStoredPIN:y.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(I.a,r()({component:b.a,pinID:t},n)):null},t}(f.Component);t.a=Object(g.b)(m.a,S)(M)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(67)),s=n(46),l=n(3172),c=r()(o.a,{},void 0,r()(l.a,{})),u=s.a.extend({component:function(e){return c}});t.a=u},function(e,t,n){"use strict";function i(e){return{onSignOut:function(){o.a.execute("signOut").then(function(){e(Object(l.i)({route:"login"}))})}}}var r=n(11),a=n(5),o=(n.n(a),n(40)),s=n(154),l=n(68),c=n(3173),u=Object(a.createSelector)(s.a,function(e){return{isSignedIn:e.isSignedIn}});t.a=Object(r.b)(u,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(30)),f=n(31),v=n(83),g=n(140),m=n(188),y=r()(v.a,{metricsPage:h._2},void 0,r()(g.a,{},void 0,r()(m.a,{},void 0,r()(f.a,{})))),b=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.state={isSigningOut:!1},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){return e.isSignedIn&&!t.isSigningOut?{isSigningOut:!0}:null},t.prototype.componentDidMount=function(){
this.state.isSigningOut&&this.props.onSignOut()},t.prototype.componentDidUpdate=function(e,t){this.state.isSigningOut&&!t.isSigningOut&&this.props.onSignOut()},t.prototype.render=function(){return y},t}(p.Component);t.a=b},function(e,t){e.exports={pageContent:"PageContent-pageContent-16mK6",innerPageContent:"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(67)),s=n(38),l=n(43),c=n(46),u=n(1246),d=n(145),p=r()(d.a,{}),h=c.a.extend({
component:function(e){var t=e.selectedServerID,n=Object(s.a)(l.m,t);return r()(o.a,{},void 0,p,r()(u.a,{serverEntityID:n}))}});t.a=h},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(337)),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.hasPlexSubscription,s=e.isUserRestricted,c=e.canProvisionPersonalCloudServer,h=e.onDownloadServer,g=e.onLinkPersonalCloudServerPress;return n.length?a()(p.a,{selectedServer:t,outOfDateServers:n}):i?f:r?v:s?a()(u.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()(d.a,{hasPlexSubscription:o,
canProvisionPersonalCloudServer:c,onDownloadServer:h,onLinkPersonalCloudServerPress:g})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3)),c=n(1245),u=n(113),d=n(3178),p=n(3180),h=n(184),f=a()(c.a,{}),v=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(71)),f=n(42),v=n(20),g=n(27),m=n(463),y=n.n(m),b=n(123),I=n(3),S=n(450),M=n(23),D=n(3179),C=n.n(D),O={context:b.j,firstRun:!0
},P=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.hasPlexSubscription},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(I.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(I.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(I.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()(h.a,{className:C.a.emptyPage},void 0,r()("div",{className:C.a.content},void 0,r()("img",{className:C.a.pmsLogo,src:y.a}),r()("div",{className:C.a.title},void 0,t?Object(I.default)("Get your Plex Media Server"):Object(I.default)("Install your new server")),r()("div",{className:C.a.description},void 0,s),t&&a&&r()(f.a,{className:C.a.button,kind:M.b.PRIMARY,size:M.e.LARGE,onPress:o},void 0,Object(I.default)("Set up Plex Cloud")),t&&r()(f.a,{className:C.a.button,kind:M.b.PRIMARY,size:M.e.LARGE,
"data-type":"computer",onPress:this.onDownloadPress},void 0,Object(I.default)("Download Plex Media Server")),!t&&r()("div",{className:C.a.downloadMessage},void 0,Object(I.default)("Need to download different server?")),!t&&r()(v.a,{kind:M.b.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress},void 0,Object(I.default)("Download for Computer Platforms")),r()(v.a,{kind:M.b.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress
},void 0,Object(I.default)("Download for NAS Platforms"))),r()(S.a,{metricsProperties:O,isOpen:n,onModalClose:this.onPlexPassModalClose}))},t}(p.Component);t.a=P},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(e){
var t=e.selectedServer,n=e.outOfDateServers,i=t&&t.isOutOfDate?Object(d.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(d.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(d.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()(c.a,{className:v.a.updateLink,to:u.join([t.uri,n?"/web/index.html":"/web/index.html#!/settings/server"]),target:"_self",
kind:p.b.PRIMARY,size:p.e.LARGE},e.machineIdentifier,e.friendlyName):a()("span",{className:v.a.updateDisabledLink},e.machineIdentifier,Object(d.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(20)),u=n(19),d=n(3),p=n(23),h=n(113),f=n(3181),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(1064)),f=n(743),v=n(269),g=n(45),m=n(270),y=n(3183),b=n(785),I=n.n(b),S=n(3190),M=n(3197),D=n(1250),C=n(3207),O=n(3210),P=n(1068),j=n(3214),T=n.n(j),w=Object(v.a)(I.a.menuSpeed),E=r()(S.a,{}),x=r()(y.a,{}),A=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(g.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()(h.a,{},void 0,n?r()(M.a,{id:this._serverMenuButtonID,providerEntityID:n,isMenuOpen:l,onPress:this.onMenuButtonPress}):r()(C.a,{id:this._serverMenuButtonID,hasPrimaryServer:!!t,serverEntityID:t,isMenuOpen:l,onPress:this.onMenuButtonPress
}),r()(f.a,{},void 0,r()("div",{className:T.a.sidebarContent},void 0,!n&&t&&r()(P.a,{serverEntityID:t,isPlaylistRoute:o}),!n&&!t&&E,n&&r()(O.a,{providerEntityID:n}))),r()(D.c,{target:this._serverMenuButtonID,isOpen:l,canProvisionPersonalCloudServer:s,selectedProviderEntityID:n,serverEntityIDs:i,providerEntityIDs:a,onMenuClose:this.onMenuClose}),x))},t}(p.Component);t.a=A},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(12),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(5),y=(n.n(m),n(414)),b=n(413),I=n(3184),S=Object(m.createSelector)(function(e){return e.ui.provisionPersonalCloudServerPage.isPersonalCloudServerModalOpen},function(e){return{isOpen:e}}),M={dispatchFetchOauthProviders:y.a,dispatchShowProvisionPersonalCloudServerModal:b.f,dispatchIndicateInterestInPersonalCloudServer:b.c},D=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(I.a,r()({},t,{isChoosingProvider:this.state.isChoosingProvider,onClose:this.onClose,
onInterested:this.onInterested,onNotInterested:this.onNotInterested}))},t}(f.Component);t.a=Object(g.b)(S,M)(D)},function(e,t,n){"use strict";function i(e){var t=e.isChoosingProvider,n=e.isOpen,i=e.metricsProperties,r=e.onClose,o=e.onInterested,s=e.onNotInterested;return a()(y.a,{size:v.LARGE,isOpen:n,metricsPage:g.v,metricsProperties:i,onModalClose:r},void 0,a()(b.a,{onModalClose:r},void 0,a()(h.a,{className:C.a.header},void 0,a()("div",{className:C.a.personalCloudServerTitle
},void 0,Object(m.default)("Plex Cloud")),Object(m.default)("Your very own Plex Media Server in the cloud. No computer required.")),!t&&a()(u.a,{innerClassName:C.a.innerModalBody},void 0,a()("div",{className:C.a.upsell},void 0,a()("img",{className:C.a.upsellImage,src:M.a}),a()("div",{className:C.a.upsellText
},void 0,a()("p",{},void 0,Object(m.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:C.a.upsellPoint},void 0,Object(m.default)("First, we\u2019ll link your cloud storage to your Plex account. Choose from popular providers like Dropbox and Google Drive.")),a()("li",{className:C.a.upsellPoint
},void 0,Object(m.default)("Next, we\u2019ll create your Plex Cloud. This may take a minute or two.")),a()("li",{className:C.a.upsellPoint},void 0,Object(m.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()(c.a,{component:"div",className:C.a.findOutMore,to:"#!/settings/plex-cloud",onPress:r
},void 0,Object(m.default)("Find more Plex Cloud settings or add additional storage providers"))),!t&&a()(d.a,{className:C.a.footer},void 0,a()(c.a,{kind:f.PRIMARY,onPress:s},void 0,Object(m.default)("No thanks, not interested")),a()(p.a,{},void 0,a()(l.a,{kind:f.PRIMARY,size:v.LARGE,onPress:o},void 0,Object(m.default)("Let's do this!")))),t&&O))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(42)),c=n(20),u=n(59),d=n(82),p=n(112),h=n(78),f=n(49),v=n(52),g=n(30),m=n(3),y=n(117),b=n(95),I=n(3185),S=n(3188),M=n.n(S),D=n(3189),C=n.n(D),O=a()(I.a,{});t.a=i},function(e,t,n){"use strict";var i=n(11),r=n(1248),a=n(3186);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()(u.a,{innerClassName:g.a.innerModalBody
},void 0,a()("p",{},void 0,Object(p.default)("Choose your cloud storage provider. You can use an existing account or create a new one."),m,Object(p.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()(l.a,{className:g.a.vendorLogoButton,
"aria-label":n,to:d.join([i],{origin:Object(h.a)(window.location.href,"#!/cpms")})},n,a()(c.a,{className:g.a.vendorLogo,src:t}))})),r&&Object(p.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(42)),c=n(208),u=n(59),d=n(19),p=n(3),h=n(737),f=n(31),v=n(3187),g=n.n(v),m=a()("br",{}),y=a()(f.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="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxMDI0IiBoZWlnaHQ9IjEwMjQiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPgo8ZyBpZD0iaWNvbW9vbi1pZ25vcmUiPgo8L2c+CjxwYXRoIGZpbGw9IiNlZWUiIGQ9Ik00OTcuNCA5MTAuNmMtMTMzLTQuNC0yMzcuNy0xMTYuMi0yMzMuNC0yNDkuMiA0LjQtMTMzLjEgMTE2LjItMjM3LjcgMjQ5LjItMjMzLjRzMjM3LjcgMTE2LjIgMjMzLjQgMjQ5LjJjLTQuNCAxMzMuMS0xMTYuMiAyMzcuOC0yNDkuMiAyMzMuNHpNNTExLjggNDcxLjljLTEwOC45LTMuNi0yMDAuMyA4Mi4xLTIwMy45IDE5MXM4Mi4xIDIwMC4zIDE5MC45IDIwMy45YzEwOC45IDMuNiAyMDAuMy04Mi4xIDIwMy45LTE5MC45cy04Mi4xLTIwMC40LTE5MC45LTIwNHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTE4OS41IDY3Ni4yYy05LjYtMC4zLTg4LjItNC41LTEzOS44LTU4LjgtMzAuNi0zMi4yLTQ1LjMtNzQuOC00My42LTEyNi43IDEuOC01NC4yIDI3LjYtMTA0LjEgNzAuOC0xMzYuOSAzNi43LTI3LjkgODEuNy00MC4yIDEyNy4yLTM1LjYgMjUuOC0xNTQuNCAxNjIuNi0yNjguMiAzMjEuNC0yNjMgMTE2LjQgMy44IDIyMi4yIDcyLjkgMjczLjIgMTc3LjMgNTguMSAzLjIgMTExLjkgMjcuNiAxNTIuNyA2OS42IDQ0LjMgNDUuNiA2Ny42IDEwNS43IDY1LjUgMTY5LjItNS43IDE3MS43LTE1NC44IDIxMy43LTIwMC40IDIyMi41LTEyIDIuMy0yMy40LTUuNS0yNS43LTE3LjRzNS41LTIzLjQgMTcuNC0yNS43YzQ4LTkuMyAxNjAuMy00NS40IDE2NC43LTE4MC44IDEuNy01MS41LTE3LjItMTAwLjItNTMuMS0xMzcuMi0zNS43LTM2LjctODQtNTctMTM1LjMtNTYuNy05LjEgMC0xNi44LTUuMi0yMC4yLTEzLjItNDEuNy05Ni0xMzYtMTYwLjMtMjQwLjMtMTYzLjgtMTQzLjUtNC43LTI2Ni4yIDEwMy42LTI3OS4zIDI0Ni42LTAuNiA2LjQtMy45IDEyLjEtOS4xIDE1LjhzLTExLjggNS0xOCAzLjVjLTM5LjgtOS42LTgxLjYtMS0xMTQuMiAyMy44cy01Mi4xIDYyLjUtNTMuNCAxMDMuNGMtMS4zIDM5LjYgOS4yIDcxLjUgMzEuMyA5NC45IDQwLjkgNDMuMiAxMDcuMyA0NS4xIDEwOS45IDQ1LjMgMCAwIDAuMSAwIDAuMSAwIDEyLjEgMC40IDIxLjYgMTAuNCAyMS4zIDIyLjQtMC4yIDEyLjEtMTAuMiAyMS43LTIyLjMgMjEuNS0wLjEgMC0wLjQgMC0wLjggMHoiPjwvcGF0aD4KPHBhdGggZmlsbD0iI2VlZSIgZD0iTTUxMi41IDU0My40aC03My45bDczLjkgMTI3LjQtNzMuOSAxMjcuNGg3My45bDczLjktMTI3LjQtNzMuOS0xMjcuNHoiPjwvcGF0aD4KPC9zdmc+Cg=="
},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";function i(){return Object(g.createStructuredSelector)({outOfDateServers:m.a,isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted},canProvisionPersonalCloudServer:b.a,cloudProviderEntityIDs:Object(y.a)("providers")})}
var r=n(6),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(5),m=(n.n(g),n(1247)),y=n(338),b=n(603),I=n(413),S=n(3191),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()(d.a,{outOfDateServers:t}):i?a()(u.a,{
cloudProviderEntityIDs:o}):r?a()(c.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(3192)),c=n(3193),u=n(3194),d=n(3195),p=n(3196),h=a()(p.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.cloudProviderEntityIDs;return a()(l.a,{message:Object(c.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(c.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(277)),c=n(3),u=n(194),d=n(562);t.a=i},function(e,t,n){"use strict";function i(e){return a()("div",{},void 0,a()(l.a,{message:Object(c.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(c.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(277)),c=n(3),u=n(194),d=n(562);t.a=i},function(e,t,n){"use strict";function i(e){return a()(l.a,{message:Object(c.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(c.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(277)),c=n(3),u=n(194),d=n(562);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(u.default)("The server {serverName} needs an update.",{serverName:i
}):Object(u.default)("The servers {serverNames} need updates.",{serverNames:i}),a()(l.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(277)),c=n(934),u=n(3);t.a=i},function(e,t,n){"use strict";function i(){return a()(s.a,{message:Object(l.default)("Please wait while servers are discovered.")})}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(277)),l=n(3);t.a=i},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(5),o=(n.n(a),n(51)),s=n(3198),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(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3),f=n(745);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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(270);t.a=i},function(e,t,n){"use strict";function i(){
return Object(d.createSelector)(Object(p.a)(),function(e){return{title:e.title,identifier:e.identifier}})}function r(e){return e.identifier===h.a?null:c.a.createElement(v.a,o()({},e,{isSelected:e.providerEntityID===e.selectedProviderEntityID,to:"#!/provider/"+e.identifier,details:Object(f.default)("Online")}))}var a=n(6),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),n(51)),h=n(41),f=n(3),v=n(464);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(11)),f=n(5),v=(n.n(f),n(603)),g=n(413),m=n(3202),y=Object(f.createStructuredSelector)({isNotInterested:function(e){return e.experienceSettings.isNotInterestedInPersonalCloud},canProvisionPersonalCloudServer:v.a}),b={showProvisionPersonalCloudServerModal:g.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(h.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(3)),c=n(25),u=n(464),d=n(3203),p=n.n(d);t.a=i},function(e,t){e.exports={
personalCloudIcon:"ProvisionPersonalCloudServerMenuItem-personalCloudIcon-3BAU_ ServerMenuItem-serverMenuIcon-2zKCW"}},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(5),u=(n.n(c),n(34)),d=n(3205);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(27)),f=n(76),v=n(539),g=n(744),m=n(558),y=n(464),b=n(1066),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(h.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(g.a)(this.props),p=d.isConnecting,h=d.statusWithSource;return r()(v.a,{action:f.Q},void 0,r()(y.a,{className:(t||"")+" "+((p||a)&&I.a.disabledServerMenuItem||""||""),to:"#!/server/"+l+"/dashboard",isDisabled:p,isSelected:n,identifier:l,title:c,details:h,onPress:u},void 0,r()(m.a,{className:I.a.serverMenuIcon,isConnected:i,
isUnavailable:a,isSecure:o,isRelayed:!n&&s})))},t}(p.Component);t.a=S},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,n){"use strict";function i(){return Object(c.createSelector)(Object(p.a)(),function(e){return d.a.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed")})}function r(e){
return s.a.createElement(h.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(7)),d=n.n(u),p=n(34),h=n(3208);t.a=Object(l.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(12),c=n.n(l),u=n(1),d=(n.n(u),
n(0)),p=n.n(d),h=n(3),f=n(558),v=n(745),g=n(3209),m=n.n(g);t.a=i},function(e,t){e.exports={icon:"ServerMenuButton-icon-2yrbL"}},function(e,t,n){"use strict";function i(){return Object(s.createSelector)(Object(p.a)(),Object(u.a)(),Object(d.a)(c.b.SETTINGS),function(e,t,n){return e?{identifier:e.identifier,providerIcon:Object(h.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(h.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(6),a=n.n(r),o=n(11),s=n(5),l=(n.n(s),n(19)),c=n(60),u=n(350),d=n(487),p=n(51),h=n(439),f=n(3213),v=Object(o.b)(i)(f.a);t.a=v},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),Object(a.a)(),function(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?{isChannelGrid:!0,title:Object(o.default)("Channels"),key:"/"+t.identifier+"/grid"}:null})}t.a=i;var r=n(5),a=(n.n(r),n(51)),o=n(3),s=n(3212)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(o.a)(),Object(s.a)(),l.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(c.a)&&n[u.f]&&Object(d.a)(t.version,a.a.channelGrid)&&!0})}t.a=i;var r=n(5),a=(n.n(r),n(175)),o=n(51),s=n(34),l=n(185),c=n(511),u=n(81),d=n(316)},function(e,t,n){"use strict";function i(e){var t=e.identifier,n=e.providerIcon,i=e.contentDirectories,r=e.showProvidersSpinner,o=e.hasSettings,s=e.hasError;return r?f:s?a()("div",{},void 0,a()(l.a,{message:Object(u.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=d.f.get(e.type),o=r&&r.sectionTypeIcon,s=c.join(["#!/provider",encodeURIComponent(t)],{key:i,context:e.context});return a()(p.a,{to:s,icon:o,iconSrc:e.icon||n,title:e.title,highlightActiveRoute:!0},i)}),o&&a()(p.a,{to:"#!/provider/"+encodeURIComponent(t)+"/settings",icon:"plex-icon-settings-560",title:Object(u.default)("Personalize"),highlightActiveRoute:!0},"settings"))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(277)),c=n(19),u=n(3),d=n(130),p=n(194),h=n(1070),f=a()(h.a,{});i.defaultProps={contentDirectories:[],hasError:!1},t.a=i},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(67)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(254),p=n(255),h=n(1252),f=n(145),v=r()(f.a,{}),g=u.a.extend({component:function(e){
var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=Object(s.a)(l.m,t),u=Object(s.a)(l.k,n,a);return r()(c.a,{metricsContext:i.context},void 0,r()(o.a,{},void 0,v,r()(d.a,{machineIdentifier:t},void 0,r()(p.a,{providerEntityID:u},void 0,r()(h.a,{machineIdentifier:t,serverEntityID:a,providerEntityID:u,listKey:i.key,listTitle:i.title,listType:i.type})))))}});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(h.a)(f.m,n),l=!o||o===r;return r&&l?p.a.createElement(g.a,s()({serverEntityID:r},a),t):i||!l?b:I}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(38),f=n(43),v=n(31),g=n(3217),m=n(73),y=n(1246),b=a()(m.a,{},void 0,a()(v.a,{})),I=a()(y.a,{});t.a=i
},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),function(e){var t=e.friendlyName,n=e.hasHttpsConnections,i=e.isConnected,r=e.isFullOwnedServer,a=e.isFullServer,s=e.isInstallingServerUpdate,l=e.isPending,c=e.isUnauthorized,u=e.isUnavailable;return{friendlyName:t,hasHttpsConnections:n,isConnected:i,isFullOwnedServer:r,isFullServer:a,isHostedHttps:o.a.isHostedHttps,isInstallingServerUpdate:s,isPending:l,isUnauthorized:c,isUnavailable:u}})}
var r=n(11),a=n(5),o=(n.n(a),n(90)),s=n(34),l=n(3218);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){
var t=e.children,n=e.friendlyName,i=e.isInstallingServerUpdate,r=e.isConnected,o=e.isUnavailable,l=e.isUnauthorized,c=e.isFullServer,p=e.isFullOwnedServer,h=e.isHostedHttps,v=e.hasHttpsConnections,S=e.requiresFullServer,M=e.requiresFullOwnedServer,D=s()(e,["children","friendlyName","isInstallingServerUpdate","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","isHostedHttps","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);if(i)return a()(y.a,{
friendlyName:n});if(r){if(S&&!c||M&&!p)return a()(g.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 C=u.a.Children.only(t);return u.a.cloneElement(C,D)}return o?h&&!v?a()(m.a,{serverEntityID:e.serverEntityID}):a()(f.a,{friendlyName:n}):l?b:I}var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),
n(0)),u=n.n(c),d=n(3),p=n(31),h=n(738),f=n(739),v=n(73),g=n(113),m=n(740),y=n(741),b=a()(h.a,{}),I=a()(v.a,{},void 0,a()(p.a,{}));t.a=i},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()(f.a,{metricsPage:p.J,allowBackgroundLightPreset:!0,scrollDirection:d.NONE},void 0,y?s()(v.a,{serverEntityID:t,providerEntityID:n}):s()(m.a,{serverEntityID:t,
providerEntityID:n,metadataListEntityID:i,listTitle:o,listType:l,listSubtype:c}),u.a.createElement(h.a,a()({component:g.a,initialSize:50,shouldResetOnUnmount:!0,containerKey:r,containerTitle:o,listType:l,listSubtype:c},e)))}var r=n(6),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(54),p=n(30),h=n(127),f=n(83),v=n(415),g=n(1255),m=n(3268);t.a=i},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()(f.a,{className:S.a.multiSelectPageHeader},void 0,s()(v.a,{},void 0,s()("div",{className:S.a.selectedTitle},void 0,s()(y.a,{name:"plex-icon-selected-560",className:S.a.icon}),1===t?Object(m.default)("1 item selected"):Object(m.default)("{selectedItemsCount} items selected",{selectedItemsCount:t})),s()(h.a,{className:S.a.deselectLink,onPress:i
},void 0,s()(y.a,{name:"plex-icon-remove-560",className:S.a.icon}),Object(m.default)("Deselect All"))),s()(g.a,{},void 0,p.a.createElement(n,a()({selectedItemsCount:t},r))))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(193),v=n(134),g=n(102),m=n(3),y=n(25),b=n(1254),I=n(3231),S=n.n(I);i.defaultProps={toolbarComponent:b.a,allowRedirectOnDelete:!1},t.a=i},function(e,t,n){e.exports={default:n(3222),__esModule:!0}},function(e,t,n){n(902),n(645),
e.exports=n(3223)},function(e,t,n){var i=n(299),r=n(968);e.exports=n(106).getIterator=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}},function(e,t,n){"use strict";function i(e){return e.map(function(e){return e.model.type})}function r(e){return D.a.uniq(e.map(function(e){return e.provider.identifier})).length>1}function a(e){return e.some(function(e){return!!e.model.source})}function o(e,t){return!r(t)&&!a(t)&&t.every(function(t){
var n=t.model,i=t.server,r=t.provider;return Object(O.j)(i,r,e,n)})}function s(e,t){return!r(t)&&!a(t)&&t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.k)(i,r,e,n)})}function l(e,t){return!r(t)&&!a(t)&&t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.a)(i,r,e,n)})}function c(e,t){return!r(t)&&!a(t)&&t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.b)(i,r,e,n)})}function u(e,t){return!r(t)&&!a(t)&&t.some(function(t){
var n=t.model,i=t.server,r=t.provider;return Object(O.f)(i,r,e,n)})}function d(e,t){return!r(t)&&!a(t)&&t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.o)(i,r,e,n)})}function p(e,t){return t.some(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.g)(i,r,e,n)})}function h(e,t){return t.some(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.h)(i,r,e,n)})}function f(e,t){var n=i(t);return!(D.a.uniq(n).length>1)&&t.every(function(t){
var n=t.server,i=t.provider,r=t.model;return Object(O.e)(n,i,e,r)})}function v(e,t){return t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.l)(i,r,e,n)})}function g(e,t){return t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.c)(i,r,e,n)})}function m(e,t){if(!f(e,t))return!1;var n=i(t);return 1!==n.length&&(!(D.a.uniq(n).length>1)&&n.every(function(e){return-1!==T.indexOf(e)}))}function y(e,t){return t.every(function(t){
var n=t.model,i=t.server,r=t.provider;return Object(O.n)(i,r,e,n)})}function b(e,t){return t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.i)(i,r,e,n)})}function I(e,t){return t.every(function(t){var n=t.model,i=t.server,r=t.provider;return Object(O.d)(i,r,e,n)})}function S(e,t,n){var i=j[n];return Object(C.a)(Array.isArray(i),"getMultiSelectActionProps: Invalid type, "+n+", provided"),i.reduce(function(i,r){var a=P[r]
;return Object(C.a)(D.a.isFunction(a),"getMultiSelectActionProps: Invalid action, "+r+", for "+n),i[r]=a(e,t),i},{})}t.a=S;var M=n(7),D=n.n(M),C=n(36),O=n(278),P={showPlay:o,showShuffle:o,showQueue:s,showAddToAlbum:l,showAddToPlaylist:c,showMarkPlayed:p,showMarkUnplayed:h,showFavorite:u,showUnfavorite:d,showEdit:f,showRefresh:v,showAnalyze:g,showMerge:m,showSync:y,showOptimize:b,showDelete:I},j={
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"]},T=["movie","show","season","artist","album"]},function(e,t,n){"use strict";function i(e){return 1===e?Object(C.default)("Are you sure you want to mark this item as played?"):Object(C.default)("Are you sure you want to mark these {selectedItemsCount} items as played?",{selectedItemsCount:e})}function r(e){
return 1===e?Object(C.default)("Are you sure you want to mark this item as unplayed?"):Object(C.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===O.i?n?Object(C.default)("Are you sure you want to delete this playlist?"):Object(C.default)("Are you sure you want to delete these {selectedItemsCount} playlists?",{selectedItemsCount:e
}):t===O.d?n?Object(C.default)("Are you sure you want to delete this collection?"):Object(C.default)("Are you sure you want to delete these {selectedItemsCount} collections?",{selectedItemsCount:e}):n?Object(C.default)("Are you sure you want to delete this item from your filesystem?"):Object(C.default)("Are you sure you want to delete these {selectedItemsCount} items from your filesystem?",{selectedItemsCount:e})}
var o=n(6),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(114),I=n(45),S=n(27),M=n(18),D=n(30),C=n(3),O=n(26),P=n(25),j=n(157),T=n(340),w=n(824),E=n(825),x=n(826),A=n(604),N=n(827),L=n(828),k=n(829),_=n(3226),R=n(831),z=n(23),U=n(3229),B=["showPlay","showShuffle","showAddToAlbum","showAddToPlaylist","showFavorite","showUnfavorite","showTogglePlayed","showEdit","showSync"],F=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],V=c()(P.a,{name:"plex-icon-favorite-empty-560"}),H=c()(P.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.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0})},r.onAddToPlaylistClose=function(){r.setState({isAddToPlaylistModalOpen:!1})},r.state={isActionsMenuOpen:!1,isConfirmMarkPlayedModalOpen:!1,isConfirmMarkUnplayedModalOpen:!1,isConfirmDeleteModalOpen:!1,isAddToPlaylistModalOpen:!1},r._moreButtonID=Object(I.a)(),r}return v()(t,e),t.prototype.componentDidMount=function(){
M.a.on("shortcut:playSelected",this.onPlaySelectedShortcut),M.a.on("shortcut:toggleWatched",this.onToggleWatchedShortcut),M.a.on("shortcut:edit",this.onEditShortcut)},t.prototype.shouldComponentUpdate=function(e,t){return Object(S.a)(this,e,t)},t.prototype.componentWillUnmount=function(){M.a.off("shortcut:playSelected",this.onPlaySelectedShortcut),M.a.off("shortcut:toggleWatched",this.onToggleWatchedShortcut),M.a.off("shortcut:edit",this.onEditShortcut)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.serverEntityID,o=e.providerEntityID,l=e.activeSelectionType,u=e.selectedItemsCount,d=e.showPlay,p=e.showPlayOverflow,h=e.showShuffle,f=e.showShuffleOverflow,v=e.showAddToAlbum,g=e.showAddToAlbumOverflow,m=e.showAddToPlaylist,I=e.showAddToPlaylistOverflow,S=e.showFavorite,M=e.showFavoriteOverflow,O=e.showUnfavorite,P=e.showUnfavoriteOverflow,R=e.showTogglePlayed,B=e.showTogglePlayedOverflow,F=e.showMarkPlayed,Q=e.showMarkUnplayed,Y=e.showEdit,G=e.showEditOverflow,W=e.showSync,K=e.showSyncOverflow,q=e.showOverflow,Z=e.onPlaySelectedPress,X=e.onShufflePress,J=e.onFavoritePress,$=e.onUnfavoritePress,ee=e.onEditPress,te=e.onSyncPress,ne=this.state,ie=ne.isActionsMenuOpen,re=ne.isConfirmMarkPlayedModalOpen,ae=ne.isConfirmMarkUnplayedModalOpen,oe=ne.isConfirmDeleteModalOpen,se=ne.isAddToPlaylistModalOpen
;return c()("div",{className:t},void 0,d&&c()(N.a,{playLabel:Object(C.default)("Play Selected"),onPress:Z}),h&&c()(L.a,{onPress:X}),v&&c()(w.a,{onPress:this.onAddToPlaylistPress}),m&&c()(E.a,{onPress:this.onAddToPlaylistPress}),S&&c()(b.a,{"data-qa-id":"toolbarFavorite",tooltip:Object(C.default)("Add to Favorites"),onPress:J},void 0,V),O&&c()(b.a,{"data-qa-id":"toolbarUnfavorite",tooltip:Object(C.default)("Remove from Favorites"),onPress:$},void 0,H),R&&c()(_.a,{showMarkPlayed:F,
showMarkUnplayed:Q,onMarkPlayedPress:this.onMarkPlayedPress,onMarkUnplayedPress:this.onMarkUnplayedPress}),Y&&c()(x.a,{onPress:ee}),W&&c()(k.a,{onPress:te}),q&&c()(A.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:Object(C.default)("More..."),isMenuOpen:ie,onPress:this.onActionsPress}),y.a.createElement(U.a,s()({},this.props,{target:this._moreButtonID,isOpen:ie,showPlay:p,showShuffle:f,showAddToAlbum:g,showAddToPlaylist:I,showFavorite:M,showUnfavorite:P,showMarkPlayed:B&&F,
showMarkUnplayed:B&&Q,showEdit:G,showSync:K,onMenuClose:this.onActionsMenuClose,onMarkPlayedPress:this.onMarkPlayedPress,onMarkUnplayedPress:this.onMarkUnplayedPress,onDeletePress:this.onDeletePress})),c()(j.a,{isOpen:re,metricsPage:D.o,title:Object(C.default)("Mark as Played"),message:i(u),onConfirm:this.onMarkPlayedConfirm,onCancel:this.onMarkPlayedCancel}),c()(j.a,{isOpen:ae,metricsPage:D.n,title:Object(C.default)("Mark as Unplayed"),message:r(u),onConfirm:this.onMarkUnplayedConfirm,
onCancel:this.onMarkUnplayedCancel}),c()(j.a,{isOpen:oe,metricsPage:D.g,kind:z.b.DANGER,title:Object(C.default)("Delete"),message:a(u,l),onConfirm:this.onDeleteConfirm,onCancel:this.onDeleteCancel}),(v||m)&&c()(T.a,{serverEntityID:n,providerEntityID:o,isOpen:se,onModalClose:this.onAddToPlaylistClose}))},t}(m.Component);t.a=Object(R.a)(Q,B,F)},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(101)),f=n(45),v=n(3),g=n(830),m=n(604),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(v.default)("Toggle Played..."),isMenuOpen:o,onPress:this.onMenuButtonPress},void 0,r()(g.a,{target:this._toolbarMenuButtonID,isOpen:o,onMenuClose:this.onMenuClose},void 0,t&&r()(h.a,{onPress:i},void 0,Object(v.default)("Mark as Played")),n&&r()(h.a,{onPress:a},void 0,Object(v.default)("Mark as Unplayed"))))},t}(p.Component);t.a=y},function(e,t){e.exports={
toolbarMenu:"ToolbarMenu-toolbarMenu-18yic MenuContainer-menu-2OAQT"}},function(e,t){e.exports={toolbarContainer:"pageHeaderToolbar-toolbarContainer-2N-IJ Measure-container-3yONE",toolbar:"pageHeaderToolbar-toolbar-1lW-M"}},function(e,t,n){"use strict";function i(e){return d.a.createElement(h.a,e)}function r(e){var t=e.target,n=e.isOpen,r=e.onMenuClose,a=l()(e,["target","isOpen","onMenuClose"]);return o()(p.a,{target:t,isOpen:n,onMenuClose:r},void 0,d.a.createElement(i,a))}
var a=n(2),o=n.n(a),s=n(12),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(830),h=n(3230);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(101)),f=n(3),v=n(340),g=n(23),m=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0}),r.props.onMenuDisable()},r.onAddToPlaylistClose=function(){r.setState({
isAddToPlaylistModalOpen:!1}),r.props.onMenuEnable(),r.props.onPress()},r.state={isAddToPlaylistModalOpen:!1},r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=this.state.isAddToPlaylistModalOpen;return r()("div",{},void 0,e.showPlay&&r()(h.a,{onPress:e.onPlaySelectedPress},void 0,Object(f.default)("Play")),e.showShuffle&&r()(h.a,{onPress:e.onShufflePress},void 0,Object(f.default)("Shuffle")),e.showQueue&&r()(h.a,{onPress:e.onPlaySelectedNextPress
},void 0,Object(f.default)("Play Next")),e.showQueue&&r()(h.a,{onPress:e.onAddToQueuePress},void 0,Object(f.default)("Add to Queue")),e.showAddToAlbum&&r()(h.a,{onPress:this.onAddToPlaylistPress},void 0,Object(f.default)("Add to Album...")),e.showAddToPlaylist&&r()(h.a,{onPress:this.onAddToPlaylistPress},void 0,Object(f.default)("Add to Playlist...")),e.showFavorite&&r()(h.a,{onPress:e.onFavoritePress},void 0,Object(f.default)("Add to Favorites")),e.showUnfavorite&&r()(h.a,{
onPress:e.onUnfavoritePress},void 0,Object(f.default)("Remove from Favorites")),e.showMarkPlayed&&r()(h.a,{onPress:e.onMarkPlayedPress},void 0,Object(f.default)("Mark as Played")),e.showMarkUnplayed&&r()(h.a,{onPress:e.onMarkUnplayedPress},void 0,Object(f.default)("Mark as Unplayed")),e.showEdit&&r()(h.a,{onPress:e.onEditPress},void 0,Object(f.default)("Edit")),e.showRefresh&&r()(h.a,{onPress:e.onRefreshPress},void 0,Object(f.default)("Refresh Metadata")),e.showAnalyze&&r()(h.a,{
onPress:e.onAnalyzePress},void 0,Object(f.default)("Analyze")),e.showMerge&&r()(h.a,{onPress:e.onMergePress},void 0,Object(f.default)("Merge")),e.showSync&&r()(h.a,{onPress:e.onSyncPress},void 0,Object(f.default)("Sync...")),e.showOptimize&&r()(h.a,{onPress:e.onOptimizePress},void 0,Object(f.default)("Optimize...")),e.showDelete&&r()(h.a,{kind:g.b.DANGER,onPress:e.onDeletePress},void 0,Object(f.default)("Delete")),(e.showAddToAlbum||e.showAddToPlaylist)&&r()(v.a,{serverEntityID:e.serverEntityID,
providerEntityID:e.providerEntityID,isOpen:t,onModalClose:this.onAddToPlaylistClose}))},t}(p.Component);t.a=m},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-MIQA1 PageHeader-pageHeader-14-NY",selectedTitle:"MultiSelectPageHeader-selectedTitle-1kn-x",deselectLink:"MultiSelectPageHeader-deselectLink-3Muvc",icon:"MultiSelectPageHeader-icon-3_oXi"}},function(e,t,n){"use strict"
;var i=n(6),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(20),m=n(87),y=n(52),b=n(137),I=n(196),S=n(588),M=n(401),D=n(1163),C=n(1261),O=n(559),P=n(3235),j=n.n(P),T=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,b=e.tagline,O=e.route,P=e.showLink,T=e.showMore,w=e.hoverableProps,E=e.isPlaying,x=e.isPlayerPaused,A=e.onPlayPress,N=this.state.isActionsMenuOpen;return v.a.createElement(m.a,r()({className:((l%2?j.a.alternateItem:j.a.item)||"")+" "+(N&&j.a.isActionsMenuOpen||""||""),cellX:c,cellY:u,cellWidth:d,
cellHeight:p},w),P&&o()(g.a,{className:j.a.underlay,to:O,"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,E?null:o()(D.a,{className:j.a.titleEpisodeIndex,metadataItemEntityID:i,longName:!1}),E?o()(S.a,{isPaused:x}):o()("div",{className:j.a.playButtonContainer},void 0,o()(I.a,{className:j.a.playButton,title:h,onPress:A}))),o()("div",{className:j.a.miniProgressContainer
},void 0,o()(C.a,{metadataItemEntityID:i,size:y.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,T&&o()(M.a,{"data-qa-id":"metadataSimpleSummaryMoreButton",className:j.a.moreButton,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:s,showPlay:!1,showAddToSaved:!1,isMenuOpen:N,
onMenuOpenChange:this.onActionsMenuOpenChange}))),o()("div",{className:j.a.summary},void 0,b||f)))))},t}(f.Component);t.a=Object(O.a)(Object(b.a)(T))},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(52)),c=n(3234),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){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()(l.a,{className:t%2?p.a.alternateLoadingItem:p.a.loadingItem,cellX:n,cellY:i,cellWidth:r,cellHeight:o
},void 0,Object(c.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(87)),c=n(3),u=n(137),d=n(3237),p=n.n(d);t.a=Object(u.a)(i)},function(e,t){e.exports={loadingItem:"MetadataSimpleSummaryCellLoading-loadingItem-35Sst",alternateLoadingItem:"MetadataSimpleSummaryCellLoading-alternateLoadingItem-2LPd5 MetadataSimpleSummaryCellLoading-loadingItem-35Sst"}},function(e,t,n){"use strict"
;var i=n(6),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(72),m=n(20),y=n(87),b=n(3),I=n(25),S=n(137),M=n(32),D=n(383),C=n(401),O=n(346),P=n(599),j=n(248),T=n(834),w=n(476),E=n(559),x=n(3239),A=n.n(x),N=o()(I.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,h=e.cellHeight,f=e.showScrollPlaceholder,I=e.showOffscreenPlaceholder,S=e.metadataKey,E=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,F=e.showSelect,V=e.showMore,H=e.hasActiveSelection,Q=e.isSelected,Y=e.isOtherItemSelected,G=e.isModifierKeyPressed,W=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===M.b,ie=F&&(G||Y),re=H?"-1":"0",ae=null!=x,oe=!ee
;return v.a.createElement(y.a,r()({className:((c%2?A.a.alternateItem:A.a.item)||"")+" "+(H&&A.a.hasActiveSelection||"")+" "+(ie&&A.a.isForcingSelection||"")+" "+(Q&&A.a.isSelected||"")+" "+(te&&A.a.isActionsMenuOpen||""||""),cellX:u,cellY:d,cellWidth:p,cellHeight:h},$),F&&o()(m.a,{className:A.a.selectCoverButton,"aria-label":Q?Object(b.default)("Deselect {title}",{title:L}):Object(b.default)("Select {title}",{title:L}),tabIndex:U&&!H?"-1":"0",onPress:Q?J:X}),U&&o()(m.a,{className:A.a.underlay,
tabIndex:re,to:z,"aria-label":L}),o()("div",{className:A.a.overlay},void 0,o()("div",{className:A.a.posterContainer},void 0,f?o()(P.a,{imageWidth:W,imageHeight:K}):o()(O.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:s,listContext:l,metadataKey:S,type:E,imageWidth:W,imageHeight:K,imageUrl:q,isOffscreen:I,isFolder:R,showLink:!1,showSelect:!1,showEdit:!1,showMore:!1})),o()("div",{className:ne?A.a.librarySummaryContainer:A.a.summaryContainer
},void 0,o()("div",{},void 0,o()("div",{className:A.a.titleContainer},void 0,o()("div",{className:A.a.title},void 0,!!k&&o()("span",{},void 0,ne?o()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}):ae&&o()(T.a,{index:x}),(ne||ae)&&o()(g.b,{className:A.a.separator})),L),o()("div",{className:A.a.rating},void 0,o()(w.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,hideUnrated:oe})),o()("div",{className:A.a.actions},void 0,F&&o()(D.a,{className:A.a.selectButton,
tabIndex:re,title:L,isSelected:Q,onPress:X}),B&&o()(m.a,{"data-qa-id":"metadataSummaryEditButton",className:A.a.editButton,tabIndex:re,"aria-label":Object(b.default)("Edit {title}",{title:L}),onPress:Z},void 0,N),V&&o()(C.a,{"data-qa-id":"metadataSummaryMoreButton",className:A.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:A.a.summary},void 0,_)))))},t}(f.Component);t.a=Object(E.a)(Object(S.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-4CyEF",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,u=e.imageHeight;return a()(l.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:u})),Object(c.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),
n(0)),l=(n.n(s),n(87)),c=n(3),u=n(137),d=n(599),p=n(3241),h=n.n(p);t.a=Object(u.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(){return Object(a.createSelector)(Object(o.a)(),function(e){return e?{title:e.title,
isFolder:e.isFolder,isMultiVersion:Object(l.a)(e),hasMusicVideo:Object(s.a)(e)}:{}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(1268),l=n(1181),c=n(3243);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(1269)),c=n(3245),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(e){return e?{title:e.title,originalTitle:e.originalTitle,hasMusicVideo:Object(s.a)(e)}:{}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(1268),l=n(3247);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(72)),c=n(1269),u=n(3248),d=n.n(u),p=a()(l.b,{}),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(5),o=(n.n(a),n(22)),s=n(3250);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(52)),c=n(790),u=n(3251),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(){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(5),o=(n.n(a),n(22)),s=n(3253);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(o.a)(),function(){return{
unviewedLeafCount:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).unviewedLeafCount}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(3255);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(3));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(5),o=(n.n(a),n(22)),s=n(3257);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(6),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(20),m=n(87),y=n(3),b=n(25),I=n(3260),S=n(137),M=n(32),D=n(196),C=n(383),O=n(588),P=n(401),j=n(3261),T=n(1166),w=n(1270),E=n(559),x=n(3262),A=n(3264),N=n.n(A),L=o()(b.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,b=e.cellHeight,S=e.activeTableColumns,E=e.title,A=e.route,k=e.showLink,_=e.showPlay,R=e.showEdit,z=e.showSelect,U=e.showMore,B=e.showPlayIndex,F=e.showPlayCellIndex,V=e.showActionsDuration,H=e.showActionsMinutesLeft,Q=e.hasActiveSelection,Y=e.isSelected,G=e.isOtherItemSelected,W=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===M.b,ae=z&&(W||G),oe=Q?"-1":"0",se=!te,le=ne?m.a:I.a
;return v.a.createElement(le,r()({className:((d%2?N.a.alternateItem:N.a.item)||"")+" "+(Q&&N.a.hasActiveSelection||"")+" "+(ae&&N.a.isForcingSelection||"")+" "+(Y&&N.a.isSelected||"")+" "+(ie&&N.a.isActionsMenuOpen||""||""),cellX:p,cellY:h,cellWidth:f,cellHeight:b},ee),z&&o()(g.a,{className:N.a.selectCoverButton,"aria-label":Y?Object(y.default)("Deselect {title}",{title:E}):Object(y.default)("Select {title}",{title:E}),tabIndex:k&&!Q?"-1":"0",onPress:Y?$:J}),k&&o()(g.a,{className:N.a.underlay,
tabIndex:oe,to:A,"aria-label":E}),o()("div",{className:N.a.overlay},void 0,o()("div",{className:N.a.playCell},void 0,B&&!K&&o()(j.a,{className:N.a.transientTitleLeft,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),F&&!K&&o()("span",{className:N.a.transientTitleLeft},void 0,d+1),_&&!K&&o()(D.a,{className:N.a.playButton,"data-qa-id":"listItemPlayButton",tabIndex:oe,title:E,onPress:Z}),K&&o()(O.a,{className:N.a.equalizer,isPaused:q})),S.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?N.a.libraryActionsCell:N.a.actionsCell},void 0,V&&o()(w.a,{className:N.a.transientTitleRight,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),H&&o()(T.a,{className:N.a.transientTitleRight,serverEntityID:t,providerEntityID:n,metadataItemEntityID:i
}),z&&o()(C.a,{className:N.a.selectButton,tabIndex:oe,title:E,isSelected:Y,onPress:J}),R&&o()(g.a,{"data-qa-id":"metadataRowEditButton",className:N.a.editButton,tabIndex:oe,"aria-label":Object(y.default)("Edit {title}",{title:E}),onPress:X},void 0,L),U&&o()(P.a,{"data-qa-id":"metadataRowMoreButton",className:N.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(E.a)(Object(S.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(5),o=(n.n(a),n(22)),s=n(834);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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3263),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.cellIndex,n=e.cellX,i=e.cellY,r=e.cellWidth,o=e.cellHeight;return a()(l.a,{className:t%2?p.a.alternateLoadingItem:p.a.loadingItem,cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,Object(c.default)("Loading..."))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(87)),c=n(3),u=n(137),d=n(3266),p=n.n(d);t.a=Object(u.a)(i)},function(e,t){e.exports={
loadingItem:"MetadataTableRowLoading-loadingItem-2g4_Q",alternateLoadingItem:"MetadataTableRowLoading-alternateLoadingItem-3U7fu MetadataTableRowLoading-loadingItem-2g4_Q"}},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(){return Object(a.createSelector)(p.a,d.a,Object(c.a)(),Object(u.a)(),function(e,t,n,i){return{server:e,provider:t,directories:i,selectedDirectory:s.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(11),a=n(5),o=(n.n(a),n(7)),s=n.n(o),l=n(205),c=n(119),u=n(350),d=n(37),p=n(50),h=n(3269);t.a=Object(r.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(193)),f=n(215),v=n(118),g=n(607),m=n(134),y=n(102),b=n(45),I=n(3),S=n(146),M=n(416),D=n(488),C=(n(88),n(125),n(3283)),O=n.n(C),P=r()(S.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.state={isDirectoriesMenuOpen:!1},r._directoriesMenuButtonID=Object(b.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,b=e.isLibraryList,S=this.state.isDirectoriesMenuOpen;return r()(h.a,{},void 0,r()(m.a,{},void 0,p&&r()(v.a,{id:this._directoriesMenuButtonID,
title:p.isHomeDirectory?Object(I.default)("All Libraries"):p.title,hasMenu:d.length>1,isMenuOpen:S,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),p&&r()(D.a,{target:this._directoriesMenuButtonID,isOpen:S,server:c,provider:u,directories:d,selectedDirectory:p,onMenuClose:this.onDirectoriesMenuClose}),r()(v.a,{title:a,hasMenu:!1,isSelected:!0}),r()(f.a,{},void 0,l)),r()(y.a,{},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:o,listSubtype:s,
isLibraryList:b}),r()(g.a,{className:O.a.divider}),P))},t}(p.Component);t.a=j},function(e,t){e.exports={badge:"PageHeaderBadge-badge-2oDBg"}},function(e,t){e.exports={pageHeaderDivider:"PageHeaderDivider-pageHeaderDivider-1BKT-"}},function(e,t,n){"use strict";function i(e){return e===M.f?"plex-icon-toolbar-column-560":e===M.e||e===M.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(385)),v=n(20),g=n(56),m=n(45),y=(n(36),n(3)),b=n(25),I=(n(32),n(331)),S=n(23),M=n(62),D=n(3273),C=n(3274),O=n.n(C),P=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=M.c,u=M.b,d=M.f,p=M.e,h=M.d,m=[{listStyle:c,title:Object(y.default)("Grid View")},{listStyle:u,title:Object(y.default)("Mosaic View")},{listStyle:d,title:Object(y.default)("List View")},{
listStyle:p,title:Object(y.default)("Summary View")},{listStyle:h,title:Object(y.default)("Summary View")}],C=M.h(n),P=M.g(r);return C||P?a()("div",{className:O.a.stylesContainer},void 0,C&&a()(I.a,{className:O.a.slider,label:Object(y.default)("Poster Size"),value:s,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),a()(v.a,{id:this._stylesButtonID,"data-qa-id":"toolbarView",className:P?O.a.stylesButtonWithArrow:O.a.stylesButton,"aria-label":Object(y.default)("Show List Styles"),
isDisabled:!P,onPress:this.onStylesPress},void 0,a()(b.a,{className:O.a.stylesIcon,name:i(n)}),P&&a()(f.a,{direction:l?S.a.UP:S.a.DOWN})),a()(g.a,{target:this._stylesButtonID,isOpen:l,onMenuClose:this.onStylesMenuClose},void 0,P&&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);P.defaultProps={selectedListStyle:M.c,allListStyles:[M.c],allListStyleActions:[],
columnAdjustmentTimeout:500},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(103)),f=(n(62),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",stylesButtonWithArrow:"MetadataListStylesMenu-stylesButtonWithArrow-23qAV MetadataListStylesMenu-stylesButton-21zDb",
stylesIcon:"MetadataListStylesMenu-stylesIcon-1r4qe"}},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(7),h=n.n(p),f=n(36),v=n(1097),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(6),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(45),m=n(18),y=n(3),b=n(3277),I=n(340),S=n(831),M=n(839),D=n(824),C=n(825),O=n(604),P=n(827),j=n(828),T=n(829),w=["showPlayAll","showShuffle","showAddToAlbum","showAddToPlaylist","showAddToCatalog","showSync"],E=["showOptimize","showQueue"],x=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.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0})},r.onAddToPlaylistClose=function(){r.setState({isAddToPlaylistModalOpen:!1})},r.onActionsPress=function(e){r.setState({isActionsMenuOpen:!r.state.isActionsMenuOpen})},r.onActionsMenuClose=function(){r.setState({isActionsMenuOpen:!1})},r.state={isActionsMenuOpen:!1,isAddToPlaylistModalOpen:!1},r._moreButtonID=Object(g.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.serverEntityID,i=e.providerEntityID,a=e.metadataListEntityID,s=e.showPlayAll,l=e.showPlayAllOverflow,c=e.showShuffle,u=e.showShuffleOverflow,d=e.showAddToAlbum,p=e.showAddToAlbumOverflow,h=e.showAddToPlaylist,f=e.showAddToPlaylistOverflow,g=e.showAddToCatalog,m=e.showAddToCatalogOverflow,S=e.showSync,w=e.showSyncOverflow,E=e.showOverflow,x=e.isLibraryList,A=e.onPlayAllPress,N=e.onShufflePress,L=e.onSyncPress,k=this.state,_=k.isActionsMenuOpen,R=k.isAddToPlaylistModalOpen
;return o()("div",{className:t},void 0,s&&o()(P.a,{playLabel:Object(y.default)("Play All"),onPress:A}),c&&o()(j.a,{onPress:N}),d&&o()(D.a,{onPress:this.onAddToPlaylistPress}),h&&o()(C.a,{onPress:this.onAddToPlaylistPress}),g&&o()(M.a,{providerEntityID:i}),S&&o()(T.a,{onPress:L}),E&&o()(O.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:Object(y.default)("More..."),isMenuOpen:_,onPress:this.onActionsPress}),v.a.createElement(b.a,r()({},this.props,{target:this._moreButtonID,
isOpen:_,showPlayAll:l,showShuffle:u,showAddToAlbum:p,showAddToPlaylist:f,showAddToCatalog:m,showSync:w,onMenuClose:this.onActionsMenuClose})),(d||h)&&o()(I.a,{serverEntityID:n,providerEntityID:i,metadataListEntityID:a,smart:x,isOpen:R,onModalClose:this.onAddToPlaylistClose}))},t}(f.Component);t.a=Object(S.a)(x,w,E)},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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(830),p=n(3278);t.a=i},function(e,t,n){"use strict";function i(e,t){return t===g.b?Object(v.default)("Add Podcast by URL"):Object(v.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(101)),v=n(3),g=n(98),m=n(1271),y=n(340),b=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.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0}),r.props.onMenuDisable()},r.onAddToPlaylistClose=function(){r.setState({isAddToPlaylistModalOpen:!1}),r.props.onMenuEnable(),r.props.onPress()},r.state={isAddToCatalogModalOpen:!1,
isAddToPlaylistModalOpen:!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,n=t.isAddToCatalogModalOpen,r=t.isAddToPlaylistModalOpen;return a()("div",{},void 0,e.showPlayAll&&a()(f.a,{onPress:this.createOnPress(e.onPlayAllPress)},void 0,Object(v.default)("Play All")),e.showShuffle&&a()(f.a,{onPress:this.createOnPress(e.onShufflePress)
},void 0,Object(v.default)("Shuffle")),e.showQueue&&a()(f.a,{onPress:this.createOnPress(e.onPlayNextPress)},void 0,Object(v.default)("Play Next")),e.showQueue&&a()(f.a,{onPress:this.createOnPress(e.onAddToQueuePress)},void 0,Object(v.default)("Add to Queue")),e.showAddToPlaylist&&a()(f.a,{onPress:this.createOnPress(this.onAddToPlaylistPress)},void 0,Object(v.default)("Add to Playlist...")),e.showAddToCatalog&&a()(f.a,{onPress:this.onAddToCatalogPress
},void 0,i(e.listType,e.listSubtype)),e.showSync&&a()(f.a,{onPress:this.createOnPress(e.onSyncPress)},void 0,Object(v.default)("Sync...")),e.showOptimize&&a()(f.a,{onPress:this.createOnPress(e.onOptimizePress)},void 0,Object(v.default)("Optimize...")),a()(m.a,{providerEntityID:e.providerEntityID,isOpen:n,onModalClose:this.onAddToCatalogClose}),e.showAddToPlaylist&&a()(y.a,{isOpen:r,serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,metadataItemEntityID:e.metadataItemEntityID,
onModalClose:this.onAddToPlaylistClose}))},t}(h.Component);t.a=b},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(s.c)())},onSubmit:function(n){e(Object(s.a)({providerEntityID:t.providerEntityID,data:n}))}}}var a=n(5),o=(n.n(a),n(55)),s=n(837),l=n(3280),c=Object(o.a)(i,r)(l.a);t.a=c},function(e,t,n){
"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h()({isFileImport:!1,channelURL:"",fileURL:null},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(6),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),n(20)),m=n(546),y=n(59),b=n(82),I=n(112),S=n(78),M=n(3),D=n(124),C=n(1272),O=n(191),P=n(117),j=n(95),T=n(838),w=n(23),E=n(3282),x=n.n(E),A=function(e){function t(n,r){s()(this,t);var a=c()(this,e.call(this,n,r))
;return a.onModalClose=function(){a.props.onClearError(),a.props.onModalClose()},a.onFileImportTogglePress=function(){a.setState(i({isFileImport:!a.state.isFileImport}))},a.onFileChange=function(e){var t=void 0;if(e.target.files&&e.target.files.length&&(t=e.target.files[0]),t){var n=window.URL.createObjectURL(t);a.setState({fileURL:n})}},a.onURLChange=function(e){a.setState({channelURL:e})},a.onSubmit=function(e){e.preventDefault(),a.props.onSubmit({channelURL:a.state.channelURL,
fileURL:a.state.fileURL})},a.state=i(),a}return d()(t,e),t.getDerivedStateFromProps=function(e,t){return t.isOpen!==!e.isOpen?i({isOpen:e.isOpen}):null},t.prototype.componentDidUpdate=function(e,t){this.props.isUpdating||!e.isUpdating||this.props.hasError||this.props.onModalClose()},t.prototype.render=function(){
var e=this.props,t=e.isOpen,n=e.title,i=e.message,r=e.hasError,o=e.hasFileImportFeature,s=e.textInputLabel,l=e.fileInputButtonLabel,c=e.fileImportLabel,u=e.urlImportLabel,d=e.confirmLabel,p=e.confirmKind,h=e.isUpdating,f=e.isDirty,v=e.metricsPage,T=e.metricsProperties,E=e.onFormChange;return a()(P.a,{isOpen:t,metricsPage:v,metricsProperties:T,onModalClose:this.onModalClose},void 0,a()("form",{className:x.a.form,onSubmit:this.onSubmit,onChange:E},void 0,a()(j.a,{onModalClose:this.onModalClose
},void 0,a()(S.a,{},void 0,n),r?a()(O.a,{errorMessage:Object(M.default)("Something went wrong. Make sure the URL is correct and try again.")}):null,a()(y.a,{},void 0,a()("p",{},void 0,i),o?a()("p",{},void 0,a()(g.a,{kind:w.b.PRIMARY,onPress:this.onFileImportTogglePress},void 0,this.state.isFileImport?u||Object(M.default)("Import from a URL instead"):c||Object(M.default)("Import from a file instead"))):null,a()("div",{className:x.a.inputContainer},void 0,this.state.isFileImport?a()(C.a,{
name:"file",accept:".xml, .opml",buttonText:l||Object(M.default)("Choose File"),showFilename:!0,onChange:this.onFileChange}):a()(m.a,{name:"channelURL",value:this.state.URLValue,labelText:s,"data-autofocus":!0,onChange:this.onURLChange})),this.state.fileURL?a()("p",{className:x.a.fileNote},void 0,Object(M.default)("NOTE: Podcasts will appear as they're processed. This may take some time to complete")):null),a()(b.a,{},void 0,a()(I.a,{},void 0,a()(D.a,{type:"submit",kind:p,isDisabled:!f,
isSpinning:h},void 0,d||Object(M.default)("Continue")))))))},t}(v.Component);A.defaultProps={confirmKind:w.b.PRIMARY,hasFileImportFeature:!1},t.a=Object(T.a)(A,{isUpdatingPropName:"isUpdating",errorPropName:"error",clearDirtyOnChangePropName:"isOpen"})},function(e,t){e.exports={fileInput:"FileInput-fileInput-2okdn",filename:"FileInput-filename-3PPxw",noFilename:"FileInput-noFilename-sUIsd"}},function(e,t){e.exports={form:"AddToCatalogModal-form-3c_Mq",
inputContainer:"AddToCatalogModal-inputContainer-3V2vN",fileNote:"AddToCatalogModal-fileNote-25qjc"}},function(e,t){e.exports={divider:"MetadataListPageHeader-divider-1LM5c PageHeaderDivider-pageHeaderDivider-1BKT-"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(67)),s=n(38),l=n(105),c=n(224),u=n(46),d=n(254),p=n(489),h=n(255),f=n(145),v=r()(f.a,{}),g=u.a.extend({component:function(e){var t=e.selectedServerID,n=e.params||{},i=Object(s.a)(c.SERVER,t);return r()(l.a,{
metricsContext:n.context},void 0,r()(o.a,{},void 0,v,r()(d.a,{machineIdentifier:e.selectedServerID},void 0,r()(h.a,{},void 0,r()(p.a,{machineIdentifier:t,serverEntityID:i,directoryKey:n.key})))))}});t.a=g},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(a.a)(),function(e,t){return t.directoryKey},function(e,t){return Object(o.a)(e,t)})}var r=n(5),a=(n.n(r),n(350)),o=n(3286);t.a=i},function(e,t,n){"use strict";function i(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}}t.a=i},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,g=e.activeFilterLabel,m=e.activeSort,M=e.activeLimit,D=e.customFilter,C=e.typeKey,O=e.folderKey,P=e.folderTitle,j=e.parentFolderKey,T=e.parentFolderTitle,w=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&&w?p.a.createElement(w,s()({serverEntityID:t,providerEntityID:n,selectedDirectory:u,activeType:d,activeSort:m},E)):u&&r?a()(v.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u}):u&&o?a()(b.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u}):u&&l?a()(f.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u,activeFilters:h,activeFilterLabel:g}):u?a()(y.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:u,activeType:d,activeFilters:h,activeFilterLabel:g,
activeSort:m,activeLimit:M,customFilter:D,typeKey:C,folderKey:O,folderTitle:P||u.title,parentFolderKey:j,parentFolderTitle:T}):S}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=(n(89),n(31)),f=n(3288),v=n(3349),g=n(73),m=n(282),y=n(3370),b=n(3436),I=a()(g.a,{},void 0,a()(h.a,{})),S=a()(m.a,{});i.defaultProps={isTimeline:!1},t.a=i},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(5),s=(n.n(o),n(216)),l=n(199),c=n(120),u=n(3292),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=n(6),r=n.n(i),a=n(19),o=n(310),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(17),r=n(16),a=i.a.extend({name:"ProviderTagModel",context:["server","provider"],idAttribute:"id",rootPropertyName:"Directory",syncedAttrs:{id:r.a.integer,filter:r.a.string,tag:r.a.string,tagType:r.a.integer,tagValue:r.a.integer,thumb:r.a.string,channelCallSign:r.a.string,channelIdentifier:r.a.string}});t.a=a},function(e,t,n){"use strict";var i={CHANNEL:310};t.a=i},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(Object(D.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(O.a)(),Object(M.a)(),r(),function(e,t,n,i,r,a){return{columnTimes:e.columnTimes,metadataListEntityID:e.metadataList,providerIdentifier:i.identifier,providerMetricsIdentifier:i.metricsIdentifier,isRefreshing:!!r,channels:Object(w.a)(e.columnTimes,t,a),containerKey:n}})}var o=n(12),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(5),b=(n.n(y),
n(225)),I=n(216),S=n(1275),M=n(211),D=n(119),C=n(115),O=n(51),P=n(135),j=n(84),T=n(3293),w=n(1289),E="hdonly",x={dispatchInitMetadataList:I.c,dispatchResetStartTime:I.h,dispatchResetMetadataList:P.i,dispatchPopulateChannelPrograms:I.f,dispatchChangeQuickSearchSettings:j.changeQuickSearchSettings},A=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)(A)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.providerMetricsIdentifier,o=e.selectedDirectory,s=e.activeFilters,h=e.activeFilterLabel,f=e.channels;return a()(u.a,{metricsPage:c.c,metricsProperties:{identifier:r},scrollDirection:l.NONE},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:o,activeFilters:s,activeFilterLabel:h,totalSize:f.length}),a()(d.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,channels:f}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(54)),c=n(30),u=(n(89),n(83)),d=n(3294),p=n(3333);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(5),v=(n.n(f),n(225)),g=n(216),m=n(3295),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(64)),c=n(1278),u=n(3332),d=n.n(u);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(64)),f=n(87),v=n(209),g=n(54),m=n(225),y=n(27),b=n(3),I=n(31),S=n(418),M=n(490),D=n(188),C=n(284),O=n(841),P=n(44),j=(n.n(P),n(3300)),T=n(3313),w=n(3327),E=n(3331),x=n.n(E),A=parseInt(P.channelGridRowHeight,10)-1,N=140,L={selectedMetadataItemEntityID:null,selectedMediaIndex:null,selectedMediaItemRow:-1,selectedMediaItemHeight:0},k=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=A;return i===t&&(r+=n||N),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:N}):a.setState(L)},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,v=l.channels,g=l.isPending,m=a.state,y=m.selectedMetadataItemEntityID,b=m.selectedMediaIndex,I=m.selectedMediaItemRow,S=v[t];return S?r()(f.a,{className:x.a.gridRowCell,
cellX:n,cellY:i,cellWidth:o,cellHeight:s},t,r()(T.a,{className:x.a.gridRow,channel:S,serverEntityID:c,providerEntityID:u,selectedMetadataItemEntityID:y,selectedMediaIndex:b,columnTimes:d,rowIndex:t,columnWidth:p,isFetching:g,onMetadataItemPress:a.onMetadataItemPress}),t===I&&r()(h.a,{onMeasure:a.onDetailRowMeasure},void 0,r()(j.a,{serverEntityID:c,providerEntityID:u,metadataItemEntityID:y,mediaIndex:b}))):null},a._updateTimeout=null,a.state=L,a}return u()(t,e),
t.getDerivedStateFromProps=function(e,t){var n=t.selectedMediaIndex,i=t.selectedMetadataItemEntityID,r=t.selectedMediaItemRow,a=e.channels[r];return a&&0!==a.programs.length?a.programs.find(function(e){return e.mediaIndex===n&&e.metadataItemEntityID===i})?null:L:null},t.prototype.componentDidMount=function(){this._updateProgress()},t.prototype.shouldComponentUpdate=function(e,t){return Object(y.a)(this,e,t)},t.prototype.componentDidUpdate=function(e){
Object(m.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()(w.a,{className:x.a.timeline,columnTimes:s}),d&&r()(C.a,{className:x.a.innerEmptyPage,title:Object(b.default)("There was an error loading channels")}),u&&r()(D.a,{className:x.a.innerEmptyPage},void 0,r()(I.a,{label:Object(b.default)("Loading channels")})),!u&&!d&&c&&r()(M.a,{serverEntityID:n,providerEntityID:i}),!u&&!d&&!c&&r()(v.a,{className:x.a.gridContent,scrollerClassName:x.a.gridInnerContent,keyPropName:"identifier",items:l,scrollDirection:g.VERTICAL,viewportWidth:a,
viewportHeight:o,size:l.length,layout:Object(O.a)({getCellHeights:this.getCellHeights}),cellRenderer:this.renderCell,onMeasure:this.onScrollerMeasure},void 0,r()(S.a,{className:x.a.attribution,providerEntityID:i})))},t}(p.Component);k.defaultProps={className:x.a.gridContainer,columnTimes:[]},t.a=k},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(3)),c=n(3298),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.machineIdentifier;if(e.isRefreshing)return a()(u.a,{icon:"plex-icon-shows-broadcast-560",title:Object(c.default)("We're now building your Guide"),
description:Object(c.default)("Hang tight while we download all the data for what's on")});var n=Object(p.a)(t,"manage","dvr");return a()(u.a,{icon:"plex-icon-shows-broadcast-560",title:Object(c.default)("The Guide is empty"),description:Object(c.default)("Please verify your channel mappings and refresh the Guide")},void 0,a()(l.a,{to:n,kind:d.b.PRIMARY},void 0,Object(c.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(20)),c=n(3),u=n(188),d=n(23),p=n(176)
;t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.mediaIndex},Object(s.a)(),Object(c.a)(),Object(l.a)(o.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,h=c.channelIdentifier;return{type:r,summary:a,thumb:o||s,contentRating:l,beginsAt:u,endsAt:d,channelIdentifier:h,channelTitle:p,showPlay:n,showRecord:!!i}})}
var r=n(11),a=n(5),o=(n.n(a),n(60)),s=n(22),l=n(487),c=n(3301),u=n(3302);t.a=Object(r.b)(i)(u.a)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.mediaIndex},Object(a.a)(),s.a,o.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(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(185),c=n(278)},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.channelIdentifier,M=e.channelTitle,D=e.showPlay,C=e.showRecord;return a()("div",{className:t},void 0,a()(l.a,{className:v.a.poster,serverEntityID:i,providerEntityID:r,component:c.a,type:s,width:g,height:Object(u.d)(g,s),url:m}),a()("div",{className:v.a.preplayContainer},void 0,a()(p.a,{type:s,serverEntityID:i,
providerEntityID:r,metadataItemEntityID:n}),a()(d.a,{beginsAt:b,endsAt:I,channelTitle:M,contentRating:y}),a()(h.a,{serverEntityID:i,providerEntityID:r,metadataItemEntityID:n,channelIdentifier:S,mediaIndex:o,showPlay:D,showRecord:C}),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(279)),c=n(247),u=n(126),d=n(3303),p=n(3305),h=n(1279),f=n(3312),v=n.n(f),g=80;i.defaultProps={className:v.a.container},t.a=i},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(f.default)("Now on {channel}",{channel:n}),a=Object(d.a)(t-i);else{var o=Object(p.a)(e,t,{separator:" - "});r=Object(f.default)("{timeRange} on {channel}",{timeRange:o,channel:n}),a=Object(u.a)(1e3*(t-e))}return{airTime:r,duration:a}}function r(e){var t=e.beginsAt,n=e.endsAt,r=e.channelTitle,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(h.a)(a)))}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(72)),u=n(375),d=n(319),p=n(477),h=n(793),f=n(3),v=n(3304),g=n.n(v),m=o()(c.b,{});t.a=r},function(e,t){e.exports={container:"ChannelsGridDetailRowAirTime-container-Xxl-I",contentRating:"ChannelsGridDetailRowAirTime-contentRating-3x_JJ"}},function(e,t,n){"use strict";function i(e){var t=void 0;switch(e){case c.f:t=[p.a,h.a];break;case c.k:t=[p.a,d.a];break;case c.e:t=[u.a,d.a];break;default:
t=[p.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(26)),u=n(248),d=n(281),p=n(575),h=n(342),f=n(3306),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";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(3308),v=n(3310),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,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(196)),c=n(566),u=n(3309),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",
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(d.default)("Recording Scheduled"):Object(d.default)("Record");return a()("span",{},void 0,i&&a()(l.a,{className:v.a.playButton,
kind:c.DARK,size:u.SMALL,onPress:o},void 0,a()(p.a,{className:v.a.icon,name:"plex-icon-play-560"}),Object(d.default)("Watch Now")),r&&a()(l.a,{className:v.a.recordButton,kind:c.DARK,size:u.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(42)),c=n(49),u=n(52),d=n(3),p=n(25),h=n(478),f=n(3311),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){e.exports={container:"ChannelsGridDetailRow-container-3CcnP",preplayContainer:"ChannelsGridDetailRow-preplayContainer-2ECfQ",poster:"ChannelsGridDetailRow-poster-3A0Rg PosterCard-card-1rN9g"}},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(3314)),f=n(3320),v=n(3323),g=n(3326),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()(v.a,{className:m.a.title,serverEntityID:n,providerEntityID:i,channel:s,showPlayButton:g}),r()("div",{
className:m.a.programsContainer},void 0,r()(f.a,{className:m.a.progress}),s.programs.map(function(e,t){var u=Math.max(e.beginsAt,y),f=Math.min(e.endsAt,b),v=f-u,g=v/I*c,S=a===e.metadataItemEntityID&&o===e.mediaIndex;return r()(h.a,{width:g,className:m.a.program,beginsAt:e.beginsAt,endsAt:e.endsAt,metadataItemEntityID:e.metadataItemEntityID,mediaIndex:e.mediaIndex,serverEntityID:n,providerEntityID:i,channelIdentifier:s.identifier,rowIndex:l,isSelected:S,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(c.createSelector)(function(e,t){return t.mediaIndex},Object(d.a)(),function(e,t){return t?t.Media[e]:null})}function r(){return Object(c.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}})}function a(){
return Object(c.createSelector)(Object(d.a)(),i(),r(),Object(p.a)(u.b.SUBSCRIBE),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=arguments[2],i=arguments[3],r=e.type,a=e.grandparentTitle,o=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 s()({},n,{type:r,title:a||o,subscriptionType:c||d,showEpisodeTitle:m,isSubscribed:v,premiere:f,canRecord:!!i})})}var o=n(6),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(60)),d=n(22),p=n(487),h=n(3315);t.a=Object(l.b)(a)(h.a)},function(e,t,n){"use strict";function i(e,t){var n=null;switch(e){case m.f:n=I.a;break;case m.k:case m.e:t&&(n=b.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(332)),v=n(20),g=n(3),m=n(26),y=n(478),b=n(792),I=n(342),S=n(842),M=n(3317),D=n(1279),C=n(3319),O=n.n(C),P=a()(M.a,{}),j=a()(M.a,{}),T=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.channelIdentifier,l=e.mediaIndex,c=e.width,u=e.type,d=e.subscriptionType,p=e.title,h=e.premiere,m=e.canRecord,b=e.showEpisodeTitle,I=e.showLoader,M=e.isOnAir,C=e.isFinishedAiring,T=e.isSelected,w=e.isSubscribed;if(!n)return a()("div",{className:(t||"")+" "+(M&&O.a.onAir||"")+" "+(C&&O.a.finishedAiring||""||""),
style:{width:c+"px"}},void 0,I&&a()("div",{className:O.a.placeholderContainer},void 0,P,j),!I&&a()("div",{className:O.a.content},void 0,Object(g.default)("Unknown Airing")));var E=i(u,b);return a()("div",{className:(t||"")+" "+(M&&O.a.onAir||"")+" "+(T&&O.a.selected||"")+" "+((M||m)&&O.a.hoverable||"")+" "+(C&&O.a.finishedAiring||""||""),style:{width:c+"px"}},void 0,a()("div",{className:O.a.content},void 0,a()(v.a,{className:O.a.underlay,onPress:this.onCellPress
}),a()("div",{},void 0,p),a()("div",{className:O.a.actionsContainer},void 0,a()("div",{className:O.a.subTitleContainer},void 0,E&&a()(E,{className:O.a.subTitle,serverEntityID:r,providerEntityID:o,metadataItemEntityID:n}),h&&a()(S.a,{className:O.a.premiereBadge}),w&&a()(f.a,{className:O.a.subscriptionBadge},void 0,a()(y.a,{type:d}))),a()(D.a,{className:O.a.actions,isCompact:!0,serverEntityID:r,providerEntityID:o,metadataItemEntityID:n,channelIdentifier:s,mediaIndex:l,showRecord:m,showPlay:M}))))
},t}(h.Component);T.defaultProps={className:O.a.container},t.a=T},function(e,t){e.exports={badge:"PremiereAiringBadge-badge-hAmdn"}},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(44)),v=(n.n(f),n(3318)),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,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(5),o=(n.n(a),n(3321));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(3322)),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(a.l)({serverEntityID:n,providerEntityID:i,options:{type:o.d,identifier:r.identifier}}))}}}
var r=n(11),a=n(186),o=n(58),s=n(3324);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()(l.a,{src:n.thumb,className:h.a.thumbnail,backgroundSize:"contain",background:!0,width:f,height:v}):a()("div",{className:h.a.channelCallSignText,title:n.callSign},void 0,n.callSign),s=void 0;return s=i?a()("div",{className:h.a.playButtonContainer,
title:Object(c.default)("Play Channel {channel}",{channel:n.identifier})},void 0,a()(u.a,{className:h.a.playButton,title:Object(c.default)("Channel {channel}",{channel:n.identifier}),tabIndex:"-1",onPress:r})):a()("span",{className:h.a.number},void 0,n.identifier),a()("div",{className:t},void 0,a()("div",{className:h.a.numberContainer},void 0,s),a()("div",{className:h.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(208)),c=n(3),u=n(196),d=n(44),p=(n.n(d),
n(3325)),h=n.n(p),f=parseInt(d.channelGridChannelIconWidth,10),v=parseInt(d.channelGridRowHeight,10);i.defaultProps={className:h.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",channelCallSignText:"ChannelsGridRowTitle-channelCallSignText-3ehTI",
number:"ChannelsGridRowTitle-number-2yURd",playButtonContainer:"ChannelsGridRowTitle-playButtonContainer-30FVK",playButton:"ChannelsGridRowTitle-playButton-1Dp3V PlayButton-playButton-3WX8X"}},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";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,o=new Date(1e3*i),s=o>a;return Object(l.a)(i)&&(o=null),{timeFormat:n,startDate:o,columnWidth:r,enablePrevious:s,enableNext:!0}})}var r=n(11),a=n(5),o=(n.n(a),n(216)),s=n(70),l=n(407),c=n(3328),u=108e5,d={dispatchNext:o.e,dispatchPrevious:o.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(l.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(u.default)("Previous"),isDisabled:!n,onPress:f}),a()(d.a,{className:h.a.navigationButton,icon:"plex-icon-hub-next-560",title:Object(u.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(266)),c=n(3329),u=n(3),d=n(242),p=n(3330),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(48),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){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-3aWqh",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";function i(){return Object(a.createSelector)(function(e){return e.ui.channelGridPage
},Object(u.a)(),c.a,Object(l.a)(),Object(s.a)(),Object(o.a)(),function(e,t,n,i,r,a){return{server:t,provider:n,directories:i,datePickerTitle:Object(p.a)(1e3*e.startTime),showEPGActivity:!!r,selectedFilterTitle:a}})}var r=n(11),a=n(5),o=(n.n(a),n(1280)),s=n(211),l=n(350),c=n(37),u=n(34),d=n(3334),p=n(843);t.a=Object(r.b)(i)(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(193)),f=n(215),v=n(118),g=n(419),m=n(134),y=n(102),b=n(45),I=n(27),S=(n(89),n(608)),M=(n(88),n(125),n(488)),D=n(1282),C=n(1284),O=r()(y.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.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(b.a)(),r._datePickerMenuButtonID=Object(b.a)(),r._filterMenuButtonID=Object(b.a)(),r}
return u()(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.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,y=e.totalSize,b=this.state,I=b.isDirectoriesMenuOpen,P=b.isDatePickerMenuOpen,j=b.isFilterMenuOpen;return r()(h.a,{},void 0,r()(m.a,{},void 0,r()(v.a,{
id:this._directoriesMenuButtonID,"data-qa-id":"directoriesMenuButton",title:s.title,hasMenu:o.length>1,isMenuOpen:I,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),r()(M.a,{target:this._directoriesMenuButtonID,isOpen:I,server:t,provider:n,directories:o,selectedDirectory:s,onMenuClose:this.onDirectoriesMenuClose}),r()(v.a,{id:this._datePickerMenuButtonID,title:c,hasMenu:!0,isMenuOpen:P,onPress:this.onDatePickerMenuButtonPress}),r()(D.a,{target:this._datePickerMenuButtonID,isOpen:P,
onMenuClose:this.onDatePickerMenuClose}),r()(v.a,{id:this._filterMenuButtonID,title:l,hasMenu:!0,isMenuOpen:j,onPress:this.onFilterMenuButtonPress}),r()(C.a,{target:this._filterMenuButtonID,isOpen:j,activeFilters:d,activeFilterLabel:p,onMenuClose:this.onFilterMenuClose}),r()(f.a,{},void 0,y)),u&&r()(g.a,{},void 0,r()(S.a,{serverEntityID:i,providerEntityID:a})),u&&O)},t}(p.Component);t.a=P},function(e,t){e.exports={pageHeaderCenter:"PageHeaderCenter-pageHeaderCenter-XZlGC"}},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()(l.a,{className:d.a.refreshingSpinner,size:c.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(31)),c=n(23),u=n(3337),d=n.n(u)},function(e,t){e.exports={refreshingSpinner:"ProgramGuideActivityStatus-refreshingSpinner-30DBl"}},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(56)),f=n(380),v=n(23),g=n(3339),m=n(3340),y=n(3343),b=n.n(y),I={scrollDirection:v.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()(h.a,{
target:t,isOpen:n,size:v.e.MEDIUM,scrollerProps:I,onMenuClose:Object(f.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(71)),c=n(243),u=n(3),d=n(103),p=n(1283),h=a()(c.a,{});t.a=i},function(e,t,n){"use strict";function i(e,t){return o()(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(l.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=o.a.unix(t.startTime),a=o.a.unix(n.value),s=o()();return{
timeOptions:e.map(function(t,n){var o=e[n+1],l=i(a,t.startHour),u=i(a,o?o.startHour:24),d=s.isBefore(u),p=r.diff(l)>=0&&r.diff(u)<0,h=l.isBefore(s)?s.unix():l.unix();return{title:s.diff(l)>=0&&s.diff(u)<0?Object(c.default)("Now ({timeSlotTitle})",{timeSlotTitle:t.title}):t.title,value:h,isEnabled:d,isSelected:p}})}})}var a=n(48),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),n(3)),u=n(3341);t.a=Object(s.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()(l.a,{onPress:r},void 0,a()(d.a,{className:f.a.backIcon,name:"plex-icon-hub-prev-560","aria-label":Object(u.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(20)),c=n(243),u=n(3),d=n(25),p=n(1283),h=n(3342),f=n.n(h),v=a()(c.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"
;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(56)),c=(n(89),n(23)),u=n(1285);t.a=i},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(u.a)(f,"1");return a()(h.a,{to:Object(p.a)({typeKey:t,filters:v?Object(d.a)(n,o):Object(l.a)(n,o,{value:"1",type:c.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(1286)),c=n(285),u=n(1287),d=n(1288),p=(n(89),n(256)),h=n(103);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(7)),f=n.n(h),v=n(101),g=n(27),m=n(3),y=n(25),b=(n(89),n(31)),I=n(23),S=n(3347),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(g.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&&!!f.a.find(t,function(e){return e.key===n});return r()(v.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:I.e.SMALL}),!a&&o&&r()("div",{
className:M.a.selectedIcon},void 0,r()(y.a,{name:"plex-icon-selected-560","aria-label":Object(m.default)("Selected")}))))},t}(p.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(){return Object(b.createSelector)(D.a,Object(M.a)(),Object(S.a)(),function(e){return e.ui.discoverPage},function(e,t){return t.selectedDirectory.hubKey},function(e,t){
return t.selectedDirectory.isHomeDirectory},N,E.a,A,function(e,t,n,i,r,a,o,s,l){var c=i.hubs||[],u=!Object(C.a)(i.knownPromotedHubCloudProviderIDs,e.desktop.providers),d=!(u||t.isCloud||!a||!e.desktop.isProvidersPopulated||!t.isProvidersPopulated),p=d&&o&&!i.hubsError,h=i.isHubsPending||p&&i.isPromotedHubsPending;return{providerIdentifier:n.identifier,providerMetricsIdentifier:n.metricsIdentifier,isProgramGuide:O.c.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(T.b)())},dispatchPopulatePromotedHubs:function(){e(Object(T.d)())},onProviderChange:function(n){e(Object(w.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:null}))}}}function a(e){var t=e.ui.discoverPage;return{
providerEntityID:t.providerEntityID,hubKey:t.hubKey}}function o(e,t){e(Object(T.c)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,hubKey:t.hubKey})),e(Object(T.a)({options:{onlyTransient:!0}}))}var s=n(12),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(5),I=(n.n(b),n(475)),S=n(51),M=n(34),D=n(154),C=n(3350),O=n(41),P=n(780),j=n(120),T=n(844),w=n(84),E=n(74),x=n(3351),A=Object(b.createSelector)(function(e){
return e.ui.discoverPage},function(e){return e.isHubsPending||e.hubsError?[]:e.promotedHubs}),N=Object(b.createSelector)(I.a,function(e){return e.ui.discoverPage.hubs},A,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.type!==P.a&&(o.size||o.totalSize))return!1}return!0}),L=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(x.a,t)},t}(g.Component),k=Object(j.a)(L,a,o);t.a=Object(y.b)(i,r)(k)},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(7),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(54)),f=n(30),v=n(418),g=n(609),m=n(589),y=n(83),b=n(140),I=n(415),S=n(1290),M=n(3359),D=n(3362),C=n(3369),O=n.n(C),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.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,P=e.showPromotedHubs,j=e.onRepopulate;return r()(y.a,{metricsPage:f.x,metricsProperties:{identifier:a,type:s.type},
allowBackgroundLightPreset:!0,scrollDirection:h.NONE},void 0,l?r()(I.a,{serverEntityID:t,providerEntityID:n}):r()(M.a,{serverEntityID:t,providerEntityID:n,selectedDirectory:s}),r()(S.a,{serverEntityID:t,providerEntityID:n}),r()(b.a,{innerClassName:O.a.discoverPageContent},void 0,C&&r()(D.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,selectedDirectory:s,isPending:d,error:p,onRepopulate:j}),!C&&r()(m.a,{serverEntityID:t,providerEntityID:n,hubEntityIDs:c}),!C&&P&&r()(m.a,{
serverEntityID:t,providerEntityID:n,hubEntityIDs:u,isPromoted:!0}),o&&!C&&r()(v.a,{className:O.a.attribution,providerEntityID:n})),o&&r()(g.a,{serverEntityID:t,providerEntityID:n}))},t}(p.Component);t.a=P},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(3353));t.a=i},function(e,t,n){"use strict"
;function i(e){return{onDismissPress:function(){e(Object(a.l)({hasDismissedDVRUpsell:!0}))}}}var r=n(11),a=n(68),o=n(3354);t.a=Object(r.b)(null,i)(o.a)},function(e,t,n){"use strict";function i(e){var t=e.className,n=e.serverEntityID,i=e.onDismissPress;return a()(c.a,{className:t,serverEntityID:n},void 0,function(e){var t=e.noDVRs,n=e.onOpen;return t?a()(f.a,{imageUrl:d.a,headerImgUrl:h.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(3)),c=n(712),u=n(3355),d=n.n(u),p=n(3356),h=n.n(p),f=n(3357);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";function i(e){var t=e.imageUrl,n=e.headerImgUrl,i=e.header,r=e.text,o=e.actionText,s=e.infoText,h=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()(u.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()(l.a,{kind:d.PRIMARY,onPress:f},void 0,o)),a()("div",{className:v.a.infoButton},void 0,h&&a()(c.a,{kind:d.PRIMARY,to:h,target:"_blank"},void 0,s||Object(p.default)("Learn more")))),a()("div",{className:v.a.dismissButton},void 0,I&&a()(c.a,{onPress:I},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(42)),c=n(20),u=n(208),d=n(49),p=n(3),h=n(25),f=n(3358),v=n.n(f),g=220,m=140,y={width:g,height:m},b=a()(h.a,{name:"plex-icon-remove-560"});t.a=i},function(e,t){e.exports={container:"DiscoverBanner-container-3vrIp",image:"DiscoverBanner-image-snLus",call:"DiscoverBanner-call-2nc7p",header:"DiscoverBanner-header-3_kXk",headerImage:"DiscoverBanner-headerImage-bqJ0W",text:"DiscoverBanner-text-1Zg5n",actions:"DiscoverBanner-actions-1dZad",dismissButton:"DiscoverBanner-dismissButton-1YKJR",
actionButton:"DiscoverBanner-actionButton-3zWaM",infoButton:"DiscoverBanner-infoButton-Yr4jB"}},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(d.a,c.a,Object(l.a)(),function(e,t,n){return e.isCloud||t.isLibraryProvider?n.filter(function(e){return!!e.hubKey}):n})}function r(){return Object(o.createSelector)(Object(u.a)(),c.a,i(),Object(s.a)(),function(e,t,n,i,r){return{server:e,provider:t,directories:n,showEPGActivity:!!i,isTypeFirstEnabled:r}})}
var a=n(11),o=n(5),s=(n.n(o),n(211)),l=n(350),c=n(37),u=n(34),d=n(50),p=n(3360);t.a=Object(a.b)(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(193)),f=n(118),v=n(419),g=n(607),m=n(134),y=n(102),b=n(610),I=n(45),S=n(3),M=n(608),D=n(146),C=n(839),O=(n(88),n(125),n(488)),P=r()(b.a,{}),j=r()(g.a,{}),T=r()(D.a,{}),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.state={isDirectoriesMenuOpen:!1},r._directoriesMenuButtonID=Object(I.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()(h.a,{},void 0,r()(m.a,{},void 0,a.isLibraryProvider&&r()("span",{},void 0,Object(S.default)("Discover"),P),r()(f.a,{id:this._directoriesMenuButtonID,"data-qa-id":"directoriesMenuButton",title:s.isHomeDirectory?Object(S.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()(v.a,{},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n})),r()(y.a,{},void 0,!!a.features.actions.addToCatalog&&r()(C.a,{providerEntityID:n}),!!a.features.actions.addToCatalog&&j,T))},t}(p.Component);t.a=w},function(e,t){e.exports={pageHeaderSeparator:"PageHeaderSeparator-pageHeaderSeparator-GZfDv DashSeparator-separator-4CyEF"}},function(e,t,n){"use strict";function i(e){
var t=e.providerIdentifier,n=e.selectedDirectory,i=a()(e,["providerIdentifier","selectedDirectory"]);return u.c.test(t)?l.a.createElement(h.a,i):n.id===c.a?l.a.createElement(d.a,i):l.a.createElement(p.a,i)}var r=n(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(1291),u=n(41),d=n(1292),p=n(3366),h=n(3368);t.a=i},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(154)),a=Object(i.createSelector)(r.a,function(e){return e.subscriptions||[]});t.a=a},function(e,t,n){"use strict";function i(e){
var t=e.isPending,n=e.hasTidal;return t?m:n?a()(h.a,{title:Object(u.default)("Account not linked"),description:Object(u.default)("Ensure your Plex account is linked to TIDAL.")},void 0,a()(l.a,{to:"https://plex.tv/users/other-services",kind:f.b.PRIMARY},void 0,Object(u.default)("Learn more"))):a()(p.a,{icon:"plex-icon-tidal-logo-560",iconClassName:g.a.logo,title:Object(u.default)("TIDAL + Plex = music to your ears!"),
description:Object(u.default)("Need some jams? Add TIDAL streaming music to Plex and get access to 59 million of the highest quality tracks, hundreds of thousands of music videos, awesome premium Plex music features, and seamless integration with your own collection. Get 30 days FREE when you sign up today!")},void 0,a()(l.a,{to:c.c,kind:f.b.PRIMARY},void 0,Object(u.default)("Learn more")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(20)),c=n(334),u=n(3),d=n(31),p=n(188),h=n(579),f=n(23),v=n(3365),g=n.n(v),m=a()(p.a,{},void 0,a()(d.a,{}));t.a=i},function(e,t){e.exports={logo:"DiscoverEmptyTidalPage-logo-3po-A EmptyPage-icon-31D3Z"}},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(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(34)),I=n(183),S=n(3367),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,h=e.onAddLibraryPress,m=e.onRetryPress;return r?g:o&&!i?a()(v.a,{
title:Object(p.default)("There was an unexpected error loading the dashboard")},void 0,a()(c.a,{kind:u.PRIMARY,onPress:m},void 0,Object(p.default)("Retry"))):o&&i?a()(f.a,{title:Object(p.default)('The server "{serverName}" does not support the dashboard',{serverName:t}),description:Object(p.default)("Browse libraries using the sidebar")}):s&&n?a()(f.a,{title:Object(p.default)("The dashboard is empty"),description:Object(p.default)("Browse and manage your libraries using the sidebar"),
footer:Object(p.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}):!s&&n?a()(f.a,{title:Object(p.default)("The dashboard is empty"),description:Object(p.default)("Add libraries with your media to make the most of Plex Media Server")},void 0,a()(l.a,{kind:u.PRIMARY,size:d.LARGE,onPress:h},void 0,Object(p.default)("Add Library"))):a()(f.a,{title:Object(p.default)("The dashboard is empty"),
description:Object(p.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(42)),c=n(20),u=n(49),d=n(52),p=n(3),h=n(31),f=n(188),v=n(284),g=a()(f.a,{},void 0,a()(h.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()(p.a,{title:Object(l.default)("There was an unexpected error loading the Guide")}):a()(u.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(3)),c=n(31),u=n(490),d=n(188),p=n(284),h=a()(d.a,{},void 0,a()(c.a,{}));t.a=i},function(e,t){e.exports={discoverPageContent:"DiscoverPage-discoverPageContent-3mJ50 PageContent-innerPageContent-3ktLT",attribution:"DiscoverPage-attribution-3-PdL ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e){return e.ui.libraryPage
},Object(d.a)(),Object(c.a)(),Object(u.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(f.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(5),c=(n.n(l),
n(199)),u=n(234),d=n(51),p=n(120),h=n(257),f=n(84),v=n(3371),g=Object(p.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(T.p)(e.type);return n?Object(T.p)(n.id).typeString:E.e}return Object(T.m)(e.type)?Object(T.q)(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(P.a)(),Object(I.a)(),Object(D.a)(),Object(S.a)(),Object(M.a)("query/parse"),Object(O.a)(),Object(C.a)(),k.a,L.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,I=e.isDetailsPopulated,S=e.detailsError,M=i(u,n),D=r(u),C=Object(_.a)(p,w.b,M,D,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:j.c.test(a.identifier),showLibrarySpinner:!(S||I&&(v||g)),showLibraryError:!b&&!!S,libraryErrorStatus:S&&S.status,libraryDirectories:y&&y.directories,listTitle:u.title,listType:M,listSubtype:D,listStyle:C,typeKey:u.key,selectedType:u,selectedSort:d,activeSelectionType:h.activeSelectionType,isDirectoryList:!Object(T.m)(M)&&M!==E.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(x.initLibraryPageMetadataList(t))},dispatchInitLibraryPageDirectoryList:function(t){e(x.initLibraryPageDirectoryList(t))},dispatchPopulateLibraryFirstCharacters:function(){e(x.populateLibraryFirstCharacters())}}}
var s=n(12),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(5),I=(n.n(b),n(199)),S=n(3372),M=n(611),D=n(3373),C=n(612),O=n(234),P=n(51),j=n(41),T=n(26),w=n(32),E=n(197),x=n(257),A=n(84),N=n(389),L=n(74),k=n(420),_=n(421),R=n(3374),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.a)("firstCharacter")}t.a=i;var r=n(611)},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(5),a=(n.n(r),n(611))},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(1293),v=n(30),g=n(3),m=n(32),y=(n(89),
n(31)),b=n(418),I=n(609),S=n(127),M=n(1294),D=n(83),C=n(73),O=n(282),P=n(184),j=n(415),T=n(62),w=n(1295),E=n(3418),x=n(3420),A=n(3422),N=n(1304),L=n(3435),k=n.n(L),_=r()(C.a,{},void 0,r()(y.a,{})),R=r()(O.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,m=e.libraryErrorStatus,y=e.libraryDirectories,C=e.selectedSort,O=e.listTitle,L=e.listType,z=e.listSubtype,U=e.listContext,B=e.listStyle,F=e.activeSelectionType,V=e.typeKey,H=e.activeFilters,Q=e.activeFilterLabel,Y=e.activeSort,G=e.activeLimit,W=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(C.key),oe=Math.max(ne,1),se=ee>=5,le=re/oe<=.25,ce=!K&&ae&&se&&le,ue=B===T.f,de=!F&&!!K,pe=!F&&!K
;return d?_:404===m?R:p?r()(P.a,{title:Object(g.default)("There was an unexpected error loading this library")}):r()(D.a,{metricsPage:v.F,metricsProperties:{identifier:l,mode:K?f.a:f.b,type:L,customFilter:W,style:B},allowBackgroundLightPreset:!0,scrollDirection:h.NONE},void 0,F&&r()(j.a,{serverEntityID:t,providerEntityID:n}),de&&r()(E.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,libraryDirectories:y,listType:L,listSubtype:z,listContext:U,listStyle:B,selectedDirectory:u,
folderKey:K,folderTitle:q,parentFolderKey:Z,parentFolderTitle:X}),pe&&r()(A.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i||a,libraryDirectories:y,listType:L,listSubtype:z,listContext:U,listStyle:B,selectedDirectory:u,typeKey:V,activeFilters:H,activeFilterLabel:Q,activeSort:Y,customFilter:W,showSortsMenu:!ue}),W&&r()(w.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,providerIdentifier:s,typeKey:V,activeSort:Y,activeLimit:G,selectedSort:C}),ue&&r()(M.a,{
providerEntityID:n,listType:L,listSubtype:z,listContext:U,typeKey:V,activeFilters:H,activeFilterLabel:Q,activeSort:Y,customFilter:W,selectedSort:C,isFolder:!!K,isDisabled:!!K}),r()(S.a,{component:x.a,serverEntityID:t,providerEntityID:n,metadataListEntityID:i||a,containerKey:o,containerTitle:q,providerIdentifier:s,hasGutter:ce,scrollIndex:ie,listTitle:O,listType:L,listSubtype:z,listContext:U,listStyle:B,typeKey:V,activeFilters:H,activeSort:Y,selectedSort:C,initialSize:50,shouldResetOnUnmount:!0,
isDirectoryList:J,isLibraryRefreshing:$,isFolder:!!K,onListScrollIndexChange:this.onListScrollIndexChange,onListUpdate:this.onListUpdate,onMeasure:this.onMeasure},void 0,c&&r()(b.a,{className:k.a.attribution,providerEntityID:n})),ce&&r()(N.a,{activeSort:Y,viewportHeight:re,onJumpBarItemPress:this.onJumpBarItemPress}),c&&r()(I.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:m.b,scrollIndex:0,listHeight:0,viewportHeight:0},t.a=z},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(20)),f=n(56),v=n(45),g=n(3),m=n(25),y=(n(89),
n(256)),b=n(3376),I=n(3377),S=n.n(I),M=r()(m.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(v.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,v=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,v=e.descKey,b=e.key;if(!t[b])return null
;var I=l===f||l===v||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()(h.a,{style:n,className:S.a.tableHeaderLink,to:Object(y.a)({typeKey:i,filters:o,filterLabel:s,sort:M?v: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()(m.a,{
className:S.a.sortDirectionIcon,name:"plex-icon-sort-ascending-560","aria-label":Object(g.default)("Ascending")}),I&&!M&&r()(m.a,{className:S.a.sortDirectionIcon,name:"plex-icon-sort-descending-560","aria-label":Object(g.default)("Descending")})))}),r()("div",{className:S.a.actionsCell},void 0,r()(h.a,{id:this._columnsButtonID,className:S.a.columnsButton,"aria-label":Object(g.default)("Change Columns"),"aria-haspopup":!0,onPress:this.onChangeColumnsPress},void 0,M),r()(f.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:v},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(103)),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(e){
var t=e.defaultField,n=e.defaultFieldType,i=n.type,r=n.operators,a=[];return i===w.a&&a.push({value:1}),{key:t.key,value:a,operator:r[0].key,id:I.a.uniqueId()}}function r(e){return(e.activeFilters.length?e.activeFilters:[i(e)]).map(function(e){return f()({},e,{id:I.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(6),f=n.n(h),v=n(48),g=n.n(v),m=n(1),y=(n.n(m),n(0)),b=(n.n(y),
n(7)),I=n.n(b),S=n(42),M=n(330),D=n(181),C=n(3379),O=n(165),P=n(49),j=n(52),T=n(613),w=n(285),E=n(1298),x=n(3),A=(n(89),n(256)),N=n(31),L=n(3385),k=n(3417),_=n.n(k),R=Object(O.a)(M.a),z=o()(N.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 I.a.isString(e)?e:e.value}),l=void 0;return l=i[r].type!==T.b||Object(E.a)(o)?s:[g()(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(A.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(A.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(x.default)("There was an error trying to load the filters. Reload the page and try again"):z);var l=!!r;return o()(D.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:j.SMALL,name:"enableLimit",checkboxText:Object(x.default)("Limit to"),initialValue:l}),o()(C.a,{inputClassName:_.a.numberInput,size:j.SMALL,name:"limit",initialValue:l?r:"",leftLabel:!1,labelText:Object(x.default)("items")})),o()("div",{className:_.a.buttons},void 0,o()(S.a,{className:_.a.button,
onPress:this.onCancelPress},void 0,Object(x.default)("Cancel")),o()(S.a,{kind:P.PRIMARY,type:"submit"},void 0,Object(x.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()(h.a,{},void 0,l&&s()(f.a,{hasError:r,errors:o,name:n,labelText:i}),p.a.createElement(v.a,a()({className:t,name:n,
hasError:r},u)),!l&&s()(f.a,{hasError:r,errors:o,name:n,labelText:i}))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3380),f=n(3382),v=n(1033),g=n(165),m=n(3384),y=n.n(m);i.defaultProps={inputClassName:y.a.input,leftLabel:!0},t.a=Object(g.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(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(3381),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(457)),c=n(3383),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(y.createSelector)(function(e,t){return t.value.key},M.a,P.a,j.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 v;s.push((v={},v[d]=p,v))}}if(a){var g=a.key.split("."),h=g[0],m=g[1];m||(m=h,h=null);var y=void 0;if(h){var b=Object(C.q)(h),S=b.id;y=I.a.find(t,function(e){var t=Object(C.q)(e.type);return!!t&&t.id===S})}else y=t[0];y&&(o=I.a.find(y.filters,function(e){return e.filter===m}))}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(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(7)),I=n.n(b),S=n(165),M=n(283),D=n(35),C=n(26),O=n(257),P=n(1296),j=n(3386),T=n(3387),w=["duration","mediaSize","mediaBitrate","mood","show.writer","show.producer","show.director"],E=new RegExp("("+w.join("|")+")$"),x={dispatchSelectLibraryFilter:O.selectLibraryFilter,dispatchPopulateLibraryFilterOptions:O.populateLibraryFilterOptions,
dispatchDeselectLibraryFilter:O.deselectLibraryFilter,dispatchSearchLibraryFilterOptions:O.searchLibraryFilterOptions},A=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(D.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 g.a.createElement(T.a,a()({},t,{onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested}))},t}(v.Component);t.a=Object(S.a)(Object(m.b)(i,x)(A))},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(417)),a=n(613),o=n(3),s=n(1297),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!==r.b&&t!==r.h});n.push({key:r.d,title:Object(o.default)("in the last")},{key:r.f,title:Object(o.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,g=e.onValueChange,I=e.onTagValueChange;return t.type===S.a?null:t.subType===S.c?h()(y.a,{className:w.a.selectInput,name:"value",size:b.SMALL,values:[{"-1":Object(D.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:g}):t.type===S.b&&Object(M.a)(n.operator)?h()(P.a,{textInputClassName:w.a.unitTextInput,selectInputClassName:w.a.selectInput,name:"value",size:b.SMALL,units:[{s:Object(D.default)("Seconds")},{m:Object(D.default)("Minutes")},{h:Object(D.default)("Hours")},{d:Object(D.default)("Days")},{w:Object(D.default)("Weeks")},{
mon:Object(D.default)("Months")},{y:Object(D.default)("Years")}],value:n.value[0]?n.value[0].value:"",onChange:g}):t.type===S.b?h()(O.a,{className:w.a.textInput,name:"value",size:b.SMALL,value:n.value[0]?n.value[0].value:"",onChange:g}):h()(m.a,{className:w.a.tagsInput,value:n.value,suggestions:i,suggestionsFilter:r,renderSuggestion:a,shouldRenderSuggestions:o,getSuggestionValue:s,getTagValue:l,getTagDisplayValue:c,makeTag:u,makeTagFromSuggestion:d,tagComponent:j.a,validationRegex:A[t.type],
onSuggestionSelected:p,onSuggestionsFetchRequested:f,onSuggestionsClearRequested:v,onChange:I})}var r=n(6),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(20)),m=n(3388),y=n(227),b=n(52),I=n(417),S=n(613),M=n(1298),D=n(3),C=n(25),O=n(3408),P=n(3412),j=n(3414),T=n(3416),w=n.n(T),E=[I.b,I.h],x=[I.a,I.g],A={integer:/^\d+$/},N=h()(C.a,{name:"plex-icon-toolbar-filter-remove-560"}),L=h()(C.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===S.d&&x.indexOf(a)>-1||r!==S.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===S.a&&s.push({value:1}),
o===S.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===S.b&&Object(M.a)(e)&&Object(M.a)(i.props.value.operator)||!Object(M.a)(e)&&!Object(M.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:w.a.container},void 0,h()("div",{className:w.a.rules},void 0,h()("div",{className:w.a.rule},void 0,h()(y.a,{className:w.a.selectInput,name:"filter",size:b.SMALL,values:a,value:n.key,onChange:this.onFieldChange})),h()("div",{className:w.a.rule},void 0,h()(y.a,{className:w.a.selectInput,name:"operator",size:b.SMALL,values:r,value:n.operator,onChange:this.onOperatorChange})),h()("div",{className:w.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:j.a,onSuggestionSelected:this.onSuggestionSelected,onSuggestionsFetchRequested:l,onSuggestionsClearRequested:c,onTagValueChange:this.onTagValueChange,
onValueChange:this.onValueChange})),h()("div",{className:w.a.buttons},void 0,h()(g.a,{className:t?w.a.iconButtonDisabled:w.a.iconButton,"aria-label":Object(D.default)("Remove Filter"),isDisabled:t,onPress:this.onRemovePress},void 0,N),h()(g.a,{className:w.a.iconButton,"aria-label":Object(D.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(6),o=n.n(a),s=n(12),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(1299),n(3389)),b=n(3403),I=n(3407),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,y=r.state.inputValue;return m.a.createElement(b.a,{className:a,inputValue:y,inputProps:o()({},n,{inputRef:t}),tagProps:v,value:d,validationRegex:u,tagComponent:c,addOnBlur:!s(y),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()(y.a,{suggestions:t.filter(function(e){return a(e,d)}),shouldRenderSuggestions:s,getSuggestionValue:n,renderSuggestion:i,
focusInputOnSuggestionClick:!1,highlightFirstSuggestion:!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 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(12),o=n.n(a),s=n(6),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(3390),h=n.n(p),f=(n(1299),n(3402)),v=n.n(f);r.defaultProps={inputComponent:i},t.a=r},function(e,t,n){
"use strict";e.exports=n(3391).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(1),p=i(d),h=n(3392),f=i(h),v=n(3393),g=i(v),m=n(3401),y=function(){return!0},b=function(e){return e.trim().length>0},I=function(e){
var t=e.containerProps,n=e.children;return u.default.createElement("div",t,n)},S=function(e){function t(e){var n=e.alwaysRenderSuggestions;r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return M.call(i),i.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},i.justPressedUpDown=!1,i.justMouseEntered=!1,i}return o(t,e),l(t,[{key:"componentDidMount",value:function(){
document.addEventListener("mousedown",this.onDocumentMouseDown),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,
f.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,i=n.suggestions,r=n.onSuggestionHighlighted,a=n.highlightFirstSuggestion;if(!(0,
f.default)(i,e.suggestions)&&i.length>0&&a)return void this.highlightFirstSuggestion();if(r){var o=this.getHighlightedSuggestion();o!=t.highlightedSuggestion&&r({suggestion:o})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var i=this;this.setState(function(r){var a=r.valueBeforeUpDown;return null===t?a=null:null===a&&void 0!==n&&(a=n),{highlightedSectionIndex:e,
highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:i.getSuggestion(e,t),valueBeforeUpDown:a}})}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState(function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{
key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion: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:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;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:"getQuery",value:function(){var e=this.props.inputProps,t=e.value,n=this.state.valueBeforeUpDown;return(null===n?t:n).trim()
}},{key:"render",value:function(){
var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,r=t.onSuggestionsFetchRequested,a=t.renderSuggestion,o=t.inputProps,l=t.multiSection,c=t.renderSectionTitle,d=t.id,p=t.getSectionSuggestions,h=t.theme,f=t.getSuggestionValue,v=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,I=this.state,S=I.isFocused,M=I.isCollapsed,D=I.highlightedSectionIndex,C=I.highlightedSuggestionIndex,O=I.valueBeforeUpDown,P=v?y:this.props.shouldRenderSuggestions,j=o.value,T=o.onFocus,w=o.onKeyDown,E=this.willRenderSuggestions(this.props),x=v||S&&!M&&E,A=x?n:[],N=s({},o,{
onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=P(j);e.setState({isFocused:!0,isCollapsed:!n}),T&&T(t),n&&r({value:j,reason:"input-focused"})}},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=P(n);e.maybeCallOnChange(t,n,"type"),e.setState(s({},b?{}:{highlightedSectionIndex:null,
highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?r({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,i){var a=t.keyCode;switch(a){case 40:case 38:if(M)P(j)&&(r({value:j,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var o=i.newHighlightedSectionIndex,s=i.newHighlightedItemIndex,l=void 0;l=null===s?null===O?j:O:e.getSuggestionValueByIndex(o,s),
e.updateHighlightedSuggestion(o,s,j),e.maybeCallOnChange(t,l,40===a?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case 13:if(229===t.keyCode)break;var c=e.getHighlightedSuggestion();if(x&&!v&&e.closeSuggestions(),null!=c){var u=f(c);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:u,suggestionIndex:C,sectionIndex:D,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout(function(){
e.justSelectedSuggestion=!1})}break;case 27:x&&t.preventDefault();var d=x&&!v;if(null===O){if(!d){e.maybeCallOnChange(t,"","escape"),P("")?r({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,O,"escape");d?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}w&&w(t)}}),L={query:this.getQuery()};return u.default.createElement(g.default,{multiSection:l,items:A,renderInputComponent:i,
renderItemsContainer:this.renderSuggestionsContainer,renderItem:a,renderItemData:L,renderSectionTitle:c,getSectionItems:p,highlightedSectionIndex:D,highlightedItemIndex:C,inputProps:N,itemProps:this.itemProps,theme:(0,m.mapToAutowhateverTheme)(h),id:d,ref:this.storeAutowhateverRef})}}]),t}(c.Component);S.propTypes={suggestions:p.default.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:p.default.func,
onSuggestionHighlighted:p.default.func,renderInputComponent:p.default.func,renderSuggestionsContainer:p.default.func,getSuggestionValue:p.default.func.isRequired,renderSuggestion:p.default.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:p.default.func,alwaysRenderSuggestions:p.default.bool,
multiSection:p.default.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:p.default.bool,highlightFirstSuggestion:p.default.bool,theme:p.default.object,id:p.default.string},S.defaultProps={renderSuggestionsContainer:I,shouldRenderSuggestions:b,alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:m.defaultTheme,id:"1"};var M=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.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var i=n.sectionIndex,r=n.itemIndex;e.updateHighlightedSuggestion(i,r),e.justMouseEntered=!0,setTimeout(function(){e.justMouseEntered=!1})},
this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(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,reason:"suggestion-selected"
}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},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.getHighlightedSuggestion(),s=i(r);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),a&&a(e.blurEvent,{highlightedSuggestion:o})},this.resetHighlightedSuggestionOnMouseLeave=function(){
e.resetHighlightedSuggestion(!1)},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.resetHighlightedSuggestionOnMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionMouseDown,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,i=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:i,
query:e.getQuery()})}};t.default=S},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(3394).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(1),h=i(p),f=n(3395),v=i(f),g=n(3396),m=i(g),y=n(3398),b=i(y),I=n(3399),S=i(I),M={},D=function(e){
return d.default.createElement("input",e)},C=function(e){var t=e.containerProps,n=e.children;return d.default.createElement("div",t,n)},O={container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",
itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"},P=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){
null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},
n.onKeyDown=function(e){var t=n.props,i=t.inputProps,r=t.highlightedSectionIndex,a=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var o="ArrowDown"===e.key?"next":"prev",s=n.sectionIterator[o]([r,a]),c=l(s,2),u=c[0],d=c[1];i.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:d});break;default:i.onKeyDown(e,{highlightedSectionIndex:r,highlightedItemIndex:a})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),
n.setTheme(e),n}return o(t,e),c(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{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.ensureHighlightedItemIsVisible()}},{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,v.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,m.default)(e.theme)}},{
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.renderSectionTitle,l=n.highlightedSectionIndex,c=n.highlightedItemIndex,u=n.itemProps;return r.map(function(n,r){var p="react-autowhatever-"+i+"-",h=p+"section-"+r+"-",f=0===r;return d.default.createElement("div",t(h+"container","sectionContainer",f&&"sectionContainerFirst"),d.default.createElement(b.default,{section:n,
renderSectionTitle:s,theme:t,sectionKeyPrefix:h}),d.default.createElement(S.default,{items:e.sectionsItems[r],itemProps:u,renderItem:a,renderItemData:o,sectionIndex:r,highlightedItemIndex:l===r?c:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:p,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.highlightedSectionIndex,s=n.highlightedItemIndex,l=n.itemProps;return d.default.createElement(S.default,{items:e,itemProps:l,renderItem:r,renderItemData:a,highlightedItemIndex:null===o?s:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+i+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;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.highlightedSectionIndex,l=t.highlightedItemIndex,c=this.state.isInputFocused,u=i?this.renderSections():this.renderItems(),p=null!==u,h=this.getItemId(o,l),f=e("react-autowhatever-"+n+"-container","container",p&&"containerOpen"),v="react-autowhatever-"+n,g=r(s({type:"text",value:"",autoComplete:"off",role:"combobox","aria-autocomplete":"list","aria-owns":v,"aria-expanded":p,
"aria-activedescendant":h},e("react-autowhatever-"+n+"-input","input",p&&"inputOpen",c&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),m=a({containerProps:s({id:v},e("react-autowhatever-"+n+"-items-container","itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:u});return d.default.createElement("div",f,g,m)}}]),t}(u.Component)
;P.propTypes={id:h.default.string,multiSection:h.default.bool,renderInputComponent:h.default.func,renderItemsContainer:h.default.func,items:h.default.array.isRequired,renderItem:h.default.func,renderItemData:h.default.object,renderSectionTitle:h.default.func,getSectionItems:h.default.func,inputProps:h.default.object,itemProps:h.default.oneOfType([h.default.object,h.default.func]),highlightedSectionIndex:h.default.number,highlightedItemIndex:h.default.number,
theme:h.default.oneOfType([h.default.object,h.default.array])},P.defaultProps={id:"1",multiSection:!1,renderInputComponent:D,renderItemsContainer:C,renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:M,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},inputProps:M,itemProps:M,highlightedSectionIndex:null,highlightedItemIndex:null,theme:O},
t.default=P},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(3397),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(1),d=i(u),p=n(845),h=i(p),f=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,h.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);f.propTypes={
section:d.default.any.isRequired,renderSectionTitle:d.default.func.isRequired,theme:d.default.func.isRequired,sectionKeyPrefix:d.default.string.isRequired},t.default=f},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(1),p=i(d),h=n(3400),f=i(h),v=n(845),g=i(v),m=function(e){function t(){var e,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=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.storeHighlightedItemReference=function(e){i.props.onHighlightedItemChange(null===e?null:e.item)},o=n,a(i,o)}return o(t,e),l(t,[{key:"shouldComponentUpdate",value:function(e){return(0,g.default)(e,this.props,["itemProps"])}},{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.highlightedItemIndex,c=t.getItemId,d=t.theme,p=t.keyPrefix,h=null===o?p:p+"section-"+o+"-",v="function"==typeof i;return u.default.createElement("ul",s({role:"listbox"},d(h+"items-list","itemsList")),n.map(function(t,n){var p=0===n,g=n===l,m=h+"item-"+n,y=v?i({sectionIndex:o,itemIndex:n}):i,b=s({id:c(o,n)},d(m,"item",p&&"itemFirst",g&&"itemHighlighted"),y)
;return g&&(b.ref=e.storeHighlightedItemReference),u.default.createElement(f.default,s({},b,{sectionIndex:o,isHighlighted:g,itemIndex:n,item:t,renderItem:r,renderItemData:a}))}))}}]),t}(c.Component);m.propTypes={items:p.default.array.isRequired,itemProps:p.default.oneOfType([p.default.object,p.default.func]),renderItem:p.default.func.isRequired,renderItemData:p.default.object.isRequired,sectionIndex:p.default.number,highlightedItemIndex:p.default.number,
onHighlightedItemChange:p.default.func.isRequired,getItemId:p.default.func.isRequired,theme:p.default.func.isRequired,keyPrefix:p.default.string.isRequired},m.defaultProps={sectionIndex:null},t.default=m},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(1),h=i(p),f=n(845),v=i(f),g=function(e){function t(){var e,n,i,r;a(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=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.storeItemReference=function(e){null!==e&&(i.item=e)},i.onMouseEnter=function(e){var t=i.props,n=t.sectionIndex,r=t.itemIndex;i.props.onMouseEnter(e,{sectionIndex:n,itemIndex:r})},i.onMouseLeave=function(e){
var t=i.props,n=t.sectionIndex,r=t.itemIndex;i.props.onMouseLeave(e,{sectionIndex:n,itemIndex:r})},i.onMouseDown=function(e){var t=i.props,n=t.sectionIndex,r=t.itemIndex;i.props.onMouseDown(e,{sectionIndex:n,itemIndex:r})},i.onClick=function(e){var t=i.props,n=t.sectionIndex,r=t.itemIndex;i.props.onClick(e,{sectionIndex:n,itemIndex:r})},r=n,o(i,r)}return s(t,e),c(t,[{key:"shouldComponentUpdate",value:function(e){return(0,v.default)(e,this.props,["renderItemData"])}},{key:"render",
value:function(){var e=this.props,t=e.isHighlighted,n=e.item,i=e.renderItem,a=e.renderItemData,o=r(e,["isHighlighted","item","renderItem","renderItemData"]);return delete o.sectionIndex,delete o.itemIndex,"function"==typeof o.onMouseEnter&&(o.onMouseEnter=this.onMouseEnter),"function"==typeof o.onMouseLeave&&(o.onMouseLeave=this.onMouseLeave),"function"==typeof o.onMouseDown&&(o.onMouseDown=this.onMouseDown),"function"==typeof o.onClick&&(o.onClick=this.onClick),d.default.createElement("li",l({
role:"option"},o,{ref:this.storeItemReference}),i(n,l({isHighlighted:t},a)))}}]),t}(u.Component);g.propTypes={sectionIndex:h.default.number,isHighlighted:h.default.bool.isRequired,itemIndex:h.default.number.isRequired,item:h.default.any.isRequired,renderItem:h.default.func.isRequired,renderItemData:h.default.object.isRequired,onMouseEnter:h.default.func,onMouseLeave:h.default.func,onMouseDown:h.default.func,onClick:h.default.func},t.default=g},function(e,t,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",
suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":
t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},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",suggestionHighlighted:"AutosuggestInput-suggestionHighlighted-3YxSr"}},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 y.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(6),h=n.n(p),f=n(12),v=n.n(f),g=n(1),m=(n.n(g),n(0)),y=n.n(m),b=n(7),I=n.n(b),S=n(325),M=n(3404),D=n(3406),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=I.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=I.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 y.a.createElement("div",{className:(n||"")+" "+(v&&r||"")+" "+(a&&i||""||""),ref:this.setDivRef,onClick:this.onClick},o.map(function(t,n){return y.a.createElement(d,h()({key:l(t)+"-"+n,index:n,tagCount:o.length,tag:t,
isDisabled:f,getTagDisplayValue:c,onRemove:e.onRemove},u))}),y.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}(m.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(20)),f=n(3405),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){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(6),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(3409),u=(n.n(c),n(1300)),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(P),o=-1!==n,l=e[0]===u&&A,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]!==P&&b.push(v),b.push(P,v),
m&&((void 0===T?"undefined":a(T))===h&&(m=m.slice(0,T)),b=b.concat(m)),!0===E&&e[n-1]===P&&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,P=void 0===O?c:O,j=t.decimalLimit,T=void 0===j?2:j,w=t.requireDecimal,E=void 0!==w&&w,x=t.allowNegative,A=void 0!==x&&x,N=t.allowLeadingZeroes,L=void 0!==N&&N,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(),P=O.substr(0,o).split(r),j=P.filter(function(e){return-1!==C.indexOf(e)}),T=j[j.length-1],w=p.map(function(e){return C[e]}),E=w.filter(function(e){return e===T}).length,x=j.filter(function(e){return e===T}).length,A=u.substr(0,u.indexOf(c)).split(r).filter(function(e,t){return e===T&&l[t]!==e
}).length,N=A+x+E,L=0,k=0;k<y;k++){var _=C[k];if(D=k+1,_===T&&L++,L>=N)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,P=D;P<C;P++)h[P]===d&&(O+=d);e=e.slice(0,D)+O+e.slice(D,m)}for(var j=e.split(o).map(function(e,t){return{char:e,isNew:t>=D&&t<C}}),T=m-1;T>=0;T--){var w=j[T].char;if(w!==d){w===h[T>=D&&y===I?T-S:T]&&j.splice(T,1)}}var E=o,x=!1;e:for(var A=0;A<b;A++){var N=h[A];if(N===d){
if(j.length>0)for(;j.length>0;){var L=j.shift(),k=L.char,_=L.isNew;if(k===d&&!0!==g){E+=d;continue e}if(t[A].test(k)){if(!0===v&&!1!==_&&c!==o&&!1!==s&&M){for(var R=j.length,z=null,U=0;U<R;U++){var B=j[U];if(B.char!==d&&!1===B.isNew)break;if(B.char===d){z=U;break}}null!==z?(E+=k,j.splice(z,1)):A--}else E+=k;continue e}x=!0}!1===g&&(E+=h.substr(A,b));break}E+=N}if(g&&!1===M){for(var F=null,V=0;V<E.length;V++)h[V]===d&&(F=V);E=null!==F?E.substr(0,F+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),P=r.selectionStart,j=t.previousConformedValue,T=void 0
;if((void 0===c?"undefined":l(c))===v){if(!1===(C=c(O,{currentCaretPosition:P,previousConformedValue:j,placeholderChar:I})))return;var w=(0,h.processCaretTraps)(C),E=w.maskWithoutCaretTraps,x=w.indexes;C=E,T=x,D=(0,h.convertMaskToPlaceholder)(C,I)}else C=c;var A={previousConformedValue:j,guide:d,placeholderChar:I,pipe:m,placeholder:D,currentCaretPosition:P,keepCharPositions:M},N=(0,p.default)(O,C,A),L=N.conformedValue,k=(void 0===m?"undefined":l(m))===v,_={};k&&(_=m(L,s({rawValue:O},A)),
!1===_?_={value:j,rejected:!0}:(0,h.isString)(_)&&(_={value:_}));var R=k?_.value:L,z=(0,u.default)({previousConformedValue:j,conformedValue:R,placeholder:D,rawValue:O,currentCaretPosition:P,placeholderChar:I,indexesOfPipedChars:_.indexesOfPipedChars,caretTrapIndexes:T}),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(53),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(227)),g=n(192),m=(n(52),
n(3413)),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()(g.a,{name:"unitValue",className:t,type:"number",value:this.state.inputValue,size:a,
onChange:this.onValueChange}),r()(v.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(20)),f=n(3),v=n(25),g=n(3415),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()(h.a,{className:m.a.remove,"aria-label":Object(f.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(f.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(){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},d.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(v.a)(a,o,s,l)})}function r(){return Object(o.createSelector)(function(e,t){return t.listType},function(e,t){return t.libraryDirectories},d.a,u.a,Object(s.a)(),l.a,Object(c.a)(),i(),function(e,t,n,i,r,a,o,s){var l=Object(h.a)(e,null,p.b,i),c={key:"folder"},u=Object(f.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(5),s=(n.n(o),n(199)),l=n(283),c=n(119),u=n(37),d=n(50),p=n(32),h=n(351),f=n(614),v=n(133),g=n(3419);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(193)),f=n(215),v=n(118),g=n(134),m=n(102),y=n(45),b=n(3),I=(n(32),n(146)),S=(n(62),n(422)),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(y.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,y=e.allListStyles,M=this.state.isTypesMenuOpen
;return r()(h.a,{},void 0,r()(g.a,{},void 0,r()(v.a,{id:this._typesMenuButtonID,title:Object(b.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()(v.a,{title:i||t.title,hasMenu:!1,to:a}),r()(v.a,{title:n}),r()(f.a,{},void 0,o)),r()(m.a,{},void 0,r()(I.a,{listType:s,listContext:l,selectedListStyle:c,allListStyles:y})))},t
}(p.Component);t.a=M},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.isFolder,b=e.isLibraryRefreshing,I=o||r.length;return s||p&&I?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,isFolder:y,isLibraryRefreshing:b}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=(n(89),n(140)),u=n(1255),d=n(3421);t.a=i},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,s=e.activeFilters,l=e.activeSort,b=e.listType,I=e.isFolder,S=e.isLibraryRefreshing,M=p.a[b];return r?a()(m.a,{title:Object(h.default)("There was an unexpected error loading this library")
}):c.a.isEmpty(s)?d.c.test(i)?a()(v.a,{serverEntityID:t,providerEntityID:n}):S?a()(g.a,{icon:M,title:Object(h.default)("Libraries are currently being updated"),description:Object(h.default)("Hang tight while we look for your content")}):a()(g.a,{icon:M,title:I?Object(h.default)("There are no items in this folder"):Object(h.default)("There are no items in this library")}):a()(g.a,{icon:M,title:Object(h.default)("The active filter has no matches"),
description:Object(h.default)("Use the menu above to change the active filter")},void 0,a()(u.a,{to:Object(f.a)({typeKey:o,sort:l}),kind:y.b.PRIMARY},void 0,Object(h.default)("Clear filter")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(7)),c=n.n(l),u=n(20),d=n(41),p=n(467),h=n(3),f=(n(89),n(256)),v=n(490),g=n(188),m=n(284),y=n(23);t.a=i},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(h.a)(),p.a,Object(o.a)(),Object(d.a)(),c.a,Object(u.a)(),Object(l.a)(),Object(v.a)(),Object(s.a)(),function(e,t,n,i,r,a,o,s,l,c,u,d,p){var h=Object(g.a)(e,t,f.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:u,selectedFilterTitle:d,selectedSort:p,listType:e,listStyle:n,allListStyles:h,
totalSize:c.totalSize}})}var r=n(11),a=n(5),o=(n.n(a),n(199)),s=n(612),l=n(234),c=n(283),u=n(119),d=n(350),p=n(37),h=n(34),f=n(32),v=n(1301),g=n(351),m=n(614),y=n(3423);t.a=Object(r.b)(i)(y.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(193)),f=n(215),v=n(118),g=n(134),m=n(102),y=n(45),b=n(27),I=n(3),S=(n(32),n(89),n(146)),M=n(846),D=n(416),C=n(488),O=(n(62),n(88),n(125),
n(1302)),P=n(1303),j=n(422),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.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(y.a)(),r._filtersMenuButtonID=Object(y.a)(),
r._sortsMenuButtonID=Object(y.a)(),r._typesMenuButtonID=Object(y.a)(),r}return u()(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,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,y=e.typeKey,b=e.activeFilters,T=e.activeFilterLabel,w=e.activeSort,E=e.activeLimit,x=e.metadataTypes,A=e.metadataPseudoTypes,N=e.selectedType,L=e.selectedFilterTitle,k=e.selectedSort,_=e.customFilter,R=e.totalSize,z=e.showSortsMenu,U=e.allListStyles,B=this.state,F=B.isDirectoriesMenuOpen,V=B.isFiltersMenuOpen,H=B.isTypesMenuOpen,Q=B.isSortsMenuOpen,Y=!c.isCloud&&!u.isLibraryProvider&&d.length>1,G=!!N&&N.filters.length>0,W=!!N&&x.length+A.length>0,K=!!(z&&k&&N.sorts.length>1)
;return r()(h.a,{},void 0,r()(g.a,{},void 0,Y&&r()(v.a,{id:this._directoriesMenuButtonID,title:p.title,hasMenu:!0,isMenuOpen:F,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),Y&&r()(C.a,{target:this._directoriesMenuButtonID,isOpen:F,server:c,provider:u,directories:d,selectedDirectory:p,onMenuClose:this.onDirectoriesMenuClose}),G&&r()(v.a,{id:this._filtersMenuButtonID,title:L,hasMenu:!0,isMenuOpen:V,onPress:this.onFiltersMenuButtonPress}),G&&r()(O.a,{serverEntityID:t,providerEntityID:n,
target:this._filtersMenuButtonID,isOpen:V,typeKey:y,activeFilters:b,activeFilterLabel:T,activeSort:w,selectedType:N,showCustomFilter:!!u.features.queryParser,onMenuClose:this.onFiltersMenuClose}),W&&r()(v.a,{id:this._typesMenuButtonID,title:N.title,hasMenu:x.length+A.length>1,isMenuOpen:H,onPress:this.onTypesMenuButtonPress}),W&&r()(j.a,{target:this._typesMenuButtonID,isOpen:H,types:x,pseudoTypes:A,activeFilters:b,activeSort:w,activeLimit:E,customFilter:_,selectedType:N,
onMenuClose:this.onTypesMenuClose}),K&&r()(v.a,{id:this._sortsMenuButtonID,title:Object(I.default)("By {sortTitle}",{sortTitle:k.title}),hasMenu:!0,isMenuOpen:Q,onPress:this.onSortsMenuButtonPress}),K&&r()(P.a,{target:this._sortsMenuButtonID,isOpen:Q,typeKey:y,activeFilters:b,activeFilterLabel:T,activeSort:w,activeLimit:E,customFilter:_,sorts:N.sorts,selectedSort:k,onMenuClose:this.onSortsMenuClose}),r()(f.a,{},void 0,R)),r()(m.a,{},void 0,r()(D.a,{serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,listType:a,selectedType:N,isLibraryList:!0}),r()(M.a,{selectedListStyle:l,allListStyles:U}),r()(S.a,{listType:a,listSubtype:o,listContext:s,selectedListStyle:l,allListStyles:U})))},t}(p.Component);T.defaultProps={showSortsMenu:!0},t.a=T},function(e,t,n){"use strict";function i(){return Object(o.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,s=l.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(s){var p=e.filter(function(e){return e.key===s.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(6),a=n.n(r),o=n(5),s=(n.n(o),n(7)),l=n.n(s),c=n(1287)},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(64)),f=n(56),v=n(380),g=(n(89),n(23)),m=n(3426),y=n(1285),b=n(3428),I=n.n(b),S={scrollDirection:g.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,P=e.onSearch,j=e.onMenuClose,T=this.state,w=T.isMeasured,E=T.filterOptionsHeight,x=!!c&&!p&&w;return r()(f.a,{target:t,isOpen:n,size:g.e.LARGE,scrollerProps:S,onMenuClose:Object(v.a)(O,j)},void 0,r()(h.a,{
className:(I.a.panesContainer||"")+" "+(x&&I.a.showFilterOptions||""||""),ignoreWidth:!0,ignorePosition:!0,ignoreTransforms:!0,onMeasure:this.onFiltersListMeasure},void 0,r()(y.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()(m.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:P})))},t}(p.Component);M.defaultProps={minHeight:385},t.a=M},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,d=e.filterOptions,b=e.filterOptionQuery,M=e.showError,D=e.showSearchInput,C=e.onFilterDeselect,O=e.onSearch,P=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()(c.a,{"data-qa-id":"previousFilters",onPress:C},void 0,a()(g.a,{className:I.a.backIcon,name:"plex-icon-hub-prev-560","aria-label":Object(v.default)("Back")})),a()("span",{className:I.a.filterText},void 0,s.title)),D&&a()(u.a,{className:I.a.searchInput,name:"filterOptionQuery",placeholder:Object(v.default)("Filter {filterTitle}",{filterTitle:s.title}),value:b,onChange:O})),S,a()(l.a,{
className:D?I.a.filterOptionsWithSearchScroller:I.a.filterOptionsScroller,autoScroll:!0},void 0,M&&a()("div",{className:I.a.emptyText},void 0,Object(v.default)("Unable to load options")),!M&&!d.length&&a()("div",{className:I.a.emptyText},void 0,Object(v.default)("No options")),d.map(function(e){var t=e.value,n=e.title,s=e.isSelected,l=decodeURIComponent(t);return a()(y.a,{className:I.a.filterOptionMenuItem,to:Object(m.a)({typeKey:i,filters:s?Object(f.a)(r,P,l):Object(p.a)(r,P,{value:l,type:h.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(71)),c=n(20),u=n(192),d=n(243),p=n(1286),h=n(285),f=n(1288),v=n(3),g=n(25),m=(n(89),n(256)),y=n(103),b=n(3427),I=n.n(b),S=a()(d.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.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:g.a.jumpBar,style:r},void 0,l.map(function(e,t){return u.a.createElement(f.a,a()({key:t},e,{onPress:i}))}))}var r=n(6),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(3430),p=n(44),h=n.n(p),f=n(3432),v=n(3434),g=n.n(v),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(7),a=n.n(r),o=n(3431)},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(7),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(20)),f=n(27),v=n(3433),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(f.a)(this,e,t)},t.prototype.render=function(){return r()(h.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){e.exports={jumpBar:"LibraryPageJumpBar-jumpBar-22VKU"}},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,p.a,Object(d.a)(),Object(c.a)(),Object(u.a)(),y.a,Object(m.a)(),h.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(b.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(v.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},onCloseTimelinePage:function(){e(g.a({}))}}}function a(e){var t=e.ui.timelinePage;return{serverEntityID:t.serverEntityID,
providerEntityID:t.providerEntityID,momentKey:t.momentKey}}function o(e,t){e(g.b({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,libraryKey:t.libraryKey,momentKey:t.momentKey})),e(g.c())}var s=n(11),l=n(5),c=(n.n(l),n(199)),u=n(3437),d=n(51),p=n(50),h=n(70),f=n(120),v=n(84),g=n(1305),m=n(389),y=n(74),b=n(133),I=n(3438),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(f.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(611)},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(64)),f=n(20),v=n(175),g=n(30),m=n(3),y=n(31),b=n(83),I=n(73),S=n(113),M=n(184),D=n(415),C=n(23),O=n(62),P=n(3439),j=n(3450),T=n(3452),w=n.n(T),E=r()(I.a,{},void 0,r()(y.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,y=e.libraryRoute,I=e.activeSelectionType,T=e.columnAdjustment,x=this.state,A=x.isMeasured,N=x.width,L=x.height,k=x.currentMomentTitle,_=200-100*T,R=12+T,z=Math.min(Math.ceil(N/_),R);return u?r()(b.a,{metricsPage:g.F,metricsProperties:{
identifier:i,mode:"timeline",type:"photo",style:O.b},allowBackgroundLightPreset:!0,scrollDirection:C.d.NONE},void 0,I?r()(D.a,{serverEntityID:t,providerEntityID:n}):r()(j.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:l,metadataTypes:s,libraryRoute:y,libraryDirectories:o,title:k,selectedDirectory:a}),r()(h.a,{className:w.a.measured,ignorePosition:!0,onMeasure:this.onMeasure},void 0,A&&r()(P.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:l,moments:p,columns:z,height:L,
onMomentScrollIndexChange:this.onMomentScrollIndexChange}))):c?E:d?r()(M.a,{title:Object(m.default)("There was an unexpected error loading this library")}):r()(S.a,{title:Object(m.default)("There was an error loading the timeline for this library"),description:Object(m.default)("The photos timeline requires Plex Media Server {version} or higher",{version:v.a.itemClusters})},void 0,r()(f.a,{to:y,kind:C.b.PRIMARY},void 0,Object(m.default)("Browse by Type")))},t}(p.Component);t.a=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),n(7)),f=n.n(h),v=n(467),g=n(3),m=n(1306),y=n(1308),b=n(1312),I=n(140),S=n(188),M=n(1313),D=n(44),C=n.n(D),O=n(3449),P=n.n(O),j=Math.max(0,parseInt(C.a.timelineGutter,10)-40),T=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=f.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:P.a.container},void 0,r()(b.a,{className:P.a.stack,
scrollerClassName:P.a.scroller,serverEntityID:t,providerEntityID:n,metadataListEntityID:i,scrollPositionStorageKey:"TimelinePageContent",keyPropName:"id",items:a,size:a.length,columns:o,footerHeight:59,listPadding:55,listGutter:j,hasNestedList:!0,cellComponent:y.a,onListScrollIndexChange:l,onListUpdate:this.onListUpdate}),r()("div",{className:P.a.adornment},void 0,u&&h&&r()(m.a,{pixelProportion:p,ticks:u}))):r()(I.a,{},void 0,r()(S.a,{icon:v.a.photo,
title:Object(g.default)("There are no events in this library")}))},t}(p.Component);t.a=T},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(7),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){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(87)),f=n(210),v=n(137),g=n(383),m=n(1309),y=n(1310),b=n(1311),I=n(138),S=n(3446),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(b.a)({aspectRatios:e.aspectRatios,columns:e.columns});return Object(y.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(I.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:a},m.a)},t.prototype.render=function(){
var e=this.props,t=e.className,n=e.cellX,i=e.cellY,a=e.cellWidth,o=e.cellHeight,s=e.title,l=e.items,c=e.size,u=e.viewportHeight,d=e.scrollTop,p=e.isSelected,v=e.hasSelection,m=this.state,y=m.layout,b=m.cellRenderer;return r()(h.a,{className:t,cellX:n,cellY:i,cellWidth:a,cellHeight:o},void 0,r()("div",{className:(v&&M.a.hasSelection||"")+" "+(M.a.header||"")},void 0,r()("div",{className:M.a.actions},void 0,r()(g.a,{className:M.a.selectButton,title:s,isSelected:p,onPress:this.onSelectPress
})),r()("div",{className:M.a.title},void 0,s)),r()(f.a,{items:l,keyPropName:"metadataItemEntityID",size:c,cellRenderer:b,viewportWidth:a,viewportHeight:u,scrollTop:d-i,layout:y}))},t}(p.Component);D.defaultProps={headerHeight:0,footerHeight:0},t.a=Object(v.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(87)),f=n(27),v=n(25),g=n(137),m=n(346),y=n(599),b=n(44),I=n.n(b),S=n(3445),M=n.n(S),D=parseInt(I.a.mosaicCellPadding,10),C=r()(v.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(f.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,f=e.cellWidth,v=e.cellHeight,g=e.showOffscreenPlaceholder,b=e.selectionType,I=e.activeSelectionType,S=e.isSelected,O=e.onSelectItem,P=e.onDeselectItem,j="clip"===l,T="photoalbum"===l,w=!s,E=f-2*D,x=v-2*D;return r()(h.a,{cellX:d,cellY:p,cellWidth:f,cellHeight:v},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,w&&r()(y.a,{imageWidth:E,imageHeight:x,isSelected:S}),!w&&r()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,containerKey:a,listType:o,metadataKey:s,type:l,imageUrl:u,imageWidth:E,imageHeight:x,selectionType:b,activeSelectionType:I,isSelected:S,isOffscreen:g,onSelectItem:O,onDeselectItem:P}),j&&r()("div",{className:M.a.badge},void 0,C),T&&r()("div",{className:M.a.title},void 0,c)))))},t
}(p.Component);t.a=Object(g.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,n){"use strict";var i=n(6),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(209),v=n(3448),g=n(138),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(v.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(f.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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(841)},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,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.libraryDirectories},Object(c.a)(),l.a,Object(o.a)(),Object(s.a)(),function(e,t,n,i,r){var a={key:"timeline"},o=Object(u.a)({type:"photo",server:t,provider:n,libraryKey:i,libraryDirectories:e});return{listType:"photo",listStyle:d.b,totalSize:r.totalSize,libraryKey:i,metadataPseudoTypes:o,selectedType:a,
allListStyles:[d.b]}})}var r=n(11),a=n(5),o=(n.n(a),n(199)),s=n(119),l=n(37),c=n(34),u=n(614),d=n(62),p=n(3451);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(193)),f=n(215),v=n(118),g=n(134),m=n(102),y=n(45),b=n(3),I=n(146),S=n(846),M=n(416),D=n(422),C=(n(62),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(y.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,y=e.allListStyles,C=this.state.isTypesMenuOpen
;return r()(h.a,{},void 0,r()(g.a,{},void 0,r()(v.a,{id:this._typesMenuButtonID,title:Object(b.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()(v.a,{title:s}),r()(f.a,{},void 0,l)),r()(m.a,{},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:a,isLibraryList:!0}),r()(S.a,{
selectedListStyle:o,allListStyles:y}),r()(I.a,{selectedListStyle:o,allListStyles:y})))},t}(p.Component));t.a=C},function(e,t){e.exports={measured:"TimelinePage-measured-3JDcK"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(67)),s=n(80),l=n(38),c=n(43),u=n(105),d=n(46),p=n(286),h=n(1252),f=n(145),v=d.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params||{},i=s.a,a=Object(l.a)(c.m,i),d=Object(l.a)(c.k,t,a);return r()(u.a,{metricsContext:n.context
},void 0,r()(o.a,{},void 0,r()(f.a,{selectedProviderEntityID:d}),r()(p.a,{serverEntityID:a,providerEntityID:d},void 0,r()(h.a,{machineIdentifier:i,serverEntityID:a,providerEntityID:d,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(3455),r=n(396),a=n.n(r),o=i.a.extend({className:"container",template:a.a});t.a=o},function(e,t,n){"use strict";var i=n(3),r=n(395),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(3457),r=n(396),a=n.n(r),o=i.a.extend({className:"container",template:a.a});t.a=o},function(e,t,n){"use strict";var i=n(3),r=n(395),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(3),r=n(3459),a=n(396),o=n.n(a),s=r.a.extend({className:"container",template:o.a,serializeData:function(){
return{title:Object(i.default)("You don't have any media servers yet."),subtitle:Object(i.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(395),r=i.a.extend({});t.a=r},function(e,t,n){"use strict";var i=n(3461),r=n(396),a=n.n(r),o=i.a.extend({className:"container",template:a.a});t.a=o},function(e,t,n){"use strict";var i=n(3),r=n(395),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(3463),r=n(396),a=n.n(r),o=i.a.extend({className:"container",template:a.a});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(18),o=n(3),s=n(395),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(o.default)("Plex is down for maintenance."),t=Object(o.default)("Don't worry, it'll be back soon.")):(e=Object(o.default)("Plex is not reachable."),t=Object(o.default)("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(e=Object(o.default)("Server unavailable."),
t=i?Object(o.default)("We couldn't reach \"{1}\". Make sure it's online and try again.",r.a.escape(i)):Object(o.default)("We couldn't reach this server. Make sure it's online and try again.")),{title:e,subtitle:t}},onResolvedChange:function(e,t){t&&a.a.trigger("navigate:refresh")}});t.a=l},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(67)),s=n(80),l=n(38),c=n(43),u=n(46),d=n(286),p=n(3465),h=n(145),f=r()(p.a,{}),v=u.a.extend({component:function(e){
var t=e.selectedProviderID,n=s.a,i=Object(l.a)(c.m,n),a=Object(l.a)(c.k,t,i);return r()(o.a,{},void 0,r()(h.a,{selectedProviderEntityID:a}),r()(d.a,{serverEntityID:i,providerEntityID:a},void 0,f))}});t.a=v},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(Object(I.a)(),Object(b.a)(g.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(5),g=(n.n(v),n(60)),m=n(314),y=n(847),b=n(487),I=n(51),S=n(3466),M={dispatchFetchProviderSettings:y.c,dispatchUpdateProviderSetting:y.f,dispatchClearProviderSettingUpdateError:y.b,dispatchClearProviderSettingFetchError:y.a,dispatchPopulateSettingsOptions:y.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===m.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(1),p=(n.n(d),n(0)),h=n.n(p),f=n(30),v=n(3),g=n(31),m=n(73),y=n(230),b=n(229),I=n(1314),S=n(1315),M=r()(m.a,{},void 0,r()(g.a,{})),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onTogglePress=function(e){
r.props.updateError&&r.props.onUpdateErrorDismiss(),r.state.openSettingID===e?r.setState({openSettingID:null}):(r.props.onSettingViewDetail(e),r.setState({openSettingID:e}))},r.state={openSettingID:null,isUpdatePendingFromStore:n.isUpdatePending},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){var n={isUpdatePendingFromStore:e.isUpdatePending};return!t.isUpdatePendingFromStore||e.isUpdatePending||e.updateError||(n.openSettingID=null),n},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.onOptionsFetchErrorDismiss,c=this.state.openSettingID;return n?M:r()(y.a,{metricsPage:f.T,metricsPane:"settings"},void 0,r()(b.a,{},void 0,Object(v.default)("Personalize")),i.map(function(t){return t.hidden?null:r()(S.a,{title:t.label,setting:t,isOpen:c===t.id,isUpdating:a,updateError:o,onTogglePress:e.onTogglePress,onUpdateSetting:s,onOptionsFetchErrorDismiss:l
},t.id,h.a.createElement(I.a,t))}))},t}(p.Component);t.a=D},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(330)),c=n(206),u=n(384),d=n(142),p=n(165),h=n(3468),f=n.n(h),v=Object(p.a)(l.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(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),
n(7)),v=n.n(f),g=n(206),m=n(384),y=n(142),b=n(227),I=n(165),S=n(3),M=n(1300),D=n(3470),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?v.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,h=this._countryHasPostalCode(c,i);return r()(g.a,{},void 0,r()(y.a,{name:"country"},void 0,t),n&&r()(m.a,{className:C.a.help},void 0,n),r()(b.a,{name:"country",value:c,values:this._getSelectInputValues(i),isDisabled:p,onChange:this.onCountryChange}),h&&r()(y.a,{name:"postalCode",
hasError:a,className:C.a.secondaryLabel},void 0,Object(S.default)("Postal Code"),a&&d&&" \u2014 "+d),h&&r()(M.a,{mask:this._getPostalCodeMask(c,i),name:"postalCode",value:u,isDisabled:p,hasError:a,onBlur:s,onChange:this.onPostalCodeChange}))},t}(h.Component);p.a.shape({country:p.a.string.isRequired,postalCode:p.a.string});t.a=Object(I.a)(O)},function(e,t){e.exports={help:"LocationSettingInputGroup-help-3KxH7 FormHelp-help-3VCuq",
secondaryLabel:"LocationSettingInputGroup-secondaryLabel-1RrMc FormLabel-label-2aLJ9"}},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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(287);t.a=i},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(287),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 u.a.createElement(p.a,a()({closedNode:Object(d.default)("{1} selected",t.selectedCount),showSpinner:t.isOptionsPending},n))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3),p=n(287);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(15)),s=n(80),l=n(38),c=n(105),u=n(224),d=n(46),p=n(617),h=n(288),f=n(169),v=n(1318),g=n(170),m=r()(g.a,{}),y=d.a.extend({initialize:function(e){o.c("appModel").set("activeNavigationType",e.navigationType)},component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params,a=void 0===i?{}:i,o=Object(l.a)(u.SERVER,t),d=Object(l.a)(u.PROVIDER,n,o),g=r()(v.a,{serverEntityID:o,providerEntityID:d,listKey:a.key,listTitle:a.title,listType:a.type,
listSubtype:a.subtype});return r()(c.a,{metricsContext:a.context},void 0,r()(f.a,{},void 0,m,t===s.a?r()(p.a,{providerEntityID:d},void 0,g):r()(h.a,{serverEntityID:o},void 0,g)))}});t.a=y},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.hasProvider,i=e.showSpinner,r=e.showError;return i?p:r?h:n?a()(s.Fragment,{},void 0,t):f}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(73),u=n(282),d=n(184),p=a()(c.a,{},void 0,a()(l.a,{})),h=a()(d.a,{}),f=a()(u.a,{});t.a=i
},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.hasServer,i=e.showSpinner,r=e.machineIdentifier,o=e.friendlyName,s=e.isUnauthorized,l=e.isUnavailable,u=e.isInstallingServerUpdate,p=e.hasHttpsConnections,v=e.isHostedHttps;return i?g:n?u?a()(f.a,{friendlyName:o}):l?v&&!p?a()(h.a,{serverEntityID:e.serverEntityID}):a()(d.a,{friendlyName:o}):s?y:a()(c.a,{machineIdentifier:r},void 0,t):m}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(1317),u=n(738),d=n(739),p=n(73),h=n(740),f=n(741),v=n(282),g=a()(p.a,{},void 0,a()(l.a,{})),m=a()(v.a,{}),y=a()(u.a,{});t.a=i},function(e,t){e.exports={container:"TypeFirstPage-container-3eSc0 FullPage-container-17Y0c"}},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.sourceDirectory,o=e.listKey,l=e.listTitle,c=e.listType,y=e.listSubtype,b=e.activeSelectionType;return s()(f.a,{metricsPage:p.J,
allowBackgroundLightPreset:!0,scrollDirection:d.NONE},void 0,b?s()(v.a,{serverEntityID:t,providerEntityID:n}):s()(m.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,sourceDirectory:r,listTitle:l,listType:c,listSubtype:y}),u.a.createElement(h.a,a()({component:g.a,initialSize:50,shouldResetOnUnmount:!0,containerKey:o,containerTitle:l,listType:c,listSubtype:y},e)))}var r=n(6),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(54),p=n(30),h=n(127),f=n(83),v=n(492),g=(n(93),
n(1319)),m=n(3488);t.a=i},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()(y.a,{className:S.a.multiSelectPageHeader},void 0,s()(f.a,{},void 0,s()("div",{className:S.a.selectedTitle},void 0,s()(m.a,{name:"plex-icon-selected-560",className:S.a.icon}),1===t?Object(g.default)("1 item selected"):Object(g.default)("{selectedItemsCount} items selected",{
selectedItemsCount:t})),s()(h.a,{className:S.a.deselectLink,onPress:i},void 0,s()(m.a,{name:"plex-icon-remove-560",className:S.a.icon}),Object(g.default)("Deselect All"))),s()(v.a,{},void 0,p.a.createElement(n,a()({selectedItemsCount:t},r))))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(20),f=n(134),v=n(102),g=n(3),m=n(25),y=n(217),b=n(1254),I=n(3486),S=n.n(I);i.defaultProps={toolbarComponent:b.a,allowRedirectOnDelete:!1},t.a=i},function(e,t){
e.exports={pageHeader:"TypeFirstPageHeader-pageHeader-3yLq-"}},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-2x7d0 TypeFirstPageHeader-pageHeader-3yLq-",selectedTitle:"MultiSelectPageHeader-selectedTitle-fT_hg",deselectLink:"MultiSelectPageHeader-deselectLink-3Xa4S",icon:"MultiSelectPageHeader-icon-PxQ99"}},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-1cRCV PageContent-pageContent-16mK6",
metadataListScroller:"MetadataListPageContent-metadataListScroller-3LU9d",hasGutter:"MetadataListPageContent-hasGutter-DThBJ",attribution:"MetadataListPageContent-attribution-3PHIb"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{totalSize:e.totalSize}})}var r=n(11),a=n(5),o=(n.n(a),n(119)),s=n(3489);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.metadataListEntityID,r=e.sourceDirectory,o=e.listTitle,s=e.listType,v=e.listSubtype,m=e.totalSize,I=e.isLibraryList,S=r?f.a:u.a;return a()(p.a,{},void 0,a()(S,{serverEntityID:t,providerEntityID:n,sourceDirectory:r},void 0,a()(c.a,{title:o,hasMenu:!1,isSelected:!0}),a()(l.a,{},void 0,m)),a()(d.a,{},void 0,a()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:s,listSubtype:v,isLibraryList:I}),a()(h.a,{className:y.a.divider
}),b))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(215)),c=n(118),u=n(134),d=n(102),p=n(217),h=n(493),f=n(289),v=n(146),g=n(416),m=(n(93),n(3502)),y=n.n(m),b=a()(v.a,{});t.a=i},function(e,t){e.exports={pageHeaderDivider:"TypeFirstPageHeaderDivider-pageHeaderDivider-3oGvs"}},function(e,t,n){"use strict";function i(e){var t=e.sourceDirectory,n=e.onPress,i=e.onCancelScanLibraryPress,r=e.onScanLibraryPress,a=e.onSharePress,o=e.onEditLibraryPress
;return f()(g.Fragment,{},void 0,t.refreshing?f()(S.a,{onPress:Object(M.a)(n,i)},void 0,Object(C.default)("Cancel Scan")):f()(S.a,{onPress:Object(M.a)(n,r)},void 0,Object(C.default)("Scan Library Files")),f()(S.a,{onPress:Object(M.a)(n,a)},void 0,Object(C.default)("Share...")),f()(S.a,{onPress:Object(M.a)(n,o)},void 0,Object(C.default)("Edit Library...")))}function r(e){var t=e.machineIdentifier,n=e.isGuideRefreshing,i=e.onPress,r=e.onCancelRefreshGuidePress,a=e.onRefreshGuidePress
;return f()(g.Fragment,{},void 0,f()(S.a,{to:Object(j.a)(t,"manage","dvr"),onPress:i},void 0,Object(C.default)("Settings")),n?f()(S.a,{onPress:Object(M.a)(i,r)},void 0,Object(C.default)("Cancel Refresh")):f()(S.a,{onPress:Object(M.a)(i,a)},void 0,Object(C.default)("Refresh Guide")))}var a=n(12),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(2),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(114),b=n(134),I=n(56),S=n(101),M=n(380),D=n(45),C=n(3),O=n(25),P=n(3492),j=(n(93),n(88),
n(176)),T=n(3501),w=n.n(T),E=f()(O.a,{name:"plex-icon-settings-560"}),x=function(e){function t(n,i){l()(this,t);var r=u()(this,e.call(this,n,i));return r.onSettingsMenuButtonPress=function(e){r.setState({isSettingsMenuOpen:!r.state.isSettingsMenuOpen})},r.onSettingsMenuClose=function(){r.setState({isSettingsMenuOpen:!1})},r.state={isSettingsMenuOpen:!1},r._settingsMenuButtonID=Object(D.a)(),r}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=(e.machineIdentifier,
e.provider),a=e.hasProviderSettings,s=e.hasLibraryActions,l=e.hasDVRActions,c=(e.isGuideRefreshing,e.onScanLibraryPress,e.onCancelScanLibraryPress,e.onSharePress,e.onEditLibraryPress,e.onRefreshGuidePress,e.onCancelRefreshGuidePress,
o()(e,["children","machineIdentifier","provider","hasProviderSettings","hasLibraryActions","hasDVRActions","isGuideRefreshing","onScanLibraryPress","onCancelScanLibraryPress","onSharePress","onEditLibraryPress","onRefreshGuidePress","onCancelRefreshGuidePress"])),u=c.sourceDirectory,d=this.state.isSettingsMenuOpen,p=s||l,h="#!/provider/"+encodeURIComponent(n.identifier)+"/settings";return f()(b.a,{},void 0,u?f()("div",{className:w.a.container},void 0,f()("div",{
className:w.a.sourceSelectContainer},void 0,m.a.createElement(P.a,c)),a||p?f()(y.a,{id:this._settingsMenuButtonID,className:w.a.settingsButton,tooltip:p?null:Object(C.default)("Personalize"),to:p?null:h,onPress:p?this.onSettingsMenuButtonPress:null},void 0,E):null,f()(I.a,{target:this._settingsMenuButtonID,isOpen:d,onMenuClose:this.onSettingsMenuClose},void 0,a?f()(S.a,{to:h
},void 0,Object(C.default)("Personalize")):null,s?m.a.createElement(i,this.props):null,l?m.a.createElement(r,this.props):null)):null,t)},t}(g.Component);t.a=x},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(S.a,Object(D.a)(),function(e,t){var n=[],i=[],r=null;return t.forEach(function(e){e.isSelected&&(r=e),e.isUnknownUnavailableServer?i.push(e):n.push(e)}),{sources:n,unknownServers:i,selectedSource:r,isCloudServerConnected:e.isConnected}})}
var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(265)),I=n(100),S=n(394),M=n(68),D=n(3493),C=(n(93),n(3494)),O={dispatchDiscoverServers:M.b,dispatchTestServers:I.r,dispatchFetchCloudProviders:b.a,dispatchSaveLastTypeSource:M.m},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.onSourceMenuOpen=function(){i.props.isCloudServerConnected&&(i.props.dispatchDiscoverServers(),i.props.dispatchFetchCloudProviders()),i.props.dispatchTestServers()},i.onSourceSelect=function(e){i.props.dispatchSaveLastTypeSource({navigationType:e.navigationType,machineIdentifier:e.machineIdentifier,providerIdentifier:e.providerIdentifier,directoryKey:e.directoryHubKey||e.directoryKey})},r=n,d()(i,r)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=(e.isCloudServerConnected,
e.dispatchDiscoverServers,e.dispatchTestServers,e.dispatchFetchCloudProviders,e.dispatchSaveLastTypeSource,s()(e,["isCloudServerConnected","dispatchDiscoverServers","dispatchTestServers","dispatchFetchCloudProviders","dispatchSaveLastTypeSource"]));return g.a.createElement(C.a,a()({},t,{onSourceMenuOpen:this.onSourceMenuOpen,onSourceSelect:this.onSourceSelect}))},t}(v.Component);t.a=Object(m.b)(i,O)(P)},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 m.a.apply(void 0,["source"].concat(t))}function r(e,t,n,i){var r=Object(y.a)(e,t,n);return c.join(r,{source:i})}function a(e,t){return{key:i(e,t.machineIdentifier),serverEntityID:t.entityID,title:t.friendlyName,detail:t.sourceTitle,isUnknownUnavailableServer:!0,isUnavailable:!0,isSelected:!1}}function o(e){
var t=e.navigationType,n=e.sourceServer,a=e.sourceProvider,o=e.sourceDirectory,s=e.selectedServerEntityID,l=e.selectedProviderEntityID,c=e.selectedSourceDirectory,u=s===n.entityID&&l===a.entityID,d=!!(t===h.a||o.hubKey&&o.hubKey===c.hubKey||o.key&&o.key===c.key),f=o.hubKey||o.key,v={key:i(t,n.machineIdentifier,a.identifier,o.hubKey||o.key),navigationType:t,serverEntityID:n.entityID,machineIdentifier:n.machineIdentifier,providerEntityID:a.entityID,providerIdentifier:a.identifier,
directoryKey:o.key,directoryHubKey:o.hubKey,title:o.title,isLocal:n.isConnected&&n.activeConnection&&n.activeConnection.isPrivate,isUnavailable:n.isUnavailable,isOutOfDate:n.isOutOfDate,isSelected:u&&d};return n.isCloud?(v.isCloud=!0,v.route=r(t,n,a,f)):(t===h.a&&(v.title=Object(p.default)("Live TV & DVR")),v.detail=n.isFullOwnedServer?n.friendlyName:n.sourceTitle,v.route=r(t,n,a,f)),v}function s(){return Object(l.createSelector)(function(e,t){return t.serverEntityID},function(e,t){
return t.providerEntityID},function(e,t){return t.sourceDirectory},f.a,Object(u.a)(),function(e,t,n,i,r){var s=Object(v.a)(r,n);return s?i.reduce(function(i,r){var l=r.server,c=r.provider;if(!c)return!l.isCloud&&l.isUnavailable&&i.push(a(s.key,l)),i;var u=Object(d.a)(c);return u&&u.directories&&u.directories.forEach(function(r){if(Object(g.a)(s,c,r)){(s.key!==h.a||!(!r.hubKey||r.key))&&i.push(o({navigationType:s.key,sourceServer:l,sourceProvider:c,sourceDirectory:r,selectedServerEntityID:e,
selectedProviderEntityID:t,selectedSourceDirectory:n}))}}),i},[]):[]})}t.a=s;var l=n(5),c=(n.n(l),n(19)),u=n(51),d=n(397),p=n(3),h=n(195),f=n(466),v=n(591),g=n(563),m=n(974),y=n(484)},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(3495),v=n(3499),g=(n(619),function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onSourceMenuButtonPress=function(){var e=r.state.isSourceMenuOpen
;r.setState({isSourceMenuOpen:!e},function(){e||r.props.onSourceMenuOpen()})},r.onSourceMenuClose=function(){r.setState({isSourceMenuOpen:!1})},r.state={isSourceMenuOpen:!1},r._sourceMenuButtonID=Object(h.a)(),r}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.sources,n=e.unknownServers,i=e.selectedSource,a=e.onSourceSelect,o=this.state.isSourceMenuOpen,s=t.length>1||n.length>1;return r()(p.Fragment,{},void 0,i?r()(v.a,{id:this._sourceMenuButtonID,source:i,hasMenu:s,
isMenuOpen:o,onPress:this.onSourceMenuButtonPress}):null,s?r()(f.a,{target:this._sourceMenuButtonID,sources:t,unknownServers:n,isOpen:o,onMenuClose:this.onSourceMenuClose,onSourceSelect:a}):null)},t}(p.Component));t.a=g},function(e,t,n){"use strict";function i(e){var t=e.sources,n=e.onSourceSelect;return t.map(function(e){return s()(h.a,{source:e,isSelected:e.isSelected,onSourceSelect:n},e.key)})}function r(){return s()("div",{className:m.a.menuDivider
},void 0,Object(p.default)("Unavailable servers"))}function a(e){var t=e.target,n=e.sources,r=e.unknownServers,a=e.isOpen,o=e.onMenuClose,l=e.onSourceSelect;return s()(u.a,{className:m.a.menu,target:t,isOpen:a,scrollerProps:I,maxHeight:b,onMenuClose:o},void 0,s()(i,{sources:n,onSourceSelect:l}),r.length>0?S:null,s()(i,{sources:r}))}var o=n(2),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(56)),d=n(54),p=n(3),h=n(3496),f=(n(619),
n(44)),v=n.n(f),g=n(3498),m=n.n(g),y=parseInt(v.a.sourceMenuItemHeight,10),b=8*y,I={scrollDirection:d.VERTICAL,autoScroll:!0},S=s()(r,{});t.a=a},function(e,t,n){"use strict";function i(e){return e.isUnavailable?Object(g.default)("Offline"):e.isOutOfDate?Object(g.default)("Needs Update"):null}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(72)),v=n(101),g=n(3),m=n(25),y=(n(619),n(3497)),b=n.n(y),I=a()(f.b,{}),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.onPress=function(){i.props.onSourceSelect&&i.props.onSourceSelect(i.props.source)},r=n,c()(i,r)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.source,n=e.isSelected,r=void 0,o=void 0;t.detail?(r=t.detail,o=i(t)):r=i(t);var s=t.isUnavailable||t.isOutOfDate,l=!t.isLocal&&!t.isCloud&&!t.isUnavailable;return a()(v.a,{
className:(b.a.menuItem||"")+" "+(n&&b.a.isSelected||""||""),to:t.route,onPress:this.onPress},void 0,a()("div",{className:b.a.itemContainer},void 0,a()("div",{className:b.a.titleContainer},void 0,a()("div",{className:b.a.title},void 0,t.title,l?a()(m.a,{className:b.a.titleIcon,name:"plex-icon-source-remote-560","aria-label":Object(g.default)("Remote server")}):null),a()("div",{className:b.a.details},void 0,r,r&&o?I:null,o)),a()("div",{className:b.a.statusIconContainer},void 0,n?a()(m.a,{
name:"plex-icon-selected-560",className:(b.a.statusIcon||"")+" "+(b.a.selectedIcon||""),"aria-label":Object(g.default)("Selected")}):null,s?a()(m.a,{className:(b.a.statusIcon||"")+" "+(b.a.alertIcon||""),name:"plex-icon-alert-560"}):null)))},t}(h.Component);t.a=S},function(e,t){e.exports={menuItem:"SourceMenuItem-menuItem-P6XUA",isSelected:"SourceMenuItem-isSelected-3drRU",isDisabled:"SourceMenuItem-isDisabled-11uWR",itemContainer:"SourceMenuItem-itemContainer-255E9",
titleContainer:"SourceMenuItem-titleContainer-N05uh",title:"SourceMenuItem-title-tx5KZ",titleIcon:"SourceMenuItem-titleIcon-33P-u",details:"SourceMenuItem-details-12bMw",statusIconContainer:"SourceMenuItem-statusIconContainer-1MpFZ",statusIcon:"SourceMenuItem-statusIcon--B--Q",selectedIcon:"SourceMenuItem-selectedIcon-26-YT",alertIcon:"SourceMenuItem-alertIcon-CLd1S"}},function(e,t){e.exports={menu:"SourceMenu-menu-1Y5lo MenuContainer-menu-2OAQT",menuDivider:"SourceMenu-menuDivider-22AnD"}
},function(e,t,n){"use strict";function i(e){var t=e.id,n=e.source,i=e.hasMenu,r=e.isMenuOpen,o=e.onPress;return a()(c.a,{id:t,className:p.a.link,to:i?null:n.route,onPress:i?o:null},void 0,a()("div",{className:p.a.titleContainer},void 0,a()("div",{className:p.a.title},void 0,n.title),i?a()(l.a,{direction:r?u.UP:u.DOWN,isSelected:!0}):null),a()("div",{className:p.a.details},void 0,n.detail))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(385)),c=n(20),u=n(226),d=(n(619),n(3500)),p=n.n(d)
;t.a=i},function(e,t){e.exports={titleContainer:"SourceMenuButton-titleContainer-1r1az",title:"SourceMenuButton-title-2Xq0C",details:"SourceMenuButton-details-37DsR",link:"SourceMenuButton-link-1oZH2 Link-link-2n0yJ"}},function(e,t){e.exports={container:"SourceSelectPageHeaderLeft-container-3GqPL",sourceSelectContainer:"SourceSelectPageHeaderLeft-sourceSelectContainer-3BFM6",settingsButton:"SourceSelectPageHeaderLeft-settingsButton-27AX7 ToolbarButton-toolbarButton-2i2nn"}},function(e,t){
e.exports={divider:"MetadataListPageHeader-divider-3K7mX TypeFirstPageHeaderDivider-pageHeaderDivider-3oGvs"}},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(338)),a=n(195),o=n(466),s=n(1321),l=Object(i.createSelector)(Object(r.a)("hasAttemptedPopulateAllProviders"),s.a,o.a,function(e,t,n){return e||t?a.l.reduce(function(e,t){var i=Object(a.n)(t);return i&&Object(a.o)(i,n)&&e.push({key:i.key,title:i.title,to:"#!/"+i.key}),e},[]):null});t.a=l},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(743)),f=n(207),v=n(3),g=n(31),m=n(242),y=n(23),b=n(3505),I=n(3507),S=n.n(I),M=r()(g.a,{}),D=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return r.onMouseEnter=function(){r.resetExpandTimeout()},r.onMouseLeave=function(){r.clearSetExpandedTimeout(),r.setState({isExpanded:!1})},r.onMouseMove=function(){r.resetExpandTimeout()},r.onShowShortcutsPress=function(){
r.props.isSidebarExpandable&&(r.clearSetExpandedTimeout(),r.setState({isExpanded:!0}))},r.onToggleExpandablePress=function(){r.clearSetExpandedTimeout(),r.setState({isExpanded:!r.props.isSidebarExpandable},r.props.onToggleExpandableSidebar)},r.state={isExpanded:!1},r}return u()(t,e),t.prototype.componentWillUnmount=function(){this.clearSetExpandedTimeout()},t.prototype.clearSetExpandedTimeout=function(){this._setExpandedTimeoutID&&(clearTimeout(this._setExpandedTimeoutID),
this._setExpandedTimeoutID=null)},t.prototype.resetExpandTimeout=function(){var e=this;this.clearSetExpandedTimeout(),this._setExpandedTimeoutID=setTimeout(function(){return e.setState({isExpanded:!0})},250)},t.prototype.render=function(){var e=this.props,t=e.types,n=e.shortcuts,i=e.isSidebarExpandable,a=this.state.isExpanded&&i;return t?r()(p.Fragment,{},void 0,r()("div",{className:S.a.sidebarUnderlay}),r()("div",{className:a?S.a.expandedSidebar:S.a.sidebar,
onMouseEnter:i?this.onMouseEnter:null,onMouseLeave:i?this.onMouseLeave:null,onMouseMove:i?this.onMouseMove:null},void 0,r()(h.a,{},void 0,r()(b.a,{types:t,shortcuts:n,isExpanded:a,isExpandable:i,onShowShortcutsPress:this.onShowShortcutsPress})),r()("div",{className:S.a.footer},void 0,r()(f.a,{component:m.a,className:S.a.toggleMenuButton,icon:i?"plex-icon-sidebar-mode-collapse-560":"plex-icon-sidebar-mode-auto-560",tooltip:Object(v.default)("Toggle Menu"),tooltipAttachment:y.f.MIDDLE_RIGHT,
ariaLabel:Object(v.default)("Toggle Menu"),onPress:this.onToggleExpandablePress})))):r()(p.Fragment,{},void 0,r()("div",{className:S.a.sidebarUnderlay}),r()("div",{className:S.a.sidebarLoading},void 0,M))},t}(p.Component);t.a=D},function(e,t,n){"use strict";function i(e){switch(e.key){case m.c:return"plex-icon-sidebar-movies-560";case m.h:return"plex-icon-sidebar-shows-560";case m.d:return"plex-icon-sidebar-music-560";case m.f:return"plex-icon-sidebar-photos-560";case m.i:
return"plex-icon-sidebar-videos-560";case m.a:return"plex-icon-sidebar-live-dvr-560";case m.e:return"plex-icon-sidebar-news-560";case m.g:return"plex-icon-sidebar-podcasts-560";case m.j:return"plex-icon-sidebar-webshows-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(207)),v=n(27),g=n(3),m=n(195),y=n(194),b=n(560),I=n(23),S=n(3506),M=n.n(S),D=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.types,n=e.shortcuts,r=e.isExpanded,o=e.isExpandable,s=e.onShowShortcutsPress,l=n.length>0;return a()("div",{className:r?M.a.expandedSidebarContent:M.a.sidebarContent},void 0,t.map(function(e){return a()(f.a,{component:y.a,className:M.a.navigationTypeLink,iconClassName:M.a.icon,titleClassName:M.a.navigationTypeTitle,icon:i(e),title:r?e.title:null,
tooltip:o?null:e.title,tooltipAttachment:I.f.MIDDLE_RIGHT,"aria-label":e.title,to:e.to},e.key)}),l?a()("div",{className:M.a.divider}):null,l&&!r?a()(b.a,{className:M.a.iconButton,icon:"plex-icon-sidebar-shortcuts-560","aria-label":Object(g.default)("Show Shortcuts"),onPress:s}):null,l&&r?n.map(function(e){return a()(y.a,{className:M.a.shortcut,iconClassName:M.a.emptyIcon,title:e.title,to:e.to},e.key)}):null)},t}(h.Component);t.a=D},function(e,t){e.exports={
sidebarContent:"TypeSidebarContent-sidebarContent-15Pth",expandedSidebarContent:"TypeSidebarContent-expandedSidebarContent-jYQYi TypeSidebarContent-sidebarContent-15Pth",navigationTypeLink:"TypeSidebarContent-navigationTypeLink-2AYNy SidebarLink-sidebarLink-L2OPd Link-default-2XA2b",navigationTypeTitle:"TypeSidebarContent-navigationTypeTitle-1zazS SidebarLink-title-2vaAA",icon:"TypeSidebarContent-icon-LvQ7J SidebarLink-icon-34JWq",
emptyIcon:"TypeSidebarContent-emptyIcon-3lAlt SidebarLink-icon-34JWq",iconButton:"TypeSidebarContent-iconButton-2LhQJ SidebarIconButton-sidebarIconButton-3zxa5",shortcut:"TypeSidebarContent-shortcut-2Nfob TypeSidebarContent-navigationTypeLink-2AYNy SidebarLink-sidebarLink-L2OPd Link-default-2XA2b",divider:"TypeSidebarContent-divider-anLdZ"}},function(e,t){e.exports={sidebarUnderlay:"TypeSidebar-sidebarUnderlay-36gPH",sidebar:"TypeSidebar-sidebar-1j2OQ",
expandedSidebar:"TypeSidebar-expandedSidebar-1335I TypeSidebar-sidebar-1j2OQ",sidebarLoading:"TypeSidebar-sidebarLoading-1YChl TypeSidebar-sidebar-1j2OQ",footer:"TypeSidebar-footer-OkKvR",toggleMenuButton:"TypeSidebar-toggleMenuButton-1ORq4"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(15)),s=n(195),l=n(105),c=n(46),u=n(3509),d=n(3556),p=n(169),h=n(170),f=r()(p.a,{},void 0,r()(h.a,{}),r()(d.a,{},void 0,r()(u.a,{}))),v=c.a.extend({initialize:function(){
o.c("appModel").set("activeNavigationType",s.b)},component:function(e){var t=e.params||{};return r()(l.a,{metricsContext:t.context},void 0,f)}});t.a=v},function(e,t,n){"use strict";function i(e,t){e.shouldFetchPreferredServerContent&&!t.shouldFetchPreferredServerContent&&e.dispatchFetchPreferredServerContent(),e.shouldFetchProviderPromotedContent&&!t.shouldFetchProviderPromotedContent&&e.dispatchFetchProviderPromotedContent(),
e.shouldFetchHomeContent&&!t.shouldFetchHomeContent&&e.dispatchFetchHomeContent()}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(849)),I=n(204),S=n(3519),M=n(344),D=n(3520),C=function(e){return e.isPopulated||e.error},O=Object(y.createSelector)(function(e){return e.ui.homePage},function(e){var t=e.homeHubStatuses;return e.isContentPopulated||t.length>0&&t.every(C)
}),P=Object(y.createSelector)(function(e){return e.ui.homePage},M.a,S.a,O,function(e,t,n,i){var r=e.preferredServerContentError,a=e.providerPromotedContentError,o=t.preferredServerID,s=t.hasSeededPreferredServerContent,l=t.hasSeededProviderPromotedContent,c=t.settingsKey,u=!!o,d=s||!!r,p=l||!!a,h=u&&!d,f=!p,v=(!u||d)&&p&&!i;return{hasOnlyEmptyHomeHubs:n,isPending:v||h||f,preferredServerID:o,settingsKey:c,shouldFetchHomeContent:v,shouldFetchPreferredServerContent:h,
shouldFetchProviderPromotedContent:f}}),j={dispatchFetchHomeContent:b.a,dispatchFetchPreferredServerContent:b.c,dispatchFetchProviderPromotedContent:b.d,dispatchInitHomePage:b.f,dispatchResetHomePage:b.g,dispatchResetHomeSettings:I.n},T=function(e){function t(){return c()(this,t),d()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.componentDidMount=function(){this.props.dispatchInitHomePage(),i(this.props,{})},t.prototype.componentDidUpdate=function(e){i(this.props,e)},
t.prototype.componentWillUnmount=function(){this.props.dispatchResetHomePage()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchHomeContent,e.dispatchFetchPreferredServerContent,e.dispatchFetchProviderPromotedContent,e.dispatchInitHomePage,e.dispatchResetHomePage,e.dispatchResetHomeSettings),n=(e.shouldFetchHomeContent,e.shouldFetchPreferredServerContent,e.shouldFetchProviderPromotedContent,
s()(e,["dispatchFetchHomeContent","dispatchFetchPreferredServerContent","dispatchFetchProviderPromotedContent","dispatchInitHomePage","dispatchResetHomePage","dispatchResetHomeSettings","shouldFetchHomeContent","shouldFetchPreferredServerContent","shouldFetchProviderPromotedContent"]));return g.a.createElement(D.a,a()({},n,{onResetHomeSettings:t}))},t}(v.Component);t.a=Object(m.b)(P,j)(T)},function(e,t,n){"use strict";function i(e){
var t=Object(o.l)(e),n="hasAttemptedPopulateAllProviders",i=a.a.Deferred(),r=function(){var e=t.get("providers").filter(function(e){return e.get("isPopulated")});e.length?i.resolve(e):i.reject()};return t.get(n)?r():t.once("change:"+n,r),i.promise()}t.a=i;var r=n(13),a=n.n(r),o=n(66)},function(e,t,n){"use strict";function i(e){return e.get("isPopulated")?o.a.Deferred().resolve(e).promise():Object(l.a)({eventSource:e,events:["change:error","change:isPopulated"]})}function r(e,t){
return Object(s.a)(e,t).then(function(e){return i(e.findWhere(t))},function(){return o.a.Deferred().reject().promise()})}t.a=r;var a=n(13),o=n.n(a),s=n(3512),l=n(1322)},function(e,t,n){"use strict";function i(e,t){return e.findWhere(t)?a.a.Deferred().resolve(e).promise():Object(o.a)({eventSource:e,events:["add"],predicate:function(){return!!e.findWhere(t)}})}t.a=i;var r=n(13),a=n.n(r),o=n(1322)},function(e,t,n){"use strict";function i(e){
var t=e.directoryKey,n=e.server,i=e.provider,r=e.onlyPromoted,s=void 0!==r&&r,l={hubkey:t,server:n,provider:i,count:1,persistInCache:!1,skipCache:!0},c=a()({},e,{hubModels:[]});return Object(o.b)(l).fetch().then(function(e){return e.reduce(function(e,t){return(!s||s&&t.get("promoted"))&&e.hubModels.push(t),e},c)},function(){return c})}t.a=i;var r=n(6),a=n.n(r),o=n(1323)},function(e,t,n){"use strict";function i(e){var t=e.reduce(function(e,t,n){
var i=t.get("server").get("machineIdentifier"),r=t.get("provider").get("identifier"),a=t.get("directoryKey"),o=i+"--"+r+"--"+a;return e[o]||(e[o]={directoryKey:a,identifier:r,homeHubIDs:[],machineIdentifier:i}),e[o].homeHubIDs.push(t.get("id")),e},{});return a()(t)}t.a=i;var r=n(3515),a=n.n(r)},function(e,t,n){e.exports={default:n(3516),__esModule:!0}},function(e,t,n){n(3517),e.exports=n(106).Object.values},function(e,t,n){var i=n(150),r=n(3518)(!1);i(i.S,"Object",{values:function(e){return r(e)
}})},function(e,t,n){var i=n(361),r=n(303),a=n(426).f;e.exports=function(e){return function(t){for(var n,o=r(t),s=i(o),l=s.length,c=0,u=[];l>c;)a.call(o,n=s[c++])&&u.push(e?[n,o[n]]:o[n]);return u}}},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),n(475)),a=n(344),o=Object(i.createSelector)(r.a,a.a,function(e){return e.ui.homePage.homeHubStatuses},function(e,t,n){return t.hubs.every(function(t){var i=n.find(function(e){return e.homeHubID===t.id}),r=i&&e[i.hub];return!!r&&0===r.size})});t.a=o
},function(e,t,n){"use strict";function i(e){var t=e.hasOnlyEmptyHomeHubs,n=e.isPending,i=e.preferredServerID,r=e.settingsKey,o=e.onDevResetHomeSettings;return n?b:a()(p.a,{machineIdentifier:i},void 0,a()(h.a,{isMetricsDelegated:!0,metricsPage:c.D,allowBackgroundLightPreset:!0,scrollDirection:l.NONE},void 0,I,a()(f.a,{innerClassName:y.a.homePageContent,scrollPositionKey:r+"!scrollPosition"},void 0,t?S:M,o?D:null,o?a()("button",{onClick:o},void 0,"\u2605 Reset Home"):null)))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(54)),c=n(30),u=n(31),d=n(3521),p=n(1317),h=n(83),f=n(140),v=n(73),g=n(3540),m=n(3555),y=n.n(m),b=a()(v.a,{},void 0,a()(u.a,{})),I=a()(g.a,{}),S=a()("p",{},void 0,"Placeholder: The user has no home hubs or all hubs are empty."),M=a()(d.a,{}),D=a()("hr",{});t.a=i},function(e,t,n){"use strict";var i=n(11),r=n(5),a=(n.n(r),n(344)),o=n(3522),s=Object(r.createSelector)(a.a,function(e){return e.hubs.map(function(e){return e.id})
}),l=Object(r.createSelector)(s,function(e){return{homeHubIDs:e}});t.a=Object(i.b)(l)(o.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(27)),f=n(15),v=n(30),g=n(3523),m={opacity:0,pointerEvents:"none"},y={opacity:1,pointerEvents:"auto"},b=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.homeHubIDs.length},t.prototype.componentWillReceiveProps=function(e){var t=e.homeHubIDs.length,n=this.props.homeHubIDs.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.componentDidUpdate=function(e,t){
!t.isReady&&this.state.isReady&&Object(f.c)("metrics").trackView({page:v.D})},t.prototype.render=function(){var e=this,t=this.props.homeHubIDs,n=this.state.isReady;return r()("div",{style:n?y:m},void 0,t.map(function(t){return r()(g.a,{homeHubID:t,allowSourceTitle:!0,allowToggleHomeHub:!0,shouldConfirmHomeHubRemoval:!0,onListReady:e.onListReady},t)}))},t}(p.Component);t.a=b},function(e,t,n){"use strict";function i(){return Object(b.createSelector)(Object(D.a)(),function(e){
return!!e&&e.isConnected})}function r(){return Object(b.createSelector)(Object(D.a)(),function(e){return!!e})}var a=n(6),o=n.n(a),s=n(12),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(5),I=(n.n(b),n(18)),S=n(3),M=n(849),D=n(620),C=n(423),O=n(1103),P=n(850),j=n(3524),T=n(1324),w=n(1326),E=(n(1327),n(1328),n(3526)),x=n(812),A=function(){
return Object(b.createSelector)(Object(O.a)(),Object(P.a)(),Object(C.a)(),Object(w.a)(),Object(T.a)(),Object(j.a)(),r(),i(),function(e,t){return t.allowSourceTitle},function(e,t,n,i,r,a,o,s,l){return{columnAdjustment:e,errorTitle:a,hasServer:o,homeHub:t,homePageHomeHubStatus:n,isServerConnected:s,sourceTitle:l?r:null,title:i}})},N={dispatchFetchHomeHubs:M.b,dispatchUpdateHomeHubsStatus:M.h},L=function(e){function t(n,i){u()(this,t);var r=p()(this,e.call(this,n,i))
;return r.onRetryHomeHub=function(){var e={homeHubIDs:[r.props.homeHubID],fetchDelayMS:350};r.setState({hasRetried:!0},r.props.dispatchFetchHomeHubs.bind(null,e))},r.state={hasRetried:!1},r}return f()(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.errorTitle,i=t.homeHubID,r=t.isServerConnected,a=t.dispatchFetchHomeHubs,o=t.dispatchUpdateHomeHubsStatus,s=!e.errorTitle&&n,l=r&&!e.isServerConnected,c=!r&&e.isServerConnected;s&&this.state.hasRetried&&I.a.trigger("show:alert",{
type:"error",message:Object(S.default)("There was an error retrieving content.")}),(l||c)&&this.setState({hasRetried:!1},function(){l?a({homeHubIDs:[i]}):c&&o({homeHubIDs:[i],status:{error:{},isPending:!1,isPopulated:!1}})})},t.prototype.render=function(){var e=this.props,t=e.allowSourceTitle,n=(e.dispatchFetchHomeHubs,e.dispatchUpdateHomeHubsStatus,e.homeHubID,e.homeHub),i=e.homePageHomeHubStatus,r=(e.isServerConnected,
e.sourceTitle),a=e.title,s=l()(e,["allowSourceTitle","dispatchFetchHomeHubs","dispatchUpdateHomeHubsStatus","homeHubID","homeHub","homePageHomeHubStatus","isServerConnected","sourceTitle","title"]);return i.isPopulated?m.a.createElement(x.a,o()({},s,{allowSourceTitle:t,sourceDirectoryKey:n.directoryKey,hubEntityID:i.hub,providerEntityID:i.provider,serverEntityID:i.server})):m.a.createElement(E.a,o()({},s,{hasRetried:this.state.hasRetried,homeHub:n,homePageHomeHubStatus:i,sourceTitle:r,title:a,
onRetryHomeHub:this.onRetryHomeHub}))},t}(g.Component);t.a=Object(y.b)(A,N)(L)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(Object(s.a)(),Object(o.a)(),function(e,t){var n=e.error,i=void 0;return n&&(i=n.isContentUnavailable?Object(a.default)("Content Unavailable"):t?t.isInstallingServerUpdate?Object(a.default)("Installing Update"):t.isOutOfDate?Object(a.default)("Update Required"):Object(a.default)("Unreachable"):Object(a.default)("Unknown Server")),i})}t.a=i
;var r=n(5),a=(n.n(r),n(3)),o=n(620),s=n(423)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(a.a,Object(o.a)(),function(e,t){return e[t.provider]})}t.a=i;var r=n(5),a=(n.n(r),n(132)),o=n(423)},function(e,t,n){"use strict";function i(e){return function(t){return g.a.createElement(A.a,h()({},e,t))}}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(6),h=n.n(p),f=n(1),v=(n.n(f),
n(0)),g=n.n(v),m=n(72),y=n(326),b=n(554),I=n(209),S=n(54),M=n(52),D=n(343),C=n(3),O=n(25),P=n(1216),j=n(403),T=n(345),w=n(3527),E=n(485),x=n(187),A=(n(1327),n(1328),n(3537)),N=n(3539),L=n.n(N),k=String.fromCharCode(183),_=[{id:0},{id:1},{id:2},{id:3},{id:4},{id:5},{id:6},{id:7},{id:8},{id:9},{id:10},{id:11}],R=function(e){function t(n,i){s()(this,t);var r=c()(this,e.call(this,n,i));return r.onListUpdate=function(e){var t=e.listStyle,n=r.props.onListReady,i=r._isReady?void 0:n;r._isReady=!0,
r.setState({listHeight:t.height},i)},r.onHelpPress=function(){r.setState({isHelpModalOpen:!0})},r.onHelpModalClose=function(){r.setState({isHelpModalOpen:!1})},r.state={listHeight:"auto",isHelpModalOpen:!1},r._isReady=!1,r}return d()(t,e),t.prototype.render=function(){
var e=this.props,t=e.allowToggleHomeHub,n=e.className,r=e.columnAdjustment,o=e.errorTitle,s=e.hasRetried,l=e.hasServer,c=e.homeHub,u=e.homePageHomeHubStatus,d=e.shouldConfirmHomeHubRemoval,p=e.sourceTitle,h=e.title,f=e.onRetryHomeHub,v=this.state.listHeight,g=c.hubIdentifier,A=c.type,N=c.subType,R=u.isPending,z=Object(P.a)(g),U=Object(x.b)(A,z,{subType:N,isExternal:g.indexOf("external")>-1}),B=!!o,F=R&&s,V=null;if(h){var H=Object(D.a)(h),Q=o||(F?Object(C.default)("Retrying"):null)
;V=a()(T.a,{},void 0,H,p?a()(m.b,{className:L.a.titleSeparator}):null,p?a()("span",{className:L.a.sourceTitle},void 0,p):null,Q?a()(m.b,{className:L.a.errorSeparator,separator:k}):null,Q?a()("span",{className:L.a.errorTitle},void 0,Q):null)}var Y={visibility:"auto"===v?"hidden":"visible"},G={height:v,overflow:"hidden"};return a()("div",{className:n,style:Y,"data-qa-id":"hub--"+g},void 0,a()(j.a,{allowToggleHomeHub:t,className:L.a.hubCellHeader,homeHubID:u.homeHubID,isHomeHub:!0,
shouldConfirmHomeHubRemoval:d},void 0,V,R?a()(y.a,{size:M.SMALL}):null,B&&l?a()(b.a,{className:L.a.iconButton,icon:"plex-icon-reload-560",iconClassName:L.a.iconButtonIcon,iconComponent:O.a,label:Object(C.default)("Retry"),ariaLabel:Object(C.default)("Retry"),onPress:f}):null,B?a()(b.a,{className:L.a.iconButton,icon:"plex-icon-help-560",iconClassName:L.a.iconButtonIcon,iconComponent:O.a,label:Object(C.default)("What's this?"),ariaLabel:Object(C.default)("What's this?"),onPress:this.onHelpPress
}):null),a()("div",{style:G},void 0,a()(I.a,{scrollerClassName:L.a.hubScroller,ignoreHeight:!0,keyPropName:"id",items:_,scrollDirection:S.NONE,size:_.length,layout:Object(E.a)(A,N,z,r,U.length),cellRenderer:i({listType:A,listSubType:N,listContext:z}),onListUpdate:this.onListUpdate})),a()(w.a,{homeHubID:c.id,isOpen:this.state.isHelpModalOpen,onModalClose:this.onHelpModalClose}))},t}(v.Component);R.defaultProps={className:L.a.hubCell},t.a=R},function(e,t,n){"use strict";function i(){
return Object(a.createSelector)(Object(s.a)(),Object(o.a)(),function(e,t){var n=e.error,i=e.server,r={};if(n&&n.isContentUnavailable)r.shouldShowHubStatus=!0;else if(t){var a=t.isDownForMaintenance,o=t.isHostedHttps,s=t.isInstallingServerUpdate,l=t.isOutOfDate,c=t.isUnavailable,u=t.isUnauthorized,d=t.hasHttpsConnections;r.serverEntityID=i,a?r.shouldShowDownForMaintenance=!0:c&&o&&!d?r.shouldShowInsecureFallbackChoice=!0:(c||u||s||l)&&(r.shouldShowServerStatus=!0)}else r.shouldShowUnrecognized=!0
;return r.shouldShowHubStatus||r.shouldShowDownForMaintenance||r.shouldShowInsecureFallbackChoice||r.shouldShowServerStatus||r.shouldShowUnrecognized||(r.shouldShowUnexpectedError=!0),r})}var r=n(11),a=n(5),o=(n.n(a),n(620)),s=n(423),l=n(3528);t.a=Object(r.b)(i)(l.a)},function(e,t,n){"use strict";function i(e){
var t=e.isOpen,n=e.serverEntityID,i=e.shouldShowDownForMaintenance,r=e.shouldShowInsecureFallbackChoice,o=e.shouldShowHubStatus,s=e.shouldShowServerStatus,y=e.shouldShowUnexpectedError,b=e.shouldShowUnrecognized,I=e.onModalClose;return a()(u.a,{size:l.SMALL,isOpen:t,metricsPage:c.D,onModalClose:I},void 0,a()(d.a,{onModalClose:I},void 0,i?a()(p.a,{onModalClose:I}):null,o?a()(h.a,{onModalClose:I}):null,r?a()(f.a,{serverEntityID:n,onModalClose:I}):null,s?a()(v.a,{serverEntityID:n,onModalClose:I
}):null,y?a()(g.a,{onModalClose:I}):null,b?a()(m.a,{onModalClose:I}):null))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(52)),c=n(30),u=n(117),d=n(95),p=n(3529),h=n(3530),f=n(3531),v=n(3533),g=n(3535),m=n(3536);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.onModalClose
;return a()(s.Fragment,{},void 0,a()(d.a,{},void 0,Object(f.default)("Down for Maintenance")),a()(c.a,{},void 0,Object(f.default)("Plex is down for maintenance. Don't worry, it will be back soon.")),a()(u.a,{},void 0,a()(l.a,{to:h.b,"data-autofocus":!0,target:"_blank",kind:p.PRIMARY,onPress:t},void 0,"status.plex.tv")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(59),u=n(82),d=n(78),p=n(49),h=n(334),f=n(3);t.a=i},function(e,t,n){"use strict";function i(e){var t=e.onModalClose
;return a()(s.Fragment,{},void 0,a()(d.a,{},void 0,Object(h.default)("Content is Unavailable")),a()(c.a,{},void 0,Object(h.default)("The content provider is working normally but did not return content. The content may no longer be available.")),a()(u.a,{},void 0,a()(l.a,{"data-autofocus":!0,kind:p.PRIMARY,onPress:t},void 0,Object(h.default)("Okay"))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(59),u=n(82),d=n(78),p=n(49),h=n(3);t.a=i},function(e,t,n){"use strict"
;function i(){return Object(o.createSelector)(Object(s.a)(),function(e){return{friendlyName:e.friendlyName,sourceTitle:e.sourceTitle}})}function r(e){return{onReloadHttpPress:function(t){e(Object(l.h)())},onReloadHttpAlwaysPress:function(t){e(Object(l.f)()),e(Object(l.h)())}}}var a=n(11),o=n(5),s=(n.n(o),n(34)),l=n(68),c=n(3532);t.a=Object(a.b)(i,r)(c.a)},function(e,t,n){"use strict";function i(e){
var t=e.friendlyName,n=e.sourceTitle,i=e.onModalClose,r=e.onReloadHttpPress,o=e.onReloadHttpAlwaysPress,p=n?[Object(g.default)("{owner}'s server does not allow secure connections.",{owner:n})]:[Object(g.default)('The server "{serverName}" does not allow secure connections.',{serverName:t})];return p.push(Object(g.default)("To see content from this server, you can try allowing insecure connections to reload the web app insecurely.")),
a()(s.Fragment,{},void 0,a()(f.a,{},void 0,Object(g.default)("Server Unreachable")),a()(u.a,{},void 0,p.join(" "),m,a()(c.a,{to:"https://support.plex.tv/hc/en-us/articles/206225077-How-to-Use-Secure-Server-Connections",target:"_blank",kind:v.PRIMARY,onPress:i},void 0,Object(g.default)("Learn more"))),a()(d.a,{},void 0,a()(l.a,{className:h.a.button,onPress:o},void 0,Object(g.default)("Allow always")),a()(l.a,{className:h.a.button,"data-autofocus":!0,kind:v.PRIMARY,onPress:r
},void 0,Object(g.default)("Allow once"))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(20),u=n(59),d=n(82),p=n(455),h=n.n(p),f=n(78),v=n(49),g=n(3),m=a()("br",{});t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{friendlyName:e.friendlyName,isInstallingServerUpdate:e.isInstallingServerUpdate,isOutOfDate:e.isOutOfDate,isUnauthorized:e.isUnauthorized,isUnavailable:e.isUnavailable,sourceTitle:e.sourceTitle}})}
var r=n(11),a=n(5),o=(n.n(a),n(34)),s=n(3534);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,n=e.isInstallingServerUpdate,i=e.isOutOfDate,r=e.isUnauthorized,o=e.isUnavailable,d=e.onModalClose,g=[],m=Object(v.default)("Server is Unavailable");return n?g.push(Object(v.default)('The server "{serverName}" is installing an update.',{serverName:t
}),Object(v.default)("Grab a cup of tea. This may take a couple of minutes.")):i?(m=Object(v.default)("Update Required"),g.push(Object(v.default)('The server "{serverName}" is out of date.',{serverName:t}),Object(v.default)("This version of Plex requires Plex Media Server {version} or higher.",{version:"1.3.0"}))):r?g.push(Object(v.default)("No soup for you!"),Object(v.default)("You do not have access to this server.")):o&&g.push(Object(v.default)('The server "{serverName}" is unavailable.',{
serverName:t}),Object(v.default)("Plex will automatically try to reconnect to this server.")),a()(s.Fragment,{},void 0,a()(h.a,{},void 0,m),a()(c.a,{},void 0,g.join(" ")),a()(u.a,{},void 0,a()(l.a,{className:p.a.button,"data-autofocus":!0,kind:f.PRIMARY,onPress:d},void 0,Object(v.default)("Okay"))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(59),u=n(82),d=n(455),p=n.n(d),h=n(78),f=n(49),v=n(3);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.onModalClose,n=[Object(m.default)("There was an unexpected error."),Object(m.default)("Please visit our forums if you continue to experience problems.")];return a()(s.Fragment,{},void 0,a()(f.a,{},void 0,Object(m.default)("Content is Unavailable")),a()(u.a,{},void 0,n.join(" "),y,a()(c.a,{to:g.a,target:"_blank",kind:v.PRIMARY,onPress:t},void 0,Object(m.default)("Go to Forums"))),a()(d.a,{},void 0,a()(l.a,{className:h.a.button,"data-autofocus":!0,kind:v.PRIMARY,onPress:t
},void 0,Object(m.default)("Okay"))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(20),u=n(59),d=n(82),p=n(455),h=n.n(p),f=n(78),v=n(49),g=n(334),m=n(3),y=a()("br",{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.onModalClose,n=[Object(v.default)("The server associated with this content is no longer accessible."),Object(v.default)("You can safely remove this content.")]
;return a()(s.Fragment,{},void 0,a()(h.a,{},void 0,Object(v.default)("Unknown Server")),a()(c.a,{},void 0,n.join(" ")),a()(u.a,{},void 0,a()(l.a,{className:p.a.button,"data-autofocus":!0,kind:f.PRIMARY,onPress:t},void 0,Object(v.default)("Okay"))))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(59),u=n(82),d=n(455),p=n.n(d),h=n(78),f=n(49),v=n(3);t.a=i},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.listContext,u=e.listSubtype,d=e.listType,p=Object(c.d)(r,d,u,s),h={position:"absolute",top:0,left:0,width:r+"px",height:p+"px"};return a()(l.a,{cellX:n,cellY:i,cellWidth:r,cellHeight:o},void 0,a()("div",{className:t,style:h}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(87)),c=(n(32),n(126)),u=n(3538),d=n.n(u);i.defaultProps={className:d.a.posterCell},t.a=i},function(e,t){e.exports={
posterCell:"HomeHubPosterPlaceholderCell-posterCell-1jeJq"}},function(e,t){e.exports={hubCell:"HomeHubCell-hubCell-3ioBj HubCell-hubCell-3Ys17",hubCellHeader:"HomeHubCell-hubCellHeader-1j-ZK HubCell-hubCellHeader-3s3KK HubCellHeader-hubCellHeader-2pvYN",titleSeparator:"HomeHubCell-titleSeparator-4VHhF HubCell-titleSeparator-_noi6 DashSeparator-separator-4CyEF",sourceTitle:"HomeHubCell-sourceTitle-2q-ZZ HubCell-sourceTitle-2X9oM",
hubScroller:"HomeHubCell-hubScroller-TifVn HubCell-hubScroller-2qgkr VirtualListScroller-scroller-3aWqh",errorSeparator:"HomeHubCell-errorSeparator-1u82z HomeHubCell-titleSeparator-4VHhF HubCell-titleSeparator-_noi6 DashSeparator-separator-4CyEF",errorTitle:"HomeHubCell-errorTitle-2f970 HomeHubCell-sourceTitle-2q-ZZ HubCell-sourceTitle-2X9oM",iconButton:"HomeHubCell-iconButton-1zgW6",iconButtonIcon:"HomeHubCell-iconButtonIcon-2eaaL"}},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(134)),h=n(102),f=n(3),v=n(217),g=n(493),m=n(146),y=n(826),b=n(3541),I={isEditModalOpen:!1},S=r()(g.a,{}),M=r()(m.a,{}),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.state=I,i.onEditButtonPress=function(){i.setState({isEditModalOpen:!i.state.isEditModalOpen})},
i.onModalClose=function(){i.setState(I)},r=n,l()(i,r)}return u()(t,e),t.prototype.render=function(){var e=this.state.isEditModalOpen;return r()(v.a,{},void 0,r()(p.a,{},void 0,Object(f.default)("Home")),r()(h.a,{},void 0,r()(y.a,{onPress:this.onEditButtonPress}),S,M,r()(b.a,{isOpen:e,onModalClose:this.onModalClose})))},t}(d.Component);t.a=D},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.onModalClose;return a()(c.a,{size:u.e.MEDIUM,isOpen:t,metricsPage:l.D,onModalClose:n
},void 0,a()(d.a,{onModalClose:n}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(30)),c=n(117),u=n(23),d=n(3542);t.a=i},function(e,t,n){"use strict";var i=n(11),r=n(5),a=(n.n(r),n(204)),o=n(344),s=n(3543),l=Object(r.createSelector)(o.a,function(e){return{homeHubs:e.hubs,settingsKey:e.settingsKey}}),c={onReorderHomeHubs:a.l,onResetHomeSettings:a.n};t.a=Object(i.b)(l,c)(s.a)},function(e,t,n){"use strict";function i(e){return{mode:e,isEditing:e===A,isEmpty:e===N,isRestoring:e===L}}
function r(e){var t=e.homeHubs.length?A:N,n=i(t);return n.editableHomeHubs=e.homeHubs,n.homeHubs=e.homeHubs,n.removedHomeHubIDs={},n}var a=n(2),o=n.n(a),s=n(6),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),n(72)),y=n(42),b=n(20),I=n(59),S=n(82),M=n(78),D=n(49),C=n(54),O=n(3544),P=n(3),j=n(25),T=n(95),w=n(3546),E=n(3554),x=n.n(E),A=1,N=2,L=3,k=function(e){function t(n,a){u()(this,t);var o=p()(this,e.call(this,n,a))
;return o.onSaveButtonPress=function(){var e=o.state.removedHomeHubIDs,t=o.state.editableHomeHubs.reduce(function(t,n){return n.id in e||t.push(n.id),t},[]);o.props.onReorderHomeHubs({isUserInitiated:!0,homeHubIDs:t}),o.props.onModalClose()},o.onCancelButtonPress=function(){o.props.onModalClose()},o.onBackButtonPress=function(){var e=o.state.editableHomeHubs.length?A:N,t=i(e);o.setState(t)},o.onRestoreLinkPress=function(){var e=i(L);o.setState(e)},o.onToggleRemoveHomeHub=function(e){
var t=o.state.removedHomeHubIDs,n=l()({},t);e in n?delete n[e]:n[e]=e,o.setState({removedHomeHubIDs:n})},o.onReorderHomeHub=function(e){var t=e.fromIndex,n=e.toIndex;if(t!==n){var i=o.state.editableHomeHubs;o.setState({editableHomeHubs:Object(O.a)(i,t,n)})}},o.state=r(n),o}return f()(t,e),t.getDerivedStateFromProps=function(e,t){return e.homeHubs!==t.homeHubs?r(e):null},t.prototype.render=function(){
var e=this.props,t=e.settingsKey,n=e.onResetHomeSettings,i=e.onModalClose,r=this.state,a=r.editableHomeHubs,s=r.isEditing,l=r.isEmpty,c=r.isRestoring,u=r.removedHomeHubIDs;return o()(T.a,{onModalClose:i},void 0,o()(M.a,{},void 0,s||l?Object(P.default)("Edit Home Screen"):null,c?Object(P.default)("Restore Defaults"):null),o()(I.a,{className:x.a.modalBody,innerClassName:x.a.innerModalBody,scrollDirection:C.NONE},void 0,o()("div",{className:(x.a.pane||"")+" "+((l?null:x.a.isHidden)||"")
},void 0,o()("p",{},void 0,Object(P.default)('Your home screen is currently empty. Click the "+" beside the title of any content row in a media source to add it to your home screen, or click "{buttonLabel}" below to repopulate your home screen with content based on your preferred source.',{buttonLabel:Object(P.default)("Restore Defaults")}))),o()("div",{className:(x.a.pane||"")+" "+(x.a.editPane||"")+" "+((s?null:x.a.isHidden)||"")
},void 0,o()("p",{},void 0,Object(P.default)("Drag to reorder the content hubs shown on your home screen, or remove them entirely. Only hubs with content in them will be visible on your home screen.")),o()(w.a,{className:x.a.sortableServers,homeHubs:a,removedHomeHubIDs:u,onReorderHomeHub:this.onReorderHomeHub,onToggleRemoveHomeHub:this.onToggleRemoveHomeHub})),o()("div",{className:(x.a.pane||"")+" "+((c?null:x.a.isHidden)||"")
},void 0,o()("p",{},void 0,Object(P.default)("Restoring your home screen will undo any customization you have done {dash} including content hubs you've added and the order in which they're presented {dash} returning it to its default configuration.",{dash:m.a})),o()("p",{},void 0,Object(P.default)("Restoring will give you the opportunity to choose a preferred server to build your home screen, if more than one server is available to you.")))),o()(S.a,{className:x.a.footer
},void 0,s?o()(g.Fragment,{},t,o()(b.a,{kind:D.PRIMARY,onPress:this.onRestoreLinkPress},void 0,o()(j.a,{className:x.a.reloadIcon,name:"plex-icon-reload-560"}),Object(P.default)("Restore Defaults")),o()(y.a,{className:x.a.splitButton,onPress:this.onCancelButtonPress},void 0,Object(P.default)("Cancel")),o()(y.a,{className:x.a.button,"data-autofocus":!0,kind:D.PRIMARY,onPress:this.onSaveButtonPress},void 0,Object(P.default)("Save"))):null,l?o()(g.Fragment,{},void 0,o()(b.a,{kind:D.PRIMARY,
onPress:this.onRestoreLinkPress},void 0,o()(j.a,{className:x.a.reloadIcon,name:"plex-icon-reload-560"}),Object(P.default)("Restore Defaults")),o()(y.a,{className:x.a.splitButton,"data-autofocus":!0,kind:D.PRIMARY,onPress:this.onCancelButtonPress},void 0,Object(P.default)("Close"))):null,c?o()(g.Fragment,{},void 0,o()(y.a,{onPress:this.onBackButtonPress},void 0,Object(P.default)("Back")),o()(y.a,{className:x.a.splitButton,onPress:this.onCancelButtonPress
},void 0,Object(P.default)("Cancel")),o()(y.a,{kind:D.DANGER,onPress:n},void 0,Object(P.default)("Restore"))):null))},t}(g.Component);t.a=k},function(e,t,n){"use strict";function i(e,t,n){var i=e.slice(0);if(n<0||n>i.length)return i;var a=i[t];return i=Object(r.a)(i,t),i.splice(n,0,a),i}t.a=i;var r=n(3545)},function(e,t,n){"use strict";function i(e,t){var n=e.slice(0);return t<0||t>=n.length?n:(n.splice(t,1),n)}t.a=i},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(6),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(64),m=n(537),y=n(71),b=n(54),I=n(410),S=n(3547),M=n(3551),D=n(3553),C=n.n(D),O=-1,P={dragIndex:-1,dropIndex:O,hasValidDropTarget:!1},j=r()(m.a,{},void 0,r()(S.a,{})),T=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.state=o()({},P,{listHeight:0,
listWidth:0,listTop:0,listRight:0,listBottom:0,listLeft:0}),i.onItemDragMove=function(e){var t=e.dragIndex,n=e.dropIndex,r=i.state,a=r.dragIndex,o=r.dropIndex,s=n!==o?n:o,l=t!==a?t:a,c=s===l,u=s>l&&s-l==1;if((c||u)&&(s=O),l!==a||s!==o){var d={dragIndex:l,dropIndex:s,hasValidDropTarget:s!==O};i.setState(d)}},i.onItemDragEnd=function(e){var t=i.state,n=t.dragIndex,r=t.dropIndex,a=void 0;e.didDrop&&r!==O&&(a=function(){i.props.onReorderHomeHub({fromIndex:n,toIndex:r>n?r-1:r})}),i.setState(P,a)},
i.onMeasure=function(e){var t=e.height,n=e.width,r=e.x,a=e.y;i.setState({listHeight:t,listWidth:n,listTop:a,listRight:r+n,listBottom:a+t,listLeft:r})},r=n,u()(i,r)}return p()(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.homeHubs,a=t.removedHomeHubIDs,s=t.onToggleRemoveHomeHub,l=this.state,c=l.dropIndex,u=l.hasValidDropTarget;return r()(g.a,{className:n,ignoreTransforms:!0,onMeasure:this.onMeasure},void 0,r()(y.a,{className:C.a.scroller,scrollDirection:b.VERTICAL
},void 0,i.map(function(t,n){var i=t.id,r=n,l=u&&c===r,d=u&&c===r+1;return v.a.createElement(M.a,o()({},e.state,{key:i,homeHubID:i,listIndex:r,hasValidDropTarget:u,isRemoved:!!a[i],isDraggingAfter:d,isDraggingBefore:l,onItemDragMove:e.onItemDragMove,onItemDragEnd:e.onItemDragEnd,onToggleRemoveHomeHub:s}))}),j))},t}(f.Component);T.defaultProps={className:C.a.container},t.a=Object(I.a)(T)},function(e,t,n){"use strict";function i(e,t){var n=e.getItem(),i={item:n,style:null
},r=e.getInitialSourceClientOffset(),a=e.getSourceClientOffset();if(e.getItemType()===M.b&&r&&a){var o=a.y;o-n.listTop<=0?o=n.listTop:o+j>=n.listBottom&&(o=n.listBottom-j),i.style=Object(D.a)({x:r.x,y:o},n.listWidth)}return i}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),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(214),I=(n.n(b),n(482)),S=n(1329),M=n(251),D=n(851),C=n(44),O=(n.n(C),
n(3550)),P=n.n(O),j=parseInt(C.homeServerListItemHeight,10),T=function(e){function t(){return d()(this,t),h()(this,e.apply(this,arguments))}return v()(t,e),t.prototype.render=function(){var e=this.props,t=e.item,n=e.style;if(!t||!n)return null;var i=(t.listHeight,t.listWidth,t.listTop,t.listRight,t.listBottom,t.listLeft,c()(t,["listHeight","listWidth","listTop","listRight","listBottom","listLeft"]));return s()(I.a,{},void 0,y.a.createElement(S.a,a()({},i,{style:n,className:P.a.listItem})))},t
}(m.Component);t.a=Object(b.DragLayer)(i)(T)},function(e,t,n){"use strict";function i(e,t){var n=e.className,i=e.sourceTitle,r=e.title,o=e.style,s=e.isRemoved,l=e.connectDragSource,p=e.onToggleRemoveHomeHub;return a()("div",{className:(n||"")+" "+(s&&h.a.isRemoved||""||""),style:o},void 0,l(a()("div",{},void 0,a()(u.a,{className:h.a.iconReorder,name:"plex-icon-reorder-560"}))),a()("span",{className:h.a.label},void 0,a()("span",{className:h.a.title},void 0,r),i?f:null,i||null),a()(d.a,{
className:h.a.toggleButton,isRemovable:!s,tooltip:s?Object(c.default)("Restore"):Object(c.default)("Remove"),onPress:p}))}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(3),u=n(25),d=n(1137),p=n(3549),h=n.n(p),f=a()(l.b,{});i.defaultProps={className:h.a.listItem,isRemoved:!1,connectDragSource:function(e){return e}},t.a=i},function(e,t){e.exports={listItem:"HomeHubListItem-listItem-3aSc2",label:"HomeHubListItem-label-1g_Fb",title:"HomeHubListItem-title-3xEA8",
isRemoved:"HomeHubListItem-isRemoved-HpH7U",iconReorder:"HomeHubListItem-iconReorder-1GrJs",toggleButton:"HomeHubListItem-toggleButton-2C4qs AddOrRemoveButton-button-3FgmE IconButton-button-9An-7"}},function(e,t){e.exports={listItem:"HomeHubListItemDragPreview-listItem-iDQ3J HomeHubListItem-listItem-3aSc2"}},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(12),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(214),b=(n.n(y),n(411)),I=(n.n(b),n(122)),S=(n.n(I),n(324)),M=n(251),D=n(1329),C=n(3552),O=n.n(C),P={beginDrag:function(e,t,n){var i=e.homeHubID;return{dragIndex:e.listIndex,homeHubID:i,isRemoved:e.isRemoved,listHeight:e.listHeight,listWidth:e.listWidth,listTop:e.listTop,listRight:e.listRight,listBottom:e.listBottom,
listLeft:e.listLeft}},endDrag:function(e,t,n){e.onItemDragEnd({didDrop:t.didDrop()})}},j={hover:function(e,t,n){var i=t.getClientOffset(),r=Object(I.findDOMNode)(n).getBoundingClientRect(),a=(r.bottom-r.top)/2,o=i.y-r.top,s=t.getItem().dragIndex,l=e.listIndex,c=void 0;c=l===s?l:o>a?l+1:l,e.onItemDragMove({dragIndex:s,dropIndex:c})}},T=function(e){function t(){return u()(this,t),p()(this,e.apply(this,arguments))}return f()(t,e),t.prototype.componentDidMount=function(){
this.props.connectDragPreview(Object(b.getEmptyImage)())},t.prototype.render=function(){var e=this.props,t=e.isOver,n=e.isDragging,i=(e.listIndex,e.dropIndex,e.listHeight,e.listWidth,e.listTop,e.listRight,e.listBottom,e.listLeft,e.isDraggingBefore),r=e.isDraggingAfter,a=e.connectDropTarget,s=l()(e,["isOver","isDragging","listIndex","dropIndex","listHeight","listWidth","listTop","listRight","listBottom","listLeft","isDraggingBefore","isDraggingAfter","connectDropTarget"]);return a(o()("div",{
className:(O.a.container||"")+" "+(t&&O.a.isOver||"")+" "+(n&&S.c||"")+" "+(t&&i&&S.e||"")+" "+(t&&r&&S.d||""||"")},void 0,m.a.createElement(D.a,s)))},t}(g.Component);t.a=Object(y.DropTarget)(M.b,j,r)(Object(y.DragSource)(M.b,P,i)(T))},function(e,t){e.exports={container:"HomeHubListItemDragSource-container-1T0Du",isOver:"HomeHubListItemDragSource-isOver-1k9kx"}},function(e,t){e.exports={container:"SortableHomeHubs-container-2NqZ- Measure-container-3yONE",
scroller:"SortableHomeHubs-scroller-_fZlT Scroller-scroller-3GqQc"}},function(e,t){e.exports={modalBody:"EditHomeModalContent-modalBody-2rHN2 ModalBody-modalBody--5uHS",innerModalBody:"EditHomeModalContent-innerModalBody-4OMCU",pane:"EditHomeModalContent-pane-3Azgq ModalBody-innerModalBody-36gmb",isHidden:"EditHomeModalContent-isHidden-2gSrW",editPane:"EditHomeModalContent-editPane-1xAxS",
sortableServers:"EditHomeModalContent-sortableServers-1uFWu SortableHomeHubs-container-2NqZ- Measure-container-3yONE",reloadIcon:"EditHomeModalContent-reloadIcon-3wbMu",footer:"EditHomeModalContent-footer-10Ix6 ModalFooter-modalFooter-30WIB",button:"EditHomeModalContent-button-HgDyC ModalFooter-button-15VJa Button-button-2kT68 Link-link-2n0yJ",splitButton:"EditHomeModalContent-splitButton-gmcHm ModalFooter-splitButton-2NLiB ModalFooter-button-15VJa Button-button-2kT68 Link-link-2n0yJ"}
},function(e,t){e.exports={homePageContent:"HomePage-homePageContent-2Uzcw PageContent-innerPageContent-3ktLT"}},function(e,t,n){"use strict";function i(e,t){var n=e.preferredServerEntityID,i=e.dispatchChangeQuickSearchSettings;if(n!==t.preferredServerEntityID){var r=null,a=null,o=null;n&&(r=y.d,a=Object(b.a)(I.k,r,n),o=n),i({providerEntityID:a,providerIdentifier:r,serverEntityID:o})}}var r=n(12),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(5),m=(n.n(g),n(1330)),y=n(41),b=n(38),I=n(43),S=n(84),M=n(3557),D=n(3558),C=Object(g.createSelector)(m.a,function(e){return e.length>0}),O=Object(g.createSelector)(function(e){return e.isWaitingForServers},M.a,C,function(e,t,n){return{preferredServerEntityID:t,shouldSelectPreferredServer:!t&&!e&&n,isPending:!t&&e}}),P={dispatchChangeQuickSearchSettings:S.changeQuickSearchSettings},j=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}
return d()(t,e),t.prototype.componentDidMount=function(){i(this.props,{})},t.prototype.componentDidUpdate=function(e){i(this.props,e)},t.prototype.render=function(){var e=this.props,t=(e.preferredServerEntityID,e.dispatchChangeQuickSearchSettings,a()(e,["preferredServerEntityID","dispatchChangeQuickSearchSettings"]));return f.a.createElement(D.a,t)},t}(h.Component);t.a=Object(v.b)(O,P)(j)},function(e,t,n){"use strict";var i=n(5),r=(n.n(i),
n(163)),a=n(344),o=Object(i.createSelector)(a.a,r.a,function(e,t){var n=void 0,i=e.preferredServerID;if(!i)return n;for(var r in t)if(t[r].machineIdentifier===i){n=r;break}return n});t.a=o},function(e,t,n){"use strict";function i(e){var t=e.children,n=e.isPending,i=e.shouldSelectPreferredServer;return n?d:i?p:a()(s.Fragment,{},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(73),u=n(3559),d=a()(c.a,{},void 0,a()(l.a,{})),p=a()(u.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(11),r=n(5),a=(n.n(r),n(156)),o=n(1330),s=n(1331),l=n(204),c=n(3560),u=Object(a.a)(Object(r.createSelector)(o.a,function(e){return e.reduce(function(e,t){var n=t.entityID,i=t.machineIdentifier;return n&&i&&e.push({entityID:n,machineIdentifier:i}),e},[])}),function(e){return e}),d=Object(r.createSelector)(s.a,u,function(e,t){return{preferredServerIdentifiers:e?t.find(function(t){return t.machineIdentifier===e}):void 0,serverIdentifiers:t}}),p={onSavePreferredServer:l.d}
;t.a=Object(i.b)(d,p)(c.a)},function(e,t,n){"use strict";function i(e){return e.allowImplicitSave&&1===e.serverIdentifiers.length}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),f=n(0),v=(n.n(f),n(208)),g=n(54),m=n(463),y=n.n(m),b=n(30),I=n(3),S=n(621),M=n(622),D=n(83),C=n(1332),O=a()(S.a,{},void 0,a()(v.a,{src:y.a})),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.onContinueButtonPress=function(e){i.props.onSavePreferredServer(e)},r=n,c()(i,r)}return d()(t,e),t.prototype.componentDidMount=function(){if(i(this.props)){var e=this.props.preferredServerIdentifiers||this.props.serverIdentifiers[0];this.props.onSavePreferredServer({machineIdentifier:e.machineIdentifier})}},t.prototype.render=function(){
var e=this.props,t=e.serverIdentifiers,n=e.preferredServerIdentifiers,r=Object(I.default)("Choose your preferred server"),o=[Object(I.default)("We noticed you have more than one Plex Media Server available to you."),Object(I.default)("We'll construct a personalized home screen based on the preferred server below.")];return i(this.props)?null:a()(D.a,{metricsPage:b.x,allowBackgroundLightPreset:!0,scrollDirection:g.NONE},void 0,a()(M.a,{title:r,messages:o,
url:"https://lh6.googleusercontent.com/-YAFlYG5eMoQ/UZV_Yg9W7AI/AAAAAAAAAHI/GoXAN6yT33k/s0/P43A0835.jpg"},void 0,O,a()(C.a,{preferredServerIdentifiers:n,serverIdentifiers:t,actionDescription:Object(I.default)("Continue"),onActionPress:this.onContinueButtonPress})))},t}(f.Component);h.a.shape({machineIdentifier:h.a.string.isRequired,entityID:h.a.string.isRequired});P.defaultProps={allowImplicitSave:!0},t.a=P},function(e,t){e.exports={badge:"HeroPageBadge-badge-1bcIE"}},function(e,t,n){
"use strict";function i(e){var t=e.url;return s()(u.a,{className:h.a.container,url:t,background:!0,backgroundPosition:"center center",backgroundSize:"cover",transition:!0,transitionProps:a()({className:h.a.transitionContainer},d.a)})}var r=n(6),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(208)),d=n(271),p=n(3563),h=n.n(p);t.a=i},function(e,t){e.exports={container:"HeroImg-container-vFZw-",transitionContainer:"HeroImg-transitionContainer-3-eob HeroImg-container-vFZw-"}
},function(e,t){e.exports={innerPageContent:"HeroPageContent-innerPageContent-3E0Xm PageContent-innerPageContent-3ktLT",content:"HeroPageContent-content-1IqTf PageContent-innerPageContent-3ktLT",title:"HeroPageContent-title-ssww7",message:"HeroPageContent-message-3pAdf"}},function(e,t,n){"use strict";function i(e){var t=e.isOpen,n=e.serverIdentifiers,i=e.target,r=e.onMenuClose,o=e.onPress;return a()(l.a,{className:p.a.serverMenu,target:i,isOpen:t,scrollerProps:c.b,maxHeight:c.a,onMenuClose:r
},void 0,n.map(function(e){var t=e.entityID,n=e.machineIdentifier;return a()(u.a,{serverEntityID:t,machineIdentifier:n,onPress:o},t)}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(56)),c=n(1250),u=n(3566),d=n(3569),p=n.n(d);t.a=i},function(e,t,n){"use strict";function i(){return Object(u.a)(Object(d.a)(),["activeConnection","friendlyName","isCloudSyncServer","isConnected","isOutOfDate","isRelayed","isSecure","isUnavailable","sourceTitle"])}function r(e,t){return{onPress:function(){
t.onPress({entityID:t.serverEntityID,machineIdentifier:t.machineIdentifier})}}}var a=n(6),o=n.n(a),s=n(1),l=n.n(s),c=n(11),u=n(1217),d=n(34),p=n(3567),h=Object(c.b)(i,r)(p.a);h.propTypes=o()({},h.propTypes,{machineIdentifier:l.a.string.isRequired,serverEntityID:l.a.string.isRequired}),t.a=h},function(e,t,n){"use strict";function i(e){var t=e.isConnected,n=e.isUnavailable,i=e.isSecure,r=e.isRelayed,o=e.machineIdentifier,s=e.friendlyName,d=e.onPress,h=Object(l.a)(e),f=h.statusWithSource
;return a()(c.a,{identifier:o,title:s,details:f,onPress:d},void 0,a()(u.a,{className:p.a.serverMenuIcon,isConnected:t,isUnavailable:n,isSecure:i,isRelayed:r}))}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(464),u=n(558),d=n(3568),p=n.n(d);t.a=i},function(e,t){e.exports={serverMenuIcon:"EligibleServerMenuItem-serverMenuIcon-1t1OL ServerMenuItem-serverMenuIcon-2zKCW"}},function(e,t){e.exports={
serverMenu:"EligibleServersMenu-serverMenu-31W19 ServerMenu-serverMenu-6KNnX MenuContainer-menu-2OAQT",serverMenuScroller:"EligibleServersMenu-serverMenuScroller-32wyv undefined"}},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(Object(u.a)(),function(e){return{friendlyName:e.friendlyName}})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(34)),d=n(3571),p=Object(l.b)(i)(d.a);p.propTypes=a()({},p.propTypes,{serverEntityID:s.a.string}),t.a=p
},function(e,t,n){"use strict";function i(e){var t=e.friendlyName,n=e.id,i=e.isMenuOpen,r=e.onPress;return a()(c.a,{className:p.a.button,id:n,onPress:r},void 0,t,a()(l.a,{className:p.a.disclosureArrow,direction:i?u.UP:u.DOWN}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(385)),c=n(42),u=n(226),d=n(3572),p=n.n(d);t.a=i},function(e,t){e.exports={button:"SelectedServerButton-button-3BQG- Button-button-2kT68 Link-link-2n0yJ",
disclosureArrow:"SelectedServerButton-disclosureArrow-24Lgq DisclosureArrow-disclosureArrow-1KPaB"}},function(e,t){e.exports={continueButton:"ServerSelect-continueButton-yqRJb Button-button-2kT68 Link-link-2n0yJ"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(623)),s=n(38),l=n(43),c=n(46),u=n(288),d=n(169),p=n(3576),h=n(170),f=r()(h.a,{}),v=c.a.extend({component:function(e){
var t=e.selectedServerID,n=e.selectedProviderID,i=e.params,a=void 0===i?{}:i,c=Object(s.a)(l.m,t),h=Object(s.a)(l.k,n,c);return r()(d.a,{},void 0,f,r()(u.a,{serverEntityID:c},void 0,r()(p.a,{serverEntityID:c,providerEntityID:h,sourceDirectoryKey:a.source,activeFilters:Object(o.a)(a.filters),activeFilterLabel:a.filterLabel})))}});t.a=v},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(6),a=n.n(r),o=n(7),s=n.n(o),l=(n(36),n(285))},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(5),s=(n.n(o),n(216)),l=n(199),c=n(120),u=n(3577),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";function i(){return Object(y.createSelector)(Object(D.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===x})?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(O.a)(),Object(T.a)(),Object(M.a)(),r(),function(e,t,n,i,r,a,o){return{metadataListEntityID:e.metadataList,sourceDirectory:r,columnTimes:e.columnTimes,providerIdentifier:i.identifier,isRefreshing:!!a,channels:Object(w.a)(e.columnTimes,t,o),containerKey:n}})}var o=n(12),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(5),b=(n.n(y),
n(225)),I=n(216),S=n(1275),M=n(211),D=n(119),C=n(115),O=n(51),P=n(135),j=n(84),T=n(483),w=n(1289),E=n(3578),x="hdonly",A={dispatchInitMetadataList:I.c,dispatchResetStartTime:I.h,dispatchResetMetadataList:P.i,dispatchPopulateChannelPrograms:I.f,dispatchChangeQuickSearchSettings:j.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(E.a,t)},t}(v.Component);t.a=Object(m.b)(a,A)(N)},function(e,t,n){"use strict";function i(e){
var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.sourceDirectory,o=e.activeFilters,s=e.activeFilterLabel,h=e.channels;return a()(u.a,{metricsPage:c.c,scrollDirection:l.NONE},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:r,activeFilters:o,activeFilterLabel:s,totalSize:h.length}),a()(d.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(54)),c=n(30),u=(n(89),n(83)),d=(n(93),
n(3579)),p=n(3582);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(5),v=(n.n(f),n(225)),g=n(216),m=n(3580),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(64)),c=n(1278),u=n(3581),d=n.n(u);t.a=i},function(e,t){e.exports={measureContainer:"ChannelsGridPageContent-measureContainer-AXLb8",
gridContent:"ChannelsGridPageContent-gridContent-2STJV ChannelsGrid-gridContainer-u_bmj"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.channelGridPage},Object(s.a)(),Object(o.a)(),function(e,t,n){return{datePickerTitle:Object(l.a)(1e3*e.startTime),showEPGActivity:!!t,selectedFilterTitle:n}})}var r=n(11),a=n(5),o=(n.n(a),n(1280)),s=n(211),l=n(843),c=n(3583);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(215)),f=n(118),v=n(419),g=n(102),m=n(45),y=n(27),b=n(3),I=(n(89),n(217)),S=n(289),M=n(608),D=n(1282),C=n(1284),O=(n(93),r()(g.a,{})),P=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i));return 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={isDatePickerMenuOpen:!1,isFilterMenuOpen:!1},r._datePickerMenuButtonID=Object(m.a)(),r._filterMenuButtonID=Object(m.a)(),r}return u()(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.providerEntityID,i=e.sourceDirectory,a=e.selectedFilterTitle,o=e.datePickerTitle,s=e.showEPGActivity,l=e.activeFilters,c=e.activeFilterLabel,u=e.totalSize,d=this.state,p=d.isDatePickerMenuOpen,g=d.isFilterMenuOpen;return r()(I.a,{},void 0,r()(S.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:i},void 0,r()(f.a,{title:Object(b.default)("Guide")}),r()(f.a,{id:this._datePickerMenuButtonID,title:o,hasMenu:!0,isMenuOpen:p,
onPress:this.onDatePickerMenuButtonPress}),r()(D.a,{target:this._datePickerMenuButtonID,isOpen:p,onMenuClose:this.onDatePickerMenuClose}),r()(f.a,{id:this._filterMenuButtonID,title:a,hasMenu:!0,isMenuOpen:g,onPress:this.onFilterMenuButtonPress}),r()(C.a,{target:this._filterMenuButtonID,isOpen:g,activeFilters:l,activeFilterLabel:c,onMenuClose:this.onFilterMenuClose}),r()(h.a,{},void 0,u)),s&&r()(v.a,{},void 0,r()(M.a,{serverEntityID:t,providerEntityID:n})),s&&O)},t}(p.Component);t.a=P
},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(504)),s=n(364),l=n(15),c=n(623),u=n(38),d=n(105),p=n(224),h=n(46),f=n(3585),v=n(169),g=n(170),m=r()(g.a,{}),y=h.a.extend({initialize:function(e){l.c("appModel").set("activeNavigationType",e.navigationType)},component:function(e){
var t=e.navigationType,n=e.selectedServerID,i=e.selectedProviderID,a=e.params,l=void 0===a?{}:a,h=Object(u.a)(p.SERVER,n),g=Object(u.a)(p.PROVIDER,i,h),y=l.key||l.source,b=!l.key||Object(o.a)(l.content);return r()(d.a,{metricsContext:l.context},void 0,r()(v.a,{},void 0,m,r()(f.a,{navigationType:t,serverEntityID:h,providerEntityID:g,machineIdentifier:n,sourceDirectoryKey:l.source,directoryKey:y,isContentDirectory:b,title:l.title,activeType:l.type,activeSubype:l.subtype,
activeFilters:Object(c.a)(l.filters),activeFilterLabel:l.filterLabel,activeSort:l.sort,activeLimit:Object(s.a)(l.limit),customFilter:Object(o.a)(l.customFilter),typeKey:l.typeKey,folderKey:l.folderKey,folderTitle:l.folderTitle,parentFolderKey:l.parentFolderKey,parentFolderTitle:l.parentFolderTitle})))}});t.a=y},function(e,t,n){"use strict";function i(e){var t=e.navigationType,n=e.serverEntityID,i=e.providerEntityID,r=e.machineIdentifier,o=e.sourceDirectoryKey;return i&&(n||i)?o?r===c.a?a()(h.a,{
providerEntityID:i},void 0,l.a.createElement(d.a,e)):a()(f.a,{serverEntityID:n},void 0,l.a.createElement(d.a,e)):v:a()(p.a,{navigationType:t})}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(80),u=n(282),d=n(3586),p=n(3610),h=n(617),f=n(288),v=a()(u.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(c.createStructuredSelector)({sourceDirectory:Object(d.a)()})}var r=n(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(68)),d=n(483),p=n(3587),h=Object(l.b)(i,{
saveExperienceSettings:u.l})(p.a);h.propTypes=a()({},h.propTypes,{sourceDirectoryKey:s.a.string.isRequired}),t.a=h},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.sourceDirectory,r=e.directoryKey,o=e.isContentDirectory,s=e.title,l=e.activeType,h=e.activeSubtype,f=e.activeFilters,v=e.activeFilterLabel,g=e.activeSort,m=e.activeLimit,y=e.customFilter,b=e.typeKey,I=e.folderKey,S=e.folderTitle,M=e.parentFolderKey,D=e.parentFolderTitle
;return i?i.hubKey===r?a()(c.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:i,hubKey:r}):o?a()(u.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:i,libraryKey:r,activeType:l,activeFilters:f,activeFilterLabel:v,activeSort:g,activeLimit:m,customFilter:y,typeKey:b,folderKey:I,folderTitle:S||i.title,parentFolderKey:M,parentFolderTitle:D}):a()(d.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:i,listKey:r,listTitle:s,listType:l,listSubtype:h}):p}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(89),n(282)),c=n(3588),u=n(3598),d=n(1318),p=(n(93),a()(l.a,{}));t.a=i},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(Object(d.a)(),Object(u.a)(),function(e){return e.ui.discoverPage},b,m.a,function(e,t,n,i,r){var a=n.hubs||[];return{providerIdentifier:t.identifier,providerMetricsIdentifier:t.metricsIdentifier,isProgramGuide:p.c.test(t.identifier),hubEntityIDs:a,isHubsPending:n.isHubsPending,hubsError:n.hubsError,
isEmpty:i,activeSelectionType:r.activeSelectionType}})}function r(e,t){return{onProviderChange:function(n){e(Object(g.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:null}))}}}function a(e){var t=e.ui.discoverPage;return{providerEntityID:t.providerEntityID,hubKey:t.hubKey}}function o(e,t){e(Object(v.c)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,hubKey:t.hubKey})),e(Object(v.a)({options:{
onlyTransient:!0}}))}var s=n(11),l=n(5),c=(n.n(l),n(475)),u=n(51),d=n(34),p=n(41),h=n(780),f=n(120),v=n(844),g=n(84),m=n(74),y=n(3589),b=Object(l.createSelector)(c.a,function(e){return e.ui.discoverPage.hubs},function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;n-- >0;){var i=t[n],r=e[i];if(r.type!==h.a&&(r.size||r.totalSize))return!1}return!0}),I=Object(f.a)(y.a,a,o);t.a=Object(s.b)(i,r)(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(54)),f=n(30),v=n(418),g=n(609),m=n(589),y=n(83),b=n(140),I=n(1290),S=n(492),M=(n(93),n(3590)),D=n(3592),C=n(3597),O=n.n(C),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.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.sourceDirectory,l=e.activeSelectionType,c=e.hubEntityIDs,u=e.isHubsPending,d=e.hubsError,p=e.isEmpty,C=e.hubKey,P=e.onRepopulate
;return r()(y.a,{metricsPage:f.x,metricsProperties:{identifier:a,type:s.type},allowBackgroundLightPreset:!0,scrollDirection:h.NONE},void 0,l?r()(S.a,{serverEntityID:t,providerEntityID:n}):r()(M.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:s}),r()(I.a,{serverEntityID:t,providerEntityID:n}),r()(b.a,{innerClassName:O.a.discoverPageContent},void 0,p&&r()(D.a,{serverEntityID:t,providerEntityID:n,providerIdentifier:i,sourceDirectory:s,isPending:u,error:d,onRepopulate:P}),!p&&r()(m.a,{
directoryKey:C,serverEntityID:t,providerEntityID:n,hubEntityIDs:c,sourceDirectory:s,allowHomeHubIndicator:!0,allowPersistentHomeHubStatus:!0,allowToggleHomeHub:!0}),o&&!p&&r()(v.a,{className:O.a.attribution,providerEntityID:n})),o&&r()(g.a,{serverEntityID:t,providerEntityID:n}))},t}(p.Component);t.a=P},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(s.a,Object(o.a)(),function(e,t){return{provider:e,showEPGActivity:!!t}})}var r=n(11),a=n(5),o=(n.n(a),
n(211)),s=n(37),l=n(3591);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.provider,r=e.sourceDirectory,o=e.showEPGActivity,s=i.features.actions.addToCatalog;return a()(u.a,{},void 0,a()(p.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:r}),o&&a()(l.a,{},void 0,a()(h.a,{serverEntityID:t,providerEntityID:n})),a()(c.a,{},void 0,s?a()(v.a,{providerEntityID:n}):null,s?g:null,m))}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(102),u=n(217),d=n(493),p=n(289),h=n(608),f=n(146),v=n(839),g=(n(93),n(88),a()(d.a,{})),m=a()(f.a,{});t.a=i},function(e,t,n){"use strict";function i(e){var t=e.providerIdentifier,n=e.sourceDirectory,i=a()(e,["providerIdentifier","sourceDirectory"]);return u.c.test(t)?l.a.createElement(h.a,i):n.id===c.a?l.a.createElement(d.a,i):l.a.createElement(p.a,i)}var r=n(12),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(1291),u=n(41),d=n(1292),p=n(3593),h=n(3596);t.a=i
},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{machineIdentifier:e.machineIdentifier,isCloud:e.isCloud,isFullOwnedServer:e.isFullOwnedServer}})}var r=n(11),a=n(5),o=(n.n(a),n(34)),s=n(3594);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";function i(e){var t=e.machineIdentifier,n=e.isCloud,i=e.isFullOwnedServer,r=e.isPending,o=e.error,s=e.onRepopulate;if(r)return y;if(o)return a()(f.a,{
title:n?Object(d.default)("There was an unexpected error loading this page"):Object(d.default)("There was an unexpected error loading this library")},void 0,a()(c.a,{kind:u.PRIMARY,onPress:s},void 0,Object(d.default)("Retry")));var p=i?Object(d.default)("Expecting more? Visit the Manage Libraries page to add folders and scan library files."):null;return a()(h.a,{title:n?Object(d.default)("This page is currently empty"):Object(d.default)("This library is currently empty"),description:p
},void 0,p?null:a()("div",{className:m.a.emptyDescription}),i?a()(l.a,{className:m.a.manageLibraries,kind:u.PRIMARY,to:Object(v.a)(t,"manage","libraries")},void 0,Object(d.default)("Manage libraries")):null,a()(c.a,{kind:u.PRIMARY,onPress:s},void 0,Object(d.default)("Retry")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(42)),c=n(20),u=n(49),d=n(3),p=n(31),h=n(352),f=n(618),v=n(176),g=n(3595),m=n.n(g),y=a()(h.a,{},void 0,a()(p.a,{}));t.a=i},function(e,t){e.exports={
emptyDescription:"DiscoverEmptyLibraryPage-emptyDescription-3CX6G",manageLibraries:"DiscoverEmptyLibraryPage-manageLibraries-5VHLZ"}},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()(p.a,{title:Object(l.default)("There was an unexpected error loading the Guide")}):a()(u.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(3)),c=n(31),u=n(490),d=n(352),p=n(618),h=a()(d.a,{},void 0,a()(c.a,{}));t.a=i},function(e,t){e.exports={discoverPageContent:"DiscoverPage-discoverPageContent-3vBK2 PageContent-innerPageContent-3ktLT",attribution:"DiscoverPage-attribution-1_O8m ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t,n){"use strict";function i(){return Object(l.createSelector)(function(e){return e.ui.libraryPage},Object(u.a)(),Object(c.a)(),function(e,t,n){var i=e.details;return{
librarySectionID:i&&i.librarySectionID,providerIdentifier:t.identifier,selectedType:n}})}function r(e,t){return{onLibraryChange:function(n,i){e(Object(h.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},dispatchInitLibraryPageMetadataList:function(t){e(p.initLibraryPageMetadataList(t))},dispatchPopulateLibraryFirstCharacters:function(){e(p.populateLibraryFirstCharacters())}}}function a(e){var t=e.ui.libraryPage
;return{providerEntityID:t.providerEntityID,libraryKey:t.libraryKey}}function o(e,t){e(p.initLibraryPage({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,libraryKey:t.libraryKey})),e(p.populateLibraryDetails())}var s=n(11),l=n(5),c=(n.n(l),n(234)),u=n(51),d=n(120),p=n(257),h=n(84),f=n(3599),v=Object(d.a)(f.a,a,o),g=Object(s.b)(i,r)(v);t.a=g},function(e,t,n){"use strict";function i(e,t){if(e){if(t){var n=Object(j.p)(e.type);return n?Object(j.p)(n.id).typeString:w.e}
return Object(j.m)(e.type)?Object(j.q)(e.type).typeString:e.type}}function r(e){if(e)return e.subtype}function a(){return Object(b.createSelector)(function(e,t){return t.folderKey},function(e){return e.ui.libraryPage},Object(O.a)(),Object(C.a)(),Object(M.a)(),Object(D.a)("query/parse"),Object(S.a)(),Object(I.a)(),L.a,N.a,Object(A.a)(),function(e,t,n,a,o,s){
var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},u=arguments[8],d=arguments[9],p=arguments[10],h=t.metadataList,f=t.directoryList,v=t.firstCharacters,g=t.details,m=t.isDetailsPending,y=t.isDetailsPopulated,b=t.detailsError,I=i(l,e),S=r(l),M=Object(k.a)(u,T.b,I,S,n);return{librarySectionID:g&&g.librarySectionID,containerKey:a,firstCharacterKey:o,queryParseKey:s,metadataListEntityID:h,directoryListEntityID:f,
providerIdentifier:n.identifier,providerMetricsIdentifier:n.metricsIdentifier,isProgramGuide:P.c.test(n.identifier),showLibrarySpinner:!(b||y&&(h||f)),showLibraryError:!m&&!!b,libraryErrorStatus:b&&b.status,libraryDirectories:g&&g.directories,listTitle:l.title,listType:I,listSubtype:S,listStyle:M,typeKey:l.key,selectedType:l,selectedSort:c,activeSelectionType:d.activeSelectionType,isDirectoryList:!Object(j.m)(I)&&I!==w.e,isLibraryRefreshing:p,firstCharacterCount:v?v.length:0}})}function o(e,t){
return{onLibraryChange:function(n,i){e(Object(x.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,providerIdentifier:n,sectionID:i}))},dispatchInitLibraryPageMetadataList:function(t){e(E.initLibraryPageMetadataList(t))},dispatchInitLibraryPageDirectoryList:function(t){e(E.initLibraryPageDirectoryList(t))},dispatchPopulateLibraryFirstCharacters:function(){e(E.populateLibraryFirstCharacters())}}}
var s=n(12),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(5),I=(n.n(b),n(612)),S=n(234),M=n(3600),D=n(852),C=n(3601),O=n(51),P=n(41),j=n(26),T=n(32),w=n(197),E=n(257),x=n(84),A=n(389),N=n(74),L=n(420),k=n(421),_=n(3602),R=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(_.a,t)},t}(g.Component);t.a=Object(y.b)(a,o)(R)},function(e,t,n){"use strict"
;function i(){return Object(r.a)("firstCharacter")}t.a=i;var r=n(852)},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(5),a=(n.n(r),n(852))},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(1293),v=n(30),g=n(3),m=n(32),y=(n(89),
n(31)),b=n(418),I=n(609),S=n(127),M=n(1294),D=n(83),C=n(73),O=n(282),P=n(184),j=n(1295),T=n(1304),w=n(492),E=n(62),x=(n(93),n(3603)),A=n(3605),N=n(3607),L=n(3609),k=n.n(L),_=r()(C.a,{},void 0,r()(y.a,{})),R=r()(O.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.sourceDirectory,s=e.libraryDirectories,l=e.libraryKey,c=e.containerKey,u=e.providerIdentifier,d=e.providerMetricsIdentifier,p=e.isProgramGuide,m=e.showLibrarySpinner,y=e.showLibraryError,C=e.libraryErrorStatus,O=e.selectedSort,L=e.listTitle,z=e.listType,U=e.listSubtype,B=e.listContext,F=e.listStyle,V=e.activeSelectionType,H=e.typeKey,Q=e.activeFilters,Y=e.activeFilterLabel,G=e.activeSort,W=e.activeLimit,K=e.customFilter,q=e.folderKey,Z=e.folderTitle,X=e.parentFolderKey,J=e.parentFolderTitle,$=e.isDirectoryList,ee=e.isLibraryRefreshing,te=e.firstCharacterCount,ne=this.state,ie=ne.listHeight,re=ne.scrollIndex,ae=ne.viewportHeight,oe=/titleSort/i.test(O.key),se=Math.max(ie,1),le=te>=5,ce=ae/se<=.25,ue=!q&&oe&&le&&ce,de=F===E.f,pe=!V&&!!q,he=!V&&!q
;return m?_:404===C?R:y?r()(P.a,{title:Object(g.default)("There was an unexpected error loading this library")}):r()(D.a,{metricsPage:v.F,metricsProperties:{identifier:d,mode:q?f.a:f.b,type:z,customFilter:K,style:F},allowBackgroundLightPreset:!0,scrollDirection:h.NONE},void 0,V&&r()(w.a,{serverEntityID:t,providerEntityID:n}),pe&&r()(x.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,sourceDirectory:o,libraryDirectories:s,libraryKey:l,listType:z,listSubtype:U,listContext:B,
listStyle:F,folderKey:q,folderTitle:Z,parentFolderKey:X,parentFolderTitle:J}),he&&r()(N.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i||a,sourceDirectory:o,libraryDirectories:s,libraryKey:l,listType:z,listSubtype:U,listContext:B,listStyle:F,typeKey:H,activeFilters:Q,activeFilterLabel:Y,activeSort:G,customFilter:K,showSortsMenu:!de}),K&&r()(j.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,providerIdentifier:u,typeKey:H,activeSort:G,activeLimit:W,selectedSort:O
}),de&&r()(M.a,{providerEntityID:n,listType:z,listSubtype:U,listContext:B,typeKey:H,activeFilters:Q,activeFilterLabel:Y,activeSort:G,customFilter:K,selectedSort:O,isFolder:!!q,isDisabled:!!q}),r()(S.a,{component:A.a,serverEntityID:t,providerEntityID:n,metadataListEntityID:i||a,sourceDirectory:o,containerKey:c,containerTitle:Z,providerIdentifier:u,hasGutter:ue,scrollIndex:re,listTitle:L,listType:z,listSubtype:U,listContext:B,listStyle:F,typeKey:H,activeFilters:Q,activeSort:G,selectedSort:O,
initialSize:50,shouldResetOnUnmount:!0,isDirectoryList:$,isLibraryRefreshing:ee,isFolder:!!q,onListScrollIndexChange:this.onListScrollIndexChange,onListUpdate:this.onListUpdate,onMeasure:this.onMeasure},void 0,p&&r()(b.a,{className:k.a.attribution,providerEntityID:n})),ue&&r()(T.a,{activeSort:G,viewportHeight:ae,onJumpBarItemPress:this.onJumpBarItemPress}),p&&r()(I.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:m.b,scrollIndex:0,listHeight:0,viewportHeight:0},t.a=z},function(e,t,n){"use strict";function i(){return Object(o.createSelector)(function(e,t){return t.sourceDirectory},function(e,t){return t.folderKey},function(e,t){
return t.folderTitle},function(e,t){return t.parentFolderKey},function(e,t){return t.parentFolderTitle},Object(p.a)(),Object(d.a)(),function(e,t,n,i,r,a,o){var l=Object(f.a)(o,e);if(!l)return null;var c=e.key,u={source:e.key,folderKey:i,folderTitle:r};if(!i){var d=c+"/folder";if(d===t)return null;u.folderKey=d,u.folderTitle=e.title}return s.join(Object(m.a)(l.key,a,o),u)})}function r(){return Object(o.createSelector)(function(e,t){return t.sourceDirectory},function(e,t){return t.listType
},function(e,t){return t.libraryDirectories},Object(p.a)(),Object(d.a)(),Object(l.a)(),c.a,Object(u.a)(),i(),function(e,t,n,i,r,a,o,s,l){var c=Object(v.a)(t,null,h.b,r),u={key:"folder"},d=Object(g.a)({server:i,provider:r,sourceDirectory:e,libraryDirectories:n});return{parentRoute:l,size:s.totalSize||s.metadataItems.length,metadataTypes:o,metadataPseudoTypes:d,selectedType:u,allListStyles:c}})}var a=n(11),o=n(5),s=(n.n(o),
n(19)),l=n(199),c=n(283),u=n(119),d=n(51),p=n(34),h=n(32),f=n(591),v=n(351),g=n(1333),m=n(484),y=n(3604);t.a=Object(a.b)(r)(y.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(215)),f=n(118),v=n(102),g=n(45),m=n(3),y=(n(32),n(217)),b=n(289),I=n(146),S=n(422),M=(n(62),n(93),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(g.a)(),r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.sourceDirectory,a=e.folderTitle,o=e.parentFolderTitle,s=e.parentRoute,l=e.size,c=e.listType,u=e.listContext,d=e.listStyle,p=e.metadataTypes,g=e.metadataPseudoTypes,M=e.selectedType,D=e.allListStyles,C=this.state.isTypesMenuOpen;return r()(y.a,{},void 0,r()(b.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:i},void 0,r()(f.a,{id:this._typesMenuButtonID,title:Object(m.default)("Folders"),hasMenu:!0,isMenuOpen:C,
onPress:this.onTypesMenuButtonPress}),r()(S.a,{target:this._typesMenuButtonID,isOpen:C,types:p,pseudoTypes:g,selectedType:M,activeFilters:[],onMenuClose:this.onTypesMenuClose}),!!s&&r()(f.a,{title:o||i.title,hasMenu:!1,to:s}),r()(f.a,{title:a}),r()(h.a,{},void 0,l)),r()(v.a,{},void 0,r()(I.a,{listType:c,listContext:u,selectedListStyle:d,allListStyles:D})))},t}(p.Component));t.a=M},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.isFolder,b=e.isLibraryRefreshing,I=o||r.length;return s||p&&I?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,isFolder:y,isLibraryRefreshing:b}))}
var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=(n(89),n(140)),u=n(1319),d=n(3606);t.a=i},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,s=e.activeFilters,l=e.activeSort,b=e.listType,I=e.isFolder,S=e.isLibraryRefreshing,M=p.a[b];return r?a()(m.a,{title:Object(h.default)("There was an unexpected error loading this library")}):c.a.isEmpty(s)?d.c.test(i)?a()(v.a,{serverEntityID:t,providerEntityID:n
}):S?a()(g.a,{icon:M,title:Object(h.default)("Libraries are currently being updated"),description:Object(h.default)("Hang tight while we look for your content")}):a()(g.a,{icon:M,title:I?Object(h.default)("There are no items in this folder"):Object(h.default)("There are no items in this library")}):a()(g.a,{icon:M,title:Object(h.default)("The active filter has no matches"),description:Object(h.default)("Use the menu above to change the active filter")},void 0,a()(u.a,{to:Object(f.a)({typeKey:o,
sort:l}),kind:y.b.PRIMARY},void 0,Object(h.default)("Clear filter")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(7)),c=n.n(l),u=n(20),d=n(41),p=n(467),h=n(3),f=(n(89),n(256)),v=n(490),g=n(352),m=n(618),y=n(23);t.a=i},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.sourceDirectory},function(e,t){return t.libraryKey},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(p.a)(),Object(u.a)(),d.a,l.a,Object(c.a)(),Object(s.a)(),Object(f.a)(),Object(o.a)(),function(e,t,n,i,r,a,o,s,l,c,u,d,p,f){var m=Object(v.a)(n,i,h.b,l);return{provider:l,metadataTypes:c,metadataPseudoTypes:Object(g.a)({server:o,provider:s,sourceDirectory:e,libraryKey:t,libraryDirectories:a}),selectedType:d,selectedFilterTitle:p,selectedSort:f,listType:n,listStyle:r,allListStyles:m,totalSize:u.totalSize}})}var r=n(11),a=n(5),o=(n.n(a),
n(612)),s=n(234),l=n(283),c=n(119),u=n(51),d=n(37),p=n(34),h=n(32),f=n(1301),v=n(351),g=n(1333),m=n(3608);t.a=Object(r.b)(i)(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(215)),f=n(118),v=n(102),g=n(45),m=n(27),y=n(3),b=(n(32),n(89),n(217)),I=n(289),S=n(146),M=n(853),D=n(416),C=n(1302),O=n(1303),P=n(422),j=(n(62),n(93),n(88),function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i))
;return 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={
isFiltersMenuOpen:!1,isTypesMenuOpen:!1,isSortsMenuOpen:!1},r._filtersMenuButtonID=Object(g.a)(),r._sortsMenuButtonID=Object(g.a)(),r._typesMenuButtonID=Object(g.a)(),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.providerEntityID,i=e.metadataListEntityID,a=e.provider,o=e.sourceDirectory,s=e.listType,l=e.listSubtype,c=e.listContext,u=e.listStyle,d=e.typeKey,p=e.activeFilters,g=e.activeFilterLabel,m=e.activeSort,j=e.activeLimit,T=e.metadataTypes,w=e.metadataPseudoTypes,E=e.selectedType,x=e.selectedFilterTitle,A=e.selectedSort,N=e.customFilter,L=e.totalSize,k=e.showSortsMenu,_=e.allListStyles,R=this.state,z=R.isFiltersMenuOpen,U=R.isTypesMenuOpen,B=R.isSortsMenuOpen,F=!!E&&E.filters.length>0,V=!!E&&T.length+w.length>0,H=!!(k&&A&&E.sorts.length>1)
;return r()(b.a,{},void 0,r()(I.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:o},void 0,F&&r()(f.a,{id:this._filtersMenuButtonID,title:x,hasMenu:!0,isMenuOpen:z,onPress:this.onFiltersMenuButtonPress}),F&&r()(C.a,{serverEntityID:t,providerEntityID:n,target:this._filtersMenuButtonID,isOpen:z,typeKey:d,activeFilters:p,activeFilterLabel:g,activeSort:m,selectedType:E,showCustomFilter:!!a.features.queryParser,onMenuClose:this.onFiltersMenuClose}),V&&r()(f.a,{id:this._typesMenuButtonID,
title:E.title,hasMenu:T.length+w.length>1,isMenuOpen:U,onPress:this.onTypesMenuButtonPress}),V&&r()(P.a,{target:this._typesMenuButtonID,isOpen:U,types:T,pseudoTypes:w,activeFilters:p,activeSort:m,activeLimit:j,customFilter:N,selectedType:E,onMenuClose:this.onTypesMenuClose}),H&&r()(f.a,{id:this._sortsMenuButtonID,title:Object(y.default)("By {sortTitle}",{sortTitle:A.title}),hasMenu:!0,isMenuOpen:B,onPress:this.onSortsMenuButtonPress}),H&&r()(O.a,{target:this._sortsMenuButtonID,isOpen:B,
typeKey:d,activeFilters:p,activeFilterLabel:g,activeSort:m,activeLimit:j,customFilter:N,sorts:E.sorts,selectedSort:A,onMenuClose:this.onSortsMenuClose}),r()(h.a,{},void 0,L)),r()(v.a,{},void 0,r()(D.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:s,selectedType:E,isLibraryList:!0}),r()(M.a,{selectedListStyle:u,allListStyles:_}),r()(S.a,{listType:s,listSubtype:l,listContext:c,selectedListStyle:u,allListStyles:_})))},t}(p.Component));j.defaultProps={showSortsMenu:!0},t.a=j
},function(e,t){e.exports={attribution:"LibraryPage-attribution-1hvSU ProgramGuideAttribution-attribution-3Ca_I"}},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(function(e,t){return t.navigationType},D.a,j,C.a,function(e,t,n,i){var r=S.n(e),a=n[e],o=!1,s=!0,l=void 0,c=void 0,u=void 0;if(a){var d=t.find(function(e){var t=e.server,n=e.provider;return a.machineIdentifier===t.machineIdentifier&&a.providerIdentifier===(n&&n.identifier)})||{},p=d.server,h=d.provider
;if(!p||p.isConnected||p.isPending){if(p&&!p.isConnected&&p.isPending)return Object(g.a)("[Source] Waiting for last selected source for %s (%s/%s%s)",e,a.machineIdentifier,a.providerIdentifier,a.directoryKey),{isPending:!0,isProvidersReady:i}}else s=!1,o=!0;var f=Object(I.a)(h);if(f){f.directories.find(function(e){return a.directoryKey===e.hubKey||a.directoryKey===e.key})&&(s=!1,o=!0)}}
if(o)return Object(g.a)("[Source] Using last selected source for %s (%s/%s%s)",e,a.machineIdentifier,a.providerIdentifier,a.directoryKey),{isPending:s,isProvidersReady:i,lastTypeSource:n,navigationType:e,machineIdentifier:a.machineIdentifier,providerIdentifier:a.providerIdentifier,directoryKey:a.directoryKey};a&&Object(g.a)("[Source] Last selected source for %s not found (%s/%s%s)",e,a.machineIdentifier,a.providerIdentifier,a.directoryKey);e:for(var v=0;v<t.length;v++){var m=function(n){
var i=t[n],a=i.server,o=i.provider,d=Object(I.a)(o);if(!d||!a.isConnected)return"continue";var p=a.machineIdentifier,h=o.identifier,f=d.directories.find(function(e){return Object(O.a)(r,o,e)});return f?(l=p,c=h,u=f.hubKey||f.key,s=!1,Object(g.a)("[Source] Selecting best source for %s (%s/%s%s)",e,l,c,u),"break"):void 0}(v);switch(m){case"continue":continue;case"break":break e}}return{isPending:s,isProvidersReady:i,navigationType:e,machineIdentifier:l,providerIdentifier:c,directoryKey:u}})}
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(5),g=(n.n(v),n(29)),m=n(19),y=n(70),b=n(80),I=n(397),S=n(195),M=n(68),D=n(466),C=n(1321),O=n(563),P=n(3611),j=Object(v.createSelector)(y.a,function(e){return e.lastTypeSource}),T={dispatchSaveLastTypeSource:M.m,dispatchRedirectToHash:M.g},w=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.componentDidMount=function(){
this.props.isPending||this._redirect(this.props)},t.prototype.componentDidUpdate=function(e){!this.props.isPending&&e.isPending&&this._redirect(this.props)},t.prototype._redirect=function(e){if(!this._hasRedirected){var t=e.navigationType,n=e.machineIdentifier,i=e.providerIdentifier,r=e.directoryKey;this.props.dispatchSaveLastTypeSource({navigationType:t,machineIdentifier:n,providerIdentifier:i,directoryKey:r});var a=m.join([t,n===b.a?null:n,i],{source:r});this.props.dispatchRedirectToHash({
hash:"!/"+a}),this._hasRedirected=!0}},t.prototype.render=function(){var e=this.props,t=e.isPending,n=e.isProvidersReady,i=e.navigationType,r=e.component,o=!this._hasRedirected&&t&&n;return a()(r,{navigationType:i,noBestSourceFound:o})},t}(h.Component);w.defaultProps={component:P.a},t.a=Object(f.b)(i,T)(w)},function(e,t,n){"use strict";function i(e){var t=e.navigationType;return e.noBestSourceFound?a()(d.a,{metricsPage:c.x,allowBackgroundLightPreset:!0,scrollDirection:l.NONE},void 0,a()(h.a,{
navigationType:t})):f}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(54)),c=n(30),u=n(31),d=n(83),p=n(73),h=n(3612),f=a()(p.a,{},void 0,a()(u.a,{}));t.a=i},function(e,t,n){"use strict";function i(e){switch(e){case u.c:return{zeroStateDetails:Object(c.default)("Add your movie collection to Plex and enjoy your favorite flicks anytime, anywhere."),zeroStateImage:h.a};case u.h:return{
zeroStateDetails:Object(c.default)("Got TV? Plex is the best way to watch. Add your library now and binge away!"),zeroStateImage:b.a};case u.d:return{zeroStateDetails:Object(c.default)("Your music collection rocks. Plex makes it rock even harder. Get on it, jam master!"),zeroStateImage:v.a};case u.f:return{zeroStateDetails:Object(c.default)("Plex organizes your photos automagically and lets you enjoy them anywhere, big screen or small. Add some now!"),zeroStateImage:m.a};case u.i:return{
zeroStateDetails:Object(c.default)("Add your personal video collection to Plex and enjoy your precious moments anytime, anywhere."),zeroStateImage:h.a};default:return{zeroStateDetails:null,zeroStateImage:null}}}function r(){return Object(l.createSelector)(function(e,t){return t.navigationType},function(e){var t=Object(u.n)(e);return{navigationType:o()({key:t.key,title:t.title,sectionTypeKey:t.sectionTypeKey},i(e))}})}var a=n(6),o=n.n(a),s=n(11),l=n(5),c=(n.n(l),
n(3)),u=n(195),d=n(3613),p=n(3621),h=n.n(p),f=n(3622),v=n.n(f),g=n(3623),m=n.n(g),y=n(3624),b=n.n(y);t.a=Object(s.b)(r)(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(195)),f=n(3614),v=n(3616),g=n(3619),m=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.navigationType;return e.sectionTypeKey?r()(g.a,{type:e.title,
details:e.zeroStateDetails,image:e.zeroStateImage,sectionTypeKey:e.sectionTypeKey}):e.key===h.a?r()(f.a,{image:e.zeroStateImage}):r()(v.a,{type:e.title})},t}(p.Component);t.a=m},function(e,t,n){"use strict";function i(){return a()(p.a,{title:Object(u.default)("Get Live TV & DVR in Plex"),messages:[Object(u.default)("Set up a tuner and Plex DVR to enjoy free, high definition TV anytime, anywhere!")],url:f.a},void 0,v)}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),
n(208)),l=n(463),c=n.n(l),u=n(3),d=n(621),p=n(622),h=n(3615),f=n.n(h),v=a()(d.a,{},void 0,a()(s.a,{src:c.a}));t.a=i},function(e,t,n){e.exports=n.p+"desktop/common/img/banners/zero-state-dvr.83425971b07afe6de5a96074b8f15f6b.jpg"},function(e,t,n){"use strict";function i(e){var t=e.type;return a()(h.a,{title:Object(u.default)("Houston we have a problem..."),messages:[Object(u.default)("Plex can't seem to find media for {type}. Try refreshing, or if problems persist visit our forums",{type:t})],
url:g.a},void 0,a()(p.a,{},void 0,a()(d.a,{className:y.a.icon,name:"plex-icon-alert-560"})),a()(l.a,{to:c.a,target:"_blank",kind:f.b.PRIMARY},void 0,Object(u.default)("Go to Forums")))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(20)),c=n(334),u=n(3),d=n(25),p=n(621),h=n(622),f=n(23),v=n(3617),g=n.n(v),m=n(3618),y=n.n(m);t.a=i},function(e,t,n){e.exports=n.p+"desktop/common/img/banners/error.3a995c78fe4e07762e2ea8efa5726fe5.jpg"},function(e,t){e.exports={
icon:"GenericZeroStatePageContent-icon-2xb4A"}},function(e,t,n){"use strict";function i(e,t){var n=u.f.get(t.sectionTypeKey),i={metricsPage:t.metricsPage,options:{seedAttrs:{type:n.key,title:n.title,language:n.defaultLanguage}}};return{onAddLibraryPress:function(t){var n=t.entityID;e(p.a(a()({serverEntityID:n},i)))}}}var r=n(6),a=n.n(r),o=n(5),s=(n.n(o),n(156)),l=n(1113),c=n(1331),u=n(130),d=n(55),p=n(183),h=n(3620),f=Object(s.a)(Object(o.createSelector)(l.a,function(e){return e.map(function(e){
return{entityID:e.entityID,machineIdentifier:e.machineIdentifier}})}),function(e){return e}),v=Object(o.createSelector)(c.a,f,function(e,t){var n=t.find(function(t){return t.machineIdentifier===e});return!n&&t.length>0&&(n=t[0]),{preferredServerIdentifiers:n,serverIdentifiers:t}});t.a=Object(d.a)(v,i)(h.a)},function(e,t,n){"use strict";function i(e){var t=e.preferredServerIdentifiers,n=e.serverIdentifiers,i=e.type,r=e.details,o=e.image,s=e.onAddLibraryPress;return a()(f.a,{
title:Object(p.default)("Add {type} to Plex",{type:i}),messages:r?[r]:[],url:o},void 0,g,a()(v.a,{preferredServerIdentifiers:t,serverIdentifiers:n,actionDescription:Object(p.default)("Add Library"),onActionPress:s}))}var r=n(2),a=n.n(r),o=n(1),s=n.n(o),l=n(0),c=(n.n(l),n(208)),u=n(463),d=n.n(u),p=n(3),h=n(621),f=n(622),v=n(1332),g=a()(h.a,{},void 0,a()(c.a,{src:d.a}));s.a.shape({machineIdentifier:s.a.string.isRequired,entityID:s.a.string.isRequired});t.a=i},function(e,t,n){
e.exports=n.p+"desktop/common/img/banners/zero-state-movies.25090dd37e4e1699169a07444d5fa089.jpg"},function(e,t,n){e.exports=n.p+"desktop/common/img/banners/zero-state-music.3d1d1dbc2cadf7b2fa25ce3edb0af711.jpg"},function(e,t,n){e.exports=n.p+"desktop/common/img/banners/zero-state-photos.ed650e92ee0271a6a986be83cb09e1c5.jpg"},function(e,t,n){e.exports=n.p+"desktop/common/img/banners/zero-state-shows.a3fae7afcf3bfeef05071e671da79ab0.jpg"},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(38)),s=n(43),l=n(46),c=n(288),u=n(169),d=n(3626),p=n(170),h=r()(p.a,{}),f=l.a.extend({component:function(e){var t=e.navigationType,n=e.selectedServerID,i=e.selectedProviderID,a=e.params,l=void 0===a?{}:a,p=Object(o.a)(s.m,n),f=Object(o.a)(s.k,i,p);return r()(u.a,{},void 0,h,r()(c.a,{serverEntityID:p},void 0,r()(d.a,{navigationType:t,serverEntityID:p,providerEntityID:f,sourceDirectoryKey:l.source,libraryKey:l.key})))}});t.a=f},function(e,t,n){"use strict"
;function i(){return Object(l.createSelector)(function(e,t){return t.libraryKey},function(e){return e.ui.timelinePage},S,d.a,Object(u.a)(),Object(m.a)(),y.a,Object(g.a)(),p.a,function(e,t,n,i,r,a,o,s,l){var u=t.details,d=t.containerKey,p=t.isMomentListPending,h=t.isMomentListPopulated,f=t.momentListError,v=Object(b.a)(i,r,e,{save:1});return{metadataListEntityID:t.metadataList,providerIdentifier:r.identifier,providerMetricsIdentifier:r.metricsIdentifier,librarySectionID:u&&u.librarySectionID,
sourceDirectory:a,libraryRoute:v,moments:n,isMomentListPending:p,isMomentListPopulated:h,momentListError:f,containerKey:d,momentKey:c.join(e,"cluster?clusterZoomLevel=1"),activeSelectionType:o.activeSelectionType,disableReloadThreshold:!!o.activeSelectionType,isLibraryRefreshing:s,columnAdjustment:l.columnAdjustment}})}function r(e,t){return{onLibraryChange:function(n,i){e(Object(f.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,
providerIdentifier:n,sectionID:i}))},onCloseTimelinePage:function(){e(v.a({}))}}}function a(e){var t=e.ui.timelinePage;return{serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,momentKey:t.momentKey}}function o(e,t){e(v.b({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,libraryKey:t.libraryKey,momentKey:t.momentKey})),e(v.c())}var s=n(11),l=n(5),c=(n.n(l),
n(19)),u=n(51),d=n(50),p=n(70),h=n(120),f=n(84),v=n(1305),g=n(389),m=n(483),y=n(74),b=n(133),I=n(3627),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(h.a)(I.a,a,o),D=Object(s.b)(i,r)(M);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(64)),f=n(20),v=n(175),g=n(30),m=n(3),y=n(31),b=n(83),I=n(73),S=n(113),M=n(184),D=n(492),C=n(23),O=n(62),P=(n(93),n(3628)),j=n(3630),T=n(3632),w=n.n(T),E=r()(I.a,{},void 0,r()(y.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.metadataListEntityID,o=e.sourceDirectory,s=e.isMomentListPending,l=e.isMomentListPopulated,c=e.momentListError,u=e.moments,d=e.libraryRoute,p=e.activeSelectionType,y=e.columnAdjustment,I=this.state,T=I.isMeasured,x=I.width,A=I.height,N=I.currentMomentTitle,L=200-100*y,k=12+y,_=Math.min(Math.ceil(x/L),k);return l?r()(b.a,{metricsPage:g.F,metricsProperties:{identifier:i,mode:"timeline",type:"photo",style:O.b
},allowBackgroundLightPreset:!0,scrollDirection:C.d.NONE},void 0,p?r()(D.a,{serverEntityID:t,providerEntityID:n}):r()(j.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,sourceDirectory:o,title:N}),r()(h.a,{className:w.a.measured,ignorePosition:!0,onMeasure:this.onMeasure},void 0,T&&r()(P.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,moments:u,columns:_,height:A,onMomentScrollIndexChange:this.onMomentScrollIndexChange}))):s?E:c?r()(M.a,{
title:Object(m.default)("There was an unexpected error loading this library")}):r()(S.a,{title:Object(m.default)("There was an error loading the timeline for this library"),description:Object(m.default)("The photos timeline requires Plex Media Server {version} or higher",{version:v.a.itemClusters})},void 0,r()(f.a,{to:d,kind:C.b.PRIMARY},void 0,Object(m.default)("Browse by Type")))},t}(p.Component);t.a=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),n(7)),f=n.n(h),v=n(467),g=n(3),m=n(1306),y=n(1308),b=n(1312),I=n(140),S=n(352),M=n(1313),D=n(44),C=n.n(D),O=n(3629),P=n.n(O),j=Math.max(0,parseInt(C.a.timelineGutter,10)-40),T=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=f.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:P.a.container},void 0,r()(b.a,{className:P.a.stack,
scrollerClassName:P.a.scroller,serverEntityID:t,providerEntityID:n,metadataListEntityID:i,scrollPositionStorageKey:"TimelinePageContent",keyPropName:"id",items:a,size:a.length,columns:o,footerHeight:59,listPadding:55,listGutter:j,hasNestedList:!0,cellComponent:y.a,onListScrollIndexChange:l,onListUpdate:this.onListUpdate}),r()("div",{className:P.a.adornment},void 0,u&&h&&r()(m.a,{pixelProportion:p,ticks:u}))):r()(I.a,{},void 0,r()(S.a,{icon:v.a.photo,
title:Object(g.default)("There are no events in this library")}))},t}(p.Component);t.a=T},function(e,t){e.exports={container:"TimelinePageContent-container-To7vp",stack:"TimelinePageContent-stack-U-1ux PageContent-pageContent-16mK6",adornment:"TimelinePageContent-adornment-3eAmr",scroller:"TimelinePageContent-scroller-3tUHZ"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(o.a)(),function(e){return{totalSize:e.totalSize,listType:s.g,listStyle:l.b,
allListStyles:[l.b]}})}var r=n(11),a=n(5),o=(n.n(a),n(119)),s=n(197),l=n(62),c=n(3631);t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataListEntityID,r=e.sourceDirectory,o=e.title,s=e.totalSize,m=e.listType,y=e.listStyle,b=e.allListStyles;return a()(p.a,{},void 0,a()(h.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:r},void 0,a()(c.a,{title:Object(d.default)("Timeline")}),a()(c.a,{title:o
}),a()(l.a,{},void 0,s)),a()(u.a,{},void 0,a()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,listType:m,isLibraryList:!0}),a()(v.a,{selectedListStyle:y,allListStyles:b}),a()(f.a,{selectedListStyle:y,allListStyles:b})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(215)),c=n(118),u=n(102),d=n(3),p=n(217),h=n(289),f=n(146),v=n(853),g=n(416);n(62),n(93);t.a=i},function(e,t){e.exports={measured:"TimelinePage-measured-1z6he"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(38)),s=n(43),l=n(46),c=n(288),u=n(169),d=n(3634),p=n(170),h=r()(p.a,{}),f=l.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params,a=void 0===i?{}:i,l=Object(o.a)(s.m,t),p=Object(o.a)(s.k,n,l);return r()(u.a,{},void 0,h,r()(c.a,{serverEntityID:l},void 0,r()(d.a,{serverEntityID:l,providerEntityID:p,sourceDirectoryKey:a.source,selectedViewType:a.view})))}});t.a=f},function(e,t,n){"use strict";function i(){
return Object(m.createSelector)(S.a,Object(I.a)(y.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(M.a)(),Object(P.a)(),i(),D.a,function(e,t,n,i,r,a){var o=e.isPagePopulated,s=e.isCalendarPopulated,l=e.calendarError,c=e.isMediaSubscriptionsPopulated,u=e.mediaSubscriptionsError,d=e.calendar,p=!s&&!l,h=!c&&!u,f=p||h;return{
sourceDirectory:i,isPagePopulated:o,showSpinner:f,showEmptyState:!f&&c&&!e.mediaSubscriptions.length&&s&&!d.scheduled.length,programGuideIdentifier:r,time:d?d.time:void 0,selectedViewType:t||a.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(6),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(5),y=(n.n(m),n(60)),b=n(353),I=n(746),S=n(132),M=n(34),D=n(70),C=n(35),O=n(68),P=n(483),j=n(3635),T=p()({saveExperienceSettings:O.l},b),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(C.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,T)(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(27),v=n(30),g=n(83),m=n(410),y=n(23),b=(n(93),n(3636)),I=n(3684),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(f.a)(this,e,t)},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.sourceDirectory,a=e.selectedViewType;return r()(g.a,{metricsPage:v._4,metricsProperties:{pane:a},scrollDirection:y.d.NONE},void 0,r()(I.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:i,selectedViewType:a}),h.a.createElement(b.a,this.props))},t}(p.Component);t.a=Object(m.a)(S)},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.sourceDirectory
},Object(s.a)(),Object(o.a)(),function(e,t,n){return{guideRoute:Object(l.a)(t,n,e,{key:"/"+n.identifier+"/watchnow"})}})}var r=n(11),a=n(5),o=(n.n(a),n(51)),s=n(34),l=n(590),c=n(3637);t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.showSpinner,i=e.showEmptyState,r=e.programGuideIdentifier,o=e.selectedViewType,s=e.guideRoute;return n?I:i&&r?a()(p.a,{},void 0,a()(v.a,{icon:"plex-icon-calendar-560",
title:Object(c.default)("You have no recordings scheduled")},void 0,a()("span",{className:b.a.emptyDescription},void 0,a()(u.a,{message:Object(c.default)("Check out the {openLink}Guide{closeLink} to browse available programming"),tags:[{open:"openLink",close:"closeLink",component:l.a,kind:g.b.PRIMARY,to:s}]})))):i&&!r?a()(p.a,{},void 0,a()(v.a,{icon:"plex-icon-calendar-560",title:Object(c.default)("You have no recordings scheduled"),
description:Object(c.default)("You need a DVR before you can schedule recordings")})):a()("div",{className:b.a.schedulePageContent},void 0,a()(p.a,{innerClassName:b.a.schedulePageInnerContent},void 0,o===g.c.CALENDAR&&a()(f.a,{serverEntityID:t}),o===g.c.AGENDA&&a()(h.a,{serverEntityID:t})),a()(m.a,{serverEntityID:t,guideRoute:s}))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),
n(20)),c=n(3),u=n(179),d=n(31),p=n(140),h=n(1336),f=n(1344),v=n(352),g=n(23),m=n(3670),y=n(3683),b=n.n(y),I=a()(p.a,{},void 0,a()(v.a,{},void 0,a()(d.a,{})));t.a=i},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()(d.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(3)),c=n(284),u=n(1337),d=n(3639),p=n(3647),h=a()(p.a,{});t.a=i},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(5),o=(n.n(a),n(3640));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(48),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(38)),d=n(43),p=n(1338),h=n(3641);t.a=i},function(e,t,n){"use strict";function i(e,t,n,i,r,a){return"episode"!==e?n:t+" - "+Object(D.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(48),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=(n.n(v),
n(326)),m=n(20),y=n(27),b=n(123),I=n(477),S=n(407),M=n(572),D=n(435),C=n(3),O=n(272),P=n(196),j=n(1339),T=n(250),w=n(281),E=n(342),x=n(842),A=n(1342),N=n(3646),L=n.n(N),k={context:b.a},_=a()(x.a,{}),R=a()(g.a,{}),z=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(y.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,p=e.parentIndex,f=e.originallyAvailableAt,v=e.error,g=e.mediaItem,y=e.isRecording,b=e.isPostProcessing,D=e.recordingProgress,x=e.isComplete,N=e.hasError,z=e.hasSubscription,U=e.hasConflicts,B=e.showPlay,F=e.showDate,V=e.timeFormat,H=e.onPlayPress,Q=this.state,Y=Q.isAiringDetailsModalOpen,G=Q.isSubscribeModalOpen,W=Q.isConflictsModalOpen,K=g.beginsAt,q=g.endsAt,Z=g.startOffsetSeconds,X=void 0===Z?0:Z,J=g.endOffsetSeconds,$=void 0===J?0:J,ee=g.premiere,te=h.a.unix(K),ne=Object(I.a)(K-X,q+$,{
timeFormat:V}),ie=Object(S.a)(K),re=te.format("ddd, MMM D");Object(M.a)(K)?re=Object(C.default)("Yesterday"):ie&&(re=Object(C.default)("Today"));var ae=u||c,oe=i(l,u,c,p,d,f);return a()("div",{className:(L.a.event||"")+" "+(x&&L.a.isComplete||"")+" "+(N&&L.a.hasError||""||"")},void 0,a()(m.a,{className:L.a.underlay,to:s,onPress:s?void 0:this.onLinkPress}),a()("div",{className:L.a.overlay},void 0,a()("div",{className:(L.a.date||"")+" "+(ie&&L.a.isToday||""||"")},void 0,F?re:null),a()("div",{
className:L.a.time},void 0,ne),a()("div",{className:L.a.title,title:oe},void 0,ee?_:null,ae,a()("div",{className:L.a.titleDetails},void 0,"movie"===l?a()(E.a,{metadataItemEntityID:o}):null,"episode"===l?a()(w.a,{metadataItemEntityID:o}):null)),a()("div",{className:L.a.status},void 0,!y||b||N?null:a()("div",{className:L.a.recording},void 0,a()(O.a,{size:24,backgroundClassName:L.a.recordingProgressBackground,lineWidth:2,progress:D,showProgressText:!1}),a()("span",{className:L.a.recordingIcon
})),y&&b&&!N?R:null,B?a()(P.a,{title:c,onPress:H}):null,N?a()(A.a,{error:v,onPress:U?this.onConflictIconPress:this.onLinkPress}):null)),z?a()(j.a,{isOpen:Y,metricsProperties:k,serverEntityID:t,metadataItemEntityID:o,error:v,mediaItem:g,hasSubscription:z,isComplete:x,hasError:N,isRecording:y,recordingProgress:D,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}):null,z?a()(T.a,{isOpen:G||W,metricsProperties:k,serverEntityID:t,providerEntityID:n,
mediaSubscriptionEntityID:r,metadataItemEntityID:o,subscriptionType:l,showConflicts:W,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}):null)},t}(v.Component);t.a=z},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e){return e.experienceSettings.timeFormat},Object(p.a)(),function(e,t){var n=d.a.pick(t,"type","title","parentTitle","grandparentTitle","thumb","parentThumb","grandparentThumb","index","parentIndex","originallyAvailableAt","summary")
;return n.timeFormat=e,n})}function r(e){return s.a.createElement(h.a,e)}var a=n(1),o=(n.n(a),n(0)),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(7)),d=n.n(u),p=n(22),h=n(3643);t.a=Object(l.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,P=e.timeFormat,j=e.onRecordingModify,T=e.onModalClose,w=s()(e,["serverEntityID","providerEntityID","summary","error","mediaItem","isComplete","hasError","isRecording","recordingProgress","timeFormat","onRecordingModify","onModalClose"]),E=o.beginsAt,x=o.endsAt,A=o.startOffsetSeconds,N=o.endOffsetSeconds,L=o.channelTitle,k=!(!A&&!N),_=A&&Math.round(A/60),R=N&&Math.round(N/60)
;return a()(y.a,{onModalClose:T},void 0,a()(v.a,{},void 0,Object(g.default)("Airing Details")),a()(p.a,{},void 0,a()(M.a,{serverEntityID:t,providerEntityID:n,target:w},void 0,a()(b.a,{mediaItem:o},void 0,a()(I.a,{beginsAt:E,endsAt:x,channel:L,showFullTime:!0,showChannel:!0,timeFormat:P},void 0,a()("div",{},void 0,l&&a()("span",{},void 0,a()(m.a,{className:C.a.completeIcon,name:"plex-icon-selected-560"}),Object(g.default)("Recorded successfully")),D&&a()("span",{},void 0,a()(m.a,{
className:C.a.recordingIcon,name:"plex-icon-dvr-single-560"}),Object(g.default)("Recording"),a()(u.b,{className:C.a.separator}),Object(g.default)("{recordingProgress}% complete",{recordingProgress:O})),c&&a()("span",{},void 0,a()(m.a,{className:C.a.errorIcon,name:"plex-icon-alert-560"}),r),!l&&!D&&!c&&k&&a()("span",{},void 0,_?a()("span",{},void 0,Object(g.default)("Recording starts {minuteOffset} min early",{minuteOffset:_}),!!R&&a()("span",{},void 0,a()(u.b,{className:C.a.separator
}),Object(g.default)("Ends {minuteOffset} min late",{minuteOffset:R}))):a()("span",{},void 0,Object(g.default)("Recording ends {minuteOffset} min late",{minuteOffset:R})))))),a()("div",{className:C.a.summary},void 0,i))),a()(h.a,{},void 0,a()(f.a,{},void 0,a()(d.a,{kind:S.b.DEFAULT,size:S.e.MEDIUM,onPress:j},void 0,Object(g.default)("Modify Recording")),a()(d.a,{kind:S.b.PRIMARY,size:S.e.MEDIUM,onPress:T},void 0,Object(g.default)("Close")))))}
var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(72)),d=n(42),p=n(59),h=n(82),f=n(112),v=n(78),g=n(3),m=n(25),y=n(95),b=n(1340),I=n(1341),S=n(23),M=n(578),D=n(3644),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-4CyEF",
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:"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,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(5),o=(n.n(a),n(3648));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(1343),c=n(3650),u=n.n(c);t.a=i},function(e,t){e.exports={title:"CalendarHeaderTitle-title-15Pr3"}},function(e,t){e.exports={agendaHeader:"AgendaHeader-agendaHeader-66Y_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(64)),f=n(3),v=n(284),g=n(1337),m=n(3652),y=n(3661),b=n(3666),I=n(3669),S=n.n(I),M=r()(y.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({width:t,visibleDays:i})},r.state={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(f.default)("There was an error loading the calendar")}):i?r()(g.a,{subscriptionCount:a}):r()(h.a,{className:S.a.calendar,ignoreHeight:!0,onMeasure:this.onMeasure},void 0,o===this.state.visibleDays&&r()("div",{},void 0,r()(b.a,{onGoToPreviousRangePress:s,
onGoToNextRangePress:l}),M,r()(m.a,{serverEntityID:t})))},t}(p.Component);t.a=D},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(5),o=(n.n(a),n(3653));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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3654),f=n(3660),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(3655)),c=n(3659),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=o.a.unix(t);return{events:h.a.filter(e.scheduled,function(e){return o.a.unix(e.beginsAt).isSame(n,"day")})}})}function r(e){return c.a.createElement(f.a,e)}var a=n(48),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),n(7)),h=n.n(p),f=n(3656);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(38)),c=n(43),u=n(1338),d=n(3657);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(326)),f=n(20),v=n(27),g=n(123),m=n(477),y=n(272),b=n(196),I=n(1339),S=n(250),M=n(842),D=n(1342),C=n(3658),O=n.n(C),P={context:g.b},j=r()("div",{},void 0,r()(M.a,{})),T=r()(h.a,{}),w=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.isPostProcessing,v=e.recordingProgress,g=e.isComplete,M=e.hasError,C=e.hasSubscription,w=e.hasConflicts,E=e.showPlay,x=e.timeFormat,A=e.onPlayPress,N=this.state,L=N.isAiringDetailsModalOpen,k=N.isSubscribeModalOpen,_=N.isConflictsModalOpen,R=d.beginsAt,z=d.endsAt,U=d.startOffsetSeconds,B=void 0===U?0:U,F=d.endOffsetSeconds,V=void 0===F?0:F,H=d.premiere,Q=Object(m.a)(R-B,z+V,{
includeMinuteZero:!1,timeFormat:x}),Y=l||c;return r()("div",{className:(O.a.event||"")+" "+(g&&O.a.isComplete||"")+" "+(M&&O.a.hasError||""||"")},void 0,r()(f.a,{className:O.a.underlay,to:o,onPress:o?void 0:this.onLinkPress}),r()("div",{className:O.a.overlay},void 0,r()("div",{className:O.a.title,title:Y},void 0,Y),r()("div",{className:O.a.secondary},void 0,r()("div",{className:O.a.secondaryInfo},void 0,r()("div",{className:O.a.time},void 0,Q),H?j:null),r()("div",{className:O.a.status
},void 0,!p||h||M?null:r()("div",{className:O.a.recording},void 0,r()(y.a,{size:24,backgroundClassName:O.a.recordingProgressBackground,lineWidth:2,progress:v,showProgressText:!1}),r()("span",{className:O.a.recordingIcon})),p&&h&&!M?T:null,E?r()(b.a,{title:c,onPress:A}):null,M?r()(D.a,{error:u,onPress:w?this.onConflictIconPress:this.onLinkPress}):null))),C?r()(I.a,{isOpen:L,metricsProperties:P,serverEntityID:t,providerEntityID:n,metadataItemEntityID:a,error:u,mediaItem:d,isComplete:g,hasError:M,
isRecording:p,recordingProgress:v,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}):null,C?r()(S.a,{isOpen:k||_,metricsProperties:P,serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:i,metadataItemEntityID:a,subscriptionType:s,showConflicts:_,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}):null)},t}(p.Component);t.a=w},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,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(5),o=(n.n(a),n(3662));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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(3663),f=n(3665),v=n.n(f);t.a=i},function(e,t,n){"use strict";function i(e){
var t=e.date,n=s.a.unix(t),i=Object(d.a)(t),r=void 0;return r=Object(p.a)(t)?Object(h.default)("Yesterday"):i?Object(h.default)("Today"):Object(h.default)("{dayOfWeek} {monthNumber}/{dayNumber}",{dayOfWeek:Object(u.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(48),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(1158)),d=n(407),p=n(572),h=n(3),f=n(3664),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(u.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=p.a.pick(e.calendar,"time","startTime","endTime","hasPastEvents","hasFutureEvents");return o()({},t)})}function r(e){return l.a.createElement(h.a,e)}
var a=n(6),o=n.n(a),s=n(0),l=n.n(s),c=n(11),u=n(5),d=(n.n(u),n(7)),p=n.n(d),h=n(3667);t.a=Object(c.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()(c.a,{className:(v.a.calendarNav||"")+" "+(!t&&v.a.calendarNavDisabled||""||""),kind:p.b.DEFAULT,size:p.e.MEDIUM,isDisabled:!t,onPress:i
},void 0,a()(d.a,{name:"plex-icon-hub-prev-560","aria-label":Object(u.default)("Previous Page")})),l.a.createElement(h.a,e),a()(c.a,{className:(v.a.calendarNav||"")+" "+(!n&&v.a.calendarNavDisabled||""||""),kind:p.b.DEFAULT,size:p.e.MEDIUM,isDisabled:!n,onPress:r},void 0,a()(d.a,{name:"plex-icon-hub-next-560","aria-label":Object(u.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(20),u=n(3),d=n(25),p=n(23),h=n(1343),f=n(3668),v=n.n(f);t.a=i},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){e.exports={calendar:"Calendar-calendar-231Oo"}},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(6),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(5),m=(n.n(g),n(353)),y=n(854),b=n(35),I=n(3671),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(b.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:m.moveMediaSubscription})(S)},function(e,t,n){"use strict";function i(e){var t=e.serverEntityID,n=e.providerEntityID,i=e.mediaSubscriptionEntityIDs,r=e.guideRoute,o=e.showError,s=e.showEmptyState,v=e.moveIndex,m=e.onSubscriptionDragMove,y=e.onSubscriptionDragEnd;return a()("div",{className:g.a.pane},void 0,a()("div",{className:g.a.paneHeader},void 0,Object(u.default)("Recording Priority")),a()(l.a,{className:g.a.paneScroller,autoScroll:!0},void 0,o&&a()("div",{
className:g.a.error},void 0,a()("div",{},void 0,Object(u.default)("There was an error loading recordings.")),a()("div",{},void 0,Object(u.default)("Please try again."))),s&&a()("div",{className:g.a.empty},void 0,a()("div",{},void 0,Object(u.default)("You have no recordings scheduled.")),a()("div",{},void 0,a()(d.a,{message:Object(u.default)("Check out the {openLink}Guide{closeLink} to browse available programming."),tags:[{open:"openLink",close:"closeLink",component:c.a,kind:f.b.PRIMARY,to:r}]
}))),!o&&!s&&i.map(function(e,i){var r=null!=v,o=r&&v===i,s=r&&v===i+1;return a()(h.a,{serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:e,isDraggingBefore:o,isDraggingAfter:s,sortIndex:i,onSubscriptionDragMove:m,onSubscriptionDragEnd:y},e)})),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(71)),c=n(20),u=n(3),d=n(179),p=n(1345),h=n(1347),f=n(23),v=n(3682),g=n.n(v);t.a=i},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(5),a=(n.n(r),n(795))},function(e,t,n){"use strict";function i(e){var t=void 0;switch(e){case"movie":t=[P.a,T.a];break;case"show":t=[P.a,x.a];break;case"episode":t=[O.a,j.a];break;case"playlist":t=[P.a,x.a];break;default:t=[P.a]}return t.push(E.a),t}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),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(20),I=n(27),S=n(25),M=n(279),D=n(250),C=n(247),O=n(796),P=n(469),j=n(789),T=n(1108),w=n(126),E=n(3674),x=n(3675),A=n(3677),N=n(3679),L=n.n(N),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(I.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()(b.a,{
className:L.a.link,onPress:this.onLinkPress},void 0,s()("div",{className:L.a.linkContainer},void 0,s()(M.a,{className:L.a.posterContainer,serverEntityID:t,providerEntityID:n,component:C.a,type:v,width:48,height:Object(w.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(A.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()(D.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,t,n){return e?Object(u.a)(e,t)?Object(d.default)("Airing now"):Object(c.a)(e,null,{timeFormat:n}):Object(d.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(1157)),u=n(1162),d=n(3);t.a=r},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(3)),u=n(25),d=n(3676),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){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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3678),p=n.n(d);t.a=i},function(e,t){e.exports={
title:"RecordingPrioritySubscriptionTitle-title-3QS81",secondaryTitle:"RecordingPrioritySubscriptionTitle-secondaryTitle-2Wl5u"}},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={dragPreview:"RecordingPrioritySubscriptionDragPreview-dragPreview-3q037"}},function(e,t){e.exports={dragSource:"RecordingPrioritySubscriptionDragSource-dragSource-2qcUl"}},function(e,t){e.exports={pane:"RecordingPriorityPane-pane-1TYhV",paneHeader:"RecordingPriorityPane-paneHeader-FyTve",
paneScroller:"RecordingPriorityPane-paneScroller-2HMal Scroller-vertical-VScFL",error:"RecordingPriorityPane-error-2elsB",empty:"RecordingPriorityPane-empty-7QU40"}},function(e,t){e.exports={schedulePageContent:"RecordingSchedulePageContent-schedulePageContent-zrwp0 PageContent-pageContent-16mK6",schedulePageInnerContent:"RecordingSchedulePageContent-schedulePageInnerContent-3967M PageContent-innerPageContent-3ktLT",
emptyDescription:"RecordingSchedulePageContent-emptyDescription-3A30q EmptyPage-description-oYWtW"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e,t){return t.sourceDirectory},Object(s.a)(),Object(o.a)(),function(e,t,n){return{scheduleRoute:Object(l.a)(t,n,e,{key:l.b.RECORDING_SCHEDULE})}})}var r=n(11),a=n(5),o=(n.n(a),n(51)),s=n(34),l=n(590),c=n(3685);t.a=Object(r.b)(i)(c.a)},function(e,t,n){"use strict";function i(e){
return e===D.c.AGENDA?Object(b.default)("Agenda View"):Object(b.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(118)),v=n(56),g=n(45),m=n(27),y=n(19),b=n(3),I=n(103),S=n(217),M=n(289),D=n(23),C=(n(93),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(m.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.sourceDirectory,o=e.scheduleRoute,s=e.selectedViewType,l=this.state.isViewsMenuOpen;return a()(S.a,{},void 0,a()(M.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:r},void 0,a()(f.a,{title:Object(b.default)("Recordings")
}),a()(f.a,{id:this._viewsMenuButtonID,title:i(s),hasMenu:!0,isMenuOpen:l,onPress:this.onViewsMenuButtonPress}),a()(v.a,{target:this._viewsMenuButtonID,isOpen:l,onMenuClose:this.onViewsMenuClose},void 0,D.c.all.map(function(e){return a()(I.a,{to:y.join([o],{view:e}),isSelected:s===e},e,i(e))}))))},t}(h.Component));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(80)),s=n(38),l=n(43),c=n(46),u=n(286),d=n(3687),p=n(169),h=n(170),f=r()(h.a,{}),v=r()(d.a,{}),g=c.a.extend({
component:function(e){var t=e.selectedProviderID,n=o.a,i=Object(s.a)(l.m,n),a=Object(s.a)(l.k,t,i);return r()(p.a,{},void 0,f,r()(u.a,{serverEntityID:i,providerEntityID:a},void 0,v))}});t.a=g},function(e,t,n){"use strict";function i(){return Object(v.createSelector)(Object(I.a)(),Object(b.a)(g.b.SETTINGS),function(e){return e.ui.providerSettingsPage},function(e,t,n){return{providerEntityID:e.entityID,providerTitle:e.title,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(5),g=(n.n(v),n(60)),m=n(314),y=n(847),b=n(487),I=n(51),S=n(3688),M={dispatchFetchProviderSettings:y.c,dispatchUpdateProviderSetting:y.f,dispatchClearProviderSettingUpdateError:y.b,dispatchClearProviderSettingFetchError:y.a,dispatchPopulateSettingsOptions:y.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===m.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,{providerTitle:this.props.providerTitle,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(1),p=(n.n(d),n(0)),h=n.n(p),f=n(72),v=n(30),g=n(3),m=n(31),y=n(73),b=n(230),I=n(229),S=n(1314),M=n(1315),D=r()(y.a,{},void 0,r()(m.a,{})),C=r()(f.b,{}),O=function(e){function t(n,i){o()(this,t);var r=l()(this,e.call(this,n,i))
;return r.onTogglePress=function(e){r.props.updateError&&r.props.onUpdateErrorDismiss(),r.state.openSettingID===e?r.setState({openSettingID:null}):(r.props.onSettingViewDetail(e),r.setState({openSettingID:e}))},r.state={openSettingID:null,isUpdatePendingFromStore:n.isUpdatePending},r}return u()(t,e),t.getDerivedStateFromProps=function(e,t){var n={isUpdatePendingFromStore:e.isUpdatePending};return!t.isUpdatePendingFromStore||e.isUpdatePending||e.updateError||(n.openSettingID=null),n},
t.prototype.render=function(){var e=this,t=this.props,n=t.providerTitle,i=t.showSpinner,a=t.settings,o=t.isUpdatePending,s=t.updateError,l=t.onUpdateSetting,c=t.onOptionsFetchErrorDismiss,u=this.state.openSettingID;return i?D:r()(b.a,{metricsPage:v.T,metricsPane:"settings"},void 0,r()(I.a,{},void 0,n,n?C:null,Object(g.default)("Personalize")),a.map(function(t){return t.hidden?null:r()(M.a,{title:t.label,setting:t,isOpen:u===t.id,isUpdating:o,updateError:s,onTogglePress:e.onTogglePress,
onUpdateSetting:l,onOptionsFetchErrorDismiss:c},t.id,h.a.createElement(S.a,t))}))},t}(p.Component);t.a=O},function(e,t,n){"use strict";var i=n(267),r=n(3690),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",
"!/provider/:providerID/playlist":"providerPlaylist","!/server/:serverID(/provider/:providerID)/timeline":"timeline","!/server/:serverID(/provider/:providerID)/albums":"albums","!/server/:serverID(/provider/:providerID)/album?key=:key":"album","!/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(18),r=n(19),a=n(268),o=n(438),s=n(3691),l=n(3704),c=n(3707),u=n(3823),d=n(3824),p=n(3825),h=n(3845),f=n(3846),v=n(3847),g=n(3848),m=n(3849),y=n(3852),b=n(3857),I=n(3860),S=n(3861),M=n(3862),D=n(3875),C=n(3876),O=a.a.extend({search:function(e,t,n){this.populateView().done(function(){
var a=Object(o.a)()?b.a:l.a;i.a.trigger("show:view",new a({selectedServerID:e,query:t,params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},providerSearch:function(e,t,n){this.populateView().done(function(){var a=Object(o.a)()?y.a:s.a;i.a.trigger("show:view",new a({selectedProviderID:e,query:t,params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},provider:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new v.a({selectedServerID:e,selectedProviderID:t,
params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},cloudProvider:function(e,t){this.populateView().done(function(){i.a.trigger("show:view",new d.a({selectedProviderID:e,params:r.parseParams(t)}),{clearActiveNavigationType:!1})})},timeline:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new g.a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},albums:function(e,t,n){this.populateView().done(function(){
i.a.trigger("show:view",new p.a({selectedServerID:e,selectedProviderID:t,isPlaylistRoute:!1,params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},album:function(e,t,n,a){this.populateView().done(function(){var s=Object(o.a)()?I.a:c.a;i.a.trigger("show:view",new s({selectedServerID:e,selectedProviderID:t,key:n,isPlaylistRoute:!1,params:r.parseParams(a)}),{clearActiveNavigationType:!1})})},playlists:function(e,t,n){this.populateView().done(function(){i.a.trigger("show:view",new p.a({
selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},playlist:function(e,t,n,a){this.populateView().done(function(){var s=Object(o.a)()?I.a:c.a;i.a.trigger("show:view",new s({selectedServerID:e,selectedProviderID:t,key:n,params:r.parseParams(a)}),{clearActiveNavigationType:!1})})},providerPlaylist:function(e,t){this.populateView().done(function(){var n=Object(o.a)()?S.a:u.a;i.a.trigger("show:view",new n({selectedProviderID:e,params:r.parseParams(t)
}),{clearActiveNavigationType:!1})})},prePlay:function(e,t,n){this.populateView().done(function(){var a=Object(o.a)()?M.a:h.a;i.a.trigger("show:view",new a({selectedServerID:e,selectedProviderID:t,params:r.parseParams(n)}),{clearActiveNavigationType:!1})})},transientPrePlay:function(e,t){this.populateView().done(function(){var n=Object(o.a)()?C.a:m.a;i.a.trigger("show:view",new n({selectedProviderID:e,params:r.parseParams(t)}),{clearActiveNavigationType:!1})})},providerPrePlay:function(e,t){
this.populateView().done(function(){var n=Object(o.a)()?D.a:f.a;i.a.trigger("show:view",new n({selectedProviderID:e,params:r.parseParams(t)}),{clearActiveNavigationType:!1})})},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=O},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(67)),s=n(80),l=n(38),c=n(43),u=n(105),d=n(46),p=n(286),h=n(3692),f=n(145),v=d.a.extend({component:function(e){var t=e.selectedProviderID,n=e.query,i=e.params,a=s.a,d=Object(l.a)(c.m,a),v=Object(l.a)(c.k,t,d);return r()(u.a,{metricsContext:i.context},void 0,r()(o.a,{},void 0,r()(f.a,{selectedProviderEntityID:v}),r()(p.a,{serverEntityID:d,providerEntityID:v},void 0,r()(h.a,{providerEntityID:v,serverEntityID:d,providerIdentifier:t,query:n}))))}});t.a=v},function(e,t,n){"use strict";function i(){
return Object(g.createSelector)(function(e){return e.ui.searchPage},function(e){return{isSearchPending:!!y.a.findWhere(e.searches,{isSearchPending:!0})}})}var r=n(12),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(5),m=(n.n(g),n(7)),y=n.n(m),b=n(84),I=n(354),S=n(3693),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(v.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:c.W,metricsProperties:{singleServer:!0},allowBackgroundLightPreset:!0,scrollDirection:l.NONE},void 0,a()(p.a,{isSearchPending:r,query:i,allowSearchAllServers:!1}),a()(d.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(54)),c=n(30),u=n(83),d=n(3694),p=n(1348);t.a=i},function(e,t,n){"use strict";function i(){
return Object(D.createSelector)(function(e,t){return t.serverEntityID},function(e,t){return t.providerEntityID},j.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(D.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=O.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(D.createSelector)(r(),a(),T.a,function(e,t,n){return{availableProviders:e,
isSearchCapable:!!g()(e).length,columnAdjustment:n.columnAdjustment,providers:t}})}var s=n(12),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(53),g=n.n(v),m=n(6),y=n.n(m),b=n(1),I=(n.n(b),n(0)),S=n.n(I),M=n(11),D=n(5),C=(n.n(D),n(7)),O=n.n(C),P=n(276),j=n(132),T=n(70),w=n(35),E=n(354),x=n(855),A={dispatchFetchSearchPage:E.b,dispatchClearSearchPage:E.a},N=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(w.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(w.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 S.a.createElement(x.a,t)},t}(I.Component);t.a=Object(M.b)(o,A)(N)},function(e,t,n){"use strict";function i(e){return function(t){return d.a.createElement(b.a,l()({component:y.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()(v.a,{className:D.a.spinner,size:p.SMALL})),!n.length&&c?o()(m.a,{title:Object(h.default)("No Results"),description:Object(h.default)("Try a different query")}):n.map(function(e){var t=e.type,n=e.subtype,o=f.k,s=Object(S.b)(t,o,{subtype:e.subtype,isSearch:!0,isSearchAll:a})
;return d.a.createElement(g.a,l()({},e,{key:e.hubIdentifier,listType:t,listContext:o,keyPropName:"searchResultEntityID",size:e.results.length,items:e.results,itemsOffset:0,layout:Object(I.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(6),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(52),h=n(3),f=n(32),v=n(31),g=n(473),m=n(73),y=n(3696),b=n(1111),I=n(485),S=n(187),M=n(3701),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(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3697),p=n(3698);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(5),o=(n.n(a),
n(22)),s=n(593);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(u.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(d.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(5),u=(n.n(c),n(400)),d=n(232),p=n(3699);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,u=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=c.a.get(g),O=!!C&&C.isPerson;return a()(l.a,{className:t,cellX:y,cellY:b,cellWidth:I,cellHeight:S},void 0,a()("div",{className:v.a.imageContainer},void 0,a()(p.a,{serverEntityID:n,providerEntityID:i,imageWidth:o,imageHeight:s,
imageUrl:u,title:f,tagType:g,librarySectionType:m,isOffscreen:M}),a()(h.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()(d.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(87)),c=n(399),u=n(137),d=n(249),p=n(767),h=n(1167),f=n(3700),v=n.n(f)
;t.a=Object(u.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 DiscoverPage-discoverPageContent-3mJ50 PageContent-innerPageContent-3ktLT"}},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-1_DoE",separator:"SearchPageHeader-separator-C3ELo"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(67)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(254),p=n(255),h=n(3705),f=n(145),v=u.a.extend({component:function(e){
var t=e.selectedServerID,n=e.query,i=e.params,a=Object(s.a)(l.m,e.serverID);return r()(c.a,{metricsContext:i.context},void 0,r()(o.a,{},void 0,r()(f.a,{serverEntityID:a}),r()(d.a,{machineIdentifier:e.selectedServerID},void 0,r()(p.a,{},void 0,r()(h.a,{machineIdentifier:t,serverEntityID:a,query:n})))))}});t.a=v},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e){return e.servers},function(e,t){return t.serverEntityID},M.a,D.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 I.a.isMatch(a,{isConnected:!0,isFullServer:!0})?e.concat(i):e},[])})}function r(){return Object(S.a)(i(),function(e){return e})}function a(){return Object(y.createSelector)(function(e){return e.ui.searchPage},r(),D.a,function(e,t,n){return{serverEntityIDs:t,searchAllServers:n.searchAllServers,isSearchPending:!!I.a.findWhere(e.searches,{isSearchPending:!0})}})}
var o=n(6),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(5),b=(n.n(y),n(7)),I=n.n(b),S=n(156),M=n(163),D=n(70),C=n(35),O=n(68),P=n(354),j=n(3706),T={populateSearchProviders:P.c,clearSearchPage:P.a,saveExperienceSettings:O.l},w=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(C.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(C.a)(function(){
e.populateSearchProviders(e.serverEntityIDs)})},t.prototype.render=function(){return g.a.createElement(j.a,s()({},this.props,{onSearchAllChange:this.onSearchAllChange}))},t}(v.Component);t.a=Object(m.b)(a,T)(w)},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:c.W,metricsProperties:{singleServer:!r},allowBackgroundLightPreset:!0,scrollDirection:l.NONE},void 0,a()(p.a,{
isSearchPending:i,query:n,allowSearchAllServers:!0,searchAllServers:r,onSearchAllChange:o}),a()(d.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(54)),c=n(30),u=n(83),d=n(1350),p=n(1348);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(67)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(254),p=n(255),h=n(1351),f=n(145),v=u.a.extend({component:function(e){
var t=e.selectedServerID,n=e.selectedProviderID,i=e.key,a=e.isPlaylistRoute,u=void 0===a||a,v=e.params,g=Object(s.a)(l.m,t),m=Object(s.a)(l.k,n,g);return r()(c.a,{metricsContext:v.context},void 0,r()(o.a,{},void 0,r()(f.a,{isPlaylistRoute:u}),r()(d.a,{machineIdentifier:t},void 0,r()(p.a,{providerEntityID:m},void 0,r()(h.a,{machineIdentifier:t,selectedProviderID:n,serverEntityID:g,providerEntityID:m,metadataKey:i})))))}});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(64)),f=n(27),v=n(140),g=n(798),m=n(44),y=n.n(m),b=n(3709),I=n(3804),S=n.n(I),M=parseInt(y.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(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.columnAdjustment,s=e.record,l=e.allEpisodes,c=this.state,u=c.scrollTop,d=c.isMeasured,p=c.pageWidth,f=c.pageHeight,m=c.pageY;return r()(h.a,{className:S.a.prePlayPageContentContainer,
onMeasure:this.onContentMeasure},void 0,r()(v.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:f,posterWidth:Object(g.a)(p,o),posterTop:m+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(p.a)(),function(e){
return!(!e||!e.isPopulated)})}function r(){return Object(c.createSelector)(h.a,Object(d.a)(),Object(u.a)(),M.a,S.a,I.a,Object(D.a)(),i(),function(e){return!!e.remotePlayer},function(e,t,n,i,r,a,o,s,l){var c=t.type,u=t.subtype,d=Object(O.b)(c,u,t,v.h),p=d||t.thumb||t.parentThumb||t.grandparentThumb,h=t.grandparentArt||t.parentArt||t.art,f=t.grandparentTheme||t.parentTheme||t.theme,g=i?h||p:p||h,m=Object(C.a)(a,v.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:d,parentThumb:t.parentThumb,grandparentThumb:t.grandparentThumb,composite:t.composite,art:i?h:void 0,hero:t.hero,theme:r?f:void 0,backgroundImageUrl:g,playlistType:t.playlistType,isListReady:s,onDeckMetadataItemEntityID:t.onDeck,
extrasMetadataListEntityID:t.extras,popularLeavesMetadataListEntityID:t.popularLeaves,listType:o,listStyle:m,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(g.a)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,imageUrl:n}))},onThemeMusicChange:function(n){
e(Object(g.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(y.c)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,descendantKey:t.descendantKey}))}
var l=n(11),c=n(5),u=(n.n(c),n(1352)),d=n(22),p=n(119),h=n(37),f=n(120),v=n(32),g=n(333),m=n(246),y=n(252),b=n(84),I=n(420),S=n(1353),M=n(624),D=n(625),C=n(421),O=n(232),P=n(3710),j=Object(f.a)(P.a,o,s),T=Object(l.b)(r,a)(j);t.a=T},function(e,t,n){"use strict";function i(e,t,n){if(!e)return S.a;var i=b.c.test(n),r=i?F:U,a=B[t],o=r[e];return(a?a[e]||o:o)||M.a}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),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(41),I=n(1354),S=n(3711),M=n(3712),D=n(1355),C=n(1359),O=n(1361),P=n(1362),j=n(1367),T=n(1368),w=n(1369),E=n(1370),x=n(1371),A=n(1372),N=n(1373),L=n(1376),k=n(1377),_=n(1378),R=n(1382),z=n(1383),U={movie:x.a,show:R.a,season:L.a,episode:j.a,artist:C.a,album:D.a,photoalbum:A.a,clip:x.a,playlist:N.a,collection:O.a},B={podcast:{show:_.a,track:T.a},webshow:{show:z.a,episode:w.a}},F={movie:E.a,show:k.a,episode:P.a},V=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=V},function(e,t,n){"use strict";function i(){return a()(c.a,{
title:Object(l.default)("Nothing is here"),description:Object(l.default)("This item may have been deleted recently")},void 0,a()(s.a,{to:"#",kind:u.b.PRIMARY},void 0,Object(l.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(20)),l=n(3),c=n(579),u=n(23);t.a=i},function(e,t,n){"use strict";function i(){return a()(c.a,{title:Object(l.default)("You must be lost"),description:Object(l.default)("This item does not have its own page")},void 0,a()(s.a,{to:"#",kind:u.b.PRIMARY
},void 0,Object(l.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(20)),l=n(3),c=n(579),u=n(23);t.a=i},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(5),o=(n.n(a),n(3714)),s=n(3715);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.metadataItemEntityIDs},s.a,function(e,t){return o.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),n(7)),o=n.n(a),s=n(115)},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(210),b=n(30),I=n(1356),S=n(3716),M=n(1357),D=n(628),C=n(841),O=n(138),P=n(44),j=n.n(P),T=parseInt(j.a.tableTitleHeight,10)+19,w=parseInt(j.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(C.a)({getCellHeights:function(){return t.map(function(e){return T+e.metadataItemEntityIDs.length*w})},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,C=I.layout,P=I.totalSize,j=I.title,T={serverEntityID:t,providerEntityID:n,metadataListEntityID:i,
containerKey:a,title:j,listType:c};return o()(M.a,{listType:c,isPopulated:u,isPending:d,error:p,size:P},void 0,o()(D.a,{showArtwork:h,contentHeight:f,scrollTop:v},void 0,C&&m.a.createElement(y.a,r()({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,keyPropName:"index",items:s,size:s.length,listType:c,listContext:b.S,isPopulated:u,isPending:d,error:p,layout:C,cellRenderer:Object(O.a)(T,S.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()(l.a,{className:d,cellX:g,cellY:m,cellWidth:y,cellHeight:b},void 0,a()(h.a,{className:S.a.header},void 0,a()(f.a,{},void 0,Object(c.a)(o||Object(u.default)("Disc {discNumber}",{discNumber:s})))),D,I.map(function(e,o){return a()(v.a,{serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,containerKey:r,keyPropName:"metadataItemEntityID",metadataItemEntityID:e,cellHeight:M,cellIndex:o,listType:O,listContext:p.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(87)),c=n(343),u=n(3),d=n(137),p=n(32),h=n(403),f=n(345),v=n(605),g=n(626),m=n(627),y=n(44),b=n.n(y),I=n(3719),S=n.n(I),M=parseInt(b.a.tableRowHeight,10),D=a()(m.a,{}),C=a()(g.a,{});t.a=Object(d.a)(i)
},function(e,t){e.exports={bottomDivider:"PrePlayListBottomDivider-bottomDivider-3XSnc PrePlayDivider-divider-1qvbj"}},function(e,t){e.exports={topDivider:"PrePlayListTopDivider-topDivider-3c8uz PrePlayDivider-divider-1qvbj"}},function(e,t){e.exports={header:"PrePlayDisc-header-1227p HubCellHeader-hubCellHeader-2pvYN"}},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(3),a=n(197)},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(3),a=n(197)},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,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(6),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(271)),d=n(182),p=n(3724),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.width,n=e.height,i=e.url;return s()(u.a,{
background:!0,backgroundPosition:"center center",minSize:!0,transition:!0,transitionProps:a()({className:h.a.imageContainer,style:{width:t,height:n}},d.a),width:t,height:n,src:i})}var r=n(6),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(208)),d=n(271),p=n(3726),h=n.n(p);t.a=i},function(e,t){e.exports={imageContainer:"PrePlayHero-imageContainer-3tRKG"}},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(3728)),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){var t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,r=e.metadataKey,o=e.type,s=e.subtype,d=e.posterType,p=e.pageHeight,h=e.posterWidth,v=e.posterTop,m=e.posterUrl,y=e.showLinkOnly,b=d||o,I=h,S=Object(u.d)(I,b,s,l.h)
;return S>p-g&&(S=p-g,I=Object(u.e)(S,b,s,l.h)),a()("div",{style:{position:"fixed",top:v}},void 0,a()(c.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(32)),c=n(346),u=n(126),d=n(44),p=n.n(d),h=n(3730),f=n.n(h),v=parseInt(p.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(){return Object(a.createSelector)(c.a,l.a,Object(o.a)(),Object(s.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(5),o=(n.n(a),n(22)),s=n(486),l=n(37),c=n(50),u=n(820)
;t.a=Object(r.b)(i)(u.a)},function(e,t){e.exports={innerContent:"PrePlayMetadataListInnerContent-innerContent-2CsIz"}},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(g.b)(t,r);return o()("div",{className:b.a.castList},void 0,o()(f.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(6),l=n.n(s),c=n(1),u=(n.n(c),n(0)),d=n.n(u),p=n(3),h=n(32),f=n(473),v=n(485),g=n(187),m=(n(88),
n(125),n(3734)),y=n(3736),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,u=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()(c.a,{cellX:I,cellY:S,cellWidth:M,cellHeight:D},void 0,a()(l.a,{
className:v.a.cardLink,to:Object(h.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,u.map(function(e,t){return a()(d.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(20)),c=n(87),u=n(137),d=n(249),p=n(767),h=(n(88),n(125),n(133)),f=n(3735),v=n.n(f)
;t.a=Object(u.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){e.exports={relatedList:"PrePlayHubList-relatedList-3rwpf",spinnerContainer:"PrePlayHubList-spinnerContainer-1kYSW"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(function(e){return e.ui.prePlayPage},function(e){
var t=e.augmentedHubs,n=e.isAugmentedHubsPending;return t?{hubEntityIDs:t,showSpinner:!t.length&&n}:{hubEntityIDs:[],showSpinner:!1}})}var r=n(11),a=n(5),o=(n.n(a),n(1358)),s=Object(r.b)(i)(o.a);t.a=s},function(e,t,n){"use strict";var i=n(6),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(210),v=n(335),g=n(3740),m=Object(v.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(f.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},d.a,u.a,Object(c.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(5),c=(n.n(l),
n(22)),u=n(37),d=n(50),p=n(55),h=n(143),f=n(3741);t.a=Object(p.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(72)),f=n(20),v=n(87),g=n(27),m=n(3),y=n(25),b=n(137),I=n(566),S=n(250),M=n(1152),D=n(281),C=n(3742),O=n.n(C),P=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(g.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,g=e.type,b=e.summary,C=e.showRecord,P=e.hasSingleSubscription,j=this.state.isSubscribeModalOpen;return u?r()(v.a,{
className:a%2?O.a.alternateItem:O.a.item,cellX:o,cellY:s,cellWidth:l,cellHeight:c},void 0,r()(f.a,{className:O.a.underlay,to:d}),r()("div",{className:O.a.overlay},void 0,r()("div",{className:O.a.primaryTitle},void 0,r()(D.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i})),r()("div",{className:O.a.secondaryTitle},void 0,P&&r()(y.a,{className:O.a.subscriptionIcon,name:"plex-icon-dvr-single-560","aria-label":Object(m.default)("Recording Scheduled")}),r()(M.a,{
className:O.a.nextAiringDate,metadataItemEntityID:i,showFullTime:!0}),!!b&&r()(h.b,{className:O.a.separator}),b)),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:j,subscriptionType:g,onModalClose:this.onSubscribeModalClose})):r()(v.a,{className:a%2?O.a.alternateLoadingItem:O.a.loadingItem,cellX:o,cellY:s,cellWidth:l,cellHeight:c},void 0,Object(m.default)("Loading..."))},t
}(p.Component);t.a=Object(b.a)(P)},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.listContext,c=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","listType","listContext"]);return u.a.createElement(d.a,a()({layout:h.a,cellRenderer:Object(f.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:o,listContext:l},p.a)},c))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(210),p=(n(32),
n(1259)),h=n(1258),f=n(138);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},o.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];return{listType:a,cellRenderer:Object(c.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:a},l.a),aspectRatios:e.map(function(e){return Object(s.a)(o[e])})}})}var r=n(11),a=n(5),o=(n.n(a),n(115)),s=n(615),l=n(1309),c=n(138),u=n(1360);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.listSubtype,c=e.listContext,g=e.columnAdjustment,m=s()(e,["serverEntityID","providerEntityID","metadataListEntityID","containerKey","listType","listSubtype","listContext","columnAdjustment"]),y=Object(v.b)(o,c,{providerEntityID:n});return u.a.createElement(d.a,a()({layout:Object(h.a)(o,l,c,g,y.length),cellRenderer:Object(f.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,
containerKey:r,listType:o,listContext:c,titleComponents:y},p.a)},m))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(210),p=(n(32),n(593)),h=n(832),f=n(138),v=n(187);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(d.a,a()({
layout:h.a,cellRenderer:Object(f.a)({serverEntityID:t,providerEntityID:n,metadataListEntityID:i,containerKey:r,listType:o,listContext:l},p.a)},c))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(210),p=(n(32),n(1264)),h=n(1263),f=n(138);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"]),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(d.a,a()({layout:h.a,cellRenderer:Object(f.a)(v,p.a)},c))}var r=n(6),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(210),p=(n(32),n(605)),h=n(835),f=n(138);t.a=i},function(e,t){e.exports={descendantHubCellHeader:"PrePlayDescendantList-descendantHubCellHeader-2qK3U HubCellHeader-hubCellHeader-2pvYN",titleButton:"PrePlayDescendantList-titleButton-P7EPn"}},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(6),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=n.n(s),c=n(32),u=n(1226),d=n(3750),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(){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(5),o=(n.n(a),n(22)),s=n(3752);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(d.a)(Object(p.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:g.a}))),t.map(function(e){return u.a.createElement(m.a,a()({key:e.id},e))}))}var r=n(6),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(343),p=n(3),h=n(403),f=n(345),v=n(3753),g=n.n(v),m=n(3754),y=n(3756),b=n.n(y);t.a=i},function(e,t,n){e.exports=n.p+"desktop/common/img/vendor-logos/songkick.19411461aa7bffd06675aaa8a3d0a056.svg"},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,l=e.venue,c=s.a.unix(t),d=c.format("DD"),h=c.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,l," (",n,", ",i,")")))}var r=n(2),a=n.n(r),o=n(48),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=(n.n(c),n(20)),d=n(3755),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){e.exports={concerts:"PrePlayConcerts-concerts-3r-qi",concertsLogo:"PrePlayConcerts-concertsLogo-oF29R"}},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(c.a,l.a,Object(o.a)(),Object(s.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(5),o=(n.n(a),n(22)),s=n(486),l=n(37),c=n(50),u=n(3758);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()(p.a,{},void 0,s&&a()(u.a,{},void 0,a()(c.a,{server:t,provider:n,
librarySectionKey:i,fallbackFilterKey:"country",tags:r,limit:1})),h&&a()(d.a,{},void 0,a()(l.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(820)),c=n(814),u=n(104),d=n(409),p=n(198);n(88),n(125);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,I=c()(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","containerKey","showArtwork","contentHeight","scrollTop"]);if(!r||!r.length)return null;var M=Object(f.a)(Object(v.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:P.a.popularTracksHubCell,"data-qa-id":"hub--popularTracks"},void 0,s()(b.a,{},void 0,s()(m.a,{},void 0,M)),j,s()(S.a,{showArtwork:l,contentHeight:u,scrollTop:d},void 0,p.a.createElement(h.a,a()({layout:D.a,cellRenderer:Object(C.a)(O,y.a),items:r,size:Math.min(r.length,5),keyPropName:"metadataItemEntityID"},I))),T)}
var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(210),f=n(343),v=n(3),g=n(32),m=n(345),y=n(605),b=n(96),I=n(626),S=n(628),M=n(627),D=n(835),C=n(138),O=n(3760),P=n.n(O),j=s()(M.a,{}),T=s()(I.a,{});t.a=i},function(e,t){e.exports={popularTracksHubCell:"PrePlayPopularTracks-popularTracksHubCell-Q0N9b HubCell-hubCell-3Ys17"}},function(e,t,n){var i=n(374),r=n(3762);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",smallIconFontSize:"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()(d.a,{},void 0,a()(l.a,{className:h.a.duration,duration:o}),a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),v&&a()(c.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(576)),c=n(1366),u=n(602),d=n(104),p=n(3765),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";function i(e,t){
return Object(y.createSelector)(function(e){return e.ui.playlistPage},Object(b.a)(),I.c,function(e,t,n){var i=e.serverEntityID,r=e.providerEntityID,a=e.metadataKey,o=e.playlistItemList,s=void 0===o?{}:o,l=e.isPlaylistItemListPending,c=e.isPlaylistItemListPopulated,u=e.playlistItemListError,d=t.ratingKey,p=t.playlistType,h=t.smart,f=t.readOnly,v=t.duration,g=s.metadataItems,m=void 0===g?[]:g,y=s.populatedRange,b=void 0===y?{}:y,I=s.totalSize;return{serverEntityID:i,providerEntityID:r,
metadataKey:a,ratingKey:d,providerIdentifier:n.identifier,listType:p,keyPropName:"playlistItemEntityID",isSmart:!!h,isReadOnly:!!f,populatedRange:b,items:m,size:I,itemsOffset:b.start,duration:v,isEmpty:c&&!I,showArtwork:!1,showSpinner:l&&!c,showError:u}})}var r=n(6),a=n.n(r),o=n(12),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(5),b=(n.n(y),n(22)),I=n(37),S=n(41),M=n(341),D=n(290),C=n(3767),O={dispatchInitPlaylistItemList:D.c,
dispatchPopulatePlaylistItemRange:D.f,dispatchDeselectAllPlaylistItems:M.d,dispatchMovePlaylistItem:D.e},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.onPageRequest=function(e){var t=e.startIndex,n=e.endIndex,r=i.props.providerIdentifier===S.e||i.props.providerIdentifier===S.f;i.props.dispatchPopulatePlaylistItemRange({pages:r?1:void 0,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.providerEntityID,i=e.metadataKey,r=e.providerIdentifier,a=e.dispatchInitPlaylistItemList,o=e.dispatchPopulatePlaylistItemRange;a({serverEntityID:t,
providerEntityID:n,metadataKey:i}),o({pages:r===S.e||r===S.f?1:void 0,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(C.a,a()({},t,{onPageRequest:this.onPageRequest}))},t}(v.Component);t.a=Object(m.b)(i,O)(P)},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(g.a,h):u.a.createElement(v.a,h))}var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(3),p=n(58),h=n(31),f=n(628),v=n(3768),g=n(3783),m=n(3797),y=n.n(m),b=a()(h.a,{});t.a=i},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(12),o=n.n(a),s=n(6),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(210),b=n(375),I=n(35),S=n(343),M=n(3),D=n(58),C=n(403),O=n(345),P=n(626),j=n(627),T=n(410),w=n(3769),E=n(138),x=n(3770),A=n(3777),N=n(3782),L=n.n(N),k=r()(j.a,{}),_=r()(P.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(I.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===D.d?1===e?Object(M.default)("1 Video"):Object(M.default)("{count} Videos",{count:e}):1===e?Object(M.default)("1 Track"):Object(M.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.isReadOnly,v=e.size,g=e.duration,I=o()(e,["serverEntityID","providerEntityID","metadataItemEntityID","metadataKey","playlistType","contentWidth","contentHeight","scrollTop","items","isSmart","isReadOnly","size","duration"]),P={serverEntityID:t,providerEntityID:n,
metadataListEntityID:i,metadataKey:a,listType:s,activeSort:"titleSort",isSmart:h,isReadOnly:f,showLink:!1,showPlayIndex:!1,showPlayCellIndex:!0,showActionsDuration:!0,onItemDragMove:this.onItemDragMove,onItemDragEnd:this.onItemDragEnd,moveIndex:this.state.moveIndex};return 0===v?r()("div",{},void 0,s===D.d?Object(M.default)("This playlist has no videos."):Object(M.default)("This playlist has no tracks.")):r()("div",{},void 0,r()(C.a,{className:L.a.header
},void 0,r()(O.a,{},void 0,Object(S.a)(this._getItemCountLabel())),!!g&&r()("span",{className:L.a.durationTitle},void 0,Object(b.a)(g))),k,m.a.createElement(y.a,l()({layout:w.a,containerKey:a,keyPropName:"playlistItemEntityID",cellRenderer:Object(E.a)(P,A.a),items:p,size:v,viewportWidth:c,viewportHeight:u,scrollTop:d,firstItemType:s,listType:s,moveIndex:this.state.moveIndex},I)),_,!h&&!f&&r()(x.a,{serverEntityID:t,providerEntityID:n}))},t}(g.Component);t.a=Object(T.a)(R)},function(e,t,n){
"use strict";var i=n(335),r=n(44),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){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var r=n(6),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(214),y=(n.n(m),n(27)),b=n(482),I=n(251),S=n(851),M=n(859),D=n(3776),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!==I.c)return null;var r=Object(S.a)(i,t.viewportWidth);return s()(b.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,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(20)),f=n(3),v=n(25),g=n(242),m=n(383),y=n(401),b=n(23),I=n(3772),S=n(3775),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.onActionsMenuOpenChange=function(e){r.setState({isActionsMenuOpen:e})},r.state={isActionsMenuOpen:!1},r}return u()(t,e),t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.itemServerEntityID,i=e.providerEntityID,a=e.itemProviderEntityID,o=e.metadataItemEntityID,s=e.metadataListEntityID,l=e.metadataKey,c=e.listType,u=e.title,d=e.isSmart,p=e.isReadOnly,S=e.isSelected,D=e.hasActiveSelection,C=e.isOtherItemSelected,O=e.isModifierKeyPressed,P=e.cellIndex,j=e.isDragging,T=e.connectDragSource,w=e.onRemovePress,E=e.onSelectPress,x=e.onDeselectPress,A=!(d||p),N=A&&(O||C),L=D?"-1":"0";return r()("div",{
className:((P%2?M.a.alternateContainer:M.a.container)||"")+" "+(D&&M.a.hasActiveSelection||"")+" "+(N&&M.a.isForcingSelection||"")+" "+(S&&M.a.isSelected||"")+" "+((d||p)&&M.a.isSmart||"")+" "+(j&&M.a.isItemDragging||""||"")},void 0,A&&r()(h.a,{className:M.a.underlay,"aria-label":S?Object(f.default)("Deselect {title}",{title:u}):Object(f.default)("Select {title}",{title:u}),tabIndex:D?"0":"-1",onPress:S?x:E}),r()("div",{className:M.a.overlay,"data-qa-id":"playlistItem"},void 0,A&&T(r()("div",{
className:M.a.moveControl,"data-qa-id":"playlistReorderItem"},void 0,r()(v.a,{className:M.a.grabIcon,name:"plex-icon-reorder-560"}))),r()(I.a,{className:M.a.metadataContainer,sourceTextClassName:M.a.sourceText,durationContainerClassName:M.a.metadataDurationContainer,attributionContainerClassName:M.a.attributionContainer,serverEntityID:t,itemServerEntityID:n,providerEntityID:i,itemProviderEntityID:a,metadataItemEntityID:o,metadataListEntityID:s,metadataKey:l,listType:c,cellIndex:P}),r()("div",{
className:M.a.otherControls},void 0,A&&r()(m.a,{className:M.a.selectButton,title:u,isSelected:S,onPress:S?x:E}),r()(y.a,{"data-qa-id":"metadataRowMoreButton",className:M.a.moreButton,tabIndex:L,serverEntityID:t,itemServerEntityID:n,providerEntityID:i,itemProviderEntityID:a,metadataItemEntityID:o,containerKey:l,listType:c,showPlay:!1,showQueuePlexMix:!1,showEdit:!1,isMenuOpen:this.state.isActionsMenuOpen,onMenuOpenChange:this.onActionsMenuOpenChange}),A&&r()(g.a,{className:M.a.removeButton,
"data-qa-id":"playlistRemoveButton",icon:"plex-icon-remove-560",title:Object(f.default)("Remove"),kind:b.b.DANGER,onPress:w}))))},t}(p.Component);D.defaultProps={isDragging:!1,connectDragSource:function(e){return e}},t.a=D},function(e,t,n){"use strict";function i(){return Object(a.createSelector)(Object(s.a)(),Object(u.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=c.f,r=Object(p.c)(e.type,e.subtype,i),a=r===p.a?f:v,o=Object(d.a)(a,null,e.type,e.subtype,e,i);return{serverEntityID:e.serverEntityID,providerEntityID:e.providerEntityID,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(o.m)({
serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,playlistMetadataItemEntityID:t.metadataListEntityID,metadataItemEntityID:t.metadataItemEntityID,metricsPage:t.metricsPage}))}}}var a=n(5),o=(n.n(a),n(69)),s=n(22),l=n(55),c=n(32),u=n(833),d=n(232),p=n(126),h=n(3773),f=64,v=36;t.a=Object(l.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.sourceTextClassName,o=e.durationContainerClassName,s=e.attributionContainerClassName,m=e.serverEntityID,b=e.providerEntityID,I=e.metadataItemEntityID,S=e.cellIndex,M=e.type,D=e.subtype,C=e.title,O=e.duration,P=e.context,j=e.imageWidth,T=e.imageHeight,w=e.imageUrl,E=e.isPlaying,x=e.isPlayerPaused,A=e.onPlayPress,N=Object(g.b)(M,P,{providerEntityID:b,subtype:D});return a()("div",{className:t},void 0,a()("div",{
className:n},void 0,!E&&a()(f.a,{className:y.a.transientTitleLeft,index:S+1}),!E&&a()(c.a,{className:y.a.playButton,title:C,onPress:A}),E&&a()(u.a,{className:y.a.equalizer,isPaused:x})),a()("div",{className:y.a.cardContainer},void 0,a()(d.a,{className:y.a.card,serverEntityID:m,providerEntityID:b,component:p.a,width:j,height:T,url:w},I)),a()("div",{className:i,"data-qa-id":"playlistTitleContainer"},void 0,N.map(function(e,t){return a()(h.a,{serverEntityID:m,providerEntityID:b,
metadataItemEntityID:I,component:e,isSecondary:t>0},t)})),a()(l.a,{className:s,textClassName:r,serverEntityID:m,metadataItemEntityID:I}),!!O&&a()("div",{className:o},void 0,a()(v.a,{className:y.a.transientTitleRight,duration:O})))}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(1212)),c=n(196),u=n(588),d=n(279),p=n(247),h=n(249),f=n(834),v=n(791),g=n(187),m=n(3774),y=n.n(m);i.defaultProps={className:y.a.container,indexContainerClassName:y.a.indexContainer,
titlesContainerClassName:y.a.titlesContainer,durationContainerClassName:y.a.durationContainer,attributionContainerClassName:y.a.attributionContainer},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",moveControl:"PlaylistItemRow-moveControl-2sc-e",otherControls:"PlaylistItemRow-otherControls-2m4rn",
metadataDurationContainer:"PlaylistItemRow-metadataDurationContainer-96Rvw PlaylistItemMetadata-durationContainer-yQA2V",attributionContainer:"PlaylistItemRow-attributionContainer-1ceTS undefined",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",moreButton:"PlaylistItemRow-moreButton-1zrwp IconButton-button-9An-7",alternateContainer:"PlaylistItemRow-alternateContainer-2SVf_ PlaylistItemRow-container-PfUn9",metadataContainer:"PlaylistItemRow-metadataContainer-1BWE5 PlaylistItemMetadata-container-2NWQH",underlay:"PlaylistItemRow-underlay-iZmQR",sourceText:"PlaylistItemRow-sourceText-3_tAt",grabIcon:"PlaylistItemRow-grabIcon--qMgM",
isItemDragging:"PlaylistItemRow-isItemDragging-2d2Wa"}},function(e,t){e.exports={dragPreview:"PlaylistItemDragPreview-dragPreview-pFud8"}},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=e.isReadOnly,m=c()(e,["cellIndex","cellX","cellY","cellWidth","cellHeight","playlistItemEntityID","isSmart","isReadOnly"]),y=u||d?g.a:f.a;return s()(h.a,{cellX:n,cellY:i,cellWidth:r,cellHeight:o
},void 0,l?p.a.createElement(y,a()({playlistItemEntityID:l,cellIndex:t,isSmart:u,isReadOnly:d},m)):s()(v.a,{cellIndex:t}))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(87),f=n(3778),v=n(3780),g=n(859);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),g=n(214),m=(n.n(g),n(411)),y=(n.n(m),n(122)),b=(n.n(y),n(324)),I=n(27),S=n(251),M=n(859),D=n(3779),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,isReadOnly:e.isReadOnly,listType:e.listType,
viewportWidth:e.viewportWidth}},endDrag:function(e,t,n){e.onItemDragEnd(t.getItem(),t.didDrop())}},P={hover:function(e,t,n){var i=Object(y.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)}},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(I.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&&b.c||"")+" "+(s&&i&&b.e||"")+" "+(l&&i&&b.d||""||"")},void 0,v.a.createElement(M.a,this.props)))},t}(f.Component);t.a=Object(g.DropTarget)(S.c,P,r)(Object(g.DragSource)(S.c,O,i)(j))},function(e,t){e.exports={
container:"PlaylistItemDragSource-container-ACeFE"}},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(3)),c=n(3781),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){
e.exports={header:"PlaylistItemTable-header-2fQb_ undefined",durationTitle:"PlaylistItemTable-durationTitle-2PGlc"}},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(o.a)(),l.a,s.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(c.a)(i[t.metadataItem])});return{listType:t.playlistType,aspectRatios:r,playlistMetadataItemEntityID:t.entityID,playlistRatingKey:t.ratingKey,isSmart:!!t.smart,isReadOnly:!!t.readOnly}})}var r=n(11),a=n(5),o=(n.n(a),n(22)),s=n(115),l=n(494),c=n(615),u=n(290),d=n(3784),p={onItemDropped:u.e};t.a=Object(r.b)(i,p)(d.a)},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(6),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(3785),m=n(3786),y=n(1360),b=n(138),I=n(3793),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(b.a)(o()({serverEntityID:n,providerEntityID:r,playlistMetadataItemEntityID:a,
ratingKey:s,listType:c,isSmart:l},e),m.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(g.a,o()({showPreview:!t,listComponent:y.a,previewComponent:I.a,createCellRenderer:this.createCellRenderer,onItemDropped:n},i))},t}(f.Component);t.a=S},function(e,t,n){"use strict";var i=n(12),r=n.n(i),a=n(6),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(410),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";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(290),o=n(3787);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(u.a)(),Object(c.a)(),f.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,l=i.type,c=i.thumb,u=i.title;return{
listType:d.c,playlistItemID:n,metadataItemEntityID:o,metadataKey:s,type:l,thumb:c,title:u,selectionID:e,selectionType:d.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(l.m)(o()({},n,{playlistMetadataItemEntityID:t.playlistMetadataItemEntityID,metadataItemEntityID:i})))},onEditPress:function(t){
e(Object(h.editMetadataItem)(o()({},n,{metadataItemEntityID:t})))},onRemovePress:function(){t.onRemoveItem({playlistItemEntityID:t.playlistItemEntityID})}}}var a=n(6),o=n.n(a),s=n(5),l=(n.n(s),n(69)),c=n(1374),u=n(860),d=n(58),p=n(55),h=n(167),f=n(595),v=n(74),g=n(479),m=n(596),y=n(3788);t.a=Object(p.a)(i,r)(Object(g.a)(y.a))},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(87),b=n(27),I=n(137),S=n(44),M=n.n(S),D=n(1375),C=n(3790),O=parseInt(M.a.mosaicCellPadding,10),P=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(b.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?D.a:C.a,d=i-2*O,p=a-2*O
;return o()(y.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(I.a)(P)},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"}},function(e,t,n){"use strict";var i=n(251),r=n(1375),a=n(3791),o=n(3792),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,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(P.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===w?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?w:c,d=e.idAttribute,p=e.indexPropName;return Object(C.DropTarget)(l,r({direction:u,indexPropName:p}),o)(Object(C.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(6),u=n.n(c),d=n(2),p=n.n(d),h=n(12),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(214),O=(n.n(C),n(411)),P=(n.n(O),n(122)),j=(n.n(P),n(324)),T=n(27),w="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(O.getEmptyImage)())},t.prototype.shouldComponentUpdate=function(e,t){
return Object(T.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&&j.c||"")+" "+(h&&a&&j.e||"")+" "+(v&&a&&j.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(214)),v=(n.n(f),n(482)),g=n(851),m=n(3794),y=n(3796),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(g.a)(n);return a()(v.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(5),o=(n.n(a),n(115)),s=n(494),l=n(615),c=n(3795),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(182));t.a=i},function(e,t){e.exports={dragPreview:"PlaylistPhotoDragPreview-dragPreview-1Grr5"}},function(e,t){e.exports={emptyContainer:"PlaylistItemList-emptyContainer-3nMxM",emptyMessage:"PlaylistItemList-emptyMessage-1ot0C PlaylistItemList-emptyContainer-3nMxM"}},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(5),o=(n.n(a),n(22)),s=n(37),l=n(3799);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()(d.a,{},void 0,a()(l.a,{className:h.a.episodeCount,leafCount:o}),a()(u.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),v&&a()(c.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(565)),c=n(1366),u=n(602),d=n(104),p=n(3800),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";function i(e,t,n){
return n===p.b?e?Object(d.default)("In My Podcasts"):Object(d.default)("Add to My Podcasts"):n===p.c?e?Object(d.default)("In My Shows"):Object(d.default)("Add to My Shows"):t===u.e||t===u.f?e?Object(d.default)("In My TIDAL"):Object(d.default)("Add to My TIDAL"):e?Object(d.default)("In My Shows"):Object(d.default)("Add to My Shows")}function r(e){var t=e.className,n=e.kind,r=e.size,a=e.saved,s=e.providerIdentifier,l=e.subtype,u=e.onPress;return o()(c.a,{className:t,kind:n,size:r,onPress:u
},void 0,a&&o()(h.a,{className:g.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(42)),u=n(41),d=n(3),p=n(98),h=n(25),f=n(23),v=n(3802),g=n.n(v);r.defaultProps={kind:f.b.DARK,size:f.e.LARGE},t.a=r},function(e,t){e.exports={icon:"PrePlayToggleMetadataItemSavedButton-icon-2zORz",iconSaved:"PrePlayToggleMetadataItemSavedButton-iconSaved-17WmV PrePlayToggleMetadataItemSavedButton-icon-2zORz",
iconUnsaved:"PrePlayToggleMetadataItemSavedButton-iconUnsaved-3itVt PrePlayToggleMetadataItemSavedButton-icon-2zORz"}},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(565)),c=n(104);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";function i(){return Object(s.createSelector)(function(e,t){return t.metricsContext},function(e){return e.ui.prePlayPage},f.a,h.a,Object(p.a)(),Object(u.a)(),Object(d.a)(),S.a,I.a,Object(M.a)(),function(e,t,n,i,r,a,o,s,l,u){var d=a.librarySectionID,p=new RegExp("/"+d+"$"),h=c.a.find(r,function(e){return!!e.key&&p.test(e.key)
}),f=a.grandparentKey,v=a.parentKey,g=a.key,y=a.grandparentTitle,b=a.parentTitle,I=a.title,S=a.attribution,M=a.skipParent,P=a.subtype,j=Object(C.a)(l,m.h,u,P,i),T=Object(D.a)(u,P,m.h,i),w={};return e&&(w.context=e),{siblingsMetadataListEntityID:t.siblingList,server:n,provider:i,directories:r,selectedDirectory:h||c.a.first(r),metadataKey:g,siblingKey:o,grandparentTitle:y,parentTitle:b,title:I,attribution:S,skipParent:M,grandparentRoute:Object(O.a)(n,i,f,w),parentRoute:Object(O.a)(n,i,v,w),
showArtworkButton:!!a.art,isArtworkButtonSelected:s,listType:u,listSubtype:P,listStyle:j,allListStyles:T}})}function r(e,t){return{onArtworkToggle:function(t){e(Object(y.l)({showPrePlayArtwork:t}))}}}function a(e){return{siblingKey:e.ui.prePlayPage.siblingKey}}function o(e,t){e(Object(b.e)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,siblingKey:t.siblingKey}))}var s=n(5),l=(n.n(s),
n(7)),c=n.n(l),u=n(22),d=n(1384),p=n(350),h=n(37),f=n(50),v=n(55),g=n(120),m=n(32),y=n(68),b=n(252),I=n(420),S=n(624),M=n(625),D=n(351),C=n(421),O=n(143),P=n(3806),j=Object(g.a)(P.a,a,o),T=Object(v.a)(i,r)(j);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(114)),f=n(193),v=n(3807),g=n(118),m=n(607),y=n(134),b=n(102),I=n(45),S=n(27),M=n(3),D=n(25),C=n(32),O=n(127),P=n(146),j=n(846),T=n(488),w=n(23),E=n(62),x=(n(88),n(125),n(1385)),A=n(1386),N=n(1387),L=n(3821),k=n.n(L),_=r()(D.a,{name:"plex-icon-toolbar-artwork-560"}),R=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(I.a)(),r._siblingsMenuButtonID=Object(I.a)(),r}return u()(t,e),
t.prototype.shouldComponentUpdate=function(e,t){return Object(S.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,I=e.title,S=e.attribution,D=e.skipParent,L=e.grandparentRoute,R=e.parentRoute,z=e.showArtworkButton,U=e.isArtworkButtonSelected,B=e.listType,F=e.listSubtype,V=e.listStyle,H=e.allListStyles,Q=this.state,Y=Q.isDirectoriesMenuOpen,G=Q.isSiblingsMenuOpen;if(!u)return null
;var W=!o.isCloud&&!s.isLibraryProvider&&l.length>1,K=!!a,q=B&&E.g(H,V);return r()(f.a,{className:K||z&&!q?k.a.altPageHeader:k.a.pageHeader},void 0,r()(y.a,{},void 0,!!S&&r()(v.a,{attribution:S}),W&&r()(g.a,{id:this._directoriesMenuButtonID,title:c.title,hasMenu:!0,isMenuOpen:Y,onPress:this.onDirectoriesMenuButtonPress}),W&&r()(T.a,{target:this._directoriesMenuButtonID,isOpen:Y,server:o,provider:s,directories:l,selectedDirectory:c,onMenuClose:this.onDirectoriesMenuClose}),!!d&&r()(g.a,{title:d,
to:L,hasMenu:!1,isDisabled:!L}),!D&&!!p&&r()(g.a,{title:p,to:R,hasMenu:!1,isDisabled:!R}),!!I&&r()(g.a,{id:this._siblingsMenuButtonID,title:I,hasMenu:K,isMenuOpen:G,isDisabled:!K,onPress:this.onSiblingsMenuButtonPress}),K&&r()(O.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,component:A.a,initialSize:1/0,target:this._siblingsMenuButtonID,isOpen:G,selectedKey:u,onMenuClose:this.onSiblingsMenuClose})),r()(b.a,{},void 0,r()(N.a,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:i}),z&&r()(m.a,{className:k.a.divider}),z&&r()(h.a,{tooltip:U?Object(M.default)("Hide Artwork"):Object(M.default)("Show Artwork"),"data-qa-id":"toolbarToggleArtwork",isSelected:U,hideOnPress:!1,tooltipAttachment:q||K?w.f.BOTTOM_CENTER:w.f.BOTTOM_RIGHT,onPress:this.onToggleArtworkPress},void 0,_),q&&r()(j.a,{selectedListStyle:V,allListStyles:H}),q&&r()(P.a,{listType:B,listSubtype:F,listContext:C.h,selectedListStyle:V,allListStyles:H}),K&&r()(m.a,{
className:q?k.a.listStylesArrowsDivider:k.a.divider}),K&&r()(x.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:a})))},t}(p.Component);t.a=R},function(e,t,n){"use strict";function i(e){var t=u[e.attribution];return t?a()("span",{className:c.a.attribution},void 0,t):null}var r=n(2),a=n.n(r),o=n(1),s=(n.n(o),n(0)),l=(n.n(s),n(3808)),c=n.n(l),u={"com.tidal":"TIDAL"};t.a=i},function(e,t){e.exports={attribution:"PageHeaderAttribution-attribution-3uGKv"}
},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(25)),c=n(3810),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},b.a,y.a,Object(m.a)(),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={};return e&&(r.context=e),{to:Object(M.a)(t,n,i.key,r),isDisabled:!i.key}})}var r=n(12),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),
n(114)),m=n(22),y=n(37),b=n(50),I=n(55),S=n(252),M=n(143),D={dispatchPreFetch:S.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(g.a,t)},t}(h.Component);t.a=Object(I.a)(i,D)(C)},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(function(e,t){return t.selectedKey},function(e,t){return t.metricsContext
},s.a,o.a,Object(a.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(5),a=(n.n(r),n(22)),o=n(37),s=n(50),l=n(55),c=n(143),u=n(3812);t.a=Object(l.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(103));t.a=i
},function(e,t){e.exports={emptyContainer:"PrePlayPageHeaderSiblingsMenu-emptyContainer-zMrx0"}},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(18),v=n(3),g=n(26),m=n(757),y=n(1098),b=n(1099),I=n(340),S=n(250),M=n(824),D=n(825),C=n(826),O=n(3815),P=n(604),j=n(827),T=n(3816),w=n(3817),E=n(3818),x=n(3820),A=n(828),N=n(829),L=n(831),k=["showPlay","showPlayTrailer","showPlayRadio","showShuffle","showAddToAlbum","showAddToPlaylist","showTogglePlayed","showEdit","showSettings","showSync"],_=["showPlayVersion","showPlayAll","showQueue","showPlayPlexMix","showPlayMusicVideo","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showOptimize","showDownload","showDelete","showDeleteVersion","showGetInfo"],R=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.onAddToPlaylistPress=function(){r.setState({isAddToPlaylistModalOpen:!0})},
r.onAddToPlaylistClose=function(){r.setState({isAddToPlaylistModalOpen:!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,isAddToPlaylistModalOpen:!1},r._moreButtonID=Object(h.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,h=e.showPlay,f=e.showPlayOverflow,L=e.showPlayTrailer,k=e.showPlayTrailerOverflow,_=e.showPlayRadio,R=e.showPlayRadioOverflow,z=e.showShuffle,U=e.showShuffleOverflow,B=e.showAddToAlbum,F=e.showAddToAlbumOverflow,V=e.showAddToPlaylist,H=e.showAddToPlaylistOverflow,Q=e.showAddToSaved,Y=e.showTogglePlayed,G=e.showTogglePlayedOverflow,W=e.showMarkPlayed,K=e.showMarkUnplayed,q=e.showEdit,Z=e.showEditOverflow,X=e.showSettings,J=e.showSettingsOverflow,$=e.showSync,ee=e.showSyncOverflow,te=e.showOverflow,ne=e.onPlayPress,ie=e.onPlayLiveTVPress,re=e.onPlayTrailerPress,ae=e.onPlayRadioPress,oe=e.onShufflePress,se=e.onEditPress,le=e.onSyncPress,ce=this.state,ue=ce.isActionsMenuOpen,de=ce.isConfirmMarkPlayedModalOpen,pe=ce.isConfirmMarkUnplayedModalOpen,he=ce.isSubscribeModalOpen,fe=ce.isSettingsModalOpen,ve=ce.isAddToPlaylistModalOpen
;return r()("div",{className:t},void 0,p&&r()(E.a,{title:l,onPress:this.onRecordPress}),h&&r()(j.a,{playLabel:Object(v.default)("Play"),onPress:d?ie:ne}),L&&r()(w.a,{onPress:re}),z&&r()(A.a,{onPress:oe}),_&&r()(T.a,{onPress:ae}),B&&r()(M.a,{onPress:this.onAddToPlaylistPress}),V&&r()(D.a,{onPress:this.onAddToPlaylistPress}),Y&&W&&r()(O.a,{type:o,subtype:s,onPress:this.onMarkPlayedPress}),Y&&K&&!W&&r()(O.a,{type:o,subtype:s,markUnplayed:!0,onPress:this.onMarkUnplayedPress}),q&&r()(C.a,{onPress:se
}),X&&r()(x.a,{onPress:this.onSettingsPress}),$&&r()(N.a,{onPress:le}),te&&r()(P.a,{id:this._moreButtonID,icon:"plex-icon-toolbar-more-560",label:Object(v.default)("More..."),isMenuOpen:ue,onPress:this.onActionsPress}),r()(m.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,allowRedirectOnDelete:!0,showPlay:f,showPlayTrailer:k,showPlayRadio:R,showQueuePlexMix:!1,showShuffle:U,showAddToAlbum:F,showAddToPlaylist:H,showAddToSaved:Q&&o!==g.k,showEdit:Z,showSettings:J,showMarkPlayed:G&&W,
showMarkUnplayed:G&&K,showSync:ee,target:this._moreButtonID,isOpen:ue,onMenuClose:this.onActionsMenuClose}),W&&r()(y.a,{isOpen:de,type:o,subtype:s,title:l,leafCount:u,onConfirm:this.onMarkPlayedConfirm,onCancel:this.onMarkPlayedCancel}),(B||V)&&r()(I.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,isOpen:ve,onModalClose:this.onAddToPlaylistClose}),K&&r()(y.a,{isOpen:pe,type:o,subtype:s,title:l,leafCount:c,markUnplayed:!0,onConfirm:this.onMarkUnplayedConfirm,
onCancel:this.onMarkUnplayedCancel}),r()(S.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,isOpen:he,subscriptionType:o,onModalClose:this.onSubscribeModalClose}),r()(b.a,{serverEntityID:n,providerEntityID:i,metadataItemEntityID:a,isOpen:fe,onModalClose:this.onSettingsModalClose}))},t}(p.Component);t.a=Object(L.a)(R,k,_)},function(e,t,n){"use strict";function i(e){var t=e.markUnplayed,n=e.onPress;return a()(l.a,{"data-qa-id":"toolbarToggleWatched",
tooltip:t?Object(c.default)("Mark as Unplayed"):Object(c.default)("Mark as 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(114)),c=n(3),u=n(25),d=a()(u.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(u.a,s()({tooltip:Object(d.default)("Play Radio")},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{
name:"plex-icon-toolbar-play-radio-560"});t.a=i},function(e,t,n){"use strict";function i(e){return c.a.createElement(u.a,s()({tooltip:Object(d.default)("Play Trailer")},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{name:"plex-icon-toolbar-play-trailer-560"});t.a=i},function(e,t,n){"use strict";function i(e){var t=(e.title,c()(e,["title"]));return p.a.createElement(h.a,s()({tooltip:Object(f.default)("Record"),className:m.a.toolbarRecordButton,
"data-qa-id":"toolbarRecord"},t),y)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(114),f=n(3),v=n(1109),g=n(3819),m=n.n(g),y=a()(v.a,{});t.a=i},function(e,t){e.exports={toolbarRecordButton:"ToolbarRecordButton-toolbarRecordButton-2R8pz ToolbarButton-toolbarButton-2i2nn PlayButton-playButton-3WX8X RecordIcon-recordIconContainer-1PXGA"}},function(e,t,n){"use strict";function i(e){return c.a.createElement(u.a,s()({tooltip:Object(d.default)("Settings"),
"data-qa-id":"toolbarSettings"},e),h)}var r=n(2),a=n.n(r),o=n(6),s=n.n(o),l=n(0),c=n.n(l),u=n(114),d=n(3),p=n(25),h=a()(p.a,{name:"plex-icon-settings-560"});t.a=i},function(e,t){e.exports={pageHeader:"PrePlayPageHeader-pageHeader-2o14F PageHeader-pageHeader-14-NY",altPageHeader:"PrePlayPageHeader-altPageHeader-3bZbS PrePlayPageHeader-pageHeader-2o14F PageHeader-pageHeader-14-NY",divider:"PrePlayPageHeader-divider-WQRk8 PageHeaderDivider-pageHeaderDivider-1BKT-",
listStylesArrowsDivider:"PrePlayPageHeader-listStylesArrowsDivider-1OrTC PageHeaderDivider-pageHeaderDivider-1BKT-"}},function(e,t,n){"use strict";function i(e){var t=e.isAlbum,n=e.onRemovePress;return a()(l.a,{tooltip:t?Object(c.default)("Remove from Album"):Object(c.default)("Remove from Playlist"),tooltipAttachment:d.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(114)),c=n(3),u=n(25),d=n(23),p=a()(u.a,{
name:"plex-icon-toolbar-remove-from-playlist-560"});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(67)),s=n(80),l=n(38),c=n(43),u=n(105),d=n(46),p=n(286),h=n(1351),f=n(145),v=d.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params,i=s.a,a=Object(l.a)(c.m,i),d=Object(l.a)(c.k,t,a);return r()(u.a,{metricsContext:n.context},void 0,r()(o.a,{},void 0,r()(f.a,{selectedProviderEntityID:d}),r()(p.a,{serverEntityID:a,providerEntityID:d},void 0,r()(h.a,{
machineIdentifier:i,selectedProviderID:t,serverEntityID:a,providerEntityID:d,metadataKey:n.key}))))}});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(67)),s=n(80),l=n(623),c=n(63),u=n(38),d=n(43),p=n(105),h=n(46),f=n(489),v=n(286),g=n(145),m=h.a.extend({component:function(e){
var t=e.selectedProviderID,n=e.params||{},i=n.key,a=n.typeKey,h=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,P=n.customFilter,j=s.a,T=Object(u.a)(d.m,j),w=Object(u.a)(d.k,t,T);return r()(p.a,{metricsContext:n.context},void 0,r()(o.a,{},void 0,r()(g.a,{selectedProviderEntityID:w}),r()(v.a,{serverEntityID:T,providerEntityID:w},void 0,r()(f.a,{machineIdentifier:j,serverEntityID:T,providerEntityID:w,
directoryKey:i,typeKey:a,activeType:h,activeFilters:Object(l.a)(m),activeFilterLabel:y,activeSort:b,activeLimit:c.a.parseInteger(C),customFilter:c.a.parseBoolean(P),folderKey:I,folderTitle:S,parentFolderKey:M,parentFolderTitle:D,isTimeline:!1,shouldSaveRoute:c.a.parseBoolean(O)}))))}});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(67)),s=n(63),l=n(38),c=n(43),u=n(105),d=n(46),p=n(254),h=n(489),f=n(255),v=n(3826),g=n(145),m=d.a.extend({component:function(e){
var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.type,d=i.sort,m=i.save,y=!1!==e.isPlaylistRoute,b=i.key;b||(y=!0,b="/playlists");var I=Object(l.a)(c.m,t),S=Object(l.a)(c.k,n,I);return r()(u.a,{metricsContext:i.context},void 0,r()(o.a,{},void 0,r()(g.a,{isPlaylistRoute:y}),r()(p.a,{machineIdentifier:t},void 0,r()(f.a,{providerEntityID:S},void 0,r()(h.a,{machineIdentifier:t,serverEntityID:I,providerEntityID:S,directoryKey:b,activeType:a,activeSort:d,
shouldSaveRoute:s.a.parseBoolean(m),component:v.a})))))}});t.a=m},function(e,t,n){"use strict";function i(){return Object(c.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=d.a.findWhere(e,{isDefault:!0})||e[0],o=d.a.findWhere(e,{key:i})||a;return o&&r&&(o.direction=r),o})}function r(){
return Object(c.createSelector)(function(e){return e.ui.playlistsPage},f.a,Object(p.a)(),Object(h.a)(),i(),y.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(m.changeQuickSearchSettings)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,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(g.b({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,libraryKey:t.libraryKey,containerKey:t.containerKey})),e(g.d()),t.libraryKey&&e(g.c())}var l=n(11),c=n(5),u=(n.n(c),
n(7)),d=n.n(u),p=n(199),h=n(3827),f=n(37),v=n(120),g=n(1389),m=n(84),y=n(74),b=n(3838),I=Object(v.a)(b.a,o,s),S=Object(l.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(s.a)(),function(e,t,n,i){var r=e.lastIndexOf("/")+1,s=parseInt(e.slice(r),10),u={type:Object(c.q)(c.i).id
},d=Object(l.a)(i.version,o.a.multiplePlaylistTypes),p=i.ownerFeatures&&-1!==i.ownerFeatures.indexOf("photos-v5");return t?u.playlistType=t:!s&&d&&p&&(u.playlistType="audio,video"),n&&(u.sort=n),s&&(u.sectionID=s,u.includeEmpty=0),Object(a.join)("/playlists",u)})}t.a=i;var r=n(5),a=(n.n(r),n(19)),o=n(175),s=n(34),l=n(316),c=n(26)},function(e,t,n){"use strict";var i=n(24),r=n(3829),a=i.a.extend({name:"LibraryDirectoryCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=i.a.extend({name:"LibraryDirectoryModel",context:["server"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(3831),a=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(3832),o=i.a.extend({name:"MetadataFieldTypeModel",context:["server"],idAttribute:"type",rootPropertyName:"FieldType",
syncedAttrs:{type:r.a.string.isRequired},syncedRelations:{operators:{relationClass:a.a,rootPropertyName:"Operator"}}});t.a=o},function(e,t,n){"use strict";var i=n(24),r=n(3833),a=i.a.extend({name:"OperatorCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"OperatorModel",context:["server"],idAttribute:"key",rootPropertyName:"Operator",syncedAttrs:{key:r.a.string,title:r.a.string}});t.a=a},function(e,t,n){"use strict"
;var i=n(24),r=n(3835),a=i.a.extend({name:"MetadataTypeCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(3836),o=n(930),s=n(434),l=i.a.extend({name:"MetadataTypeModel",context:["server"],idAttribute:"key",rootPropertyName:"Type",syncedAttrs:{type:r.a.string,subtype:r.a.string,key:r.a.string,title:r.a.string},syncedRelations:{filters:{relationClass:o.a,rootPropertyName:"Filter"},sorts:{relationClass:s.a,rootPropertyName:"Sort"},fields:{
relationClass:a.a,rootPropertyName:"Field"}}});t.a=l},function(e,t,n){"use strict";var i=n(24),r=n(3837),a=i.a.extend({name:"FieldCollection",context:["server"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"FieldModel",context:["server"],idAttribute:"key",rootPropertyName:"Field",syncedAttrs:{key:r.a.string,title:r.a.string,type:r.a.string,subType: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(1),p=(n.n(d),n(0)),h=(n.n(p),n(54)),f=n(30),v=n(58),g=n(127),m=n(83),y=n(415),b=n(3839),I=n(3841),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()(m.a,{metricsPage:f.O,metricsProperties:{identifier:a,type:l},
allowBackgroundLightPreset:!0,scrollDirection:h.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()(g.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:i,initialSize:50,isPhotoAlbums:o.type===v.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()(p.a,{className:m.a.pageContent,scrollerClassName:m.a.pageContentScroller,serverEntityID:t,providerEntityID:n,metadataListEntityID:i,items:r,containerKey:o,listType:u.h,listContext:c.b,columnAdjustment:s,keyPropName:"metadataItemEntityID",
itemsOffset:g.start,size:d,onPageRequest:D}):I?y:S?a()(h.a,{},void 0,a()(v.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()(h.a,{},void 0,a()(f.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(3)),c=n(32),u=n(197),d=(n(412),n(31)),p=n(836),h=n(140),f=n(188),v=n(284),g=n(3840),m=n.n(g),y=a()(h.a,{},void 0,a()(f.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(S.a)(e.server,e.provider,e.libraryKey,t,n)}}function r(e){switch(e){case y.d:return Object(m.default)("Video");case y.a:return Object(m.default)("Music");case y.c:return Object(m.default)("Photo");default:return Object(m.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(g.a)(),Object(v.a)(),Object(f.a)(),Object(h.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(S.a)(o,s,c,e.type,{type:n,
sort:r+":"+h,save:1})}}),p={totalSize:l.totalSize,playlistSorts:d};if("/playlists"===c){var h={server:o,provider:s,libraryKey:c,selectedSort:t},f=i(h),v=i(h,y.a),g=i(h,y.c),m=i(h,y.d);p.playlistTypes=u?[f,v,m]:[f,v,g,m]}else p.libraryRoute=Object(I.a)(o,s,c,{save:1}),p.isPhotoAlbums=u&&e.type===y.c,p.metadataTypes=r?r.types:[],p.metadataPseudoTypes=Object(b.a)({type:e.type,server:o,provider:s,libraryKey:c,libraryDirectories:r&&r.directories});return p})}
var o=n(6),s=n.n(o),l=n(1),c=n.n(l),u=n(11),d=n(5),p=(n.n(d),n(366)),h=n(199),f=n(119),v=n(51),g=n(34),m=n(3),y=n(58),b=n(614),I=n(133),S=n(750),M=n(3842),D=p.a.directions,C=D.ASCENDING,O=D.DESCENDING,P=Object(u.b)(a)(M.a);P.propTypes=s()({},P.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=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(7)),f=n.n(h),v=n(193),g=n(215),m=n(118),y=n(134),b=n(102),I=n(45),S=n(3),M=n(146),D=n(422),C=n(3843),O=n(3844),P=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.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(I.a)(),r._sortsMenuButtonID=Object(I.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,p=d.isTypesMenuOpen,h=d.isSortsMenuOpen,b=u?Object(S.default)("Albums"):Object(S.default)("Playlists"),I=f.a.find(i,function(e){return e.type===s}),M=n||!I?b:I.title;return r()(v.a,{},void 0,r()(y.a,{},void 0,r()(m.a,{id:this._typesMenuButtonID,title:M,hasMenu:!0,isMenuOpen:p,
onPress:this.onTypesMenuButtonPress}),n?r()(D.a,{target:this._typesMenuButtonID,isOpen:p,libraryRoute:n,types:a,pseudoTypes:o,selectedType:{key:"playlists"},activeFilters:[],onMenuClose:this.onTypesMenuClose}):r()(O.a,{target:this._typesMenuButtonID,isOpen:p,activeType:s,types:i,onMenuClose:this.onTypesMenuClose}),!n&&r()(m.a,{title:b}),c&&r()(m.a,{id:this._sortsMenuButtonID,title:c.title,hasMenu:!0,isMenuOpen:h,onPress:this.onSortsMenuButtonPress}),c&&r()(C.a,{target:this._sortsMenuButtonID,
isOpen:h,sorts:l,onMenuClose:this.onSortsMenuClose}),r()(g.a,{},void 0,t)),P)},t}(p.Component);t.a=j},function(e,t,n){"use strict";function i(e){var t=e.sorts,n=s()(e,["sorts"]);return u.a.createElement(d.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(h.default)("Ascending"):Object(h.default)("Descending")},t,n)}))}var r=n(2),a=n.n(r),o=n(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(366),h=n(3),f=n(103),v=p.a.directions.DESCENDING;t.a=i},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(12),s=n.n(o),l=n(1),c=(n.n(l),n(0)),u=n.n(c),d=n(56),p=n(103);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(67)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(254),p=n(255),h=n(861),f=n(145),v=r()(f.a,{}),g=u.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.key,u=i.record,f=i.allEpisodes,g=Object(s.a)(l.m,t),m=Object(s.a)(l.k,n,g);return r()(c.a,{metricsContext:i.context
},void 0,r()(o.a,{},void 0,v,r()(d.a,{machineIdentifier:t},void 0,r()(p.a,{providerEntityID:m},void 0,r()(h.a,{machineIdentifier:t,serverEntityID:g,providerEntityID:m,metadataKey:a,record:1===parseInt(u,10),allEpisodes:1===parseInt(f,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(67)),s=n(80),l=n(38),c=n(43),u=n(105),d=n(46),p=n(286),h=n(861),f=n(145),v=d.a.extend({component:function(e){
var t=e.selectedProviderID,n=e.params||{},i=n.key,a=n.record,d=n.allEpisodes,v=s.a,g=Object(l.a)(c.m,v),m=Object(l.a)(c.k,t,g);return r()(u.a,{metricsContext:n.context},void 0,r()(o.a,{},void 0,r()(f.a,{selectedProviderEntityID:m}),r()(p.a,{serverEntityID:g,providerEntityID:m},void 0,r()(h.a,{machineIdentifier:v,serverEntityID:g,providerEntityID:m,metadataKey:i,record:1===parseInt(a,10),allEpisodes:1===parseInt(d,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(67)),s=n(623),l=n(63),c=n(38),u=n(43),d=n(105),p=n(46),h=n(254),f=n(489),v=n(255),g=n(145),m=r()(g.a,{}),y=p.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.key,p=i.typeKey,g=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,P=i.save,j=i.customFilter,T=Object(c.a)(u.m,t),w=Object(c.a)(u.k,n,T);return r()(d.a,{
metricsContext:i.context},void 0,r()(o.a,{},void 0,m,r()(h.a,{machineIdentifier:t},void 0,r()(v.a,{providerEntityID:w},void 0,r()(f.a,{machineIdentifier:t,serverEntityID:T,providerEntityID:w,directoryKey:a,typeKey:p,activeType:g,activeFilters:Object(s.a)(y),activeFilterLabel:b,activeSort:I,activeLimit:l.a.parseInteger(O),customFilter:l.a.parseBoolean(j),folderKey:S,folderTitle:M,parentFolderKey:D,parentFolderTitle:C,isTimeline:!1,shouldSaveRoute:l.a.parseBoolean(P)})))))}});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(67)),s=n(63),l=n(38),c=n(43),u=n(46),d=n(254),p=n(489),h=n(255),f=n(145),v=r()(f.a,{}),g=u.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params||{},a=i.key,u=i.save,f=Object(l.a)(c.m,t),g=Object(l.a)(c.k,n,f);return r()(o.a,{},void 0,v,r()(d.a,{machineIdentifier:t},void 0,r()(h.a,{providerEntityID:g},void 0,r()(p.a,{machineIdentifier:t,serverEntityID:f,providerEntityID:g,directoryKey:a,
isTimeline:!0,shouldSaveRoute:s.a.parseBoolean(u)}))))}});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(67)),s=n(46),l=n(3850),c=s.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params||{};return r()(o.a,{},void 0,r()(l.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},u.a,d.a,function(e,t,n){
if(n)for(var i=n.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(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(132)),d=n(1391),p=n(3851),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";function i(e){return e.serverEntityID&&e.providerEntityID?l.a.createElement(h.a,e):a()(d.a,{
title:Object(u.default)("No longer available"),description:Object(u.default)("Details can only be mirrored temporarily while casting")},void 0,a()(c.a,{to:"#",kind:p.b.PRIMARY},void 0,Object(u.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(20),u=n(3),d=n(113),p=n(23),h=n(861);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(80)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(617),p=n(169),h=n(3853),f=n(170),v=r()(f.a,{}),g=u.a.extend({
component:function(e){var t=e.selectedProviderID,n=e.query,i=e.params,a=void 0===i?{}:i,u=Object(s.a)(l.m,o.a),f=Object(s.a)(l.k,t,u);return r()(c.a,{metricsContext:a.context},void 0,r()(p.a,{},void 0,v,r()(d.a,{providerEntityID:f},void 0,r()(h.a,{providerEntityID:f,serverEntityID:u,providerIdentifier:t,query:n}))))}});t.a=g},function(e,t,n){"use strict";function i(){return Object(g.createSelector)(function(e){return e.ui.searchPage},function(e){return{
isSearchPending:!!y.a.findWhere(e.searches,{isSearchPending:!0})}})}var r=n(12),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(5),m=(n.n(g),n(7)),y=n.n(m),b=n(84),I=n(354),S=n(3854),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(v.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:c.W,
metricsProperties:{singleServer:!0},allowBackgroundLightPreset:!0,scrollDirection:l.NONE},void 0,a()(p.a,{isSearchPending:r,query:i,allowSearchAllServers:!1}),a()(d.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(54)),c=n(30),u=n(83),d=n(3855),p=n(1392);t.a=i},function(e,t,n){"use strict";function i(){return Object(D.createSelector)(function(e,t){return t.serverEntityID},function(e,t){return t.providerEntityID},j.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(D.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=O.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(D.createSelector)(r(),a(),T.a,function(e,t,n){return{availableProviders:e,isSearchCapable:!!g()(e).length,columnAdjustment:n.columnAdjustment,providers:t}})}
var s=n(12),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(53),g=n.n(v),m=n(6),y=n.n(m),b=n(1),I=(n.n(b),n(0)),S=n.n(I),M=n(11),D=n(5),C=(n.n(D),n(7)),O=n.n(C),P=n(276),j=n(132),T=n(70),w=n(35),E=n(354),x=n(855),A={dispatchFetchSearchPage:E.b,dispatchClearSearchPage:E.a},N=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(w.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(w.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 S.a.createElement(x.a,t)},t}(I.Component);t.a=Object(M.b)(o,A)(N)},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-TAE_u",separator:"SearchPageHeader-separator-1L3dS"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(38)),s=n(43),l=n(105),c=n(46),u=n(288),d=n(169),p=n(3858),h=n(170),f=r()(h.a,{}),v=c.a.extend({component:function(e){
var t=e.selectedServerID,n=e.query,i=e.params,a=void 0===i?{}:i,c=Object(o.a)(s.m,t);return r()(l.a,{metricsContext:a.context},void 0,r()(d.a,{},void 0,f,r()(u.a,{serverEntityID:c},void 0,r()(p.a,{serverEntityID:c,query:n}))))}});t.a=v},function(e,t,n){"use strict";function i(){return Object(y.createSelector)(function(e){return e.servers},function(e,t){return t.serverEntityID},M.a,D.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 I.a.isMatch(a,{isConnected:!0,isFullServer:!0})?e.concat(i):e},[])})}function r(){return Object(S.a)(i(),function(e){return e})}function a(){return Object(y.createSelector)(function(e){return e.ui.searchPage},r(),D.a,function(e,t,n){return{serverEntityIDs:t,searchAllServers:n.searchAllServers,isSearchPending:!!I.a.findWhere(e.searches,{isSearchPending:!0})}})}var o=n(6),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(5),b=(n.n(y),
n(7)),I=n.n(b),S=n(156),M=n(163),D=n(70),C=n(35),O=n(68),P=n(354),j=n(3859),T={populateSearchProviders:P.c,clearSearchPage:P.a,saveExperienceSettings:O.l},w=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(C.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(C.a)(function(){e.populateSearchProviders(e.serverEntityIDs)})},t.prototype.render=function(){
return g.a.createElement(j.a,s()({},this.props,{onSearchAllChange:this.onSearchAllChange}))},t}(v.Component);t.a=Object(m.b)(a,T)(w)},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:c.W,metricsProperties:{singleServer:!r},allowBackgroundLightPreset:!0,scrollDirection:l.NONE},void 0,a()(p.a,{isSearchPending:i,query:n,allowSearchAllServers:!0,searchAllServers:r,
onSearchAllChange:o}),a()(d.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(54)),c=n(30),u=n(83),d=n(1350),p=n(1392);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(41)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(288),p=n(169),h=n(1393),f=n(170),v=r()(f.a,{}),g=u.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.key,a=e.params,u=Object(s.a)(l.m,t),f=Object(s.a)(l.k,n||o.d,u);return r()(c.a,{
metricsContext:a.context},void 0,r()(p.a,{},void 0,v,r()(d.a,{serverEntityID:u},void 0,r()(h.a,{machineIdentifier:t,serverEntityID:u,providerEntityID:f,metadataKey:i}))))}});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(38)),s=n(43),l=n(105),c=n(46),u=n(286),d=n(169),p=n(1393),h=n(170),f=r()(h.a,{}),v=c.a.extend({component:function(e){var t=e.selectedServerID,n=e.selectedProviderID,i=e.params,a=Object(o.a)(s.m,t),c=Object(o.a)(s.k,n,a);return r()(l.a,{
metricsContext:i.context},void 0,r()(d.a,{},void 0,f,r()(u.a,{serverEntityID:a,providerEntityID:c},void 0,r()(p.a,{machineIdentifier:t,selectedProviderID:n,serverEntityID:a,providerEntityID:c,metadataKey:i.key}))))}});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(41)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(288),p=n(169),h=n(862),f=n(170),v=r()(f.a,{}),g=u.a.extend({component:function(e){
var t=e.selectedServerID,n=e.selectedProviderID,i=e.params,a=void 0===i?{}:i,u=a.key,f=a.record,g=a.allEpisodes,m=Object(s.a)(l.m,t),y=Object(s.a)(l.k,n||o.d,m);return r()(c.a,{metricsContext:a.context},void 0,r()(p.a,{},void 0,v,r()(d.a,{serverEntityID:m},void 0,r()(h.a,{serverEntityID:m,providerEntityID:y,metadataKey:u,record:1===parseInt(f,10),allEpisodes:1===parseInt(g,10)}))))}});t.a=g},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(u.default)("There was an unexpected error loading this item")}):a()(p.a,{metricsPage:c.S,isMetricsDelegated:!0,disableBackgroundPreset:!0,scrollDirection:l.NONE},void 0,d?a()(v.a,{serverEntityID:t,providerEntityID:n,toolbarComponent:S,
allowRedirectOnDelete:!0}):a()(m.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),a()(g.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(54)),c=n(30),u=n(3),d=n(31),p=n(83),h=n(73),f=n(184),v=n(492),g=n(3864),m=n(3871),y=a()(h.a,{},void 0,a()(d.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(64)),f=n(27),v=n(140),g=n(798),m=n(44),y=n.n(m),b=n(3865),I=n(3870),S=n.n(I),M=parseInt(y.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(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.columnAdjustment,s=e.record,l=e.allEpisodes,c=this.state,u=c.scrollTop,d=c.isMeasured,p=c.pageWidth,f=c.pageHeight,m=c.pageY;return r()(h.a,{className:S.a.prePlayPageContentContainer,
onMeasure:this.onContentMeasure},void 0,r()(v.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:f,posterWidth:Object(g.a)(p,o),posterTop:m+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(p.a)(),function(e){
return!(!e||!e.isPopulated)})}function r(){return Object(c.createSelector)(h.a,Object(d.a)(),Object(u.a)(),M.a,S.a,I.a,Object(D.a)(),i(),function(e){return!!e.remotePlayer},function(e,t,n,i,r,a,o,s,l){var c=t.type,u=t.subtype,d=Object(O.b)(c,u,t,v.h),p=d||t.thumb||t.parentThumb||t.grandparentThumb,h=t.grandparentArt||t.parentArt||t.art,f=t.grandparentTheme||t.parentTheme||t.theme,g=i?h||p:p||h,m=Object(C.a)(a,v.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:d,parentThumb:t.parentThumb,grandparentThumb:t.grandparentThumb,composite:t.composite,art:i?h:void 0,hero:t.hero,theme:r?f:void 0,backgroundImageUrl:g,playlistType:t.playlistType,isListReady:s,onDeckMetadataItemEntityID:t.onDeck,
extrasMetadataListEntityID:t.extras,popularLeavesMetadataListEntityID:t.popularLeaves,listType:o,listStyle:m,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(g.a)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,imageUrl:n}))},onThemeMusicChange:function(n){
e(Object(g.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(y.c)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,metadataItemEntityID:t.metadataItemEntityID,descendantKey:t.descendantKey}))}
var l=n(11),c=n(5),u=(n.n(c),n(1352)),d=n(22),p=n(119),h=n(37),f=n(120),v=n(32),g=n(333),m=n(246),y=n(252),b=n(84),I=n(420),S=n(1353),M=n(624),D=n(625),C=n(421),O=n(232),P=n(3866),j=Object(f.a)(P.a,o,s),T=Object(l.b)(r,a)(j);t.a=T},function(e,t,n){"use strict";function i(e,t,n){if(!e)return R.a;var i=b.c.test(n),r=i?F:U,a=B[t],o=r[e];return(a?a[e]||o:o)||z.a}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),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(41),I=n(1354),S=n(1355),M=n(1359),D=n(1361),C=n(1362),O=n(1367),P=n(1368),j=n(1369),T=n(1370),w=n(1371),E=n(1372),x=n(1373),A=n(1376),N=n(1377),L=n(1378),k=n(1382),_=n(1383),R=n(3867),z=n(3869),U={movie:w.a,show:k.a,season:A.a,episode:O.a,artist:M.a,album:S.a,photoalbum:E.a,clip:w.a,playlist:x.a,collection:D.a},B={podcast:{show:L.a,track:P.a},webshow:{show:_.a,episode:j.a}},F={movie:T.a,show:N.a,episode:C.a},V=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=V},function(e,t,n){"use strict";function i(){return a()(c.a,{
title:Object(l.default)("Nothing is here"),description:Object(l.default)("This item may have been deleted recently")},void 0,a()(s.a,{to:"#",kind:u.b.PRIMARY},void 0,Object(l.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(20)),l=n(3),c=n(1394),u=n(23);t.a=i},function(e,t){e.exports={icon:"InnerErrorPage-icon-3G9jv ErrorPage-icon-ZJ38x EmptyPage-icon-31D3Z"}},function(e,t,n){"use strict";function i(){return a()(c.a,{title:Object(l.default)("You must be lost"),
description:Object(l.default)("This item does not have its own page")},void 0,a()(s.a,{to:"#",kind:u.b.PRIMARY},void 0,Object(l.default)("Go Home")))}var r=n(2),a=n.n(r),o=n(0),s=(n.n(o),n(20)),l=n(3),c=n(1394),u=n(23);t.a=i},function(e,t){e.exports={prePlayPageContentContainer:"PrePlayPageContent-prePlayPageContentContainer-3Xb-n PageContent-pageContent-16mK6",prePlayPageContent:"PrePlayPageContent-prePlayPageContent-2WcFU"}},function(e,t,n){"use strict";function i(){
return Object(s.createSelector)(function(e,t){return t.metricsContext},function(e){return e.ui.prePlayPage},d.a,u.a,Object(m.a)(),Object(l.a)(),Object(c.a)(),b.a,y.a,Object(I.a)(),function(e,t,n,i,r,a,o,s,l,c){var u=a.grandparentKey,d=a.parentKey,p=a.key,h=a.grandparentTitle,v=a.parentTitle,g=a.title,m=a.skipParent,y=a.subtype,b=Object(M.a)(l,f.h,c,y,i),I=Object(S.a)(c,y,f.h,i),C={};return e&&(C.context=e),{siblingsMetadataListEntityID:t.siblingList,sourceDirectory:r,metadataKey:p,siblingKey:o,
grandparentTitle:h,parentTitle:v,title:g,skipParent:m,grandparentRoute:Object(D.a)(n,i,u,C),parentRoute:Object(D.a)(n,i,d,C),showArtworkButton:!!a.art,isArtworkButtonSelected:s,listType:c,listSubtype:y,listStyle:b,allListStyles:I}})}function r(e,t){return{onArtworkToggle:function(t){e(Object(v.l)({showPrePlayArtwork:t}))}}}function a(e){return{siblingKey:e.ui.prePlayPage.siblingKey}}function o(e,t){e(Object(g.e)({serverEntityID:t.serverEntityID,providerEntityID:t.providerEntityID,
siblingKey:t.siblingKey}))}var s=n(5),l=(n.n(s),n(22)),c=n(1384),u=n(37),d=n(50),p=n(55),h=n(120),f=n(32),v=n(68),g=n(252),m=n(3872),y=n(420),b=n(624),I=n(625),S=n(351),M=n(421),D=n(143),C=n(3873),O=Object(h.a)(C.a,a,o),P=Object(p.a)(i,r)(O);t.a=P},function(e,t,n){"use strict";function i(){return Object(r.createSelector)(o.a,Object(a.a)(),function(e,t){var n=t.librarySectionKey,i=t.librarySectionID,r=e.features.content;if(r&&(n||i))return r.directories.find(function(e){
return e.id?e.id===i:!!e.key&&e.key===n})})}t.a=i;var r=n(5),a=(n.n(r),n(22)),o=n(37)},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(118),v=n(102),g=n(45),m=n(27),y=n(3),b=n(25),I=n(32),S=n(217),M=n(493),D=n(289),C=n(127),O=n(146),P=n(853),j=n(1385),T=n(1386),w=n(1387),E=n(23),x=n(62),A=(n(93),n(3874)),N=n.n(A),L=r()(b.a,{name:"plex-icon-toolbar-artwork-560"}),k=function(e){function t(n,i){
o()(this,t);var r=l()(this,e.call(this,n,i));return 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={isSiblingsMenuOpen:!1},r._siblingsMenuButtonID=Object(g.a)(),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.providerEntityID,i=e.metadataItemEntityID,a=e.siblingsMetadataListEntityID,o=e.sourceDirectory,s=e.metadataKey,l=e.grandparentTitle,c=e.parentTitle,u=e.title,d=e.skipParent,p=e.grandparentRoute,g=e.parentRoute,m=e.showArtworkButton,b=e.isArtworkButtonSelected,A=e.listType,k=e.listSubtype,_=e.listStyle,R=e.allListStyles,z=this.state.isSiblingsMenuOpen;if(!s)return null;var U=!!a,B=A&&x.g(R,_);return r()(S.a,{
className:U||m&&!B?N.a.altPageHeader:N.a.pageHeader},void 0,r()(D.a,{serverEntityID:t,providerEntityID:n,sourceDirectory:o},void 0,!!l&&r()(f.a,{title:l,to:p,hasMenu:!1,isDisabled:!p}),!d&&!!c&&r()(f.a,{title:c,to:g,hasMenu:!1,isDisabled:!g}),!!u&&r()(f.a,{id:this._siblingsMenuButtonID,title:u,hasMenu:U,isMenuOpen:z,isDisabled:!U,onPress:this.onSiblingsMenuButtonPress}),U&&r()(C.a,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,component:T.a,initialSize:1/0,
target:this._siblingsMenuButtonID,isOpen:z,selectedKey:s,onMenuClose:this.onSiblingsMenuClose})),r()(v.a,{},void 0,r()(w.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i}),m&&r()(M.a,{className:N.a.divider}),m&&r()(h.a,{tooltip:b?Object(y.default)("Hide Artwork"):Object(y.default)("Show Artwork"),"data-qa-id":"toolbarToggleArtwork",isSelected:b,hideOnPress:!1,tooltipAttachment:B||U?E.f.BOTTOM_CENTER:E.f.BOTTOM_RIGHT,onPress:this.onToggleArtworkPress},void 0,L),B&&r()(P.a,{
selectedListStyle:_,allListStyles:R}),B&&r()(O.a,{listType:A,listSubtype:k,listContext:I.h,selectedListStyle:_,allListStyles:R}),U&&r()(M.a,{className:B?N.a.listStylesArrowsDivider:N.a.divider}),U&&r()(j.a,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:a})))},t}(p.Component);t.a=k},function(e,t){e.exports={pageHeader:"PrePlayPageHeader-pageHeader-1sIu- TypeFirstPageHeader-pageHeader-3yLq-",
altPageHeader:"PrePlayPageHeader-altPageHeader-j0lNg PrePlayPageHeader-pageHeader-1sIu- TypeFirstPageHeader-pageHeader-3yLq-",divider:"PrePlayPageHeader-divider-3qHT9 TypeFirstPageHeaderDivider-pageHeaderDivider-3oGvs",listStylesArrowsDivider:"PrePlayPageHeader-listStylesArrowsDivider-2P7rO TypeFirstPageHeaderDivider-pageHeaderDivider-3oGvs"}},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(80)),s=n(38),l=n(43),c=n(105),u=n(46),d=n(617),p=n(169),h=n(862),f=n(170),v=r()(f.a,{}),g=u.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params,i=void 0===n?{}:n,a=i.key,u=i.record,f=i.allEpisodes,g=Object(s.a)(l.m,o.a),m=Object(s.a)(l.k,t,g);return r()(c.a,{metricsContext:i.context},void 0,r()(p.a,{},void 0,v,r()(d.a,{providerEntityID:m},void 0,r()(h.a,{serverEntityID:g,providerEntityID:m,metadataKey:a,record:1===parseInt(u,10),allEpisodes:1===parseInt(f,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(46)),s=n(169),l=n(3877),c=n(170),u=r()(c.a,{}),d=o.a.extend({component:function(e){var t=e.selectedProviderID,n=e.params,i=void 0===n?{}:n;return r()(s.a,{},void 0,u,r()(l.a,{providerIdentifier:t,metadataKey:i.key}))}});t.a=d},function(e,t,n){"use strict";function i(){return Object(c.createSelector)(function(e,t){return t.providerIdentifier},u.a,d.a,function(e,t,n){if(n)for(var i=n.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(6),a=n.n(r),o=n(1),s=n.n(o),l=n(11),c=n(5),u=(n.n(c),n(132)),d=n(1391),p=n(3878),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";function i(e){return e.serverEntityID&&e.providerEntityID?l.a.createElement(h.a,e):a()(d.a,{title:Object(u.default)("No longer available"),
description:Object(u.default)("Details can only be mirrored temporarily while casting")},void 0,a()(c.a,{to:"#",kind:p.b.PRIMARY},void 0,Object(u.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(20),u=n(3),d=n(113),p=n(23),h=n(862);t.a=i},function(e,t,n){"use strict";var i=n(267),r=n(3880),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(18),r=n(19),a=n(268),o=n(3881),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)}),{clearActiveNavigationType:!1})})}});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(67)),s=n(46),l=n(254),c=n(255),u=n(3882),d=n(145),p=r()(d.a,{}),h=s.a.extend({component:function(e){var t=e.selectedServerID,n=e.params||{};return r()(o.a,{},void 0,p,r()(l.a,{machineIdentifier:t},void 0,r()(c.a,{},void 0,r()(u.a,{machineIdentifier:t,
selectedViewType:n.view}))))}});t.a=h},function(e,t,n){"use strict";function i(){return Object(m.createSelector)(S.a,Object(I.a)(y.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(M.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(6),p=n.n(d),h=n(1),f=(n.n(h),
n(0)),v=n.n(f),g=n(11),m=n(5),y=(n.n(m),n(60)),b=n(353),I=n(746),S=n(132),M=n(34),D=n(70),C=n(35),O=n(68),P=n(3883),j=p()({saveExperienceSettings:O.l},b),T=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(C.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(P.a,this.props):null},t}(f.Component);t.a=Object(g.b)(r,j)(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(27),v=n(30),g=n(83),m=n(410),y=n(23),b=n(3884),I=n(3889),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(f.a)(this,e,t)},t.prototype.render=function(){var e=this.props,t=e.machineIdentifier,n=e.selectedViewType;return r()(g.a,{metricsPage:v._4,metricsProperties:{pane:n},scrollDirection:y.d.NONE},void 0,r()(I.a,{machineIdentifier:t,selectedViewType:n}),h.a.createElement(b.a,this.props))},t}(p.Component);t.a=Object(m.a)(S)},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 d=encodeURIComponent(n),y=encodeURIComponent(o);return a()(p.a,{},void 0,a()(h.a,{icon:"plex-icon-calendar-560",title:Object(c.default)("You have no recordings scheduled")},void 0,a()("span",{className:b.a.emptyDescription},void 0,a()(u.a,{message:Object(c.default)("Check out the {openLink}Guide{closeLink} to browse available programming"),
tags:[{open:"openLink",close:"closeLink",component:l.a,kind:f.b.PRIMARY,to:"#!/server/"+d+"/provider/"+y}]}))))}return r&&!o?a()(p.a,{},void 0,a()(h.a,{icon:"plex-icon-calendar-560",title:Object(c.default)("You have no recordings scheduled"),description:Object(c.default)("You need a DVR before you can schedule recordings")})):a()("div",{className:b.a.schedulePageContent},void 0,a()(p.a,{innerClassName:b.a.schedulePageInnerContent},void 0,s===f.c.CALENDAR&&a()(g.a,{serverEntityID:t
}),s===f.c.AGENDA&&a()(v.a,{serverEntityID:t})),a()(m.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(20)),c=n(3),u=n(179),d=n(31),p=n(140),h=n(188),f=n(23),v=n(1336),g=n(1344),m=n(3885),y=n(3888),b=n.n(y),I=a()(p.a,{},void 0,a()(h.a,{},void 0,a()(d.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(6),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(5),m=(n.n(g),n(353)),y=n(854),b=n(35),I=n(3886),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(b.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:m.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(u.default)("Recording Priority")),a()(l.a,{
className:g.a.paneScroller,autoScroll:!0},void 0,r&&a()("div",{className:g.a.error},void 0,a()("div",{},void 0,Object(u.default)("There was an error loading recordings.")),a()("div",{},void 0,Object(u.default)("Please try again."))),o&&a()("div",{className:g.a.empty},void 0,a()("div",{},void 0,Object(u.default)("You have no recordings scheduled.")),a()("div",{},void 0,a()(d.a,{message:Object(u.default)("Check out the {openLink}Guide{closeLink} to browse available programming."),tags:[{
open:"openLink",close:"closeLink",component:c.a,kind:p.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()(f.a,{serverEntityID:t,providerEntityID:n,mediaSubscriptionEntityID:e,isDraggingBefore:o,isDraggingAfter:l,sortIndex:i,onSubscriptionDragMove:y,onSubscriptionDragEnd:b},e)})),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(71)),c=n(20),u=n(3),d=n(179),p=n(23),h=n(1345),f=n(1347),v=n(3887),g=n.n(v);t.a=i},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){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){"use strict";function i(e){return e===M.c.AGENDA?Object(S.default)("Agenda View"):Object(S.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(193)),v=n(118),g=n(134),m=n(610),y=n(56),b=n(45),I=n(27),S=n(3),M=n(23),D=n(3890),C=a()(m.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(b.a)(),r}return d()(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.machineIdentifier,n=e.selectedViewType,r=this.state.isViewsMenuOpen;return a()(f.a,{},void 0,a()(g.a,{},void 0,a()("span",{},void 0,Object(S.default)("Recordings"),C),a()(v.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(103));t.a=i},function(e,t,n){"use strict";var i=n(267),r=n(3892),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(18),r=n(15),a=n(268),o=n(80),s=n(161),l=n(536),c=n(3893),u=n(3894),d=n(3902),p=n(3921),h=n(970),f=a.a.extend({settings:function(){return this.webSettings("general")},webSettings:function(e){var t=Object(r.c)("appModel").get("experienceSettings"),n=t.get("showAdvancedSettings"),a=c.a(e);if(!a||a.isAdvanced&&!n)return void Object(s.a)("webSettings",{settingsSubset:"general"});this.showWebSettingsView(function(e){i.a.trigger("show:view",new p.a({model:e,subset:"web",webSettingsSubset:a}))
})},legacyWebSettings:function(){return this.webSettings("general")},showWebSettingsView:function(e){this.populateView().done(function(){function t(){e(i)}var n=Object(r.c)("appModel"),i=n.get("settings"),a=n.get("user"),o=a.get("homeUsers"),s=a.server.populate();s.done(function(){a.get("signedIn")?o.populate().always(t):t()}),s.fail(t)})},legacyServerSettings:function(e,t){var n=void 0;if(t){var i=l.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 r=this.getPopulateOptions(e);this.populateView(r).done(function(){i.a.trigger("show:view",new h.a({settingsSection:t,group:n,serverID:e}))})},users:function(e){var t={serverID:o.a,showLoading:!this.isReload(o.a)};this.populateView(t).done(function(){
i.a.trigger("show:view",new d.a({usersSubset:e}))})},devices:function(e){var t={serverID:o.a,showLoading:!this.isReload(o.a)};this.populateView(t).done(function(){i.a.trigger("show:view",new u.a({deviceTypeID:e}))})},getPopulateOptions:function(e){return{showLoading:!this.isReload(e)}}});t.a=f},function(e,t,n){"use strict";function i(e){return a.find(function(t){return t.key===e})}t.a=i;var r=n(3),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(2),r=n.n(i),a=n(297),o=n.n(a),s=n(0),l=(n.n(s),n(67)),c=n(15),u=n(30),d=n(3),p=n(46),h=n(3895),f=n(557),v=n(31),g=n(73),m=n(113),y=n(230),b=n(229),I=n(275),S=r()(I.a,{selectedKey:"devices"}),M=r()(g.a,{},void 0,r()(v.a,{})),D=p.a.extend({
initialize:function(e){var t=this;this.options={isPopulated:!1};var n=Object(c.c)("appModel"),i=n.get("user"),r=i.get("desktop").get("devices"),a=r.fetch({scope:"page"});a.done(function(){o()(t.options,{model:i,collection:r,subset:"devices",deviceTypeID:e.deviceTypeID,isPopulated:!0}),t.render()}),a.fail(function(){o()(t.options,{hasError:!0,errorMessage:Object(d.default)("Your devices are unavailable."),isPopulated:!0}),t.render()})},component:function(e){
var t=e.isPopulated,n=e.hasError,i=e.errorMessage;return r()(l.a,{},void 0,S,t?null:M,t&&n?r()(m.a,{title:i}):null,t&&!n?r()(y.a,{metricsPage:u.w},void 0,r()(b.a,{},void 0,Object(d.default)("Authorized Devices")),r()(f.a,{view:h.a,viewOptions:e})):null)}});t.a=D},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(161),c=n(3896),u=n(3901),d=n.n(u),p=a.a.Layout.extend({className:"devices-container",template:d.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:"playstation",title:"PlayStation",ids:["Plex for PlayStation 4"],platforms:["Mystery 3"]},{id:"xbox",title:"Xbox",ids:["Plex for Xbox One","Plex for Xbox 360"]},{id:"other",title:"Other",ids:[]}],initialize:function(e){this.products=this.collection.products(),this.addOtherIds(),this.filteredDeviceTypes=this.getFilteredDeviceTypes(),
this.selectedDeviceType=this.getDeviceType(e.deviceTypeID),this.selectedDevices=this.getSelectedDevices(),Object(l.a)("devices",{deviceTypeID:this.selectedDeviceType.id,replace:!0,trigger:!1})},serializeData:function(){return{selectedDeviceType:this.selectedDeviceType,deviceTypes:this.filteredDeviceTypes}},sortDeviceTypes:function(e){return s.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(){if("all"===this.selectedDeviceType.id)return this.collection;var e=this.collection.filterByProducts(this.selectedDeviceType.ids);if(this.selectedDeviceType.platforms){var t=this.collection.filterByPlatforms(this.selectedDeviceType.platforms);e.add(t.models)}return e},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){
return"all"===e.id||s.a.intersection(this.products,e.ids).length>0},this);return this.sortDeviceTypes(e)},addOtherIds:function(){var e=s.a.flatten(s.a.map(this.deviceTypes,function(e){return e.ids})),t=s.a.difference(this.products,e),n=s.a.find(this.deviceTypes,function(e){return"other"===e.id});s.a.each(t,function(e){n.ids.push(e)})},onRender:function(){this.list.show(new c.a({collection:this.selectedDevices}))},onDeviceTypeDropdownClick:function(e){e.preventDefault()
;var t=r()(e.currentTarget).data("id");this.selectedDeviceType=this.getDeviceType(t),this.selectedDevices=this.getSelectedDevices(),Object(l.a)("devices",{deviceTypeID:this.selectedDeviceType.id,replace:!0,trigger:!1}),this.render()},onDeviceTypeClick:function(e){e.preventDefault();var t=r()(e.currentTarget),n=t.data("id"),i=this.collection;if(this.ui.filters.removeClass("selected"),t.addClass("selected"),"all"!==n){var a=s.a.findWhere(this.deviceTypes,{id:n})
;i=this.collection.filterByProducts(a.ids)}this.list.show(new c.a({collection:i}))}});t.a=p},function(e,t,n){"use strict";var i=n(86),r=n(3897),a=n(3899),o=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a});t.a=o},function(e,t,n){"use strict";var i=n(21),r=n(3898),a=n.n(r),o=i.a.ItemView.extend({template:a.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(4)).call(t,"No devices found",{hash:{},data:o}))+"</h4> </div> "})},function(e,t,n){"use strict";var i=n(21),r=n(40),a=n(323),o=n(1063),s=n(521),l=n(990),c=n(3900),u=n.n(c),d=i.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:u.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(l.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(a.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(s.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(o.a)(n),")"].join("")),t}}}},onRemoveClick:function(e){e.preventDefault(),this.isMediaServer()?r.a.execute("removeServer",{
device:this.model}):r.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,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 data-id="'+p((a=e&&e.id,typeof a===d?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+p((a=e&&e.title,typeof a===d?a.apply(e):a))+"</span>",a=i(n(33)).call(e,(a=r&&r.selectedDeviceType,null==a||!1===a?a:a.id),e&&e.id,{hash:{},inverse:h.noop,fn:h.program(2,l,t),data:t}),(a||0===a)&&(o+=a),
o+="</a></li> "}function l(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 c,u="",d="function",p=this.escapeExpression,h=this;return u+='<div class="filter-bar"> <span class="dropdown"> <a class="dropdown-toggle" href="#device-type-dropdown" data-toggle="dropdown"> <span class="dropdown-friendly-name">'+p((c=t&&t.selectedDeviceType,c=null==c||!1===c?c:c.title,
typeof c===d?c.apply(t):c))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',c=r.each.call(t,t&&t.deviceTypes,{hash:{},inverse:h.noop,fn:h.programWithDepth(1,s,o,t),data:o}),(c||0===c)&&(u+=c),u+=' </ul> </span> </div> <div class="device-list-container col-sm-12 col-md-12"></div> '})},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(0),l=(n.n(s),
n(67)),c=n(15),u=n(3903),d=n(46),p=n(3904),h=n(557),f=n(31),v=n(73),g=n(113),m=n(230),y=n(229),b=n(275),I=r()(v.a,{},void 0,r()(f.a,{})),S=d.a.extend({initialize:function(e){var t=this,n="pin"===e.usersSubset,i=n?"home":e.usersSubset,r=i?u.a(i)||u.a("home"):null;this.options={usersSettingsSubset:r,promptPIN:n,isPopulated:!1}
;var a=Object(c.c)("appModel"),s=a.get("user"),l=s.get("homeUsers"),d=s.get("homeDetails"),p=s.get("desktop").get("friends"),h=s.get("desktop").get("invites"),f=s.get("desktop").get("sentInvites"),v=o.a.Deferred(),g=d.fetch();g.done(function(){v.resolve()}),g.fail(function(e,t){404===t.status?v.resolve():v.reject()});var m=o.a.when(s.fetch({scope:"page"}),l.fetch({scope:"page"}),p.fetch({scope:"page"}),h.fetch({scope:"page"}),f.fetch({scope:"page"}),v.promise());m.done(function(){
t.options.usersSettingsSubset||!h.length||h.findWhere({home:!0})?t.options.usersSettingsSubset||(t.options.usersSettingsSubset=u.a("home")):t.options.usersSettingsSubset=u.a("friends"),t.options.model=a.get("user"),t.options.isPopulated=!0,t.render()}),m.fail(function(){t.options.usersSettingsSubset||(t.options.usersSettingsSubset=u.a("home")),t.options.usersError=!0,t.options.isPopulated=!0,t.render()})},component:function(e){
var t=e.isPopulated,n=e.usersSettingsSubset,i=e.usersError,a=e.user,o=e.promptPIN,s=n?"users--"+n.key:null;return r()(l.a,{},void 0,r()(b.a,{selectedKey:s}),t?null:I,t&&i?r()(g.a,{title:n.errorTitle()}):null,t&&!i?r()(m.a,{metricsPage:n.metricsPage},void 0,r()(y.a,{},void 0,n.title()),r()(h.a,{view:p.a,viewOptions:{model:a,promptPIN:o,subset:"users",usersSubset:n.key}})):null)}});t.a=S},function(e,t,n){"use strict";function i(e){return o.find(function(t){return t.key===e})}t.a=i
;var r=n(30),a=n(3),o=[{key:"home",title:function(){return Object(a.default)("Home Users")},errorTitle:function(){return Object(a.default)("Home users are unavailable")},metricsPage:r.E},{key:"friends",title:function(){return Object(a.default)("Sharing")},errorTitle:function(){return Object(a.default)("Sharing users are unavailable")},metricsPage:r._0}]},function(e,t,n){"use strict"
;var i=n(13),r=n.n(i),a=n(21),o=n(7),s=n.n(o),l=n(18),c=n(29),u=n(15),d=n(40),p=n(81),h=n(3),f=n(388),v=n(444),g=n(1395),m=n(3914),y=n(3920),b=n.n(y),I={home:m.a,friends:g.a},S=a.a.Layout.extend({className:"users-container",template:b.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(p.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.c("appModel");this.subset=e.usersSubset,this.user=t.get("user"),this.home=this.user.get("homeUsers"),this.invites=this.user.get("desktop").get("invites"),this.signedInHomeUser=this.home.get(this.user.id),this.homeDetails=this.user.get("homeDetails"),this.proxies={
home:this.invites.filterByHome(),friends:this.invites.filterByFriends()},e.promptPIN&&l.a.trigger("show:modal",new v.a({model:this.signedInHomeUser,isEditing:!0,isEditWarning:!this.signedInHomeUser.get("protected")})),this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange),this.listenTo(this.home,"reset add remove",this.onHomeChange),this.listenTo(this.invites,"reset add remove",this.onInvitesChange),this.listenTo(this.homeDetails,"change",this.onHomeDetailsChange)},
serializeData:function(){return{subset:this.subset,showUserActions:this.shouldShowUserActions(),showLeaveHome:this.shouldShowLeaveHome(),showFriends:this.shouldShowFriends(),showEnableGuest:this.shouldShowEnableGuest(),showDisableGuest:!this.shouldShowEnableGuest()}},showSubset:function(e){e&&(this.$el.removeClass("show-"+this.subset),this.subset=e),this.$el.addClass("show-"+this.subset);var t=I[this.subset];t?this.container.append(new t):c.a.warn("Invalid subset: "+this.subset)},
updateBadges:function(){var e={home:this.proxies.home.length,friends:this.proxies.friends.length};s.a.each(s.a.keys(e),function(t){var n=this.ui[t+"Badge"];n.text(e[t]),n.toggleClass("hidden",0===e[t])},this)},toggleGuestAccount:function(e,t){e.preventDefault(),d.a.execute("toggleGuest",{user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){s.a.each(this.proxies,function(e){e.destroy()})},onAdminChange:function(){
this.ui.userActions.toggleClass("hidden",!this.shouldShowUserActions())},onHomeChange:function(){this.ui.leaveHomeBtn.toggleClass("hidden",!this.shouldShowLeaveHome())},onInvitesChange:function(){this.updateBadges()},onHomeDetailsChange:function(){this.ui.enableGuestBtn.toggleClass("hidden",!this.shouldShowEnableGuest()),this.ui.disableGuestBtn.toggleClass("hidden",this.shouldShowEnableGuest())},onNavClick:function(e){e.preventDefault();var t=r()(e.currentTarget)
;t.hasClass("selected")||(this.ui.navLinks.removeClass("selected"),t.addClass("selected"),this.showSubset(s.a.last(e.currentTarget.href.split("/"))),l.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?l.a.trigger("show:modal",new f.a({type:"home"})):l.a.trigger("show:alert",{type:"error",message:Object(h.default)("You have reached the {1} person home limit.",t)})},
onLeaveHomeClick:function(e){e.preventDefault(),d.a.execute("removeHomeUser",{homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),l.a.trigger("show:modal",new f.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(86),r=n(3906),a=n(3908),o=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,
emptyView:r.a,sorted:!0});t.a=o},function(e,t,n){"use strict";var i=n(21),r=n(3907),a=n.n(r),o=i.a.ItemView.extend({template:a.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(4)).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(21),r=n(18),a=n(40),o=n(370),s=n(1396),l=n(388),c=n(3910),u=n.n(c),d=i.a.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:u.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 o.a({model:this.model,type:"friend",width:80})},bindings:{".username":{modelAttribute:"title"}},onRender:function(){this.image.setElement(this.ui.poster),this.details.show(new s.a({model:this.model}))},onClose:function(){this.image.close()},onEditClick:function(e){e.preventDefault(),r.a.trigger("show:modal",new l.a({model:this.model}))},onDeleteClick:function(e){
e.preventDefault(),a.a.execute("removeFriend",{friend:this.model})}});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+=' <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(4)).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(4)).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(4)).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(4)).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(4)).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){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){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(40),s=n(323),l=n(521),c=n(3),u=n(370),d=n(3912),p=n.n(d),h=i.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:p.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 u.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(c.default)("invite sent {1}",Object(s.a)(t)):Object(c.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 o=a.a.reduce(e,function(e,t){return e+=t.numLibraries
},0),u=Object(l.a)(Object(c.default)("library"),o,Object(c.default)("libraries"));return r?Object(c.default)("wants you to join their home and share {1} {2} with you",o,u):n?Object(c.default)("wants to be friends and share {1} {2} with you",o,u):Object(c.default)("wants to share {1} {2} with you",o,u)}return r?Object(c.default)("wants you to join their home"):Object(c.default)("wants to be friends")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){
this.image.close()},onAcceptClick:function(e){e.preventDefault(),o.a.execute("acceptInvite",{invite:this.model})},onDeleteClick:function(e){e.preventDefault(),o.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){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(4)).call(t,"Invites",{hash:{},data:o}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(4)).call(t,"Friends",{hash:{},data:o
}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(4)).call(t,"Pending",{hash:{},data:o}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){"use strict";var i=n(15),r=n(3915),a=n(1397),o=n(1395),s=n(3919),l=n.n(s),c=o.a.extend({template:l.a,initialize:function(){var e=i.c("appModel"),t=e.get("user");this.collection=t.get("homeUsers"),this.invites=t.get("desktop").get("invites").filterByHome(),
this.sentInvites=t.get("desktop").get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(t.id),this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.addListeners()},addListeners:function(){o.a.prototype.addListeners.apply(this,arguments),this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange)},onRender:function(){this.friendList.show(new r.a({collection:this.collection,
itemViewOptions:this.itemViewOptions})),this.inviteList.show(new a.a({collection:this.invites})),this.pendingList.show(new a.a({collection:this.sentInvites})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});t.a=c},function(e,t,n){"use strict";var i=n(86),r=n(3916),a=n(1398),o=i.a.extend({tagName:"ul",className:"list card-tile-list",itemView:a.a,emptyView:r.a,sorted:!0,isEmpty:function(e){
return!this.collection||this.collection.length<2},addChildView:function(e,t,n){this.isEmpty(this.collection)?this.showEmptyView():this._showingEmptyView?this.render():this.children.findByModel(e)||i.a.prototype.addChildView.apply(this,arguments)},showEmptyView:function(){this._showingEmptyView||this.children.each(function(e){this.removeChildView(e)},this),i.a.prototype.showEmptyView.apply(this,arguments)}});t.a=o},function(e,t,n){"use strict"
;var i=n(21),r=n(7),a=n.n(r),o=n(15),s=n(81),l=n(1398),c=n(3918),u=n.n(c),d=i.a.Layout.extend({template:u.a,regions:{card:".centered-home-user-container"},initialize:function(e){this.itemViewOptions=e},serializeData:function(){var e=o.c("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("features").get(s.d),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){var e=o.c("appModel"),t=e.get("user"),n=t.get("homeUsers")
;n.length&&this.card.show(new l.a(a.a.extend({},this.itemViewOptions,{model:n.first()})))}});t.a=d},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){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(4)).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(4)).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(4)).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){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(4)).call(t,"Invites",{
hash:{},data:o}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+l(i(n(4)).call(t,"My Home",{hash:{},data:o}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+l(i(n(4)).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){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,d=this.escapeExpression;return c+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',l=r.unless.call(t,t&&t.showUserActions,{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='"> <button class="add-user-btn btn btn-sm btn-default">'+d(i(n(4)).call(t,"Add User",{hash:{},data:o}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',
l=r.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='">'+d(i(n(4)).call(t,"Enable Guest",{hash:{},data:o}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',l=r.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='">'+d(i(n(4)).call(t,"Disable Guest",{hash:{},data:o}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',
l=r.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:u.noop,fn:u.program(1,s,o),data:o}),(l||0===l)&&(c+=l),c+='">'+d(i(n(4)).call(t,"Leave Home",{hash:{},data:o}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+d(i(n(4)).call(t,"Invite Friend",{hash:{},data:o}))+'</button> </div> </div> <div class="users-row row"></div> '})},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),l=n.n(s),c=n(0),u=(n.n(c),
n(72)),d=n(67),p=n(18),h=n(30),f=n(1065),v=n(46),g=n(3922),m=n(557),y=n(230),b=n(229),I=n(275),S=o()(u.b,{}),M=v.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()(d.a,{},void 0,o()(I.a,{selectedKey:"web-client--settings--"+n}),o()(y.a,{metricsPage:h.X,metricsPane:"web:"+n},void 0,o()(b.a,{},void 0,Object(f.a)(),S,i()),o()(m.a,{view:g.a,viewOptions:r()({},a,{
settingsGroup:n})})))}});t.a=M},function(e,t,n){"use strict";var i=n(53),r=n.n(i),a=n(6),o=n.n(a),s=n(13),l=n.n(s),c=n(21),u=n(7),d=n.n(u),p=n(18),h=n(15),f=n(465),v=n(1399),g=n(440),m=n(779),y=n(373),b=(n(81),n(141)),I=n(523),S=n(821),M=n(3),D=n(3923),C=n(68),O=n(3924),P=n(1400),j=n(3925),T=n(3926),w=n.n(T),E=[{value:0,title:"None"},{value:1,title:"1"},{value:2,title:"2"},{value:3,title:"3"},{value:4,title:"4"},{value:5,title:"5"}],x=c.a.ItemView.extend({className:"web-settings-container",
template:w.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(h.c)("appModel"),n=Object(h.c)("appModel").get("experienceSettings"),i=t.get("user");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=[{value:"h:mma",title:Object(M.default)("12 Hour")},{value:"HH:mm",title:Object(M.default)("24 Hour")
}],t=this.model.toJSON(),n=Object(h.c)("appModel"),i=n.get("experienceSettings").toJSON(),r=n.get("deviceSettings").toJSON(),a=n.get("user"),s=(a.get("features"),a.hasHome()),l=a.isNinja(),c=Object(S.a)(),u=f.a.prop("video"),d=Object(I.a)()||Object(I.d)();return o()({},this.serializePlatformData(),{settings:t,experienceSettings:i,deviceSettings:r,hasHome:s,canPlayAdaptiveBitrate:c,hasTypeFirst:!1,hasSubtitleBurnLevel:!d,hasSubtitleSize:!Object(I.a)(),canForceVideoAds:l,
canDebugAdaptiveBitrate:c&&l,isHybridPlatform:d,isNinja:l,isPMPDesktop:Object(I.a)(),isQtDesktop:Object(I.d)(),version:"3.77.4",languages:Object(D.a)(),debugLevels:v.a.settings,subtitlesBurnLevels:y.a.settings,chromecastAppIDs:P.a.settings,availableQualities:b.a.getAvailableQualities({lowestQualityIndex:u.lowestQualityIndex}).reverse(),subtitleSizes:m.a.settings,audioBoostLevels:O.a.settings,httpFallbackOptions:g.a.settings,extrasPrefixCounts:E,timeFormats:e})},serializePlatformData:function(){
var e={};return Object(I.d)()&&(e={keepOnTopSettings:[{title:Object(M.default)("Never"),value:j.b.NEVER},{title:Object(M.default)("During playback"),value:j.b.PLAYBACK},{title:Object(M.default)("Always"),value:j.b.ALWAYS}],automaticallyOpenAtLoginSettings:[{title:Object(M.default)("Never"),value:j.a.NEVER},{title:Object(M.default)("Always"),value:j.a.ALWAYS},{title:Object(M.default)("Minimized"),value:j.a.MINIMIZED}]}),e},saveChanges:function(){var e=this.ui.submitBtn,t=this.ui.message
;if(!e.isDisabled()){e.addClass("active");var n=!!this.changes.language,i=this.saveSettings();i.done(d.a.bind(function(){this.changes={},n||(e.addClass("disabled"),t.text(Object(M.default)("Your changes have been saved.")))},this)),i.fail(d.a.bind(function(){t.text(Object(M.default)("Your changes could not be saved."))},this)),i.always(d.a.bind(function(){n||e.removeClass("active")},this))}},waitForAttribute:function(e,t,n){var i=l.a.Deferred(),r="change:"+t;return e.on(r,function t(a,o){
o===n&&(e.off(r,t),i.resolve())}),i.promise()},saveSettings:function(){var e=this,t=[],n=Object(h.c)("appModel"),i=[{model:n.get("deviceSettings"),actionCreator:C.k},{model:n.get("experienceSettings"),actionCreator:C.l}],a=i.reduce(function(n,i){var a=i.model,o=i.actionCreator,s={},l={};for(var c in n){(a.hasAttr(c)?s:l)[c]=n[c]}return r()(s).length&&t.push(e.saveSettingUsingActionCreator(s,a,o)),l},this.changes);return r()(a).length&&t.push(this.model.save(a)),
t.length?l.a.when.apply(l.a,t):l.a.Deferred().resolve().promise()},saveSettingUsingActionCreator:function(e,t,n){var i=this,r=t.get("isSaving"),a=this.waitForAttribute(t,"isSaving",!1);return a=a.then(function(){return r?i.saveSettingUsingActionCreator(e,t,n):t.get("saveError")?l.a.Deferred().reject().promise():l.a.Deferred().resolve().promise()}),r||setTimeout(function(){Object(h.c)("appStore").dispatch(n(e))},0),a},displayHomeStreamingSettings:function(e){
this.ui.customHomeStreamingSettings.toggleClass("hidden",e),this.ui.recommendedHomeStreamingSettings.toggleClass("hidden",!e)},onRender:function(){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"),n=Object(h.c)("appModel").get("experienceSettings");this.$el.toggleClass("show-advanced",!t),n.save("showAdvancedSettings",!t),
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===P.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=x},function(e,t,n){"use strict";function i(){
var e=a()(s.a.getLanguages()).map(function(e){return{value:e,title:Object(o.a)(e)}});return e.sort(function(e,t){return e.title.localeCompare(t.title)}),e}t.a=i;var r=n(53),a=n.n(r),o=n(1044),s=n(509)},function(e,t,n){"use strict";var i={NONE:100,SMALL:150,LARGE:200,HUGE:250};i.settings=[{value:i.NONE,title:"None"},{value:i.SMALL,title:"Small"},{value:i.LARGE,title:"Large"},{value:i.HUGE,title:"Huge"}],t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){
return r});var i={MINIMIZED:"MINIMIZED",NEVER:"NEVER",ALWAYS:"ALWAYS"},r={NEVER:0,PLAYBACK:1,ALWAYS:2}},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+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.language),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),
o+="> "+K((a=e&&e.title,typeof a===W?a.apply(e):a))+" </option> "}function l(e,t){return"selected"}function c(e,t){var n,i="";return i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="typeFirstPreview" ',n=r.if.call(e,(n=e&&e.experienceSettings,null==n||!1===n?n:n.typeFirstPreview),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),(n||0===n)&&(i+=n),
i+='> Preview the new Plex experience </label> <p class="help-block">Plex is creating a new experience for navigating your media. For now you can opt-in to preview the new Plex experience.</p> </div> '}function u(e,t){return"checked"}function d(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:q.noop,fn:q.program(5,u,t),data:t}),
(a||0===a)&&(o+=a),o+="> "+K(i(n(4)).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+K(i(n(4)).call(e,"Do not prompt to select a user or enter a PIN during startup on this device.",{hash:{},data:t}))+"</p> </div> "}function p(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.allowHttpFallback),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),
(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function h(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.timeFormat),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function f(e,t){var a,o=""
;return o+=' <div class="form-group"> <label for="keepOnTop">'+K(i(n(4)).call(e,"Keep Plex on top of windows",{hash:{},data:t}))+'</label> <select id="keepOnTop"> ',a=r.each.call(e,e&&e.keepOnTopSettings,{hash:{},inverse:q.noop,fn:q.programWithDepth(14,v,t,e),data:t}),(a||0===a)&&(o+=a),o+=' </select> </div> \x3c!-- <div class="form-group"> <label for="settings.automaticallyOpenAtLogin">'+K(i(n(4)).call(e,"Automatically open Plex at login",{hash:{},data:t
}))+'</label> <select id="settings.automaticallyOpenAtLogin"> ',a=r.each.call(e,e&&e.automaticallyOpenAtLoginSettings,{hash:{},inverse:q.noop,fn:q.programWithDepth(16,g,t,e),data:t}),(a||0===a)&&(o+=a),o+=' </select> </div> --\x3e \x3c!-- <div class="form-group"> <label class="control-label"> <input type="checkbox" id="settings.minimizeToSystemTrayEnabled" ',a=r.if.call(e,(a=e&&e.deviceSettings,null==a||!1===a?a:a["settings.minimizeToSystemTrayEnabled"]),{hash:{},inverse:q.noop,
fn:q.program(5,u,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,"Minimized to system tray",{hash:{},data:t}))+" </label> </div> --\x3e "}function v(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.deviceSettings,null==a||!1===a?a:a.keepOnTop),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K((a=e&&e.title,typeof a===W?a.apply(e):a))+"</option> "}function g(e,t,r){var a,o=""
;return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.deviceSettings,null==a||!1===a?a:a["settings.automaticallyOpenAtLogin"]),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K((a=e&&e.title,typeof a===W?a.apply(e):a))+"</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:q.noop,fn:q.program(5,u,t),data:t}),(a||0===a)&&(o+=a),o+="> "+K(i(n(4)).call(e,"Automatically adjust quality (Beta)",{hash:{},data:t}))+' </label> <p class="help-block">'+K(i(n(4)).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="'+K((a=e&&e.index,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.index,(a=r&&r.experienceSettings,null==a||!1===a?a:a.remoteQuality),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+="> "+K(i(n(442)).call(e,e,{hash:{},data:t}))+" </option> "}function S(e,t){return K(i(n(4)).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="'+K((a=e&&e.index,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.index,(a=r&&r.experienceSettings,null==a||!1===a?a:a.localQuality),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+="> "+K(i(n(442)).call(e,e,{hash:{},data:t}))+" </option> "}function D(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.settings,
null==a||!1===a?a:a.debugLevel),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function C(e,t){var n,i="";return i+=" ",n=r.unless.call(e,e&&e.isHybridPlatform,{hash:{},inverse:q.noop,fn:q.program(33,O,t),data:t}),(n||0===n)&&(i+=n),i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="rejectDirectConnections" ',n=r.if.call(e,(n=e&&e.settings,
null==n||!1===n?n:n.rejectDirectConnections),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+='> 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> ',n=r.if.call(e,e&&e.isQtDesktop,{hash:{},inverse:q.noop,fn:q.program(38,T,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function O(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:q.noop,fn:q.programWithDepth(34,P,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(245)).call(e,(a=e&&e.settings,null==a||!1===a?a:a.chromecastAppID),"custom",{hash:{},
inverse:q.noop,fn:q.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="'+K((a=e&&e.settings,a=null==a||!1===a?a:a.chromecastCustomAppID,typeof a===W?a.apply(e):a))+'"> <p class="help-block">Refresh after saving this setting for it to take effect.</p> </div> '}function P(e,t,r){var a,o=""
;return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.chromecastAppID),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function j(e,t){return"hidden"}function T(e,t){var n,i="";return i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="settings.nerdToolsEnabled" ',
n=r.if.call(e,(n=e&&e.deviceSettings,null==n||!1===n?n:n["settings.nerdToolsEnabled"]),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),(n||0===n)&&(i+=n),i+='>Nerd Tools </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="settings.webInspectorEnabled" ',n=r.if.call(e,(n=e&&e.deviceSettings,null==n||!1===n?n:n["settings.webInspectorEnabled"]),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),(n||0===n)&&(i+=n),
i+='> Remote Inspector </label> <p class="help-block">Restart the app after saving this setting for it to take effect.</p> </div> <div class="form-group"> <label for="">Report Inspector Port</label> <input type="text" id="settings.webInspectorPort" class="form-control" ',n=r.if.call(e,(n=e&&e.deviceSettings,null==n||!1===n?n:n["settings.webInspectorEnabled"]),{hash:{},inverse:q.noop,fn:q.program(39,w,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.unless.call(e,(n=e&&e.deviceSettings,
null==n||!1===n?n:n["settings.webInspectorEnabled"]),{hash:{},inverse:q.noop,fn:q.program(41,E,t),data:t}),(n||0===n)&&(i+=n),i+=' /> <p class="help-block">After enabling the Remote Inspector visit <a href="http://localhost:'+K((n=e&&e.deviceSettings,n=null==n||!1===n?n:n["settings.webInspectorPort"],typeof n===W?n.apply(e):n))+'" target="_blank">http://localhost:'+K((n=e&&e.deviceSettings,n=null==n||!1===n?n:n["settings.webInspectorPort"],typeof n===W?n.apply(e):n))+"</a>.</p> </div> "}
function w(e,t){var n,i="";return i+='value="'+K((n=e&&e.deviceSettings,n=null==n||!1===n?n:n["settings.webInspectorPort"],typeof n===W?n.apply(e):n))+'"'}function E(e,t){var n,i="";return i+='disabled placeholder="'+K((n=e&&e.deviceSettings,n=null==n||!1===n?n:n["settings.webInspectorPort"],typeof n===W?n.apply(e):n))+'"'}function x(e,t){var r="";return r+=" "+K(i(n(4)).call(e,"Allows the player to play compatible media without any conversion.",{hash:{},data:t}))+" "}function A(e,t){var r=""
;return r+=" "+K(i(n(4)).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 N(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:q.noop,fn:q.program(5,u,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 L(e,t){var n,i="";return i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="debugHasForcedVideoAds" ',n=r.if.call(e,(n=e&&e.deviceSettings,null==n||!1===n?n:n.debugHasForcedVideoAds),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),
(n||0===n)&&(i+=n),i+='> Force advertisements </label> <p class="help-block">Forces a test advertisement to play before each video during local playback. Remember to disable any ad blockers.</p> </div> '}function k(e,t){return"advanced-setting"}function _(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.settings,null==a||!1===a?a:a.audioBoost),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),
(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function R(e,t){var a,o="";return o+=' \x3c!-- <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="player.exclusiveFullscreenAudioEnabled" ',a=r.if.call(e,(a=e&&e.deviceSettings,null==a||!1===a?a:a["player.exclusiveFullscreenAudioEnabled"]),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),(a||0===a)&&(o+=a),
o+="> "+K(i(n(4)).call(e,"Exclusive Fullscreen Audio",{hash:{},data:t}))+' </label> <p class="help-block">'+K(i(n(4)).call(e,"Mute sounds from other applications while Plex is playing music or video in a fullscreen window.",{hash:{},data:t}))+"</p> </div> --\x3e "}function z(e,t){var a,o="";return o+=' <div class="form-group"> <label for="subtitleSize">'+K(i(n(4)).call(e,"Subtitle Size",{hash:{},data:t}))+'</label> <select id="subtitleSize" data-type="int"> ',a=r.each.call(e,e&&e.subtitleSizes,{
hash:{},inverse:q.noop,fn:q.programWithDepth(58,U,t,e),data:t}),(a||0===a)&&(o+=a),o+=" </select> </div> "}function U(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.subtitleSize),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function B(e,t){var a,o=""
;return o+=' <div class="form-group advanced-setting"> <label for="subtitlesBurnLevel">'+K(i(n(4)).call(e,"Burn Subtitles",{hash:{},data:t}))+'</label> <select id="subtitlesBurnLevel"> ',a=r.each.call(e,e&&e.subtitlesBurnLevels,{hash:{},inverse:q.noop,fn:q.programWithDepth(61,F,t,e),data:t}),(a||0===a)&&(o+=a),
o+=' </select> <p class="help-block">'+K(i(n(4)).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 F(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.subtitlesBurnLevel),{hash:{},
inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function V(e,t){var a,o="";return o+=' \x3c!-- <h4 class="settings-header advanced-setting">'+K(i(n(4)).call(e,"Video",{hash:{},data:t}))+'</h4> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="player.hardwareDecodingEnabled" ',a=r.if.call(e,(a=e&&e.deviceSettings,
null==a||!1===a?a:a["player.hardwareDecodingEnabled"]),{hash:{},inverse:q.noop,fn:q.program(5,u,t),data:t}),(a||0===a)&&(o+=a),o+="> "+K(i(n(4)).call(e,"Use Hardware Decoding",{hash:{},data:t}))+' </label> <p class="help-block">'+K(i(n(4)).call(e,"Hardware decoding may improve video playback performance. Disable this setting if you encounter unexpected playback problems.",{hash:{},data:t}))+"</p> </div> --\x3e "}function H(e,t,r){var a,o="";return o+=' <option value="'+K((a=e&&e.value,
typeof a===W?a.apply(e):a))+'" ',a=i(n(33)).call(e,e&&e.value,(a=r&&r.experienceSettings,null==a||!1===a?a:a.extrasPrefixCount),{hash:{},inverse:q.noop,fn:q.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+=">"+K(i(n(4)).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function Q(e,t){var a,o="";return o+=' <h4 class="settings-header advanced-setting">'+K(i(n(4)).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:q.noop,fn:q.program(5,u,t),data:t}),(a||0===a)&&(o+=a),o+="> "+K(i(n(4)).call(e,"Force multi-channel audio support",{hash:{},data:t
}))+' </label> <p class="help-block">'+K(i(n(4)).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 Y,G="",W="function",K=this.escapeExpression,q=this;return G+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+K(i(n(4)).call(t,"Show Advanced",{hash:{},data:o
}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+K(i(n(4)).call(t,"Hide Advanced",{hash:{},data:o}))+'</button> </div> <div class="row"> <div class="col-sm-12 col-md-12"> <form id="web-settings-form"> <div id="general-web-group" class="settings-group"> <h4 class="version-title"> '+K(i(n(4)).call(t,"Version",{hash:{},data:o}))+" "+K((Y=t&&t.version,
typeof Y===W?Y.apply(t):Y))+' </h4> <div class="form-group"> <label for="language">'+K(i(n(4)).call(t,"Language",{hash:{},data:o}))+'</label> <select id="language"> ',Y=r.each.call(t,t&&t.languages,{hash:{},inverse:q.noop,fn:q.programWithDepth(1,s,o,t),data:o}),(Y||0===Y)&&(G+=Y),G+=' </select> <p class="help-block">'+K(i(n(4)).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> ",Y=r.if.call(t,t&&t.hasTypeFirst,{hash:{},inverse:q.noop,fn:q.program(4,c,o),data:o}),(Y||0===Y)&&(G+=Y),G+=" ",Y=r.if.call(t,t&&t.hasHome,{hash:{},inverse:q.noop,fn:q.program(7,d,o),data:o}),(Y||0===Y)&&(G+=Y),G+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',Y=r.if.call(t,(Y=t&&t.experienceSettings,null==Y||!1===Y?Y:Y.playThemeMusic),{hash:{},inverse:q.noop,fn:q.program(5,u,o),data:o}),(Y||0===Y)&&(G+=Y),
G+="> "+K(i(n(4)).call(t,"Play Theme Music",{hash:{},data:o}))+' </label> <p class="help-block">'+K(i(n(4)).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" ',Y=r.if.call(t,(Y=t&&t.settings,null==Y||!1===Y?Y:Y.companion),{hash:{},inverse:q.noop,fn:q.program(5,u,o),data:o}),(Y||0===Y)&&(G+=Y),
G+="> "+K(i(n(4)).call(t,"Advertise as player",{hash:{},data:o}))+' </label> <p class="help-block">'+K(i(n(4)).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">'+K(i(n(4)).call(t,"Allow Fallback to Insecure Connections",{hash:{},data:o}))+'</label> <select id="allowHttpFallback"> ',Y=r.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:q.noop,
fn:q.programWithDepth(9,p,o,t),data:o}),(Y||0===Y)&&(G+=Y),G+=' </select> <p class="help-block">'+K(i(n(4)).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">'+K(i(n(4)).call(t,"Time Format",{hash:{},data:o}))+'</label> <select id="timeFormat"> ',Y=r.each.call(t,t&&t.timeFormats,{hash:{},inverse:q.noop,fn:q.programWithDepth(11,h,o,t),data:o}),
(Y||0===Y)&&(G+=Y),G+=" </select> </div> ",Y=r.if.call(t,t&&t.isQtDesktop,{hash:{},inverse:q.noop,fn:q.program(13,f,o),data:o}),(Y||0===Y)&&(G+=Y),G+=' </div> <div id="quality-web-group" class="settings-group"> ',Y=r.if.call(t,t&&t.canPlayAdaptiveBitrate,{hash:{},inverse:q.noop,fn:q.program(18,m,o),data:o}),(Y||0===Y)&&(G+=Y),G+=' <h4 class="',Y=r.if.call(t,t&&t.canPlayAdaptiveBitrate,{hash:{},inverse:q.program(22,b,o),fn:q.program(20,y,o),data:o}),(Y||0===Y)&&(G+=Y),
G+='">'+K(i(n(4)).call(t,"Internet Streaming",{hash:{},data:o}))+'</h4> <div class="form-group"> <label for="remoteQuality">'+K(i(n(4)).call(t,"Video quality",{hash:{},data:o}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+K(i(n(4)).call(t,"Maximum",{hash:{},data:o}))+"</option> ",Y=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:q.noop,fn:q.programWithDepth(24,I,o,t),data:o}),(Y||0===Y)&&(G+=Y),
G+=' </select> <p class="help-block">'+K(i(n(4)).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" ',Y=r.if.call(t,(Y=t&&t.experienceSettings,null==Y||!1===Y?Y:Y.remoteSmallVideoAtOriginalQuality),{hash:{},inverse:q.noop,fn:q.program(5,u,o),data:o}),
(Y||0===Y)&&(G+=Y),G+="> "+K(i(n(4)).call(t,"Play smaller videos at original quality",{hash:{},data:o}))+' </label> <p class="help-block"> '+K(i(n(4)).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}))+" ",Y=r.if.call(t,t&&t.canPlayAdaptiveBitrate,{hash:{},inverse:q.noop,fn:q.program(26,S,o),data:o}),(Y||0===Y)&&(G+=Y),
G+=' </p> </div> <h4 class="settings-header">'+K(i(n(4)).call(t,"Home Streaming",{hash:{},data:o}))+'</h4> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="useHomeStreamingRecommendedSettings" ',Y=r.if.call(t,(Y=t&&t.experienceSettings,null==Y||!1===Y?Y:Y.useHomeStreamingRecommendedSettings),{hash:{},inverse:q.noop,fn:q.program(5,u,o),data:o}),(Y||0===Y)&&(G+=Y),G+="> "+K(i(n(4)).call(t,"Use recommended settings",{hash:{},data:o
}))+' </label> <p class="help-block recommended-home-streaming-settings">'+K(i(n(4)).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">'+K(i(n(4)).call(t,"Video quality",{hash:{},data:o}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+K(i(n(4)).call(t,"Maximum",{hash:{},data:o
}))+"</option> ",Y=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:q.noop,fn:q.programWithDepth(28,M,o,t),data:o}),(Y||0===Y)&&(G+=Y),G+=' </select> <p class="help-block">'+K(i(n(4)).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">'+K(i(n(4)).call(t,"Debug Level",{hash:{},data:o}))+'</label> <select id="debugLevel" data-type="int"> ',Y=r.each.call(t,t&&t.debugLevels,{hash:{},inverse:q.noop,fn:q.programWithDepth(30,D,o,t),data:o}),(Y||0===Y)&&(G+=Y),G+=' </select> <p class="help-block">'+K(i(n(4)).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{hash:{},data:o
}))+"</p> </div> ",Y=r.if.call(t,t&&t.isNinja,{hash:{},inverse:q.noop,fn:q.program(32,C,o),data:o}),(Y||0===Y)&&(G+=Y),G+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="directPlay" ',Y=r.if.call(t,(Y=t&&t.settings,null==Y||!1===Y?Y:Y.directPlay),{hash:{},inverse:q.noop,fn:q.program(5,u,o),data:o}),(Y||0===Y)&&(G+=Y),G+="> "+K(i(n(4)).call(t,"Direct Play",{hash:{},data:o}))+' </label> <p class="help-block"> ',Y=r.if.call(t,t&&t.isHybridPlatform,{hash:{},
inverse:q.program(45,A,o),fn:q.program(43,x,o),data:o}),(Y||0===Y)&&(G+=Y),G+=' </p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="directStream" ',Y=r.if.call(t,(Y=t&&t.settings,null==Y||!1===Y?Y:Y.directStream),{hash:{},inverse:q.noop,fn:q.program(5,u,o),data:o}),(Y||0===Y)&&(G+=Y),G+="> "+K(i(n(4)).call(t,"Direct Stream",{hash:{},data:o
}))+' </label> <p class="help-block">'+K(i(n(4)).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},data:o}))+"</p> </div> ",Y=r.if.call(t,t&&t.canDebugAdaptiveBitrate,{hash:{},inverse:q.noop,fn:q.program(47,N,o),data:o}),(Y||0===Y)&&(G+=Y),G+=" ",Y=r.if.call(t,t&&t.canForceVideoAds,{hash:{},inverse:q.noop,fn:q.program(49,L,o),data:o}),(Y||0===Y)&&(G+=Y),
G+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header-first ',Y=r.if.call(t,t&&t.isPMPDesktop,{hash:{},inverse:q.noop,fn:q.program(51,k,o),data:o}),(Y||0===Y)&&(G+=Y),G+='">'+K(i(n(4)).call(t,"Audio & Subtitles",{hash:{},data:o}))+'</h4> <div class="form-group advanced-setting"> <label for="audioBoost">'+K(i(n(4)).call(t,"Multi-Channel Audio Boost",{hash:{},data:o}))+'</label> <select id="audioBoost" data-type="int"> ',Y=r.each.call(t,t&&t.audioBoostLevels,{
hash:{},inverse:q.noop,fn:q.programWithDepth(53,_,o,t),data:o}),(Y||0===Y)&&(G+=Y),G+=' </select> <p class="help-block">'+K(i(n(4)).call(t,"Boost volume when converting multi-channel audio to stereo.",{hash:{},data:o}))+"</p> </div> ",Y=r.if.call(t,t&&t.isQtDesktop,{hash:{},inverse:q.noop,fn:q.program(55,R,o),data:o}),(Y||0===Y)&&(G+=Y),G+=" ",Y=r.if.call(t,t&&t.hasSubtitleSize,{hash:{},inverse:q.noop,fn:q.program(57,z,o),data:o}),(Y||0===Y)&&(G+=Y),G+=" ",
Y=r.if.call(t,t&&t.hasSubtitleBurnLevel,{hash:{},inverse:q.noop,fn:q.program(60,B,o),data:o}),(Y||0===Y)&&(G+=Y),G+=" ",Y=r.if.call(t,t&&t.isQtDesktop,{hash:{},inverse:q.noop,fn:q.program(63,V,o),data:o}),(Y||0===Y)&&(G+=Y),G+=' <h4 class="settings-header">'+K(i(n(4)).call(t,"Extras",{hash:{},data:o}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+K(i(n(4)).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:o
}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',Y=r.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:q.noop,fn:q.programWithDepth(65,H,o,t),data:o}),(Y||0===Y)&&(G+=Y),G+=" </select> </div> ",Y=r.unless.call(t,t&&t.isHybridPlatform,{hash:{},inverse:q.noop,fn:q.program(67,Q,o),data:o}),(Y||0===Y)&&(G+=Y),
G+=' </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">'+K(i(n(4)).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=n(267),r=n(3928),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(18),r=n(15),a=n(268),o=n(76),s=n(30),l=n(1401),c=n(3929),u=a.a.extend({setupBasic:function(e){var t;t=e?{serverID:e}:{primaryServer:!0},this.populateView(t).done(function(e){i.a.trigger("show:view",new c.a({model:e.server,subset:"setupBasic"}))})},setupLibrary:function(){this.populateView({primaryServer:!0
}).done(function(e){i.a.trigger("show:view",new c.a({model:e.server,subset:"setupLibrary"}))})},setupChannels:function(){this.populateView({primaryServer:!0}).done(function(e){i.a.trigger("show:view",new c.a({model:e.server,subset:"setupChannels"}))})},setupComplete:function(){this.populateView({primaryServer:!0}).done(function(e){i.a.trigger("show:view",new c.a({model:e.server,subset:"setupComplete"}))})},setupSkipSignIn:function(e){this.populateView({primaryServer:!0}).then(function(){
var e=Object(r.c)("appModel"),t=e.get("primaryServer");return Object(l.a)(t)}).then(function(){Object(r.c)("metrics").trackClick({page:s._1,action:o.U,firstRun:!0}),window.location.href=e})}});t.a=u},function(e,t,n){"use strict";function i(e){return{setupSignIn:b.a,setupIntro:D.a,setupLoading:O.a,setupError:M.a,setupBasic:I.a,setupLibrary:C.a,setupComplete:S.a}[e]}
var r=n(13),a=n.n(r),o=n(21),s=n(7),l=n.n(s),c=n(18),u=n(29),d=n(15),p=n(40),h=n(76),f=n(30),v=n(81),g=n(550),m=n(1401),y=n(333),b=n(1243),I=n(3930),S=n(3932),M=n(3939),D=n(3941),C=n(3946),O=n(3951),P=n(3953),j=n.n(P),T={setupIntro:"intro",setupError:"error",setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},w=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],E=o.a.Layout.extend({className:"container",template:j.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){l.a.bindAll(this,"start","onAgentsSuccess","onAgentsFail","onUpdatesComplete","onSkipSignInChange"),(0,Object(d.c)("appStore").dispatch)(Object(y.a)({allowLightPreset:!1})),this.subset=e.subset||"setupIntro",this.attempts=0,
this._visitedSubsets={},u.a.info("Starting the setup wizard");var t=Object(d.c)("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.c)("appModel"),n=t.get("user"),i=n.server,r=i.populate();r.done(this.whenRendered(function(){n.get("features").get(v.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")?a.a.Deferred().resolve():a.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 u.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(u.a)("Waiting for server to start ("+e+")"),this.model.fetch().done(l.a.delay(this.start,500));else{var t=new g.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=T[e];this.previousSubset=this.subset,this.subset=e,o&&Object(d.c)("metrics").trackView({page:f.Z,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.c)("appModel").set("isFirstRun",!0),this.renderSubset()},onClose:function(){Object(d.c)("appModel").set("isFirstRun",!1)},onAgentsSuccess:function(e){Object(u.a)("Looking for a core agent");var t=w.find(function(t){return e.get(t)});t?(Object(u.a)(t+" found"),Object(m.a)(this.model),p.a.execute("updateChannel",{server:this.model,silent:!0}).always(this.onUpdatesComplete)):(u.a.error("No core agents found"),this.navigate("setupError"))},onAgentsFail:function(){
u.a.warn("Unable to request agents"),l.a.delay(this.start,500)},onUpdatesComplete:function(){this.navigate("setupBasic")},onNavClick:function(e){e.preventDefault();var t=a()(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),c.a.trigger("navigate",n,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),Object(d.c)("metrics").trackClick({page:f.Z,
action:h.i,firstRun:!0}),c.a.trigger("navigate","dashboard")},onSkipSignInChange:function(){this.renderSubset()}});t.a=E},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(13),o=n.n(a),s=n(21),l=n(0),c=(n.n(l),n(122)),u=n.n(c),d=n(11),p=n(7),h=n.n(p),f=n(18),v=n(159),g=n(15),m=n(40),y=n(76),b=n(123),I=n(30),S=n(3),M=n(450),D=n(3931),C=n.n(D),O=s.a.ItemView.extend({className:"setup-basic-container",template:C.a,ui:{modalContainer:".modal-container",connectCheckbox:"#connect",
publishServerCheckbox:"#PublishServerOnPlexOnlineKey",submitBtn:".submit-btn",nextBtn:".next-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-basic-form":"onSubmit","change #PublishServerOnPlexOnlineKey":"onPublishSettingChange"},initialize:function(){h.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.c)("appModel"),n=t.get("user").get("hasPlexSubscription");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(){u.a.render(r()(d.a,{store:Object(g.c)("appStore")},void 0,r()(M.a,{metricsProperties:{context:b.l,firstRun:!0},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose})),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&u.a.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this,t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active"),Object(g.c)("metrics").trackClick({
action:y.O,page:I.Z,pane:"name",firstRun:!0,value:this.ui.publishServerCheckbox.is(":checked")});var n=this.save();n=n.done(function(){e.ui.nextBtn.click()}),n.always(function(){t.removeClass("active")})}},save:function(){var e=this;return this.saveChanges().then(function(){return e.claimServer()})},saveChanges:function(){return(h.a.isEmpty(this.changes)?o.a.Deferred().resolve().promise():this.collection.first().save(this.changes)).then(null,function(){f.a.trigger("show:alert",{type:"error",
message:Object(S.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 o.a.Deferred().resolve().promise();var t=Object(g.c)("appModel"),n=t.get("cloudServer");return Object(v.a)(n.populate().then(function(){return m.a.execute("signInServer",{claim:!0,cloudAccount:e.model.get("desktop").get("cloudAccount")}).then(null,function(){
f.a.trigger("show:alert",{type:"error",message:Object(S.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=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+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+f(i(n(4)).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="'+f((a=e&&e.friendlyNameSetting,a=null==a||!1===a?a:a.id,
typeof a===h?a.apply(e):a))+'" class="form-control" value="',a=r.if.call(e,(a=e&&e.friendlyNameSetting,null==a||!1===a?a:a.value),{hash:{},inverse:v.program(4,c,t),fn:v.program(2,l,t),data:t}),(a||0===a)&&(o+=a),o+='" placeholder="'+f((a=e&&e.server,a=null==a||!1===a?a:a.friendlyName,typeof a===h?a.apply(e):a))+'"> </div> '}function l(e,t){var n;return f((n=e&&e.friendlyNameSetting,n=null==n||!1===n?n:n.value,typeof n===h?n.apply(e):n))}function c(e,t){var n;return f((n=e&&e.server,
n=null==n||!1===n?n:n.friendlyName,typeof n===h?n.apply(e):n))}function u(e,t){var r,a="";return a+=' <div class="setup-basic-form-group form-group"> <div class="publish-checkbox checkbox"> <label for="'+f((r=e&&e.publishSetting,r=null==r||!1===r?r:r.id,typeof r===h?r.apply(e):r))+'"> <input type="checkbox" id="'+f((r=e&&e.publishSetting,r=null==r||!1===r?r:r.id,typeof r===h?r.apply(e):r))+'" checked> '+f(i(n(4)).call(e,"Allow me to access my media outside my home",{hash:{},data:t
}))+' </label> </div> <p class="text-muted"> '+f(i(n(4)).call(e,"Plex will attempt to automatically configure your network to allow Plex apps outside your home to access Plex Media Server on this computer. Remember this computer will need to be turned on to access your media.",{hash:{},data:t}))+" </p> </div> "}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-sm-6 col-sm-offset-3"> <h4>'+f(i(n(4)).call(t,"Great, we found a server!",{hash:{},data:o}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',d=r.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:v.noop,fn:v.program(1,s,o),data:o}),(d||0===d)&&(p+=d),p+=" ",d=r.if.call(t,t&&t.publishSetting,{hash:{},inverse:v.noop,fn:v.program(6,u,o),data:o}),(d||0===d)&&(p+=d),
p+=' <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">'+f(i(n(4)).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(2),r=n.n(i),a=n(13),o=n.n(a),s=n(21),l=n(0),c=(n.n(l),
n(122)),u=n.n(c),d=n(11),p=n(7),h=n.n(p),f=n(18),v=n(305),g=n(15),m=n(76),y=n(123),b=n(30),I=n(81),S=n(919),M=n(3),D=n(713),C=n(327),O=n(712),P=n(3933),j=n(3937),T=n.n(j),w=n(3938),E=n.n(w),x=s.a.ItemView.extend({className:"setup-complete-container",template:E.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(){
h.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=g.c("appModel"),t=e.get("user");t.get("isSignedIn")&&t.fetch().done(this.whenRendered(function(){var e=this;t.get("subscription").get("plan")===S.a?(this.isPlexPassLiteModalOpen=!0,
this.mountReact()):t.get("features").get(I.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:T.a,collectUsageDataSetting:e?e.toJSON():null}},mountReact:function(){u.a.render(r()("div",{},void 0,r()(P.a,{metricsProperties:{context:y.l,firstRun:!0},isOpen:this.isPlexPassLiteModalOpen,
onModalClose:this.onPlexPassLiteModalClose}),this.isDVRSetupModalOpen&&r()(d.a,{store:g.c("appStore")},void 0,r()(O.a,{serverEntityID:this.model.entityID(),isModalOpen:this.isDVRSetupModalOpen,onModalClose:this.onDVRSetupModalClose}))),this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&u.a.unmountComponentAtNode(this.ui.modalContainer[0])},fetchDVRs:function(){var e=o.a.Deferred();return new D.a([],{server:this.model}).fetch().then(function(t){t.filter(function(e){
return!e.get("parentID")&&e.get("status")===C.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,h.a.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&g.c("metrics").trackClick({action:m.F,page:b.Z,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=o.a.when(e,Object(v.a)(t));return n.fail(function(){f.a.trigger("show:alert",{type:"error",message:Object(M.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){"use strict";function i(e){var t=e.isOpen,n=e.metricsProperties,i=e.onModalClose
;return a()(f.a,{size:g.e.LARGE,isOpen:t,metricsPage:p.R,metricsProperties:n,onModalClose:i},void 0,a()(v.a,{onModalClose:i},void 0,a()(d.a,{className:j.a.header},void 0,a()("div",{className:j.a.plexPassTitle},void 0,Object(h.default)("Plex Pass Lite")),Object(h.default)("Congratulations! You qualify for a free year of Plex Pass Lite!")),a()(c.a,{innerClassName:j.a.body},void 0,a()(O.a,{img:M.a,title:Object(h.default)("Mobile Sync"),
description:Object(h.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),a()(O.a,{img:y.a,title:Object(h.default)("Camera Upload"),description:Object(h.default)("Sync photos from your mobile devices to Plex Media Server")}),a()(O.a,{img:I.a,title:Object(h.default)("Cloud Sync"),description:Object(h.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),a()(O.a,{img:C.a,title:Object(h.default)("Plex Home"),
description:Object(h.default)("Parental controls and fast user switching")})),a()(u.a,{className:j.a.footer},void 0,a()(l.a,{kind:g.b.PRIMARY,size:g.e.LARGE,onPress:i},void 0,Object(h.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(42)),c=n(59),u=n(82),d=n(78),p=n(30),h=n(3),f=n(117),v=n(95),g=n(23),m=n(1008),y=n.n(m),b=n(3934),I=n.n(b),S=n(1009),M=n.n(S),D=n(3935),C=n.n(D),O=n(1010),P=n(3936),j=n.n(P);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){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(4)).call(e,"Send anonymous usage data to Plex",{hash:{},data:t}))+' </label> </div> <p class="setup-complete-help text-muted"> '+p(i(n(4)).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(4)).call(t,"Get Plex Apps",{hash:{},data:o
}))+'</a> </div> <p class="text-muted">'+p(i(n(4)).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(4)).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(4)).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";var i=n(21),r=n(3940),a=n.n(r),o=i.a.ItemView.extend({className:"setup-error-container",template:a.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(4)).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(4)).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(4)).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(21),r=n(3942),a=n.n(r),o=n(3943),s=n.n(o),l=n(3944),c=n.n(l),u=n(3945),d=n.n(u),p=i.a.ItemView.extend({className:"setup-intro-container",template:d.a,serializeData:function(){return{computerImg:a.a,mediaImg:s.a,playImg:c.a}}});t.a=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){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(4)).call(t,"How Plex Works",{hash:{},data:o}))+"</h2> <h4>"+c(i(n(4)).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(4)).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(4)).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(4)).call(t,"Got it!",{hash:{},data:o}))+"</button> </p> "})},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(21),o=n(18),s=n(15),l=n(671),c=n(81),u=n(3947),d=n(460),p=n(3950),h=n.n(p),f=a.a.Layout.extend({className:"setup-library-container",template:h.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(s.c)("appModel"),a=i.get("user"),o="/services/defaultLibraries";a.get("features").get(c.b)&&(o+="?includeAllLibraries=1");var u=new l.a([],{server:t,url:o});this.collection=n,
this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&r.a.when(u.populate(),n.populate()).done(function(){n.length||u.forEach(function(e){var i=t.hasOwnerFeature("photo_autotags");"photo"===e.get("type")&&i&&e.set("enableAutoPhotoTags",!0),e.collection=n,n.add(e)})})},onRender:function(){this.list.show(new u.a({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),o.a.trigger("show:modal",new d.a({server:this.model}))}});t.a=f},function(e,t,n){"use strict"
;var i=n(86),r=n(3948),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(21),r=n(18),a=n(40),o=n(460),s=n(3949),l=n.n(s),c={artist:"music",movie:"film",photo:"picture",show:"display"},u=i.a.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:l.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 o.a({model:t,server:t.server,isDefaultSection:t.isNew()});t.isNew()&&n.promise.always(function(){t.trigger("destroy",t,t.collection)}),r.a.trigger("show:modal",n)},onDeleteClick:function(e){e.preventDefault(),a.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){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(4)).call(t,"Organize Your Media",{hash:{},data:o}))+'</h4> <p class="text-muted">'+l(i(n(4)).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(4)).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(4)).call(t,"Back",{hash:{},data:o}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+l(i(n(4)).call(t,"Next",{hash:{},data:o}))+"</button> </div> </div> </div> "})},function(e,t,n){"use strict";var i=n(21),r=n(3952),a=n.n(r),o=i.a.ItemView.extend({
className:"setup-loading-container",template:a.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(4)).call(t,"Please wait a moment while Plex starts.",{hash:{},data:o}))+"</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=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 plex-logo"></i> </div> <h2>'+l(i(n(4)).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(4)).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(4)).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(4)).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(267),r=n(3955),a=i.a.extend({controller:new r.a,appRoutes:{"!/settings/account":"account","!/settings/plex-cloud":"personalCloud","!/settings/webhooks":"webhooks",
"!/settings/online-media-sources":"onlineMediaSources","!/cpms":"cpms","!/announcements":"announcements","!/account":"account","!/account/plex-cloud":"personalCloud","!/account/webhooks":"webhooks","!/account/online-media-sources":"onlineMediaSources","!/account/audio-subtitle":"account"}});t.a=a},function(e,t,n){"use strict";var i=n(18),r=n(15),a=n(268),o=n(80),s=n(35),l=n(3),c=n(3956),u=n(3980),d=n(3984),p=n(3992),h=n(3998),f=n(752),v=n(4001),g=a.a.extend({account:function(){
this.populateView({serverID:o.a}).done(function(){Object(s.a)(),i.a.trigger("show:view",new c.a)})},personalCloud:function(){var e=r.c("appModel"),t=e.get("user");this.populateView({serverID:o.a}).done(function(){Object(s.a)(),i.a.trigger("show:view",new d.a({model:t}))})},onlineMediaSources:function(){this.populateView({serverID:o.a}).done(function(){Object(s.a)(),i.a.trigger("show:view",new u.a)})},webhooks:function(){var e=r.c("appModel"),t=e.get("user");this.populateView({serverID:o.a
}).done(function(){Object(s.a)(),i.a.trigger("show:view",new p.a({model:t}))})},cpms:function(){this.populateView({serverID:o.a}).done(function(){i.a.trigger("show:view",new h.a)})},announcements:function(){this.populateView().done(function(){var e=r.c("appModel"),t=e.get("user"),n=t.get("desktop").get("announcements"),a=n.fetch({scope:"page"});a.done(function(){i.a.trigger("show:view",new v.a({collection:n}))}),a.fail(function(){i.a.trigger("show:view",new f.a({
title:Object(l.default)("Announcements are not available.")}))})})}});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(67)),s=n(46),l=n(3957),c=n(275),u=r()(o.a,{},void 0,r()(c.a,{selectedKey:"account"}),r()(l.a,{})),d=s.a.extend({component:function(){return u}});t.a=d},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(53),f=n.n(h),v=n(1),g=(n.n(v),n(0)),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),
n(7)),S=n.n(I),M=n(394),D=n(154),C=n(367),O=n(863),P=n(204),j=n(3958),T=Object(b.createSelector)(D.a,M.a,function(e){return e.ui.accountSettingsPage},function(e,t,n){var i=e.desktop,r=i.updateUserError?Object(C.a)(S.a.last(i.updateUserError[S.a.first(f()(i.updateUserError))])):n.updateUserProfileError,a=S.a.mapObject(i.updateUserError,function(e){return e.map(function(e){return Object(C.a)(e)})
}),o=S.a.pick(e,"username","email","emailOnlyAuth","subscriptionDescription","thumb","locked","locale","canGoPremium","hasPlexSubscription","hasPlexPass","hasPassword","isEmployee","isNinja","mailingListActive","restricted");return{serverEntityID:t.entityID,user:o,isUpdatingUser:i.isUpdatingUser||n.isUpdatingUserProfile,updateUserError:r,userSettingErrors:a,myPlexUrl:"https://plex.tv"}}),w={dispatchUpdateUser:P.r,dispatchClearUpdateUserError:P.e,dispatchClearUpdateUserProfileError:O.b
},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.onErrorDismiss=function(){i.props.dispatchClearUpdateUserError(),i.props.dispatchClearUpdateUserProfileError()},i.onSubmit=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,
e.dispatchClearUpdateUserProfileError,o()(e,["dispatchUpdateUser","dispatchClearUpdateUserError","dispatchClearUpdateUserProfileError"]));return m.a.createElement(j.a,r()({},t,{onErrorDismiss:this.onErrorDismiss,onSubmit:this.onSubmit,onUserProfileSubmit:this.onUserProfileSubmit}))},t}(g.Component);t.a=Object(y.b)(T,w)(E)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(6),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(7),m=n.n(g),y=n(20),b=n(545),I=n(142),S=n(456),M=n(546),D=n(387),C=n(19),O=n(30),P=n(3),j=n(179),T=n(3959),w=n(555),E=n(3961),x=n(3964),A=n(491),N=n(230),L=n(229),k=n(287),_=n(1402),R=n(23),z=n(3969),U=n(3972),B=n(3979),F=n.n(B),V=function(e){function t(n,i){l()(this,t);var r=u()(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(m.a.mapObject(r.state,function(t,i){return i===e&&!n}))}},r.getUserFormSectionProps=function(e,t){var n=r.state[t];return{title:e,onTogglePress:r.createToggleHandler(t),isOpen:n,onSubmit:r.props.onSubmit,isUpdating:r.props.isUpdatingUser,errorMessage:r.props.updateUserError}},r.onCreatePassword=function(e){r.createToggleHandler("isPasswordOpen")(e)},r.onToggleAudioSubtitlesFormSection=function(e){r.createToggleHandler("isSelectAudioOpen")(e)},r.onAccountEmailSubmit=function(e){
var t=r.props.user;t.username===t.email?r.props.onSubmit(o()({},e,{username:e.email})):r.props.onSubmit(e)},r.state={isUsernameOpen:!1,isEmailOpen:!1,isPasswordOpen:!1,isLinkedAccountsOpen:!1,isLocaleOpen:!1,isPhotoOpen:!1,isNewsletterOpen:!1,isSelectAudioOpen:!1},r}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isUpdatingUser&&!e.isUpdatingUser&&!e.updateUserError&&this.setState(m.a.mapObject(this.state,function(){return!1}))},t.prototype.render=function(){
var e=this.props,t=e.serverEntityID,n=e.user,i=e.myPlexUrl,a=e.userSettingErrors,s=Object(P.default)("System Default"),l=!n.restricted,c=n.username===n.email,u=D.d.map(function(e){var t;return t={},t[e]=D.b[e],t});return r()(N.a,{metricsPage:O.a,metricsPane:"account"},void 0,r()(L.a,{},void 0,Object(P.default)("Account")),r()(E.a,{myPlexUrl:i,user:n}),v.a.createElement(k.a,o()({},this.getUserFormSectionProps(Object(P.default)("Photo"),"isPhotoOpen"),{closedNode:r()(w.a,{serverEntityID:t,
url:this.props.user.thumb,width:80,height:80})}),r()(I.a,{},void 0,Object(P.default)("Photo")),r()(z.a,{serverEntityID:t,name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,url:this.props.user.thumb})),v.a.createElement(k.a,o()({},this.getUserFormSectionProps(Object(P.default)("Language"),"isLocaleOpen"),{closedNode:D.b[n.locale]||s}),r()(S.a,{labelText:Object(P.default)("Language"),
helpText:Object(P.default)("This sets the default language for Plex applications that do not provide their own language setting."),name:"locale",initialValue:n.locale,values:[{"":s}].concat(u)})),r()(x.a,{isOpen:this.state.isSelectAudioOpen,isUpdating:this.props.isUpdatingUser,errorMessage:this.props.updateUserError,onTogglePress:this.onToggleAudioSubtitlesFormSection}),l&&v.a.createElement(k.a,o()({},this.getUserFormSectionProps(Object(P.default)("Username"),"isUsernameOpen"),{
closedNode:c?Object(P.default)("Not set"):n.username}),r()(M.b,{labelText:Object(P.default)("Username"),helpText:Object(P.default)("Your username will be visible to friends with whom you have shared your server."),name:"username",initialValue:c?"":n.username,errors:a.username,validations:[_.g]}),r()(b.a,{name:"emailOnlyAuth",checkboxText:Object(P.default)("Allow username to be used when signing in"),
helpText:Object(P.default)("Your email address will be required to sign in when username sign-in is not allowed."),initialValue:n.emailOnlyAuth,checkedValue:!1,uncheckedValue:!0})),l&&v.a.createElement(k.a,o()({},this.getUserFormSectionProps(Object(P.default)("Email Address"),"isEmailOpen"),{closedNode:n.email,onSubmit:this.onAccountEmailSubmit}),r()(M.b,{labelText:Object(P.default)("Email Address"),name:"email",initialValue:n.email,errors:a.email,validations:[_.d]}),r()(M.b,{
labelText:Object(P.default)("Password"),type:"password",name:"currentPassword",initialValue:"",validations:[_.e]})),l&&v.a.createElement(k.a,o()({},this.getUserFormSectionProps(Object(P.default)("Password"),"isPasswordOpen"),{closedNode:n.hasPassword?"**********":Object(P.default)("Not set")}),r()(T.a,{labelText:n.hasPassword?Object(P.default)("New Password"):Object(P.default)("Choose Password"),name:"password",initialValue:"",errors:a.password,validations:[_.e,_.h]}),r()(M.b,{
labelText:n.hasPassword?Object(P.default)("Confirm New Password"):Object(P.default)("Confirm Password"),type:"password",name:"passwordConfirmation",initialValue:"",validations:[_.b,_.a]}),n.hasPassword&&r()(M.b,{labelText:Object(P.default)("Current Password"),type:"password",name:"currentPassword",initialValue:"",validations:[_.c]}),n.hasPassword&&r()(b.a,{checkboxText:Object(P.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1
})),l&&v.a.createElement(U.a,o()({},this.getUserFormSectionProps(Object(P.default)("Linked Accounts"),"isLinkedAccountsOpen"),{hasPassword:n.hasPassword,onCreatePassword:this.onCreatePassword})),l&&v.a.createElement(k.a,o()({},this.getUserFormSectionProps(Object(P.default)("Newsletter"),"isNewsletterOpen"),{closedNode:n.mailingListActive?Object(P.default)("You are currently subscribed"):Object(P.default)("You are not subscribed")}),r()(b.a,{name:"mailingListActive",
initialValue:n.mailingListActive,labelText:Object(P.default)("Newsletter"),checkboxText:Object(P.default)("Subscribe to our amazing, but infrequent email newsletter")})),l&&r()(A.a,{},void 0,r()(I.a,{},void 0,Object(P.default)("Privacy")),r()(j.a,{className:F.a.description,
message:Object(P.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:y.a,kind:R.b.PRIMARY,to:"https://www.plex.tv/about/privacy-legal/",target:"_blank"},{
open:"openAdChoicesLink",close:"closeAdChoicesLink",component:y.a,kind:R.b.PRIMARY,to:"https://www.plex.tv/about/privacy-legal/#adchoices",target:"_blank"},{open:"openPreferencesLink",close:"closePreferencesLink",component:y.a,kind:R.b.PRIMARY,to:"https://www.plex.tv/about/privacy-legal/privacy-preferences/#opd",target:"_blank"}]})),l&&r()(A.a,{},void 0,r()(y.a,{kind:R.b.DANGER,to:Object(C.join)([i,"/users/delete"]),target:"_self"},void 0,Object(P.default)("Delete your account"))))},t
}(f.Component);t.a=V},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,y=c()(e,["formGroupClassName","formLabelClassName","formInputClassName","name","value","labelText","showErrors","errors","zxcvbn"]),b=h&&""!==o,I=b?S[h(o).score]:null,M=f.a.last(d);return s()(v.a,{className:t},void 0,s()(g.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 "+M),p.a.createElement(m.a,a()({className:i,name:r,type:"password",value:o,hasError:u},y)))}var r=n(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(7),f=n.n(h),v=n(206),g=n(142),m=n(192),y=n(165),b=n(3),I=n(3960),S={0:{color:"#ff5533",translateFn:function(){return Object(b.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){
return Object(b.default)("Very weak")}},2:{color:"#eebb00",translateFn:function(){return Object(b.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return Object(b.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){return Object(b.default)("Very Strong")}}},M=Object(I.a)(Object(y.a)(i),{zxcvbn:function(){return n.e(0).then(n.bind(null,4268))}});M.defaultProps={showErrors:!1},t.a=M},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(6),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(53),h=n.n(p),f=n(0),v=n.n(f),g=n(166);t.a=i},function(e,t,n){"use strict";function i(e){return e.isEmployee?p()("span",{className:w.a.textBadge},void 0,"Employee"):e.isNinja&&!e.isEmployee?p()("span",{className:w.a.textBadge},void 0,"Ninja"):null}function r(e){return e?[E,x,A]:[x,A]}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(72)),g=n(42),m=n(20),y=n(19),b=n(30),I=n(3),S=n(734),M=n(491),D=n(616),C=n(450),O=n(23),P=n(3962),j=n.n(P),T=n(3963),w=n.n(T),E={path:"/subscription",title:function(){return Object(I.default)("Subscriptions")}},x={path:"/users/payments",title:function(){return Object(I.default)("Payments")}},A={path:"/users/other-services",title:function(){return Object(I.default)("Other Services")}},N=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.render=function(){var e=this.props,t=e.myPlexUrl,n=e.user,a=this.state.isPlexPassModalOpen,o=Object(S.a)()?"_blank":"_self",s=i(n);return n.hasPlexSubscription||n.canGoPremium||!n.restricted?p()(M.a,{},void 0,p()("div",{className:w.a.container},void 0,p()("div",{},void 0,n.hasPlexSubscription?p()("div",{},void 0,p()("div",{
className:w.a.badgeContainer},void 0,n.hasPlexPass?p()("img",{className:w.a.plexPassBadge,src:j.a}):null,s),p()("div",{},void 0,n.subscriptionDescription)):null,n.canGoPremium?p()("div",{},void 0,s&&p()("div",{className:w.a.badgeContainer},void 0,s),p()(g.a,{kind:O.b.PRIMARY,onPress:this.onPlexPassPress},void 0,Object(I.default)("Go Premium")),p()(C.a,{metricsProperties:{context:b.a},isOpen:a,onModalClose:this.onPlexPassModalClose})):null),n.restricted?null:p()("div",{
className:w.a.actionLinksContainer},void 0,p()(D.a,{className:w.a.actionLinks},void 0,r(n.hasPlexSubscription).map(function(e,n){var i=e.path,r=e.title;return p()(f.Fragment,{},n,p()(v.b,{className:w.a.linkSeparator,separator:"\xb7"}),p()(m.a,{kind:O.b.PRIMARY,to:Object(y.join)([t,i]),target:o},void 0,r()))}))))):null},t}(f.Component);t.a=N},function(e,t,n){e.exports=n.p+"desktop/common/img/pp-ticket.de3ffb4d2327ee50e4290f8467a1796b.svg"},function(e,t){e.exports={
container:"AccountSummary-container-2EbPg",actionLinksContainer:"AccountSummary-actionLinksContainer-2aUMQ",actionLinks:"AccountSummary-actionLinks-1tXSN SettingsFormSectionActionLinks-actionLinks-2vGv7",linkSeparator:"AccountSummary-linkSeparator-F6ygA",separator:"AccountSummary-separator-23I7s DashSeparator-separator-4CyEF",badgeContainer:"AccountSummary-badgeContainer-2TYeD",plexPassBadge:"AccountSummary-plexPassBadge-27hFF",textBadge:"AccountSummary-textBadge-3M187"}},function(e,t,n){
"use strict";var i=n(11),r=n(5),a=(n.n(r),n(336)),o=n(274),s=n(81),l=n(863),c=n(3965),u=Object(r.createSelector)(Object(a.a)("profile"),Object(o.a)(s.k),function(e,t){return{userProfile:e,userHasSubtitlesOnDemandFeature:t}}),d={onSubmit:l.c};t.a=Object(i.b)(u,d)(c.a)},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(2),o=n.n(a),s=n(12),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(20),b=n(545),I=n(142),S=n(456),M=n(49),D=n(3966),C=n(3),O=n(3967),P=n(287),j=n(3968),T=n.n(j),w=0,E=1,x=2,A=0,N=1,L=2,k=3,_=function(e){function t(n,i){var r,a,o,s,l,c,d;u()(this,t);var h=p()(this,e.call(this,n,i));return h.onSubmit=function(e){e.autoSelectSubtitle&&(e.autoSelectSubtitle=parseInt(e.autoSelectSubtitle,10)),e.defaultSubtitleAccessibility&&(e.defaultSubtitleAccessibility=parseInt(e.defaultSubtitleAccessibility,10)),h.props.onSubmit(e)},h.onFormChange=function(e){
var t=e.autoSelectAudio;t.value!==h.state.isAutoSelectAudio&&h.setState({isAutoSelectAudio:t.value})},h.state={isAutoSelectAudio:n.userProfile.autoSelectAudio},h._autoSelectSubtitleOptions=[(r={},r[w]=Object(C.default)("Manually selected"),r),(a={},a[E]=Object(C.default)("Shown with foreign audio"),a),(o={},o[x]=Object(C.default)("Always enabled"),o)],h._subtitleAccessibilityOptions=[(s={},s[A]=Object(C.default)("Prefer non-hearing-impaired subtitles"),s),(l={},
l[N]=Object(C.default)("Prefer hearing-impaired subtitles"),l),(c={},c[L]=Object(C.default)("Only show hearing-impaired subtitles"),c),(d={},d[k]=Object(C.default)("Only show non-hearing-impaired subtitles"),d)],h._languageOptions=[{"":Object(C.default)("Select Language")}].concat(Object(D.a)()),h}return f()(t,e),t.prototype.componentWillReceiveProps=function(e){e.isOpen!==this.props.isOpen&&this.setState({isAutoSelectAudio:e.userProfile.autoSelectAudio})},t.prototype.render=function(){
var e=this.props,t=e.userProfile,n=e.userHasSubtitlesOnDemandFeature,i=l()(e,["userProfile","userHasSubtitlesOnDemandFeature"]),a=this.state.isAutoSelectAudio;return m.a.createElement(P.a,r()({},i,{title:Object(C.default)("Audio & Subtitle Settings"),closedNode:o()(O.a,{userProfile:t,languageOptions:this._languageOptions,autoSelectSubtitleOptions:this._autoSelectSubtitleOptions,subtitleAccessibilityOptions:this._subtitleAccessibilityOptions,userHasSubtitlesOnDemandFeature:n}),
onFormChange:this.onFormChange,onSubmit:this.onSubmit}),o()(I.a,{},void 0,Object(C.default)("Audio & Subtitle Settings")),o()("p",{className:T.a.description},void 0,Object(C.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.")),o()("p",{},void 0,o()(y.a,{kind:M.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/204985278",target:"_blank"},void 0,Object(C.default)("Learn more"))),o()(b.a,{
name:"autoSelectAudio",checkboxText:Object(C.default)("Automatically select audio and subtitle tracks"),initialValue:t.autoSelectAudio}),a&&o()(S.a,{labelText:Object(C.default)("Preferred audio language"),name:"defaultAudioLanguage",initialValue:t.defaultAudioLanguage,values:this._languageOptions}),a&&o()(S.a,{labelText:Object(C.default)("Preferred subtitle language"),name:"defaultSubtitleLanguage",initialValue:t.defaultSubtitleLanguage,values:this._languageOptions}),a&&o()(S.a,{
labelText:Object(C.default)("Auto-select subtitle mode"),name:"autoSelectSubtitle",initialValue:t.autoSelectSubtitle,values:this._autoSelectSubtitleOptions}),n?o()(S.a,{labelText:Object(C.default)("Hearing Impaired Subtitle (SDH) Searches"),name:"defaultSubtitleAccessibility",initialValue:t.defaultSubtitleAccessibility,values:this._subtitleAccessibilityOptions}):null)},t}(g.Component);t.a=_},function(e,t,n){"use strict";function i(){return r.d.filter(function(e){
return 2===e.length&&-1===r.a.indexOf(e)}).map(function(e){var t;return t={},t[e]=r.b[e],t})}t.a=i;var r=n(387)},function(e,t,n){"use strict";function i(e,t){var n=e.find(function(e){return e.hasOwnProperty(t)});return n?n[t]:""}function r(e){
var t=e.userProfile,n=e.languageOptions,r=e.autoSelectSubtitleOptions,a=e.subtitleAccessibilityOptions,s=e.userHasSubtitlesOnDemandFeature,l=t.autoSelectAudio,c=t.defaultAudioLanguage,f=t.defaultSubtitleLanguage,v=t.autoSelectSubtitle,g=t.defaultSubtitleAccessibility,m=i(n,c),y="";""!==c&&m&&(y=Object(u.default)("{audioLanguage} audio",{audioLanguage:m}));var b=i(n,f),I="";""!==f&&b&&(I=Object(u.default)("{subtitleLanguage} subtitles",{subtitleLanguage:b}));var S=i(r,v).toLowerCase(),M=""
;I&&S?M=I+" "+S:!I&&S?M=Object(u.default)("subtitles")+" "+S:I&&!S&&(M=I);var D=l?[y,M].join(", "):Object(u.default)("Manually Select"),C="";return s&&(C=i(a,g)),o()("span",{},void 0,D&&Object(u.default)("Track selection"),D&&d,D,C&&p,C&&Object(u.default)("Searches"),C&&h,C)}var a=n(2),o=n.n(a),s=n(1),l=(n.n(s),n(0)),c=(n.n(l),n(72)),u=n(3),d=o()(c.b,{}),p=o()("br",{}),h=o()(c.b,{});t.a=r},function(e,t){e.exports={description:"AudioSubtitleSettingsFormSection-description-3K2f7"}
},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(5),o=(n.n(a),n(1024)),s=n(3970);t.a=Object(r.b)(i)(s.a)},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(6),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(165),m=n(27),y=n(371),b=n(19),I=n(3),S=n(25),M=n(331),D=n(1272),C=n(3971),O=n.n(C),P=r()(S.a,{name:"plex-icon-avatar-crop-min-560"}),j=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(m.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=b.join(e.substring(0,l),s),a+=-1===a.indexOf("?")?"?":"&",a+=e.substring(l+1)):a=b.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:O.a.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver,onDragStart:this.onDragStart,onDragLeave:this.onDragLeave,onDragEnter:this.onDragEnter},void 0,r()("div",{className:O.a.avatarPane},void 0,v.a.createElement("canvas",{className:e?O.a.isOverDropTarget:"",width:this.props.width,
height:this.props.height,ref:this.setCanvasRef,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),r()("div",{className:O.a.sliderContainer},void 0,r()("span",{className:O.a.sliderEnd},void 0,P),r()("span",{className:O.a.sliderWrapper},void 0,r()(M.a,{className:O.a.slider,min:this.state.minScale,max:this.state.maxScale,step:.1,value:this.state.scale,onChange:this.onSliderChange})),r()("span",{className:O.a.sliderEnd},void 0,j))),r()("div",{className:O.a.avatarTextPane
},void 0,r()("p",{},void 0,r()(D.a,{accept:"image/*",buttonText:Object(I.default)("Choose Photo"),onChange:this.onFileDrop})),r()("p",{className:O.a.help},void 0,Object(I.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(g.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(12),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(6),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(5),y=(n.n(m),n(228)),b=n(414),I=n(244),S=n(1403),M=n(462),D=n(3973),C=Object(m.createSelector)(S.a,y.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:I.b},P=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)(P)},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(f.default)("Loading\u2026")):u?s()("span",{className:b.a.dim},void 0,Object(f.default)("Error")):r||s()("span",{className:b.a.dim},void 0,Object(f.default)("None")),p.a.createElement(v.a,a()({},S,{closedNode:M,showButton:!1}),s()(h.a,{},void 0,Object(f.default)("Linked Accounts")),s()("div",{className:b.a.description
},void 0,Object(f.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(6),a=n.n(r),o=n(2),s=n.n(o),l=n(12),c=n.n(l),u=n(1),d=(n.n(u),n(0)),p=n.n(d),h=n(142),f=n(3),v=n(287),g=n(3974),m=n(3977),y=n(3978),b=n.n(y),I=s()(m.a,{});t.a=i
},function(e,t,n){"use strict";function i(){var e=Object(y.createSelector)(function(e,t){return t.url},C.a,function(e,t){return t.oauthProviders.find(function(t){return t.url===e})});return Object(y.createSelector)(function(e,t){return{url:t.url}},function(e,t){return t.returnUrl},Object(b.a)("email"),Object(b.a)("authToken"),e,I.a,function(e,t,n,i,r,a){var o=(a.authToken,h()(a,["authToken"])),s=!r.linked&&(r.isUnlinking||Object(O.a)()&&!a.code||a.isBusy);return d()({},r,{
isPollClient:Object(O.a)(),userAuthToken:i,email:n,providerID:r.authName,originalUrl:r.url,url:Object(S.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(6),d=n.n(u),p=n(12),h=n.n(p),f=n(1),v=(n.n(f),n(0)),g=n.n(v),m=n(11),y=n(5),b=(n.n(y),n(336)),I=n(228),S=n(1404),M=n(414),D=n(244),C=n(1403),O=n(462),P=n(393),j=n(3975),T={dispatchUnlinkOauthProvider:M.c,dispatchPreloadPIN:D.c},w=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(P.a,d()({component:j.a},t,{onUnlink:this.onUnlink,
onStillTherePress:this.onStillTherePress}))},t}(v.Component);t.a=Object(m.b)(i,T)(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(42)),f=n(20),v=n(49),g=n(30),m=n(3),y=n(179),b=n(157),I=(n(864),n(3976)),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,P=this.state.isUnlinkOauthProviderModalOpen,j=p,T=!p&&!l,w=!(T||i||a||j),E=j||T||w,x=!u&&c,A=x?this.onUnlinkPress:I;return r()("div",{className:p?S.a.rowLinked:S.a.rowUnlinked},void 0,r()(h.a,{className:M[o],isDisabled:l,onPress:T?D:A
}),p?Object(m.default)("Your {oauthProvider} account is linked",{oauthProvider:d}):Object(m.default)("Your {oauthProvider} account is not linked",{oauthProvider:d}),E&&r()("span",{className:S.a.separator},void 0,"\u2014"),j&&r()(f.a,{kind:v.PRIMARY,isDisabled:l,onPress:A},void 0,Object(m.default)("Unlink")),x&&r()(b.a,{isConfirmButtonSpinning:l,isCancelButtonDisabled:l,isOpen:P,metricsPage:g.u,metricsProperties:s,title:Object(m.default)("Unlink {oauthProvider}",{oauthProvider:d}),
message:Object(m.default)("To unlink, first set a password to use when signing in"),confirmLabel:Object(m.default)("Set Password"),kind:v.DANGER,onConfirm:C,onCancel:this.onUnlinkCancel}),T&&r()(f.a,{kind:v.PRIMARY,to:t,target:n?"_blank":null,onPress:D},void 0,Object(m.default)("Link")),w&&r()(y.a,{message:Object(m.default)("Account linking timed out. {openLink}Try again?{closeLink}"),tags:[{open:"openLink",close:"closeLink",component:f.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(228),h=n(244),f=n(1405),v={dispatchPreloadPIN:h.c,dispatchStopPolling:h.g,dispatchNavigateRefresh:f.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)(p.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"}},function(e,t,n){"use strict"
;var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),n(67)),s=n(46),l=n(3981),c=n(275),u=r()(o.a,{},void 0,r()(c.a,{selectedKey:"online-media-sources"}),r()(l.a,{})),d=s.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(5),v=(n.n(f),n(154)),g=n(35),m=n(1406),y=n(3983),b=Object(f.createSelector)(function(e){return e.ui.onlineMediaSourcesPage},v.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:m.b,dispatchClearOnlineMediaSourcesUpdateError:m.a,dispatchUpdateOptOutStatuses:m.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(g.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(17),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(1),p=(n.n(d),n(0)),h=(n.n(p),
n(7)),f=n.n(h),v=n(456),g=n(30),m=n(3),y=n(31),b=n(73),I=n(113),S=n(184),M=n(230),D=n(229),C=n(287),O=r()(b.a,{},void 0,r()(y.a,{})),P=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(f.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;if(n)return r()(I.a,{title:Object(m.default)("You're not supposed to be here"),description:Object(m.default)("You don't have access to Online Media Sources")});if(i)return r()(S.a,{title:Object(m.default)("There was an unexpected error loading Online Media Sources")})
;if(a)return O;var u=[{opt_in:Object(m.default)("Enabled")},{opt_out:Object(m.default)("Disabled")},{opt_out_managed:Object(m.default)("Disabled for Managed Users")}];return r()(M.a,{metricsPage:g.a,metricsPane:"onlineMediaSources"},void 0,r()(D.a,{},void 0,Object(m.default)("Online Media Sources")),o.map(function(t){var n=e._getOptOutStatus(t.identifier),i=u.find(function(e){return e[n]})[n];return r()(C.a,{closedNode:i,title:t.title,isOpen:e.state[t.identifier],isUpdating:s,
errorMessage:l&&Object(m.default)("Unable to save settings"),onTogglePress:e.createToggleHandler(t.identifier),onUpdateStatus:c,onSubmit:c},t.identifier,r()(v.a,{labelText:t.title,helpText:Object(m.default)("Disabling {onlineMediaSource} will remove it from all Plex apps signed in with your account.",{onlineMediaSource:t.title}),name:t.identifier,initialValue:n,values:u}))}))},t}(p.Component);t.a=P},function(e,t,n){"use strict";var i=n(2),r=n.n(i),a=n(0),o=(n.n(a),
n(67)),s=n(46),l=n(3985),c=n(275),u=r()(o.a,{},void 0,r()(c.a,{selectedKey:"plex-cloud"}),r()(l.a,{})),d=s.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(6),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(5),g=(n.n(v),n(823)),m=n(742),y=n(414),b=n(1248),I=n(3986),S=Object(v.createSelector)(g.a,b.a,m.a,function(e,t,n){var i=t.isOauthProvidersPopulated,r=t.oauthProviders,a=i&&r.filter(function(e){
return e.linked}),o=a&&1===a.length&&a[0];return u()({},t,{lastLinkedProviderUrl:o?o.url:null,hasOwnedPersonalCloudServer:!!e,isUnauthorized:!n.cpms})}),M={dispatchFetchOauthProviders:y.a},D=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(I.a,this.props)},t}(p.Component);t.a=Object(f.b)(S,M)(D)},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;return n?s()(h.a,{title:Object(p.default)("You're not supposed to be here"),description:Object(p.default)("You don't have access to Plex Cloud settings")}):s()(v.a,{metricsPage:d.a,metricsPane:"plexCloud"
},void 0,s()(g.a,{},void 0,Object(p.default)("Plex Cloud")),t&&b,r&&!o&&I,o&&i.map(function(e){return u.a.createElement(f.a,a()({key:e.url,unlinkConfirmMessage:c===e.url?Object(p.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(p.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(p.default)("Yes, unlink {personalCloudServerProvider}",{personalCloudServerProvider:e.label}):null,returnUrl:t?"#!/settings/plex-cloud":"#!/cpms"},e))}),l&&Object(p.default)("An error occurred retrieving cloud storage providers. Please try again."))}var r=n(6),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(30),p=n(3),h=n(113),f=n(3987),v=n(230),g=n(229),m=n(1408),y=n(3990),b=s()(y.a,{}),I=s()(m.a,{});t.a=i},function(e,t,n){"use strict";function i(){return Object(b.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(I.a)(e,t),metricsProperties:n}})}
var r=n(6),a=n.n(r),o=n(12),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),g=n(0),m=n.n(g),y=n(11),b=n(5),I=(n.n(b),n(1404)),S=n(414),M=(n(864),n(3988)),D={dispatchUnlinkOauthProvider:S.c},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.onUnlink=function(){i.props.dispatchUnlinkOauthProvider({url:i.props.originalUrl})},r=n,d()(i,r)}
return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.url,n=e.metricsProperties,i=(e.dispatchUnlinkOauthProvider,s()(e,["url","metricsProperties","dispatchUnlinkOauthProvider"]));return m.a.createElement(M.a,a()({},i,{url:t,metricsProperties:n,onUnlink:this.onUnlink}))},t}(g.Component),O=Object(y.b)(i,D)(C);O.propTypes={url:v.a.string.isRequired,returnUrl:v.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(20)),f=n(142),v=n(49),g=n(30),m=n(3),y=n(157),b=n(491),I=n(616),S=n(848),M=(n(864),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()(h.a,{kind:v.PRIMARY,to:l},void 0,Object(m.default)("Reauthorize")),o&&r()(h.a,{
isDisabled:i,kind:v.PRIMARY,onPress:this.onUnlinkPress},void 0,Object(m.default)("Unlink")),o&&r()(y.a,{isConfirmButtonSpinning:i,isCancelButtonDisabled:i,isOpen:d,metricsPage:g.u,metricsProperties:c,title:Object(m.default)("Unlink {oauthProvider}",{oauthProvider:a}),message:t,accordMessage:n,confirmLabel:Object(m.default)("Unlink"),kind:v.DANGER,onConfirm:u,onCancel:this.onUnlinkCancel}),!o&&r()(h.a,{kind:v.PRIMARY,to:l
},void 0,Object(m.default)("Link"))),r()(S.a,{},void 0,r()(f.a,{},void 0,a),s||Object(m.default)("No account linked")))},t}(p.Component));t.a=M},function(e,t){e.exports={spinnerContainer:"SettingsPageLoadingSpinner-spinnerContainer-oodfM"}},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),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(5),y=(n.n(m),n(394)),b=n(35),I=n(183),S=n(413),M=n(3991),D=Object(m.createSelector)(y.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:S.b,dispatchRestartPersonalCloudServer:I.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(b.a)(function(){i.props.dispatchRestartPersonalCloudServer()})},r=n,u()(i,r)}return p()(t,e),t.prototype.componentDidMount=function(){var e=this;Object(b.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(p.default)("Active"):t?Object(p.default)("Error checking server status"):Object(p.default)("Sleeping"),a()(f.a,{},void 0,a()(v.a,{},void 0,r?m:a()(l.a,{kind:u.PRIMARY,onPress:o
},void 0,Object(p.default)("Restart Plex Cloud"))),a()(g.a,{},void 0,a()(c.a,{},void 0,Object(p.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(20)),c=n(142),u=n(49),d=n(52),p=n(3),h=n(31),f=n(491),v=n(616),g=n(848),m=a()(h.a,{size:d.SMALL}),y=a()(h.a,{size:d.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(67)),s=n(46),l=n(3993),c=n(275),u=r()(o.a,{},void 0,r()(c.a,{selectedKey:"webhooks"
}),r()(l.a,{})),d=s.a.extend({component:function(){return u}});t.a=d},function(e,t,n){"use strict";var i=n(12),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(6),p=n.n(d),h=n(1),f=(n.n(h),n(0)),v=n.n(f),g=n(11),m=n(5),y=(n.n(m),n(7)),b=n.n(y),I=n(274),S=n(154),M=n(81),D=n(204),C=n(3994),O=Object(m.createSelector)(S.a,Object(I.a)(M.n),function(e,t){
var n=b.a.pick(e.desktop,["webhooks","isWebhooksPending","isWebhooksPopulated","webhooksError","isUpdatingWebhooks","isRemovingWebhooks","updateWebhooksError"]);return p()({},n,{isUnauthorized:!t})}),P={dispatchFetchWebhooks:D.h,onAddWebhookPress:function(){return Object(D.c)()},onErrorDismiss:D.f,onRemove:function(e){return Object(D.k)(e)},onSubmit:function(e,t){return Object(D.m)({oldUrl:e,newUrl:t})},onToggle:function(){return Object(D.k)("")}},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.dispatchFetchWebhooks(),this.props.onErrorDismiss()},t.prototype.render=function(){var e=this.props,t=(e.dispatchFetchWebhooks,r()(e,["dispatchFetchWebhooks"]));return v.a.createElement(C.a,t)},t}(f.Component);t.a=Object(g.b)(O,P)(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(7)),f=n.n(h),v=n(42),g=n(20),m=n(49),y=n(30),b=n(3),I=n(157),S=n(113),M=n(230),D=n(229),C=n(1408),O=n(3995),P=n(3997),j=n.n(P),T=r()(C.a,{}),w=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:f.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,p=this.state,h=p.openFormSectionIndex,C=p.removeWebhookModalURL,P=p.isRemoveWebhookModalOpen;if(n)return r()(S.a,{title:Object(b.default)("You're not supposed to be here"),description:Object(b.default)("You don't have access to webhooks settings")})
;var w=u&&u.length,E=u&&f.a.find(u,function(e){return""===e.url}),x=a&&u&&w<5&&!E;return r()(M.a,{metricsPage:y.a,metricsPane:"webhooks"},void 0,r()(D.a,{},void 0,Object(b.default)("Webhooks")),r()("p",{},void 0,Object(b.default)("Plex Media Server will make requests to these webhooks on various media playback events.")),r()("p",{},void 0,r()(g.a,{kind:m.PRIMARY,to:"https://support.plex.tv/hc/en-us/articles/115002267687",target:"_blank"
},void 0,Object(b.default)("Learn more"))),i&&!a&&T,a&&!!w&&u.map(function(t,n){var i=h===n;return r()(O.a,{index:n,url:t.url,isOpen:i,isUpdating:i&&s,isRemoving:i&&l,error:i?c:null,onRemove:e.onRemove,onToggle:e.onToggle,onSubmit:e.onSubmit},n)}),x&&r()("div",{className:j.a.buttons},void 0,r()(v.a,{kind:m.PRIMARY,onPress:d},void 0,Object(b.default)("Add webhook"))),o&&Object(b.default)("An error occurred retrieving webhooks. Please try again."),r()(I.a,{isConfirmButtonSpinning:l,
isCancelButtonDisabled:l,isOpen:P,metricsPage:y.t,title:Object(b.default)("Remove Webhook"),message:Object(b.default)("Plex will no longer post updates to {url}.",{url:C}),confirmLabel:Object(b.default)("Remove"),kind:m.DANGER,onConfirm:this.onRemoveWebhookConfirmPress,onCancel:this.onRemoveWebhookCancelPress}))},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(181)),f=n(142),v=n(546),g=n(49),m=n(367),y=n(3),b=n(124),I=n(1316),S=n(838),M=n(1402),D=n(3996),C=n.n(D),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.onFormChange,c=i||a;return r()(I.a,{isOpen:n,closedNode:r()("div",{},void 0,r()(f.a,{className:C.a.label},void 0,Object(y.default)("URL")),o),errorMessage:Object(m.a)(s),onTogglePress:this.onTogglePress},void 0,r()(h.b,{onSubmit:this.onSubmit,onChange:l},void 0,r()(v.b,{focusOnMount:!0,selectTextOnFocus:!0,labelText:Object(y.default)("URL"),isDisabled:c,name:"url",
initialValue:o,validations:o?[M.f]:[]}),r()("div",{className:C.a.buttons},void 0,o&&r()(b.a,{className:C.a.dangerButton,kind:g.DANGER,isSpinning:a,isDisabled:c,onPress:this.onRemovePress},void 0,Object(y.default)("Remove")),r()(b.a,{className:C.a.button,type:"submit",kind:g.PRIMARY,isSpinning:i,isDisabled:c||!t},void 0,Object(y.default)("Save Changes")))))},t}(p.Component);t.a=Object(S.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(67)),s=n(46),l=n(3999),c=r()(o.a,{},void 0,r()(l.a,{})),u=s.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(6),u=n.n(c),d=n(1),p=(n.n(d),n(0)),h=n.n(p),f=n(11),v=n(5),g=(n.n(v),n(19)),m=n(823),y=n(35),b=n(413),I=n(4e3),S=Object(v.createSelector)(m.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(y.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,u=e.personalCloudServerDriveCacheError,g=e.ownedPersonalCloudServerUrl,m=Object(c.default)("Plex Cloud Setup")
;return t?a()(d.a,{title:m,description:Object(c.default)("Creating a new Plex Cloud server just for you!")},void 0,h):n?a()(d.a,{title:m,description:Object(c.default)("An error occurred creating your Plex Cloud server.")},void 0,a()(l.a,{to:"#!/dashboard",kind:p.b.PRIMARY},void 0,Object(c.default)("Continue"))):i?a()(d.a,{title:m,description:Object(c.default)("Your Plex Cloud server is waking up.")},void 0,f):r?a()(d.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()(l.a,{to:"#!/dashboard",kind:p.b.PRIMARY},void 0,Object(c.default)("Continue"))):o?a()(d.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):u?a()(d.a,{title:m,description:Object(c.default)("Scanning your cloud storage is taking longer than expected. Check again later.")},void 0,a()(l.a,{
to:"#!/dashboard",kind:p.b.PRIMARY},void 0,Object(c.default)("Continue"))):s?a()(d.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()(l.a,{to:g,kind:p.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(42)),c=n(3),u=n(31),d=n(73),p=n(23),h=a()(u.a,{}),f=a()(u.a,{}),v=a()(u.a,{});t.a=i},function(e,t,n){"use strict";var i=n(21),r=n(15),a=n(333),o=n(4002),s=n(4006),l=n.n(s),c=i.a.Layout.extend({className:"container",template:l.a,regions:{list:".announcements-container"},initialize:function(){(0,Object(r.c)("appStore").dispatch)(Object(a.a)({allowLightPreset:!1}))},onRender:function(){this.list.show(new o.a({collection:this.collection}))}});t.a=c},function(e,t,n){"use strict"
;var i=n(86),r=n(4003),a=i.a.extend({className:"list announcement-list",itemView:r.a});t.a=a},function(e,t,n){"use strict";var i=n(21),r=n(372),a=n(4004),o=n.n(a),s=i.a.ItemView.extend({className:"announcement-list-item",template:o.a,ui:{thumb:".thumb",unread:".unread"},initialize:function(){this.image=new r.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(4005)).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(406).default,r=n(189);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){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var s="";return s+="<h2>"+(0,
this.escapeExpression)(i(n(4)).call(t,"Announcements",{hash:{},data:o}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){"use strict";var i=n(14),r=n.n(i),a=n(4008),o=n.n(a),s=n(4009),l=n.n(s),c=n(4010),u=n.n(c),d=n(4011),p=n.n(d),h=n(4012),f=n.n(h),v=n(4013),g=n.n(v),m=n(4014),y=n.n(m);r.a.registerPartial("setting",g.a),r.a.registerPartial("lockableTagInput",p.a),r.a.registerPartial("lockableTextInput",f.a),r.a.registerPartial("lockableNumericInput",u.a),
r.a.registerPartial("textInput",y.a),r.a.registerPartial("autocompleteTextInput",o.a),r.a.registerPartial("connectError",l.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 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(4)).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(4)).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(4)).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(33)).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(4)).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(4)).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(4)).call(e,"Signed in to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+f(i(n(4)).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(4)).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(33)).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(245)).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(4)).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> "
})},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(4)).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){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(4)).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(4)).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(33)).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"advanced-setting"}function l(e,t){var n,i="";return i+=' <label class="control-label" for="input_'+M((n=e&&e.id,
typeof n===S?n.apply(e):n))+M((n=e&&e.idSuffix,typeof n===S?n.apply(e):n))+'"> <input type="checkbox" id="input_'+M((n=e&&e.id,typeof n===S?n.apply(e):n))+M((n=e&&e.idSuffix,typeof n===S?n.apply(e):n))+'" name="'+M((n=e&&e.id,typeof n===S?n.apply(e):n))+'" value="1" ',n=r.if.call(e,e&&e.value,{hash:{},inverse:D.noop,fn:D.program(4,c,t),data:t}),(n||0===n)&&(i+=n),i+="> "+M((n=e&&e.label,typeof n===S?n.apply(e):n))+" </label> ",n=r.if.call(e,e&&e.summary,{hash:{},inverse:D.noop,
fn:D.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function c(e,t){return"checked"}function u(e,t){var n,i="";return i+=' <p class="help-block">'+M((n=e&&e.summary,typeof n===S?n.apply(e):n))+"</p> "}function d(e,t){var n,i="";return i+=' <label class="control-label" for="input_'+M((n=e&&e.id,typeof n===S?n.apply(e):n))+M((n=e&&e.idSuffix,typeof n===S?n.apply(e):n))+'">'+M((n=e&&e.label,typeof n===S?n.apply(e):n))+"</label> ",n=r.if.call(e,e&&e.enumValues,{hash:{},inverse:D.program(13,v,t),
fn:D.program(9,p,t),data:t}),(n||0===n)&&(i+=n),i+=" ",n=r.if.call(e,e&&e.summary,{hash:{},inverse:D.noop,fn:D.program(6,u,t),data:t}),(n||0===n)&&(i+=n),i+=" "}function p(e,t){var n,i="";return i+=' <select id="input_'+M((n=e&&e.id,typeof n===S?n.apply(e):n))+M((n=e&&e.idSuffix,typeof n===S?n.apply(e):n))+'" name="'+M((n=e&&e.id,typeof n===S?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="'+M((a=e&&e.value,typeof a===S?a.apply(e):a))+'" ',a=i(n(33)).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+=">"+M((a=e&&e.label,typeof a===S?a.apply(e):a))+"</option> "}function f(e,t){return'selected="selected"'}function v(e,t){var a,o="";return o+=' <input type="',a=i(n(33)).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_'+M((a=e&&e.id,typeof a===S?a.apply(e):a))+M((a=e&&e.idSuffix,typeof a===S?a.apply(e):a))+'" class="form-control" name="'+M((a=e&&e.id,typeof a===S?a.apply(e):a))+'" value="'+M((a=e&&e.value,typeof a===S?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="'+M((n=e&&e.placeholder,typeof n===S?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),o=o||{};var b,I="",S="function",M=this.escapeExpression,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(33)).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){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(4)).call(t,t&&t.label,{hash:{},data:o}))+"</label> ",d=i(n(33)).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){"use strict";function i(){Object(a.b)({CloudServerFlexModel:u.a,ServerFlexModel:d.a,UserFlexModel:p.a});var e=new c.a,t=Object(h.a)(e);return Object(a.b)({appModel:e,appStore:t}),Object(a.b)({companionProxy:new r.a,fullscreenManager:Object(v.a)(),
getDecisionOptions:s.a,mediaComponent:o.a}),Object(l.a)().then(f.a.registerAll)}t.a=i;var r=n(4016),a=n(15),o=n(4017),s=n(4048),l=n(4060),c=n(4101),u=n(4160),d=n(4165),p=n(4179),h=n(4198),f=n(4213),v=n(4228)},function(e,t,n){"use strict";function i(e){e.forEach(function(e){e.resolve()}),e.length=0}function r(e){e.forEach(function(e){e.reject()}),e.length=0}var a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(75),u=n(29),d=n(94),p=n(15),h=n(57),f=n(63),v=n(1409),g=c.a.extend({mixins:[d.a],
name:"MediaServerCompanionProxy",commandID:0,initialize:function(){l.a.bindAll(this,"_checkPollRequestStatus","_pickProxyServer","_poll","_repoll","_sendResponse","_unregisterPlayer","onPollSuccess","onPollError"),this._debounceUnregisterPlayer=l.a.debounce(this._unregisterPlayer,2e3),this._debouncePickProxyServer=l.a.debounce(this._pickProxyServer,2e3),this._deepLinkDeferred=o.a.Deferred().resolve(),this._playerRegistrationDeferreds=[],this._playerUnregistrationDeferreds=[],
this._pollRetryDelay=1e3},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=v.a.writeXml(e),i=l.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",
o.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.appModel=Object(p.c)("appModel"),this.listenTo(this.appModel,"change:companionServer",this._debouncePickProxyServer),this._debouncePickProxyServer(this.appModel,this.appModel.get("companionServer")))},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=o.a.Deferred();return this._playerUnregistrationDeferreds.push(n),n.promise()},registerPlayer:function(e,t){this.cloudServer=e,this.clientID=t;var n=o.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(e,t){this.started&&(this.proxyServer=t,this.proxyServer&&(this._registerServer(),this._poll()))},_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":h.a.get("allowCloudPubSub")?"client,player,pubsub-player":"client,player"},data:{_method:"PUT",proxiedBy:this.proxyServer.id}});o.a.ajax(t).done(function(){i(e._playerRegistrationDeferreds)}).fail(function(){r(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"}})
;o.a.ajax(n).done(function(){i(t._playerUnregistrationDeferreds)}).fail(function(){r(t._playerUnregistrationDeferreds)})}},_poll:function(){if(this.started){var e=this.proxyServer;if(!e)return void u.a.info("[Companion] No proxy server available to long poll");if(this._isPollRequestPending())return void u.a.info("[Companion] Long poll already open to ",e.get("debugName"));this._clearPollRequestStatusCheck(),this._checkPollRequestStatusLater(),this._clearRepollLater()
;var t=e.getXHROptions("/player/proxy/poll",{data:{deviceClass:"pc",protocolVersion:"1",protocolCapabilities:"timeline,playback,navigation,mirror,playqueues",timeout:1}});u.a.info("[Companion] Opening long poll to %s at %s",e.get("debugName"),t.url),this.pollRequest=o.a.ajax(t).done(this.onPollSuccess).fail(this.onPollError)}},_repoll:function(){this._clearPollRequestStatusCheck(),this._clearRepollLater(),this._poll()},_isPollRequestPending:function(){
return!!this.pollRequest&&"pending"===this.pollRequest.state()},_checkPollRequestStatus:function(){this._isPollRequestPending()&&this.proxyServer&&(u.a.info("[Companion] Poll connection successfully opened with %s",this.proxyServer.get("debugName")),this._pollRetryDelay=1e3)},_checkPollRequestStatusLater:function(){this._pollRequestStatusCheckTimeout=setTimeout(this._checkPollRequestStatus,5e3)},_clearPollRequestStatusCheck:function(){
this._pollRequestStatusCheckTimeout=clearTimeout(this._pollRequestStatusCheckTimeout)},_repollLater:function(){this._pollRetryTimeout=setTimeout(this._repoll,this._pollRetryDelay)},_clearRepollLater:function(){this._pollRetryTimeout=clearTimeout(this._pollRetryTimeout)},_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],shuffle:[e.queryShuffle],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}});o.a.ajax(i)}},onPollSuccess:function(e){
var t=this,n=e&&f.a.parseXML(e),i=n&&n.Command;return e?(n?i||u.a.warn("[Companion] Poll succeeded without a Command response",n):u.a.warn("[Companion] Poll succeeded without a parseable response",e),i?(this._repoll(),void(Array.isArray(i)?i:[i]).forEach(function(e){try{u.a.info("[Companion] Received %s from %s",e.path,e.deviceName),t._processCommand(e)}catch(t){u.a.warn("[Companion] encountered %s while processing %s",t.message,e)}},this)):void this.onPollError()):void this._repoll()},
onPollError:function(){var e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.proxyServer);if(this.started&&e){this._clearPollRequestStatusCheck(),this._clearRepollLater(),this._repollLater(),this._pollRetryDelay*=2;var t=e.get("debugName");u.a.warn("[Companion] Poll failed to %s",t)}}});t.a=g},function(e,t,n){"use strict";var i=n(4018),r=n(1410),a=n(4022),o=Object(i.a)(),s={getComponent:function(e){var t="dash"===e.protocol,n="hls"===e.protocol&&!o;return t||n?a.a:r.a}};t.a=s
},function(e,t,n){"use strict";function i(){return Object(r.a)({mimeType:"application/x-mpegURL"})}t.a=i;var r=n(1134)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r});var i=-1,r=-1},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){e.exports={mediaElement:"HTMLMedia-mediaElement-35x77"}},function(e,t,n){"use strict";function i(e){switch(e){case 1:return Object(C.default)("Network");case 2:return Object(C.default)("Text");case 3:return Object(C.default)("Media");case 4:return Object(C.default)("Manifest");case 5:return Object(C.default)("Streaming");case 6:return Object(C.default)("DRM");case 7:return Object(C.default)("Player");case 8:
return Object(C.default)("Cast");case 9:return Object(C.default)("Storage")}}function r(e){return["s"+e.code+" ("+(i(e)||Object(C.default)("Unknown"))+")"].concat(a(e)).filter(function(e){return e}).join(" \u2013 ")}function a(e){var t=e.code,n=e.data;switch(t){case 1001:return["URI: "+n[0],n[1]?"Status code: "+n[1]:null,n[2]?"Response text: "+n[2]:null,n[3]?"Response headers: "+v()(n[3],null,2):null,n[4]?"NetworkingEngine.RequestType: "+n[4]:null];case 3014:return["MediaError code: "+n[0]]
;case 3015:return["DOMException "+n[0].name+": "+n[0].message];case 3016:return["MediaError code: "+n[0],n[1]?"Edge/IE Error code: "+n[1]:null,n[2]?"Chrome error details: "+n[2]:null]}}var o=n(6),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(173),v=n.n(f),g=n(4023),m=n.n(g),y=n(1),b=(n.n(y),n(0)),I=n.n(b),S=n(1416),M=(n.n(S),n(29)),D=n(4045),C=n(3),O=n(4047),P=n(1410);window.muxjs=m.a;var j=1,T=2,w=function(e){function t(n,a){c()(this,t);var o=d()(this,e.call(this,n,a))
;return o.onElementChange=function(e){var t=o.props.Player;o._shaka=new t(e),o._shaka.addEventListener("buffering",o.onBufferingChange),o._shaka.addEventListener("error",o.onError),o._shaka.configure({streaming:{bufferingGoal:o.props.bufferingGoal,jumpLargeGaps:!0,retryParameters:{maxAttempts:1/0}},abr:{defaultBandwidthEstimate:o.props.defaultBandwidthEstimate}}),o._shaka.load(o.props.src,o.props.positionSeconds).then(null,function(e){o._shaka&&o.onError({detail:e})}),o.setState({
isReadyToPlay:!0})},o.onHTMLError=function(){},o.onBufferingChange=function(e){e.buffering},o.onPositionMillisecondsChange=function(e){o.props.onPositionMillisecondsChange(e)},o.onError=function(e){var t=e.detail,n=void 0===t?{}:t,a=n.severity,s=r(n);a===T?(M.a.warn("[Player] A critical Shaka error occurred: "+s+"; the player cannot recover"),o.props.onError&&o.props.onError({code:"s"+n.code,category:i(n.category)
})):a===j?M.a.warn("[Player] A Shaka error occurred: "+s+"; the player will attempt to recover"):M.a.warn("[Player] A Shaka error occurred: "+s+"; the severity is unknown")},Object(D.a)(),o.state={isReadyToPlay:!1},o}return h()(t,e),t.prototype.componentWillUnmount=function(){this._shaka&&(this._shaka.removeEventListener("buffering",this.onBufferingChange),this._shaka.removeEventListener("error",this.onError),this._shaka.destroy(),this._shaka=null)},t.prototype.render=function(){
return I.a.createElement(O.a,s()({},this.props,{healthCheckSecondsFromEnd:this.props.bufferingGoal,mediaComponent:P.a,isReadyToPlay:this.state.isReadyToPlay,onElementChange:this.onElementChange,onPositionMillisecondsChange:this.onPositionMillisecondsChange,onError:this.onHTMLError}))},t}(b.Component);w.defaultProps=s()({},P.a.defaultProps,{bufferingGoal:70,Player:S.Player}),t.a=w},function(e,t,n){"use strict";var i={codecs:n(4024),mp4:n(4026),flv:n(4036),mp2t:n(4041)};i.mp4.tools=n(1415),
i.flv.tools=n(4042),i.mp2t.tools=n(4043),e.exports=i},function(e,t,n){e.exports={adts:n(865),h264:n(866)}},function(e,t,n){"use strict";var i;i=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),o=Math.min(4,t);if(0===o)throw new Error("no bytes available");a.set(e.subarray(r,r+o)),n=new DataView(a.buffer).getUint32(0),i=8*o,t-=o},this.skipBits=function(e){var r
;i>e?(n<<=e,i-=e):(e-=i,r=Math.floor(e/8),e-=8*r,t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),a=n>>>32-r;return i-=r,i>0?n<<=r:t>0&&this.loadWord(),r=e-r,r>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<i;++e)if(0!=(n&2147483648>>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){
this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},e.exports=i},function(e,t,n){e.exports={generator:n(1411),probe:n(867),Transmuxer:n(868).Transmuxer,
AudioSegmentStream:n(868).AudioSegmentStream,VideoSegmentStream:n(868).VideoSegmentStream,CaptionParser:n(4035)}},function(e,t){var n=function(e){return e>>>0};e.exports={toUnsigned:n}},function(e,t){var n=function(e){var t,n,i=[],r=[];for(i.byteLength=0,t=0;t<e.length;t++)n=e[t],"access_unit_delimiter_rbsp"===n.nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.push(i)),i=[n],i.byteLength=n.data.byteLength,i.pts=n.pts,
i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.push(i),r},i=function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)n=e[t],n.keyFrame?(i.length&&(r.push(i),
r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),i=[n],i.nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},r=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),
e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},a=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},o=function(e,t){var n=a();return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},s=function(e,t){var n,i,r,a,s,l=t||0,c=[]
;for(n=0;n<e.length;n++)for(a=e[n],i=0;i<a.length;i++)s=a[i],r=o(s,l),l+=r.size,c.push(r);return c},l=function(e){var t,n,i,r,a,o,s=0,l=e.byteLength,c=e.nalCount,u=l+4*c,d=new Uint8Array(u),p=new DataView(d.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(a=r[n],i=0;i<a.length;i++)o=a[i],p.setUint32(s,o.data.byteLength),s+=4,d.set(o.data,s),s+=o.data.byteLength;return d};e.exports={groupNalsIntoFrames:n,groupFramesIntoGops:i,extendFirstKeyFrame:r,generateSampleTable:s,
concatenateNalData:l}},function(e,t,n){var i=n(4030),r=n(4031),a=function(e){var t,n,i=0;for(t=0;t<e.length;t++)n=e[t],i+=n.data.byteLength;return i},o=function(e,t,n,a){var o,s,l,c=0,u=0,d=0,p=0;if(t.length&&(o=r.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),c=Math.ceil(9e4/(e.samplerate/1024)),n&&a&&(u=o-Math.max(n,a),d=Math.floor(u/c),p=d*c),!(d<1||p>45e3))){for(s=i[e.samplerate],s||(s=t[0].data),l=0;l<d;l++)t.splice(l,0,{data:s})
;e.baseMediaDecodeTime-=Math.floor(r.videoTsToAudioTs(p,e.samplerate))}},s=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},l=function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},c=function(e){var t,n,i=0,r=new Uint8Array(a(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength
;return r};e.exports={prefixWithSilence:o,trimAdtsFramesByEarliestDts:s,generateSampleTable:l,concatenateFrameData:c}},function(e,t){var n=[33,16,5,32,164,27],i=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],r=function(e){for(var t=[];e--;)t.push(0);return t},a={96e3:[n,[227,64],r(154),[56]],88200:[n,[231],r(170),[56]],64e3:[n,[248,192],r(240),[56]],48e3:[n,[255,192],r(268),[55,148,128],r(54),[112]],44100:[n,[255,192],r(268),[55,163,128],r(84),[112]],32e3:[n,[255,192],r(268),[55,234],r(226),[112]],
24e3:[n,[255,192],r(268),[55,255,128],r(268),[111,112],r(126),[224]],16e3:[n,[255,192],r(268),[55,255,128],r(268),[111,255],r(269),[223,108],r(195),[1,192]],12e3:[i,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,253,128],r(259),[56]],11025:[i,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,255,192],r(268),[55,175,128],r(108),[112]],8e3:[i,r(268),[3,121,16],r(47),[7]]};e.exports=function(e){return Object.keys(e).reduce(function(t,n){
return t[n]=new Uint8Array(e[n].reduce(function(e,t){return e.concat(t)},[])),t},{})}(a)},function(e,t){var n,i,r,a,o,s;n=function(e){return 9e4*e},i=function(e,t){return e*t},r=function(e){return e/9e4},a=function(e,t){return e/t},o=function(e,t){return n(a(e,t))},s=function(e,t){return i(r(e),t)},e.exports={secondsToVideoTs:n,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:o,videoTsToAudioTs:s}},function(e,t){var n=function(e,t){
"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),
void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},i=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},r=function(e,t){var n,i,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(i=e.samplerate/9e4,n*=i,n=Math.floor(n)),n};e.exports={clearDtsInfo:i,calculateTrackBaseMediaDecodeTime:r,collectDtsInfo:n}
},function(e,t,n){"use strict";var i,r=n(235),a=n(495),o=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},s=function(e,t,n){return decodeURIComponent(o(e,t,n))},l=function(e,t,n){return unescape(o(e,t,n))},c=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},u={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=s(e.data,1,t),e.value=s(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}
},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=s(e.data,1,t),e.url=s(e.data,t+1,e.data.length);break}},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=l(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};i=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,o=[],s=0;if(i.prototype.init.call(this),this.dispatchType=a.METADATA_STREAM_TYPE.toString(16),
n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,l,d,p;if("timed-metadata"===e.type){if(e.dataAlignmentIndicator&&(s=0,o.length=0),0===o.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))return void(n.debug&&console.log("Skipping unrecognized metadata packet"));if(o.push(e),s+=e.data.byteLength,
1===o.length&&(r=c(e.data.subarray(6,10)),r+=10),!(s<r)){for(t={data:new Uint8Array(r),frames:[],pts:o[0].pts,dts:o[0].dts},d=0;d<r;)t.data.set(o[0].data.subarray(0,r-d),d),d+=o[0].data.byteLength,s-=o[0].data.byteLength,o.shift();i=10,64&t.data[5]&&(i+=4,i+=c(t.data.subarray(10,14)),r-=c(t.data.subarray(16,20)));do{if((a=c(t.data.subarray(i+4,i+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.")
;if(p=String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),l={id:p,data:t.data.subarray(i+10,i+a+10)},l.key=l.id,u[l.id]&&(u[l.id](l),"com.apple.streaming.transportStreamTimestamp"===l.owner)){var h=l.data,f=(1&h[3])<<30|h[4]<<22|h[5]<<14|h[6]<<6|h[7]>>>2;f*=4,f+=3&h[7],l.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=l.timeStamp,t.dts=l.timeStamp),this.trigger("timestamp",l)}t.frames.push(l),i+=10,i+=a}while(i<r);this.trigger("data",t)}}}},i.prototype=new r,e.exports=i
},function(e,t,n){"use strict";var i,r=n(235),a=n(870);i=function(){var e=new Uint8Array,t=0;i.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,o,s,l=0,c=0;for(e.length?(s=e.length,e=new Uint8Array(n.byteLength+s),e.set(e.subarray(0,s)),e.set(n,s)):e=n;e.length-c>=3;)if(e[c]!=="I".charCodeAt(0)||e[c+1]!=="D".charCodeAt(0)||e[c+2]!=="3".charCodeAt(0))if(255!=(255&e[c])||240!=(240&e[c+1]))c++;else{if(e.length-c<7)break;if(l=a.parseAdtsSize(e,c),
c+l>e.length)break;o={type:"audio",data:e.subarray(c,c+l),pts:t,dts:t},this.trigger("data",o),c+=l}else{if(e.length-c<10)break;if(l=a.parseId3TagSize(e,c),c+l>e.length)break;r={type:"timed-metadata",data:e.subarray(c,c+l)},this.trigger("data",r),c+=l}i=e.length-c,e=i>0?e.subarray(c):new Uint8Array}},i.prototype=new r,e.exports=i},function(e,t,n){"use strict";var i=n(1413).discardEmulationPreventionBytes,r=n(1412).CaptionStream,a=n(867),o=n(1415),s=function(e,t){for(var n=e,i=0;i<t.length;i++){
var r=t[i];if(n<r.size)return r;n-=r.size}return null},l=function(e,t,n){var r,a,o,l,c=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(a=0;a+4<e.length;a+=o)if(o=c.getUint32(a),a+=4,!(o<=0))switch(31&e[a]){case 6:var d=e.subarray(a+1,a+1+o),p=s(a,t);r={nalUnitType:"sei_rbsp",size:o,data:d,escapedRBSP:i(d),trackId:n},p?(r.pts=p.pts,r.dts=p.dts,l=p):(r.pts=l.pts,r.dts=l.dts),u.push(r)}return u},c=function(e,t,n){
var i=t,r=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,s=n.trackId,l=[];return e.forEach(function(e){var t=o.parseTrun(e),n=t.samples;n.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=i+e.compositionTimeOffset,i+=e.duration}),l=l.concat(n)}),l},u=function(e,t){var n=a.findBox(e,["moof","traf"]),i=a.findBox(e,["mdat"]),r={},s=[];return i.forEach(function(e,t){
var i=n[t];s.push({mdat:e,traf:i})}),s.forEach(function(e){var n,i,s=e.mdat,u=e.traf,d=a.findBox(u,["tfhd"]),p=o.parseTfhd(d[0]),h=p.trackId,f=a.findBox(u,["tfdt"]),v=f.length>0?o.parseTfdt(f[0]).baseMediaDecodeTime:0,g=a.findBox(u,["trun"]);t===h&&g.length>0&&(n=c(g,v,p),i=l(s,n,h),r[h]||(r[h]=[]),r[h]=r[h].concat(i))}),r},d=function(e,t,n){var i;return t?(i=u(e,t),{seiNals:i[t],timescale:n}):null},p=function(){var e,t,n,i,a,o=!1;this.isInitialized=function(){return o},this.init=function(){
e=new r,o=!0,e.on("data",function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,a.captions.push(e),a.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||i!==t[n])},this.parse=function(e,r,o){var s;if(!this.isInitialized())return null;if(!r||!o)return null;if(this.isNewInit(r,o))n=r[0],i=o[n];else if(!n||!i)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,o)}
return null!==(s=d(e,n,i))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),a):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){a.captions=[],a.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),
this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,a?this.clearParsedCaptions():a={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()};e.exports=p},function(e,t,n){e.exports={tag:n(871),Transmuxer:n(4037),getFlvHeader:n(4040)}},function(e,t,n){"use strict";var i,r,a,o,s,l,c=n(235),u=n(871),d=n(869),p=n(865),h=n(866).H264Stream,f=n(4038),v=n(4039);o=function(e,t){
"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts?e.timelineStartInfo.pts=t.pts:e.timelineStartInfo.pts=Math.min(e.timelineStartInfo.pts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts?e.timelineStartInfo.dts=t.dts:e.timelineStartInfo.dts=Math.min(e.timelineStartInfo.dts,t.dts))},s=function(e,t){var n=new u(u.METADATA_TAG);return n.dts=t,n.pts=t,n.writeMetaDataDouble("videocodecid",7),n.writeMetaDataDouble("width",e.width),n.writeMetaDataDouble("height",e.height),n},
l=function(e,t){var n,i=new u(u.VIDEO_TAG,!0);for(i.dts=t,i.pts=t,i.writeByte(1),i.writeByte(e.profileIdc),i.writeByte(e.profileCompatibility),i.writeByte(e.levelIdc),i.writeByte(255),i.writeByte(225),i.writeShort(e.sps[0].length),i.writeBytes(e.sps[0]),i.writeByte(e.pps.length),n=0;n<e.pps.length;++n)i.writeShort(e.pps[n].length),i.writeBytes(e.pps[n]);return i},a=function(e){var t,n=[],i=[];a.prototype.init.call(this),this.push=function(t){o(e,t),e&&(e.audioobjecttype=t.audioobjecttype,
e.channelcount=t.channelcount,e.samplerate=t.samplerate,e.samplingfrequencyindex=t.samplingfrequencyindex,e.samplesize=t.samplesize,e.extraData=e.audioobjecttype<<11|e.samplingfrequencyindex<<7|e.channelcount<<3),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),n.push(t)},this.flush=function(){var r,a,o,s=new v;if(0===n.length)return void this.trigger("done","AudioSegmentStream");for(o=-1/0;n.length;)r=n.shift(),i.length&&r.pts>=i[0]&&(o=i.shift(),this.writeMetaDataTags(s,o)),
(e.extraData!==t||r.pts-o>=1e3)&&(this.writeMetaDataTags(s,r.pts),t=e.extraData,o=r.pts),a=new u(u.AUDIO_TAG),a.pts=r.pts,a.dts=r.dts,a.writeBytes(r.data),s.push(a.finalize());i.length=0,t=null,this.trigger("data",{track:e,tags:s.list}),this.trigger("done","AudioSegmentStream")},this.writeMetaDataTags=function(t,n){var i;i=new u(u.METADATA_TAG),i.pts=n,i.dts=n,i.writeMetaDataDouble("audiocodecid",10),i.writeMetaDataBoolean("stereo",2===e.channelcount),
i.writeMetaDataDouble("audiosamplerate",e.samplerate),i.writeMetaDataDouble("audiosamplesize",16),t.push(i.finalize()),i=new u(u.AUDIO_TAG,!0),i.pts=n,i.dts=n,i.view.setUint16(i.position,e.extraData),i.position+=2,i.length=Math.max(i.length,i.position),t.push(i.finalize())},this.onVideoKeyFrame=function(e){i.push(e)}},a.prototype=new c,r=function(e){var t,n,i=[];r.prototype.init.call(this),this.finishFrame=function(i,r){if(r){if(t&&e&&e.newMetadata&&(r.keyFrame||0===i.length)){
var a=s(t,r.dts).finalize(),o=l(e,r.dts).finalize();a.metaDataTag=o.metaDataTag=!0,i.push(a),i.push(o),e.newMetadata=!1,this.trigger("keyframe",r.dts)}r.endNalUnit(),i.push(r.finalize()),n=null}},this.push=function(t){o(e,t),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),i.push(t)},this.flush=function(){for(var r,a=new v;i.length&&"access_unit_delimiter_rbsp"!==i[0].nalUnitType;)i.shift();if(0===i.length)return void this.trigger("done","VideoSegmentStream");for(;i.length;)r=i.shift(),
"seq_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,t=r.config,e.width=t.width,e.height=t.height,e.sps=[r.data],e.profileIdc=t.profileIdc,e.levelIdc=t.levelIdc,e.profileCompatibility=t.profileCompatibility,n.endNalUnit()):"pic_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,e.pps=[r.data],n.endNalUnit()):"access_unit_delimiter_rbsp"===r.nalUnitType?(n&&this.finishFrame(a,n),n=new u(u.VIDEO_TAG),n.pts=r.pts,
n.dts=r.dts):("slice_layer_without_partitioning_rbsp_idr"===r.nalUnitType&&(n.keyFrame=!0),n.endNalUnit()),n.startNalUnit(),n.writeBytes(r.data);n&&this.finishFrame(a,n),this.trigger("data",{track:e,tags:a.list}),this.trigger("done","VideoSegmentStream")}},r.prototype=new c,i=function(e){var t,n,o,s,l,c,u,v,g,m,y,b,I=this;i.prototype.init.call(this),e=e||{},this.metadataStream=new d.MetadataStream,e.metadataStream=this.metadataStream,t=new d.TransportPacketStream,n=new d.TransportParseStream,
o=new d.ElementaryStream,s=new d.TimestampRolloverStream("video"),l=new d.TimestampRolloverStream("audio"),c=new d.TimestampRolloverStream("timed-metadata"),u=new p,v=new h,b=new f(e),t.pipe(n).pipe(o),o.pipe(s).pipe(v),o.pipe(l).pipe(u),o.pipe(c).pipe(this.metadataStream).pipe(b),y=new d.CaptionStream,v.pipe(y).pipe(b),o.on("data",function(e){var t,n,i;if("metadata"===e.type){for(t=e.tracks.length;t--;)"video"===e.tracks[t].type?n=e.tracks[t]:"audio"===e.tracks[t].type&&(i=e.tracks[t])
;n&&!g&&(b.numberOfTracks++,g=new r(n),v.pipe(g).pipe(b)),i&&!m&&(b.numberOfTracks++,m=new a(i),u.pipe(m).pipe(b),g&&g.on("keyframe",m.onVideoKeyFrame))}}),this.push=function(e){t.push(e)},this.flush=function(){t.flush()},this.resetCaptions=function(){y.reset()},b.on("data",function(e){I.trigger("data",e)}),b.on("done",function(){I.trigger("done")})},i.prototype=new c,e.exports=i},function(e,t,n){"use strict";var i=n(235),r=function(e){this.numberOfTracks=0,this.metadataStream=e.metadataStream,
this.videoTags=[],this.audioTags=[],this.videoTrack=null,this.audioTrack=null,this.pendingCaptions=[],this.pendingMetadata=[],this.pendingTracks=0,this.processedTracks=0,r.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):("video"===e.track.type&&(this.videoTrack=e.track,this.videoTags=e.tags,this.pendingTracks++),void("audio"===e.track.type&&(this.audioTrack=e.track,this.audioTags=e.tags,this.pendingTracks++)))}}
;r.prototype=new i,r.prototype.flush=function(e){var t,n,i,r,a={tags:{},captions:[],captionStreams:{},metadata:[]};if(this.pendingTracks<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(0===this.pendingTracks&&++this.processedTracks<this.numberOfTracks)return}if(this.processedTracks+=this.pendingTracks,this.pendingTracks=0,!(this.processedTracks<this.numberOfTracks)){
for(this.videoTrack?r=this.videoTrack.timelineStartInfo.pts:this.audioTrack&&(r=this.audioTrack.timelineStartInfo.pts),a.tags.videoTags=this.videoTags,a.tags.audioTags=this.audioTags,i=0;i<this.pendingCaptions.length;i++)n=this.pendingCaptions[i],n.startTime=n.startPts-r,n.startTime/=9e4,n.endTime=n.endPts-r,n.endTime/=9e4,a.captionStreams[n.stream]=!0,a.captions.push(n);for(i=0;i<this.pendingMetadata.length;i++)t=this.pendingMetadata[i],t.cueTime=t.pts-r,t.cueTime/=9e4,a.metadata.push(t)
;a.metadata.dispatchType=this.metadataStream.dispatchType,this.videoTrack=null,this.audioTrack=null,this.videoTags=[],this.audioTags=[],this.pendingCaptions.length=0,this.pendingMetadata.length=0,this.pendingTracks=0,this.processedTracks=0,this.trigger("data",a),this.trigger("done")}},e.exports=r},function(e,t,n){"use strict";var i=function(){var e=this;this.list=[],this.push=function(e){this.list.push({bytes:e.bytes,dts:e.dts,pts:e.pts,keyFrame:e.keyFrame,metaDataTag:e.metaDataTag})},
Object.defineProperty(this,"length",{get:function(){return e.list.length}})};e.exports=i},function(e,t,n){"use strict";var i=n(871),r=function(e,t,n){var r,a,o,s=new Uint8Array(9),l=new DataView(s.buffer);return e=e||0,t=void 0===t||t,n=void 0===n||n,l.setUint8(0,70),l.setUint8(1,76),l.setUint8(2,86),l.setUint8(3,1),l.setUint8(4,(t?4:0)|(n?1:0)),l.setUint32(5,s.byteLength),e<=0?(a=new Uint8Array(s.byteLength+4),a.set(s),a.set([0,0,0,0],s.byteLength),a):(r=new i(i.METADATA_TAG),r.pts=r.dts=0,
r.writeMetaDataDouble("duration",e),o=r.finalize().length,a=new Uint8Array(s.byteLength+o),a.set(s),a.set(l.byteLength,o),a)};e.exports=r},function(e,t,n){e.exports=n(869)},function(e,t,n){"use strict";var i={8:"audio",9:"video",18:"metadata"},r=function(e){return"0x"+("00"+e.toString(16)).slice(-2).toUpperCase()},a=function(e){for(var t,n=[];e.byteLength>0;)t=0,n.push(r(e[t++])),e=e.subarray(t);return n.join(" ")},o=function(e,t){
var n=["AVC Sequence Header","AVC NALU","AVC End-of-Sequence"],i=e[1]&parseInt("01111111",2)<<16|e[2]<<8|e[3];return t=t||{},t.avcPacketType=n[e[0]],t.CompositionTime=e[1]&parseInt("10000000",2)?-i:i,1===e[0]?t.nalUnitTypeRaw=a(e.subarray(4,100)):t.data=a(e.subarray(4)),t},s=function(e,t){
var n=["Unknown","Keyframe (for AVC, a seekable frame)","Inter frame (for AVC, a nonseekable frame)","Disposable inter frame (H.263 only)","Generated keyframe (reserved for server use only)","Video info/command frame"],i=e[0]&parseInt("00001111",2);return t=t||{},t.frameType=n[(e[0]&parseInt("11110000",2))>>>4],t.codecID=i,7===i?o(e.subarray(1),t):t},l=function(e,t){var n=["AAC Sequence Header","AAC Raw"];return t=t||{},t.aacPacketType=n[e[0]],t.data=a(e.subarray(1)),t},c=function(e,t){
var n=["Linear PCM, platform endian","ADPCM","MP3","Linear PCM, little endian","Nellymoser 16-kHz mono","Nellymoser 8-kHz mono","Nellymoser","G.711 A-law logarithmic PCM","G.711 mu-law logarithmic PCM","reserved","AAC","Speex","MP3 8-Khz","Device-specific sound"],i=["5.5-kHz","11-kHz","22-kHz","44-kHz"],r=(e[0]&parseInt("11110000",2))>>>4;return t=t||{},t.soundFormat=n[r],t.soundRate=i[(e[0]&parseInt("00001100",2))>>>2],t.soundSize=(e[0]&parseInt("00000010",2))>>>1?"16-bit":"8-bit",
t.soundType=e[0]&parseInt("00000001",2)?"Stereo":"Mono",10===r?l(e.subarray(1),t):t},u=function(e){return{tagType:i[e[0]],dataSize:e[1]<<16|e[2]<<8|e[3],timestamp:e[7]<<24|e[4]<<16|e[5]<<8|e[6],streamID:e[8]<<16|e[9]<<8|e[10]}},d=function(e){var t=u(e);switch(e[0]){case 8:c(e.subarray(11),t);break;case 9:s(e.subarray(11),t)}return t},p=function(e){var t,n,i=9,r=[];for(i+=4;i<e.byteLength;)t=e[i+1]<<16,t|=e[i+2]<<8,t|=e[i+3],t+=11,n=e.subarray(i,i+t),r.push(d(n)),i+=t+4;return r},h=function(e){
return JSON.stringify(e,null,2)};e.exports={inspectTag:d,inspect:p,textify:h}},function(e,t,n){"use strict";var i=n(495),r=n(1414).handleRollover,a={};a.ts=n(4044),a.aac=n(870);var o=function(e,t){for(var n,i=0,r=188;r<e.byteLength;)if(71!==e[i]||71!==e[r])i++,r++;else{switch(n=e.subarray(i,r),a.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=a.ts.parsePat(n));break;case"pmt":t.table||(t.table=a.ts.parsePmt(n))}if(t.pid&&t.table)return;i+=188,r+=188}},s=function(e,t,n){
for(var i,r,o,s,l=0,c=188,u=!1;c<=e.byteLength;)if(71!==e[l]||71!==e[c]&&c!==e.byteLength)l++,c++;else{switch(i=e.subarray(l,c),a.ts.parseType(i,t.pid)){case"pes":r=a.ts.parsePesType(i,t.table),o=a.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&o&&(s=a.ts.parsePesTime(i))&&(s.type="audio",n.audio.push(s),u=!0)}if(u)break;l+=188,c+=188}for(c=e.byteLength,l=c-188,u=!1;l>=0;)if(71!==e[l]||71!==e[c]&&c!==e.byteLength)l--,c--;else{switch(i=e.subarray(l,c),a.ts.parseType(i,t.pid)){case"pes":
r=a.ts.parsePesType(i,t.table),o=a.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&o&&(s=a.ts.parsePesTime(i))&&(s.type="audio",n.audio.push(s),u=!0)}if(u)break;l-=188,c-=188}},l=function(e,t,n){for(var i,r,o,s,l,c,u,d=0,p=188,h=!1,f={data:[],size:0};p<e.byteLength;)if(71!==e[d]||71!==e[p])d++,p++;else{switch(i=e.subarray(d,p),a.ts.parseType(i,t.pid)){case"pes":if(r=a.ts.parsePesType(i,t.table),o=a.ts.parsePayloadUnitStartIndicator(i),
"video"===r&&(o&&!h&&(s=a.ts.parsePesTime(i))&&(s.type="video",n.video.push(s),h=!0),!n.firstKeyFrame)){if(o&&0!==f.size){for(l=new Uint8Array(f.size),c=0;f.data.length;)u=f.data.shift(),l.set(u,c),c+=u.byteLength;a.ts.videoPacketContainsKeyFrame(l)&&(n.firstKeyFrame=a.ts.parsePesTime(l),n.firstKeyFrame.type="video"),f.size=0}f.data.push(i),f.size+=i.byteLength}}if(h&&n.firstKeyFrame)break;d+=188,p+=188}for(p=e.byteLength,d=p-188,h=!1;d>=0;)if(71!==e[d]||71!==e[p])d--,p--;else{
switch(i=e.subarray(d,p),a.ts.parseType(i,t.pid)){case"pes":r=a.ts.parsePesType(i,t.table),o=a.ts.parsePayloadUnitStartIndicator(i),"video"===r&&o&&(s=a.ts.parsePesTime(i))&&(s.type="video",n.video.push(s),h=!0)}if(h)break;d-=188,p-=188}},c=function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach(function(e){e.dts=r(e.dts,n),e.pts=r(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}if(e.video&&e.video.length){var i=t;if(void 0===i&&(i=e.video[0].dts),
e.video.forEach(function(e){e.dts=r(e.dts,i),e.pts=r(e.pts,i),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=r(a.dts,i),a.pts=r(a.pts,i),a.dtsTime=a.dts/9e4,a.ptsTime=a.dts/9e4}}},u=function(e){for(var t,n=!1,i=0,r=null,o=null,s=0,l=0;e.length-l>=3;){switch(a.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((s=a.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===o&&(t=e.subarray(l,l+s),o=a.aac.parseAacTimestamp(t)),l+=s;break
;case"audio":if(e.length-l<7){n=!0;break}if((s=a.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===r&&(t=e.subarray(l,l+s),r=a.aac.parseSampleRate(t)),i++,l+=s;break;default:l++}if(n)return null}if(null===r||null===o)return null;var c=9e4/r;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*i*c,pts:o+1024*i*c}]}},d=function(e){var t={pid:null,table:null},n={};o(e,t);for(var r in t.table)if(t.table.hasOwnProperty(r)){var a=t.table[r];switch(a){case i.H264_STREAM_TYPE:n.video=[],
l(e,t,n),0===n.video.length&&delete n.video;break;case i.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n},p=function(e,t){var n,i=a.aac.isLikelyAacData(e);return(n=i?u(e):d(e))&&(n.audio||n.video)?(c(n,t),n):null};e.exports={inspect:p,parseAudioPes_:s}},function(e,t,n){"use strict";var i=n(495),r=function(e){var t=31&e[1];return t<<=8,t|=e[2]},a=function(e){return!!(64&e[1])},o=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e,t){var n=r(e)
;return 0===n?"pat":n===t?"pmt":t?"pes":null},l=function(e){var t=a(e),n=4+o(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},c=function(e){var t={},n=a(e),i=4+o(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r,s,l;r=(15&e[i+1])<<8|e[i+2],s=3+r-4,l=(15&e[i+10])<<8|e[i+11];for(var c=12+l;c<s;){var u=i+c;t[(31&e[u+1])<<8|e[u+2]]=e[u],c+=5+((15&e[u+3])<<8|e[u+4])}return t}},u=function(e,t){switch(t[r(e)]){case i.H264_STREAM_TYPE:return"video";case i.ADTS_STREAM_TYPE:return"audio";case i.METADATA_STREAM_TYPE:
return"timed-metadata";default:return null}},d=function(e){if(!a(e))return null;var t=4+o(e);if(t>=e.byteLength)return null;var n,i=null;return n=e[t+7],192&n&&(i={},i.pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},p=function(e){switch(e){case 5:
return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},h=function(e){for(var t,n=4+o(e),i=e.subarray(n),r=0,a=0,s=!1;a<i.byteLength-3;a++)if(1===i[a+2]){r=a+5;break}for(;r<i.byteLength;)switch(i[r]){case 0:if(0!==i[r-1]){r+=2;break}if(0!==i[r-2]){r++;break}a+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===(t=p(31&i[a+3]))&&(s=!0)
;do{r++}while(1!==i[r]&&r<i.length);a=r-2,r+=3;break;case 1:if(0!==i[r-1]||0!==i[r-2]){r+=3;break}t=p(31&i[a+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(s=!0),a=r-2,r+=3;break;default:r+=3}return i=i.subarray(a),r-=a,a=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===(t=p(31&i[a+3]))&&(s=!0),s};e.exports={parseType:s,parsePat:l,parsePmt:c,parsePayloadUnitStartIndicator:a,parsePesType:u,parsePesTime:d,videoPacketContainsKeyFrame:h}},function(e,t,n){"use strict"
;var i=n(1416),r=(n.n(i),n(4046));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(12),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(29),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 h.a.createElement(t,n)},t}(p.Component);t.a=v
},function(e,t,n){"use strict";function i(){var e=[];return S&&e.push("add-transcode-target(type=musicProfile&context=streaming&protocol=dash&container=mp4&audioCodec=aac,mp3)"),M&&e.push("add-transcode-target(type=musicProfile&context=streaming&protocol=hls&container=mpegts&audioCodec=aac,mp3)"),{type:d.a.types.MUSIC,profile:c.a.prop("music"),allowDirectPlay:!0,hasNativeHLS:M(),hasDASH:S,transcoder:v.a,transcodeProtocol:"dash",transcoderOptions:{directStreamAudio:1,mediaBufferSize:b},
profileExtra:e.length?e.join("+"):null}}function r(e,t,n){var i=Object(l.c)("appModel"),r=i.get("experienceSettings"),a={hasNativeHLS:M(),hasDASH:S,hasStreamingMKV:!1,subtitlesBurnLevel:r.get("subtitlesBurnLevel"),transcoder:v.a,transcodeProtocol:"dash",profileExtra:function(e){var t=Object(f.a)(e),n=e.finalProfile.directStream.video.codecs.hevc;if("hevc"===e.media.videoCodec&&n){var i=n.maxBitDepth;t.push(Object(u.a)({protocol:e.protocol,maxBitDepth:i,supportsHDR:!0}))}
var r=s()(e.finalProfile.directStream.audio.codecs);return"dash"===e.protocol&&(r=r.filter(function(e){return!1===/^e?ac3$/.test(e)})),t.push(Object(h.a)({protocol:e.protocol,audioCodec:r.join(",")})),t.join("+")}},o={subtitleSize:r.get("subtitleSize"),mediaBufferSize:I};return Object(y.a)(e,t,a,o,n)}function a(e,t,n){var a=m.q(e.get("type"));return a&&a.mediaType===g.a?i():r(e,t,n)}
var o=n(53),s=n.n(o),l=n(15),c=n(465),u=n(4049),d=n(320),p=n(4050),h=n(4051),f=n(4052),v=n(955),g=n(58),m=n(26),y=n(4057),b=12288,I=102400,S=Object(p.a)(),M=function(){return S&&!!window.muxjs};t.a=a},function(e,t,n){"use strict";function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxBitDepth,n=void 0===t?8:t,i=e.protocol,r=e.supportsHDR,a=void 0!==r&&r,o=e.supportsDolbyVision,s=void 0!==o&&o,l=["bt709","bt470m","bt470bg","smpte170m","smpte240m"]
;return n>=10&&l.push("bt2020-10"),n>=12&&l.push("bt2020-12"),n>=10&&(a||s)&&l.push("smpte2084"),"add-limitation(scope=videoTranscodeTarget&scopeName=hevc&scopeType=videoCodec&context=streaming&protocol="+i+"&type=match&name=video.colorTrc&list="+l.join("|")+"&isRequired=false)"}t.a=i},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){
var t=e.type,n=void 0===t?"videoProfile":t,i=e.context,r=void 0===i?"streaming":i,o=e.videoCodec,c=e.audioCodec,u=e.subtitleCodec,d=s()(e,["type","context","videoCodec","audioCodec","subtitleCodec"]),p={type:n,context:r};return o&&(p.videoCodec=Array.isArray(o)?o.join(","):o),c&&(p.audioCodec=Array.isArray(c)?c.join(","):c),u&&(p.subtitleCodec=Array.isArray(u)?u.join(","):u),a()(p,d),"append-transcode-target-codec("+l.stringifyParams(p)+")"}t.a=i;var r=n(297),a=n.n(r),o=n(12),s=n.n(o),l=n(19)
},function(e,t,n){"use strict";function i(e,t){return u.a.pick(e,function(e,n){return 0===n.indexOf(t)})}function r(e,t){return!m[e]||m[e]<t}function a(e,t,n,r){var a=l()({},i(e,r),i(t,r));return u.a.map(a,function(e,i){return{codec:u.a.has(t,i)?n:null,name:Object(p.a)(i.slice(r.length)),value:e}})}function o(e){var t=e.finalProfile.directStream.video,n=Object(d.a)(e.media),i=n&&n.codec,o=t.codecs&&t.codecs[i],s=a(t,o,i,"min"),l=a(t,o,i,"max");if(!n)return[];var c={width:n.width<=m.width,
height:n.height<=m.height,bitDepth:n.bitDepth<=m.bitDepth,frameRate:n.frameRate<=m.frameRate};l=l.filter(function(e){return!0!==c[e.name]&&!0!==g[e.name]&&r(e.name,e.value)});var u=[].concat(s.map(function(e){var t=e.codec,n=e.name,i=e.value;return Object(f.a)({codec:t,name:n,value:i})}),l.map(function(e){var t=e.codec,n=e.name,i=e.value;return Object(v.a)({codec:t,name:n,value:i})}));return o&&"h264"!==i&&u.push(Object(h.a)({protocol:e.protocol,codec:i})),u}
var s=n(6),l=n.n(s),c=n(7),u=n.n(c),d=n(309),p=n(4053),h=n(4054),f=n(4055),v=n(4056),g={videoResolution:!0},m={width:1920,height:1080,bitDepth:8,frameRate:30};t.a=o},function(e,t,n){"use strict";function i(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.protocol,n=e.codec;return"append-transcode-target-codec(type=videoProfile&context=streaming&protocol="+encodeURIComponent(t)+"&videoCodec="+encodeURIComponent(n)+")"}t.a=i;n(36)
},function(e,t,n){"use strict";function i(e){var t=e.codec,n=e.name,i=e.value;return"add-limitation(scope=videoCodec&scopeName="+encodeURIComponent(t||"*")+"&type=lowerBound&name=video."+encodeURIComponent(n)+"&value="+encodeURIComponent(i)+"&replace=true)"}t.a=i},function(e,t,n){"use strict";function i(e){var t=e.codec,n=e.name,i=e.value
;return"add-limitation(scope=videoCodec&scopeName="+encodeURIComponent(t||"*")+"&type=upperBound&name=video."+encodeURIComponent(n)+"&value="+encodeURIComponent(i)+"&replace=true)"}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")){var i=t.defaults().localQuality;return h.a.getQualityByIndex(i)}var r=Object(u.a)(e,n),a=t.get(r);return h.a.getQualityByIndex(a)}function r(e,t,n){
var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=arguments[4],p=Object(l.c)("appModel"),v=p.get("experienceSettings"),g=p.get("settings"),m=c.a.prop("video"),y=a(p,e),b=Object(d.a)({profile:m,metadataItem:e,qualityIndex:t,mediaItem:u,canPlayAdaptiveBitrate:y,settings:v
}),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,v));var P=void 0;return I!==h.a.ORIGINAL&&(P=r(e,h.a.ORIGINAL,n,o,u)),s()({type:f.a.types.VIDEO,profile:m,allowDirectPlay:M,allowDirectStreamVideoWithSoftSubtitles:!0,subtitlesBurnLevel:v.get("subtitlesBurnLevel"),
availableQualities:b.availableQualities,qualityIndex:I,quality:O,transcoderOptions:s()({addDebugOverlay:v.get("debugVideoQualityOverlay")?1:0,autoAdjustQuality:C||S?1:0,directStream:D,directStreamAudio:D,audioBoost:g.get("audioBoost")},o),originalQualityDecisionOptions:P},n)}function a(e,t){return!(!Object(v.a)()||!t.server.get("hasAdaptiveBitrate")||e.get("remotePlayer"))}var o=n(6),s=n.n(o),l=n(15),c=n(465),u=n(519),d=n(4058),p=n(681),h=n(141),f=n(320),v=n(821);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(141),a=n(4059)},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=d.a.ORIGINAL)
;var y=Object(u.a)(i,v),b=Object(c.a)(i,v),I=d.a.getQualityByIndex(l.get(b));if(y){var S=l.get("useHomeStreamingRecommendedSettings")?m:I.index,M=d.a.getQualityByIndex(S),D=d.a.isExplicitQuality(M.index)&&a(M.bitrate,h);return M.index===d.a.ORIGINAL||D?d.a.ORIGINAL:g?d.a.CONVERT_AUTOMATICALLY:r(M,p)}var C=a(f,h),O=I.index===d.a.ORIGINAL,P=a(I.bitrate,h);return l.get("remoteSmallVideoAtOriginalQuality")&&C&&(O||P)?d.a.ORIGINAL:g?d.a.CONVERT_AUTOMATICALLY:O&&C?d.a.ORIGINAL:r(I,p)}function r(e,t){
return 0===t.length?d.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(7),l=n.n(s),c=n(519),u=n(681),d=n(141)},function(e,t,n){"use strict";function i(){var e=Object(o.c)("appModel"),t=Object(o.c)("appStore");return Object(o.b)({sessionStats:new y.a,metricsReporter:[Object(s.a)(),c.a],logs:new b.a([],{parent:e}),
testServerConnection:u.a}),Object(o.b)({companionServerManager:new d.a({appModel:e}),keyboardShortcuts:Object(M.a)(),localCompanionTimelineManager:Object(m.a)(e,t,{companionPlayerProfile:D.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:S.a,manualServerManager:new p.a({appModel:e}),mediaServerEventConnection:w.a,metrics:[new h.a({
isPlaybackActive:I.a}),l.a],primaryServerManager:new C.a({appModel:e}),providerManager:new f.a({appModel:e}),remoteCastPlayerManager:Object(j.a)(e,t),remotePlexPlayerManager:Object(T.a)(e,t),serverConnectionManager:new v.a({appModel:e}),serverConnectionTestManager:new g.a({appModel:e}),serverManager:new O.a({appModel:e}),serverUpdateManager:new P.b({appModel:e})}),a.a.Deferred().resolve().promise()}t.a=i
;var r=n(13),a=n.n(r),o=n(15),s=n(4061),l=n(4063),c=n(4064),u=n(4065),d=n(4066),p=n(4067),h=n(4069),f=n(4072),v=n(4073),g=n(4075),m=n(4076),y=n(4078),b=n(4079),I=n(4082),S=n(4083),M=n(4084),D=n(4085),C=n(4087),O=n(4091),P=n(1423),j=n(4095),T=n(4097),w=n(4098)},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(173),a=n.n(r),o=n(36),s=n(19),l=n(4062);n(334)},function(e,t,n){"use strict";var i=n(13),r=n.n(i),a=n(75),o=n(94),s=a.a.extend({mixins:[o.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";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(e){return 401===e.status||403===e.status||406===e.status}function r(e){var t=e.server,n=e.connection;return!M.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),u(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 insecure connections are preferred",i,e),u(e,t)}function s(e,t){var n=t.server,i=n.get("debugName");return b.a.warn("[Connections] Aborting connection test for %s at %s because location does not match",i,e),u(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 mixed content prevention",i,e),u(e,t)}function c(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),u(e,t)}function u(e,t){var n=t.connection,i=v.a.Deferred();return m.a.defer(function(){n.set({currentTest:null,testState:C.e}),i.reject(n)}),i.promise()}function d(e){
e.forEach(function(e){e.url="fail"+e.url})}function p(e,t){function n(t){Object(b.a)("[Connections] %s connected at %s",l,e),o.set({currentTest:null,testState:C.b,serverAttrs:t}),s.resolve(o)}function r(t){var n={currentTest:null};if(t.some(function(e){return e.aborting}))Object(b.a)("[Connections] Aborted pending connection test for %s at %s",l,e),n.testState=C.a;else{var r=t.some(i),a=r?C.d:C.e;t.forEach(function(t){b.a.warn("[Connections] %s is %s at %s (Status %s)",l,a,e,t.status)}),
n.testState=a}o.set(n),s.reject(o,t)}var a=t.server,o=t.connection,s=v.a.Deferred(),l=a.get("debugName"),c=Object(O.a)(a);Object(b.a)("[Connections] Testing connection for %s at %s",l,e);var u=[],p={dataType:"text",headers:{Accept:c.accept},timeout:a.connectionTestTimeout};u.push(a.getXHROptions(e,p));var h=!Object(j.a)(a);if(null==t.url&&h){var f=a.resolveUrl("/",{connection:o});Object(b.a)("[Connections] Testing legacy connection for %s at %s",l,f),u.push(a.getXHROptions(f,p))}
var g=M.a.get("emulateBrokenHTTPS");if(g){var m=o.get("isHttps")&&!a.get("isCloudBased"),y="private"!==g||o.get("isPrivate");m&&y&&d(u)}var S=u.map(function(e){return v.a.ajax(e)}),D=I.a.apply(void 0,S);return o.set({currentTest:S,testState:C.c}),D.done(function(t,i){var o=S[0],s=S[1];if(200!==o.status&&404!==o.status||s&&200!==s.status)return void r(S);if(a.get("isCloud"))return void n()
;var u=c.parse(o.responseText),d=s?c.parse(s.responseText):void 0,p=a.parseResponse(v.a.extend(!0,{},u,d)),h=p.machineIdentifier,f=a.get("isTransient")?a.get("originalMachineIdentifier"):a.get("machineIdentifier");if(!h||f&&h!==f)b.a.warn("[Connections] %s has an unexpected machine identifier at %s",l,e),r(S);else{!0===p.mediaProviders?p.mediaProviders=1:!1===p.mediaProviders?p.mediaProviders=0:s||(p.mediaProviders=1);var g=a.parse(p)
;a.get("isTransient")&&(g.machineIdentifier=a.get("machineIdentifier")),g.isInstallingServerUpdate=!1,g.isProvidersPending=!1,g.isProvidersPopulated=!0,Object(P.a)(g.providers,a),n(g)}}),s.promise()}function h(e){var t=e.server,n=e.connection,i=t.resolveUrl(e.url||"/media/providers",{connection:n}),u=Object(S.c)("appModel"),d=u.get("settings");if(!M.a.get("allowHttpsMediaServerConnections")&&n.get("isHttps")&&!t.get("isCloudBased"))return a(i,e);var h=d.get("preferInsecureConnections")
;return t.get("httpsRequired")||t.get("isCloud")||!n.get("isHttps")||h!==D.a?!t.get("httpsRequired")&&n.get("isHttps")&&h===D.c&&n.get("isPrivate")&&t.get("publicAddressMatches")?o(i,e):M.a.get("allowMixedContent")||!y.a.isHostedHttps||n.get("isHttps")?r(e)?s(i,e):t.get("isCloud")||n.get("relay")||!d.get("rejectDirectConnections")&&!M.a.get("rejectDirectConnections")?p(i,e):c(i,e):l(i,e):a(i,e)}t.a=h
;var f=n(13),v=n.n(f),g=n(7),m=n.n(g),y=n(90),b=n(29),I=n(305),S=n(15),M=n(57),D=n(1417),C=n(913),O=n(97),P=n(936),j=n(1057)},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"))}function a(e){return!(!i(e)||!r(e.get("activeConnection")))}function o(e){return!(!a(e)||e.get("isShared"))}
var s=n(7),l=n.n(s),c=n(75),u=n(29),d=n(94),p=n(15),h=n(203),f=c.a.extend({mixins:[d.a],name:"CompanionServerManager",initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers"),this._throttlePickCompanionServer=l.a.throttle(this._pickCompanionServer,2e3)},start:function(e){this.stop(),this.listenTo(this.servers,"change:connected change:activeConnection update",this._throttlePickCompanionServer),this.started=!0,this._pickCompanionServer()},stop:function(){
this.stopListening(),this.started=!1},_pickCompanionServer:function(){this.started&&(this.companionServer&&a(this.companionServer)&&this.servers.contains(this.companionServer)||(this.companionServer=this.servers.find(o)||this.servers.find(a),this.companionServer?(Object(p.c)("appStore").dispatch(Object(h.e)({serverEntityID:this.companionServer.entityID()})),u.a.info("[Companion] Found companion",this.companionServer.get("debugName"))):(Object(p.c)("appStore").dispatch(Object(h.i)()),
u.a.warn("[Companion] No companion found"))))}});t.a=f},function(e,t,n){"use strict";var i=n(53),r=n.n(i),a=n(75),o=n(18),s=n(94),l=n(108),c=n(4068),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(1418),r=i.a.extend({storageKey:"manualServers",defaults:{port1:"32400",port2:"32400"}});t.a=new r},function(e,t,n){"use strict"
;var i=n(6),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(75),u=(n(36),n(29),n(94)),d=n(159),p=n(15),h=n(57),f=n(4070),v=n(506),g=n(1133),m=n(995),y=n(4071),b=n(195),I=c.a.extend({mixins:u.a,initialize:function(e){this.privacySettings=null,this.defaults={},this._pendingPrivacyRequest=null,this._pendingEvents=[],this.debouncedFetchPrivacySettings=l.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(p.c)("appModel").get("user");if(!t.server.get("isConnected"))return o.a.Deferred().reject().promise();var n=t.server.getXHROptions("/api/v2/user/privacy",{dataType:"json"});return this._pendingPrivacyRequest=o.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(p.c)("metricsReporter").setBaseUrl(e.baseUrl)}},incrementPlaybackCount:function(){var e="playbackCount",t=Object(p.c)("sessionStats");t.save(e,t.get(e)+1)},
addPlaybackTime:function(e){var t="playbackTime",n=Object(p.c)("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=v.a.measure(Object(f.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(p.c)("sessionStats"),i=n.get("sessionId"),a=n.get("anonymousSessionId"),s={},l=Object(p.c)("appModel"),c=Object(b.n)(l.get("activeNavigationType"));if(c&&!e.mode&&(s.mode=c.metricsMode),!this.privacySettings)return void this._pendingEvents.push(r()({eventDefaults:s},e,{sessionIdentifier:i,anonymousSessionIdentifier:a}));var u=o.a.extend(!0,s,this.defaults,e);u.sessionIdentifier||(u.sessionIdentifier=i),u.anonymousSessionIdentifier||(u.anonymousSessionIdentifier=a);var d=Date.now()
;if(!("client:shutdown"===e.event||"client:start"===e.event)){var h=n.get("lastInteractionTime"),f=n.get("lastPlayingHeartbeatTime");if(d-Math.max(h,f)>18e5)return void this.flushSession().then(function(){t.trackEvent(e)})}var v=this.privacySettings.metrics,g=v[u.event];if(g)if("off"===g);else{u.interaction&&Object(m.a)(),"anonymous"===g&&(delete u.userId,u.deviceIdentifier=Object(p.c)("appModel").get("anonymousClientID"),u.sessionIdentifier=u.anonymousSessionIdentifier),
delete u.anonymousSessionIdentifier;var y=Object(p.c)("metricsReporter");y.trackEvent(u)}}},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(p.c)("appModel").get("user");return this.flushSession().then(function(){return Object(d.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)}),o.a.Deferred().resolve().promise()},flushSession:function(){var e=this,t=Object(p.c)("sessionStats"),n=t.populate().then(function(){e.stopSession(),e.startSession()},function(){e.startSession()});return Object(d.a)(n)},startSession:function(){var e=this,t=Date.now(),n=Object(p.c)("sessionStats");if(!this.interval){var i=h.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(y.a)(),anonymousSessionId:Object(y.a)(),startTime:t,lastInteractionTime:t,heartbeatTime:t,lastPlayingHeartbeatTime:null,playbackCount:0,playbackTime:0});var r=v.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(p.c)("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(g.a)(i)}})},toJSON:function(){return r()({},this.defaults)},onCloudServerChange:function(e,t){t?this.fetchPrivacySettings():this.privacySettings=null},onUserIDChange:function(){this.debouncedFetchPrivacySettings()}});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";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";var i=n(75),r=n(94),a=n(15),o=n(265),s=n(204),l=i.a.extend({mixins:[r.a],initialize:function(e){this.appModel=e.appModel},
start:function(){var e;this.stop();var t=this.appModel.get("cloudServer"),n=this.appModel.get("user").get("desktop");this.populateCloudProviders(n.get("providers")),t.get("isPending")?this.wait():this.stopWaiting(t),this.listenTo(this.appModel,(e={"change:cloudServer.change:isResolved":this.onCloudServerStatusChange,"change:cloudServer.change:isRejected":this.onCloudServerStatusChange},e["change:user.change:desktop.change:providers.add"]=this.onProviderAdd,e))},stop:function(){
this._attemptPopulateAllProvidersTimer&&clearTimeout(this._attemptPopulateAllProvidersTimer),this.stopListening()},populateCloudProviders:function(e){var t=this;e.each(function(e){t.populateCloudProvider(e)})},populateCloudProvider:function(e){e.get("isPopulated")||Object(a.c)("appStore").dispatch(Object(o.d)({providerEntityID:e.entityID(),options:{merge:!0}}))},wait:function(){Object(a.c)("appStore").dispatch(Object(s.t)())},stopWaiting:function(e){var t=Object(a.c)("appStore")
;this._attemptPopulateAllProvidersTimer&&clearTimeout(this._attemptPopulateAllProvidersTimer),e.get("isConnected")?this._attemptPopulateAllProvidersTimer=setTimeout(function(){t.dispatch(Object(s.q)())},3e3):t.dispatch(Object(s.q)())},onCloudServerStatusChange:function(e){var t=this;this._stopWaitingTimeout&&clearTimeout(this._stopWaitingTimeout),this._stopWaitingTimeout=setTimeout(function(){return t.stopWaiting(e)},0)},onProviderAdd:function(e){this.populateCloudProvider(e)}});t.a=l
},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(75),u=n(18),d=n(29),p=n(94),h=n(909),f=n(4074),v=n(108),g=n(174),m=c.a.extend({mixins:[p.a],browserConnectionChangeDelay:2e3,initialize:function(e){l.a.bindAll(this,"onBrowserConnectionChange"),this.appModel=e.appModel,this.servers=this.appModel.get("servers"),this.settings=this.appModel.get("settings");var t={callback:this.retryServerConnections.bind(this),
logFormat:"[Connections] Retrying connection tests for %s in %s seconds"};this._cloudServerRetryManager=new h.a(t),this._primaryServerRetryManager=new f.a(r()({},t,{appModel:this.appModel}))},start:function(){this.stop();var e=o()(window);e.on("online",this.onBrowserConnectionChange),e.on("offline",this.onBrowserConnectionChange),this.listenTo(u.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.listenTo(this.settings,"sync",this.onSettingsSave),this.servers.invoke("testOnlyUntestedConnections")},stop:function(){this.stopListening(),this._cloudServerRetryManager.stopAll(),this._primaryServerRetryManager.stopAll();var e=o()(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=g.a.getActiveServers()
;if(Object(d.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),g.a.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;Object(d.a)("[Connections] Browser online status changed to",window.navigator.onLine),clearTimeout(this.browserConnectionChangeTimeout),this.browserConnectionChangeTimeout=setTimeout(function(){
t.servers.invoke("testAllConnections")},this.browserConnectionChangeDelay)},onTestAllServers:function(){this.servers.invoke("testAllConnections")},onTestServer:function(e){e.testAllConnections()},onServerAdd:function(e){e.testOnlyUntestedConnections()},onServerRemove:function(e){var t=g.a.getActiveServers(),n=void 0;if(e.abortAllConnectionTests(),this._stopFailedServerRetries(e),t)if(e.get("isMerged")){var i=e.previous("machineIdentifier");i&&(n=t.get(i))&&(n.set("machineIdentifier",e.id),
g.a.debouncedSave())}else(n=t.get(e.id))&&(t.remove(e.id),g.a.debouncedSave())},onServersReset:function(e,t){var n=this,i=t.previousModels;l.a.each(i,function(t){e.contains(t)||(t.abortAllConnectionTests(),n._stopFailedServerRetries(t))})},onServerConnectionError:function(e){if(d.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(d.a)("[Connections] Added connection %s for %s",e.id,t.get("debugName")),e.get("relay")?t.get("connections").hasFailedEveryDirectConnection()&&t.testAllConnections():t.testConnection(e)},onServerConnectionRemove:function(e){this._removeConnection(e)},onServerConnectionsReset:function(e,t){var n=this,i=t.previousModels;l.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,o=g.a.getActiveServers();if(n.id&&!n.get("isCloud")&&a&&o){var s=o.get(n.id);if(s)s.copyFromServer(n);else{var c=l.a.omit(n.toJSON(),"connections");s=o.add(c,{merge:!0,parse:!0})}s.get("connections").add(e.toJSON(),{merge:!0,parse:!0}),g.a.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,i=g.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()),g.a.debouncedSave()}}},onServerAccessTokenChange:function(e,t){if(!e.get("isCloud")){Object(d.a)("[Connections] Access token for %s changed to %s",e.get("debugName"),t);var n=g.a.getActiveServers(),i=n&&n.get(e.id);i&&(i.set("accessToken",t),g.a.debouncedSave()),e.get("isUnauthorized")&&e.set("connectionTestResult",v.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()},onSettingsSave:function(e){e.changed.hasOwnProperty("preferInsecureConnections")&&this.servers.invoke("testAllConnections")}});t.a=m},function(e,t,n){"use strict";var i=n(94),r=n(651),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(13),a=n.n(r),o=n(7),s=n.n(o),l=n(75),c=n(29),u=n(15),d=n(57),p=n(236),h=l.a.extend({initialize:function(e){this.appModel=e.appModel,this.queued=[],this.executing=[],this.maximumConcurrent=d.a.get("maximumConcurrentConnectionTests"),this.throttledStartProcessing=s.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 o=a.a.Deferred()
;return this.queued.push({server:t,connection:n,url:i,deferred:o}),this._sortQueue(),this.throttledStartProcessing(),o.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),a.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(){s.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(u.c)("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){if(t.get("currentTest")){t.get("currentTest").forEach(function(i){var r=e.resolveUrl(n||i.url,{connection:t});i&&"pending"===i.state()&&(Object(c.a)("[Connections] Aborting pending connection test for %s at %s",e.get("debugName"),r),p.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 s.a.find(this.executing,r)||s.a.find(this.queued,r)},_removeQueuedOrExecuting:function(e,t,n){var r=i(e,t,n),a=s.a.findIndex(this.executing,r),o=s.a.findIndex(this.queued,r);a>=0&&this.executing.splice(a,1),o>=0&&this.queued.splice(o,1)}});t.a=h},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(x=!0);if(x=!1,!M()){var t=r(f.c),n=r(f.a),i=r(f.b),a=t._location||i._location||n._location||p.a,o={MediaContainer:{_location:a,Timeline:[t,n,i]}};e.requestDisconnect&&(o.MediaContainer._disconnected=1),Object(l.a)(o);Object(c.c)("companionProxy").publish(o),A=setTimeout(C,S)}}function r(t){var n={_type:t,_state:h.d,_volume:w(e),_controllable:j[t]},i=o(t);if(!i)return n
;var r=i.get("serverEntityID"),l=i.get("providerEntityID"),c=Object(m.k)(e,{serverEntityID:r}),y=Object(m.i)(e,{providerEntityID:l}),b=Object(I.a)(c,y),S=i.get("decisions"),M=i.get("playQueue"),C=M.get("playQueueItems"),O=M.get("playQueueSelectedItemID"),P=C.get(O),T=P.get("metadataItem"),E=Object(u.a)({metadataItemModel:T}),x=f.d(E),A=1e3*i.get("positionSeconds"),N=1e3*i.get("durationSeconds"),L=v.b;return i.get("repeatOne")?L=v.c:i.get("repeatAll")&&(L=v.a),
b?(n._machineIdentifier=b.machineIdentifier,n._protocol=b.protocol,n._address=b.address,n._port=b.port):n._machineIdentifier=c.get("originalMachineIdentifier")||c.get("machineIdentifier"),n._providerIdentifier=y.get("identifier"),n._itemType=x,n._key=T.get("key"),n._ratingKey=T.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(d.a)(i),n._time=A,
n._duration=N,n._seekRange="0-"+N,n._shuffle=M.get("playQueueShuffled")?1:0,n._repeat=L,i.get("openState")===g.a&&(n._location=p.b(t)),a()({},n,D(P,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 M(){return T(e).some(function(e){return e.get("isPlayQueueLoading")})}function D(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===y.a.get("video").id?e._videoStreamID=n:r&&(i===y.a.get("audio").id?e._audioStreamID=n:i===y.a.get("subtitles").id&&(e._subtitleStreamID=n)),e):e},r)}function C(){A=null,x&&i()}function O(){if(!E){E=!0,(Object(c.a)("remoteCastPlayerManager")||Object(c.a)("remotePlexPlayerManager"))&&t.dispatch(Object(b.i)())
;T(e).forEach(function(e){e.on("change",i)})}}function P(t){E=!1,A&&(clearTimeout(A),A=null),T(e).forEach(function(e){e.off("change",i)}),t&&i({requestDisconnect:t})}var j=n.companionPlayerProfile,T=n.getPlayerModels,w=n.getVolume,E=!1,x=!1,A=void 0;return{start:O,stop:P}}t.a=i;var r=n(6),a=n.n(r),o=n(7),s=n.n(o),l=n(29),c=n(15),u=n(377),d=n(773),p=n(4077),h=n(1419),f=n(379),v=n(449),g=n(190),m=n(66),y=n(151),b=n(246),I=n(1420),S=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(379),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(507),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(173),r=n.n(i),a=n(77),o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(18),d=n(15),p=n(4080),h=n(4081),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=a.c.Collection.extend({model:p.a,initialize:function(e,t){c.a.bindAll(this,"onAjaxComplete","onAppModelRegistered"),this.parent=t.parent,h.a.parent=t.parent,Object(d.d)("appModel").done(this.onAppModelRegistered)},
reconfigure:function(){Object(d.c)("appModel").get("settings").get("debugLevel")?this.start():this.stop()},start:function(){this.enabled||(this.enabled=!0,this.reset(),this.listenTo(u.a,"log:message",this.onLogMessage),a.c.history.on("route",this.onRoute,this),s()(document).on("ajaxComplete",this.onAjaxComplete))},stop:function(){this.enabled&&(this.enabled=!1,this.reset(),this.stopListening(u.a),a.c.history.off("route",this.onRoute,this),s()(document).off("ajaxComplete",this.onAjaxComplete))},
destroy:function(){this.stop(),this.stopListening()},add:function(){this.length>200&&this.shift(),a.c.Collection.prototype.add.apply(this,arguments)},toJSON:function(){var e=a.c.Collection.prototype.toJSON.apply(this,arguments);return e.unshift(c.a.extend({type:"info"},h.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(d.c)("appModel").get("settings"),r={type:"ajax",url:y(n.url),status:t.status};c.a.isEmpty(n.headers)||(r.headers=b(n.headers)),c.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(77),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(77),r=n(47),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.77.4"),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";function i(){var e=Object(r.c)("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(773),o=n(570);t.a=i},function(e,t,n){"use strict";function i(e,t,n){return{commandID:e,body:Y.a.writeXml({Response:{_code:t,_status:n}}),responseCode:t}}function r(e){Object(T.c)("appStore").dispatch(e)}function a(e,t){
var n=e.type&&e.type[0];n?(t.type===R.a&&d(),r(k.d({type:n,action:t}))):j.a.warn("[Companion] Ignored playback action due to missing type")}function o(){var e=Object(T.c)("appModel"),t=e.get("inputActivity");t&&t.notice()}function s(e){var t=e.machineIdentifier[0],n=t===H.b,i=Object(T.c)("appModel"),a=i.get("servers"),o=a.get(n?H.a:t),s=i.get("transientServer");W=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.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 j.a.warn("[Companion] Unable to create a transient server without a protocol or address"),O.a.Deferred().reject().promise();"https"===h&&(f=Object(Q.a)(f),E.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 W!==t?O.a.Deferred().reject().promise():(l.get("isTransient")&&r(k.e(l)),l)})}function l(e,t){
var n=Object(T.c)("appModel"),i=n.get("user");return(e.get("isCloud")?i.get("desktop").get("providers"):e.get("providers")).populate()}function c(e,t,n){var i=n.key&&n.key[0],r=i.replace("/children",""),a=new x.a({key:r},{server:e,provider:t});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(T.c)("appModel").get("user").get("isLocked")?e.reject():e.resolve(),e.promise()}function d(){
Object(T.c)("appModel").get("user").get("isRemote")&&r(Object(U.a)())}function p(){Object(T.c)("localCompanionTimelineManager").start()}function h(){d(),Object(T.c)("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 w.a.execute("remotePlaybackUnlock").then(function(){return s(e)}).then(function(t){
return u=t,l(u,e)}).then(function(n){var i=Object(L.a)(o);if(i){if(d=n.get(t||V.d))return O.a.Deferred().resolve({playQueueID:i}).promise()}else if(d=n.get(t||V.a))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=B.e(n),h=null==i?null:parseInt(i,10),f=null==a?null:parseInt(a,10);if(t){var v=t.entityID();r(R.m({serverEntityID:l,providerEntityID:c,metadataItemEntityID:v,startMetadataItemEntityID:v,
startOffsetMilliseconds:h,startMediaIndex:f,confirmPlayback:!0,confirmOffset:!0,options:{type:p,containerKey:o}}))}else r(R.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||V.d),i?c(n,i,e):O.a.Deferred().reject().promise()
}).then(function(e){var t=e.metadataItemModel;r(k.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,_.g({key:t}))}function m(e){var t=parseInt(e.offset[0],10);a(e,z.m({positionSeconds:Math.floor(t/1e3)}))}function y(e){a(e,_.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,z.h({
volume:r}))}if(null!=n){var o=parseInt(n,10);a(e,_.p({repeatAll:o===F.a,repeatOne:o===F.c}))}null!=i&&a(e,_.u())}function I(e){var t=e.audioStreamID&&e.audioStreamID[0],n=e.subtitleStreamID&&e.subtitleStreamID[0];null!=t&&a(e,z.f({streamTypeString:"audio",streamID:parseInt(t,10)})),null!=n&&a(e,z.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(N.h)())})}function D(e){
var t=e.path,n=e.query,r=e.commandID,a=e.supportsTimeline,s=O.a.Deferred(),l=G[t];if(o(),!1!==a&&Object(T.c)("localCompanionTimelineManager").start(),l){(l(n)||O.a.Deferred().resolve().promise()).done(function(){Object(j.a)('[Companion] Successfully processed command from path "'+t+'"');var e=i(r,200,"OK");s.resolve({controllerResponse:e})}).fail(function(){j.a.warn('[Companion] Failed to process command from path "'+t+'"');var e=i(r,400,"Bad Request");s.resolve({controllerResponse:e})})}else{
j.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(13),O=n.n(C),P=n(18),j=n(29),T=n(15),w=n(40),E=n(57),x=n(92),A=n(1421),N=n(203),L=n(754),k=n(1422),_=n(153),R=n(69),z=n(136),U=n(685),B=n(379),F=n(449),V=n(41),H=n(80),Q=n(914),Y=n(1409),G={"/player/timeline/subscribe":p,"/player/timeline/unsubscribe":h,"/player/mirror/details":v,"/player/playback/playMedia":f,
"/player/playback/pause":function(e){return a(e,z.j())},"/player/playback/play":function(e){return a(e,z.k())},"/player/playback/stop":function(e){return a(e,R.f())},"/player/playback/skipNext":function(e){return a(e,_.h())},"/player/playback/skipPrevious":function(e){return a(e,_.i())},"/player/playback/stepForward":function(e){return a(e,z.q())},"/player/playback/stepBack":function(e){return a(e,z.p())},"/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
},W=void 0,K=void 0},function(e,t,n){"use strict";function i(){return{shortcuts:[{keys:["?"],fn:"help",group:"navigation",label:function(){return Object(o.default)("Open Keyboard Shortcuts")}},{keys:["esc"],fn:"escape",group:"navigation",label:function(){return Object(o.default)("Close Modal or Menu")}},{keys:["g d"],fn:"dashboard",group:"navigation",label:function(){return Object(o.default)("Navigate to Dashboard")},isSupported:function(){return!Object(l.a)()}},{keys:["g h"],fn:"home",
group:"navigation",label:function(){return Object(o.default)("Navigate to Home")},isSupported:l.a},{keys:["g s"],fn:"settings",group:"navigation",label:function(){return Object(o.default)("Navigate to Settings")}},{keys:["g a"],fn:"activity",group:"navigation",label:function(){return Object(o.default)("Navigate to Activity")}},{keys:["g u"],fn:"users",group:"navigation",label:function(){return Object(o.default)("Navigate to Users")}},{keys:["/"],fn:"search",group:"actions",label:function(){
return Object(o.default)("Focus Search")}},{keys:["p"],fn:"playSelected",group:"actions",label:function(){return Object(o.default)("Open Player")}},{keys:["w"],fn:"toggleWatched",group:"actions",label:function(){return Object(o.default)("Toggle as Watched/Unwatched")}},{keys:["e"],fn:"edit",group:"actions",label:function(){return Object(o.default)("Edit Metadata")}},{keys:["i"],fn:"info",group:"actions",label:function(){return Object(o.default)("Get Info")}},{keys:["shift+s"],fn:"save",
group:"actions",label:function(){return Object(o.default)("Save Changes")}},{keys:["space","play_pause"],fn:"playPause",group:"player",label:function(){return Object(o.default)("Play or Pause")}},{keys:["play"],fn:"play",group:"player",label:function(){return Object(o.default)("Play")}},{keys:["pause"],fn:"pause",group:"player",label:function(){return Object(o.default)("Pause")}},{keys:["\\"],fn:"toggleFullScreen",group:"player",label:function(){return Object(o.default)("Toggle FullScreen")}},{
keys:["down"],fn:"decreaseVolume",group:"player",label:function(){return Object(o.default)("Decrease Volume")}},{keys:["up"],fn:"increaseVolume",group:"player",label:function(){return Object(o.default)("Increase Volume")}},{keys:[",","left"],fn:"seekBackward",group:"player",label:function(){return Object(o.default)("Seek Backward (10 seconds)")}},{keys:[".","right"],fn:"seekForward",group:"player",label:function(){return Object(o.default)("Seek Forward (30 seconds)")}},{keys:["[","alt+left"],
fn:"stepBackward",group:"player",label:function(){return Object(o.default)("Step Backward (10 minutes)")}},{keys:["]","alt+right"],fn:"stepForward",group:"player",label:function(){return Object(o.default)("Step Forward (10 minutes)")}},{keys:["shift+left","step_backward"],fn:"skipPrevious",group:"player",label:function(){return Object(o.default)("Skip to Previous Item")}},{keys:["shift+right","step_forward"],fn:"skipNext",group:"player",label:function(){
return Object(o.default)("Skip to Next Item")}},{keys:["x"],fn:"stop",group:"player",label:function(){return Object(o.default)("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 c.a({shortcuts:this.shortcuts}))},escape:function(e){r.a.trigger("shortcut:escape")},dashboard:function(e){r.a.trigger("navigate","dashboard")},home:function(e){r.a.trigger("navigate","dashboard")},
settings:function(e){Object(s.a)("webSettings",{settingsSubset:"general"})},activity:function(e){var t=a.c("appModel"),n=t.get("primaryServer");n&&!n.get("isShared")&&Object(s.a)("nowPlaying",{serverID:n.id})},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=i;var r=n(18),a=n(15),o=n(3),s=n(161),l=n(438),c=n(1112)},function(e,t,n){"use strict";var i=n(4086),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,repeat,shuffle,stepBack,stepForward,audioStream,subtitleStream",r=i+",volume",a="playPause,stop,skipPrevious,skipNext,seekTo,repeat,shuffle,volume",o="playPause,stop,skipPrevious,skipNext"},function(e,t,n){"use strict";var i=n(18),r=n(4088),a=n(4089),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})}},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(13),r=n.n(i),a=n(75),o=n(29),s=n(94),l=n(15),c=n(174),u=n(203),d=n(100),p=n(123),h=a.a.extend({mixins:[s.a],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers")},start:function(e){this.stop(),this.listenTo(this.appModel,{"change:primaryServer":this.onPrimaryServerChange,
"change:primaryServer.change:isPrimaryEligible":this.onPrimaryServerEligibleChange,"change:primaryServer.change:isOutOfDate":this.onPrimaryServerOutOfDateChange,"change:isWaitingForServers":this.onWaitingForServersChange,"change:primaryServer.change:isRelayed":this.onPrimaryServerIsRelayedChange}),this.listenTo(this.servers,{"update reset":this.onServersUpdate}),this._setPrimaryServer(p.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(l.c)("appStore");n.dispatch(Object(u.j)());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(o.a)("[Primary Server] The server, %s, is waiting for a version",r.get("debugName")),t._setPrimaryServer(e)):n.dispatch(Object(u.f)({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(o.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(o.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(o.a)("[Primary Server] Waiting for any eligible server to connect"),e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),i=i.then(null,function(){return Object(o.a)("[Primary Server] Waiting for any eligible server"),e.servers.findServer({isPrimaryEligible:!0,isOutOfDate:!1})})},onPrimaryServerChange:function(e,t){c.a.flushDebouncedSave();var n=e.previous("primaryServer");if(n&&this.stopListening(n),t){
o.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(l.c)("appStore").dispatch(Object(d.d)({machineIdentifier:t.id,serverName:t.get("friendlyName")}))}
}else e.get("isWaitingForPrimaryServer")?Object(o.a)("[Primary Server] Waiting to set the primary server"):o.a.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){var n=this.appModel.get("user");t||(Object(o.a)("[Primary Server] The previous primary server, %s, is unauthorized",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer(p.c))},onPrimaryServerOutOfDateChange:function(e,t){var n=this.appModel.get("user")
;t&&(Object(o.a)("[Primary Server] The previous primary server, %s, is out of date",e.get("debugName")),n.unset("lastPrimaryServerID"),this._setPrimaryServer(p.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(p.c)}},onPrimaryServerIsRelayedChange:function(e,t){if(t){
Object(l.c)("appStore").dispatch(Object(d.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(o.a)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),e.unset("lastPrimaryServerID"),this._setPrimaryServer(p.c))}else this._setPrimaryServer(p.m)}});t.a=h},function(e,t,n){"use strict"
;var i=n(15),r=n(264),a=n(4090),o=n.n(a),s=r.a.extend({className:"alert-bar notify",template:o.a,onCloseClick:function(e){r.a.prototype.onCloseClick.apply(this,arguments),Object(i.c)("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(4)).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(4)).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(7),r=n.n(i),a=n(90),o=n(18),s=n(40),l=n(4092),c=n(108),u=l.a.extend({
start:function(){l.a.prototype.start.call(this),this.listenTo(this.servers,"change:isClaimed",this.onClaimedChange),this.listenTo(o.a,"cloudServer:addUnclaimedServer",this.onAddClaimedServer)},onAddClaimedServer:function(e){var t=this.appModel,n=t.get("cloudServer"),i=new c.c({},{parent:t}),o=Array.isArray(e.Device.Connection)?e.Device.Connection:[e.Device.Connection];r.a.each(o,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),a.a.isHostedHttps&&!i.get("isSecure")?s.a.execute("showClaimServerAlertBar",i):t.get("servers").add(i)},onClaimedChange:function(e,t){var n=e.get("isFullOwnedServer")&&e.get("isConnected"),i=!1===t&&!e.previous("isClaimed");n&&i&&s.a.execute("showClaimServerAlertBar",e)}});t.a=u},function(e,t,n){"use strict";var i=n(53),r=n.n(i),a=n(13),o=n.n(a),s=n(7),l=n.n(s),c=n(75),u=n(18),d=n(29),p=n(94),h=n(108),f=n(920),v=n(174),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(7),r=n.n(i),a=n(15),o=n(40),s=n(673),l=n(3),c=n(1423),u=n(161),d=n(264),p=n(4094),h=n.n(p),f=d.a.extend({className:"alert-bar server-update-alert-bar notify",template:h.a,events:r.a.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick",
"click .skip-version-link":"onSkipThisVersionClick"},d.a.prototype.events),initialize:function(){this.server=this.model.server},serializeData:function(){var e=Object(a.c)("appModel"),t=e.get("user").server;return{state:this.model.get("state"),downloadURL:this.model.get("downloadURL")||t.get("appsUrl"),version:Object(s.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(),o.a.execute("checkForServerUpdates",{server:this.server,download:!0,initialState:"downloading"}),Object(u.a)("serverSettings",{serverID:this.server.id,group:"general"})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),Object(u.a)("serverSettings",{serverID:this.server.id,group:"general"})},onSkipThisVersionClick:function(e){
d.a.prototype.onCloseClick.apply(this,arguments);var t=Object(s.a)(this.model.get("version"))||c.a;Object(a.c)("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(4)).call(e,"Download now",{hash:{},data:t}))+"</a> "}function l(e,t){var r
;return r=i(n(33)).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(4)).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(4)).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(33)).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(4)).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===S.a.CUSTOM&&i?i:n||S.a.PRODUCTION}function i(){if(e.get("isCastApiAvailable"))return window.cast.framework.CastContext.getInstance()}
function r(){if(Z)return Z.customData}function o(e){return e.isMute()?0:Math.round(100*e.getVolume())}function j(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 p.c;case i.MUSIC_TRACK:return p.a;case i.PHOTO:return p.b}}}}function T(e){var t=r();if(t){var n=t.mediaIndex,i=t.partIndex;K(I.m({playQueueType:j(Z),
playerState:a()({},e,{mediaIndex:n,partIndex:i})}))}}function w(){var e=window.chrome.cast.media.PlayerState,t=r();if(t){var n=t.containerKey,i=t.key,a=t.playQueueItemID,o=t.playQueueVersion,s=t.mediaIndex,l=t.partIndex,c=t.bitrate,u=t.server,d=t.providerIdentifier,p=j(Z),h=te[p],f=ne[p],v=a!==h||o!==f;te[p]=a,ne[p]=o,K(I.l({playQueueType:j(Z),options:{machineIdentifier:u.machineIdentifier,providerIdentifier:d,containerKey:n,key:i,mediaIndex:s,shouldRefreshPlayQueue:v,playQueueItemID:a,
bitrate:c,initialState:{isPaused:Z.playerState===e.PAUSED,isBuffering:Z.playerState===e.BUFFERING,positionSeconds:Math.round(Z.currentTime||0),durationSeconds:Math.round(Z.media.duration||0),controllable:P,mediaIndex:s,partIndex:l}}}))}}function E(){ee||$||q&&K(I.b(o(q)))}function x(){ee&&ee--}function A(){$&&$--}function N(){var e=r();if(e){var t=e.mediaIndex,n=e.bitrate;K(I.n({playQueueType:j(Z),mediaIndex:t,bitrate:n}))}}function L(){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||K(I.o({playQueueType:j(Z),key:t,mediaIndex:n,partIndex:i,audioStreamID:a,subtitleStreamID:o}))}}function k(e){var t=!!(e&&window.cast&&window.chrome&&window.chrome.cast);if(K(b.a(t)),!t)return void l.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,_)}function _(e){var t=window.cast.framework,n=e.session,i=e.sessionState,r=e.errorCode;switch(i){case t.SessionState.NO_SESSION:Object(l.a)("[Cast] Session is not established");break;case t.SessionState.SESSION_STARTED:Object(l.a)("[Cast] Session is established");break;case t.SessionState.SESSION_START_FAILED:Object(l.a)('[Cast] Session failed to start with code "'+r+'"');break;case t.SessionState.SESSION_RESUMED:
Object(l.a)("[Cast] Connection to an already existing session is established");break;case t.SessionState.SESSION_ENDED:l.a.warn("[Cast] Session has disconnected")}switch(q&&(q.removeEventListener(t.SessionEventType.MEDIA_SESSION,R),n.removeEventListener(t.SessionEventType.VOLUME_CHANGED,B)),te={},ne={},i){case t.SessionState.NO_SESSION:case t.SessionState.SESSION_START_FAILED:case t.SessionState.SESSION_ENDED:z(!1),q=null,K(I.i());break;case t.SessionState.SESSION_STARTED:
case t.SessionState.SESSION_RESUMED:q=n,n.addEventListener(t.SessionEventType.MEDIA_SESSION,R),n.addEventListener(t.SessionEventType.VOLUME_CHANGED,B),K(b.b(a()({},n.getCastDevice(),{volume:o(n)})));var s=n.getMediaSession();s&&R({mediaSession:s})}}function R(e){var t=e.mediaSession;Z&&Z.removeUpdateListener(z),Z=t,t.addUpdateListener(z),te={},ne={}}function z(e){var t=window.chrome.cast.media.PlayerState;if(Z&&e){var n=Z.playerState;T({isPaused:n===t.PAUSED,isBuffering:n===t.BUFFERING,
positionSeconds:Math.round(Z.currentTime||0),durationSeconds:Math.round(Z.media.duration||0),controllable:P}),w(),N(),L(),n===t.PLAYING?X||(X=setTimeout(U,O)):X&&(clearTimeout(X),X=null)}else if(l.a.warn("[Cast] Update ignored; no alive media session"),X&&(clearTimeout(X),X=null),Z&&!J){var i=j(Z);i&&Z.playerState===t.IDLE&&(te[i]=null,ne[i]=null,K(I.f({playQueueType:i})))}}function U(){Z?(T({positionSeconds:Math.round(Z.getEstimatedTime()||0)}),
X=setTimeout(U,O)):l.a.warn("[Cast] Position update ignored; no media session")}function B(){E()}function F(){var e=i();e?(Object(l.a)("[Cast] Requesting session"),e.requestSession()):l.a.warn("[Cast] Request session ignored; no cast context")}function V(){var e=i();e?(Object(l.a)("[Cast] Ending session"),e.endCurrentSession()):l.a.warn("[Cast] End session ignored; no cast context"),te={},ne={}}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 n.defaults().localQuality;var a=Object(f.a)(e,r);return n.get(a)}function Q(t){if(!q)return void l.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"),d=o.get("type"),p=o.get("playQueueItems"),f=p.get(o.get("playQueueSelectedItemID")),b=f.get("metadataItem"),S=t.get("startMediaIndex"),C=o.server,O=t.get("providerEntityID"),P=Object(D.f)(e,{providerEntityID:O}),j=Object(y.q)(f.get("type")),w=j&&j.mediaType===m.a?m.a:m.d,E=void 0;if(w===m.d){var x=H(b,t,r),A=v.a.getQualityByIndex(x);E=A.bitrate}
var N=t.get("positionSeconds")||Math.floor(Object(u.a)(t,b)/1e3),L=void 0;Object(M.a)(C,P).then(function(e){return L=e,a&&a!==C?Object(M.a)(a,P):e}).done(function(e){var a={playQueueType:d,providerIdentifier:P.get("identifier"),containerKey:c.join([s.a.result(o,"url")],{own:1}),offset:N,directPlay:i.get("directPlay"),directStream:i.get("directStream"),mediaIndex:S,bitrate:E,audioBoost:i.get("audioBoost"),subtitleSize:r.get("subtitleSize"),autoPlay:r.get("autoPlay"),repeat:Object(h.a)({
repeatOne:t.get("repeatOne"),repeatAll:t.get("repeatAll")}),audioForceMultiChannel:r.get("audioForceMultiChannel"),server:L,primaryServer:e,user:{username:n.get("username")}},u=window.chrome.cast.media,p=new u.MediaInfo(b.get("key"));p.customData=a;var f=new u.LoadRequest(p);f.currentTime=N,f.autoplay=!t.get("isPaused"),J=!0,Object(l.a)("[Cast] Sending load media request"),q.loadMedia(f).then(function(){Object(l.a)("[Cast] Load media success"),J=!1,T({isMediaLoading:!1})},function(e){
l.a.warn('[Cast] Failed to load media with error "'+e+'"'),J=!1,K(I.j({playQueueType:d}))})}).fail(function(){K(I.j({playQueueType:d,errorMessage:Object(g.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 Y(t){if(!q)return void l.a.warn("[Cast] Mirror details ignored; no cast session");var n=e.get("user"),i=t.server,r=t.provider
;Object(M.a)(i,r).done(function(e){var i={server:e,providerIdentifier:r.get("identifier"),user:{username:n.get("username")}},a=window.chrome.cast.media,o=new a.MediaInfo(t.get("key"));o.customData=i,G({type:d.l,media:o})})}function G(e){q?(Object(l.a)('[Cast] Sending custom message with type "'+e.type+'"'),q.sendMessage(C,e,null,function(e){l.a.warn('[Cast] Failed to send custom message with error "'+e+'"')})):l.a.warn('[Cast] Custom message "'+e.type+'" ignored; no cast session')}function W(e){
if(!q)return void l.a.warn("[Cast] Set volume ignored; no cast session");Object(l.a)('[Cast] Setting volume to "'+e+'"'),K(I.b(e)),e?(q.isMute()&&($++,q.setMute(!1).then(A,A)),ee++,q.setVolume(e/100).then(x,x)):($++,q.setMute(!0).then(A,A))}var K=t.dispatch,q=void 0,Z=void 0,X=void 0,J=!1,$=0,ee=0,te={},ne={};window.__onGCastApiAvailable=k;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:V,startPlayback:Q,mirrorDetails:Y,sendMessage:G,setVolume:W}}t.a=i;var r=n(6),a=n.n(r),o=n(7),s=n.n(o),l=n(29),c=n(19),u=n(533),d=n(996),p=n(239),h=n(997),f=n(519),v=n(141),g=n(3),m=n(58),y=n(26),b=n(753),I=n(246),S=n(1400),M=n(1424),D=n(116),C="urn:x-cast:plex",O=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");return!e.supports("transientToken")||/^transient-/.test(n)?a.a.Deferred().resolve(n).promise():a.a.ajax(e.getXHROptions("/security/token",{data:{type:t.type||"delegation",scope:t.scope||"all"}})).promise().then(function(e){return Object(o.a)(e).token||a.a.Deferred().reject().promise()})}t.a=i;var r=n(13),a=n.n(r),o=n(505)},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=f.join(e,a()({},t,{commandID:z})),r=R.server,o=r.getXHROptions(i,a()({},n,{scope:T,headers:{"X-Plex-Target-Client-Identifier":R.get("machineIdentifier")}}));return s.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(p.a)(o.disconnected)&&e.wait)return void _(M.i());var s=R.get("machineIdentifier"),l=a.getResponseHeader("X-Plex-Client-Identifier"),u=Object(h.a)(o.commandID);if(s===l&&u>=z){var f=Object(d.a)(o.Timeline),v=c.a.findWhere(f,{type:"video"}),m=c.a.findWhere(f,{type:"music"}),y=c.a.findWhere(f,{type:"photo"});!v||m&&m.state&&m.state!==g.d?m&&r(m):r(v),y&&r(y),z=u}i({wait:1})}).fail(function(t,n){t.aborting||("error"===n?(U++,
e.wait&&U<=C?(u.a.warn("[Companion] Poll request failed; retrying..."),i({wait:1})):(u.a.warn("[Companion] Poll request failed 3 times in a row; giving up"),_(M.i()))):i({wait:1}))})}function r(e){var t=e.type,n=e.state,i=e.providerIdentifier,r=e.machineIdentifier,a=e.containerKey,o=e.key,s=e.playQueueItemID,l=m.e(t),c=Object(p.a)(e.continuing);if(n===g.d&&!c)return Q[t]=null,Y[t]=null,void _(M.f({playQueueType:l}))
;var u=Object(h.a)(e.playQueueVersion),d=Object(h.a)(e.time),f=Object(h.a)(e.duration),v=Object(h.a)(e.mediaIndex),b=Object(h.a)(e.partIndex),I=e.audioStreamID?Object(h.a)(e.audioStreamID):null,S=e.subtitleStreamID?Object(h.a)(e.subtitleStreamID):null,D=Object(h.a)(e.volume),C=Object(h.a)(e.repeat),O=(e.controllable||"").split(","),P={positionSeconds:Math.floor(d/1e3),durationSeconds:Math.floor(f/1e3),mediaIndex:v,partIndex:b,isPaused:n===g.c,isBuffering:n===g.a,hasError:n===g.b,
controllable:O.reduce(function(e,t){return e[t]=!0,e},{})},j=Q[t],T=Y[t],w=s!==j||u!==T;Q[t]=s,Y[t]=u,_(M.l({playQueueType:l,options:{providerIdentifier:i,machineIdentifier:r,containerKey:a,key:o,playQueueItemID:s,shouldPlayQueueRefresh:w,initialState:P}})),_(M.m({playQueueType:l,playerState:P})),_(M.k({playQueueType:l,playQueueVersion:u,repeatAll:C===y.a||C===y.c,repeatOne:C===y.c})),_(M.o({playQueueType:l,key:o,mediaIndex:v,partIndex:b,audioStreamID:I,subtitleStreamID:S})),
null!=e.volume&&_(M.b(D))}function o(){B=null,null!=F&&(L(F),F=null)}function l(){V=null,null!=H&&(k(H),H=null)}function w(t){R=e.get("companionServer").get("desktop").get("players").get(t),R?(_(M.a(t)),z=0,U=0,i()):u.a.warn('[Companion] Request session ignored; no player with identifier "'+t+'"')}function E(){if(!R)return void u.a.warn("[Companion] End session ignored; no current player");B&&(clearTimeout(B),B=null),V&&(clearTimeout(V),V=null),S.a.abortAll(T),n("/player/timeline/unsubscribe"),
R=null,F=null,H=null,Q={},Y={}}function x(e){if(!R)return void u.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,s=t.provider,l=1e3*e.get("positionSeconds")||Math.floor(Object(v.a)(e,a));Object(D.a)(o,s).done(function(e){var i={type:m.d(t.get("type")),providerIdentifier:s.get("identifier"),containerKey:f.join([c.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(u.a)("[Companion] Sending play media request"),N("/player/playback/playMedia",i).done(function(){Object(u.a)("[Companion] Play media success"),_(M.m({playQueueType:n,playerState:{isMediaLoading:!1}}))}).fail(function(e){u.a.warn('[Companion] Failed to play media with error "'+e.status+'"'),_(M.j({playQueueType:n}))})}).fail(function(){_(M.j({
playQueueType:n,errorMessage:Object(I.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 A(e){if(!R)return void u.a.warn("[Companion] Mirror details ignored; no current player");var t=R.get("protocolCapabilities")
;if(!t||-1===t.indexOf("mirror"))return void u.a.warn("[Companion] Mirror details ignored; player does not advertise support for the `mirror` capability");var i=e.server,r=e.provider;Object(D.a)(i,r).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 N(e,t){return R?(z++,n(e,t)):(u.a.warn("[Companion] Command for "+e+" ignored; no current player"),
s.a.Deferred().reject().promise())}function L(e){B?(clearTimeout(B),F=e):N("/player/playback/seekTo",e),B=setTimeout(o,P)}function k(e){V?(clearTimeout(V),H=e):N("/player/playback/setParameters",e),V=setTimeout(l,j)}var _=t.dispatch,R=void 0,z=0,U=0,B=void 0,F=void 0,V=void 0,H=void 0,Q={},Y={};return{requestSession:w,endSession:E,startPlayback:x,mirrorDetails:A,sendCommand:N,seek:L,changeVolume:k}}t.a=i
;var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(7),c=n.n(l),u=n(29),d=n(653),p=n(504),h=n(364),f=n(19),v=n(533),g=n(1419),m=n(379),y=n(449),b=n(505),I=n(3),S=n(236),M=n(246),D=n(1424),C=3,O=2e4,P=200,j=200,T="remoteCastPlayerManager"},function(e,t,n){"use strict"
;var i,r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(18),c=n(205),u=n(15),d=n(231),p=n(100),h=n(186),f=n(99),v=n(41),g=n(4099),m=n(4100),y=n(320),b=n(1052),I=n(728),S=n(38),M=n(43),D=n(312),C=n(3),O=n(26),P=n(972),j=n(441),T=n(1001),w=n(167),E=n(183),x=n(131),A={started:p.o,updated:p.s,ended:p.i},N=[I.i,I.o,I.l,I.j,I.h,I.n,I.c,I.t,I.d,I.q,I.r,I.p,I.s,I.k,I.a,I.b,I.f],L=0,k=void 0,_=void 0,R=b.a.extend((i={updateLiveTVMetadata:function(){var e=u.c("appStore"),t=this.server.entityID();e.dispatch(h.n({
serverEntityID:t,playerType:f.a})),v.c.test(window.location.hash)&&e.dispatch(x.b({serverEntityID:t}))},getMessages:function(e){var t;return(t={},t[I.i]=e.Setting,t[I.o]=e.TimelineEntry,t[I.l]=e.StatusNotification,t[I.j]=e.ProgressNotification,t[I.h]=e.PlaySessionStateNotification,t[I.n]=e.SyncStateNotification,t[I.c]=e.BackgroundGeneratorStateNotification,t[I.t]=e.VersionStateNotification,t[I.d]=e.BackgroundProcessingQueueEventNotification,t[I.q]=e.TranscodeSession,t[I.r]=e.TranscodeSession,
t[I.p]=e.TranscodeSession,t[I.s]=e.AutoUpdateNotification,t[I.k]=e.ReachabilityNotification,t[I.a]=e.AccountUpdateNotification,t[I.b]=e.ActivityNotification,t[I.f]=e.MediaGrabberDeviceNotification,t[I.e]=e.MediaProviderContentNotification,t[I.m]=e.MediaProviderSubscriptionNotification,t)[e.type]||[]},getMessageTypes:function(){return N}},i[I.i]=function(e){e.key=e.id,e.server=this.server,this.server.trigger("socket:setting",e),(0,u.c("appStore").dispatch)(Object(E.p)({
serverEntityID:this.server.entityID(),setting:e}))},i[I.o]=function(e){function t(){L=Date.now(),k=i,_=null,f(x.b({serverEntityID:m,containerKeyPattern:new RegExp("^"+Object(c.a)("/library/sections/"+i)+"\\b")}))}if(!v.c.test(e.identifier)){var n=e.state,i=e.sectionID,r=e.rootItemID,a=e.parentItemID,o=e.itemID,s=e.metadataState,p=e.mediaState,h=e.type,f=u.c("appStore").dispatch,m=this.server.entityID(),y="/library/metadata/"+o,b=Object(S.a)(M.g,y,m)
;if(f(Object(w.updateMetadataItemRefreshingState)({serverEntityID:m,metadataItemEntityID:b,metadataState:s,mediaState:p})),n===g.a.PROCESSED&&f(Object(d.d)({serverEntityID:m,metadataItemEntityID:b})),n===g.a.DELETED&&f(Object(d.c)({serverEntityID:m,metadataItemEntityID:b})),n===g.a.CREATED||n===g.a.DELETED){if(i>0){var I=Date.now()-L;i===k&&I<5e3?_||(_=setTimeout(t,5e3-I)):t()}if(r>0){var D="/library/metadata/"+r,C=Object(S.a)(M.g,D,m);f(x.b({serverEntityID:m,metadataItemEntityID:C,
rootMetadataKey:D}))}if(a>0){var P="/library/metadata/"+a,j=Object(S.a)(M.g,P,m);f(x.b({serverEntityID:m,metadataItemEntityID:j,parentMetadataKey:P}))}var T=Object(O.q)(h);T&&T.typeString===O.i&&f(x.b({serverEntityID:m,containerKeyPattern:new RegExp("^/playlists")}))}e.server=this.server,this.server.trigger("socket:timeline",e),l.a.trigger("timeline",e)}},i[I.l]=function(e){if(this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){
var t=u.c("appStore").dispatch,n=this.server.entityID();n&&(t(Object(p.q)({serverEntityID:n})),t(Object(p.g)({serverEntityID:n})),t(x.b({serverEntityID:n})))}},i[I.j]=function(e){this.server.trigger("socket:status",e)},i[I.h]=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===y.a.states.STOPPED){i.trigger("destroy",i,i.collection),i.cache.remove(i)
;var r=u.c("appStore").dispatch,a=this.server.entityID();a&&r(x.b({serverEntityID:a}))}else{var o=i.get("Player");o&&(o.state=e.state,i.trigger("change:Player",i,o)),i.set("viewOffset",e.viewOffset)}else{if(n.isPopulating())return;n.fetch().done(function(){if(i=n.get(e.sessionKey)){var r=i.get("Player").title,a=i.get("User").title,o=i.get("grandparentTitle"),l=i.get("title");o&&(l=o+" - "+l),t.server.trigger("socket:playing",s.a.extend(e,{username:a||Object(C.default)("Unknown"),title:l,player:r
}))}})}}},i[I.n]=function(e){var t=new T.a({key:e.key},{server:this.server,syncItemId:e.syncItemId,onlyIfCached:!0});if(!s.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[I.c]=function(e){var t={
server:this.server,onlyIfCached:!0},n=new j.a({id:e.generatorID},t);s.a.isEmpty(n)||n.fetch()},i[I.t]=function(e){var t={server:this.server,onlyIfCached:!0},n=new j.a({id:e.generatorID},t);if(!s.a.isEmpty(n)){var i=n.get("children").getCollection(),r=i.get(e.metadataItemID);r&&r.set({processingState:e.state,processingStateContext:e.stateContext})}},i[I.d]=function(e){var t=new P.a([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.a.isEmpty(t)){var n=t.first();n&&n.fetch()}},
i[I.q]=function(e){if("static"===e.context){this.server.get("desktop").get("backgroundTranscodeJobs").fetch()}else{this.server.get("desktop").get("sessions").fetch()}},i[I.r]=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[I.p]=function(e){this["transcodeSession.start"].apply(this,arguments)},i[I.s]=function(e){var t=this.server.get("desktop").get("update"),n=s.a.pick(e,t.whitelistedAttrs)
;s.a.defaults(n,s.a.result(t,"defaults")),"downloading"===t.get("state")&&"available"===n.state&&(n.state="downloading"),t.set(n)},i[I.k]=function(e){this.server.get("desktop").get("cloudAccount").fetch()},i[I.a]=function(e){if(this.server.set("myPlexSubscription",e.hasPlexPass),this.server.supports("reachability")){var t=s.a.extend(this.server.getXHROptions("/myplex/refreshReachability"),{type:"PUT"});a.a.ajax(t)}u.c("appModel").get("user").get("isSignedIn")&&l.a.trigger("discover:servers")},
i[I.b]=function(e){var t=Object(m.a)(e),n=u.c("appStore"),i=this.server.entityID(),r=t.Activity||t;if(r.Context=r.Context||{},r.Response=r.Response||{},i){var a=A[t.event];a&&n.dispatch(a({serverEntityID:i,activity:r}))}},i[I.f]=function(e){var t=u.c("appStore"),n=this.server.entityID();n&&"appeared"===e.event&&t.dispatch(Object(E.f)({serverEntityID:n,device:e.Device}))},i[I.e]=function(){this.updateLiveTVMetadata()},i[I.m]=function(){this.updateLiveTVMetadata()},i));t.a=R},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";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(7),a=n.n(r),o=n(121),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(6),r=n.n(i),a=n(17),o=n(4102),s=n(16),l=n(92),c=n(672),u=n(4109),d=n(4112),p=n(4117),h=n(4118),f=n(4121),v=n(224),g=o.a.extend({name:"DesktopAppModel",sessionAttrs:r()({},o.a.prototype.sessionAttrs,{isFirstRun:s.a.boolean.isRequired,isSigningOut:s.a.boolean.isRequired,isCastApiAvailable:s.a.boolean.isRequired,isFullscreen:s.a.boolean.isRequired,settings:s.a.instanceOf(d.a)}),
sessionRelations:r()({},o.a.prototype.sessionRelations,{entities:{relationClass:Object(u.a)(v)},remotePlayer:{relationClass:a.a,deferred:!0},legacyChannelProvider:{relationClass:c.a,deferred:!0},legacyChannelMetadataItem:{relationClass:l.a,deferred:!0},deviceSettings:{relationClass:p.a},experienceSettings:{relationClass:h.a},ui:{relationClass:f.a}}),defaults:function(){var e=o.a.prototype.defaults.apply(this,arguments);return r()({},e,{isFirstRun:!1,isSigningOut:!1,isCastApiAvailable:!1,
isFullscreen:!1,settings:new d.a})}});t.a=g},function(e,t,n){"use strict";var i=n(4103),r=n(16),a=n(4104),o=n(4108),s=n(108),l=n(1421),c=n(307),u=n(80),d=i.a.extend({name:"AppModel",sessionAttrs:{clientID:r.a.string,anonymousClientID:r.a.string,authorized:r.a.boolean.isRequired,skipSignIn:r.a.boolean.isRequired,isWaitingForServers:r.a.boolean.isRequired,isWaitingForPrimaryServer:r.a.boolean.isRequired,history:r.a.array.isRequired,forwardHistory:r.a.array.isRequired,
activeNavigationType:r.a.string},sessionRelations:{servers:{relationClass:o.a},cloudServer:{relationClass:a.a,deferred:!0},primaryServer:{relationClass:s.c,deferred:!0},companionServer:{relationClass:s.c,deferred:!0},transientServer:{relationClass:l.a,deferred:!0},user:{relationClass:c.a,deferred:!0}},defaults:function(){var e=new a.a({machineIdentifier:u.a},{parent:this});return{authorized:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],
cloudServer:e,user:new c.a({},{server:e,parent:this})}}});t.a=d},function(e,t,n){"use strict";var i=n(18),r=n(36),a=n(17),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(29),r=n(4105),a=n(19),o=n(15),s=n(40),l=n(657),c=n(16),u=n(108),d=n(515),p=n(306),h=n(4106),f=u.c.connectionTestResults,v=u.c.promiseStates,g=u.c.extend({name:"CloudServerModel",
connectionTestUrl:"https://plex.tv/monitoring/health",sessionAttrs:{connectionTestResult:c.a.oneOf(f.PENDING,f.CONNECTED,f.UNAVAILABLE,f.UNAUTHORIZED).isRequired,promiseState:c.a.oneOf(v.PENDING,v.RESOLVED,v.REJECTED).isRequired,isShared:c.a.boolean.isRequired,isBundled:c.a.boolean.isRequired,isCloud:c.a.boolean.isRequired,isMerged:c.a.boolean.isRequired,isDownForMaintenance:c.a.boolean.isRequired,isResourcesPending:c.a.boolean.isRequired,hasFailedResources:c.a.boolean.isRequired,
accessToken:c.a.string,baseUrl:c.a.string.isRequired,plexPassUrl:c.a.string.isRequired,cloudSyncUrl:c.a.string.isRequired,appsUrl:c.a.string.isRequired,helpUrl:c.a.string.isRequired,hasEventConnection:c.a.boolean},sessionRelations:{activeConnection:{relationClass:p.a,deferred:!0},connections:{relationClass:d.b,options:function(){return{server:this}}},resources:{relationClass:h.a,options:function(){return{server:this}}}},defaults:function(){var e="https://plex.tv";return{
connectionTestResult:f.PENDING,promiseState:v.PENDING,isShared:!1,isBundled:!1,isCloud:!0,isMerged:!1,isDownForMaintenance:!1,isResourcesPending:!1,hasFailedResources:!1,friendlyName:"plex.tv",baseUrl:e,plexPassUrl:a.join([e,"/subscription/about"]),cloudSyncUrl:a.join([e,"/cloudsync/providers"]),appsUrl:a.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 p.a({scheme:"https",address:"node.plexapp.com",port:"32443"})})},testAllConnections:function(){var e=this,t=this.get("connections");Object(i.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(r.a)(n)},testConnection:function(e){var t={server:this,connection:e,
url:this.connectionTestUrl};return s.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};s.a.execute("abortServerConnectionTest",t)},deauthenticate:function(){this.get("resources").clear(),this._reject({connectionTestResult:this.get("connectionTestResult"),accessToken:null})},onConnectionTestSuccess:function(e){
var t=this.get("connections").getBestConnection();i.a.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this.startCapturingChangeEvents(),this.set({isDownForMaintenance:!1,connectionTestResult:f.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)(g,function(){return{
relationClass:Object(o.c)("CloudServerFlexModel"),options:{server:this}}}),t.a=g},function(e,t,n){"use strict";function i(e){if(!e.length)return a.a.Deferred().reject().promise();var t=a.a.Deferred(),n=e.length;return s.a.each(e,function(e){e.done(function(){n--,t.resolveWith(this,arguments)}).fail(function(){0===--n&&t.reject()})}),t.promise()}var r=n(13),a=n.n(r),o=n(7),s=n.n(o);t.a=i},function(e,t,n){"use strict";var i=n(19),r=n(24),a=n(57),o=n(4107),s=r.a.extend({name:"ResourceCollection",
model:o.a,context:["server"],url:function(){var e={};return a.a.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),a.a.get("allowMediaServerRelayConnections")&&(e.includeRelay=1),i.join("/api/resources",e)}});t.a=s},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(515),o=i.a.extend({name:"ResourceModel",context:["server"],idAttribute:"clientIdentifier",rootPropertyName:"Device",urlRoot:"/api/resources",syncedAttrs:{clientIdentifier:r.a.string,name:r.a.string,sourceTitle:r.a.string,
accessToken:r.a.string,product:r.a.string,productVersion:r.a.string,platform:r.a.string,platformVersion:r.a.string,device:r.a.string,provides:r.a.list,owned:r.a.boolean,home:r.a.boolean,synced:r.a.boolean,presence:r.a.boolean,publicAddressMatches:r.a.boolean,httpsRequired:r.a.boolean,createdAt:r.a.integer,lastSeenAt:r.a.integer,ownerId:r.a.integer},syncedRelations:{connections:{relationClass:a.b,rootPropertyName:"Connection"}}});t.a=o},function(e,t,n){"use strict";function i(e){
return e.length?s.a.map(e,function(e){return e.get("debugName")}).join(", "):"(none)"}var r=n(13),a=n.n(r),o=n(7),s=n.n(o),l=n(29),c=n(24),u=n(658),d=n(108),p=c.a.extend({mixins:[u.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){s.a.contains(u,e)&&t&&c.resolve(e)}function n(e,t){s.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=a.a.Deferred(),u=o.slice(0),d=s.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")?a.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=s.a.isString(e),o=r?{machineIdentifier:e}:e,l=a.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=s.a.has(o,"machineIdentifier"),d=s.a.map(s.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):a.a.Deferred().resolve(n[0]).promise()},hasOnlyRejectedServers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.models;return s.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!!s.a.find(e,function(e){var t=e.get("activeConnection");return!!t&&t.get("isLoopback")})}});t.a=p},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(17),a=n(4110)},function(e,t,n){"use strict";var i=n(24),r=n(4111),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(6),r=n.n(i),a=n(17),o=n(16),s=a.a.extend({name:"EntityModel",sessionAttrs:{id:o.a.string.isRequired},sessionRelations:{model:{relationClass:a.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(6),r=n.n(i),a=n(4113),o=n(440),s=a.a.extend({name:"DesktopSettingsModel",storageKey:"settingsv2",defaults:r()({},a.a.prototype.defaults,{allowHttpFallback:o.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(1418),r=n(4114),a=i.a.extend({defaults:r.a});t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return h})
;var i=n(7),r=n.n(i),a=n(4115),o=n(16),s=n(57),l=n(1399),c=n(440),u=n(1417),d=Object(a.a)(window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage),p={allowHttpFallback:{type:o.a.string,defaultValue:s.a.get("shouldPreferInsecureLocalConnections")?c.a.SAME_NETWORK:c.a.NEVER},preferInsecureConnections:{type:o.a.string,defaultValue:s.a.get("shouldPreferInsecureLocalConnections")?u.c:u.b},companion:{type:o.a.boolean,defaultValue:!0},language:{type:o.a.string,defaultValue:d},autoLogin:{
type:o.a.boolean,defaultValue:!1},extrasPrefixCount:{type:o.a.integer,defaultValue:0},debugLevel:{type:o.a.integer,defaultValue:l.a.DISABLED}},h=(r.a.mapObject(p,function(e){return e.type}),r.a.mapObject(p,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(1234),a=n(4116)
},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(507),r=n(16),a=i.a.extend({name:"DeviceSettingsModel",storageKey:"deviceSettings",sessionAttrs:{isSaving:r.a.boolean,saveError:r.a.object},syncedAttrs:{debugHasForcedVideoAds:r.a.boolean},defaults:function(){return{debugHasForcedVideoAds:!1,isSaving:!1,saveError:null}}});t.a=a},function(e,t,n){"use strict"
;var i=n(507),r=n(16),a=n(373),o=n(141),s=n(32),l=n(4119),c=n(23),u=n(62),d=o.a.ORIGINAL,p=i.a.extend({name:"ExperienceSettingsModel",storageKey:"experience",sessionAttrs:{isSaving:r.a.boolean,saveError:r.a.object},syncedAttrs:{audioForceMultiChannel:r.a.boolean,autoAdjustQuality:r.a.boolean,autoPlay:r.a.boolean,calendarViewType:r.a.string,columnAdjustment:r.a.integer,debugVideoQualityOverlay:r.a.boolean,extrasPrefixCount:r.a.integer,hasDismissedDVRUpsell:r.a.boolean,
hasDismissedPersonalCloudScanAlert:r.a.boolean,isNotInterestedInPersonalCloud:r.a.boolean,isSidebarExpandable:r.a.boolean,libraryRoutes:r.a.object,libraryTableColumns:r.a.object,listStyles:r.a.object,lastTypeSource:r.a.object,localQuality:r.a.integer,playThemeMusic:r.a.boolean,relayReminders:r.a.object,remoteQuality:r.a.integer,remoteSmallVideoAtOriginalQuality:r.a.boolean,restorePlayQueue:r.a.object,searchAllServers:r.a.boolean,showAdvancedSettings:r.a.boolean,showPrePlayArtwork:r.a.boolean,
subtitlesBurnLevel:r.a.string,subtitleSize:r.a.integer,timeFormat:r.a.string,typeFirstPreview:r.a.boolean,useHomeStreamingRecommendedSettings:r.a.boolean,volume:r.a.integer},syncedRelations:{homeSettings:{relationClass:l.a}},defaults:function(){var e;return{audioForceMultiChannel:!1,autoAdjustQuality:!1,autoPlay:!0,calendarViewType:c.c.CALENDAR,columnAdjustment:0,debugVideoQualityOverlay:!1,extrasPrefixCount:0,hasDismissedDVRUpsell:!1,hasDismissedPersonalCloudScanAlert:!1,
isNotInterestedInPersonalCloud:!1,isSidebarExpandable:!0,isSaving:!1,libraryRoutes:{},libraryTableColumns:{},listStyles:(e={},e[s.b]={episode:u.f,track:u.f},e[s.h]={track:u.f},e),lastTypeSource:{},localQuality:d,playThemeMusic:!1,relayReminders:{},remoteQuality:6,remoteSmallVideoAtOriginalQuality:!0,restorePlayQueue:null,saveError:null,searchAllServers:!1,showAdvancedSettings:!1,showPrePlayArtwork:!1,subtitlesBurnLevel:a.a.AUTO,subtitleSize:100,timeFormat:"h:mma",typeFirstPreview:!1,
useHomeStreamingRecommendedSettings:!0,volume:90}}});t.a=p},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(429),o=n(4120),s=i.a.extend({name:"HomeSettingsModel",syncedAttrs:{hasCustomizations:r.a.boolean.isRequired,hasSeededPreferredServerContent:r.a.boolean.isRequired,hasSeededProviderPromotedContent:r.a.boolean.isRequired,preferredServerID:r.a.string,settingsKey:r.a.string.isRequired,version:r.a.integer.isRequired},syncedRelations:{hubs:{relationClass:o.a}},defaults:function(){return{
hasCustomizations:!1,hasSeededPreferredServerContent:!1,hasSeededProviderPromotedContent:!1,settingsKey:Object(a.a)(),version:1}}});t.a=s},function(e,t,n){"use strict";var i=n(24),r=n(958),a=i.a.extend({name:"HomeHubCollection",model:r.d});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(4122),a=n(4123),o=n(4124),s=n(4125),l=n(4126),c=n(4127),u=n(1425),d=n(4130),p=n(4131),h=n(4132),f=n(4133),v=n(4134),g=n(4135),m=n(4136),y=n(4137),b=n(4138),I=n(4141),S=n(4145),M=n(4146),D=n(4147),C=n(4148),O=n(4149),P=n(4150),j=n(4151),T=n(4156),w=n(4157),E=i.a.extend({name:"DesktopUIModel",sessionRelations:{background:{relationClass:g.a},authCodeExchange:{relationClass:v.a},discoverPage:{relationClass:y.a},metadataListPage:{relationClass:S.a},libraryPage:{relationClass:I.a},
prePlayPage:{relationClass:O.a},timelinePage:{relationClass:w.a},playlistsPage:{relationClass:C.a},dvrSettingsUI:{relationClass:m.a},recordingSchedulePage:{relationClass:c.a},channelGridPage:{relationClass:a.a},mediaSubscriptionModal:{relationClass:o.a},provisionPersonalCloudServerPage:{relationClass:P.a},searchPage:{relationClass:T.a},quickSearch:{relationClass:j.a},photoPlayer:{relationClass:s.a},audioVideoPlayer:{relationClass:s.a},onlineMediaSourcesPage:{relationClass:M.a},
accountSettingsPage:{relationClass:h.a},playlistPage:{relationClass:D.a},providerSettingsPage:{relationClass:l.a},addToCatalogModal:{relationClass:f.a},multiSelect:{relationClass:u.a},serverLogPage:{relationClass:p.a},subtitlesModal:{relationClass:r.a},homePage:{relationClass:b.a},addToPlaylistModal:{relationClass:d.a}}});t.a=E},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(1233),o=i.a.extend({name:"SubtitlesModalModel",sessionAttrs:{metadataItemEntityID:r.a.string,
isSubtitlesPending:r.a.boolean,isSubtitlesPopulated:r.a.boolean,subtitlesError:r.a.string,subtitlesDownloadActivityID:r.a.string,subtitlesDownloadKey:r.a.string,isSubtitlesDownloaded:r.a.boolean,subtitlesDownloadError:r.a.string},sessionRelations:{subtitles:{relationClass:a.a,deferred:!0}},defaults:{metadataItemEntityID:null,isSubtitlesPending:!1,isSubtitlesPopulated:!1,subtitlesError:null,subtitlesDownloadActivityID:null,subtitlesDownloadKey:null,isSubtitlesDownloaded:!1,
subtitlesDownloadError:null}});t.a=o},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(1273),o=n(1274),s=i.a.extend({name:"ChannelGridPageModel",sessionAttrs:{serverEntityID:r.a.string,providerEntityID:r.a.string,containerKey:r.a.string,directoryKey:r.a.string,startTime:r.a.integer,visibleColumns:r.a.integer,columnTimes:r.a.array,columnWidth:r.a.float,viewportWidth:r.a.integer,viewportHeight:r.a.integer,airedProgress:r.a.float,isChannelsListPending:r.a.boolean,
isChannelsListPopulated:r.a.boolean,channelsListError:r.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(17),r=n(16),a=n(577),o=n(1175),s=i.a.extend({
name:"MediaSubscriptionModalModel",sessionAttrs:{isMediaSubscriptionPending:r.a.boolean,isMediaSubscriptionPopulated:r.a.boolean,mediaSubscriptionError:r.a.object,isMediaSubscriptionSaving:r.a.boolean,mediaSubscriptionSaveError:r.a.object,isMediaSubscriptionMoving:r.a.boolean,mediaSubscriptionMoveError:r.a.object,isMediaSubscriptionDeleting:r.a.boolean,mediaSubscriptionDeleteError:r.a.object},sessionRelations:{templates:{relationClass:o.a,deferred:!0},mediaSubscription:{relationClass:a.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(17),r=n(16),a=n(221),o=n(1135),s=n(190),l=i.a.extend({name:"PlayerModel",sessionAttrs:{serverEntityID:r.a.string,providerEntityID:r.a.string,
isOpen:r.a.boolean,previousOpenState:r.a.oneOf(s.a,s.b),openState:r.a.oneOf(s.a,s.b),isPlayQueueVisible:r.a.boolean,isAlsoAiringVisible:r.a.boolean,isLyricsVisible:r.a.boolean,isPostPlayVisible:r.a.boolean,isSettingsVisible:r.a.boolean,isChaptersVisible: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,playbackTime: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,playbackStartTime:r.a.integer,hasConflicts:r.a.boolean.isRequired,
isConflictCancelling:r.a.boolean,cancelConflictError:r.a.object,confirmLiveTVPlayback:r.a.boolean.isRequired},sessionRelations:{playQueue:{relationClass:i.a,deferred:!0},relatedHubs:{relationClass:a.default,deferred:!0},liveTVSession:{relationClass:o.a,deferred:!0}},defaults:function(){return{isOpen:!1,isPlayQueueVisible:!1,isAlsoAiringVisible:!1,isLyricsVisible:!1,isPostPlayVisible:!1,isSettingsVisible:!1,isChaptersVisible:!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,playbackTime: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,playbackStartTime:null,
hasConflicts:!1,isConflictCancelling:!1,cancelConflictError:null,confirmLiveTVPlayback:!1}}});t.a=l},function(e,t,n){"use strict";var i=n(17),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(17),r=n(16),a=n(1334),o=n(1335),s=i.a.extend({name:"RecordingSchedulePageModel",sessionAttrs:{
isPagePopulated:r.a.boolean,isMediaSubscriptionsPending:r.a.boolean,isMediaSubscriptionsPopulated:r.a.boolean,mediaSubscriptionsError:r.a.object,isCalendarPending:r.a.boolean,isCalendarPopulated:r.a.boolean,calendarError:r.a.object},sessionRelations:{mediaSubscriptions:{relationClass:o.a,deferred:!0},calendar:{relationClass:a.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(24),r=n(4129),a=i.a.extend({name:"MultiSelectItemCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"MultiSelectItemModel",sessionAttrs:{id:r.a.any.isRequired,type:r.a.string.isRequired},sessionRelations:{model:{relationClass:i.a,deferred:!0}}});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=n(994),o=n(107),s=n(92),l=n(315),c=n(108),u=n(1425),d=i.a.extend({name:"AddToPlaylistModalModel",sessionAttrs:{providerEntityID:r.a.string,containerKey:r.a.string,type:r.a.string,title:r.a.string,uri:r.a.string,smart:r.a.boolean,readOnly:r.a.boolean,isUpdating:r.a.boolean,error:r.a.object},sessionRelations:{server:{relationClass:c.c,deferred:!0},provider:{relationClass:l.a,deferred:!0},metadataItem:{relationClass:s.a,deferred:!0},metadataList:{relationClass:o.default,
deferred:!0},multiSelect:{relationClass:u.a,deferred:!0},playQueue:{relationClass:a.a,deferred:!0},playlists:{relationClass:o.default,deferred:!0}},defaults:{title:"",smart:!1,readOnly:!1,isUpdating:!1}});t.a=d},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"ServerLogPageModel",sessionAttrs:{logLines:r.a.array.isRequired,unfilteredLogLinesCount:r.a.integer.isRequired,filter:r.a.string.isRequired,logLevels:r.a.array.isRequired,highlightedLineIndex:r.a.integer,
timeFilterStart:r.a.string.isRequired,timeFilterEnd:r.a.string.isRequired,showTimeFilter:r.a.boolean.isRequired,showRawText:r.a.boolean.isRequired},defaults:function(){return{logLines:[],unfilteredLogLinesCount:0,filter:"",logLevels:[],timeFilterStart:"",timeFilterEnd:"",showRawText:!1,showTimeFilter:!1}}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"AccountSettingsPageModel",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(17),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(17),r=n(16),a=i.a.extend({name:"AuthCodeExchangeModel",sessionAttrs:{code:r.a.string,pinID:r.a.integer,pinIDInitial:r.a.integer,pinTimeout:r.a.integer,
authToken:r.a.string,isBusy:r.a.boolean.isRequired,errorMessage:r.a.string,fatalErrorMessage:r.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(17),r=n(16),a=n(315),o=n(108),s=i.a.extend({name:"BackgroundModel",sessionAttrs:{imageUrl:r.a.string,themeMusicUrl:r.a.string,allowLightPreset:r.a.boolean,isBackgroundPending:r.a.boolean},sessionRelations:{server:{
relationClass:o.c,deferred:!0},provider:{relationClass:a.a,deferred:!0}},defaults:{allowLightPreset:!1,isBackgroundPending:!1}});t.a=s},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(1011),o=n(542),s=i.a.extend({name:"DVRSettingsUIModel",sessionAttrs:{isDvrsPending:r.a.boolean,isDvrsPopulated:r.a.boolean,dvrsError:r.a.object,isUIPopulated:r.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(17),r=n(16),a=n(221),o=i.a.extend({name:"DiscoverPageModel",sessionAttrs:{providerEntityID:r.a.string,hubKey:r.a.string,isHubsPending:r.a.boolean.isRequired,isHubsPopulated:r.a.boolean.isRequired,hubsError:r.a.object,isPromotedHubsPending:r.a.boolean.isRequired,isPromotedHubsPopulated:r.a.boolean.isRequired,promotedHubsError:r.a.object,knownPromotedHubCloudProviderIDs:r.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(17),r=n(16),a=n(4139),o=i.a.extend({name:"HomePageModel",sessionAttrs:{isContentPending:r.a.boolean.isRequired,
isContentPopulated:r.a.boolean.isRequired,contentError:r.a.object,isPreferredServerContentPending:r.a.boolean.isRequired,isPreferredServerContentPopulated:r.a.boolean.isRequired,preferredServerContentError:r.a.object,isProviderPromotedContentPending:r.a.boolean.isRequired,isProviderPromotedContentPopulated:r.a.boolean.isRequired,providerPromotedContentError:r.a.object},sessionRelations:{homeHubStatuses:{relationClass:a.a}},defaults:function(){return{isContentPending:!0,isContentPopulated:!1,
contentError:null,isPreferredServerContentPending:!0,isPreferredServerContentPopulated:!1,preferredServerContentError:null,isProviderPromotedContentPending:!0,isProviderPromotedContentPopulated:!1,providerPromotedContentError:null}}});t.a=o},function(e,t,n){"use strict";var i=n(24),r=n(4140),a=i.a.extend({name:"HomeHubStatusCollection",model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(512),o=i.a.extend({name:"HomeHubStatusModel",idAttribute:"homeHubID",sessionAttrs:{
error:r.a.object,homeHubID:r.a.string.isRequired,isPending:r.a.boolean.isRequired,isPopulated:r.a.boolean.isRequired,provider:r.a.string,server:r.a.string},sessionRelations:{hub:{relationClass:a.a,deferred:!0}},defaults:function(){return{error:null,isPending:!0,isPopulated:!1}}});t.a=o},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(513),o=n(669),s=n(424),l=n(107),c=n(665),u=n(1426),d=i.a.extend({name:"LibraryPageModel",sessionAttrs:{providerEntityID:r.a.string,libraryKey:r.a.string,
containerKey:r.a.string,isDetailsPending:r.a.boolean.isRequired,isDetailsPopulated:r.a.boolean.isRequired,detailsError:r.a.object,isFirstCharactersPending:r.a.boolean.isRequired,isFirstCharactersPopulated:r.a.boolean.isRequired,firstCharactersError:r.a.object,selectedFilterKey:r.a.string,filterOptionQuery:r.a.string,isSelectedFilterOptionsPending:r.a.boolean.isRequired,isSelectedFilterOptionsPopulated:r.a.boolean.isRequired,selectedFilterOptionsError:r.a.object,
isQueryParsePending:r.a.boolean.isRequired,isQueryParsePopulated:r.a.boolean.isRequired,queryParseError:r.a.object,typeKey:r.a.string},sessionRelations:{metadataList:{relationClass:l.default,deferred:!0},directoryList:{relationClass:c.a,deferred:!0},details:{relationClass:s.a,deferred:!0},firstCharacters:{relationClass:o.a,deferred:!0},selectedFilterOptions:{relationClass:a.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(24),r=n(4143),a=i.a.extend({name:"QueryLimitCollection",model:r.a});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=i.a.extend({name:"QueryLimitModel",rootPropertyName:"Limit",syncedAttrs:{limit:r.a.integer,unit:r.a.string}});t.a=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(24),r=n(1427),a=i.a.extend({name:"QueryRuleCollection",model:r.a});t.default=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(107),o=i.a.extend({name:"MetadataListPageModel",sessionAttrs:{providerEntityID:r.a.string,listKey:r.a.string},sessionRelations:{
metadataList:{relationClass:a.default,deferred:!0}}});t.a=o},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(1407),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(17),r=n(16),a=n(92),o=n(670),s=i.a.extend({name:"PlaylistPageModel",sessionAttrs:{serverEntityID:r.a.string,providerEntityID:r.a.string,metadataKey:r.a.string,isPlaylistPending:r.a.boolean.isRequired,
isPlaylistPopulated:r.a.boolean.isRequired,playlistError:r.a.object,isPlaylistItemListPending:r.a.boolean.isRequired,isPlaylistItemListPopulated:r.a.boolean.isRequired,playlistItemListError:r.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(17),r=n(16),a=n(424),o=n(434),s=n(107),l=i.a.extend({name:"PlaylistsPageModel",sessionAttrs:{serverEntityID:r.a.string,libraryKey:r.a.string,containerKey:r.a.string,isLibraryDetailsPending:r.a.boolean.isRequired,isLibraryDetailsPopulated:r.a.boolean.isRequired,libraryDetailsError:r.a.object,isSortsPending:r.a.boolean.isRequired,isSortsPopulated:r.a.boolean.isRequired,sortsError:r.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(17),r=n(16),a=n(221),o=n(107),s=n(92),l=i.a.extend({name:"PrePlayPageModel",sessionAttrs:{providerEntityID:r.a.string,metadataKey:r.a.string,descendantKey:r.a.string,siblingKey:r.a.string,
isMetadataItemPending:r.a.boolean.isRequired,isMetadataItemPopulated:r.a.boolean.isRequired,metadataItemError:r.a.object,isRelatedHubsPending:r.a.boolean.isRequired,isRelatedHubsPopulated:r.a.boolean.isRequired,relatedHubsError:r.a.object,isAugmentedHubsPending:r.a.boolean.isRequired,isAugmentedHubsPopulated:r.a.boolean.isRequired,augmentedHubsError:r.a.object,isFileUnavailable:r.a.boolean,decisionMediaItem:r.a.object},sessionRelations:{metadataItem:{relationClass:s.a,deferred:!0},
descendantList:{relationClass:o.default,deferred:!0},siblingList:{relationClass:o.default,deferred:!0},relatedHubs:{relationClass:a.default,deferred:!0},augmentedHubs:{relationClass:a.default,deferred:!0}},defaults:{isMetadataItemPending:!0,isMetadataItemPopulated:!1,metadataItemError:null,isRelatedHubsPending:!0,isRelatedHubsPopulated:!1,relatedHubsError:null,isAugmentedHubsPending:!0,isAugmentedHubsPopulated:!1,augmentedHubsError:null,isFileUnavailable:!1}});t.a=l},function(e,t,n){"use strict"
;var i=n(17),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(17),r=n(16),a=n(1428),o=i.a.extend({name:"QuickSearchModel",sessionAttrs:{query:r.a.string,serverEntityID:r.a.string,providerEntityID:r.a.string,providerIdentifier:r.a.string,sectionID:r.a.string,selectedResultEntityID:r.a.string,channelPlaceholder:r.a.string,channelID:r.a.string,channelSearchKey:r.a.string},sessionRelations:{searches:{relationClass:a.a}},defaults:{query:"",selectedResultEntityID:null}});t.a=o
},function(e,t,n){"use strict";var i=n(24),r=n(97),a=n(4153),o=i.a.extend({name:"SearchHubCollection",context:["server","provider"],model:a.a,responseType:function(){return Object(r.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(97),o=n(4154),s=i.a.extend({name:"SearchHubModel",context:["server","provider"],responseType:function(){return Object(a.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(24),r=n(97),a=n(4155),o=i.a.extend({name:"SearchResultCollection",context:["server","provider","metricsContext"],model:a.a,responseType:function(){
return Object(r.a)(this.server)}});t.a=o},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(12),o=n.n(a),s=n(17),l=n(16),c=n(92),u=n(1089),d=n(97),p=n(38),h=n(224),f=s.a.extend({name:"SearchResultModel",context:["server","provider","metricsContext"],entityType:h.SEARCH_RESULT,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(p.a)(this.entityType,e.key,this.provider&&this.provider.entityID(),this.server.entityID())},
responseType:function(){return Object(d.a)(this.server)},idAttribute:"key",syncedAttrs:{key:l.a.string,reasonID:l.a.integer,reason:l.a.string,reasonTitle:l.a.string},syncedRelations:{metadataItem:{relationClass:c.a,deferred:!0},tagItem:{relationClass:u.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";var i=n(17),r=n(1428),a=i.a.extend({name:"SearchPageModel",sessionRelations:{searches:{relationClass:r.a}}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(424),o=n(1429),s=n(107),l=i.a.extend({name:"TimelinePageModel",sessionAttrs:{serverEntityID:r.a.string,providerEntityID:r.a.string,momentKey:r.a.string,isDetailsPending:r.a.boolean.isRequired,isDetailsPopulated:r.a.boolean.isRequired,detailsError:r.a.object,
isMomentListPending:r.a.boolean.isRequired,isMomentListPopulated:r.a.boolean.isRequired,momentListError:r.a.object},sessionRelations:{metadataList:{relationClass:s.default,deferred:!0},details:{relationClass:a.a,deferred:!0},momentList:{relationClass:o.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(24),r=n(4159),a=i.a.extend({
name:"MomentCollection",context:["server","provider"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"MomentModel",context:["server","provider"],idAttribute:"id",rootPropertyName:"Directory",syncedAttrs:{id:r.a.string,title:r.a.string,size:r.a.integer,avgAR:r.a.float,startsAt:r.a.integer,endsAt:r.a.integer}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(4161),o=n(4164),s=i.a.extend({name:"CloudServerFlexModel",context:["server"],
sessionAttrs:{isPersonalCloudServerRestarting:r.a.boolean,personalCloudServerRestartError:r.a.object,isOauthProvidersPending:r.a.boolean,isOauthProvidersPopulated:r.a.boolean,oauthProvidersError:r.a.object,isPersonalCloudServerStatusPending:r.a.boolean,isPersonalCloudServerStatusPopulated:r.a.boolean,personalCloudServerStatusError:r.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(24),r=n(65),a=n(4162),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(17),r=n(16),a=n(4163),o=i.a.extend({name:"OauthProviderModel",rootPropertyName:"provider",sessionAttrs:{isUnlinking:r.a.boolean.isRequired,unlinkError:r.a.object},syncedAttrs:{authName:r.a.string,image:r.a.string,label:r.a.string.isRequired,linked:r.a.boolean.isRequired,nickname:r.a.string,url:r.a.string.isRequired},syncedRelations:{usage:{relationClass:a.a}},defaults:{isUnlinking:!1}});t.a=o},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"OauthProviderUsageModel",
syncedAttrs:{plexCloud:r.a.boolean,cloudSync:r.a.boolean,federatedAuth:r.a.boolean,other:r.a.boolean}});t.a=a},function(e,t,n){"use strict";var i=n(17),r=n(16),a=i.a.extend({name:"PersonalCloudServerStatusModel",context:["server"],url:"/api/v2/cloud_server",syncedAttrs:{running:r.a.boolean,startedAt:r.a.integer,finishedAt:r.a.integer,exitCode:r.a.integer,error:r.a.string},defaults:{running:!1}});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=n(57),o=n(671),s=n(4166),l=n(4168),c=n(4169),u=n(516),d=n(313),p=n(4172),h=n(4173),f=n(4175),v=n(4177),g=i.a.extend({name:"ServerFlexModel",context:["server"],sessionAttrs:{update:r.a.instanceOf(p.a),alerts:r.a.instanceOf(c.a).isRequired,hasiTunes:r.a.boolean,isSettingsPending:r.a.boolean,isSettingsPopulated:r.a.boolean,settingsError:r.a.object,isLibrariesPending:r.a.boolean.isRequired,isLibrariesPopulated:r.a.boolean.isRequired,librariesError:r.a.object,
cleanBundlesError:r.a.string,optimizeDatabaseError:r.a.string},sessionRelations:{settings:{relationClass:d.a,rootPropertyName:"Setting"},cloudAccount:{relationClass:u.i},libraries:{relationClass:o.a},sessions:{relationClass:v.a},activities:{relationClass:l.a},transcodeJobs:{relationClass:h.a},backgroundTranscodeJobs:{relationClass:f.a},players:{relationClass:s.a}},defaults:function(){return{update:a.a.get("allowServerUpdates")?new p.a({},{server:this.server}):null,alerts:new c.a([],{
server:this.server}),hasiTunes:!1,isSettingsPending:!0,isSettingsPopulated:!1,settingsError:null,isLibrariesPending:!0,isLibrariesPopulated:!1,librariesError:null,cleanBundlesError:null,optimizeDatabaseError:null}}});t.a=g},function(e,t,n){"use strict";var i=n(15),r=n(24),a=n(4167),o=r.a.extend({name:"PlexPlayerCollection",context:["server"],model:a.a,url:"/clients",augmentResponse:function(e){var t=Object(i.c)("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(17),r=n(16),a=i.a.extend({name:"PlexPlayerModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",sessionAttrs:{volume:r.a.integer},syncedAttrs:{machineIdentifier:r.a.string,name:r.a.string,address:r.a.string,port:r.a.string,
deviceClass:r.a.string,version:r.a.string,product:r.a.string,protocol:r.a.string,protocolVersion:r.a.string,protocolCapabilities:r.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(24),r=n(97),a=n(164),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(7),r=n.n(i),a=n(4170),o=n(4171),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(220),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(160),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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(160),l=n(91),c=s.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")?s.a.prototype.fetch.apply(this,arguments):r.a.Deferred().reject().promise()},convert:function(e){var t=o.a.isObject(e)?e:l.a.parseXML(e);return l.a.parseBoolean(t,"canInstall"),l.a.parseInteger(t,"status"),t.Release&&l.a.parseInteger(t.Release,"progress"),t},parse:function(e,t){var n=this.convert(e);return n=o.a.extend(n,n.Release),n=o.a.pick(n,this.whitelistedAttrs),0!==n.status&&(n.state="error"),n}});t.a=c},function(e,t,n){"use strict"
;var i=n(24),r=n(4174),a=n(508),o=i.a.extend({name:"TranscodeJobCollection",context:["server"],model:r.a,cache:new a.a,url:"/sync/transcodeQueue"});t.a=o},function(e,t,n){"use strict";var i=n(17),r=n(16),a=n(97),o=n(38),s=n(224),l=i.a.extend({name:"TranscodeJobModel",context:["server"],entityType:s.TRANSCODE_JOBS,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(o.a)(this.entityType,e.syncItemId,this.server.entityID())},
idAttribute:"syncItemId",rootPropertyName:"TranscodeJob",syncedAttrs:{syncItemId:r.a.integer,syncItemTitle:r.a.string,key:r.a.string,type:r.a.string,progress:r.a.float,speed:r.a.float,remaining:r.a.string,size:r.a.string,title:r.a.string,thumb:r.a.string},responseType:function(){return Object(a.a)(this.server)}});t.a=l},function(e,t,n){"use strict";var i=n(24),r=n(4176),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(17),r=n(16),a=n(38),o=n(224),s=i.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:r.a.integer,generatorID:r.a.integer,targetTagID:r.a.integer,syncItemId:r.a.integer,
syncItemTitle:r.a.string,key:r.a.string,type:r.a.string,progress:r.a.float,speed:r.a.float,remaining:r.a.integer,size:r.a.integer,ratingKey:r.a.string,title:r.a.string,thumb:r.a.string}});t.a=s},function(e,t,n){"use strict";var i=n(311),r=n(65),a=n(4178),o=i.default.extend({name:"SessionCollection",model:a.a,url:"/status/sessions",responseType:function(){return r.a.xml}});t.a=o},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(16),o=n(92),s=n(65),l=n(260),c=n(38),u=n(43),d=o.a.extend({
name:"SessionModel",entityType:u.n,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(c.a)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new l.a,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},mergeStrategy:null,responseType:function(){return s.a.xml},syncedAttrs:r()({},o.a.prototype.syncedAttrs,{sessionKey:a.a.string,Player:a.a.object,Session:a.a.object,User:a.a.object,
TranscodeSession:a.a.object,delegated:a.a.boolean}),defaults:r()({},o.a.prototype.defaults,{delegated:!1})});t.a=d},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(16),o=n(4180),s=n(4182),l=n(4183),c=n(4185),u=n(4187),d=n(4189),p=n(4190),h=n(4194),f=n(4196),v=d.a.prototype,g=d.a.extend({sessionAttrs:r()({},v.sessionAttrs,{friends:a.a.instanceOf(s.a).isRequired,socialNetworks:a.a.instanceOf(u.a).isRequired,isPlansPending:a.a.boolean.isRequired,isPlansPopulated:a.a.boolean.isRequired,
plansError:a.a.object,isAllFriendsPending:a.a.boolean.isRequired,isAllFriendsPopulated:a.a.boolean.isRequired,allFriendsError:a.a.object,isDeletingAvatar:a.a.boolean.isRequired,isUpdatingUser:a.a.boolean.isRequired,updateUserError:a.a.object,isWebhooksPending:a.a.boolean,isWebhooksPopulated:a.a.boolean,webhooksError:a.a.object,isUpdatingWebhooks:a.a.boolean,isRemovingWebhooks:a.a.boolean,updateWebhooksError:a.a.object}),sessionRelations:r()({},v.sessionRelations,{devices:{relationClass:p.a},
announcements:{relationClass:o.a},allFriends:{relationClass:l.a},invites:{relationClass:c.a},sentInvites:{relationClass:c.a,options:{subset:"requested"}},plans:{relationClass:h.a},webhooks:{relationClass:f.a}}),defaults:function(){var e={server:this.server,parent:this};return r()({},v.defaults,{friends:new s.a([],e),socialNetworks:new u.a([],e),isPlansPending:!0,isPlansPopulated:!1,plansError:null,isAllFriendsPending:!0,isAllFriendsPopulated:!1,allFriendsError:null,isDeletingAvatar:!1,
isUpdatingUser:!1,updateUserError:null,isWebhooksPending:!1,isWebhooksPopulated:!1,webhooksError:null,isUpdatingWebhooks:!1,isRemovingWebhooks:!1,updateWebhooksError:null})}});t.a=g},function(e,t,n){"use strict";var i=n(24),r=n(4181),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(17),r=n(16),a=i.a.extend({name:"AnnouncementModel",context:["server"],rootPropertyName:"Announcement",syncedAttrs:{
id:r.a.integer,title:r.a.string,content:r.a.string,imageUrl:r.a.string,style:r.a.string,url:r.a.string,expireAt:r.a.string,notifyAt:r.a.string,read:{type:r.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(551),r=n.n(i),a=n(220),o=n(1048),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(24),r=n(4184),a=i.a.extend({name:"FriendCollection2",context:["server"],model:r.a,url:"/api/users"});t.a=a},function(e,t,n){"use strict"
;var i=n(17),r=n(16),a=n(38),o=n(43),s=i.a.extend({name:"FriendModel2",context:["server"],rootPropertyName:"User",entityType:o.a,entityID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state;return Object(a.a)(this.entityType,e.id)},url:function(){return this.get("home")?"/api/users":"/api/friends"},syncedAttrs:{id:r.a.integer,home:r.a.boolean,protected:r.a.boolean,restricted:r.a.boolean,title:r.a.string,username:r.a.string,email:r.a.string,thumb:r.a.string,
recommendationsPlaylistId:r.a.string,allowSync:{type:r.a.boolean,save:!0},allowCameraUpload:{type:r.a.boolean,save:!0},allowChannels:{type:r.a.boolean,save:!0},allowTuners:{type:r.a.boolean,save:!0},filterMovies:{type:r.a.queryString,separator:"|",save:!0},filterTelevision:{type:r.a.queryString,separator:"|",save:!0},filterMusic:{type:r.a.queryString,separator:"|",save:!0},filterPhotos:{type:r.a.queryString,separator:"|",save:!0}}});t.a=s},function(e,t,n){"use strict"
;var i=n(551),r=n.n(i),a=n(24),o=n(4186),s=a.a.extend({name:"InviteCollection",context:["server","subset"],model:o.a,url:function(){return"/api/invites/"+this.subset},initialize:function(e,t){t||(t={}),this.subset=t.subset||"requests"},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(7),r=n.n(i),a=n(364),o=n(19),s=n(17),l=n(16),c=s.a.extend({name:"InviteModel",context:["server"],rootPropertyName:"Invite",syncedAttrs:{id:{type:l.a.string,save:!0},friend:l.a.boolean,home:l.a.boolean,server:l.a.boolean,friendlyName:l.a.string,username:l.a.string,email:l.a.string,thumb:l.a.string,createdAt:l.a.integer,Server:l.a.array},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},augmentResponse:function(e){return e.Server?((Array.isArray(e.Server)?e.Server:[e.Server]).forEach(function(e){e.numLibraries=Object(a.a)(e.numLibraries)}),e):e}});t.a=c},function(e,t,n){"use strict";var i=n(220),r=n(4188),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(7),r=n.n(i),a=n(160),o=n(91),s=a.a.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],convert:function(e){var t=r.a.isObject(e)?e:o.a.parseXML(e);return o.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(17),r=n(16),a=n(935),o=i.a.extend({
name:"UserFlexModel",context:["server"],sessionAttrs:{isProvidersPending:r.a.boolean.isRequired,isProvidersPopulated:r.a.boolean.isRequired,providersError:r.a.object,hasAttemptedPopulateAllProviders:r.a.boolean.isRequired},sessionRelations:{providers:{relationClass:a.a}},defaults:{isProvidersPending:!0,isProvidersPopulated:!1,providersError:null,hasAttemptedPopulateAllProviders:!1}});t.a=o},function(e,t,n){"use strict";var i=n(7),r=n.n(i),a=n(24),o=n(4191),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)},filterByPlatforms:function(e){var t=this.filter(function(t){return r.a.contains(e,t.get("platform"))});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(17),r=n(16),a=n(4192),o=i.a.extend({name:"DeviceModel",context:["server"],rootPropertyName:"Device",url:function(){return"/devices/"+this.id+".xml"},syncedAttrs:{id:r.a.string,clientIdentifier:r.a.string,
name:r.a.string,product:r.a.string,productVersion:r.a.string,platform:r.a.string,platformVersion:r.a.string,device:r.a.string,model:r.a.string,provides:r.a.list,screenResolution:r.a.string,screenDensity:r.a.string,lastSeenAt:r.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(17),r=n(16),a=n(312),o=n(4193),s={ACTIVE:"active",SNOOZED:"snoozed",DEAD:"dead"},l=i.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=a.a.addVersionHeaderForDevice(this.get("device"),n);return i.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(24),r=n(680),a=i.a.extend({name:"SyncItemCollection",context:["server","device"],model:r.a});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(4195),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(17),r=n(16),a=i.a.extend({name:"SubscriptionPlanModel",context:["server"],rootPropertyName:"plan",syncedAttrs:{id:r.a.string,name:r.a.string,price:r.a.float,formattedPrice:r.a.string,currency:r.a.string}});t.a=a},function(e,t,n){"use strict";var i=n(24),r=n(65),a=n(4197),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(17),r=n(16),a=i.a.extend({name:"WebhookModel",syncedAttrs:{url:r.a.string},defaults:{url:""}});t.a=a},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(4199),a=n(4200)},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(36),n(431),n(17)},function(e,t,n){"use strict"
;var i=n(847),r=n(216),a=n(1100),o=n(1174),s=n(186),l=n(1242),c=n(782),u=n(470),d=n(136),p=n(353),h=n(816),f=n(1406),v=n(390),g=n(68),m=n(4201),y=n(726),b=n(167),I=n(135),S=n(341),M=n(414),D=n(837),C=n(392),O=n(183),P=n(863),j=n(4202),T=n(4203),w=n(540),E=n(155),x=n(849),A=n(4204),N=n(4205),L=n(4206),k=n(1238),_=n(4207),R=n(753),z=n(246),U=n(4208),B=n(1389),F=n(252),V=n(4209),H=n(4210),Q=n(4211),Y=n(4212),G=n(131),W=n(244),K=n(1405),q=n(1244),Z=n(204),X=[q.a,C.b,K.a,W.a,g.a,Z.s,O.m,y.f,b.metadataActionHandlers,I.d,S.l,M.b,D.e,i.e,f.c,G.d,j.a,T.a,N.a,A.a,F.h,Y.a,B.a,P.a,U.a,V.a,r.a,v.f,h.d,x.e,a.b,H.a,Q.a,w.c,E.k,m.a,p.recordingSchedulePageActionHandlers,o.e,c.c,u.c,d.l,s.f,_.a,k.a,l.b,z.h,R.c,L.a]
;t.a=X},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(f.default)("Unable to fetch Guide settings")})})}var s,l=n(6),c=n.n(l),u=n(19),d=n(110),p=n(43),h=n(656),f=n(3),v=n(111),g=n(543),m=Object(d.a)((s={},s[v.Z]=function(e,t){a(e,t).restoreDefaults()},s[v.k]=function(e,t,n){var r=i(e,t);o(e,t,"countries").done(function(){var e=r.get("countryCode");e&&n(Object(g.selectEPGCountry)(c()({},t,{countryCode:e
})))})},s[v.l]=function(e,t,n){var i=a(e,t);o(e,t,"languages").done(function(){var e=i.get("selectedCountry");e&&n(Object(g.selectEPGLanguage)(c()({},t,{languageCode:e.get("language")})))})},s[v._2]=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=u.join([i.get("baseUrl"),r.get("key")]);n(Object(g.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(g.fetchEPGLineups)(t)))}},s[v._3]=function(e,t,n){var i=a(e,t),r=i.get("languages").get(t.languageCode);i.set("selectedLanguage",r)},s[v._4]=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(g.fetchEPGLineups)(t))},s[v._9]=function(e,t,n){var i=a(e,t),r=t.postalCode
;i.set("postalCode",r),i.get("lineupGroup").get("lineups").reset()},s[v.m]=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:u.join(s,l)})},s));t.a=m},function(e,t,n){"use strict";function i(e){return e.get("ui").get("background")}var r,a=n(110),o=n(116),s=n(111),l=Object(a.a)((r={},r[s.a]=function(e,t){
var n=t.serverEntityID,r=t.providerEntityID,a=t.imageUrl,s=t.allowLightPreset,l=void 0!==s&&s,c=i(e),u=n?Object(o.i)(e,t):void 0,d=r?Object(o.f)(e,t):void 0;c.set({server:u,provider:d,imageUrl:a,allowLightPreset:l,isBackgroundPending:!1})},r[s.d]=function(e,t){var n=t.serverEntityID,r=t.theme,a=i(e),s=n?Object(o.i)(e,t):void 0,l=s&&r?s.resolveUrl(r,{appendHeaders:!0}):void 0;a.set("themeMusicUrl",l)},r[s.Y]=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("discoverPage")}var r,a=n(13),o=n.n(a),s=n(29),l=n(221),c=n(512),u=n(110),d=n(109),p=n(1215),h=n(66),f=n(152),v=n(135),g=n(844),m=n(131),y=n(438),b=n(116),I=n(111),S=Object(u.a)((r={},r[I.z]=function(e,t){var n=i(e),r=Object(b.i)(e,t),a=Object(b.f)(e,t),o=t.providerEntityID,s=t.hubKey;if(o!==n.get("providerEntityID")||s!==n.get("hubKey")){var c=new l.default([],{server:r,provider:a,hubKey:s,count:16,includeEmpty:!0,includeTypeFirst:Object(y.a)(),
includeFeaturedTags:!0,includeStations:!0,includeExternalMetadata:!0,excludes:["playlists"]}),u=new l.default([],{server:e.get("cloudServer"),url:"https://services.provider.plex.tv/home/hubs",deferred:!0});n.restoreDefaults({providerEntityID:o,hubKey:s,hubs:c,promotedHubs:u})}},r[I.n]=Object(d.a)({key:"hubs",getModel:i}),r[I.t]=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(p.a)(a);if(!o)return void s.a.error('Hub source "'+a+'" not in correct format.');var l=Object(b.l)(e,o);if(!l)return void s.a.error('Server with entity id "'+l.serverEntityID+'" not found.');var u=Object(b.k)(e,o);if(!u)return void s.a.error('Provider with entity id "'+o.providerEntityID+'" not found.');var d=new c.a(t,{server:l,provider:u,parse:!0});r.add(d);var f=Object(h.l)(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(f.a)(t)})})},r[I.Q]=function(e,t,n){i(e).get("isPromotedHubsPopulated")||n(Object(g.b)(t))},r[m.a]=function(e,t,n){if(!t.metadataItemEntityID&&!t.containerKeyPattern){var r=Object(b.i)(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(v.h)({metadataListEntityID:t.entityID(),count:o.count}))})}},r));t.a=S},function(e,t,n){"use strict";function i(e){return e.get("ui").get("libraryPage")}var r,a=n(6),o=n.n(a),s=n(7),l=n.n(s),c=n(19),u=n(513),d=n(669),p=n(424),h=n(107),f=n(665),v=n(110),g=n(109),m=n(223),y=n(26),b=n(1426),I=n(135),S=n(131),M=n(116),D=n(606),C=n(111),O=n(257),P=Object(v.a)((r={},r[C.A]=function(e,t){
var n=i(e),r=n.get("details"),a=Object(M.i)(e,t),o=Object(M.f)(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 p.a({key:l},{server:a,provider:o,includeAdvanced:!0,includeCollections:o.get("isLibraryProvider")}),
n.restoreDefaults(c)}},r[C.C]=function(e,t){var n=i(e),r=n.get("queryParse"),a=Object(M.i)(e,t),o=Object(M.f)(e,t),s=t.containerKey,l=t.typeKey,u=t.firstCharacterKey,p=t.queryParseKey;if(s!==n.get("containerKey")||l!==n.get("typeKey")){var f=n.get("details").get("types"),v=f.get(l),g=v&&y.q(v.get("type")),m=g&&g.typeString===y.l,I=new h.default({containerKey:s},{server:a,provider:o,includeCollections:o.get("isLibraryProvider")?1:0,includeRelated:m?1:0}),S=new d.a([],{server:a,provider:o,
url:c.join(u,{includeCollections:1})}),D={containerKey:s,typeKey:l,firstCharacters:S,metadataList:I,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,firstCharactersError:null};r&&r.get("key")===p||(D.queryParse=new b.a({key:p},{server:a}),D.isQueryParsePending=!0,D.isQueryParsePopulated=!1,D.queryParseError=null),n.set(D)}},r[C.B]=function(e,t){var n=i(e),r=Object(M.i)(e,t),a=Object(M.f)(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[C.o]=Object(g.a)({key:"details",getModel:i}),r[C.L]=Object(m.a)({key:"details",actionSuffix:"libraryDetails",getModel:i}),r[C.q]=Object(g.a)({key:"firstCharacters",getModel:i}),r[C.N]=Object(m.a)({key:"firstCharacters",actionSuffix:"libraryFirstCharacters",getModel:i}),r[C.u]=Object(g.a)({key:"queryParse",getModel:i}),r[C.R]=Object(m.a)({key:"queryParse",getModel:i}),r[S.a]=function(e,t,n){
var r=t.metadataItemEntityID,a=t.containerKeyPattern;if(!r){var o=Object(M.i)(e,t),s=i(e),l=s.get("metadataList");l&&l.server===o&&(a&&!l.get("containerKey").match(a)||(n(Object(I.h)({metadataListEntityID:l.entityID()})),n(Object(O.fetchLibraryFirstCharacters)())))}},r[C._5]=function(e,t){var n=i(e),r=n.get("selectedFilterOptions"),a=Object(M.i)(e,t),o=Object(M.f)(e,t),s=t.key,l={selectedFilterKey:s};r&&r.url===s||(l.selectedFilterOptions=new u.a([],{server:a,provider:o,url:s}),
l.isSelectedFilterOptionsPending=!0,l.isSelectedFilterOptionsPopulated=!1,l.selectedFilterOptionsError=null),n.set(l)},r[C.h]=function(e){i(e).set({selectedFilterKey:void 0,selectedFilterOptions:void 0,filterOptionQuery:""})},r[C.p]=Object(g.a)({key:"selectedFilterOptions",getModel:i}),r[C.M]=Object(m.a)({key:"selectedFilterOptions",actionSuffix:"libraryFilterOptions",getModel:i}),r[C._1]=function(e,t){i(e).set("filterOptionQuery",t)},r[C._6]=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(D.a)(i,r),u=e.get("experienceSettings"),d=u.get("libraryTableColumns"),p=a.map(function(e){return e.key}).concat(s);u.save("libraryTableColumns",o()({},d,(n={},n[c]=p,n)))}},r[C.i]=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(D.a)(i,r),d=e.get("experienceSettings"),p=d.get("libraryTableColumns"),h=a.slice(0,c).concat(a.slice(c+1)).map(function(e){return e.key});d.save("libraryTableColumns",o()({},p,(n={},n[u]=h,n)))}}},r));t.a=P},function(e,t,n){"use strict";function i(e){return e.get("ui").get("metadataListPage")}var r,a=n(107),o=n(110),s=n(135),l=n(131),c=n(116),u=n(111),d=Object(o.a)((r={},r[u.D]=function(e,t){
var n=i(e),r=Object(c.i)(e,t),o=Object(c.f)(e,t),s=t.providerEntityID,l=t.listKey,u=t.listTitle;if(s!==n.get("providerEntityID")||l!==n.get("listKey")){var d=new a.default({containerKey:l,containerTitle:u},{server:r,provider:o});n.restoreDefaults({providerEntityID:s,listKey:l,metadataList:d})}},r[l.a]=function(e,t,n){var r=t.metadataItemEntityID,a=t.containerKeyPattern;if(!r){var o=Object(c.i)(e,t),l=i(e),u=l.get("metadataList")
;u&&u.server===o&&(a&&!u.get("containerKey").match(a)||n(Object(s.h)({metadataListEntityID:u.entityID()})))}},r));t.a=d},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i,r=n(6),a=n.n(r),o=n(1422),s=n(66),l=n(143),c=a()({},o.b,(i={},i[o.a]=function(e,t){var n=Object(s.k)(e,t),i=Object(s.i)(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")},o={identifier:i.get("identifier"),isLibraryProvider:i.get("isLibraryProvider")};r=Object(l.a)(a,o,t.key)}/\/transient\//.test(window.location.hash)?window.location.replace(r):window.location.hash=r},i))},function(e,t,n){"use strict";n.d(t,"a",function(){return I});var i,r=n(6),a=n.n(r),o=n(377),s=n(705),l=n(69),c=n(239),u=n(190),d=n(99),p=n(514),h=n(755),f=n(66),v=n(177),g=n(35),m=n(3),y=n(26),b=n(732),I=a()({},l.g,(i={},i[l.c]=function(e,t,n){
var i=Object(s.a)(e,t),r=Object(o.a)(i),I=t.playerType||d.c(r),S=Object(v.c)(e,I),M=Object(f.i)(e,t),D=Object(f.e)(e,t),C=e.get("experienceSettings");if(e.get("remotePlayer")&&!Object(h.a)(Object(p.a)(M.get("identifier"),M.get("providerIdentifier")),Object(b.a)(e.get("user").get("features").getState())))return void Object(g.a)(function(){S.set({hasError:!0,errorMessage:Object(m.default)("This content is not currently supported when connected to a remote player.")})});var O=void 0
;O=S.get("isOpen")?S.get("openState"):r===c.a?u.b:u.a;var P=!1;r===c.b&&t.metadataItemEntityID&&(P=D.get("type")===y.g),l.g[l.c](e,a()({extrasPrefixCount:C.get("extrasPrefixCount"),openState:O,isPaused:P},t),n)},i[l.b]=function(e,t,n){l.g[l.b](e,a()({openState:u.b},t),n)},i))},function(e,t,n){"use strict";function i(e){return e.get("ui").get("playlistPage")}
var r,a=n(13),o=n.n(a),s=n(19),l=n(92),c=n(670),u=n(110),d=n(109),p=n(1101),h=n(1102),f=n(263),v=n(564),g=n(66),m=n(35),y=n(3),b=n(26),I=n(167),S=n(290),M=n(116),D=n(111),C=n(341),O=Object(u.a)((r={},r[D.F]=function(e,t){var n=i(e),r=Object(M.i)(e,t),a=Object(g.i)(e,t),o=t.serverEntityID,s=t.providerEntityID,c=t.metadataKey;if(o!==n.get("serverEntityID")||s!==n.get("providerEntityID")||c!==n.get("metadataKey")){var u=new l.a({key:c,type:b.i},{server:r,provider:a});n.restoreDefaults({
serverEntityID:o,providerEntityID:s,metadataKey:c,playlist:u})}},r[D.E]=function(e,t){var n=i(e),r=Object(M.i)(e,t),a=Object(g.i)(e,t),o=n.get("playlist"),s=t.serverEntityID,l=t.metadataKey;if(s!==n.get("serverEntityID")||l!==n.get("metadataKey")||!n.get("playlistItemList")){var u=o.get("childrenKey"),d=new c.a({containerKey:u},{server:r,provider:a});n.set({playlistItemList:d})}},r[D.s]=Object(d.a)({key:"playlist",getModel:i}),r[D.P]=Object(p.a)({key:"playlistItemList",getModel:i}),
r[D.X]=Object(h.a)({key:"playlistItemList",getModel:i}),r[D._7]=function(e,t,n){var r=t.id,a=t.type,o=t.isRangeSelect,s=void 0!==o&&o,l=Object(M.e)(e,{playlistItemEntityID:r}),c=i(e),u=c.get("playlistItemList"),d=u.getCollection();l&&n(Object(C.q)({type:a,model:l,collection:d,isRangeSelect:s}))},r[D.j]=function(e,t,n){var i=Object(M.e)(e,{playlistItemEntityID:t.id});i&&n(Object(C.f)([i.id]))},r[D.I]=function(e,t){
var n=Object(M.e)(e,t),r=i(e),a=r.get("playlistItemList"),l=a.getCollection(),c=l.indexOf(n),u=t.moveIndex,d=u-1;if(c!==u&&c!==d){var p=u>c?u-1:u,h=s.join([a.get("containerKey"),n.get("playlistItemID"),"move"],d>=0&&"after="+l.at(d).id),f=n.provider,v=f.getXHROptions(h,{type:"PUT"});Object(m.a)(function(){l.remove(n),l.add(n,{at:p}),o.a.ajax(v).fail(function(){l.indexOf(n)===p&&(l.remove(n),l.add(n,{at:c}))})})}},r[D.V]=function(e,t,n){
var r=Object(M.e)(e,t),a=i(e),o=a.get("playlistItemList"),l=s.join([o.get("containerKey"),r.get("playlistItemID")]);r.destroy({url:l}).fail(function(){n(Object(f.c)(Object(y.default)("There was an unexpected error removing this item.")))})},r[D.W]=function(e,t,n){var r=i(e),a=r.get("playlistItemList"),l=a.get("containerKey"),c=a.getCollection(),u=e.get("ui").get("multiSelect"),d=u.get("activeSelectionItems").pluck("id"),p=o.a.Deferred().resolve().promise();d.forEach(function(e){
var t=c.get(e),n=s.join([l,e]);p=p.then(function(){return t.destroy({url:n,wait:!0})})}),p.fail(function(){n(Object(f.c)(Object(y.default)("There was an unexpected error removing an item.")))})},r[I.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!==v.a&&a!==v.b||n(Object(S.i)({count:l.get("currentPageSize")})))}},r));t.a=O
},function(e,t,n){"use strict";var i,r=n(13),a=n.n(r),o=n(445),s=n(724),l=n(1046),c=n(110),u=n(109),d=n(100),p=n(68),h=n(111),f={isFullOwnedServer:!0,isPersonalCloudServer:!0},v=Object(c.a)((i={},i[h._10]=function(e,t,n){e.get("ui").get("provisionPersonalCloudServerPage").set("isPersonalCloudServerModalOpen",!!t.open)},i[h.U]=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(s.a)(i,{times:10,delay:2e3,maxDuration:3e4});Object(o.a)(u,2e3).done(function(){r.set("isProvisionPersonalCloudServerPopulated",!0)}).fail(function(e){r.set("provisionPersonalCloudServerError",e)}).always(function(){r.set("isProvisionPersonalCloudServerPending",!1)})},i[h.g]=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(s.a)(i,{times:10,delay:2e3,maxDuration:3e4});Object(o.a)(a,2e3).done(function(){r.set("isConnectToPersonalCloudServerPopulated",!0)}).fail(function(){r.set("connectToPersonalCloudServerError",{})}).always(function(){
r.set("isConnectToPersonalCloudServerPending",!1)})},i[h.O]=function(e){var t=e.get("ui").get("provisionPersonalCloudServerPage");t.set("isPersonalCloudServerDriveCachePending",!0);var n=e.get("servers").findWhere(f),i=new l.a({},{server:n}),r=Object(s.a)(function(){return i.fetchAndNotUpdating()},{times:30,delay:2e3,maxDuration:6e4});Object(o.a)(r,2e3).done(function(){t.set("isPersonalCloudServerDriveCachePopulated",!0)}).fail(function(e){t.set("personalCloudServerDriveCacheError",e)
}).always(function(){t.set("isPersonalCloudServerDriveCachePending",!1)})},i[h.r]=Object(u.a)({key:"personalCloudServerStatus",getModel:function(e){return e.get("cloudServer").get("desktop")}}),i[h.y]=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(6),l=n.n(s),c=n(18),u=n(19),d=n(60),p=n(110),h=n(69),f=n(30),v=n(41),g=n(399),m=n(152),y=n(872),b=n(116),I=n(133),S=n(1095),M=n(111),D=n(84),C=Object(p.a)((o={},o[M.G]=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(b.f)(e,{providerEntityID:n
}),r=i.get("identifier"),a=i.get("isLibraryProvider"),o=i.get("features").get(d.b.SEARCH);(r===v.i||r===v.j||r===v.e||r===v.f||o&&(a||r===s))&&t[s===r?"unshift":"push"](new y.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(D.fetchQuickSearch())},o[M._0]=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[M.v]=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(t){var i=t.server;if(i.supports("quickSearch")&&i.get("isConnected")){t.abortPendingPopulate(),t.set("isSearchPending",!0);var r=t.get("providerEntityID");Object(b.f)(e,{providerEntityID:r}).populate({
merge:!0}).then(function(){return t.fetch({data:{sectionId:n.get("sectionID"),query:o,limit:s}})}).done(function(){t.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(e){t.set({isSearchPending:!1,searchError:Object(m.a)(e)})})}})},o[M.b]=function(e,t,n){var r=i(e);""===t.trim()?n(D.resetQuickSearch()):(r.get("query").length>1&&t.length<2&&n(D.resetQuickSearch()),r.set("query",t))},o[M.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[M._8]=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[M.J]=function(e,t,n){
var r=i(e),a=t.serverEntityID,o=null!=t.searchResultEntityID?t.searchResultEntityID:r.get("selectedResultEntityID"),s=Object(b.g)(e,{searchResultEntityID:o});if(!s){var l=Object(b.i)(e,t),d=Object(b.f)(e,t),p=l.id,h=d.id,f=r.pick("query","channelID","channelSearchKey"),v=f.query,m=f.channelID,y=f.channelSearchKey;return null!=m&&null!=y?c.a.trigger("navigate","channel",{serverID:p,channelID:m,key:u.join(y,{query:v})}):l.get("isCloud")?c.a.trigger("navigate","providerSearch",{providerID:h,query:v
}):c.a.trigger("navigate","search",{serverID:p,query:v}),void n(D.resetQuickSearch({serverEntityID:a}))}var M=s.pick("tagItem","metadataItem"),C=M.tagItem,O=M.metadataItem;if(C){var P=g.a.get(C.get("tagType")),j=P.typeString,T=s.provider.get("isLibraryProvider")?s.get("reasonID"):C.get("librarySectionKey"),w=Object(I.a)(s.server.attributes,s.provider.attributes,T,{filters:C.has("filter")?C.get("filter"):j+"="+C.get("id"),filterLabel:C.get("tag"),context:s.metricsContext})
;return window.location.hash=w,void n(D.resetQuickSearch({serverEntityID:a}))}var E=Object(S.a)(s.server.attributes,s.provider.attributes,O.attributes,{context:s.metricsContext});if(!E)return void n(D.playQuickSearchResult({serverEntityID:a,searchResultEntityID:o}));window.location.hash=E,n(D.resetQuickSearch())},o[M.K]=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(b.g)(e,{
searchResultEntityID:s});if(!c)return void n(D.navigateQuickSearchResult(t));var u=c.get("metadataItem");u&&(n(Object(h.m)({serverEntityID:c.server.entityID(),providerEntityID:c.provider.entityID(),metadataItemEntityID:u.entityID(),metricsPage:f.U,metricsContext:c.metricsContext,options:l()({containerKey:u.get("skipParent")?u.get("grandparentKey"):u.get("parentKey")},a)})),n(D.resetQuickSearch({serverEntityID:r})))},o));t.a=C},function(e,t,n){"use strict";function i(e){
return e.get("ui").get("searchPage")}var r,a=n(53),o=n.n(a),s=n(60),l=n(110),c=n(100),u=n(152),d=n(872),p=n(116),h=n(111),f=Object(l.a)((r={},r[h.S]=function(e,t,n){t.forEach(function(e){n(Object(c.l)({serverEntityID:e}))})},r[h.w]=function(e,t,n){var r=i(e),a=r.get("searches"),l=t.availableProviders,c=t.query,h=t.limit;o()(l).forEach(function(t){var n=l[t],i=Object(p.i)(e,{serverEntityID:n.serverEntityID}),r=Object(p.f)(e,{providerEntityID:t}),o=r.get("features").get(s.b.SEARCH)
;o&&!a.get(t)&&a.add(new d.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:c,limit:h}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:Object(u.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){return e.get("ui").get("timelinePage")}function r(e,t){var n=i(e),r=Object(h.i)(e,t),a=Object(h.f)(e,t),o=n.get("momentList");o.fetch().done(function(){var e=o.get("key")||"empty",t=n.get("metadataList"),i=void 0;i=t&&t.server===r&&t.get("containerKey")===e?t:new l.default({containerKey:e},{server:r,provider:a}),n.set({isMomentListPending:!1,isMomentListPopulated:!0,momentListError:null,metadataList:i})}).fail(function(e,t){n.set({
isMomentListPending:!1,momentListError:t})})}var a,o=n(424),s=n(1429),l=n(107),c=n(110),u=n(109),d=n(223),p=n(131),h=n(116),f=n(111),v=Object(c.a)((a={},a[f.H]=function(e,t){var n=i(e),a=Object(h.i)(e,t),l=Object(h.f)(e,t),c=t.serverEntityID,u=t.providerEntityID,d=t.libraryKey,p=t.momentKey;if(c!==n.get("serverEntityID")||u!==n.get("providerEntityID")||p!==n.get("momentKey")){var f=new o.a({key:d},{server:a,provider:l}),v=new s.a({momentKey:p},{server:a,provider:l});n.restoreDefaults({
serverEntityID:c,providerEntityID:u,details:f,momentKey:p,momentList:v}),r(e,t)}},a[f.f]=function(e){i(e).set({momentKey:""})},a[f.x]=Object(u.a)({key:"details",getModel:i}),a[f.T]=Object(d.a)({key:"details",actionSuffix:"timelineDetails",getModel:i}),a[p.a]=function(e,t){var n=t.metadataItemEntityID,a=t.containerKeyPattern,o=Object(h.i)(e,t),s=Object(h.f)(e,t),l=i(e),c=l.get("metadataList"),u=l.get("momentKey");if(!n&&u&&c&&c.server===o&&c.provider===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(430),r=n(465),a=n(4214),o=n(4215),s=n(202),l=n(517),c=n(4216),u=n(4226),d=n(4227),p={registerAll:function(){var e=u.a.init();e.done(function(e){return i.a.register(e)});var t=new a.a;return s.a.register(t),l.a.register(new o.a),r.a.register(Object(d.a)()),c.a.registerAll(),e}};t.a=p},function(e,t,n){"use strict";var i=n(683),r=i.a.extend({name:"PersistentWebStorage",getStorage:function(){return window.localStorage}})
;t.a=r},function(e,t,n){"use strict";var i=n(683),r=i.a.extend({name:"VolatileWebStorage",getStorage:function(){return window.sessionStorage}});t.a=r},function(e,t,n){"use strict";var i=n(4217),r=n(915),a=n(509),o=n(4222),s={registerAll:function(){a.a.register(new o.a),r.a.register(i.a)}};t.a=s},function(e,t,n){"use strict";var i=n(6),r=n.n(i),a=n(1430),o=n.n(a),s=n(205),l=n(4221),c=r()({},l.a,{init:function(e){var t=new RegExp(Object(s.a)("-plex-3.77.4-ae9ba53"));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(4219),o=n(4220),s=n(1431),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(13))},function(e,t,n){"use strict";function i(){return"undefined"==typeof document?"":document.location.href}var r=n(1431),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 P=r(y.url,y.line),j=P?P[Math.floor(P.length/2)]:null
;P&&j.replace(/^\s*/,"")===o[m+1].replace(/^\s*/,"")?y.context=P: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(1430),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=n(75),r=n(19),a=n(15),o=n(4223),s=i.a.extend({mixins:o.a,constructor:function(){this.basePath=Object(r.join)(["/web/","translations"]),this.translations={},Object(a.d)("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(13),r=n.n(i),a=n(7),o=n.n(a),s=n(18),l=n(19),c=n(4224),u=n(4225),d={languages:u.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(c.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=o.a.has(n,e)?o.a.has(this.translations,e)?r.a.Deferred().resolve().promise():r.a.ajax({dataType:"json",url:Object(l.join)([this.basePath,n[e]])}):r.a.Deferred().reject().promise(),this.loadingLanguage=e,this.loadingPromise=t,t.done(o.a.bind(this.onLoadSuccess,this,t)),t.fail(o.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),s.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";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(7),c=n.n(l),u=n(205),d={};t.a=s},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"
;var i=n(13),r=n.n(i),a=n(47),o=n(15),s={init:function(){var e=Object(o.c)("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.77.4","X-Plex-Client-Identifier":e.get("clientID"),"X-Plex-Platform":a.a.name,"X-Plex-Platform-Version":a.a.version,"X-Plex-Sync-Version":2,"X-Plex-Device":a.a.platform,"X-Plex-Device-Name":a.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";function i(){var e={maxWidth:1920,maxHeight:1280},t={maxWidth:4096,maxHeight:2160},n='width="'+e.maxWidth+'"; height="'+e.maxHeight+'"',i='width="'+t.maxWidth+'"; height="'+t.maxHeight+'"',r=a()({},e,{maxFrameRate:60}),o={capabilities:{embed:!0,redirect:!0},video:{lowestQualityIndex:2,protocols:{hls:{mimeType:"application/x-mpegURL"}},
directPlay:{generic:{video:a()({},r)},mp4:{mimeType:'video/mp4; codecs="avc1.42E01E"',video:{codecs:{h264:{}}},audio:{codecs:{aac:{}}}},ogg:{mimeType:"video/ogg"},mpegts:{protocol:"hls"},flv:{}},directStream:{video:a()({},r,{maxBitDepth:8,codecs:{h264:{}}}),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}}}},p=[{types:['video/mp4; codecs="hvc1"; '+n],fragment:{directPlay:{mp4:{video:{codecs:{hevc:a()({},e,{maxBitDepth:10})}}}}}},{types:['video/mp4; codecs="avc1.42E01E"; '+i],fragment:{directPlay:{mp4:{video:{codecs:{h264:t}}}},directStream:{video:{codecs:{h264:t
}}}}},{types:['video/mp4; codecs="hvc1"; '+i],fragment:{directPlay:{mp4:{video:{codecs:{hevc:a()({},t,{maxBitDepth:10})}}}}}},{types:['video/webm; codecs="vp8, opus"; '+n],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp8:e}},audio:{codecs:{opus:{}}}}}}},{types:['video/webm; codecs="vp8, vorbis"; '+n],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp8:e}},audio:{codecs:{vorbis:{}}}}}}},{types:['video/webm; codecs="vp9, opus"; '+n],fragment:{directPlay:{mkv:{
mimeType:"video/webm",video:{codecs:{vp9:e}},audio:{codecs:{opus:{}}}}}}},{types:['video/webm; codecs="vp9, vorbis"; '+n],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp9:e}},audio:{codecs:{vorbis:{}}}}}}},{types:['video/webm; codecs="vp8, opus"; '+i],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp8:t}},audio:{codecs:{opus:{}}}}}}},{types:['video/webm; codecs="vp8, vorbis"; '+i],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp8:t}},audio:{
codecs:{vorbis:{}}}}}}},{types:['video/webm; codecs="vp9, opus"; '+i],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp9:t}},audio:{codecs:{opus:{}}}}}}},{types:['video/webm; codecs="vp9, vorbis"; '+i],fragment:{directPlay:{mkv:{mimeType:"video/webm",video:{codecs:{vp9:t}},audio:{codecs:{vorbis:{}}}}}}}],h=window.MediaSource&&window.MediaSource.isTypeSupported?window.MediaSource.isTypeSupported:function(e){var t=Object(d.a)("video",!0),n=t.canPlayType(e);return Object(d.b)(t),
"probably"===n};if(p.forEach(function(e){e.types.every(h)?(c.a.debug("[Player] Types %o provided %o",e.types,e.fragment),s.a.extend(!0,o.video,e.fragment)):c.a.debug("[Player] Types %o are unsupported",e.types)}),"safari"===l.a.id&&Object(u.a)(l.a.platformVersion,"10.11")){var f={codecs:{ac3:{},eac3:{}}};s.a.extend(!0,o.video,{directPlay:{mp4:{audio:f}},directStream:{audio:f}})}return c.a.debug("[Player] Final player profile %o",o),o}
var r=n(6),a=n.n(r),o=n(13),s=n.n(o),l=n(47),c=n(29),u=n(316),d=n(527);t.a=i},function(e,t,n){"use strict";function i(){function e(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}
var t=document.documentElement,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen,i=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen,r=!(!n||!i);return{hasFullscreen:r,shouldExitOnPlayerClose:!0,initialize:function(t){function n(){e()?i():r()}var i=t.dispatchEnterFullscreen,r=t.dispatchExitFullscreen;return n(),document.addEventListener("fullscreenchange",n),
document.addEventListener("webkitfullscreenchange",n),document.addEventListener("mozfullscreenchange",n),document.addEventListener("MSFullscreenChange",n),a.a.Deferred().resolve().promise()},enter:function(){r&&n.call(t)},exit:function(){r&&i.call(document)}}}t.a=i;var r=n(13),a=n.n(r)},function(e,t){}],[1451]);