mediacms/static/js/profile-media.js

1 wiersz
15 KiB
JavaScript

!function(){var n,t={4938:function(n,t,r){"use strict";var e=r(2541),o=r(4982);(0,e.X)("page-profile-media",o.a)},7446:function(n,t,r){"use strict";r(2070),r(5466);var e=r(3074),o=r.n(e);r(2299),o().string.isRequired,o().string.isRequired,o().func.isRequired},2915:function(n,t,r){"use strict";r(2004),r(8407),r(6394),r(8288),r(5677),r(2129),r(4655),r(288),r(4458),r(3675);var e=r(5466),o=r(3074),i=r.n(o),u=r(2299);function c(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=n[r];return e}function a(n){var t,r,o=(t=(0,e.useState)(n.active),r=2,function(n){if(Array.isArray(n))return n}(t)||function(n,t){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var e,o,i=[],u=!0,c=!1;try{for(r=r.call(n);!(u=(e=r.next()).done)&&(i.push(e.value),!t||i.length!==t);u=!0);}catch(n){c=!0,o=n}finally{try{u||null==r.return||r.return()}finally{if(c)throw o}}return i}}(t,r)||function(n,t){if(n){if("string"==typeof n)return c(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(n,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];return e.createElement("div",{className:"mi-filters-toggle"},e.createElement("button",{className:i?"active":"","aria-label":"Filter",onClick:function(){a(!i),void 0!==n.onClick&&n.onClick()}},e.createElement(u.O,{type:"filter_list"}),e.createElement("span",{className:"filter-button-label"},e.createElement("span",{className:"filter-button-label-text"},"FILTERS"))))}a.propTypes={onClick:i().func,active:i().bool},a.defaultProps={active:!1}},4234:function(n,t,r){"use strict";r.d(t,{CircleIconButton:function(){return e.M},MaterialIcon:function(){return o.O},NavigationContentApp:function(){return i.o},NavigationMenuList:function(){return u.S},Notifications:function(){return c.T},PopupMain:function(){return a.W8},PopupTop:function(){return a.HF},SpinnerLoader:function(){return f.i},UserThumbnail:function(){return l.q}});var e=r(7714),o=(r(7446),r(2915),r(2299)),i=r(2917),u=r(5671),c=r(2436),a=(r(5517),r(940)),f=r(6309),l=r(6142)},5517:function(n,t,r){"use strict";r(2004),r(8407),r(6394),r(8288),r(5677),r(2129),r(4655),r(288),r(4458),r(3675),r(5466);var e=r(3074),o=r.n(e);o().string,o().array.isRequired,o().string,o().number,o().number,o().number,o().func,o().func},824:function(n,t,r){"use strict";r.d(t,{LazyLoadItemListAsync:function(){return v}}),r(2070),r(2004),r(8407),r(6394),r(8288),r(5677),r(2129),r(4655),r(288),r(4458),r(3675),r(4517),r(9751),r(8833),r(815),r(5090),r(9174);var e=r(5466),o=r(8578),i=r(2546),u=r(8982),c=r(2832),a=r(3632),f=r(8986);function l(n,t){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.push.apply(r,e)}return r}function s(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){p(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}))}return n}function p(n,t,r){return t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n}function y(){return(y=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e])}return n}).apply(this,arguments)}function m(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=n[r];return e}function v(n){var t,r,u=(t=(0,i.useItemListLazyLoad)(n),r=13,function(n){if(Array.isArray(n))return n}(t)||function(n,t){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var e,o,i=[],u=!0,c=!1;try{for(r=r.call(n);!(u=(e=r.next()).done)&&(i.push(e.value),!t||i.length!==t);u=!0);}catch(n){c=!0,o=n}finally{try{u||null==r.return||r.return()}finally{if(c)throw o}}return i}}(t,r)||function(n,t){if(n){if("string"==typeof n)return m(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(n,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=u[0],s=u[1],p=u[2],v=u[3],d=u[4],b=u[5],g=u[6],h=u[7],w=u[8],O=u[9],S=u[10],j=u[11],A=u[12];return(0,e.useEffect)((function(){return v(new f.g(n.pageItems,n.maxItems,n.firstItemRequestUrl,n.requestUrl,b,g)),o.PageStore.on("window_scroll",h),o.PageStore.on("document_visibility_change",w),h(),function(){o.PageStore.removeListener("window_scroll",h),o.PageStore.removeListener("document_visibility_change",w),p&&(p.cancelAll(),v(null))}}),[]),s?l.length?e.createElement("div",{className:d.listOuter},j(),e.createElement("div",{ref:O,className:"items-list-wrap"},e.createElement("div",{ref:S,className:d.list},l.map((function(t,r){return e.createElement(a.H,y({key:r},(0,a.j)(n,t,r)))})))),A()):null:e.createElement(c.K,{className:d.listOuter})}v.propTypes=s({},u.ItemListAsync.propTypes),v.defaultProps=s(s({},u.ItemListAsync.defaultProps),{},{pageItems:2})},6191:function(n,t,r){"use strict";r.d(t,{PageHeader:function(){return e.m},PageMain:function(){return o.r},PageSidebar:function(){return i.$}});var e=r(6006),o=r(9198),i=r(2947);r(1542)},2083:function(n,t,r){var e=r(4835).Dispatcher;n.exports=new e},1450:function(n,t,r){"use strict";function e(){var n,t,r,e=null;if(document.cookie&&""!==document.cookie)for(t=document.cookie.split(";"),n=0;n<t.length;){if("csrftoken="===(r=t[n].trim()).substring(0,10)){e=decodeURIComponent(r.substring(10));break}n+=1}return e}r.d(t,{o:function(){return e}}),r(2322),r(9268),r(3233)},9039:function(n,t,r){"use strict";r.d(t,{O:function(){return u},a:function(){return c}}),r(1646),r(288),r(2004),r(8407),r(6394),r(8288),r(5677),r(2129),r(4655),r(3675),r(4458);var e=r(4646);function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=n[r];return e}function i(n,t,r){var e,i;switch(r){case TypeError:case RangeError:case SyntaxError:case ReferenceError:e=new r(t[0]);break;default:e=new Error(t[0])}return n.apply(void 0,[e.message].concat(function(n){if(Array.isArray(n))return o(n)}(i=t.slice(1))||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(i)||function(n,t){if(n){if("string"==typeof n)return o(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(n,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),e}function u(n,t){return i(e.v,n,t)}function c(n,t){return i(e.Z,n,t)}},9264:function(n,t,r){"use strict";r.d(t,{Z:function(){return o}});var e=r(2083);function o(n,t){return e.register(n[t].bind(n)),n}},1397:function(n,t,r){"use strict";r.d(t,{U:function(){return i}}),r(2322),r(3296),r(6394),r(4669);var e=r(137),o=r.n(e);function i(n,t){var r=o()(n,{});return""!==r.origin&&"null"!==r.origin&&r.origin||(r=o()(t+"/"+n.replace(/^\//g,""),{})),r.toString()}},705:function(n,t,r){"use strict";function e(n,t){function r(n,t,r){return Number(parseFloat(n/t).toFixed(n<10*t?1:0))+r}return t?n.toLocaleString():function(n,t,e,o,i,u){for(;t>=o;)i*=e,o*=e,n+=1;return n<u.length?r(t,i,u[n]):r(t*(e*(n-(u.length-1))),i,u[u.length-1])}(0,n,1e3,1e3,1,["","K","M","B","T"])}r.d(t,{Z:function(){return e}}),r(717),r(6660)},2161:function(n,t,r){"use strict";r.d(t,{s:function(){return e}}),r(2322),r(9268);var e=function(n){if(n){var t=n.split(".");return t[t.length-1]}}},4646:function(n,t,r){"use strict";r.d(t,{Z:function(){return c},v:function(){return a}}),r(288),r(1646),r(2004),r(8407),r(6394),r(8288),r(5677),r(2129),r(4655),r(3675),r(4458);var e=r(1283);function o(n){return function(n){if(Array.isArray(n))return i(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(n){if("string"==typeof n)return i(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(n,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=n[r];return e}var u=function(){for(var n,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(n=e)[r[0]].apply(n,o(r.slice(1)))},c=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return u.apply(void 0,["warn"].concat(t))},a=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return u.apply(void 0,["error"].concat(t))}},408:function(n,t,r){"use strict";r.d(t,{ju:function(){return e},Fr:function(){return o},hj:function(){return i},U:function(){return u},xP:function(){return c},r:function(){return a},aP:function(){return f},ZU:function(){return l},$A:function(){return s}}),r(5777);var e=function(n,t){return n>t},o=function(n){return 0===n},i=function(n){return!isNaN(n)&&n===0+n},u=function(n){return n===Math.trunc(n)},c=function(n){return e(n,0)},a=function(n){return i(n)&&c(n)},f=function(n){return u(n)&&c(n)},l=function(n){return u(n)&&(c(n)||o(n))},s=function n(t,r){return r?n(r,t%r):t}},5477:function(n,t,r){"use strict";r.d(t,{g:function(){return u},n:function(){return c}}),r(2004),r(8407),r(6394),r(8288),r(5677),r(2129),r(4655);var e=r(9039),o=r(408);function i(n){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var u=function(n,t,r){return void 0===n[t]||(0,o.ZU)(n[t])?null:(0,e.O)(["Invalid prop `"+t+"` of type `"+i(n[t])+"` supplied to `"+(r||"N/A")+"`, expected `positive integer or zero` ("+n[t]+")."])},c=function(n,t,r){return void 0===n[t]||(0,o.aP)(n[t])?null:(0,e.O)(["Invalid prop `"+t+"` of type `"+i(n[t])+"` supplied to `"+(r||"N/A")+"`, expected `positive integer` ("+n[t]+")."])}},447:function(n,t,r){"use strict";r.d(t,{A_:function(){return c},j0:function(){return f},GH:function(){return s},Jl:function(){return y}}),r(7588),r(6394),r(5334);var e=r(4559),o=r.n(e);function i(n,t,r,e,o,i,u){try{var c=n[i](u),a=c.value}catch(n){return void r(n)}c.done?t(a):Promise.resolve(a).then(e,o)}function u(n){return function(){var t=this,r=arguments;return new Promise((function(e,o){var u=n.apply(t,r);function c(n){i(u,e,o,c,a,"next",n)}function a(n){i(u,e,o,c,a,"throw",n)}c(void 0)}))}}function c(n,t,r,e){return a.apply(this,arguments)}function a(){return(a=u(regeneratorRuntime.mark((function n(t,r,o,i){var u,c,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=function(n){if(i instanceof Function){var t=n;if(void 0===n.response)t={type:"network",error:n};else if(void 0!==n.response.status)switch(n.response.status){case 401:t={type:"private",error:n,message:"Media is private"};break;case 400:t={type:"unavailable",error:n,message:"Media is unavailable"}}i(t)}},c=function(n){o instanceof Function&&o(n)},u={timeout:null,maxContentLength:null},!r){n.next=8;break}return n.next=6,(0,e.get)(t,u).then(c).catch(a||null);case 6:n.next=9;break;case 8:(0,e.get)(t,u).then(c).catch(a||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function f(n,t,r,e,o,i){return l.apply(this,arguments)}function l(){return(l=u(regeneratorRuntime.mark((function n(t,r,o,i,u,c){var a,f;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(f=function(n){c instanceof Function&&c(n)},a=function(n){u instanceof Function&&u(n)},r=r||{},!i){n.next=8;break}return n.next=6,(0,e.post)(t,r,o||null).then(a).catch(f||null);case 6:n.next=9;break;case 8:(0,e.post)(t,r,o||null).then(a).catch(f||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function s(n,t,r,e,o,i){return p.apply(this,arguments)}function p(){return(p=u(regeneratorRuntime.mark((function n(t,r,o,i,u,c){var a,f;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(f=function(n){c instanceof Function&&c(n)},a=function(n){u instanceof Function&&u(n)},r=r||{},!i){n.next=8;break}return n.next=6,(0,e.put)(t,r,o||null).then(a).catch(f||null);case 6:n.next=9;break;case 8:(0,e.put)(t,r,o||null).then(a).catch(f||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function y(n,t,r,e,o){return m.apply(this,arguments)}function m(){return(m=u(regeneratorRuntime.mark((function n(t,r,e,i,u){var c,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=function(n){u instanceof Function&&u(n)},c=function(n){i instanceof Function&&i(n)},r=r||{},!e){n.next=8;break}return n.next=6,o().delete(t,r||null).then(c).catch(a||null);case 6:n.next=9;break;case 8:o().delete(t,r||null).then(c).catch(a||null);case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n].call(i.exports,i,i.exports,e),i.exports}e.m=t,n=[],e.O=function(t,r,o,i){if(!r){var u=1/0;for(f=0;f<n.length;f++){r=n[f][0],o=n[f][1],i=n[f][2];for(var c=!0,a=0;a<r.length;a++)(!1&i||u>=i)&&Object.keys(e.O).every((function(n){return e.O[n](r[a])}))?r.splice(a--,1):(c=!1,i<u&&(u=i));c&&(n.splice(f--,1),t=o())}return t}i=i||0;for(var f=n.length;f>0&&n[f-1][2]>i;f--)n[f]=n[f-1];n[f]=[r,o,i]},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,{a:t}),t},e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.j=40,function(){var n={40:0};e.O.j=function(t){return 0===n[t]};var t=function(t,r){var o,i,u=r[0],c=r[1],a=r[2],f=0;for(o in c)e.o(c,o)&&(e.m[o]=c[o]);if(a)var l=a(e);for(t&&t(r);f<u.length;f++)i=u[f],e.o(n,i)&&n[i]&&n[i][0](),n[u[f]]=0;return e.O(l)},r=self.webpackChunkmediacms_frontend=self.webpackChunkmediacms_frontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var o=e.O(void 0,[431],(function(){return e(4938)}));o=e.O(o)}();