1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6935],{96935:function(e,t,n){n.d(t,{gj:function(){return y},pZ:function(){return w},e5:function(){return h},G4:function(){return g},av:function(){return m},Rz:function(){return b},i0:function(){return D}});var r=n(92809),a=n(30266),i=n(809),c=n.n(i),o=n(75215),u=n(68659),s=n(75149),p=n(68650),f=n(7134),d=n(62701);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e,t){return function(){var n=(0,a.Z)(c().mark((function n(r,a){var i,d;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=(0,u.uH1)(t),d=(0,s.xE)(i,e),a().reviewsState&&a().reviewsState["".concat(d)]||(r({type:f.bU,payload:{loadingReview:!0}}),r({type:f._o,error:!1}),(0,p.QT)((0,p.JU)(o.RZ,"reviews",d)).then((function(e){if(e.exists()){var t=e.data()||{};t.id=e.id,r({type:f.H5,payload:{reviewId:d,newEpisodeReview:t}})}else r({type:f._o,error:!0});r({type:f.bU,payload:{loadingReview:!1}})})).catch((function(e){r({type:f.bU,payload:{loadingReview:!1}}),r({type:f._o,error:!0})})));case 4:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()},w=function(e,t){return function(){var n=(0,a.Z)(c().mark((function n(a,i){var s,d;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:s=(0,u.lHe)(e),d=i().reviewsMetadata&&i().reviewsMetadata["".concat(s)]&&i().reviewsMetadata["".concat(s)].latestFetchDate,d&&d["rating".concat(t)]||(a({type:f.hu,payload:{loadingReviews:!0}}),a({type:f.An,error:!1}),(0,p.PL)((0,p.IO)((0,p.hJ)(o.RZ,"reviews"),(0,p.ar)("user.id","==",s),(0,p.ar)("rating","==",t),(0,p.Xo)("lastModifiedDate","desc"),(0,p.b9)(u.HbO))).then((function(e){var n,i={},c=e.size,o=1;e.forEach((function(e){var t=e.data(),r=e.id;i["".concat(r)]=t,i["".concat(r)].id=e.id,o===c&&(n=t.lastModifiedDate),o++})),a({type:f.Bb,payload:i});var u=(new Date).getTime(),p={};p["".concat(s)]={latestFetchDate:(0,r.Z)({},"rating".concat(t),u),finalLastModifiedDate:(0,r.Z)({},"rating".concat(t),n)},a({type:f.Af,payload:p}),a({type:f.hu,payload:{loadingReviews:!1}})})).catch((function(e){a({type:f.hu,payload:{loadingReviews:!1}}),a({type:f.An,error:!0})})));case 4:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()},h=function(e,t){return function(){var n=(0,a.Z)(c().mark((function n(r,a){var i,s,d,l;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=(0,u.lHe)(e),s=a().reviewsMetadata&&a().reviewsMetadata["".concat(i)]&&a().reviewsMetadata["".concat(i)].finalLastModifiedDate,d=s&&s["rating".concat(t)],l=d&&d.seconds?new Date(1e3*d.seconds):new Date,(0,p.PL)((0,p.IO)((0,p.hJ)(o.RZ,"reviews"),(0,p.ar)("user.id","==",(0,u.lHe)(e)),(0,p.ar)("rating","==",t),(0,p.ar)("lastModifiedDate","<",l),(0,p.Xo)("lastModifiedDate","desc"),(0,p.b9)(u.HbO))).then((function(n){var a=n.size;if(a>0){var i,c={},o=1;n.forEach((function(e){var t=e.data(),n=e.id;c["".concat(n)]=t,c["".concat(n)].id=e.id,o===a&&(i=t.lastModifiedDate),o++})),r({type:f.Bb,payload:c});var s={userID:"".concat((0,u.lHe)(e)),ratingFilter:t,entity:"finalLastModifiedDate",entityValue:i};r({type:f.J$,payload:s})}})).catch((function(e){}));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()},g=function(e,t,n,r,i,l,y){return function(){var w=(0,a.Z)(c().mark((function a(w){var h,g,m,b,D;return c().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return"undefined"!==typeof r.guid&&(h=(0,u.hw0)(r.guid)),g=(0,u.uH1)(r),m=(0,s.xE)(g,e),b=v(v({episode:v({},(0,u.Ne6)(r))},(0,s.XU)({rating:i,comment:l,privacyType:y})),{},{user:{id:(0,u.lHe)(e),name:t||"",picUrl:n||""}}),(D={})["".concat(h)]={rating:i,collectionId:r.collectionId,lastPlayed:
1p.EK.now()},"public"===y&&(D["".concat(h)].privacyType="public"),(0,d.KF)(r.guid,r.collectionId,i,y,1),a.abrupt("return",(0,p.pl)((0,p.JU)(o.RZ,"reviews",m),b,{merge:!0}).then((function(){(0,p.pl)((0,p.JU)(o.RZ,"users/".concat(e,"/personal"),"ratings"),{values:D},{merge:!0})})).then((function(){return b.id=m,w({type:f.H5,payload:{reviewId:m,newEpisodeReview:b}}),{success:!0,personalRatingUpdate:D}})).catch((function(e){throw e})));case 9:case"end":return a.stop()}}),a)})));return function(e){return w.apply(this,arguments)}}()},m=function(e,t,n,r,i,l,y){return function(){var t=(0,a.Z)(c().mark((function t(n){var a,w,h,g,m,b,D;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=r.author+"-"+r.pubDate,w=a.replace(/ /g,"_"),"undefined"!==typeof r.guid&&(h=(0,u.hw0)(r.guid)),g=h||w,m=(0,s.xE)(g,e),b=v({},(0,s.XU)({rating:i,comment:l,privacyType:y,edit:!0})),(D={})["".concat(h)]={rating:i,collectionId:r.collectionId,lastPlayed:p.EK.now()},D["".concat(h)].privacyType="public"===y?"public":(0,p.AK)(),(0,d.KF)(r.guid,r.collectionId,i,y,2),t.abrupt("return",(0,p.pl)((0,p.JU)(o.RZ,"reviews",m),b,{merge:!0}).then((function(){(0,p.pl)((0,p.JU)(o.RZ,"users/".concat(e,"/personal"),"ratings"),{values:D},{merge:!0})})).then((function(){return setTimeout((function(){n({type:f.EV,payload:{reviewId:m,newEpisodeReview:b}})}),100),{success:!0,personalRatingUpdate:D}})).catch((function(e){throw e})));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},b=function(e){return function(){var t=(0,a.Z)(c().mark((function t(n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n({type:f.uR,payload:e});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},D=function(e,t,n){return function(){var r=(0,a.Z)(c().mark((function r(a){var i,l,v,y;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:"undefined"!==typeof t&&(i=(0,u.hw0)(t)),l=i,v=(0,s.xE)(l,e),(y={})["".concat(i)]=(0,p.AK)(),a({type:f.aA,payload:v}),(0,d.KF)(t,n,-1,"",0),(0,p.oe)((0,p.JU)(o.RZ,"reviews",v)).then((function(){})).then((function(){a({type:f.jg,payload:i})})).catch((function(e){})),(0,p.pl)((0,p.JU)(o.RZ,"users/".concat(e,"/personal"),"ratings"),{values:y},{merge:!0});case 9:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()}},75149:function(e,t,n){n.d(t,{j4:function(){return a},XS:function(){return i},xE:function(){return c},XU:function(){return o},r$:function(){return u}});var r=n(68650),a=1e3,i=a-50;function c(e,t){return e+"_userId_"+t}function o(e){var t=e.rating,n=e.privacyType,a=e.comment,i=e.edit,c=void 0!==i&&i,o={rating:t,comment:a||"",commentLength:a?a.length:0,lastModifiedDate:r.EK.fromDate(new Date),privacyType:n||"private"};return 1!=c&&(o.postedDate=r.EK.fromDate(new Date)),o}function u(e,t){return e.commentLength>t.commentLength?-1:e.commentLength<t.commentLength?1:e.rating>t.rating?-1:e.rating<t.rating?1:e.lastModifiedDate>t.lastModifiedDate?-1:e.lastModifiedDate<t.lastModifiedDate?1:void 0}}}]); 2//# sourceMappingURL=6935-85ac2c301c8b3de0460c.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.