mediacms/static/js/profile-playlists.js

1 line
33 KiB
JavaScript
Raw Normal View History

!function(){var t,e={79757:function(t,e,n){"use strict";var r=n(92541),o=(n(25101),n(13080),n(52004),n(28407),n(56394),n(38288),n(55677),n(92129),n(24655),n(35466)),i=n(43613),a=n(98578),u=n(25910),c=n(68556),l=n(26970),s=n(40824);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(h,t);var e,n,r,f,v=(r=h,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(t){return!1}}(),function(){var t,e=b(r);if(f){var n=b(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return y(this,t)});function h(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=v.call(this,t,"author-playlists")).state={loadedAuthor:!1,loadedPlaylists:!1,playlistsCount:-1},e.getPlaylistsCountFunc=e.getPlaylistsCountFunc.bind(d(e)),e}return e=h,(n=[{key:"getPlaylistsCountFunc",value:function(t){this.setState({loadedPlaylists:!0,playlistsCount:t})}},{key:"pageContent",value:function(){var t=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(e){return o.createElement(u.MediaListWrapper,{title:-1<t.state.playlistsCount?"Created playlists":void 0,className:"profile-playlists-content items-list-ver"},o.createElement(s.LazyLoadItemListAsync,{requestUrl:e.user.playlists+t.state.author.username,itemsCountCallback:t.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(e.prototype,n),h}(n(64982).a);(0,r.X)("page-profile-playlists",v)},17714:function(t,e,n){"use strict";n.d(e,{M:function(){return u}}),n(74517);var r=n(35466),o=n(3074),i=n.n(o);function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function u(t){var e=r.createElement("span",null,r.createElement("span",null,t.children)),n={tabIndex:t.tabIndex||null,title:t.title||null,className:"circle-icon-button"+(void 0!==t.className?" "+t.className:"")+(t.buttonShadow?" button-shadow":"")};return void 0!==t["data-page-id"]&&(n["data-page-id"]=t["data-page-id"]),void 0!==t["aria-label"]&&(n["aria-label"]=t["aria-label"]),"link"===t.type?r.createElement("a",a({},n,{href:t.href||null,rel:t.rel||null}),e):"span"===t.type?r.createElement("span",a({},n,{onClick:t.onClick||null}),e):r.createElement("button",a({},n,{onClick:t.onClick||null}),e)}u.propTypes={type:i().oneOf(["button","link","span"]),buttonShadow:i().bool,className:i().string},u.defaultProps={type:"button",buttonShadow:!1}},47446:function(t,e,n){"use strict";n(92070),n(35466);var r=n(