mediacms/static/js/profile-playlists.js

1 line
25 KiB
JavaScript
Raw Normal View History

!function(){"use strict";var e,t={9757:function(e,t,n){var r=n(2541),o=(n(5101),n(3080),n(2004),n(8407),n(6394),n(8288),n(5677),n(2129),n(4655),n(5466)),i=n(3613),a=n(8578),u=n(5910),c=n(8556),l=n(6970),s=n(824);function f(e){return(f="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})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(v,e);var t,n,r,f,b=(r=v,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(f){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function v(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),(t=b.call(this,e,"author-playlists")).state={loadedAuthor:!1,loadedPlaylists:!1,playlistsCount:-1},t.getPlaylistsCountFunc=t.getPlaylistsCountFunc.bind(y(t)),t}return t=v,(n=[{key:"getPlaylistsCountFunc",value:function(e){this.setState({loadedPlaylists:!0,playlistsCount:e})}},{key:"pageContent",value:function(){var e=this;return[this.state.author?o.createElement(c.Z,{key:"ProfilePagesHeader",author:this.state.author,type:"playlists"}):null,this.state.author?o.createElement(l.Z,{key:"ProfilePagesContent"},o.createElement(i.ApiUrlConsumer,null,(function(t){return o.createElement(u.MediaListWrapper,{title:-1<e.state.playlistsCount?"Created playlists":void 0,className:"profile-playlists-content items-list-ver"},o.createElement(s.LazyLoadItemListAsync,{requestUrl:t.user.playlists+e.state.author.username,itemsCountCallback:e.getPlaylistsCountFunc,hideViews:!a.PageStore.get("config-media-item").displayViews,hideAuthor:!a.PageStore.get("config-media-item").displayAuthor,hideDate:!a.PageStore.get("config-media-item").displayPublishDate}))}))):null]}}])&&p(t.prototype,n),v}(n(4982).a);(0,r.X)("page-profile-playlists",b)},7714:function(e,t,n){n.d(t,{M:function(){return u}}),n(4517);var r=n(5466),o=n(3074),i=n.n(o);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e){var t=r.createElement("span",null,r.createElement("span",null,e.children)),n={tabIndex:e.tabIndex||null,title:e.title||null,className:"circle-icon-button"+(void 0!==e.className?" "+e.className:"")+(e.buttonShadow?" button-shadow":"")};return void 0!==e["data-page-id"]&&(n["data-page-id"]=e["data-page-id"]),void 0!==e["aria-label"]&&(n["aria-label"]=e["aria-label"]),"link"===e.type?r.createElement("a",a({},n,{href:e.href||null,rel:e.rel||null}),t):"span"===e.type?r.createElement("span",a({},n,{onClick:e.onClick||null}),t):r.createElement("button",a({},n,{onClick:e.onClick||null}),t)}u.propTypes={type:i().oneOf(["button","link","span"]),buttonShadow:i().bool,className:i().string},u.defaultProps={type:"button",buttonShadow:!1}},7446:function(e,t,n){n(2070),n(5466);var r=n(3074),o=n.n(r);n(2299),o().string.isRequired,o().str