2 lines
680 KiB
JavaScript
2 lines
680 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["Governance~Reddit"],{"./src/graphql/operations/CreateSubredditTags.json":function(e){e.exports={id:"639d65a32e0e"}},"./src/graphql/operations/DeleteTags.json":function(e){e.exports={id:"85a644f8353a"}},"./src/graphql/operations/FetchSubredditTags.json":function(e){e.exports={id:"f0679317dcf6"}},"./src/graphql/operations/Frontpage.json":function(e){e.exports={id:"fdf5fad94262"}},"./src/graphql/operations/ModeratedSubreddits.json":function(e){e.exports={id:"c1ada1ec294f"}},"./src/graphql/operations/RichTextPostContent.json":function(e){e.exports={id:"fc24b7b690ad"}},"./src/graphql/operations/SubredditAbout.json":function(e){e.exports={id:"e1dd731a00bc"}},"./src/graphql/operations/SubredditRules.json":function(e){e.exports={id:"0df127946e72"}},"./src/graphql/operations/SubredditTopContent.json":function(e){e.exports={id:"ab259c99ed34"}},"./src/graphql/operations/UpdateSubredditTagStates.json":function(e){e.exports={id:"70f7ff70f03e"}},"./src/lib/assertNever.ts":function(e,t,s){"use strict";function r(e){throw new Error(`Unexpected object: ${e}`)}s.d(t,"a",function(){return r})},"./src/lib/copyToClipboard/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/logs/console.ts");t.a=(e=>{const t=document.body.scrollTop,s=document.body.scrollLeft,n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.select();try{document.execCommand("copy")}catch(a){return Object(r.a)(a,`Failed to copy text: ${e}`),!1}return document.body.removeChild(n),document.body.scrollTop=t,document.body.scrollLeft=s,!0})},"./src/lib/filterQueryParams/index.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/omit.js"),n=s.n(r),a=s("./node_modules/url/url.js"),c=s.n(a);t.a=((e,t)=>{const s=c.a.parse(e,!0);return s.search=void 0,s.query=Object.assign({},n()(s.query,t)),c.a.format(s)})},"./src/lib/formatApiError/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return a});var r=s("./src/app/strings/index.ts"),n=s("./src/app/strings/sources/error.js");function a(e,t,s){return t?t.fields&&t.fields.length?t.fields.map(e=>e.msg).join(", "):t.type&&n.a[t.type]?Object(r.a)(e,`error.${t.type}`):401===s?Object(r.a)(e,"error.authentication"):Object(r.a)(e,"error.generic"):""}},"./src/lib/listingSort/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"d",function(){return i}),s.d(t,"c",function(){return o});var r=s("./src/lib/constants/index.ts"),n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const a=e=>e===r.X.TOP||e===r.X.CONTROVERSIAL,c=e=>{let t=e.timeSort;return(t=a(e.sort)?t||r.sc:void 0)===e.timeSort?e:Object.assign({},e,{timeSort:t})},i=e=>{var t=e.split("_"),s=n(t,2);const r=s[0],a=s[1];return c({sort:r,timeSort:a})},o=e=>{var t=c(e);const s=t.sort,r=t.timeSort;return s+(r?`_${r}`:"")}},"./src/lib/makeCollectionCommentsPageKey/index.ts":function(e,t,s){"use strict";t.a=((e,t,s,r={})=>{let n=`collectionCommentsPage--[collection:'${e}']`;return t&&(n+=`--[post:'${t}']`),s&&(n+=`--[rootComment:'${s}']`),r&&(r.sort&&r.hasSortParam&&(n+=`--[sort:'${r.sort}']`),r.context&&(n+=`--[context:${r.context}]`),r.depth&&(n+=`--[depth:${r.depth}]`)),n})},"./src/lib/makeDraftKey/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n});var r=s("./src/app/models/Draft.ts");function n(e,t){return`${r.a[e]}_${t}`}},"./src/lib/makeExplorePageKey/index.ts":function(e,t,s){"use strict";function r(e){return`Explore--[categoryName:${e.categoryName}]`}s.d(t,"a",function(){return r})},"./src/lib/makeOverviewConversationsItemKey/index.ts":function(e,t,s){"use strict";t.a=((e,t)=>{return`overviewConversations--[profile:'${t}']--[post:'${e}']`})},"./src/lib/makePartnerSubredditConnectionPageKey/index.ts":function(e,t,s){"use strict";function r(e){return`PartnerSubredditConnection--[to:${e.to}]--[userId:${e.userId}]`}s.d(t,"a",function(){return r})},"./src/lib/makePostDraftPageKey/index.ts":function(e,t,s){"use strict";function r(e){let t="PostDraftPage";return e.draftId&&(t+=`--[draftId:${e.draftId}]`),t}s.d(t,"a",function(){return r})},"./src/lib/makeSearchKey/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return c}),s.d(t,"d",function(){return u});var r,n=s("./src/lib/constants/index.ts"),a=s("./src/reddit/constants/parameters.ts");!function(e){e.Trending="trending"}(r||(r={}));const c=(e,t)=>`${e}--[type:${t.sort().join(",")}]`,i=new Set(["f","n","0"]),o=(e="")=>{const t=e.toLowerCase();return!(0===t.length||"off"===t||i.has(t[0]))},d=e=>e?"1":"",u=e=>{const t=e.sort&&Object(n.Ec)(e.sort)?e.sort:n.Ub,s=e.t&&n.Bc.has(e.t)?e.t:n.Vb,r=e.type;let c=[];"string"==typeof r?c=decodeURIComponent(r).split(",").sort().filter(n.Fc):Array.isArray(r)&&(c=r.filter(n.Fc)),c&&0!==c.length||(c=[n.kc.Posts,n.kc.Subreddits,n.kc.Users]);const i={q:e.q,sort:t,t:s,type:c};return void 0!==e.include_over_18&&(i.include_over_18=d(o(e.include_over_18))),void 0!==e.restrict_sr&&(i.restrict_sr=d(o(e.restrict_sr))),e.is_multi&&(i.is_multi=d(o(e.is_multi))),e.category&&(i.category=e.category),e[a.b]&&(i.category_name=e.category_name),e[a.r]&&(i.source=e.source),i};t.c=((e,t={})=>{let s=e||"!";return t.include_over_18&&(s=`${s}--[include_over_18:${t.include_over_18}]`),t.q&&(s=`${s}--[q:${t.q}]`),t.restrict_sr&&(s=`${s}--[restrict_sr:${t.restrict_sr}]`),t.sort&&(s=`${s}--[sort:${t.sort}]`),t.t&&(s=`${s}--[t:${t.t}]`),t.category&&(s=`${s}--[c:${t.category}]`),s.toLowerCase()})},"./src/lib/omitKey/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n});var r=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};function n(e,t){if(t in e){const s=t;e[s];return r(e,["symbol"==typeof s?s:s+""])}return e}},"./src/lib/truthyString/index.ts":function(e,t,s){"use strict";const r=new Set(["0","disabled","false","off",""]);t.a=(e=>!r.has(e.toLowerCase()))},"./src/reddit/actions/ad.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/config.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts");const i=async(e,t,s)=>{const r={count:t};return s&&(r.subreddit=s),Object(c.c)(e,{type:"json",endpoint:`${n.a.gatewayUrl}/desktopapi/v1/sidebar_ads`,method:a.jb.POST,data:r})};var o=s("./src/reddit/helpers/adCount/index.ts"),d=s("./src/reddit/reducers/sidebarPromotedPosts/models/index.ts"),u=s("./src/reddit/selectors/platform.ts"),l=s("./src/reddit/selectors/posts.ts");s.d(t,"a",function(){return b}),s.d(t,"c",function(){return p}),s.d(t,"b",function(){return O}),s.d(t,"d",function(){return f}),s.d(t,"e",function(){return m}),s.d(t,"f",function(){return j}),s.d(t,"g",function(){return h}),s.d(t,"h",function(){return S});const b="AD_BRAND_SAFETY_STATUS_RECEIVED",p="FETCH_SIDEBAR_PROMOTED_POSTS_FAILED",O="FETCH_SIDEBAR_PROMOTED_POSTS_COMPLETED",f="REFRESH_SIDEBAR_PROMOTED_POST_COMPLETED",m="RESET_SIDEBAR_PROMOTED_POSTS",j=Object(r.a)(b),g=Object(r.a)(O),y=Object(r.a)(p),_=Object(r.a)(f),E=Object(r.a)("REFRESH_SIDEBAR_PROMOTED_POST_FAILED"),h=(Object(r.a)(m),e=>async(t,s,{apiContext:r})=>{const n=s(),a=Object(o.b)(n,e),c=a.length;if(0===c)return;switch(e){case d.a.COMMENTS:case d.a.COMMENTS_OVERLAY:if(!Object(u.l)(n,{page:n.platform.currentPage}))return;break;case d.a.FRONTPAGE:case d.a.MULTIREDDIT:case d.a.SEARCH_RESULTS:case d.a.SUBREDDIT:{const e=n.listings.activeKey,t=Object(l.I)(n,{listingKey:e});if(!t||!t.length)return;break}default:return void 0}const b=Object(u.e)(n);let p;if((p=b?await i(r(),c,b):await i(r(),c)).body&&p.body.length){const e=p.body,s={};for(let t=0;t<e.length;t++)s[a[t]]=e[t];t(g(s))}else t(y(p.error))}),S=e=>async(t,s,{apiContext:r})=>{const n=await i(r(),1);n.body&&n.body.length?t(_({[e]:n.body[0]})):t(E(n.error))}},"./src/reddit/actions/alpha.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/logs/errors.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts");var d=s("./src/config.ts");var u=s("./src/reddit/helpers/redesignOptoutCookie/index.ts"),l=s("./src/reddit/actions/toaster.ts"),b=s("./src/reddit/models/Toast/index.ts"),p=s("./src/lib/makeRequest/index.ts");async function O(e,t){return await Object(p.b)({method:n.jb.POST,endpoint:"/timings/optoutrequest",data:{appName:e.statsAppName,successful:t},type:"json"})}s.d(t,"b",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"a",function(){return j}),s.d(t,"e",function(){return g}),s.d(t,"f",function(){return y}),s.d(t,"d",function(){return _}),s.d(t,"g",function(){return C}),s.d(t,"j",function(){return R}),s.d(t,"i",function(){return A}),s.d(t,"h",function(){return D}),s.d(t,"k",function(){return P});const f="ADD_PARTICIPANTS_REQUESTED",m="ADD_PARTICIPANTS_SUCCESS",j="ADD_PARTICIPANTS_FAILED",g="REMOVE_PARTICIPANTS_REQUESTED",y="REMOVE_PARTICIPANTS_SUCCESS",_="REMOVE_PARTICIPANTS_FAILED",E=Object(r.a)(y),h=Object(r.a)(f),S=Object(r.a)(j),T=Object(r.a)(y),I=Object(r.a)(g),v=Object(r.a)(_),C=(e,t,s)=>async(r,a,{apiContext:d})=>{r(h());const u=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/api/v1/alpha/add`,method:n.jb.POST,data:t,type:"json"}))(d(),{subreddits:e,users:t,message:s});u.ok?r(E(Object.assign({},u.body))):r(S({error:u.error}))},R=(e,t)=>async(s,r,{apiContext:a})=>{s(I());const d={subreddits:e,users:t},u=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/api/v1/alpha/remove`,method:n.jb.POST,data:t,type:"json"}))(a(),d);u.ok?s(T(Object.assign({},u.body))):s(v({error:u.error}))},A=e=>async(t,s,{apiContext:r})=>{(await function(e){return Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/api/leave_redesign_beta`,method:"post",type:"json"})}(r())).ok?(Object(u.b)(),await O(r(),!0),e&&window.location.reload()):(O(r(),!1),t(Object(l.e)({kind:b.b.Error,text:"Sorry, something went wrong. Try Opting out again."})))},D=()=>async(e,t,{apiContext:s})=>{Object(u.a)(),function(e){Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/api/join_redesign_beta`,method:"post",type:"json"}).then(()=>{var e=window.location;const t=e.pathname,s=e.search,r=`${d.a.redditUrl}${t}${s}`;window.location.replace(r)})}(s())},P=()=>async(e,t,{apiContext:s})=>{Object(a.a)({context:s(),error:{},type:n.s.LOGGEDIN_HAS_REDESIGN_COOKIE})}},"./src/reddit/actions/apiRequestHeaders.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n});var r=s("./src/lib/makeActionCreator/index.ts");const n="API_REQUEST_HEADERS__set";Object(r.a)(n)},"./src/reddit/actions/apiRequestState.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return a}),s.d(t,"a",function(){return c}),s.d(t,"b",function(){return i}),s.d(t,"c",function(){return o}),s.d(t,"h",function(){return d}),s.d(t,"e",function(){return u}),s.d(t,"f",function(){return l}),s.d(t,"g",function(){return b});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/models/ApiRequestState/index.ts");const a="API_REQUEST_STATE__STARTED",c="API_REQUEST_STATE__COMPLETED",i="API_REQUEST_STATE__FAILED",o="API_REQUEST_STATE__RELEASED";function d(e){return{type:a,payload:{apiRequestStatus:n.a.Pending,apiRequestId:e}}}function u(e){return{type:c,payload:{apiRequestStatus:n.a.Complete,apiRequestId:e}}}function l(e,t){return{type:i,payload:{apiRequestStatus:n.a.Failed,apiRequestId:e,apiError:t}}}const b=Object(r.a)(o)},"./src/reddit/actions/appeal.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts"),o=s("./src/reddit/helpers/addRedesignIdentifier/index.ts");var d=s("./src/reddit/endpoints/me/index.ts"),u=s("./src/reddit/helpers/pageActionLoginRedirect.ts");s.d(t,"e",function(){return l}),s.d(t,"b",function(){return b}),s.d(t,"a",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"c",function(){return f}),s.d(t,"f",function(){return h}),s.d(t,"g",function(){return S});const l="APPEAL_PENDING",b="APPEAL_LOADED",p="APPEAL_FAILED",O="APPEAL_PAGE_LOADED",f="APPEAL_PAGE_FAILED",m=Object(r.a)(l),j=Object(r.a)(b),g=Object(r.a)(p),y=Object(r.a)("APPEAL_PAGE_PENDING"),_=Object(r.a)(O),E=Object(r.a)(f),h=()=>async(e,t,{apiContext:s})=>{e(y());const r=await Object(d.a)(s());if(r.ok&&r.body)if(r.body.account)e(_(r.body));else{const s=t();Object(u.a)(e,s)}else e(E(r.error))},S=(e,t)=>async(s,r,{apiContext:d})=>{if(r().appeal.api.pending)return;s(m());const u=await((e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{method:n.jb.POST,endpoint:Object(o.a)(`${e.apiUrl}/api/appeal`),data:{description:t,email:s}}))(d(),e,t);u.ok&&u.body.success?s(j()):s(g())}},"./src/reddit/actions/authorFlair.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});var r=s("./src/lib/makeActionCreator/index.ts");const n="IN_CONTEXT_AUTHOR_FLAIR_UPDATED",a=Object(r.a)(n)},"./src/reddit/actions/badge.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return c}),s.d(t,"b",function(){return i}),s.d(t,"a",function(){return o}),s.d(t,"f",function(){return d}),s.d(t,"d",function(){return u}),s.d(t,"e",function(){return l}),s.d(t,"i",function(){return b}),s.d(t,"g",function(){return p}),s.d(t,"h",function(){return O}),s.d(t,"j",function(){return f}),s.d(t,"k",function(){return T}),s.d(t,"l",function(){return I}),s.d(t,"m",function(){return v});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/governance/errorToast.ts"),a=s("./src/reddit/endpoints/governance/badges.ts");const c="BADGE__BADGE_MODAL_OPENED",i="BADGE__BADGE_APPLICATION_SUCCESS",o="BADGE__BADGE_APPLICATION_FAILURE",d="BADGE__SUBREDDIT_BADGES_FETCH_SUCCESS",u="BADGE__SUBREDDIT_BADGES_FETCH_FAILURE",l="BADGE__SUBREDDIT_BADGES_FETCH_PENDING",b="BADGE__USER_BADGES_FETCH_SUCCESS",p="BADGE__USER_BADGES_FETCH_FAILURE",O="BADGE__USER_BADGES_FETCH_PENDING",f=Object(r.a)(c),m=Object(r.a)(i),j=Object(r.a)(o),g=(Object(r.a)("BADGE__BADGE_APPLICATION_PENDING"),Object(r.a)(d)),y=Object(r.a)(u),_=Object(r.a)(l),E=Object(r.a)(b),h=Object(r.a)(p),S=Object(r.a)(O),T=({badgeIds:e,subredditId:t})=>async(s,r,{apiContext:c})=>{const i=r(),o=i.user.account;if(o){const r=(i.users.appliedBadges[o.id]||{})[t]||[],d=e.length?e[0]:r[0],u=!!e.length;s(m({badgeIds:e,subredditId:t,userId:o.id}));const l=await Object(a.a)(c(),t,d,u);l.ok||(s(j({badgeIds:e,subredditId:t,error:l.error,previousBadgeIds:r,userId:o.id})),Object(n.a)(s,l.error))}},I=({subredditId:e})=>async(t,s,{apiContext:r})=>{t(_({subredditId:e}));const n=await Object(a.b)(r(),e);n.ok?t(g(Object.assign({},n.body,{subredditId:e}))):t(y({subredditId:e,error:n.error}))},v=({subredditId:e})=>async(t,s,{apiContext:r})=>{const n=s().user.account;if(n){t(S({subredditId:e}));const s=await Object(a.c)(r(),e,n.id);s.ok?t(E(Object.assign({},s.body,{subredditId:e}))):t(h({subredditId:e,error:s.error}))}}},"./src/reddit/actions/category.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return l}),s.d(t,"b",function(){return b}),s.d(t,"a",function(){return p}),s.d(t,"j",function(){return f}),s.d(t,"g",function(){return j}),s.d(t,"f",function(){return g}),s.d(t,"e",function(){return y}),s.d(t,"d",function(){return _}),s.d(t,"h",function(){return T}),s.d(t,"i",function(){return I});var r=s("./node_modules/lodash/isEmpty.js"),n=s.n(r),a=s("./node_modules/react-router-redux/es/index.js"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/reddit/constants/categories.tsx"),o=s("./src/reddit/endpoints/category/categoryList.ts"),d=s("./src/reddit/endpoints/category/subreddits.ts"),u=s("./src/reddit/selectors/category.ts");const l="CATEGORY__LIST_PENDING",b="CATEGORY__LIST_LOADED",p="CATEGORY__LIST_FAILED",O=Object(c.a)(l),f=Object(c.a)(b),m=Object(c.a)(p),j=()=>async(e,t,{apiContext:s})=>{const r=t(),n=Object(u.h)(r),a=Object(u.g)(r);if(n||a)return;e(O());const c=await Object(o.a)(s());if(c.ok){var i=Object(o.b)(c.body);const t=i.categories,s=i.categoryIds;e(f({categories:t,categoryIds:s}))}else e(m(c.error))},g="CATEGORY__SUBREDDITS_PENDING",y="CATEGORY__SUBREDDITS_LOADED",_="CATEGORY__SUBREDDITS_FAILED",E=Object(c.a)(g),h=Object(c.a)(y),S=Object(c.a)(_),T=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(u.l)(a,{id:e}),i=Object(u.k)(a,{id:e});if(c||i)return;s(E({categoryId:e}));const o=await Object(d.a)(n(),e,t);if(o.ok){const t=Object(d.b)(o.body);s(h(Object.assign({categoryId:e},t)))}else s(S({categoryId:e,error:o.error}))},I=e=>async(t,s,{apiContext:r})=>{await t(T(e));const c=s(),o=Object(u.j)(c,{id:e});if(!o)return;const d=o.name,l=Object(u.c)()(c,{categoryName:d});n()(l)||t(Object(a.b)(Object(i.e)(l)))}},"./src/reddit/actions/chat/constants.ts":function(e,t,s){"use strict";var r;s.d(t,"a",function(){return r}),function(e){e.anybody="Everyone",e.account_age_30_days="Account age 30 days",e.nobody="Nobody"}(r||(r={}))},"./src/reddit/actions/chat/sendbirdProxy.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return a}),s.d(t,"b",function(){return i});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/endpoints/chat/index.ts");const a="SENDBIRD_PROXY__SET_CONFIG",c=Object(r.a)(a),i=()=>async(e,t,{apiContext:s})=>{const r=await Object(n.h)(s());r.ok&&await e(c(r.body))}},"./src/reddit/actions/chat/subredditChannel.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return o}),s.d(t,"a",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"e",function(){return l}),s.d(t,"h",function(){return b}),s.d(t,"f",function(){return p}),s.d(t,"g",function(){return O}),s.d(t,"m",function(){return f}),s.d(t,"l",function(){return E}),s.d(t,"i",function(){return h}),s.d(t,"k",function(){return S}),s.d(t,"j",function(){return I}),s.d(t,"b",function(){return C});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/endpoints/chat/index.ts"),a=s("./src/reddit/models/SubredditChannel/index.ts"),c=s("./src/reddit/selectors/chat.ts"),i=s("./src/reddit/selectors/user.ts");const o="SUBREDDIT_CHANNELS__REQUESTED",d="SUBREDDIT_CHANNELS__ADDED",u="SUBREDDIT_CHANNELS__FAILED",l="SUBREDDIT_CHANNEL__ADDED",b="SUBREDDIT_CHANNEL__SELECTED",p="SUBREDDIT_CHANNEL__EDITED",O="SUBREDDIT_CHANNEL__REMOVED",f=Object(r.a)(b),m=Object(r.a)(o),j=Object(r.a)(u),g=Object(r.a)(d),y=Object(r.a)(l),_=Object(r.a)("SUBREDDIT_CHANNEL__FAILED"),E=e=>async(t,s,{apiContext:r})=>{var i=s().user;const o=i.account,d=i.session;if(!o||!d)return;t(m({subredditId:e}));const u=Object(c.d)(s(),{subredditId:e}),l=await Object(n.i)(r(),e,u);if(l.ok){var b=l.body;const s=b.rooms,r=b.subreddit_chat_enabled,n=b.user_subreddit_chat_enabled,c=Object(a.d)(s);t(g({collection:c,subredditId:e,isSubredditWhitelisted:!!r,isUserSubredditChatEnabled:!!n}))}else if(l.error){const s=l.error;t(j({error:s,subredditId:e}))}},h=(e,t)=>async(s,r,{apiContext:c})=>{var i=r().user;const o=i.account,d=i.session;if(!o||!d)return;const u=await Object(n.d)(c(),d,t);if(u.ok){const r=Object(a.e)(Object.assign({},u.body,t));return await s(y({channel:r,subredditId:e})),r}s(_(u.error))},S=(e,t)=>async(s,r,{apiContext:a})=>{const c=e.channelSendbirdUrl;const i=r().user.session;if(!i)return;const o=await Object(n.f)(a(),c,i,t);o.ok?s(T({channel:e,editedSubredditChannelData:t})):s(_(o.error))},T=Object(r.a)(p),I=e=>async(t,s,{apiContext:r})=>{const a=e.channelId,c=e.channelSendbirdUrl,o=s();if(!Object(i.F)(o))return;const d=await Object(n.e)(r(),c);d.ok?t(v(a)):t(_(d.error))},v=Object(r.a)(O),C="SUBREDDIT_CHANNELS__ENABLED";Object(r.a)(C)},"./src/reddit/actions/chat/subredditSettings.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return c}),s.d(t,"b",function(){return u}),s.d(t,"c",function(){return l});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/endpoints/chat/index.ts"),a=s("./src/reddit/selectors/user.ts");const c="CHAT_SUBREDDIT_SETTINGS__SET",i=Object(r.a)(c),o=Object(r.a)("CHAT_SUBREDDIT_SETTINGS__SET_FAILED"),d=async(e,t,s)=>{try{if(s)return await e(i(Object.assign({subredditId:t},s))),s}catch(r){o(r)}},u=e=>async(t,s,{apiContext:r})=>{try{const i=s();if(!Object(a.F)(i))return;const u=await Object(n.g)(r(),e);return d(t,e,u)}catch(c){o(c)}},l=(e,t)=>async(s,r,{apiContext:c})=>{try{const u=r();if(!Object(a.F)(u))return;const l=await Object(n.j)(c(),e,t);l.ok&&d(s,e,l.body)}catch(i){o(i)}}},"./src/reddit/actions/chat/unreadCount.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return O}),s.d(t,"c",function(){return _});var r,n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/chat/endpoints/sendbird/index.ts"),i=s("./src/reddit/selectors/chat.ts"),o=s("./src/reddit/selectors/user.ts");!function(e){e.SYNC="UNREAD_COUNT__SYNC",e.REQUEST_FAILED="UNREAD_COUNT__REQUEST_FAILED",e.REQUEST_PENDING="UNREAD_COUNT__REQUEST_PENDING",e.REQUEST_SUCCESS="UNREAD_COUNT__REQUEST_SUCCESS"}(r||(r={}));var d=r;const u=d.SYNC,l=d.REQUEST_FAILED,b=d.REQUEST_PENDING,p=d.REQUEST_SUCCESS,O=Object(a.a)(u),f=Object(a.a)(l),m=Object(a.a)(b),j=Object(a.a)(p);let g;const y=5*n.kb,_=()=>async(e,t,{apiContext:s})=>{const r=t();if(!Object(o.F)(r)||!Object(i.e)(r))return clearTimeout(g);g||e((()=>async(e,t,{apiContext:s})=>{const r=t(),n=r.user.session;if(n&&Object(o.F)(r)&&Object(i.e)(r)){e(m());const t=await Object(c.i)(s(),n);t&&t.ok?e(j({basicChannelCount:t.body.unread_count||0,subredditChannelCount:t.body.subreddit_unread_count||0})):e(f({error:t.error}))}})()),g=setTimeout(()=>{e(_())},y)}},"./src/reddit/actions/chat/userSettings.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/toaster.ts"),c=s("./src/config.ts"),i=s("./src/lib/constants/index.ts"),o=s("./src/lib/makeApiRequest/index.ts"),d=s("./src/lib/omitHeaders/index.ts"),u=s("./src/reddit/constants/headers.ts");var l=s("./src/reddit/featureFlags/index.ts"),b=s("./src/reddit/helpers/trackers/chat.ts"),p=s("./src/reddit/models/Toast/index.ts"),O=s("./src/reddit/selectors/user.ts"),f=s("./src/telemetry/index.ts"),m=s("./src/reddit/actions/chat/constants.ts");s.d(t,"a",function(){return y}),s.d(t,"b",function(){return E}),s.d(t,"c",function(){return T});const j=Object(n.a)("USER_SETTINGS__FETCH_PENDING"),g=Object(n.a)("USER_SETTINGS__FETCH_FAILURE"),y="USER_SETTINGS__UPDATE_SUCCESS",_=Object(n.a)(y),E=()=>async(e,t,{apiContext:s})=>{const r=t();if(!l.d.userInChatUserSettings(r))return;e(j());const n=await(e=>Object(o.c)(Object(d.a)(e,[u.a]),{endpoint:`${c.a.sendbirdServiceUrl}/api/v1/chat/me/settings`,method:i.jb.GET}))(s());if(n.ok){const t=Object.assign({},n.body);e(_({invitePolicy:m.a[t.invite_policy]}))}else e(g(n.error))},h=Object(n.a)("USER_SETTINGS__SAVE_PENDING"),S=Object(n.a)("USER_SETTINGS__SAVE_FAILURE"),T=e=>async(t,s,{apiContext:n})=>{const j=s();if(!l.d.userInChatUserSettings(j))return;const g=e.invitePolicy,y=Object.keys(m.a).find(e=>m.a[e]===g);if(y){t(h());const e=await(async(e,t)=>Object(o.c)(Object(d.a)(t,[u.a]),{endpoint:`${c.a.sendbirdServiceUrl}/api/v1/chat/me/settings`,method:i.jb.PUT,data:JSON.stringify({invite_policy:e})}))(y,n());Object(f.a)(Object(b.f)(y)(j));const s=Object(O.M)(j);if(e.ok){const e=m.a[y];t(_({invitePolicy:e})),t(Object(a.e)({kind:p.b.SuccessCommunity,text:Object(r.a)(s,"settings.page.saveRequestSuccess")}))}else t(S(e.error))}}},"./src/reddit/actions/claimgold.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/app/strings/index.ts"),a=s("./src/reddit/actions/toaster.ts"),c=s("./src/reddit/models/Toast/index.ts"),i=s("./src/lib/constants/index.ts"),o=s("./src/lib/makeApiRequest/index.ts"),d=s("./src/lib/omitHeaders/index.ts"),u=s("./src/reddit/constants/headers.ts"),l=s("./src/reddit/helpers/r2/normalizeR2APIErrors/index.ts");var b=async(e,t)=>{const s={api_type:"json",code:t.code,raw_json:1};return Object(o.c)(Object(d.a)(e,[u.a]),{method:i.jb.POST,endpoint:`${e.apiUrl}/api/claimgold`,data:s}).then(e=>e.ok?Object.assign({},e):Object.assign({},e,{error:Object(l.a)(e)}))},p=s("./src/reddit/helpers/genericServerError/index.ts"),O=s("./src/reddit/selectors/claimgold.ts"),f=s("./src/reddit/selectors/user.ts");s.d(t,"e",function(){return m}),s.d(t,"d",function(){return j}),s.d(t,"i",function(){return _}),s.d(t,"g",function(){return E}),s.d(t,"j",function(){return h}),s.d(t,"f",function(){return S}),s.d(t,"b",function(){return T}),s.d(t,"c",function(){return I}),s.d(t,"a",function(){return v}),s.d(t,"h",function(){return C});const m="CLAIMGOLD__OPEN_CLAIMGOLD_MODAL",j="CLAIMGOLD__CLOSE_CLAIMGOLD_MODAL",g=Object(r.a)(m),y=Object(r.a)(j),_=()=>async(e,t)=>{const s=t();Object(O.b)(s)?e(y()):e(g())},E="CLAIMGOLD_UPDATE_CODE",h=Object(r.a)(E),S="CLAIM_GOLD__TRIGGER_LOADER",T="CLAIM_GOLD__CLAIM_GOLD_PENDING",I="CLAIM_GOLD__CLAIM_GOLD_SUCCESSFUL",v="CLAIM_GOLD__CLAIM_GOLD_FAILED",C=()=>async(e,t,{apiContext:s})=>{const r={code:t().claimGold.code};e(D());try{const t=await b(s(),r);t.error?e(x(t)):e(N())}catch(n){e(x(n))}},R=Object(r.a)(S),A=Object(r.a)(T),D=()=>async(e,t)=>{e(A()),window.setTimeout(()=>{t().claimGold.api.pending&&e(R())},2e3)},P=Object(r.a)(v),x=e=>async(t,s)=>{const r=Object(f.M)(s());await t(P(Object.assign({},e,{error:e.error||Object(p.a)(r)})));const n=s().claimGold.api.error;n&&t(Object(a.e)({kind:c.b.Error,duration:a.a,text:n}))},w=Object(r.a)(I),N=()=>async(e,t)=>{e(w());const s=Object(f.M)(t());e(Object(a.e)({kind:c.b.SuccessCommunity,text:Object(n.a)(s,"gold.premiumPurchase.redeemGiftCodeSuccess")}))}},"./src/reddit/actions/comment.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/lib/makeCommentsPageKey/index.ts"),c=s("./src/lib/makeDraftKey/index.ts"),i=s("./src/app/models/Draft.ts"),o=s("./src/app/strings/index.ts"),d=s("./src/reddit/actions/economics/tips/async.ts"),u=s("./src/reddit/actions/governance/async.ts"),l=s("./src/reddit/actions/modal.ts"),b=s("./src/reddit/actions/postCreation/editorContent.ts"),p=s("./src/reddit/actions/shortcuts.ts"),O=s("./src/reddit/actions/toaster.ts"),f=s("./src/reddit/actions/vote.ts"),m=s("./src/reddit/constants/adEvents.ts"),j=s("./src/reddit/constants/modals.ts"),g=s("./src/lib/constants/index.ts"),y=s("./src/lib/makeApiRequest/index.ts"),_=s("./src/lib/omitHeaders/index.ts"),E=s("./src/reddit/constants/headers.ts"),h=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),S=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const T=(e,t)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(`${e.apiUrl}/api/save`),method:g.jb.POST,data:{id:t}}),I=(e,t)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(`${e.apiUrl}/api/unsave`),method:g.jb.POST,data:{id:t}}),v=(e,t)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:`${e.apiUrl}/api/ignore_reports`,method:g.jb.POST,data:{id:t}}),C=(e,t)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:`${e.apiUrl}/api/unignore_reports`,method:g.jb.POST,data:{id:t}});var R=s("./src/reddit/components/RichTextEditor/RTEState/index.tsx"),A=s("./src/reddit/helpers/genericServerError/index.ts"),D=s("./src/reddit/helpers/r2/normalizeCommentFromR2/index.ts"),P=s("./src/reddit/helpers/r2/normalizeR2APIErrors/index.ts"),x=s("./src/reddit/models/PostCreationForm/index.ts");const w=async(e,t,s,r,n,a)=>{const c={api_type:"json",return_rtjson:!0,thing_id:s};if(a===x.h.MARKDOWN)c.text=r.text;else{c.text=null;let e=null;r.rteState&&(e=R.a.toRichTextJSON(r.rteState).document),c.richtext_json=JSON.stringify({document:e})}return Object(y.c)(Object(_.a)(e,[E.a]),{method:g.jb.POST,endpoint:Object(h.a)(Object(S.a)(`${e.apiUrl}/api/comment.json`)),data:c}).then(e=>e.ok?e.body.json?e.body.json.errors.length?Object.assign({},e,{ok:!1,error:Object(P.a)(e)}):Object.assign({},e,{body:{comment:Object(D.a)(e.body.json.data.things[0].data,n)}}):Object.assign({},e,{body:{comment:Object(D.a)(e.body,n)}}):Object.assign({},e,{error:e.error||Object(A.a)(t)}))};var N=s("./src/reddit/endpoints/post/index.tsx"),k=s("./src/reddit/endpoints/post/convert.ts"),L=s("./src/reddit/helpers/commentList/index.ts"),U=s("./src/reddit/helpers/dom/index.ts"),M=s("./src/reddit/helpers/pixels.ts"),G=s("./src/telemetry/index.ts"),F=s("./src/reddit/selectors/telemetry.ts");var B=s("./src/reddit/helpers/trackers/commentsPage.ts"),$=s("./src/reddit/models/Comment/index.ts"),q=s("./src/reddit/models/Post/index.ts"),V=s("./src/reddit/models/RichTextJson/index.ts"),H=s("./src/reddit/models/RichTextJson/nodeMakers.ts"),K=s("./src/reddit/models/Toast/index.ts"),W=s("./src/reddit/models/Vote/index.ts"),Y=s("./src/reddit/featureFlags/index.ts"),z=s("./src/reddit/selectors/comments.ts"),Q=s("./src/reddit/selectors/posts.ts"),X=s("./src/reddit/selectors/user.ts");s.d(t,"B",function(){return Z}),s.d(t,"fb",function(){return te}),s.d(t,"m",function(){return se}),s.d(t,"Q",function(){return re}),s.d(t,"db",function(){return ne}),s.d(t,"K",function(){return ie}),s.d(t,"P",function(){return oe}),s.d(t,"u",function(){return de}),s.d(t,"t",function(){return ue}),s.d(t,"s",function(){return le}),s.d(t,"W",function(){return fe}),s.d(t,"nb",function(){return me}),s.d(t,"S",function(){return je}),s.d(t,"i",function(){return ge}),s.d(t,"h",function(){return ye}),s.d(t,"d",function(){return _e}),s.d(t,"e",function(){return Ee}),s.d(t,"c",function(){return he}),s.d(t,"b",function(){return Se}),s.d(t,"j",function(){return Te}),s.d(t,"M",function(){return Ie}),s.d(t,"L",function(){return ve}),s.d(t,"V",function(){return De}),s.d(t,"kb",function(){return Pe}),s.d(t,"J",function(){return we}),s.d(t,"G",function(){return Ne}),s.d(t,"Z",function(){return ke}),s.d(t,"mb",function(){return Le}),s.d(t,"R",function(){return Ue}),s.d(t,"D",function(){return Me}),s.d(t,"F",function(){return Ge}),s.d(t,"E",function(){return Fe}),s.d(t,"C",function(){return Be}),s.d(t,"jb",function(){return qe}),s.d(t,"hb",function(){return Ve}),s.d(t,"ib",function(){return Ke}),s.d(t,"gb",function(){return We}),s.d(t,"o",function(){return Ye}),s.d(t,"n",function(){return ze}),s.d(t,"k",function(){return Qe}),s.d(t,"f",function(){return Xe}),s.d(t,"l",function(){return Je}),s.d(t,"N",function(){return et}),s.d(t,"r",function(){return rt}),s.d(t,"O",function(){return nt}),s.d(t,"lb",function(){return at}),s.d(t,"X",function(){return ct}),s.d(t,"Y",function(){return it}),s.d(t,"cb",function(){return ot}),s.d(t,"p",function(){return dt}),s.d(t,"H",function(){return lt}),s.d(t,"q",function(){return bt}),s.d(t,"z",function(){return pt}),s.d(t,"y",function(){return Ot}),s.d(t,"A",function(){return ft}),s.d(t,"g",function(){return mt}),s.d(t,"U",function(){return gt}),s.d(t,"T",function(){return ht}),s.d(t,"bb",function(){return St}),s.d(t,"w",function(){return Tt}),s.d(t,"v",function(){return It}),s.d(t,"x",function(){return vt}),s.d(t,"ab",function(){return Dt}),s.d(t,"eb",function(){return Pt}),s.d(t,"a",function(){return xt}),s.d(t,"I",function(){return wt});var J=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const Z="COMMENT__STICKIED_COMMENT_SUCCESS",ee={},te=Object(n.a)(Z),se="COMMENT__MUTATED",re=Object(n.a)(se),ne=e=>async(t,s,{apiContext:r})=>{if(!Object(X.F)(s()))return t(Object(l.i)(j.a.REGISTER_MODAL_ID)),void t(Object(l.l)({actionSource:l.a.Save,redirectUrl:Object(z.m)(s(),{commentId:e})}));const n=s().comments.models[e];if(!n)return;const a=n.isSaved?I:T;if(t(re({[e]:{isSaved:!n.isSaved}})),(await a(r(),e)).ok){const r=Object(X.M)(s()),a=n.isSaved?Object(o.a)(r,"comment.unsavedSuccess"):Object(o.a)(r,"comment.savedSuccess"),c=Object(o.a)(r,"comment.savedUndo");t(Object(O.e)({text:a,kind:K.b.Undo,buttonText:c,buttonAction:ne(e)}))}else t(re({[e]:{isSaved:n.isSaved}}))},ae=e=>`viewing-comment-${e}`,ce=r.a.telemetry.commentConsumedThreshold,ie=e=>async(t,s)=>{const n=s();if(!Object(z.n)(n,{commentId:e})||Math.random()>r.a.telemetry.commentSampleRate)return;(({state:e,commentId:t})=>Object(G.a)(Object.assign({source:"comment",action:"view",noun:"comment"},F.defaults(e),{profile:F.profile(e),post:F.post(e,t),media:F.media(e,t),subreddit:F.subreddit(e),comment:F.comment(e,t)})))({state:n,commentId:e}),G.c.start(ae(e));const a=setTimeout(()=>(({state:e,commentId:t})=>Object(G.a)(Object.assign({source:"comment",action:"consume",noun:"comment"},F.defaults(e),{profile:F.profile(e),post:F.post(e,t),media:F.media(e,t),subreddit:F.subreddit(e),comment:F.comment(e,t)})))({state:n,commentId:e}),ce);ee[e]=a},oe=(e,t)=>async(s,r)=>{const n=r(),a=ae(e);if(Object(z.n)(n,{commentId:e})&&G.c.has(a)){const s=G.c.end(a);!t&&s<ce&&(clearTimeout(ee[e]),delete ee[e])}},de="COMMENT__MORECOMMENTS_PENDING",ue="COMMENT__MORECOMMENTS_LOADED",le="COMMENT__MORECOMMENTS_FAILED",be=Object(n.a)(de),pe=Object(n.a)(ue),Oe=Object(n.a)(le),fe=(e,t)=>async(s,n,{apiContext:a})=>{const c=n(),i=c.moreComments.models[t],o=c.platform.currentPage,l=o&&o.routeMatch,b=l&&l.match;const p=(b?b.params:null).partialPostId;if(!p)return;const O=Object(q.f)(p);s(be({moreCommentsId:i.id}));const f=await((e,t,s)=>Object(y.c)(e,{data:s,endpoint:Object(S.a)(`${r.a.gatewayUrl}/desktopapi/v1/morecomments/${t}`),method:g.jb.POST,type:"json"}))(a(),O,{token:i.token});if(f.ok){const t=f.body,r=Object(L.a)(t,O);if(s(pe(Object.assign({key:e,moreCommentsItem:i,shouldCollapse:r},t))),Y.d.spPoints(n())||Y.d.spSupport(n())||Y.d.spLoadtest(n())){const e=n().posts.models[O];if(e&&"subreddit"===e.belongsTo.type){const r=Object.keys(t.comments),a=r.map(e=>{return t.comments[e].authorId}),c=r.concat(e.id),i=e.belongsTo.id;var m=await Promise.all([Object(u.a)(),Object(d.a)()]),j=J(m,2);const o=j[0],l=j[1],b=[s(o({subredditId:i,userIds:a}))];(Y.d.spSupport(n())||Y.d.spLoadtest(n()))&&b.push(s(l({subredditId:i,contentIds:c}))),await Promise.all(b)}}}else s(Oe(Object.assign({moreCommentsItem:i},f.error)))},me=Object(f.b)(L.b,W.a.upvoted),je=Object(f.b)(L.b,W.a.downvoted),ge="COMMENT__FOCUSED_TOGGLED",ye="COMMENT__FOCUSED_SET",_e="COMMENT__COLLAPSED_TOGGLED",Ee="COMMENT__COLLAPSED_UNSET",he="COMMENTS__HIDDEN_TOGGLED",Se="COMMENTS__HIDDEN_SET",Te="COMMENT_FORM_FOCUS_CHANGED",Ie=Object(n.a)(ge),ve=Object(n.a)(ye),Ce=Object(n.a)(_e),Re=Object(n.a)(Ee),Ae=(Object(n.a)(Se),Object(n.a)(he),Object(n.a)(Te)),De=({hasFocus:e,draftKey:t})=>async(s,r)=>{!r().comments.drafts[t]||s(Ae({hasFocus:e,draftKey:t}))},Pe=({commentId:e,commentsPageKey:t,scrollToAndRemeasure:s})=>async(r,n)=>{const a=n(),c=Object($.e)(e),i=Object(z.o)(a,{commentLink:c,commentsPageKey:t}).depth,o=!a.comments.collapsed[t][e];r(Ce({commentId:e,commentsPageKey:t})),o&&0===i&&s(e,!0),Object(p.r)()},xe=({commentId:e,commentsPageKey:t})=>async(s,r)=>{s(Re({commentId:e,commentsPageKey:t}))},we=({commentLink:e,commentsPageKey:t,lineDepth:s,scrollToAndRemeasure:r})=>async(n,a)=>{const c=a(),i=Object(L.e)(t,e,s,c);n(Ce({commentId:i,commentsPageKey:t})),0===s&&r(i,!0),Object(p.r)()},Ne=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.comments.models[e],c=n.user.account?n.user.account.displayText:null;a&&c&&(t(re({[e]:{isApproved:!0,approvedBy:c,bannedBy:null,isRemoved:!1,isSpam:!1,modNote:null,modReasonBy:null,modRemovalReason:null,numReports:0}})),(await((e,t)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(`${e.apiUrl}/api/approve`),method:g.jb.POST,data:{id:t}}))(r(),e)).ok||t(re({[e]:{isApproved:a.isApproved,approvedBy:null,bannedBy:a.bannedBy,isRemoved:a.isRemoved,isSpam:a.isSpam,modNote:a.modNote,modReasonBy:a.modReasonBy,modRemovalReason:a.modRemovalReason,numReports:a.numReports||null}})),Object(p.r)())},ke=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=a.comments.models[e],i=a.user.account?a.user.account.displayText:null;c&&i&&(s(re({[e]:{approvedBy:null,bannedBy:i,isApproved:!1,isRemoved:!t,isSpam:t}})),(await((e,t,s)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(`${e.apiUrl}/api/remove`),method:g.jb.POST,data:{id:t,spam:s}}))(n(),e,t)).ok||s(re({[e]:{approvedBy:c.approvedBy,bannedBy:c.bannedBy,isApproved:c.isApproved,isRemoved:c.isRemoved,isSpam:c.isSpam}})),Object(p.r)())},Le=e=>async(t,s,{apiContext:r})=>{const n=s().comments.models[e];if(!n)return;const a=n.ignoreReports?C:v;t(re({[e]:{ignoreReports:!n.ignoreReports}})),(await a(r(),e)).ok||t(re({[e]:{ignoreReports:n.ignoreReports}}))},Ue=(e,t,s)=>async(r,n,{apiContext:c})=>{const i=n(),o=i.comments.models[e];if(!o)return;const d=o.postId,u=i.postStickiedComments.data[d],l=g.h[t];r(re({[e]:{distinguishType:t,isAdmin:t===g.F.ADMIN,isMod:t===g.F.MODERATOR,isStickied:!!s}})),s&&u&&u!==e&&r(re({[u]:{isStickied:!1}})),(await((e,t,s,r)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(`${e.apiUrl}/api/distinguish/${s}`),method:g.jb.POST,data:{id:t,sticky:r}}))(c(),e,l,s||null)).ok?s&&r(te({id:e,postId:d,commentsPageKey:Object(a.a)(d,null,Object.assign({sort:g.t.CONFIDENCE},i.platform.currentPage.queryParams))})):(r(re({[e]:{distinguishType:o.distinguishType,isAdmin:o.isAdmin,isMod:o.isMod,isStickied:o.isStickied}})),r(re({[u]:{isStickied:i.comments.models[u].isStickied}})))},Me="COMMENT__SUBMIT_COMMENT_PENDING",Ge="COMMENT__SUBMIT_REPLY_TO_POST_SUCCESS",Fe="COMMENT__SUBMIT_REPLY_TO_COMMENT_SUCCESS",Be="COMMENT__SUBMIT_COMMENT_FAILURE",$e=Object(n.a)(Me),qe=Object(n.a)(Ge),Ve=Object(n.a)(Fe),He=Object(n.a)(Be),Ke=(e,t,s,r,n,a)=>async(c,i,{apiContext:o})=>{const d=i(),u=d.comments.submit.pending[r];if(!d.user.account||u)return;B.f(i(),a),c($e({draftKey:r,draft:n}));const l=d.user.account.displayText,b=n.commentMode,O=await w(o(),e,t,n,l,b);if(O.ok){c(qe(Object.assign({},O.body,{headCommentId:Object(z.w)(d,{commentsPageKey:s}),commentsPageKey:s,draftKey:r})));const e=Object(Q.D)(i(),{postId:t});Object(M.a)(e.events,m.a.CommentSubmitted)}else c(He({draftKey:r,error:O.error}));Object(p.r)()},We=e=>async(t,s,{apiContext:r})=>{const n=e.language,a=e.parentCommentId,c=e.commentsPageKey,i=e.parentCommentDepth,o=e.draftKey,d=e.formData,u=e.editorMode,l=s(),b=l.comments.submit.pending[o];if(!l.user.account||b)return;B.f(l,u),t($e({draftKey:o,draft:d}));const O=l.user.account.displayText,f=d.commentMode,m=await w(r(),n,a,d,O,f);m.ok?t(Ve(Object.assign({},m.body,{parentCommentId:a,commentsPageKey:c,draftKey:o,depth:i+1}))):t(He({draftKey:o,error:m.error})),Object(p.r)()},Ye="COMMENT__COMMENT_REPLY_FORM_OPENED",ze="COMMENT__COMMENT_REPLY_FORM_CANCELLED",Qe="COMMENT__COMMENT_FORM_MUTATED",Xe="COMMENT__COMMENT_DRAFT_CLEARED",Je="COMMENT__COMMENT_FORM_SWITCHED_MODE",Ze=Object(n.a)(Ye),et=Object(n.a)(ze),tt=Object(n.a)(Qe),st=(Object(n.a)(Xe),Object(n.a)(Je)),rt="INITIALIZE_COMMENT_EDITOR_MODE",nt=(Object(n.a)(rt),(e,t,s)=>async(r,n,{apiContext:a})=>{const c=e===x.h.RICH_TEXT,i=Object(X.M)(n());if(!t||"object"==typeof t&&Object(V.E)(t))r(st({editorMode:e,draftKey:s,content:c?V.i:""})),r(Object(b.c)(e));else{r(Object(b.b)(s));const n=await Object(k.a)(a(),e,c?t:JSON.stringify(t));if(n.ok){const t=n.body.output;r(Object(b.a)(s)),r(st({editorMode:e,draftKey:s,content:t})),r(Object(b.c)(e))}else r(Object(b.a)(s)),r(Object(O.e)({duration:O.a,kind:K.b.Error,text:Object(o.a)(i,"error.generic")}))}}),at=({parentCommentId:e,commentsPageKey:t})=>async(s,r)=>{const n=r(),a=Object(c.a)(i.a.replyToComment,e);if(!Object(X.F)(r()))return s(Object(l.i)(j.a.REGISTER_MODAL_ID)),void s(Object(l.l)({actionSource:l.a.Reply,redirectUrl:Object(z.m)(r(),{commentId:e})}));if(n.comments.replyFormOpen[t]&&n.comments.replyFormOpen[t][e])return void s(et({parentCommentId:e,commentsPageKey:t}));let o="",d=null;const u=n.user.prefs.commentMode,b=Object(U.c)();if(b){const e=b.filter(e=>!!e&&10!==e.charCodeAt(0));if(u===x.h.MARKDOWN)o=e.map(e=>`> ${e}\n`).join("");else{const t=e.map(e=>H.r(e,null)).map(e=>H.k([e])),s=H.r("",null),r=H.k([s]);d={document:[H.c(t),r]}}}const p=n.comments.drafts[a];let O;O=b?{commentMode:u,draftType:i.a.replyToComment,rtJson:d,text:`${o}\n`}:p||{commentMode:u,draftType:i.a.replyToComment,rtJson:d,text:""},s(Ze({parentCommentId:e,commentsPageKey:t,draftKey:a,formData:O}))},ct=e=>async(t,s)=>{t(xe(e)),t(gt(e))},it=({parentCommentId:e,commentsPageKey:t})=>async(s,r)=>{s(et({parentCommentId:e,commentsPageKey:t})),s(at({parentCommentId:e,commentsPageKey:t})),s(xe({commentId:e,commentsPageKey:t}))},ot=(e,t)=>s=>s(tt({draftKey:e,formData:t})),dt="COMMENT__DISABLE_AUTOFOCUS",ut=Object(n.a)(dt),lt=e=>t=>t(ut({draftKey:e})),bt="COMMENT__EDIT_COMMENT_ENABLED",pt="COMMENT__REQUEST_EDIT_PENDING",Ot="COMMENT__REQUEST_EDIT_FAILURE",ft="COMMENT__REQUEST_EDIT_SUCCESS",mt="COMMENT__COMMENT_EDIT_FORM_CANCELLED",jt=Object(n.a)(bt),gt=({commentId:e,commentMode:t,commentsPageKey:s,draftKey:r,text:n})=>async(a,c)=>{const o=c();o.user.account&&(B.c(o),a(jt({commentId:e,commentsPageKey:s,draftKey:r,formData:{text:n,commentMode:t,rteState:null,draftType:i.a.edit,hasFocus:!0}})))},yt=Object(n.a)(pt),_t=Object(n.a)(Ot),Et=Object(n.a)(ft),ht=Object(n.a)(mt),St=({language:e,id:t,commentsPageKey:s,depth:r,draftKey:n,formData:a})=>async(r,c,{apiContext:i})=>{const o=c();if(!o.user.account)return;r(yt({draftKey:n})),B.d(o);const d=o.user.account.displayText||"",u=a.commentMode,l=await(async(e,t,s,r,n,a,c)=>{const i={api_type:"json",return_rtjson:!0,thing_id:s};if(c===x.h.MARKDOWN)i.text=n.text;else{i.text=null;let e=null;n.rteState&&(e=R.a.toRichTextJSON(n.rteState).document),i.richtext_json=JSON.stringify({document:e})}return Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(Object(S.a)(`${e.apiUrl}/api/editusertext`)),method:g.jb.POST,data:i}).then(e=>e.ok?e.body.json?e.body.json.errors.length?Object.assign({},e,{ok:!1,error:Object(P.a)(e)}):Object.assign({},e,{body:{comment:Object(D.a)(e.body.json.data.things[0].data,a)}}):Object.assign({},e,{body:{comment:Object(D.a)(e.body,a)}}):Object.assign({},e,{error:e.error||Object(A.a)(t)}))})(i(),e,t,0,a,d,u);if(l.ok){const e=l.body;r(Et({commentId:t,commentsPageKey:s,draftKey:n})),r(re({[t]:Object.assign({},e.comment)}))}else r(_t({draftKey:n,error:l.error}))},Tt="COMMENT__REQUEST_DELETE_PENDING",It="COMMENT__REQUEST_DELETE_FAILURE",vt="COMMENT__REQUEST_DELETE_SUCCESS",Ct=Object(n.a)(Tt),Rt=Object(n.a)(It),At=Object(n.a)(vt),Dt=(e,t,s,r)=>async(r,n,{apiContext:a})=>{const c=n();if(!c.user.account)return;r(Ct({id:t})),B.a(t,c);const i=await((e,t,s)=>Object(y.c)(Object(_.a)(e,[E.a]),{endpoint:Object(h.a)(`${e.apiUrl}/api/del`),method:g.jb.POST,data:{id:t}}).then(e=>e.ok?e.body.json&&e.body.json.errors.length?Object.assign({},e,{ok:!1,error:Object(P.a)(e)}):Object.assign({},e,{body:{}}):Object.assign({},e,{error:e.error||Object(A.a)(s)})))(a(),t,e);i.ok?r(At({id:t,postId:s})):r(Rt({id:t,error:i.error}))},Pt=e=>async(t,s,{apiContext:r})=>{const n=!s().comments.models[e].sendReplies;t(re({[e]:{sendReplies:n}})),(await Object(N.o)(r(),e,n)).ok||t(re({[e]:{sendReplies:!n}}))},xt="COMMENT__CHANGE_HIGHLIGHT_FILTER",wt=Object(n.a)(xt)},"./src/reddit/actions/commentList.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"c",function(){return d});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/helpers/trackers/commentList.ts");const a="COMMENTLIST__MARKED_END",c="COMMENTLIST__UNMARKED_END",i=Object(r.a)(a),o=Object(r.a)(c),d=(e,t)=>async(s,r)=>{const a=r();e in a.profileCommentsPage.fetchedTokens?e in a.profileCommentsPage.commentIds?s(o({listingKey:e})):n.a(a,e):s(i({listingKey:e,listingName:t}))}},"./src/reddit/actions/contentGate.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return u}),s.d(t,"b",function(){return l}),s.d(t,"c",function(){return b}),s.d(t,"d",function(){return p}),s.d(t,"e",function(){return O}),s.d(t,"f",function(){return f}),s.d(t,"h",function(){return j}),s.d(t,"i",function(){return g}),s.d(t,"j",function(){return y}),s.d(t,"k",function(){return _}),s.d(t,"l",function(){return E}),s.d(t,"g",function(){return h});var r=s("./src/config.ts"),n=s("./node_modules/js-cookie/src/js.cookie.js"),a=s.n(n),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/reddit/constants/cookie.ts"),o=s("./src/reddit/endpoints/user/preferences.ts"),d=s("./src/reddit/selectors/user.ts");const u="CONTENTGATE__VISITED_GOLD_SUBREDDIT",l="CONTENTGATE__VISITED_PRIVATE_SUBREDDIT",b="CONTENTGATE__VISITED_QUARANTINED_SUBREDDIT",p="CONTENTGATE__SET_OVER_18_PREF",O="CONTENTGATE__VISITED_BANNED_SUBREDDIT",f="CONTENTGATE__VISITED_NONEXISTENT_SUBREDDIT",m=Object(c.a)(p),j=Object(c.a)(O),g=Object(c.a)(f),y=Object(c.a)(u),_=Object(c.a)(l),E=Object(c.a)(b),h=()=>async(e,t,{apiContext:s})=>{const n=t();if(Object(d.F)(n)&&n.platform.currentPage)await Object(o.f)(s());else{const e=new Date;e.setFullYear(e.getFullYear()+2),a.a.set(i.g,"1",{expires:e,domain:r.a.cookieDomain})}e(m({over18:!0}))}},"./src/reddit/actions/dashboard.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"d",function(){return i}),s.d(t,"f",function(){return o}),s.d(t,"e",function(){return d});var r=s("./src/lib/makeActionCreator/index.ts");const n="DASHBOARD__COMPONENT_SELECTED",a="DASHBOARD__SUBREDDIT_SELECTED",c="DASHBOARD__SUBREDDIT_LOADED",i=Object(r.a)(n),o=Object(r.a)(a),d=Object(r.a)(c)},"./src/reddit/actions/discoveryUnit.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/lib/makeListingKey/index.ts"),c=s("./src/reddit/actions/category.ts"),i=s("./src/reddit/actions/pages/subreddit.ts"),o=s("./src/lib/addQueryParams/index.ts"),d=s("./src/lib/makeApiRequest/index.ts"),u=s("./src/lib/omitHeaders/index.ts"),l=s("./src/lib/stringInterpolate/index.ts"),b=s("./src/reddit/constants/headers.ts"),p=s("./src/reddit/helpers/r2/normalizePostFromR2/index.ts"),O=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const f=e=>{const t=[],s={};return e.data.children.forEach(e=>{const r=Object(p.a)(e.data);t.push(r.id),s[r.id]=r}),{postIds:t,posts:s}};var m=s("./src/reddit/models/DiscoveryUnit/index.ts"),j=s("./src/reddit/selectors/category.ts"),g=s("./src/reddit/selectors/discoveryUnit.ts"),y=s("./src/reddit/selectors/listings.ts"),_=s("./src/reddit/selectors/posts.ts");s.d(t,"c",function(){return h}),s.d(t,"b",function(){return S}),s.d(t,"a",function(){return T}),s.d(t,"h",function(){return R}),s.d(t,"f",function(){return A}),s.d(t,"e",function(){return D}),s.d(t,"d",function(){return P}),s.d(t,"i",function(){return k}),s.d(t,"j",function(){return U}),s.d(t,"g",function(){return M}),s.d(t,"k",function(){return G});var E=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const h="DISCOVERY_UNIT__LIST_PENDING",S="DISCOVERY_UNIT__LIST_LOADED",T="DISCOVERY_UNIT__LIST_FAILED",I=Object(n.a)(h),v=Object(n.a)(S),C=Object(n.a)(T),R=()=>async(e,t,{apiContext:s})=>{const r=t(),n=Object(g.i)(r),a=Object(g.h)(r);if(n||a)return;e(I());const c=await(e=>Promise.resolve({ok:!0,error:null,status:200,headers:{},details:"",body:{global:{discovery_config_v1:{discovery_units:[{id:"xd_66",enabled:!0,layout:"large",parameters:{sort:"hot"},surface:"explore",unit_name:"posts_in_category_rails_hero",unit_type:"community_category",url:"/api/posts_in_category.json"},{id:"xd_67",enabled:!0,layout:"large",surface:"explore",unit_name:"posts_in_subreddit_hero",unit_type:"community",url:"/r/%{subredditName}/hot.json"},{id:"xd_68",enabled:!0,layout:"large",parameters:{sort:"hot"},surface:"explore",unit_name:"posts_in_category_rails_small",unit_type:"community_category",url:"/api/posts_in_category.json"},{id:"xd_69",enabled:!0,layout:"large",surface:"explore",unit_name:"posts_in_subreddit_small",unit_type:"community",url:"/r/%{subredditName}/hot.json"},{id:"xd_70",enabled:!0,layout:"large",surface:"search",unit_name:"search_posts",unit_type:"community_category",url:"/api/posts_in_category.json"},{id:"xd_71",enabled:!0,layout:"large",surface:"search",unit_name:"search_subreddits",unit_type:"community_category",url:"/api/subreddits_in_category.json"},{id:"xd_72",enabled:!0,layout:"large",surface:"subreddit_listing",unit_name:"community_banner_posts",unit_type:"subreddit_listing",url:"/r/%{subredditName}/top.json"}]}}}}))(s());if(c.ok){const t=(e=>{return{discoveryUnits:e.global.discovery_config_v1.discovery_units.reduce((e,t)=>{const s={enabled:t.enabled,experiment:t.experiment,id:t.id,index:t.index,layout:t.layout,options:t.options,parameters:t.parameters,subtitle:t.subtitle,subtitleIcon:t.subtitle_icon,surface:t.surface,title:t.title,unitName:t.unit_name,unitType:t.unit_type,url:t.url};return e[s.id]=s,e},{})}})(c.body).discoveryUnits;e(v({discoveryUnits:t}))}else e(C({error:c.error}))},A="DISCOVERY_UNIT__UNIT_DATA_PENDING",D="DISCOVERY_UNIT__UNIT_DATA_LOADED",P="DISCOVERY_UNIT__UNIT_DATA_FAILED",x=Object(n.a)(A),w=Object(n.a)(D),N=Object(n.a)(P),k=(e,t)=>async(s,n,{apiContext:c})=>{const i=n(),o=Object(a.a)(e,r.X.HOT,{category:t}),l=Object(y.h)(i,{listingKey:o}),p=!!i.listings.listingOrder.fetchedTokens[o];if(l||p)return;s(x({key:o}));const m=await((e,t)=>Object(d.c)(Object(u.a)(e,[b.a]),{endpoint:Object(O.a)(`${e.apiUrl}/api/posts_in_category.json?category=${t}`),method:r.jb.GET}))(c(),t);if(m.ok){var j=f(m.body);const e=j.postIds,t=j.posts,r=e.length>0?e.length-1:0;s(w({key:o,meta:i.meta,postIds:e,posts:t,token:e[r]}))}else s(N({key:o,error:m.error}))},L=(e,t,s)=>async(n,c,{apiContext:i})=>{const p=c(),j=((e,t)=>Object(a.a)(e.unitName,r.X.HOT,Object.assign({},e.parameters,t)))(e,t),y=Object(g.g)(p,{listingKey:j,shouldLoadMore:s});if(!y)return;const _=y.fetchedToken;if(n(x({fetchedToken:_,key:j})),!e.url)return void n(w({fetchedToken:"",key:j,meta:p.meta,token:""}));const h=t.category,S=E(t,["category"]),T=Object.assign({},S,{after:_,category_id:h}),I=await((e,t,s)=>{let n=t.url;return t.parameters&&(n=Object(o.a)(Object(l.a)(n,t.parameters),t.parameters)),s&&(n=Object(o.a)(Object(l.a)(n,s),s)),Object(d.c)(Object(u.a)(e,[b.a]),{endpoint:Object(O.a)(`${e.apiUrl}${n}`),method:r.jb.GET})})(i(),e,T);if(I.ok)switch(e.unitName){case m.b:case m.d:case m.c:case m.e:case m.f:case m.g:{var v=f(I.body);const e=v.postIds,t=v.posts;n(w({fetchedToken:_,key:j,meta:p.meta,postIds:e,posts:t,token:e[e.length-1]}));break}}else n(N({key:j,error:I.error}))},U=e=>async(t,s,{apiContext:n})=>{const c=Object(a.a)(e,r.X.HOT);Object(_.y)(s(),{listingKey:c}).length>0||await t(Object(i.e)(c,e,{},!0))},M=(e,t,s,r)=>async(n,a,{apiContext:i})=>{let o;if(await n(c.g()),!s&&!(o=Object(j.f)(a(),{categoryName:t})))return;const d=s||o&&o.id;await Promise.all([n(L(e,{category:d},r)),n(c.h(d))])},G=(e,t,s)=>async(r,n,{apiContext:a})=>{await Promise.all([r(U(t)),r(L(e,{subredditName:t},s))])}},"./src/reddit/actions/economics/paymentSystems/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"d",function(){return c});const r="ECONOMICS__PAYMENT_SYSTEM__CARD_DELETE_SUCCESS",n="ECONOMICS__PAYMENT_SYSTEM__INFO_FAILURE",a="ECONOMICS__PAYMENT_SYSTEM__INFO_FETCHED",c="ECONOMICS__PAYMENT_SYSTEM__INFO_PENDING"},"./src/reddit/actions/economics/support/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n});const r="ECONOMICS__SUPPORT__SUPPORT_MODAL_OPENED",n="ECONOMICS__SUPPORT__TOTAL_SUPPORT_INCREASED"},"./src/reddit/actions/economics/tips/async.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});const r=()=>s.e("EconActions").then(s.bind(null,"./src/reddit/actions/economics/tips/thunkedActions.ts")).then(e=>e.tipDetailsFetched)},"./src/reddit/actions/economics/tips/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});const r="ECONOMICS__TIPS__TIP_DETAILS_SUCCESS"},"./src/reddit/actions/embedAndImage.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return n}),s.d(t,"a",function(){return a}),s.d(t,"d",function(){return c}),s.d(t,"c",function(){return i});var r=s("./src/lib/makeActionCreator/index.ts");const n="EMBEDS__UNLOADABLE",a="EMBEDS__LOADABLE",c=Object(r.a)(n),i=Object(r.a)(a)},"./src/reddit/actions/emoji.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/forEach.js"),n=s.n(r),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/lib/uploadToS3/index.ts"),d=s("./src/reddit/constants/headers.ts");var u=s("./src/lib/makeActionCreator/index.ts"),l=s("./src/reddit/actions/imageUploads.ts"),b=s("./src/reddit/helpers/getGenericUploadError.ts"),p=s("./src/reddit/helpers/getS3KeyFromUrl/index.ts"),O=s("./src/reddit/helpers/media/index.ts"),f=s("./src/reddit/models/Emoji/index.ts"),m=s("./src/reddit/models/Image/index.tsx"),j=s("./src/reddit/selectors/subreddit.ts"),g=s("./src/reddit/actions/toaster.ts");s.d(t,"g",function(){return y}),s.d(t,"d",function(){return E}),s.d(t,"c",function(){return h}),s.d(t,"f",function(){return I}),s.d(t,"e",function(){return v}),s.d(t,"a",function(){return A}),s.d(t,"n",function(){return x}),s.d(t,"m",function(){return N}),s.d(t,"j",function(){return k}),s.d(t,"k",function(){return L}),s.d(t,"h",function(){return U}),s.d(t,"i",function(){return M}),s.d(t,"b",function(){return G}),s.d(t,"l",function(){return B});const y="STRUCTURED_STYLES__NEW_EMOJI_ADDED",_=Object(u.a)(y),E="STRUCTURED_STYLES__EMOJI_DELETE_LOADED",h="STRUCTURED_STYLES__EMOJI_DELETE_FAILED",S=Object(u.a)(E),T=Object(u.a)(h),I="GET_ALL_EMOJIS_LOADED",v="GET_ALL_EMOJIS_FAILED",C=Object(u.a)(I),R=Object(u.a)(v),A="STRUCTURED_STYLES__EMOJIS_ENABLED_SETTING_LOADED",D=Object(u.a)(A),P=e=>({text:"Failed to save emoji",buttonText:"Retry",buttonAction:N(e)}),x=({imageData:e,subredditId:t})=>async(s,r,n)=>{const u=r(),b=Object(j.G)(u,{subredditId:t}).name;s(Object(l.k)(e));const p=e.file,f=await Object(O.f)(p),g=await(async(e,t,s,r)=>Object(c.c)(Object(i.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/emoji_asset_upload_s3.json`,method:a.jb.POST,data:{filepath:s,mimetype:r}}))(n.apiContext(),b,p.name,f);if(g.ok){const t=await(async(e,t,s)=>Object(o.a)(s,t))(n.apiContext(),g.body.s3UploadLease,p);if(t.ok){if(!r().imageUploads[e.id])return void Object(m.d)(e);const n=decodeURIComponent(t.body.PostResponse.Location),a=g.body.websocketUrl,c=Object(m.m)(e,n,a);s(Object(l.j)(c))}else{const r=Object(m.j)(e,t.error);s(Object(l.i)(r))}}else{const t=Object(m.j)(e,g.error);s(Object(l.i)(t))}},w=(e,t)=>async(s,r,n)=>{const o=e.imageData,u=e.subredditId,b=e.emojiName,O=Object(p.a)(o.url),f=r(),y=Object(j.G)(f,{subredditId:u}).name,_=await(async(e,t,s,r)=>Object(c.c)(Object(i.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/emoji.json`,method:a.jb.POST,data:{s3_key:s,name:r}}))(n.apiContext(),y,O,b);if(!_.ok){const r=Object(m.j)(o,_.error);s(Object(l.i)(r)),s(Object(g.e)(P(e))),t&&t.close()}},N=e=>async(t,s,r)=>{const n=e.imageData,a=e.subredditId,c=e.emojiName;if(t(Object(l.k)(n)),!n.websocketUrl)return t(Object(g.e)({text:"Could not upload emoji"}));const i=new WebSocket(n.websocketUrl);i.onopen=(async()=>{await w(e,i)(t,s,r)}),i.onmessage=(s=>{const r=JSON.parse(s.data);if("success"===r.type){const e=r.payload.emoji_url,s=Object(m.n)(n,e);t(Object(l.l)(s));const i=Object(f.e)(c,s.url,a);t(_(i))}else{const s=Object(b.a)(c),r=Object(m.j)(n,s);t(Object(l.i)(r)),t(Object(g.e)(P(e)))}i.close()}),i.onerror=(s=>{const r=Object(b.a)(c),a=Object(m.j)(n,r);t(Object(l.i)(a)),t(Object(g.e)(P(e))),i.close()})},k=e=>async(t,s,{apiContext:r})=>{const o=s(),u=Object(j.G)(o,{subredditId:e}).name,l=await(async(e,t)=>Object(c.c)(Object(i.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/emojis/all`,method:a.jb.GET,type:"json"}).then(e=>(e.ok&&n()(e.body,e=>n()(e,(e,t)=>e.name=t)),e)))(r(),u);if(l.ok){const e=l.body;t(C(e))}else t(R(l.error))},L=e=>async(t,s,{apiContext:r})=>{s().emojis[e]||t(k(e))},U=(e,t)=>async(s,r,{apiContext:n})=>{const o=r(),u=Object(j.G)(o,{subredditId:t}).name,l=await(async(e,t,s)=>Object(c.c)(Object(i.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/v1/${s}/emoji/${t}`,method:a.jb.DELETE,type:"json"}))(n(),e,u);if(l.ok){s(S({emojiName:e,subredditId:t}))}else s(T(l.error))},M=(e,t)=>async(s,r,{apiContext:n})=>{const o=r(),u=Object(j.G)(o,{subredditId:e}).name;if((await(async(e,t,s)=>Object(c.c)(Object(i.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/enable_emojis_in_sr.json`,method:a.jb.POST,data:{subreddit:t,enable:s}}))(n(),u,t)).ok){s(D({subredditId:e,emojisEnabled:t}))}},G="EMOJI_CUSTOM_SIZE_UPDATED",F=Object(u.a)(G),B=(e,t)=>async(s,r,{apiContext:n})=>{const o=r(),u=Object(j.G)(o,{subredditId:e}).name;(await(async(e,t,s)=>Object(c.c)(Object(i.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/emoji_custom_size`,method:a.jb.POST,data:s}))(n(),u,t)).ok&&s(F({subredditId:e,emojiCustomSize:t}))}},"./src/reddit/actions/events.ts":function(e,t,s){"use strict";s.r(t);var r=s("./src/app/strings/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/reddit/actions/toaster.ts"),i=s("./src/lib/makeApiRequest/index.ts"),o=s("./src/lib/omitHeaders/index.ts"),d=s("./src/reddit/constants/headers.ts");var u=(e,t,s,r,a)=>Object(i.c)(Object(o.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/event_post_time.json`,method:n.jb.POST,data:{id:t,event_start:s,event_end:r,event_tz:a}});var l=(e,t)=>Object(i.c)(Object(o.a)(e,[d.a]),{endpoint:`${e.apiUrl}/api/start_event_post.json`,method:n.jb.POST,data:{id:t}}),b=s("./src/reddit/models/Toast/index.ts"),p=s("./src/reddit/selectors/posts.ts");s.d(t,"START_EVENT_NOW_SUCCESS",function(){return O}),s.d(t,"startEventNowSuccess",function(){return f}),s.d(t,"startEventNowRequested",function(){return m}),s.d(t,"EDIT_EVENT_TIME_SUCCESS",function(){return j}),s.d(t,"editEventTimeSuccess",function(){return g}),s.d(t,"editEventTimeRequested",function(){return y});const O="START_EVENT_NOW_SUCCESS",f=Object(a.a)(O),m=e=>async(t,s,{apiContext:n})=>{const a=await l(n(),e),i=s();if(a.ok){t(f({postId:e}));const n=s(),a=Object(p.D)(n,{postId:e}),i=a&&a.title||"";t(Object(c.e)({kind:b.b.SuccessMod,text:Object(r.a)(n.user.language,"events.eventStartedSuccessfully",{title:i})}))}else t(Object(c.e)({kind:b.b.Error,text:Object(r.a)(i.user.language,"error.type.generic")}))},j="EDIT_EVENT_TIME_SUCCESS",g=Object(a.a)(j),y=(e,t)=>async(s,a,{apiContext:i})=>{const o=await u(i(),e,t.startDate,t.endDate,t.timezoneName),d=a();if(o.ok){const t=o.body,i=14400,d=Math.round(t.event_start/n.Wb);let u=t.event_end;const l={eventStart:d,eventEnd:u=u&&Math.round(u/n.Wb)||d+i,eventIsLive:t.event_is_live};s(g({postId:e,eventInfo:l}));const O=a(),f=Object(p.D)(O,{postId:e}),m=f&&f.title||"";s(Object(c.e)({kind:b.b.SuccessMod,text:Object(r.a)(O.user.language,"events.eventTimeUpdatedSuccessfully",{title:m})}))}else s(Object(c.e)({kind:b.b.Error,text:Object(r.a)(d.user.language,"error.type.generic")}))}},"./src/reddit/actions/experiments.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c});var r=s("./src/lib/makeActionCreator/index.ts");s("./src/reddit/endpoints/user/index.ts");const n="EXPERIMENTS__REQUEST_LOADED",a=(Object(r.a)("EXPERIMENTS__REQUEST_PENDING"),Object(r.a)("EXPERIMENTS__REQUEST_FAILED"),Object(r.a)(n),"EXPERIMENTS__SET_EXPERIMENT_OVERRIDE"),c=Object(r.a)(a)},"./src/reddit/actions/exportImportStyles.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return l}),s.d(t,"b",function(){return b}),s.d(t,"a",function(){return p}),s.d(t,"d",function(){return _}),s.d(t,"e",function(){return E});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/app/strings/index.ts"),a=s("./src/lib/loadWithRetries/index.ts"),c=s("./src/reddit/actions/structuredStyles.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/reddit/models/StructuredStyles/index.ts"),d=s("./src/reddit/models/Toast/index.ts"),u=s("./src/reddit/selectors/subreddit.ts");const l="STRUCTURED_STYLES__EXPORT_THEME_PENDING",b="STRUCTURED_STYLES__EXPORT_THEME_LOADED",p="STRUCTURED_STYLES__EXPORT_THEME_FAILED",O=Object(r.a)(l),f=Object(r.a)(b),m=Object(r.a)(p),j=Object(r.a)("STRUCTURED_STYLES__IMPORT_THEME_PENDING"),g=Object(r.a)("STRUCTURED_STYLES__IMPORT_THEME_LOADED"),y=Object(r.a)("STRUCTURED_STYLES__IMPORT_THEME_FAILED"),_=e=>async(t,r)=>{t(O());const c=r(),o=c.user.language,l=Object(u.G)(c,{subredditId:e}).name,b=c.structuredStyles.models[e],p=await Object(a.a)(()=>Promise.all([s.e("vendors~ExportTheme~ImportTheme~xml2js"),s.e("vendors~ExportTheme~ImportTheme"),s.e("ExportTheme")]).then(s.bind(null,"./src/reddit/helpers/exportTheme/index.ts"))).then(e=>e.default),j=await p(b,l);j.ok?(t(f()),t(Object(i.e)({kind:d.b.SuccessMod,text:Object(n.a)(o,"structuredStyles.forms.themes.exportSuccessToast")}))):(t(m(j.error)),t(Object(i.e)({kind:d.b.Error,text:Object(n.a)(o,"structuredStyles.forms.themes.exportFailToast")})))},E=e=>async(t,r)=>{t(j());const u=r().user.language,l=await Object(a.a)(()=>Promise.all([s.e("vendors~ExportTheme~ImportTheme~xml2js"),s.e("vendors~ExportTheme~ImportTheme"),s.e("ImportTheme")]).then(s.bind(null,"./src/reddit/helpers/importTheme/index.ts"))).then(e=>e.default),b=await l(e);b.ok?(t(g()),t(Object(i.e)({kind:d.b.SuccessMod,text:Object(n.a)(u,"structuredStyles.forms.themes.importSuccessToast")})),0!==Object.keys(b.attributes).length&&t(Object(c.o)(Object(o.f)(b.attributes)))):(t(y(b.error)),t(Object(i.e)({kind:d.b.Error,text:Object(n.a)(u,"structuredStyles.forms.themes.importFailToast")})))}},"./src/reddit/actions/externalAccount.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/app/strings/index.ts"),a=s("./src/lib/addQueryParams/index.ts"),c=s("./src/reddit/actions/toaster.ts"),i=s("./src/reddit/constants/parameters.ts"),o=s("./src/lib/constants/index.ts"),d=s("./src/lib/makeApiRequest/index.ts"),u=s("./src/lib/omitHeaders/index.ts"),l=s("./src/reddit/constants/headers.ts"),b=s("./src/reddit/helpers/addRedesignIdentifier/index.ts");const p=e=>{return e.reduce((e,t)=>(e[t.provider]=t,e),{})};var O=s("./src/reddit/models/Toast/index.ts"),f=s("./src/reddit/models/User/index.ts"),m=s("./src/reddit/selectors/externalAccount.ts"),j=s("./src/reddit/selectors/platform.ts"),g=s("./src/reddit/selectors/subreddit.ts"),y=s("./src/reddit/selectors/user.ts");s.d(t,"l",function(){return _}),s.d(t,"k",function(){return E}),s.d(t,"j",function(){return h}),s.d(t,"i",function(){return S}),s.d(t,"h",function(){return T}),s.d(t,"g",function(){return I}),s.d(t,"o",function(){return x}),s.d(t,"p",function(){return w}),s.d(t,"b",function(){return N}),s.d(t,"c",function(){return k}),s.d(t,"a",function(){return L}),s.d(t,"n",function(){return F}),s.d(t,"e",function(){return B}),s.d(t,"f",function(){return $}),s.d(t,"d",function(){return q}),s.d(t,"m",function(){return W});const _="USER_EXTERNAL_ACCOUNT_ACCOUNTS_PENDING",E="USER_EXTERNAL_ACCOUNT_ACCOUNTS_LOADED",h="USER_EXTERNAL_ACCOUNT_ACCOUNTS_FAILED",S="SUBREDDIT_EXTERNAL_ACCOUNT_ACCOUNTS_PENDING",T="SUBREDDIT_EXTERNAL_ACCOUNT_ACCOUNTS_LOADED",I="SUBREDDIT_EXTERNAL_ACCOUNT_ACCOUNTS_FAILED",v=Object(r.a)(_),C=Object(r.a)(E),R=Object(r.a)(h),A=Object(r.a)(S),D=Object(r.a)(T),P=Object(r.a)(I),x=e=>async(t,s,{apiContext:r})=>{const n=s(),a=Object(y.j)(n),c=e||a&&Object(f.f)(a);if(!c)return;if(Object(m.f)(n,{username:c}))return;t(v(c));const i=await((e,t)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:Object(b.a)(`${e.apiUrl}/api/v1/external_account/user/${t}.json`),method:o.jb.GET}))(r(),c);if(i.ok){const e=p(i.body);t(C({username:c,accountsData:e}))}else t(R(i.error))},w=()=>async(e,t,{apiContext:s})=>{const r=t(),n=Object(j.e)(r);if(!n)return;const a=r.externalAccount.api.subreddit.fetched[n],c=r.externalAccount.api.subreddit.pending[n];if(a||c)return;const i=Object(g.s)(r,{subredditName:n});if(!(i&&i.hasExternalAccount))return;e(A(n));const O=await((e,t)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:Object(b.a)(`${e.apiUrl}/api/v1/external_account/subreddit/${t}.json`),method:o.jb.GET}))(s(),n);if(O.ok){const t=p(O.body);e(D({subredditName:n,accountsData:t}))}else e(P(O.error))},N="EXTERNAL_ACCOUNT_DISCONNECT_PENDING",k="EXTERNAL_ACCOUNT_DISCONNECT_SUCCESS",L="EXTERNAL_ACCOUNT_DISCONNECT_FAILED",U=Object(r.a)(N),M=Object(r.a)(k),G=Object(r.a)(L),F=e=>async(t,s,{apiContext:r})=>{t(U({provider:e}));const n=Object(y.j)(s()),a=Object(f.f)(n),c=await((e,t)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:Object(b.a)(`${e.apiUrl}/api/v1/external_account/${t}/disconnect.json`),method:o.jb.POST}))(r(),e);c.ok?t(M({provider:e,username:a})):t(G({provider:e,error:c.error}))},B="OAUTH_FLOW_URL_PENDING",$="OAUTH_FLOW_URL_SUCCESS",q="OAUTH_FLOW_URL_FAILED",V=Object(r.a)(B),H=Object(r.a)($),K=Object(r.a)(q),W=e=>async(t,s,{apiContext:r})=>{t(V({provider:e}));const p=Object(y.M)(s()),f=Object(a.a)(window.location.href,{[i.c]:e}),m=await((e,t,s)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:Object(b.a)(`${e.apiUrl}/api/v1/external_account/${t}/connect.json`),method:o.jb.POST,data:{redirect_url:s}}))(r(),e,f);if(m.ok){const s=m.body.redirect_url;t(H({provider:e})),window.location.href=s}else t(K({provider:e,error:m.error})),t(Object(c.e)({kind:O.b.Error,text:Object(n.a)(p,"error.type.generic")}))}},"./src/reddit/actions/frontpage.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return y}),s.d(t,"b",function(){return _}),s.d(t,"a",function(){return E}),s.d(t,"d",function(){return I});var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/lib/getParsedUserAgent/index.ts"),c=s("./src/reddit/constants/parameters.ts"),i=s("./src/reddit/endpoints/page/frontpage.ts"),o=s("./src/reddit/endpoints/page/subredditPage.ts"),d=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),u=s("./src/lib/makeActionCreator/index.ts"),l=s("./src/lib/makeListingKey/index.ts"),b=s("./src/lib/constants/index.ts"),p=s("./src/reddit/constants/page.ts"),O=s("./src/reddit/constants/postLayout.ts"),f=s("./src/reddit/contexts/PageLayer/index.tsx"),m=s("./src/reddit/helpers/filterListingResponse/index.ts"),j=s("./src/reddit/selectors/frontpage.ts"),g=s("./src/reddit/selectors/monthsToMinutes.ts");const y="FRONTPAGE__MORE_POSTS_PENDING",_="FRONTPAGE__MORE_POSTS_LOADED",E="FRONTPAGE__MORE_POSTS_FAILED",h=Object(u.a)(y),S=Object(u.a)(_),T=Object(u.a)(E),I=e=>async(t,s,{apiContext:r})=>{const u=s(),y=Object(j.a)(u);var _=e.sort;const E=void 0===_?y:_,I=u.platform.currentPage?u.platform.currentPage.queryParams:{},v=Object(l.a)(p.b,E,I),C=u.listings.postOrder.loadMore[v],R=I[c.s]?I[c.s].toUpperCase():"",A=R in b.rc&&b.rc[R];if(C){const e=u.listings.postOrder.api.pending[v],s=u.listings.postOrder.fetchedTokens,l=!(!s[v]||!s[v][C.token]);if(!e&&!l){t(h({key:v,fetchedToken:C.token}));const e=!!u.platform.currentPage&&!!u.platform.currentPage.queryParams.useMockData,s=Object.assign({after:C.token,dist:C.dist},n()(I,c.j),{isMobile:Object(a.e)(u.meta.userAgent),sort:E,t:Object(d.a)(E,A),layout:O.d[Object(f.O)(u,{})],useMockData:e}),l=Object(g.i)(u),b=Object(g.j)(u),p=l&&b;if(!p){const e=u.platform.lastPage,t=e&&e.url;t&&(s.clickUrl=t)}const j=p?()=>Object(o.a)(r(),l,s):()=>Object(i.a)(r(),s),y=await j(),_=Object.assign({},y.body,Object(m.a)(u,v,y.body));y.ok?t(S(Object.assign({key:v,fetchedToken:C.token,meta:u.meta},_))):t(T(Object.assign({key:v,error:y.error,fetchedToken:C.token},_)))}}}},"./src/reddit/actions/global.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return i}),s.d(t,"b",function(){return d});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/raven/index.ts"),a=s("./src/reddit/selectors/monthsToMinutes.ts"),c=s("./src/reddit/actions/monthsToMinutes.ts");const i="LOCAL_STORAGE_LOADED",o=Object(r.a)(i),d=e=>async(t,s)=>{Object(a.u)(s())&&t(Object(c.q)()),s().user.loid.loid||Object(n.c)("User has no LOID set");const r=e.localStorageData;r&&t(o(r))}},"./src/reddit/actions/gold/constants.ts":function(e,t,s){"use strict";s.d(t,"F",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"E",function(){return a}),s.d(t,"a",function(){return c}),s.d(t,"D",function(){return i}),s.d(t,"d",function(){return o}),s.d(t,"e",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"g",function(){return l}),s.d(t,"h",function(){return b}),s.d(t,"f",function(){return p}),s.d(t,"j",function(){return O}),s.d(t,"k",function(){return f}),s.d(t,"i",function(){return m}),s.d(t,"C",function(){return j}),s.d(t,"B",function(){return g}),s.d(t,"A",function(){return y}),s.d(t,"u",function(){return _}),s.d(t,"y",function(){return E}),s.d(t,"t",function(){return h}),s.d(t,"v",function(){return S}),s.d(t,"x",function(){return T}),s.d(t,"w",function(){return I}),s.d(t,"z",function(){return v}),s.d(t,"n",function(){return C}),s.d(t,"p",function(){return R}),s.d(t,"o",function(){return A}),s.d(t,"s",function(){return D}),s.d(t,"r",function(){return P}),s.d(t,"m",function(){return x}),s.d(t,"q",function(){return w}),s.d(t,"l",function(){return N}),s.d(t,"G",function(){return k});const r="GIVE_PREMIUM__OPEN_GIVE_PREMIUM_MODAL",n="GIVE_PREMIUM__CLOSE_GIVE_PREMIUM_MODAL",a="GILD__OPEN_GILD_MODAL",c="GILD__CLOSE_GILD_MODAL",i="GILD__OPEN_FRAMED_GILD",o="COMMUNITY_AWARDS__CREATE_AWARD_PENDING",d="COMMUNITY_AWARDS__CREATE_AWARD_SUCCESSFUL",u="COMMUNITY_AWARDS__CREATE_AWARD_FAILED",l="COMMUNITY_AWARDS__DELETE_AWARD_PENDING",b="COMMUNITY_AWARDS__DELETE_AWARD_SUCCESSFUL",p="COMMUNITY_AWARDS__DELETE_AWARD_FAILED",O="COMMUNITY_AWARDS__DISABLE_AWARD_PENDING",f="COMMUNITY_AWARDS__DISABLE_AWARD_SUCCESSFUL",m="COMMUNITY_AWARDS__DISABLE_AWARD_FAILED",j="COMMUNITY_AWARDS__MANAGEABLE_AWARDS_PENDING",g="COMMUNITY_AWARDS__MANAGEABLE_AWARDS_LOADED",y="COMMUNITY_AWARDS__MANAGEABLE_AWARDS_FAILED",_="GIVE_PREMIUM__GIVE_PREMIUM_PENDING",E="GIVE_PREMIUM__GIVE_PREMIUM_SUCCESSFUL",h="GIVE_PREMIUM__GIVE_PREMIUM_FAILED",S="GIVE_PREMIUM__SELECT_PACKAGE",T="GIVE_PREMIUM__SET_IS_ANONYMOUS",I="GIVE_PREMIUM__SET_INCLUDE_MESSAGE",v="GIVE_PREMIUM__UPDATE_MESSAGE",C="GILD__SELECT_GILD_TYPE",R="GILD__SET_IS_ANONYMOUS",A="GILD__SET_INCLUDE_MESSAGE",D="GILD__UPDATE_MESSAGE",P="GILD__TRIGGER_LOADER",x="GILD__GILD_PENDING",w="GILD__GILD_SUCCESSFUL",N="GILD__GILD_FAILED",k="GIVE_AWARD__SELECT_AWARD"},"./src/reddit/actions/gold/modals.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return d}),s.d(t,"b",function(){return l}),s.d(t,"d",function(){return b}),s.d(t,"c",function(){return O}),s.d(t,"a",function(){return f}),s.d(t,"f",function(){return m});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/messageIframeParent/index.ts"),a=s("./src/reddit/selectors/gild.ts"),c=s("./src/reddit/helpers/correlationIdTracker.ts"),i=s("./src/telemetry/index.ts"),o=s("./src/reddit/actions/gold/constants.ts");const d=Object(r.a)(o.F),u=Object(r.a)(o.b),l=()=>async(e,t)=>{const r=t();e(u()),Object(c.b)(c.a.GiftPremiumFlow);const n=(await s.e("givePremiumTrackers").then(s.bind(null,"./src/reddit/helpers/trackers/givePremium.ts"))).clickCloseModalEvent;Object(i.a)(n()(r))},b=Object(r.a)(o.E),p=Object(r.a)(o.a),O=Object(r.a)(o.D),f=()=>async(e,t)=>{const r=t(),o=Object(a.d)(r);if(Object(a.h)(r)){const e="close.gild";Object(n.a)({type:e})}e(p());const d=(await s.e("gildTrackers").then(s.bind(null,"./src/reddit/helpers/trackers/gild.ts"))).clickCloseGildModalEvent;Object(i.a)(d(o)(r)),Object(c.b)(c.a.GildingFlow)},m=()=>async()=>{Object(n.a)({type:"login.gild"})}},"./src/reddit/actions/goldPurchaseModals/coinPurchaseModal.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return p}),s.d(t,"a",function(){return O}),s.d(t,"g",function(){return f}),s.d(t,"f",function(){return m}),s.d(t,"c",function(){return j}),s.d(t,"e",function(){return g}),s.d(t,"h",function(){return y}),s.d(t,"k",function(){return _}),s.d(t,"j",function(){return E}),s.d(t,"d",function(){return h}),s.d(t,"i",function(){return T});var r=s("./src/app/strings/index.ts"),n=s("./src/config.ts"),a=s("./src/lib/formatApiError/index.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/reddit/actions/goldPurchaseModals/payment.ts"),o=s("./src/reddit/endpoints/gold/purchase.ts"),d=s("./src/reddit/helpers/correlationIdTracker.ts"),u=s("./src/reddit/models/Gold/Coins/index.ts"),l=s("./src/reddit/selectors/goldPurchaseModals.ts"),b=s("./src/reddit/selectors/user.ts");const p="COIN_PURCHASE_MODAL__OPEN_COIN_PURCHASE_MODAL",O="COIN_PURCHASE_MODAL__CLOSE_COIN_PURCHASE_MODAL",f=Object(c.a)(p),m=Object(c.a)(O),j="COIN_PURCHASE_MODAL__OPEN_COIN_PURCHASE_MODAL_TO_GILD",g=Object(c.a)(j),y=(e,t,s)=>async r=>{r(g({thingId:s}));const n=Object(u.b)(e,t),a=Object(d.c)(d.a.GoldPayment);r(I({coinPackage:n,correlationId:a}))},_=(e,t)=>async(s,n,{apiContext:c})=>{const u=n(),p=t.coins,O=t.pennies,f=Object(d.c)(d.a.GoldPayment),m=Object(b.M)(u);let j,g;s(Object(i.stripeTokenPending)());const y=Object(l.v)(u);if(y||(j=await s(Object(i.validateAndCreateStripeToken)(e)),g=Object(l.r)(u),j))try{const e=await Object(o.g)({coins:p,context:c(),correlationId:f,language:m,pennies:O,rememberCard:g,savedCardId:y||void 0,token:j});if(e.error){const t=Object(a.a)(m,e.error,e.status);return void s(Object(i.stripeApiError)(t))}return void s(Object(i.paymentCompleted)({coins:e.body.coins?e.body.coins:0,confirmed:!1}))}catch(_){const e=Object(a.a)(m,_);s(Object(i.stripeApiError)(e))}else s(Object(i.stripeApiError)(Object(r.a)(m,"error.type.genericCardValidation")))},E=(e,t)=>async(n,c,{apiContext:u})=>{const p=c(),O=t.coins,f=t.pennies,j=Object(d.c)(d.a.GoldPayment),g=Object(b.M)(p);let y,_;n(Object(i.stripeTokenPending)());const E=Object(l.v)(p);if(E||(y=await n(Object(i.validateAndCreateStripeToken)(e)),_=Object(l.r)(p),y))try{var h=p.gild;const e=h.gildModalThingId,t=h.gildType,c=h.isAnonymous,d=h.includeMessage,l=h.message;if(!e||!t)return void n(Object(i.stripeApiError)(Object(r.a)(g,"gold.errors.unknowngild")));const b={gildType:t,includeMessage:d,isAnonymous:c,message:l},I=await Object(o.f)({coins:O,context:u(),correlationId:j,gildParams:b,language:g,pennies:f,rememberCard:_,savedCardId:E||void 0,thingId:e,token:y});if(I.error){const e=Object(a.a)(g,I.error,I.status);return void n(Object(i.stripeApiError)(e))}{const r=(await s.e("gildActions").then(s.bind(null,"./src/reddit/actions/gold/gild.ts"))).gildSuccessful;n(m()),n(Object(i.paymentCompleted)({confirmed:!1}));var S=I.body;const a=S.coins;return void n(r({id:e,gildings:S.gildings,coins:a,gildType:t}))}}catch(T){const e=Object(a.a)(g,T);n(Object(i.stripeApiError)(e))}else n(Object(i.stripeApiError)(Object(r.a)(g,"error.type.genericCardValidation")))},h="COIN_PURCHASE_MODAL__PAYMENT_BLOB_CREATED",S=Object(c.a)(h),T=({coinPackage:e,correlationId:t})=>async(s,r,{apiContext:c})=>{s(f({coinPackage:e}));const d=r(),u=n.a.paypal.buttons[`coins${e.coins}`]||n.a.paypal.buttons.coins500,l=Object(b.M)(d);try{const e=await Object(o.d)(c(),l,u,t);if(e.error){const t=Object(a.a)(l,e.error,e.status);s(Object(i.paypalApiError)(t))}else s(S(e))}catch(p){const e=Object(a.a)(l,p);s(Object(i.paypalApiError)(e))}},I=({coinPackage:e,correlationId:t})=>async(s,c,{apiContext:d})=>{s(f({coinPackage:e}));const u=c(),l=n.a.paypal.buttons[`coinsGild${e.coins}`]||n.a.paypal.buttons.coinsGild500,p=Object(b.M)(u);var O=u.gild;const m=O.gildModalThingId,j=O.gildType,g=O.isAnonymous,y=O.message;if(m&&j)try{const e=await Object(o.c)(d(),p,l,m,j,y,g,t);if(e.error){const t=Object(a.a)(p,e.error,e.status);s(Object(i.paypalApiError)(t))}else s(S(e))}catch(_){const e=Object(a.a)(p,_);s(Object(i.paypalApiError)(e))}else s(Object(i.paypalApiError)(Object(r.a)(p,"gold.errors.unknowngild")))}},"./src/reddit/actions/goldPurchaseModals/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"d",function(){return a}),s.d(t,"e",function(){return c}),s.d(t,"f",function(){return i}),s.d(t,"g",function(){return o}),s.d(t,"h",function(){return d}),s.d(t,"i",function(){return u}),s.d(t,"j",function(){return l}),s.d(t,"k",function(){return b}),s.d(t,"l",function(){return p}),s.d(t,"m",function(){return O}),s.d(t,"n",function(){return f}),s.d(t,"o",function(){return m}),s.d(t,"c",function(){return j}),s.d(t,"p",function(){return g}),s.d(t,"q",function(){return y}),s.d(t,"r",function(){return _});const r="GOLD_PAYMENT__CARD_NAME_EMPTY",n="GOLD_PAYMENT__CARD_NAME_INPUT",a="GOLD_PAYMENT__DELETE_SAVED_CARD",c="GOLD_PAYMENT__FETCHED_STRIPE_INFO",i="GOLD_PAYMENT__PAYMENT_COMPLETED",o="GOLD_PAYMENT__PAYPAL_API_ERROR",d="GOLD_PAYMENT__SAVED_CARDS_PENDING",u="GOLD_PAYMENT__SELECT_PAYMENT_METHOD",l="GOLD_PAYMENT__SELECT_SAVED_CARD",b="GOLD_PAYMENT__STRIPE_API_ERROR",p="GOLD_PAYMENT__STRIPE_ELEMENT_CHANGE",O="GOLD_PAYMENT__CARD_ERROR",f="GOLD_PAYMENT__STRIPE_TOKEN_PENDING",m="GOLD_PAYMENT__TOGGLE_REMEMBER_CARD",j="UPDATE_CARD_MODAL__CLOSE_UPDATE_CARD_MODAL",g="UPDATE_CARD_MODAL__UPDATE_CARD_FAILED",y="UPDATE_CARD_MODAL__UPDATE_CARD_PENDING",_="UPDATE_CARD_MODAL__UPDATE_CARD_SUCCESSFUL"},"./src/reddit/actions/goldPurchaseModals/payment.ts":function(e,t,s){"use strict";s.r(t),s.d(t,"selectPaymentMethod",function(){return u}),s.d(t,"paymentCompleted",function(){return l}),s.d(t,"cardNameInput",function(){return b}),s.d(t,"cardNameEmpty",function(){return p}),s.d(t,"cardElementChange",function(){return O}),s.d(t,"stripeTokenPending",function(){return f}),s.d(t,"stripeTokenError",function(){return m}),s.d(t,"stripeApiError",function(){return j}),s.d(t,"paypalApiError",function(){return g}),s.d(t,"validateAndCreateStripeToken",function(){return y}),s.d(t,"toggleRememberCard",function(){return _}),s.d(t,"selectSavedCard",function(){return E}),s.d(t,"_deleteSavedCard",function(){return h}),s.d(t,"deleteSavedCard",function(){return S}),s.d(t,"loadSavedCards",function(){return v});var r=s("./src/lib/raven/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/endpoints/gold/purchase.ts"),c=s("./src/reddit/actions/goldPurchaseModals/constants.ts"),i=s("./src/app/strings/index.ts"),o=s("./src/reddit/selectors/goldPurchaseModals.ts"),d=s("./src/reddit/selectors/user.ts");const u=Object(n.a)(c.i),l=Object(n.a)(c.f),b=Object(n.a)(c.b),p=Object(n.a)(c.a),O=Object(n.a)(c.l),f=Object(n.a)(c.n),m=Object(n.a)(c.m),j=Object(n.a)(c.k),g=Object(n.a)(c.g),y=e=>async(t,s)=>{const r=s(),n=Object(o.j)(r);var a=await e.createToken({name:n});const c=a.token,u=a.error;if(n.trim()){if(!u&&c)return c;t(m(u||void 0))}else{const e=Object(d.M)(r),s=Object(i.a)(e,"gold.checkoutForm.yourCardsNameFieldIsIncomplete");t(p({message:s}))}},_=Object(n.a)(c.o),E=Object(n.a)(c.j),h=Object(n.a)(c.d),S=e=>async(t,s,{apiContext:n})=>{t(h(e));try{const t=await Object(a.a)(n(),e);if(t.error)throw new Error(t.error.type)}catch(c){Object(r.b)(c)}},T=Object(n.a)(c.h),I=Object(n.a)(c.e),v=()=>async(e,t,{apiContext:s})=>{e(T());const n=t(),c=Object(d.M)(n);try{const t=await Object(a.b)(s(),c);if(t.error)throw new Error(t.error.type);const n=t.body.map(e=>({brand:e.brand,cardId:e.card_id,expirationMonth:e.exp_month,expirationYear:e.exp_year,last4:e.last4}));e(I(n)),n[0]&&e(E(n[0].cardId)),n[0]&&e(u("creditCard"))}catch(i){Object(r.b)(i),e(I([]))}}},"./src/reddit/actions/goldPurchaseModals/premiumPurchaseModal.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return b}),s.d(t,"a",function(){return p}),s.d(t,"e",function(){return O}),s.d(t,"d",function(){return f}),s.d(t,"g",function(){return m}),s.d(t,"c",function(){return j}),s.d(t,"f",function(){return y});var r=s("./src/config.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/app/strings/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/formatApiError/index.ts"),o=s("./src/reddit/actions/goldPurchaseModals/payment.ts"),d=s("./src/reddit/endpoints/gold/purchase.ts"),u=s("./src/reddit/helpers/correlationIdTracker.ts"),l=s("./src/reddit/selectors/user.ts");const b="PREMIUM_PURCHASE_MODAL__OPEN_PREMIUM_PURCHASE_MODAL",p="PREMIUM_PURCHASE_MODAL__CLOSE_PREMIUM_PURCHASE_MODAL",O=Object(n.a)(b),f=Object(n.a)(p),m=e=>async(t,s,{apiContext:r})=>{const n=s(),b=c.xb,p=Object(u.c)(u.a.GoldPayment),O=Object(l.M)(n);t(Object(o.stripeTokenPending)());const f=await t(Object(o.validateAndCreateStripeToken)(e));if(f)try{const e=await Object(d.h)({context:r(),correlationId:p,language:O,pennies:b,token:f});if(e.error){const s=Object(i.a)(O,e.error);t(Object(o.stripeApiError)(s))}else t(Object(o.paymentCompleted)({confirmed:!1}))}catch(m){const e=Object(i.a)(O,m);t(Object(o.stripeApiError)(e))}else t(Object(o.stripeApiError)(Object(a.a)(O,"error.type.genericCardValidation")))},j="PREMIUM_PURCHASE_MODAL__PAYMENT_BLOB_CREATED",g=Object(n.a)(j),y=e=>async(t,s,{apiContext:n})=>{t(O());const a=s(),c=Object(l.M)(a),u=r.a.paypal.buttons.premium;try{const s=await Object(d.e)(n(),c,u,e);if(s.error){const e=Object(i.a)(c,s.error);t(Object(o.paypalApiError)(e))}else t(g(s))}catch(b){const e=Object(i.a)(c,b);t(Object(o.paypalApiError)(e))}}},"./src/reddit/actions/governance/async.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});const r=()=>s.e("GovActions").then(s.bind(null,"./src/reddit/actions/governance/publicWalletsFetched.ts")).then(e=>e.default)},"./src/reddit/actions/governance/communityDetails.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/config.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/reddit/endpoints/governance/requester.ts");var i=s("./src/reddit/actions/governance/constants.ts");s.d(t,"a",function(){return d});const o=Object(r.a)(i.a),d=({subredditId:e})=>async(t,s,{apiContext:r})=>{const i=await function(e,t){return Object(c.a)(e,{endpoint:`${n.a.metaUrl}/communities/${t.subredditId}/me`,method:a.jb.GET})}(r(),{subredditId:e});i.ok&&t(o(Object.assign({subredditId:e},i.body)))}},"./src/reddit/actions/governance/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"d",function(){return c}),s.d(t,"e",function(){return i}),s.d(t,"f",function(){return o}),s.d(t,"g",function(){return d}),s.d(t,"h",function(){return u}),s.d(t,"i",function(){return l}),s.d(t,"j",function(){return b}),s.d(t,"k",function(){return p}),s.d(t,"l",function(){return O}),s.d(t,"m",function(){return f}),s.d(t,"n",function(){return m}),s.d(t,"o",function(){return j}),s.d(t,"p",function(){return g}),s.d(t,"q",function(){return y}),s.d(t,"r",function(){return _}),s.d(t,"s",function(){return E}),s.d(t,"t",function(){return h}),s.d(t,"u",function(){return S}),s.d(t,"v",function(){return T}),s.d(t,"w",function(){return I});const r="GOVERNANCE__COMMUNITY_DETAILS_SUCCESS",n="GOVERNANCE__NEW_SUBREDDIT_SUGGESTED",a="GOVERNANCE__NEW_TOP_MOD_SUGGESTED",c="GOVERNANCE__OPT_OUT_IN_PENDING",i="GOVERNANCE__OPT_OUT_MODAL_OPENED",o="GOVERNANCE__PROPOSAL_CREATION_FAILURE",d="GOVERNANCE__PROPOSAL_CREATION_PENDING",u="GOVERNANCE__PROPOSAL_CREATION_SUCCESS",l="GOVERNANCE__PROPOSAL_OPTION_VOTE_FAILURE",b="GOVERNANCE__PROPOSAL_OPTION_VOTE_PENDING",p="GOVERNANCE__PROPOSAL_OPTION_VOTE_SUCCESS",O="GOVERNANCE__PUBLIC_WALLET_INFO_FAILURE",f="GOVERNANCE__PUBLIC_WALLET_INFO_PENDING",m="GOVERNANCE__PUBLIC_WALLET_INFO_SUCCESS",j="GOVERNANCE__RELEASE_NOTES_MODAL_OPENED",g="GOVERNANCE__RELEASE_NOTES_SUCCESS",y="GOVERNANCE__TRANSFER_FAILURE",_="GOVERNANCE__TRANSFER_MODAL_OPENED",E="GOVERNANCE__TRANSFER_PENDING",h="GOVERNANCE__TRANSFER_SUCCESS",S="GOVERNANCE__WALLETS_FETCH_FAILURE",T="GOVERNANCE__WALLETS_FETCH_PENDING",I="GOVERNANCE__WALLETS_FETCH_SUCCESS"},"./src/reddit/actions/governance/errorToast.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return c});var r=s("./src/reddit/actions/toaster.ts"),n=s("./src/reddit/helpers/governanceErrorText/index.ts"),a=s("./src/reddit/models/Toast/index.ts");function c(e,t){e(Object(r.e)({duration:5e3,kind:a.b.Error,text:Object(n.a)(t)}))}},"./src/reddit/actions/governance/releaseNotes.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/localStorageAvailable/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/config.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts"),d=s("./src/reddit/helpers/r2/normalizePostFromR2/index.ts"),u=s("./src/reddit/endpoints/governance/requester.ts");const l=c.a.releaseNotesSubredditMap||{t5_kzsl3:"rn_funkygoose",t5_37jgj:"rn_ethtrader",t5_2t9ha:"rn_stellar"};var b=s("./src/reddit/actions/governance/constants.ts");s.d(t,"a",function(){return f});const p=Object(a.a)(b.o),O=Object(a.a)(b.p),f=({subredditId:e})=>async(t,s,{apiContext:a})=>{if(!l[e])return;if(!Object(n.a)())return;const c=(e=>`RELEASE_NOTES-${e}`)(e),b=localStorage.getItem(c);let f={};try{b&&(f=JSON.parse(b))}catch(g){return void localStorage.removeItem(c)}const m=Object.keys(f).reduce((e,t)=>f[t]>e?f[t]:e,0);if(Date.now()-r.y<m)return;const j=await function(e,t){const s=l[t.subredditId];return s?Object(u.a)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/r/${s}/new.json?limit=10&rtj=debug`,method:"get"}).then(e=>e.ok?Object.assign({},e,{body:{releaseNotes:e.body.data.children.map(e=>Object(d.a)(e.data))}}):e):Promise.resolve({ok:!1,error:{},status:404})}(a(),{subredditId:e});if(j.ok){t(O(Object.assign({subredditId:e},j.body)));const s=j.body.releaseNotes.map(e=>e.id);s.filter(e=>!f[e]).length&&t(p());const r=s.reduce((e,t)=>(e[t]=Date.now(),e),{});localStorage.setItem(c,JSON.stringify(r))}}},"./src/reddit/actions/harbergerTax/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"c",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"d",function(){return c}),s.d(t,"e",function(){return i}),s.d(t,"f",function(){return o}),s.d(t,"g",function(){return d}),s.d(t,"h",function(){return u});const r="HARBERGER_TAX__BANNER_MANAGE_MODAL_OPENED",n="HARBERGER_TAX__BANNER_PURCHASE_MODAL_OPENED",a="HARBERGER_TAX__BANNER_PURCHASE_FAILURE",c="HARBERGER_TAX__BANNER_PURCHASE_PENDING",i="HARBERGER_TAX__BANNER_PURCHASE_SUCCESS",o="HARBERGER_TAX__BANNER_UPDATE_FAILURE",d="HARBERGER_TAX__BANNER_UPDATE_PENDING",u="HARBERGER_TAX__BANNER_UPDATE_SUCCESS"},"./src/reddit/actions/header.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return n}),s.d(t,"f",function(){return a}),s.d(t,"j",function(){return c}),s.d(t,"k",function(){return i}),s.d(t,"d",function(){return o}),s.d(t,"a",function(){return d}),s.d(t,"b",function(){return u}),s.d(t,"c",function(){return l}),s.d(t,"g",function(){return b}),s.d(t,"h",function(){return p}),s.d(t,"i",function(){return O});var r=s("./src/lib/makeActionCreator/index.ts");const n="HEADER__SUBSCRIPTIONS_PINNED",a="HEADER__SUBSCRIPTIONS_UNPINNED",c=Object(r.a)(n),i=Object(r.a)(a),o="EXPERIMENTS__SHUFFLE_CATEGORIES",d=(Object(r.a)(o),"HEADER__DROPDOWN_CLOSED"),u="HEADER__DROPDOWN_OPENED",l="HEADER__DROPDOWN_TOGGLED",b=Object(r.a)(d),p=Object(r.a)(u),O=Object(r.a)(l)},"./src/reddit/actions/hero.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/news.ts"),c=s("./src/reddit/actions/pages/news/utils.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/config.ts"),d=s("./src/lib/constants/index.ts"),u=s("./src/lib/makeApiRequest/index.ts"),l=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),b=s("./src/reddit/models/Toast/index.ts"),p=s("./src/reddit/selectors/listings.ts"),O=s("./src/reddit/selectors/news.ts");s.d(t,"b",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"a",function(){return j}),s.d(t,"d",function(){return h}),s.d(t,"e",function(){return S});const f="NEWS__NEWS_HERO_LOADED",m="NEWS__NEWS_HERO_PENDING",j="NEWS__NEWS_HERO_FAILED",g=Object(n.a)(m),y=Object(n.a)(f),_=Object(n.a)(j),E=(e,t,s,r=!0)=>async(n,a,b)=>{const f=a(),m=Object(p.d)(f,{listingKey:e}),j=f.listings.postOrder.ids[e],_=Object(p.c)(f,{listingKey:e});if(m||j&&!_)return;n(g({key:e}));const E=Object.assign({},Object(c.b)(t,s)),h=await((e,t)=>Object(u.c)(e,{endpoint:Object(l.a)(`${o.a.gatewayUrl}/desktopapi/v1/news_hero`),method:d.jb.GET,data:Object.assign({},t)}))(b.apiContext(),E),S=`error-${e}`;if(!h.ok)return T(e,n,f,h.error,S,t,s,r);var I=h.body;const v=I.posts,C=I.postIds,R=I.subreddits;n(y({availableTopics:Object(O.d)(f),key:e,meta:f.meta,postIds:C,posts:v,subreddits:R})),n(i.f(S))},h=(e,t,s,r=!0)=>async(n,a,c)=>{let i=n(E(e,t,s,r));return r||(i=i.catch(e=>Promise.resolve(e))),i},S=(e,t,s,r=!0)=>async(n,i,o)=>{await n(a.g(r));const d=i();var u=Object(c.c)(d,t,s);const l=u.topic,b=u.subtopic;return n(h(e,l,b,r))},T=(e,t,s,n,a,c,o,d)=>{t(_({error:n,key:e})),d&&t(i.e({id:a,kind:b.b.Error,text:Object(r.a)(s.user.language,"news.failedToLoadHero"),buttonText:Object(r.a)(s.user.language,"listings.toast.retryButton"),buttonAction:E(e,c,o)}))}},"./src/reddit/actions/imageUploads.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"e",function(){return l}),s.d(t,"b",function(){return b}),s.d(t,"a",function(){return p}),s.d(t,"k",function(){return O}),s.d(t,"j",function(){return f}),s.d(t,"l",function(){return m}),s.d(t,"i",function(){return j}),s.d(t,"h",function(){return g}),s.d(t,"g",function(){return y}),s.d(t,"f",function(){return E}),s.d(t,"m",function(){return h});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/raven/index.ts"),a=s("./src/lib/uploadToS3/index.ts"),c=s("./src/reddit/helpers/getGenericUploadError.ts"),i=s("./src/reddit/models/Image/index.tsx"),o=s("./src/reddit/selectors/imageUploads.ts");const d="IMAGE_UPLOADS__IMAGE_UPLOAD_PENDING",u="IMAGE_UPLOADS__IMAGE_UPLOAD_LOADED",l="IMAGE_UPLOADS__IMAGE_UPLOAD_SAVED",b="IMAGE_UPLOADS__IMAGE_UPLOAD_FAILED",p="IMAGE_UPLOADS__IMAGE_UPLOAD_CANCELED",O=Object(r.a)(d),f=Object(r.a)(u),m=Object(r.a)(l),j=Object(r.a)(b),g=Object(r.a)(p),y=async(e,t,s,r)=>{if(!t.ok)throw Object(i.j)(s,t.error);let n,c=t.body;"s3UploadLease"in c&&(c=c.s3UploadLease,n=t.body.websocketUrl);const o=await Object(a.a)(s.file,c);if(o.ok){if(!e.imageUploads[s.id])return void Object(i.d)(s);const t=decodeURIComponent(o.body.PostResponse.Location);return Object(i.m)(s,t,n,r)}throw Object(i.j)(s,o.error)};function _(e){return e.split("/").pop()}const E=(e,t)=>new Promise((s,r)=>{const a=Object(o.b)(e,t);if(!a.length)return s(null);const c=a[0].websocketUrl;if(!c)return r(new Error("ImageUploads: No websocket URL found"));const i={};for(let e=0;e<a.length;e++){const t=a[e],s=_(t.url);i[s]=t}const d=a.length,u=new WebSocket(c);u.onopen=(e=>{u.onerror=null,s({websocket:u,imagesByKey:i,imageCount:d})}),u.onerror=(e=>{u.close();const t=new Error("ImageUploads: Failed to connect to websocket");Object(n.b)(t),r()})}),h=e=>(t,s,{apiContext:r})=>new Promise((s,r)=>{const a=e.websocket;let o=e.imageCount,d=e.imagesByKey;function u(){for(const e in d){const s=d[e],r=Object(i.n)(s,s.url);t(m(r))}s(),a.close()}d=Object.assign({},d);let l=setTimeout(u,6e4);a.onmessage=(e=>{clearTimeout(l);const r=JSON.parse(e.data);if(r&&"success"===r.type){const e=r.payload.url,s=_(e),n=d[s];if(!n)return;o-=1,delete n[s];const a=Object(i.n)(n,e);t(m(a))}else{const e=_(r.payload.image_key),s=d[e];if(!s)return;o-=1,delete s[e];const n=Object(c.a)(r.payload.image_key),a=Object(i.j)(s,n);t(j(a))}o?l=setTimeout(u,6e4):(a.close(),s())}),a.onerror=(e=>{clearTimeout(l);const s=Object(c.a)("websocket");for(const r in d){const e=d[r],n=Object(i.j)(e,s);t(j(n))}a.close();const o=new Error("ImageUploads: WebSocket connection failed before all messages received");Object(n.b)(o),r()})})},"./src/reddit/actions/inContextModeration.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c}),s.d(t,"d",function(){return i});var r=s("./src/lib/makeActionCreator/index.ts");const n="INCONTEXT__BANNED",a="INCONTEXT__MUTED",c=Object(r.a)(n),i=Object(r.a)(a)},"./src/reddit/actions/jsApi.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});var r=s("./src/lib/makeActionCreator/index.ts");const n="JSAPI__CONSUMER_SUBSCRIBED",a=Object(r.a)(n)},"./src/reddit/actions/leaderboard/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"d",function(){return c});const r="LEADERBOARD__DATE_RANGE_CHANGED",n="LEADERBOARD__DATE_RANGE_FETCH_FAILURE",a="LEADERBOARD__DATE_RANGE_FETCH_PENDING",c="LEADERBOARD__DATE_RANGE_FETCH_SUCCESS"},"./src/reddit/actions/modMode.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return o}),s.d(t,"b",function(){return u});var r=s("./node_modules/js-cookie/src/js.cookie.js"),n=s.n(r),a=s("./src/config.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/reddit/constants/cookie.ts");const o="MOD_MODE_TOGGLED",d=Object(c.a)(o),u=e=>async(t,s,{apiContext:r})=>{let c;if(void 0!==e)c=e;else{c="false"===n.a.get(i.c)}n.a.set(i.c,c,{domain:a.a.cookieDomain});(document.cookie.match(/mod_mode_enabled=/g)||[]).length>1&&n.a.set(i.c,"",{expires:0,path:"/"});t(d({enabled:c}))}},"./src/reddit/actions/modQueue/constants.ts":function(e,t,s){"use strict";s.d(t,"m",function(){return r}),s.d(t,"l",function(){return n}),s.d(t,"k",function(){return a}),s.d(t,"j",function(){return c}),s.d(t,"i",function(){return i}),s.d(t,"h",function(){return o}),s.d(t,"q",function(){return d}),s.d(t,"p",function(){return u}),s.d(t,"o",function(){return l}),s.d(t,"t",function(){return b}),s.d(t,"s",function(){return p}),s.d(t,"r",function(){return O}),s.d(t,"z",function(){return f}),s.d(t,"y",function(){return m}),s.d(t,"x",function(){return j}),s.d(t,"e",function(){return g}),s.d(t,"d",function(){return y}),s.d(t,"c",function(){return _}),s.d(t,"w",function(){return E}),s.d(t,"v",function(){return h}),s.d(t,"u",function(){return S}),s.d(t,"n",function(){return T}),s.d(t,"b",function(){return I}),s.d(t,"a",function(){return v}),s.d(t,"f",function(){return C}),s.d(t,"g",function(){return R});const r="MODQUEUE_PENDING",n="MODQUEUE_LOADED",a="MODQUEUE_FAILED",c="EDITED_PENDING",i="EDITED_LOADED",o="EDITED_FAILED",d="REPORTS_PENDING",u="REPORTS_LOADED",l="REPORTS_FAILED",b="SPAM_PENDING",p="SPAM_LOADED",O="SPAM_FAILED",f="UNMODERATED_PENDING",m="UNMODERATED_LOADED",j="UNMODERATED_FAILED",g="BULKACTION_PENDING",y="BULKACTION_LOADED",_="BULKACTION_FAILED",E="UNDOACTION_PENDING",h="UNDOACTION_LOADED",S="UNDOACTION_FAILED",T="MORE_MODERATED_SUBREDDITS_LOADED",I="ALL_MODERATED_COMMUNITIES_LOADED",v="ADD_SELECTED_ITEMS",C="BULK_SELECT_ITEMS",R="BULK_UNSELECT_ITEMS"},"./src/reddit/actions/modal.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return u}),s.d(t,"i",function(){return l}),s.d(t,"b",function(){return b}),s.d(t,"f",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"g",function(){return m}),s.d(t,"h",function(){return j}),s.d(t,"k",function(){return g}),s.d(t,"j",function(){return y}),s.d(t,"e",function(){return _}),s.d(t,"a",function(){return E}),s.d(t,"l",function(){return h});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/media.ts"),a=s("./src/reddit/constants/modals.ts"),c=s("./src/reddit/endpoints/user/index.ts"),i=s("./src/reddit/helpers/localStorage/index.ts"),o=s("./src/reddit/selectors/activeModalId.ts"),d=s("./src/reddit/selectors/user.ts");const u="MODAL_TOGGLED",l=Object(r.a)(u),b="CLOSE_ALL_MODALS",p=Object(r.a)(b),O="REDESIGN_MODAL_CLOSED",f=Object(r.a)(O),m=e=>async(t,s,r)=>{Object(o.b)(e)(s())&&t(l(e))},j=e=>async(t,s,r)=>{Object(o.b)(e)(s())||t(l(e))},g=()=>async(e,t,s)=>{Object(i.F)(a.a.REDESIGN_MODAL,!0),Object(d.F)(t())&&Object(c.d)(s.apiContext())},y=()=>async(e,t,s)=>{g()(e,t,s),n.c(!0)(e,t,s),e(f())},_="SET_ACCOUNT_MANAGER_MODAL_DATA";var E;!function(e){e.Explore="explore",e.HeaderLogin="header_login",e.HeaderSignup="header_signup",e.Hide="hide",e.PromoBanner="promo",e.Reply="reply",e.Report="report",e.Save="save",e.Subscribe="subscribe",e.Vote="vote"}(E||(E={}));const h=Object(r.a)(_)},"./src/reddit/actions/moderatingSubreddits.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return o}),s.d(t,"c",function(){return b}),s.d(t,"b",function(){return p});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/profile/index.ts"),a=s("./src/reddit/endpoints/moderator/moderatingSubreddits.ts"),c=s("./src/reddit/models/User/index.ts"),i=s("./src/reddit/selectors/user.ts");const o="MOD_PERMS__REQUEST_LOADED",d=Object(r.a)("MOD_PERMS__REQUEST_PENDING"),u=Object(r.a)(o),l=Object(r.a)("MOD_PERMS__REQUEST_FAILED"),b=()=>async(e,t,{apiContext:s})=>{const r=t();if(!r.user.account)return;if(r.isModeratorWithPostPerms)return;e(d());const n=await Object(a.a)(s());n.ok?e(u(n.body)):e(l(n.error))},p=()=>async(e,t)=>{const s=Object(i.j)(t());if(s){const t=Object(c.f)(s);await e(Object(n.b)(t))}}},"./src/reddit/actions/moderationLog/constants.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return r}),s.d(t,"a",function(){return n});const r="SUBREDDIT__MODERATION_LOG_LOADED",n="SUBREDDIT__ALL_MODERATORS_LOADED"},"./src/reddit/actions/monthsToMinutes.ts":function(e,t,s){"use strict";s.d(t,"k",function(){return p}),s.d(t,"c",function(){return O}),s.d(t,"r",function(){return f}),s.d(t,"i",function(){return m}),s.d(t,"g",function(){return g}),s.d(t,"t",function(){return y}),s.d(t,"f",function(){return _}),s.d(t,"s",function(){return E}),s.d(t,"h",function(){return h}),s.d(t,"q",function(){return T}),s.d(t,"w",function(){return I}),s.d(t,"d",function(){return v}),s.d(t,"o",function(){return C}),s.d(t,"l",function(){return R}),s.d(t,"m",function(){return A}),s.d(t,"x",function(){return D}),s.d(t,"y",function(){return P}),s.d(t,"v",function(){return w}),s.d(t,"e",function(){return N}),s.d(t,"p",function(){return k}),s.d(t,"b",function(){return L}),s.d(t,"n",function(){return U}),s.d(t,"j",function(){return M}),s.d(t,"u",function(){return G}),s.d(t,"a",function(){return F});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/reddit/constants/localStorage.ts"),c=s("./src/reddit/helpers/localStorage/index.ts"),i=s("./src/reddit/helpers/monthsToMinutes/index.ts"),o=s("./src/reddit/models/MonthsToMinutes/index.ts"),d=s("./src/reddit/selectors/monthsToMinutes.ts"),u=s("./src/reddit/selectors/posts.ts"),l=s("./src/reddit/selectors/runTimeEnvVars.ts"),b=s("./src/reddit/selectors/subscriptions.ts");const p="M2M_SUBSCRIPTIONS_NAMES_LOADED",O=(Object(r.a)(p),"M2M_APPLY_LOGGED_OUT_VOTE"),f=Object(r.a)(O),m="M2M_LOADED_FROM_LOCAL_STORAGE",j=Object(r.a)(m),g="M2M_EXPAND_ACCOUNT_COMPLETENESS",y=Object(r.a)(g),_="M2M_COLLAPSE_ACCOUNT_COMPLETENESS",E=Object(r.a)(_),h="M2M_INIT_FROM_EMPTY_LOCAL_STORAGE",S=Object(r.a)(h),T=()=>async(e,t,{apiContext:s})=>{try{const t=Object(c.h)(a.l);t&&t.loggedOutV3&&e(j(t.loggedOutV3))}catch(r){e(S())}Object(d.e)(t())&&setTimeout(()=>e(B()),o.a)},I=()=>async(e,t,{apiContext:s})=>{const r=t();Object(i.b)(r)},v="M2M_CLOSE_ACCOUNT_COMPLETENESS",C=Object(r.a)(v),R="M2M_TOOLTIP_ACTIVATED",A="M2M_TOOLTIP_CLOSED",D=Object(r.a)(R),P=Object(r.a)(A),x=(e,t)=>{const s=Object(l.a)(e);return!t.time||s-t.time>n.y},w=(e,t,s)=>async(r,n,{apiContext:a})=>{const c=n();if(!Object(d.u)(c))return;const i=c.user.loggedOutData.tooltips,l=Date.now();Object(b.a)(c)||i[o.j.SubscribeFeed].time||i[o.j.SubscribeFeed].postId||!(t>4)||Object(u.v)(c,e)||s?!Object(d.H)(c)&&!i[o.j.Vote].time&&!i[o.j.Vote].postId&&e!==i[o.j.SubscribeFeed].postId&&t>9?r(D({postId:e,time:l,tooltipType:o.j.Vote})):!Object(b.a)(c)&&x(c,i[o.j.SubscribeFeed])&&!i[o.j.SubscribeReminder].postId&&t>4&&!Object(u.v)(c,e)&&!s?r(D({postId:e,time:l,tooltipType:o.j.SubscribeReminder})):!Object(d.H)(c)&&x(c,i[o.j.Vote])&&!i[o.j.VoteReminder].postId&&t>9&&r(D({postId:e,time:l,tooltipType:o.j.VoteReminder})):r(D({postId:e,time:l,tooltipType:o.j.SubscribeFeed}))},N="M2M_CLOSE_WELCOME_MODAL",k=Object(r.a)(N),L="M2M_ACCOUNT_COMPLETENESS_SELECT_TAB",U=Object(r.a)(L),M="MILESTONE_ACTION_STALED",G=Object(r.a)(M),F="M2M_ACCOUNT_COMPLETENESS_AWAKE",B=Object(r.a)(F)},"./src/reddit/actions/monthsToMinutes/accountCompleteness.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});var r=s("./src/lib/makeActionCreator/index.ts");const n="M2M_SET_STEP",a=Object(r.a)(n)},"./src/reddit/actions/monthsToMinutes/homeFeed.ts":function(e,t,s){"use strict";var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/discoveryUnit.ts"),c=s("./src/reddit/endpoints/category/subreddits.ts"),i=s("./src/lib/constants/index.ts"),o=s("./src/lib/makeApiRequest/index.ts"),d=s("./src/lib/omitHeaders/index.ts"),u=s("./src/reddit/constants/headers.ts"),l=s("./src/reddit/helpers/monthsToMinutes/index.ts"),b=s("./src/reddit/models/MonthsToMinutes/index.ts"),p=s("./src/reddit/selectors/monthsToMinutes.ts"),O=s("./src/reddit/selectors/subreddit.ts");s.d(t,"c",function(){return f}),s.d(t,"g",function(){return m}),s.d(t,"d",function(){return j}),s.d(t,"h",function(){return g}),s.d(t,"b",function(){return y}),s.d(t,"f",function(){return E}),s.d(t,"e",function(){return h}),s.d(t,"a",function(){return S}),s.d(t,"i",function(){return I});const f="M2M_SUBREDDIT_VIEWED",m=Object(n.a)(f),j="M2M_SUBREDDIT_VOTED",g=Object(n.a)(j),y="M2M_SIMILAR_SUBREDDITS_LOADED",_=Object(n.a)(y),E=()=>async(e,t,{apiContext:s})=>{const r=t();if(!Object(p.q)(r))return;if(Object(p.f)(r)!==b.b.Initial)return;let n=Object(p.D)(r);if(n.length<b.e){const t=n.map(e=>Object(O.z)(r,e)).filter(Boolean),a=b.e-t.length,l=await((e,t)=>Object(o.c)(Object(d.a)(e,[u.a]),{data:{sr_fullnames:t.subredditIds.join(","),limit:t.count,variant:t.variant},endpoint:`${e.apiUrl}/api/similar_subreddits.json`,method:i.jb.GET}))(s(),{subredditIds:t,count:a});if(l.ok){const t=Object(c.b)(l.body);n=[...n,...t.subredditNames],e(_(t))}}},h=()=>async(e,t,{apiContext:s})=>{const r=t();if(Object(p.p)(r))return;const n=Object(p.x)(r);if(0===n.length)return;const c=n.filter(Boolean).join("+");await e(Object(a.j)(c))},S="M2M_SET_HOME_FEED",T=Object(n.a)(S),I=()=>async(e,t,{apiContext:s})=>{if(!Object(p.p)(t())){const s=Object(p.x)(t());e(T(s)),Object(l.b)(t())}e(Object(r.b)("/"))}},"./src/reddit/actions/multireddit.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/lib/makeListingKey/index.ts"),o=s("./src/reddit/constants/parameters.ts"),d=s("./src/reddit/constants/postLayout.ts"),u=s("./src/reddit/contexts/PageLayer/index.tsx"),l=s("./src/lib/makeApiRequest/index.ts"),b=s("./src/lib/omitHeaders/index.ts"),p=s("./src/reddit/constants/headers.ts"),O=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),f=s("./src/reddit/endpoints/page/myMultiredditFeed.ts"),m=s("./src/reddit/helpers/filterListingResponse/index.ts"),j=s("./src/reddit/helpers/r2/normalizeSubredditFromR2/index.ts"),g=s("./src/reddit/selectors/multireddit.ts");s.d(t,"c",function(){return y}),s.d(t,"b",function(){return _}),s.d(t,"a",function(){return E}),s.d(t,"f",function(){return I}),s.d(t,"d",function(){return v}),s.d(t,"e",function(){return C}),s.d(t,"g",function(){return A});const y="MULTIREDDIT__MORE_POSTS_PENDING",_="MULTIREDDIT__MORE_POSTS_LOADED",E="MULTIREDDIT__MORE_POSTS_FAILED",h=Object(c.a)(y),S=Object(c.a)(_),T=Object(c.a)(E),I=e=>async(t,s,{apiContext:r})=>{var c=e.sort;const l=void 0===c?a.X.HOT:c,b=e.multiredditName,p=s(),O=p.platform.currentPage,j=O?O.queryParams:{},y=Object(g.b)(p,{multiredditName:b}),_=Object(i.a)(y.url,l,j),E=p.listings.postOrder.loadMore[_];if(!E)return;const I=p.listings.postOrder.api.pending[_],v=p.listings.postOrder.fetchedTokens,C=v[_]&&v[_][E.token]||!1;if(I||C)return;t(h({key:_,fetchedToken:E.token}));const R=await Object(f.a)(r(),b,Object.assign({after:E.token,dist:E.dist,layout:d.d[Object(u.O)(p,{})],sort:l},n()(j,o.j))),A=Object.assign({},R.body,Object(m.a)(p,_,R.body));R.ok?t(S(Object.assign({fetchedToken:E.token,key:_,meta:p.meta},A))):t(T(Object.assign({error:R.error,fetchedToken:E.token,key:_},A)))},v="MULTIREDDIT__MY_MULTIREDDITS_PENDING",C="MULTIREDDIT__MY_MULTIREDDITS_RECEIVED",R=(Object(c.a)(v),Object(c.a)(C)),A=()=>async(e,t,{apiContext:s})=>{const r=t();if(!r.user.account)return;if(Object(g.e)(r)||Object(g.f)(r))return;const n=await(e=>Object(l.c)(Object(b.a)(e,[p.a]),{endpoint:Object(O.a)(`${e.apiUrl}/api/multi/mine.json`),data:{expand_srs:1},method:a.jb.GET}))(s());if(n.ok){const t=r.user.account.id,s=n.body.reduce((e,{data:t})=>t.subreddits.reduce((e,{data:t})=>{const s=Object(j.a)(t);return e[s.id]=s,e},e),{}),a=[],c=n.body.reduce((e,{data:t})=>{const s=(e=>{let t=e.over_18||!1;if(!t)for(const r of e.subreddits)if(r.data.over_18){t=!0;break}let s=e.quarantine||!1;if(!s)for(const r of e.subreddits){const e=(r.data.audience_target||"").split(",");if(r.data.quarantine||e.indexOf("unsafe")>-1){s=!0;break}}return{created:e.created_utc,description:e.description_html,displayText:e.display_name,isNSFW:t,isQuarantined:s,name:e.name,subredditIds:e.subreddits.map(e=>e.data.name),url:e.path,visibility:e.visibility}})(t),r=s.url.toLowerCase();return a.push(r),e[r]=s,e},{});e(R({subreddits:s,multireddits:c,multiredditsByUser:{[t]:a}}))}}},"./src/reddit/actions/news.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./node_modules/react-router-redux/es/index.js"),c=s("./src/reddit/actions/pages/news/index.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/config.ts"),d=s("./src/lib/constants/index.ts"),u=s("./src/lib/makeApiRequest/index.ts"),l=s("./src/reddit/models/News/index.ts"),b=s("./src/reddit/models/Toast/index.ts"),p=s("./src/reddit/routes/news/util.ts"),O=s("./src/reddit/selectors/news.ts"),f=s("./src/reddit/selectors/user.ts");s.d(t,"d",function(){return m}),s.d(t,"b",function(){return j}),s.d(t,"c",function(){return g}),s.d(t,"a",function(){return y}),s.d(t,"f",function(){return _}),s.d(t,"e",function(){return T}),s.d(t,"g",function(){return I});const m="NEWS__NEWS_TOPIC_SELECTED",j="NEWS__NEWS_TOPICS_LOADED",g="NEWS__NEWS_TOPICS_PENDING",y="NEWS__NEWS_TOPICS_FAILED",_=Object(n.a)(m),E=Object(n.a)(j),h=Object(n.a)(g),S=Object(n.a)(y),T=(e,t)=>async(s,r)=>{const n=Object(p.b)(e,t),i=r().platform.currentPage.routeMatch.match;i&&i.url===n?s(Object(c.d)(i,!0)):s(Object(a.b)(n))},I=(e=!0)=>async(t,s,{apiContext:n})=>{const a=s(),c=Object(O.r)(a),p=Object(O.d)(a).length>0;if(c||p)return;t(h);const m=await(e=>Object(u.c)(e,{endpoint:`${o.a.gatewayUrl}/news/topics`,method:d.jb.GET}))(n());if(m.ok){const e=Object(l.d)(m.body.data||[]);t(E(e))}else t(S(m.error)),e&&t(function(e){const t=Object(f.M)(e);return Object(i.e)(Object(i.d)(Object(r.a)(t,"news.failedToLoadTopic"),b.b.Error,Object(r.a)(t,"error.clickHere"),I()))}(s()))}},"./src/reddit/actions/notifications/constants.ts":function(e,t,s){"use strict";s.d(t,"n",function(){return n}),s.d(t,"e",function(){return a}),s.d(t,"s",function(){return c}),s.d(t,"o",function(){return i}),s.d(t,"h",function(){return o}),s.d(t,"g",function(){return d}),s.d(t,"r",function(){return u}),s.d(t,"q",function(){return l}),s.d(t,"p",function(){return b}),s.d(t,"i",function(){return p}),s.d(t,"j",function(){return O}),s.d(t,"f",function(){return f}),s.d(t,"a",function(){return m}),s.d(t,"d",function(){return j}),s.d(t,"c",function(){return g}),s.d(t,"b",function(){return y}),s.d(t,"m",function(){return _}),s.d(t,"l",function(){return E}),s.d(t,"k",function(){return h});var r=s("./src/lib/makeActionCreator/index.ts");const n="NOTIFICATIONS__SHOW_PRE_PROMPT",a="NOTIFICATIONS__HIDE_PRE_PROMPT",c=Object(r.a)(n),i=Object(r.a)(a),o="NOTIFICATIONS__PERMISSION_GRANTED",d="NOTIFICATIONS__PERMISSION_DENIED",u=Object(r.a)("NOTIFICATIONS__PERMISSION_PENDING"),l=Object(r.a)(o),b=Object(r.a)(d),p="notification-preprompt-closed",O="1";var f,m;!function(e){e[e.NotificationsSupported=0]="NotificationsSupported",e[e.BrowserUnsupported=1]="BrowserUnsupported",e[e.LocalStorageUnavailable=2]="LocalStorageUnavailable",e[e.NotAllRequiredAPIsSupported=3]="NotAllRequiredAPIsSupported"}(f||(f={})),function(e){e.Granted="granted",e.Denied="denied",e.Closed="closed",e.Default="default"}(m||(m={}));const j="PUSH__GET_PREFERENCES_PENDING",g="PUSH__GET_PREFERENCES_LOADED",y="PUSH__GET_PREFERENCES_FAILED",_="PUSH__SET_PREFERENCES_PENDING",E="PUSH__SET_PREFERENCES_LOADED",h="PUSH__SET_PREFERENCES_FAILED"},"./src/reddit/actions/nps.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/config.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts");var d=s("./node_modules/@r/frames/compiled.js"),u=s("./node_modules/lodash/debounce.js"),l=s.n(u),b=function(e){document.body.appendChild(function(e){let t;function s(){d.listen("embedjail"),d.receiveMessage(t.contentWindow,"open.embedjail",function(e){var s;s=e.detail,t.style.width=s.dimensions.width,t.style.height=s.dimensions.height,t.style.display="block",t.style.position="fixed",t.style.bottom=0,t.style.zIndex=2147483647,window.addEventListener("resize",r)}),d.receiveMessage(t.contentWindow,"close.embedjail",function(e){t.parentElement.removeChild(t),d.stopListening("asknicely"),window.removeEventListener("resize",r),t=void 0}),window.addEventListener("message",function(e){"https://live.asknice.ly"!==e.origin&&"https://reddit.asknice.ly"!==e.origin||e.data&&t&&t.contentWindow&&d.postMessage(t.contentWindow,e.data+".asknicely")})}const r=l()(function(){t&&t.contentWindow&&d.postMessage(t.contentWindow,"resize.asknicely")},500);return function(){return t=function(){const t=document.createElement("iframe");return t.src=e,t.setAttribute("allowTransparency","true"),t.style.display="block",t.style.width="100%",t.style.height="1px",t.style.background="transparent",t.style.border="none",t}(),s(),t}}(e)())};s.d(t,"c",function(){return p}),s.d(t,"b",function(){return O}),s.d(t,"a",function(){return f}),s.d(t,"d",function(){return _});const p="NPS__URL_PENDING",O="NPS__URL_LOADED",f="NPS__URL_FAILED",m=Object(r.a)(p),j=Object(r.a)(O),g=Object(r.a)(f);let y=!1;const _=()=>async(e,t,s)=>{const r=t();if(r.nps.pending)return;if(y)return;e(m());const d=r.platform.currentPage&&r.platform.currentPage.queryParams.feature||"",u=!!r.user.account,l=await((e,t,s)=>Object(c.c)(Object(i.a)(e,[o.a]),{data:{feature:t,app_name:"web2x"},endpoint:`${s?n.a.oauthUrl:n.a.apiUrl}/api/jail/asknicely${s?"":".json"}`,method:a.jb.GET}))(s.apiContext(),d,u);if(l.ok){const t=l.body;e(j(t)),t.dest&&(b(t.dest),y=!0)}else e(g())}},"./src/reddit/actions/oldSiteRules.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts");s.d(t,"a",function(){return o}),s.d(t,"b",function(){return u});const o="OLD_SITE_RULES_LOADED",d=Object(r.a)(o),u=()=>async(e,t,{apiContext:s})=>{const r=await(e=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/site_rules.json`,method:n.jb.GET}))(s());if(r.ok){const t=r.body.site_rules;e(d({oldSiteRules:t}))}}},"./src/reddit/actions/originalContent.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/lib/makeListingKey/index.ts"),o=s("./src/reddit/constants/originalContent.ts"),d=s("./src/reddit/constants/page.ts"),u=s("./src/reddit/constants/parameters.ts"),l=s("./src/lib/makeApiRequest/index.ts"),b=s("./src/lib/omitHeaders/index.ts"),p=s("./src/reddit/constants/headers.ts"),O=s("./src/reddit/helpers/r2/normalizeActionableUserFromR2/index.ts"),f=s("./src/reddit/helpers/r2/normalizeProfileAboutInfoFromR2/index.ts"),m=s("./src/reddit/helpers/r2/normalizeProfileSubredditFromR2/index.ts");var j=s("./src/reddit/helpers/r2/normalizePostFromR2/index.ts");var g=s("./src/reddit/endpoints/page/originalContentPage.ts"),y=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),_=s("./src/reddit/models/OcSubreddits/index.ts");function E(e){return{discoverable:e.discoverable,name:e.name,displayText:e.display_text,submittable:e.submittable}}var h=s("./src/reddit/selectors/originalContent.ts");s.d(t,"f",function(){return S}),s.d(t,"e",function(){return T}),s.d(t,"d",function(){return I}),s.d(t,"q",function(){return A}),s.d(t,"c",function(){return D}),s.d(t,"b",function(){return P}),s.d(t,"a",function(){return x}),s.d(t,"p",function(){return L}),s.d(t,"l",function(){return U}),s.d(t,"k",function(){return M}),s.d(t,"j",function(){return G}),s.d(t,"s",function(){return q}),s.d(t,"o",function(){return V}),s.d(t,"n",function(){return H}),s.d(t,"m",function(){return K}),s.d(t,"t",function(){return Q}),s.d(t,"i",function(){return X}),s.d(t,"h",function(){return J}),s.d(t,"g",function(){return Z}),s.d(t,"r",function(){return re});const S="OC_MORE_POSTS_PENDING",T="OC_MORE_POSTS_LOADED",I="OC_MORE_POSTS_FAILED",v=Object(c.a)(S),C=Object(c.a)(T),R=Object(c.a)(I),A=e=>async(t,s,{apiContext:r})=>{const c=s(),l=c.platform.currentPage;var b=e.sort;const p=void 0===b?a.Y:b;var O=e.category;const f=void 0===O?o.b:O,m=l?l.queryParams:{},j=Object.assign({},m,{category:f}),_=Object(i.a)(d.j,p,j),E=c.listings.postOrder.loadMore[_],h=m[u.s]?m[u.s].toUpperCase():"",S=h in a.rc&&a.rc[h];if(!E)return;const T=c.listings.postOrder.api.pending[_],I=c.listings.postOrder.fetchedTokens,A=I[_]&&I[_][E.token]||!1;if(T||A)return;t(v({key:_,fetchedToken:E.token}));const D=await Object(g.a)(r(),Object.assign({after:E.token,category:f,dist:E.dist,sort:p,t:Object(y.a)(p,S)},n()(m,u.j))),P=c.listings.postOrder.ids[_],x=Object.assign({},D.body,{postIds:(D.body.postIds||[]).filter(e=>!P||!P.includes(e))});D.ok?t(C(Object.assign({key:_,fetchedToken:E.token,meta:c.meta},x))):t(R(Object.assign({key:_,error:D.error,fetchedToken:E.token},x)))},D="OC_CATEGORIES_PENDING",P="OC_CATEGORIES_LOADED",x="OC_CATEGORIES_FAILED",w=Object(c.a)(D),N=Object(c.a)(P),k=Object(c.a)(x),L=()=>async(e,t,{apiContext:s})=>{const r=t();if(Object(h.d)(r))return;if(Object(h.c)(r).length>0)return;e(w());const n=await(e=>Object(l.c)(Object(b.a)(e,[p.a]),{endpoint:`${e.apiUrl}/api/oc_categories.json`,method:a.jb.GET}))(s());if(n.ok){const t=n.body.map(E);e(N(t))}else e(k(n.error))},U="PAGE__ORIGINAL_CONTENT_TOP_COMMUNITIES_PENDING",M="PAGE__ORIGINAL_CONTENT_TOP_COMMUNITIES_LOADED",G="PAGE__ORIGINAL_CONTENT_TOP_COMMUNITIES_FAILED",F=Object(c.a)(U),B=Object(c.a)(M),$=Object(c.a)(G),q=(e=o.b)=>async(t,s,{apiContext:r})=>{t(F({category:e}));const n=await((e,t)=>Object(l.c)(Object(b.a)(e,[p.a]),{data:t,endpoint:`${e.apiUrl}/api/oc_top_subreddits.json`,method:a.jb.GET}))(r(),{category:e,count:o.e});if(n.ok){var c=Object(_.c)(n.body.data.children.map(({data:e})=>e));const s=c.subreddits,r=c.subredditsAboutInfo;t(B({category:e,subreddits:s,subredditsAboutInfo:r}))}else t($({category:e,error:n.error}))},V="PAGE__ORIGINAL_CONTENT_TOP_CREATORS_PENDING",H="PAGE__ORIGINAL_CONTENT_TOP_CREATORS_LOADED",K="PAGE__ORIGINAL_CONTENT_TOP_CREATORS_FAILED",W=Object(c.a)(V),Y=Object(c.a)(H),z=Object(c.a)(K),Q=(e=o.b)=>async(t,s,{apiContext:r})=>{t(W({category:e}));const n=await((e,t)=>Object(l.c)(Object(b.a)(e,[p.a]),{data:t,endpoint:`${e.apiUrl}/api/oc_top_creators.json`,method:a.jb.GET}))(r(),{category:e});if(n.ok){var c=function(e){return e.data.children.reduce((e,{data:t})=>{if(e.users[t.name.toLowerCase()]=Object(O.a)(t),t.subreddit){const s=Object(m.a)(t.subreddit,t.name);s&&(e.profiles[s.id]=s,e.profilesAboutInfo[s.id]=Object(f.a)(t))}return e},{profiles:{},profilesAboutInfo:{},users:{}})}(n.body);const s=c.profiles,r=c.profilesAboutInfo,a=c.users;t(Y({category:e,profiles:s,profilesAboutInfo:r,users:a}))}else t(z({category:e,error:n.error}))},X="PAGE__ORIGINAL_CONTENT_BEST_POSTS_PENDING",J="PAGE__ORIGINAL_CONTENT_BEST_POSTS_LOADED",Z="PAGE__ORIGINAL_CONTENT_BEST_POSTS_FAILED",ee=Object(c.a)(X),te=Object(c.a)(J),se=Object(c.a)(Z),re=(e=o.b)=>async(t,s,{apiContext:r})=>{const n=s(),c=n.meta,i=Object(h.a)(n,{categoryName:e});if(Object(h.b)(n,{categoryName:e})||i.length)return;t(ee({category:e}));const d=await((e,t)=>Object(l.c)(Object(b.a)(e,[p.a]),{data:t,endpoint:`${e.apiUrl}/original/${t.category}/top.json`,method:a.jb.GET}))(r(),{category:e,limit:o.a,sort:a.X.TOP,t:a.rc.WEEK});if(d.ok){const s=function(e){return e.data.children.reduce((e,{data:t})=>{const s=Object(j.a)(t);return e.posts[s.id]=s,e},{posts:{}})}(d.body).posts;t(te({category:e,meta:c,posts:s}))}else t(se({category:e,error:d.error}))}},"./src/reddit/actions/page.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./node_modules/react-router-redux/es/index.js"),c=s("./src/app/strings/index.ts"),i=s("./src/lib/addQueryParams/index.ts"),o=s("./src/lib/getParsedUserAgent/index.ts"),d=s("./src/reddit/actions/category.ts"),u=s("./src/reddit/actions/discoveryUnit.ts"),l=s("./src/reddit/actions/monthsToMinutes/homeFeed.ts"),b=s("./src/reddit/actions/pages/subreddit.ts"),p=s("./src/reddit/actions/shortcuts.ts"),O=s("./src/reddit/constants/parameters.ts"),f=s("./src/reddit/endpoints/governance/posts.ts"),m=s("./src/reddit/endpoints/page/commentsPage.ts"),j=s("./src/reddit/endpoints/page/frontpage.ts"),g=s("./src/reddit/endpoints/page/myMultiredditFeed.ts"),y=s("./src/reddit/endpoints/page/search.ts"),_=s("./src/reddit/endpoints/page/subredditPage.ts"),E=s("./src/reddit/selectors/experiments/railsSearchResults.ts"),h=s("./src/lib/constants/index.ts"),S=s("./src/app/models/Draft.ts"),T=s("./src/lib/makeDraftKey/index.ts"),I=s("./src/reddit/models/Gold/Coins/index.ts"),v=s("./src/reddit/actions/appeal.ts"),C=s("./src/reddit/actions/badge.ts"),R=s("./src/reddit/actions/dashboard.ts"),A=s("./src/reddit/actions/externalAccount.ts"),D=s("./src/reddit/actions/gold/modals.ts"),P=s("./src/reddit/actions/goldPurchaseModals/coinPurchaseModal.ts"),x=s("./src/reddit/actions/goldPurchaseModals/premiumPurchaseModal.ts"),w=s("./src/reddit/actions/governance/releaseNotes.ts"),N=s("./src/reddit/actions/moderatingSubreddits.ts"),k=s("./src/reddit/actions/platform.ts"),L=s("./src/reddit/actions/post.ts"),U=s("./src/reddit/actions/profile/index.ts"),M=s("./src/reddit/actions/redditEmbed.ts"),G=s("./src/reddit/actions/subreddit.ts"),F=s("./src/reddit/actions/toaster.ts"),B=s("./src/reddit/actions/users.ts"),$=s("./src/reddit/constants/adEvents.ts"),q=s("./src/reddit/constants/listings.ts"),V=s("./src/reddit/constants/page.ts"),H=s("./src/reddit/constants/postLayout.ts"),K=s("./src/reddit/constants/posts.ts"),W=s("./src/reddit/contexts/PageLayer/index.tsx"),Y=s("./src/reddit/helpers/commentList/index.ts"),z=s("./src/reddit/helpers/getCommentsPageSort/index.ts"),Q=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),X=s("./src/reddit/helpers/graphql/normalizeFrontpageFromGql/index.ts"),J=s("./src/reddit/helpers/pixels.ts"),Z=s("./src/reddit/models/Comment/index.ts"),ee=s("./src/reddit/models/DiscoveryUnit/index.ts"),te=s("./src/reddit/models/Multireddit/index.ts"),se=s("./src/reddit/models/Post/index.ts"),re=s("./src/reddit/models/Toast/index.ts"),ne=s("./src/reddit/models/User/index.ts"),ae=s("./src/reddit/selectors/experiments/exploreV2.ts"),ce=s("./src/reddit/selectors/experiments/m2mV1-5.ts"),ie=s("./src/reddit/selectors/experiments/postSeo.ts"),oe=s("./src/reddit/selectors/frontpage.ts"),de=s("./src/reddit/selectors/goldPurchaseModals.ts"),ue=s("./src/reddit/selectors/monthsToMinutes.ts"),le=s("./src/reddit/selectors/multireddit.ts"),be=s("./src/reddit/selectors/platform.ts"),pe=s("./src/reddit/selectors/posts.ts"),Oe=s("./src/reddit/selectors/runTimeEnvVars.ts"),fe=s("./src/reddit/selectors/subreddit.ts"),me=s("./src/reddit/selectors/user.ts"),je=s("./src/lib/makeActionCreator/index.ts"),ge=s("./src/lib/makeCommentsPageKey/index.ts"),ye=s("./src/lib/makeListingKey/index.ts"),_e=s("./src/lib/makeSearchKey/index.ts"),Ee=s("./src/lib/matchRoute/index.ts"),he=s("./src/reddit/actions/ad.ts"),Se=s("./src/reddit/actions/economics/tips/async.ts"),Te=s("./src/reddit/actions/governance/async.ts"),Ie=s("./src/reddit/actions/governance/communityDetails.ts"),ve=s("./src/reddit/featureFlags/index.ts"),Ce=s("./src/reddit/helpers/canonicalUrls.ts"),Re=s("./src/reddit/helpers/chooseVariant/index.ts"),Ae=s("./src/lib/raven/index.ts"),De=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Pe=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const xe={path:"",extraKeys:["id"],disableExtra:!1,replaceMissedObject:!1};var we;!function(e){e.NotEqual="ne",e.Missed="m",e.Length="l"}(we||(we={}));const Ne=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ke=(e,t,s)=>s?`${e}[${t}]`:`${(e&&`${e}.`)+t}`,Le=e=>Ne(e)?"[Object]":e,Ue=e=>{const t=e.o1,s=e.o2,r=e.path;var n=e.diffs;const a=void 0===n?[]:n,c=e.replaceMissedObject,i=Pe(e,["o1","o2","path","diffs","replaceMissedObject"]);if(Array.isArray(t)&&Array.isArray(s))return t.length!==s.length?[...a,{k:we.Length,p:r,o1:t,o2:s}]:t.reduce((n,a,c)=>[...n,...Ue(Object.assign({},e,{o1:t[c],o2:s[c],path:ke(r,((e,t,{disableExtra:s,extraKeys:r})=>s||!Ne(t)?e:r.reduce((e,s)=>`${e}${t[s]?`,${s}=${t[s]}`:""}`,e))(c,t[c]||s[c],i),!0)}))],a);if(Ne(t)&&Ne(s)){let n=a;const i=[];for(const a in t)i.push(a),n=n.concat(s.hasOwnProperty(a)?Ue(Object.assign({},e,{o1:t[a],o2:s[a],path:ke(r,a)})):{k:we.Missed,p:ke(r,a),o1:c?Le(t[a]):t[a]});for(const e in s)i.includes(e)||n.push({k:we.Missed,p:ke(r,e),o2:c?Le(s[e]):s[e]});return n}return t!==s?[...a,{k:we.NotEqual,p:r,o1:t,o2:s}]:a},Me=e=>{if(Array.isArray(e))return e.reduce((e,t)=>e+Me(t),e.length);if(!Ne(e))return 0;const t=Object.keys(e);return t.reduce((t,s)=>t+Me(e[s]),t.length)},Ge=/^(account|posts|preferences|profiles|subreddits)\.(?:(t\d{1}_[a-zA-Z0-9]+)\.)?.*$/;var Fe=(e,t)=>Ue(Object.assign({},xe,{o1:e,o2:t})),Be=s("./src/telemetry/index.ts");window.atob;const $e=window.btoa;var qe,Ve=s("./src/lib/makeRequest/index.ts");!function(e){e.NumberOfDiffs="numberOfDiffs",e.DetailedDiffs="detailedDiffs"}(qe||(qe={}));const He=e=>{switch(e){case qe.NumberOfDiffs:return h.w.NUMBER_OF_DIFFS;case qe.DetailedDiffs:return h.w.DETAILED_DIFFS}};function Ke(e,t){return Object(Ve.b)({method:h.jb.POST,endpoint:`/counters/${He(t.type)}`,data:{value:$e(JSON.stringify(Object.assign({appName:e},t.data)))},type:"json"})}var We=async function({fetchFn:e,context:t,variables:s,normalizer:r,dataToCompare:n,responseName:a,responseTypeName:c,diffSettings:i,beforeCompare:o}){try{const u=Date.now(),l=await e(t,s);if(l.ok){const e=r(l.body.data),t=Date.now()-u;o&&o(n.response,e);const s=Fe(n.response,e),d=i&&i.rules?((e,t)=>e.filter(e=>{for(const r of t){var s=De(r,2);const t=s[0],n=s[1];if(t.test(e.p)&&n(e.o1,e.o2))return!1}return!0}))(s,i.rules):s,b=d.length;return((e,t,s,r,n,a)=>{const c=t?`${e}_${t}`:e;Object(Be.b)(h.o.Redesign,{type:"gql",responseName:c,duration:a}),Ke(h.o.Redesign,{type:qe.NumberOfDiffs,data:{responseName:c,numberOfDiffs:s,totalDiffs:r}}),Ke(h.o.Redesign,{type:qe.DetailedDiffs,data:Object.assign({responseName:e},n)})})(a,c,b,Me(n.response),(e=>{const t={account:0,posts:0,preferences:0,profiles:0,subreddits:0},s={posts:new Set,profiles:new Set,subreddits:new Set};for(const r of e){const e=r.p.match(Ge);if(!e)continue;const n=e[1],a=e[2];switch(n){case"preferences":case"account":t[n]++;break;default:s[n]&&a&&(t[n]++,s[n].add(a))}}for(const r in s)t[r]/=s[r].size||1;return t})(d),t),d.length&&Object(Ae.c)(`Compare responses: ${a}`,{extra:Object.assign({diff:d,numberOfDiffs:b},n.start&&{responsesDist:u-n.start}),settings:{serverLogging:!1}}),Object.assign({},l,{body:e})}return Object(Ae.c)(`Gql error in ${a}`,{extra:{error:l.error},settings:{serverLogging:!1}}),l}catch(d){Object(Ae.b)(d)}},Ye=s("./src/reddit/helpers/timeApiRoute/index.ts"),ze=s("./src/reddit/reducers/sidebarPromotedPosts/models/index.ts"),Qe=s("./src/reddit/actions/hero.ts"),Xe=s("./src/reddit/constants/news.ts"),Je=s("./src/reddit/helpers/graphql/helpers.ts"),Ze=s("./src/reddit/selectors/news.ts");s.d(t,"n",function(){return tt}),s.d(t,"j",function(){return st}),s.d(t,"M",function(){return rt}),s.d(t,"h",function(){return nt}),s.d(t,"g",function(){return at}),s.d(t,"f",function(){return ct}),s.d(t,"r",function(){return ut}),s.d(t,"L",function(){return lt}),s.d(t,"G",function(){return bt}),s.d(t,"C",function(){return Ot}),s.d(t,"d",function(){return ft}),s.d(t,"b",function(){return mt}),s.d(t,"a",function(){return jt}),s.d(t,"x",function(){return yt}),s.d(t,"w",function(){return _t}),s.d(t,"y",function(){return Et}),s.d(t,"v",function(){return ht}),s.d(t,"c",function(){return St}),s.d(t,"D",function(){return It}),s.d(t,"E",function(){return vt}),s.d(t,"J",function(){return Ct}),s.d(t,"s",function(){return Rt}),s.d(t,"p",function(){return At}),s.d(t,"q",function(){return Dt}),s.d(t,"o",function(){return Pt}),s.d(t,"K",function(){return Lt}),s.d(t,"I",function(){return Ut}),s.d(t,"i",function(){return Mt}),s.d(t,"B",function(){return Ft}),s.d(t,"m",function(){return Bt}),s.d(t,"l",function(){return $t}),s.d(t,"k",function(){return qt}),s.d(t,"F",function(){return Yt}),s.d(t,"e",function(){return zt}),s.d(t,"z",function(){return Xt}),s.d(t,"u",function(){return Jt}),s.d(t,"t",function(){return Zt}),s.d(t,"H",function(){return es}),s.d(t,"A",function(){return ts});var et=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const tt=25,st=100,rt=(e,t=!0)=>async(s,r,{routes:n})=>{const c=r();Object(Ee.a)(e,n,c)?s(Object(a.b)(e)):t?window.open(e,"_blank"):window.location.assign(e)},nt="PAGE__FRONTPAGE_PENDING",at="PAGE__FRONTPAGE_LOADED",ct="PAGE__FRONTPAGE_FAILED",it=Object(je.a)(nt),ot=Object(je.a)(at),dt=Object(je.a)(ct),ut="PAGE__TRENDING_LOADED",lt=Object(je.a)(ut),bt=(e,t)=>{const s=e.user.language;return Object(c.a)(s,`title.${t}`)},pt=(e,t)=>async(s,r,n)=>{const a=r();if(a.listings.postOrder.api.pending[e])return;const i=H.d[Object(W.O)(a,{})];t.isMobile=Object(o.e)(a.meta.userAgent),t.recentPostIds=a.posts.recent,t.layout=i,t.useMockData=!!a.platform.currentPage&&(!!a.platform.currentPage.queryParams.useMockData&&Object(Oe.b)(a)),s(it({key:e}));const u=Object(ue.i)(a),l=Object(ue.j)(a,{expEventOverride:!1}),b=u&&l;if(!b){const e=a.platform.currentPage,s=e&&e.url;s&&(t.clickUrl=s)}const p=b?()=>Object(_.a)(n.apiContext(),u,t):()=>ve.d.useGraphQLInFrontpage(a)?Object(j.b)(n.gqlContext(),Object(j.d)(a,t),Object(me.K)(a)):Object(j.a)(n.apiContext(),t),O=b?"multireddit":"index",f=Date.now(),m=await Object(Ye.a)(O,p);s(Object(k.m)(m.status));const g=`error-${e}`;if(m.ok){const c=m.body;s(ot(Object.assign({key:e,meta:a.meta},c)));const i=[N.c()(s,r,n)];Object(ae.a)(a)&&i.push(s(d.g())),await Promise.all(i),s(F.f(g)),s(Object(he.g)(ze.a.FRONTPAGE)),b||ve.d.useGraphQLInFrontpage(a)||!ve.d.enableShadowMode(a)||We(Object.assign({},((e,t)=>{const s=[h.X.CONTROVERSIAL,h.X.TOP].includes(e)&&!t?h.sc:t;return{responseName:"home_feed",responseTypeName:`${e}${s?"_"+s:""}`}})(t.sort,t.t),{fetchFn:j.c,normalizer:X.a,variables:Object(j.d)(a,t),context:n.gqlContext(),dataToCompare:{response:c,start:f},beforeCompare:ss,diffSettings:{rules:[[/.*/,(e,t)=>void 0===e&&[!1,null,void 0].includes(t)],[/^features$/,Je.f],[/^posts\..+\.eventsOnRender$/,Je.f],[/^posts\..+\.isRoadblock$/,Je.f],[/^posts\..+\.postCategories$/,Je.f],[/^account\.geopopular$/,Je.f],[/^account\.inChat$/,Je.f],[/^account\.showTwitter$/,Je.f],[/^posts\..*\.media\.videoPreview$/,Je.f],[/^posts\..+\.score$/,Je.g],[/^subreddits\..+\.subscribers$/,Je.g],[/^posts\..+\.upvoteRatio$/,Je.f],[/^subreddits\..+\.primaryColor$/,Je.d],[/^posts\..+\.flair\[\d{1,2}\]\.backgroundColor$/,Je.d],[/^account.showRecentPosts$/,(e,t)=>!!e===t],[/^posts\..+\.media\.resolutions\[\d+\]\.url$/,(e,t)=>Object(Je.b)(e,t,["height"])],[/^posts\..+\.media\.posterUrl$/,(e,t)=>Object(Je.b)(e,t,["height"])],[/^posts\..+\.preview\.url$/,(e,t)=>Object(Je.b)(e,t,["format"])],[/^trendingSubredditIds\[\d+\]$/,Je.f],[/^subreddits\..+\.wls$/,e=>null==e],[/^subreddits\..+\.whitelistStatus$/,(e,t)=>("no_ads"===e||"null_value"===e)&&void 0===t],[/^posts\..+\.media\.obfuscated$/,Je.c],[/^posts\..+\.source\.outboundUrl$/,(e,t)=>""===e&&void 0===t||Object(Je.e)(e,t,["app_name","token"])],[/^posts\..+\.source\.outboundUrl(Created|Expiration)$/,(e,t)=>Math.abs(t-e)<1e4],[/^posts\..*\.numComments/,(e,t)=>Math.abs(t-e)<=10],[/^postFlair\..*\.displaySettings\.position/,(e,t)=>""===e&&null===t],[/^subreddits\..*\.freeFormReports$/,e=>null==e],[/^posts\..*\.sendReplies$/,(e,t)=>void 0===t],[/^posts\..+\.flair\[\d+\]\.templateId$/,(e,t)=>null===e&&void 0===t],[/^postInstances\[\d+\]$/,Je.f],[/^account\.hasAndroidSubscription$/,(e,t)=>!1===e&&void 0===t],[/^account\.hasIOSSubscription$/,(e,t)=>!1===e&&void 0===t],[/^posts\..+\.media\.content$/,(e,t)=>void 0===e&&""===t],[/^posts\..+\.media\.markdownContent$/,(e,t)=>void 0===e&&""===t],[/^posts\..+\.crosspostParentId$/,(e,t)=>null===e&&void 0===t],[/^posts\..+\.crosspostRootId$/,(e,t)=>null===e&&void 0===t],[/^account\.gildedLastMonth$/,(e,t)=>null===e&&void 0===t],[/^account\.accountIcon$/,(e,t)=>null===e&&void 0===t],[/^account\.email$/,(e,t)=>null===e&&void 0===t],[/^subreddits\..+\.communityIcon$/,(e,t)=>""===e&&void 0===t]]}}))}else s(dt(Object.assign({error:m.error,key:e},m.body))),s(F.e({id:g,kind:re.b.Error,text:Object(c.a)(a.user.language,"listings.toast.error"),buttonText:Object(c.a)(a.user.language,"listings.toast.retryButton"),buttonAction:pt(e,t)}))},Ot=(e,t)=>async(s,r,{apiContext:c})=>{const o=r(),d=Object(Ze.b)(o),u=Object(Oe.b)(o);await Promise.all([Object(Ze.g)(o)?s(Object(Qe.e)(d,Xe.g,"",u)):null,s(((e,t)=>async(s,r)=>{const c=r();if(!1===c.user.temporaryGQL.isLoggedIn&&Object(ae.a)(c))return void s(Object(a.b)(Object(i.a)(q.c[V.e.Explore],e.queryParams)));const o=Object(oe.a)(c);var d=e.params.sort;const u=void 0===d?o:d,l=Object(ye.a)(V.b,u,e.queryParams),b=c.listings.postOrder.ids[l],p=c.listings.postOrder.api.error[l],f=c.listings.postOrder.api.pending[l],m=O.s in e.queryParams&&e.queryParams[O.s].toUpperCase()||"",j=m in h.rc&&h.rc[m];f||b&&!p&&!t?b&&(s(k.l({title:bt(r(),"frontpage")})),c.sidebarPromotedPosts.firstFetch||window.addEventListener("load",()=>{s(Object(he.g)(ze.a.FRONTPAGE))})):(await s(pt(l,Object.assign({},n()(e.queryParams,O.j),n()(e.queryParams,O.i),{sort:u,t:Object(Q.a)(u,j)}))),s(k.l({title:bt(r(),"frontpage")})),Object(Re.b)(c,{experimentEligibilitySelector:Re.a,experimentName:"redesign_aa"}))})(e,t))])},ft="PAGE__COMMENTSPAGE_PENDING",mt="PAGE__COMMENTSPAGE_LOADED",jt="PAGE__COMMENTSPAGE_FAILED",gt=Object(je.a)(ft),yt=Object(je.a)(mt),_t=Object(je.a)(jt),Et=e=>async(t,s,r)=>{const n=e.params.partialPostId,a=e.params.partialCommentId;const i=(e.params||"").subredditName,o=n?Object(se.f)(n):"",d=a&&Object(Z.d)(a),u=e.queryParams,f=s(),m=u.instanceId;var j=Object(z.a)(u,f.user,f.posts.models[o]);const g=j.hasSortParam,y=j.sortToUse,_=["context","depth","limit",O.e].reduce((e,t)=>{const s=parseInt(u[t]);return isNaN(s)||(e[t]=s),e},{subredditName:i,hasSortParam:g,instanceId:m,include_categories:!0});g&&(_.sort=y),t(L.j(o)),await t(ht(o,d,_));const E=s().posts.models[o];if(E){const r=((e,t)=>{const s=Object(pe.O)(e,{postId:t});return s?Object(c.a)(e.user.language,"title.commentsPage",{postTitle:e.posts.models[t].title,subreddit:s.name}):""})(s(),o),n=Object(fe.C)(s(),{identifier:E.belongsTo});if(E.belongsTo.type!==K.a.SUBREDDIT||E.isSponsored)E.belongsTo.type===K.a.PROFILE&&await t(U.d(n.name));else{!!Object(fe.F)(f,{subredditId:E.belongsTo.id})||await t(G.n(n.name))}if(!Object(be.h)(f)&&Object(ie.b)(Object(ie.e)(f))){const e=Object(ye.a)(i,h.X.TOP,{t:h.rc.WEEK}),r=Object(pe.y)(s(),{listingKey:e});r&&0!==r.length||t(Object(b.e)(e,n.name,{sort:h.X.TOP,t:h.rc.WEEK}))}t(Object(A.p)()),t(k.l({title:r}));const a=s().posts.instances[o]?e.queryParams.instanceId:E.postId;t(Object(p.c)(a))}else t(k.l({title:bt(s(),"frontpage")}));const S=e.params.routePrefix;if(K.b[S]===K.a.PROFILE?Object(Ce.a)(s(),t,e):Object(Ce.b)(s(),t,e),E&&(ve.d.spPoints(f)||ve.d.spLoadtest(f))){const e=E.belongsTo.id;e&&t(Object(w.a)({subredditId:e})),e&&await t(Object(Ie.a)({subredditId:e}))}if(Object(ce.c)(s())){const e=Object(pe.O)(s(),{postId:o});e&&e.name&&t(l.g(i)),await t(l.f())}},ht=(e,t,s,r)=>async(n,a,c)=>{const i=Object(ge.a)(e,t,s),o=a(),d=s.subredditName,l=o.commentsPage.keyToHeadCommentId.hasOwnProperty(i),p=o.commentsPage.api.fullyLoaded[i],O=o.commentsPage.api.error[i];if(o.commentsPage.api.pending[i]||l&&!O){if(l&&!o.sidebarPromotedPosts.firstFetch){const e=Object(be.h)(o)?ze.a.COMMENTS_OVERLAY:ze.a.COMMENTS;window.addEventListener("load",()=>{n(Object(he.g)(e))})}if(p||r||n(It(e,t,s)),d&&(ve.d.spPoints(a())||ve.d.spLoadtest(a()))){const e=Object(fe.z)(a(),d);e&&window.addEventListener("load",()=>{n(Object(w.a)({subredditId:e}))})}return}n(u.h());const j=o.user.prefs.commentMode;n(gt({key:i,postId:e,commentMode:j}));const g=Object.assign({},s);{const t=Object(pe.D)(a(),{postId:e});t&&t.numComments&&t.numComments>st&&(g.truncate=tt)}let y,E=await Object(Ye.a)("comments",()=>Object(m.a)(c.apiContext(),e,t,g));if(n(Object(k.m)(E.status)),E.ok){const t=Object.keys(E.body.posts).filter(e=>!!E.body.posts[e].isMeta),s=E.body.posts[e];if(t.length){const e=await Object(f.a)(c.apiContext(),s.belongsTo.id,t);e.ok&&(y=e.body)}const r=Object(Y.a)(E.body,e);n(yt(Object.assign({key:i,postId:e,meta:o.meta,governance:y,shouldCollapse:r},E.body)))}if(!r){const r=Object(pe.D)(a(),{postId:e});r&&E.body.comments&&Object.keys(E.body.comments).length<r.numComments?n(It(e,t,s)):E.ok&&n(Tt({key:i}));const c=Object(be.h)(o)?ze.a.COMMENTS_OVERLAY:ze.a.COMMENTS;n(Object(he.g)(c))}if(E.ok){await N.c()(n,a,c),n(F.f(i));const t=Object(pe.D)(a(),{postId:e});if(Object(J.a)(t.events,$.a.CommentsView),!r&&(ve.d.spPoints(a())||ve.d.spSupport(a())||ve.d.spLoadtest(a()))){const t=a().posts.models[e];if(t&&"subreddit"===t.belongsTo.type){const e=Object.keys(E.body.comments),s=e.map(e=>{return E.body.comments[e].authorId}),r=e.concat(t.id),c=t.belongsTo.id;var h=await Promise.all([Object(Te.a)(),Object(Se.a)()]),S=et(h,2);const i=S[0],o=S[1],d=[n(i({subredditId:c,userIds:s}))];(ve.d.spBadges(a())||ve.d.spLoadtest(a()))&&d.push(n(Object(C.l)({subredditId:c}))),(ve.d.spSupport(a())||ve.d.spLoadtest(a()))&&d.push(n(o({subredditId:c,contentIds:r}))),await Promise.all(d)}}}else d&&(n(Object(b.f)({key:i})),E=await Object(Ye.a)("subreddit",()=>Object(_.a)(c.apiContext(),d,{})),n(Object(k.m)(E.status))),n(Object(b.d)(E,d)),n(_t(Object.assign({error:E.error,key:i},E.body)))},St="PAGE__COMMENTSPAGE_LOADED_FULL",Tt=Object(je.a)(St),It=(e,t,s)=>async(r,n,a)=>{const c=Object(ge.a)(e,t,s),i=n(),o=await Object(m.a)(a.apiContext(),e,t,s);if(r(Object(k.m)(o.status)),o.ok){const t=Object(Y.a)(o.body,e);if(r(yt(Object.assign({key:c,postId:e,meta:i.meta,shouldCollapse:t},o.body))),r(Tt({key:c})),ve.d.spPoints(n())||ve.d.spSupport(n())||ve.d.spLoadtest(n())){const t=n().posts.models[e];if(t&&"subreddit"===t.belongsTo.type){const e=Object.keys(o.body.comments),s=e.map(e=>{return o.body.comments[e].authorId}),a=e.concat(t.id),c=t.belongsTo.id;var d=await Promise.all([Object(Te.a)(),Object(Se.a)()]),u=et(d,2);const i=u[0],l=u[1],b=[r(i({subredditId:c,userIds:s}))];(ve.d.spSupport(n())||ve.d.spLoadtest(n()))&&b.push(r(l({subredditId:c,contentIds:a}))),await Promise.all(b)}}}else r(_t(Object.assign({error:o.error,key:c},o.body)))},vt=e=>async(t,s,r)=>{await t(Object(M.c)(e,!0))},Ct=e=>async(t,s,r)=>{await t(Object(M.c)(e,!0))},Rt=()=>async(e,t,s)=>{await e(v.f())},At="SEARCH__SEARCH_PENDING",Dt="SEARCH__SEARCH_RESULTS_RECEIVED",Pt="SEARCH__SEARCH_FAILED",xt=Object(je.a)(At),wt=Object(je.a)(Dt),Nt=Object(je.a)(Pt),kt=(e,t,s)=>async(r,n,{apiContext:a})=>{const i=n(),o=t[O.b],l=t.category,b=Object(E.c)(i);(o||l)&&(await Promise.all([r(u.h()),r(d.g())]),l&&await Promise.all([r(d.h(l,10)),r(u.i(ee.f,l))]));let p=t.type.indexOf(h.kc.Posts)>-1||!(!s||!t.restrict_sr);if(p){const t=i.listings.postOrder.ids[e],s=i.listings.postOrder.api.error[e];p=!(i.listings.postOrder.api.pending[e]||t&&!s)}let f=t.type.indexOf(h.kc.Subreddits)>-1||t.type.indexOf(h.kc.Users)>-1;if(f){const t=i.listings.listingOrder.identifiers[e],s=i.listings.listingOrder.api.error[e];f=!(i.listings.listingOrder.api.pending[e]||t&&!s)}if(!p&&!f)return void(i.sidebarPromotedPosts.firstFetch||window.addEventListener("load",()=>{r(Object(he.g)(ze.a.SEARCH_RESULTS))}));const m=`error-${e}`,j=t.type;r(xt({key:e,type:j}));const g=await Object(Ye.a)("searchResults",()=>Object(y.a)(a(),s,Object.assign({},t,{type:(t.type||[]).join(","),b})));if(g.ok){const n={key:e,type:j,meta:i.meta,searchQuery:t.q,subredditName:s};r(wt(Object.assign({},n,g.body))),r(F.f(m)),r(Object(he.g)(ze.a.SEARCH_RESULTS))}else r(Nt(Object.assign({key:e,error:g.error,type:j},g.body))),r(F.e({id:m,kind:re.b.Error,text:Object(c.a)(i.user.language,"search.toast.error"),buttonText:Object(c.a)(i.user.language,"search.toast.retryButton"),buttonAction:kt(e,t,s)}))},Lt=e=>async(t,s,r)=>{const a=Object(_e.d)(n()(e.queryParams,O.p)),i=e.params.subredditName||e.params.multiredditName,o=Object.assign({},a,{sort:a.category?h.jc.Relevance:a.sort,t:a.category?h.rc.DAY:a.t}),d=Object(_e.c)(i,o),u=s();await t(kt(d,o,i));const l=s();let b=!1;var p=a.type;const f=void 0===p?[]:p,m=f.indexOf(h.kc.Posts)>-1,j=f.indexOf(h.kc.Subreddits)>-1||f.indexOf(h.kc.Users)>-1;m&&l.listings.postOrder.api.error[d]&&(b=!0),j&&l.listings.listingOrder.api.error[d]&&(b=!0),t(b?k.l({title:bt(u,"frontpage")}):k.l({title:((e,t)=>Object(c.a)(e.user.language,"search.title",{query:t||"None"}))(l,a.q)}))},Ut=(e,t,s)=>async(r,n,{routes:c})=>{const i=n(),o=(t||i.platform.currentPage).routeMatch.match,d=Object(Ee.a)(o.url,c);if(!d)return;const u=e.metaKey||e.ctrlKey||1===e.button;if(d.route&&d.route.meta&&(d.route.meta.name===h.Rb.INDEX||d.route.meta.name===h.Rb.MULTIREDDIT||d.route.meta.name===h.Rb.SUBREDDIT))u?window.open(o.url):s?r(Object(a.b)(o.url)):(await r(d.route.action(o,!0)),window.scroll(0,0));else if(d.match&&d.match.params&&d.match.params.subredditName){const e=d.match.params.subredditName,t=`/r/${e}`;if(u)window.open(t);else if(s)r(Object(a.b)(t));else{const s=Object(ye.a)(e,h.X.HOT);await r(Object(a.b)(t)),r(Object(b.e)(s,e,{})),window.scroll(0,0)}}},Mt="PAGE__FRONTPAGE_RELOADED",Gt=Object(je.a)(Mt),Ft=e=>async(t,s,r)=>{const n=s(),a=n.platform.currentPage.routeMatch.match;Object(de.q)(n)||Object(de.d)(n)||(e||t(Gt()),await t(Ot(a,!0)),window.scroll(0,0))},Bt="PAGE__MULTIREDDIT_FEED_PENDING",$t="PAGE__MULTIREDDIT_FEED_LOADED",qt="PAGE__MULTIREDDIT_FEED_FAILED",Vt=Object(je.a)(Bt),Ht=Object(je.a)($t),Kt=Object(je.a)(qt),Wt=(e,t,s,r)=>async(n,i,{apiContext:o})=>{const d=i();if(d.listings.postOrder.api.pending[e])return;n(Vt({key:e})),s.layout=H.d[Object(W.O)(d,{})];const u=await Object(Ye.a)("multireddit",()=>Object(g.a)(o(),t,s)),l=`error-${e}`;if(u.ok)n(Ht(Object.assign({key:e,meta:d.meta},u.body))),r&&n(F.f(l)),window.addEventListener("load",()=>{n(Object(he.g)(ze.a.MULTIREDDIT))});else{if(404===u.status)return r&&n(F.f(l)),void n(Object(a.c)("/"));n(Kt(Object.assign({error:!u.ok&&u.error||{type:h.I.NOT_FOUND_ERROR},key:e},u.body))),r&&n(F.e({id:l,kind:re.b.Error,text:Object(c.a)(d.user.language,"listings.toast.error"),buttonText:Object(c.a)(d.user.language,"listings.toast.retryButton"),buttonAction:Wt(e,t,s,r)}))}},Yt=(e,t)=>async(s,r)=>{const c=e.params.multiredditName;let i=e.params.username;if(!i){const e=r();if(e.user.session&&e.user.session.unsafeLoggedOut)return void s(Object(a.c)("/"));if(!e.user.account&&e.user.session&&await s(B.o()),!r().user.account)return void s(Object(a.c)("/"))}var o=e.params.sort;const d=void 0===o?h.X.HOT:o,u={multiredditName:c},l=r();i||(i=l.user.account?Object(ne.f)(l.user.account):"");const b=Object(te.c)(i,c),p=Object(ye.a)(b,d,e.queryParams),f=l.listings.postOrder.ids[p],m=l.listings.postOrder.api.error[p],j=l.listings.postOrder.api.pending[p],g=O.s in e.queryParams&&e.queryParams[O.s].toUpperCase()||"",y=g in h.rc&&h.rc[g];if(j||f&&!m&&!t)return void(f&&(s(k.l({title:Object(le.c)(r(),u)})),l.sidebarPromotedPosts.firstFetch||s(Object(he.g)(ze.a.MULTIREDDIT))));await s(Wt(p,c,Object.assign({},n()(e.queryParams,O.j),n()(e.queryParams,O.i),{sort:d,t:Object(Q.a)(d,y)}),!0));const _=r();Object(le.b)(_,u)&&s(k.l({title:Object(le.c)(r(),u)})),Object(Ce.c)(_,s,e)},zt="PAGE__DASHBOARD_PENDING",Qt=Object(je.a)(zt),Xt=e=>async(t,s,r)=>{const a=s(),c=h.X.HOT;var i=e.params;const o=i.subredditName,d=i.section,u=i.component,l=Object(T.a)(S.a.replyToComment,"example-comment");t(Qt({draftKey:l})),d&&u&&t(R.d(`${d}/${u}`));const p=o&&a.dashboard.subredditLoaded[o];if(o&&!p){t(R.f(o));const s=Object(ye.a)(o,c,e.queryParams),r=O.s in e.queryParams&&e.queryParams[O.s].toUpperCase()||"",a=r in h.rc&&h.rc[r];await t(Object(b.e)(s,o,Object.assign({},n()(e.queryParams,O.j),n()(e.queryParams,O.i),{sort:c,t:Object(Q.a)(c,a)}),!0)),t(R.e(o))}else{const s=Object(ye.a)(V.b,c,{}),r=O.s in e.queryParams&&e.queryParams[O.s].toUpperCase()||"",a=r in h.rc&&h.rc[r];await t(pt(s,Object.assign({},n()(e.queryParams,O.j),n()(e.queryParams,O.i),{sort:c,t:Object(Q.a)(c,a)})))}},Jt=e=>async(t,r)=>{const n=r();t(k.l({title:bt(n,"coins")})),Object(me.F)(n)||await t(B.o());const c=r(),i=e.queryParams;if(i.thanks){const e=await Promise.resolve().then(s.bind(null,"./src/reddit/actions/goldPurchaseModals/payment.ts")).then(e=>e.paymentCompleted);setTimeout(()=>{i.gild&&t(P.e({thingId:"THING_ID_PLACEHOLDER"})),t(P.g({coinPackage:I.a.coins500})),t(e({confirmed:!1}))},1e3)}else if(i.qty){if(!Object(me.F)(c)||!ve.d.canProxyGild(c))return void t(Object(a.c)("/coins"));const e=await Promise.resolve().then(s.bind(null,"./src/reddit/actions/goldPurchaseModals/payment.ts")).then(e=>e.selectPaymentMethod);setTimeout(()=>{const s=parseInt(i.qty),r=Object(I.c)(s);t(P.g({coinPackage:r})),t(e(h.Lb))},500)}},Zt=e=>async(e,t)=>{const s=t();e(k.l({title:bt(s,"coins")}))},es=e=>async(t,r)=>{const n=r();if(t(k.l({title:bt(n,"premium")})),e.queryParams.thanks){const e=await Promise.resolve().then(s.bind(null,"./src/reddit/actions/goldPurchaseModals/payment.ts")).then(e=>e.paymentCompleted);setTimeout(()=>{t(x.e()),t(e({confirmed:!1}))},1e3)}Object(me.F)(n)||await t(B.o())},ts=e=>async(t,s)=>{const r=s(),n=e.params.thingId;t(Object(D.c)(n)),Object(me.F)(r)||await t(B.o());const a=s();if(!Object(me.F)(a))return t(Object(D.f)())},ss=(e,t)=>{const s={};for(const r in e.postInstances)for(const n of e.postInstances[r]){const a=e.postIds.indexOf(n),c=t.postIds[a];e.posts[n]&&t.posts[c]&&e.posts[n].postId===t.posts[c].postId&&(s[c]={postId:r,gwAdPostId:n,index:a})}for(const r in s){const e=s[r];if(t.postInstances[e.postId]){const s=t.postInstances[e.postId].indexOf(r);-1!==s&&(t.postInstances[e.postId][s]=e.gwAdPostId)}t.posts[e.gwAdPostId]=t.posts[r],delete t.posts[r],t.postIds[e.index]=e.gwAdPostId}}},"./src/reddit/actions/pages/collectionCommentsPage.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/lib/makeCollectionCommentsPageKey/index.ts"),c=s("./src/reddit/actions/ad.ts"),i=s("./src/reddit/actions/badge.ts"),o=s("./src/reddit/actions/moderatingSubreddits.ts"),d=s("./src/reddit/actions/page.ts"),u=s("./src/reddit/actions/pages/shared.ts"),l=s("./src/reddit/actions/pages/subreddit.ts"),b=s("./src/reddit/actions/platform.ts"),p=s("./src/reddit/actions/post.ts"),O=s("./src/reddit/actions/profile/index.ts"),f=s("./src/reddit/actions/shortcuts.ts"),m=s("./src/reddit/actions/subreddit.ts"),j=s("./src/reddit/actions/toaster.ts"),g=s("./src/reddit/constants/adEvents.ts"),y=s("./src/reddit/constants/parameters.ts"),_=s("./src/reddit/constants/posts.ts"),E=s("./src/reddit/endpoints/governance/posts.ts"),h=s("./src/config.ts"),S=s("./src/lib/constants/index.ts"),T=s("./src/lib/makeApiRequest/index.ts"),I=s("./src/reddit/models/RichTextJson/addRTJParam.ts");var v=(e,t,s,r,n)=>Object(T.c)(e,{data:n,endpoint:function(e,t,s){const r=`${h.a.gatewayUrl}/desktopapi/v1/collection_postcomments`;return s?Object(I.a)(`${r}/${e}/${t}/${s}`):t?Object(I.a)(`${r}/${e}/${t}`):Object(I.a)(`${r}/${e}`)}(t,s,r),method:S.jb.GET}),C=s("./src/reddit/endpoints/page/subredditPage.ts"),R=s("./src/reddit/featureFlags/index.ts"),A=s("./src/reddit/helpers/canonicalUrls.ts"),D=s("./src/reddit/helpers/commentList/index.ts"),P=s("./src/reddit/helpers/getCommentsPageSort/index.ts"),x=s("./src/reddit/helpers/pixels.ts"),w=s("./src/reddit/helpers/timeApiRoute/index.ts"),N=s("./src/reddit/models/Comment/index.ts"),k=s("./src/reddit/models/Post/index.ts"),L=s("./src/reddit/reducers/sidebarPromotedPosts/models/index.ts"),U=s("./src/reddit/selectors/platform.ts"),M=s("./src/reddit/selectors/postCollection.ts"),G=s("./src/reddit/selectors/posts.ts"),F=s("./src/reddit/selectors/subreddit.ts");s.d(t,"d",function(){return B}),s.d(t,"b",function(){return $}),s.d(t,"a",function(){return q}),s.d(t,"e",function(){return W}),s.d(t,"c",function(){return Y});const B="PAGE__COLLECTIONCOMMENTSPAGE_PENDING",$="PAGE__COLLECTIONCOMMENTSPAGE_LOADED",q="PAGE__COLLECTIONCOMMENTSPAGE_FAILED",V=Object(n.a)(B),H=Object(n.a)($),K=Object(n.a)(q),W=e=>async(t,s)=>{var n=e.params;const a=n.collectionId,c=n.partialPostId,i=n.partialCommentId;var o=n.subredditName;const d=void 0===o?"":o,l=c?Object(k.f)(c):"",j=i&&Object(N.d)(i),g=e.queryParams,E=s(),h=g.instanceId;var S=Object(P.a)(g,E.user,E.posts.models[l]);const T=S.hasSortParam,I=S.sortToUse,v=["context","depth","limit",y.e].reduce((e,t)=>{const s=parseInt(g[t]);return isNaN(s)||(e[t]=s),e},{subredditName:d,hasSortParam:T,instanceId:h});T&&(v.sort=I),t(p.j(l)),await t(X(a,l,j,v));const C=s().posts.models[l];if(C){const n=((e,t)=>{const s=Object(M.l)(e,{collectionId:t});if(!s)return"";const n=Object(F.G)(e,{subredditId:s.subredditId});return n?Object(r.a)(e.user.language,"title.commentsPage",{postTitle:s.title,subreddit:n.name}):""})(s(),a),c=Object(F.C)(s(),{identifier:C.belongsTo});if(!C.isSponsored)if(C.belongsTo.type===_.a.SUBREDDIT){!!Object(F.F)(E,{subredditId:C.belongsTo.id})||await t(m.n(c.name))}else await t(O.d(c.name));t(b.l({title:n}));const i=s().posts.instances[l]?e.queryParams.instanceId:C.postId;t(Object(f.c)(i))}else t(b.l({title:Object(u.b)(s(),"frontpage")}));const R=e.params.routePrefix;_.b[R]===_.a.PROFILE?Object(A.a)(s(),t,e):Object(A.b)(s(),t,e)},Y="PAGE__COLLECTIONCOMMENTSPAGE_LOADED_FULL",z=Object(n.a)(Y),Q=(e,t,s,r)=>async(n,c,i)=>{const o=Object(a.a)(e,t,s,r),d=c();t=t||Object(M.k)(d,{collectionId:e});const u=await v(i.apiContext(),e,t,s,r);if(n(Object(b.m)(u.status)),u.ok){if(!(t=t||u.body.collections[e].primaryPostId))return;const s=Object(D.a)(u.body,t);n(H(Object.assign({key:o,collectionId:e,meta:d.meta,postId:t,shouldCollapse:s},u.body)));const r=d.user.prefs.commentMode;n(z({commentMode:r,key:o,postId:t}))}else n(K(Object.assign({error:u.error,key:o},u.body)))},X=(e,t,s,r,n)=>async(u,p,O)=>{const f=Object(a.a)(e,t,s,r),m=p();t=t||Object(M.k)(m,{collectionId:e});const y=r.subredditName,_=m.commentsPage.keyToHeadCommentId.hasOwnProperty(f),h=m.commentsPage.api.fullyLoaded[f],S=m.commentsPage.api.error[f];if(m.commentsPage.api.pending[f]||_&&!S){if(_&&!m.sidebarPromotedPosts.firstFetch){const e=Object(U.h)(m)?L.a.COMMENTS_OVERLAY:L.a.COMMENTS;window.addEventListener("load",()=>{u(Object(c.g)(e))})}return void(h||n||u(Q(e,t,s,r)))}const T=m.user.prefs.commentMode;u(V({key:f,collectionId:e,commentMode:T,postId:t}));const I=Object.assign({},r);{const e=t&&Object(G.D)(p(),{postId:t});e&&e.numComments&&e.numComments>d.j&&(I.truncate=d.n)}let A,P=await Object(w.a)("comments",()=>v(O.apiContext(),e,t,s,I));if(u(Object(b.m)(P.status)),P.ok&&(t=t||P.body.collections[e].primaryPostId)){const e=Object.keys(P.body.posts).filter(e=>!!P.body.posts[e].isMeta),s=Object(G.D)(p(),{postId:t});if(e.length){const t=await Object(E.a)(O.apiContext(),s.belongsTo.id,e);t.ok&&(A=t.body)}}if(!n){const n=t?Object(G.D)(p(),{postId:t}):null;n&&P.body.comments&&Object.keys(P.body.comments).length<n.numComments?u(Q(e,t,s,r)):P.ok&&u(z({commentMode:T,key:f,postId:t}));const a=Object(U.h)(m)?L.a.COMMENTS_OVERLAY:L.a.COMMENTS;u(Object(c.g)(a))}if(P.ok){if(!t)return;const e=Object(D.a)(P.body,t);u(Object(d.x)(Object.assign({commentMode:T,key:f,postId:t,meta:m.meta,governance:A,shouldCollapse:e},P.body))),await o.c()(u,p,O),u(j.f(f));const s=Object(G.D)(p(),{postId:t});if(Object(x.a)(s.events,g.a.CommentsView),!n&&R.d.spBadges(p())){const e=p().posts.models[t];e&&"subreddit"===e.belongsTo.type&&await u(Object(i.l)({subredditId:e.belongsTo.id}))}}else y&&(u(Object(l.f)({key:f})),P=await Object(w.a)("subreddit",()=>Object(C.a)(O.apiContext(),y,{})),u(Object(b.m)(P.status))),u(Object(l.d)(P,y)),u(K(Object.assign({error:P.error,key:f},P.body)))}},"./src/reddit/actions/pages/explore.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return I}),s.d(t,"b",function(){return v}),s.d(t,"a",function(){return C}),s.d(t,"d",function(){return w}),s.d(t,"e",function(){return N});var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/app/strings/index.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/lib/makeExplorePageKey/index.ts"),o=s("./src/lib/makeListingKey/index.ts"),d=s("./src/reddit/actions/category.ts"),u=s("./src/reddit/actions/discoveryUnit.ts"),l=s("./src/reddit/actions/modal.ts"),b=s("./src/reddit/actions/pages/subreddit.ts"),p=s("./src/reddit/actions/platform.ts"),O=s("./src/reddit/actions/toaster.ts"),f=s("./src/reddit/constants/explore.ts"),m=s("./src/reddit/constants/listings.ts"),j=s("./src/reddit/helpers/timeApiRoute/index.ts"),g=s("./src/reddit/models/Toast/index.ts"),y=s("./src/reddit/selectors/category.ts"),_=s("./src/reddit/selectors/discoveryUnit.ts"),E=s("./src/reddit/selectors/experiments/exploreV2.ts"),h=s("./src/reddit/selectors/listings.ts"),S=s("./src/reddit/selectors/posts.ts"),T=s("./src/reddit/selectors/user.ts");const I="PAGE__EXPLORE_PAGE_PENDING",v="PAGE__EXPLORE_PAGE_LOADED",C="PAGE__EXPLORE_PAGE_FAILED",R=Object(c.a)(I),A=Object(c.a)(v),D=Object(c.a)(C),P=(e,t,s)=>async(r,a,c)=>{const i=a(),o=Object(_.a)(i);if(!o){r(D({key:e,error:{}}));const s=Object(T.M)(i);return void r(O.e({id:`error-${e}`,kind:g.b.Error,text:Object(n.a)(s,"listings.toast.error"),buttonText:Object(n.a)(s,"listings.toast.retryButton"),buttonAction:w(e,t)}))}const d=Object(h.j)(i,{listingKey:e}),l=d?d.token:void 0;if(d){if(!s)return;{const t=Object(h.h)(i,{listingKey:e}),s=Object(h.i)(i,{listingKey:e,token:d.token});if(t||s)return}}else{const t=Object(h.h)(i,{listingKey:e}),s=Object(h.f)(i,{listingKey:e});if(t||s)return}r(R({key:e}));const b=Object(y.e)(i),p=l?b.findIndex(e=>e.id===l)+1:0,m=b.slice(p,p+f.a);await Promise.all(m.map(e=>r(u.g(o,e.name))));const j=Math.min(p+f.a-1,b.length-1);r(A({fetchedToken:l,ids:m.map(({id:e})=>e),key:e,token:b[j].id}))},x=(e,t,s,r)=>async(a,c,i)=>{let o=c();const l=Object(_.d)(o),b=Object(y.f)(o,{categoryName:s});if(!l||!b){a(D({key:e,error:{}}));const s=Object(T.M)(o);return void a(O.e({id:`error-${e}`,kind:g.b.Error,text:Object(n.a)(s,"listings.toast.error"),buttonText:Object(n.a)(s,"listings.toast.retryButton"),buttonAction:w(e,t)}))}const p=Object(h.j)(o,{listingKey:e}),m=p?p.token:void 0,j=Object(h.h)(o,{listingKey:e});if(p){if(!r)return;{const t=Object(h.i)(o,{listingKey:e,token:p.token});if(j||t)return}}else{const t=Object(h.f)(o,{listingKey:e});if(j||t)return}a(R({key:e})),await a(d.h(b.id)),o=c();const E=Object(y.d)(o,{categoryName:s}),S=m?E.findIndex(e=>e.id===m)+1:0,I=E.slice(S,S+f.b);await Promise.all(I.map(e=>a(u.k(l,e.name)))),a(A({fetchedToken:m,ids:I.map(({id:e})=>e),key:e,token:E[Math.min(S+f.b-1,E.length-1)].id}))},w=(e,t,s)=>async(r,n,a)=>{await Promise.all([r(u.h()),r(d.g())]);const c=t.categoryName?()=>r(x(e,t,t.categoryName,s)):()=>r(P(e,t,s));await Object(j.a)("explore",c),t.categoryName?await r(x(e,t,t.categoryName,s)):await r(P(e,t,s))},N=e=>async(t,s,c)=>{const d=s();if(!Object(E.a)(d))return void t(Object(r.b)("/"));const u=Object(i.a)(e.params);if(Object(h.h)(d,{listingKey:u}))return;const O=Object(o.a)(m.b.Popular,a.X.HOT);0===Object(S.y)(d,{listingKey:O}).length&&await t(Object(b.e)(O,m.b.Popular,{},!0)),Object(T.F)(s())?t(Object(r.b)("/")):(t(Object(l.l)({actionSource:l.a.Explore,redirectUrl:"/"})),await t(w(u,e.params)),t(p.l({title:(e=>Object(n.a)(e.user.language,"title.frontpage"))(s())})))}},"./src/reddit/actions/pages/modListing/constants.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return r}),s.d(t,"e",function(){return n}),s.d(t,"d",function(){return a}),s.d(t,"i",function(){return c}),s.d(t,"h",function(){return i}),s.d(t,"g",function(){return o}),s.d(t,"c",function(){return d}),s.d(t,"b",function(){return u}),s.d(t,"a",function(){return l}),s.d(t,"l",function(){return b}),s.d(t,"k",function(){return p}),s.d(t,"j",function(){return O});const r="PAGE__MOD_LISTING_PAGE_PENDING",n="PAGE__MOD_LISTING_PAGE_LOADED",a="PAGE__MOD_LISTING_PAGE_FAILED",c="MOD_LISTING_MORE_POSTS_PENDING",i="MOD_LISTING_MORE_POSTS_LOADED",o="MOD_LISTING_MORE_POSTS_FAILED",d="MOD_LISTING_HIDE_SUBREDDIT_SUCCESS",u="MOD_LISTING_HIDE_SUBREDDIT_PENDING",l="MOD_LISTING_HIDE_SUBREDDIT_FAILED",b="MOD_LISTING_UNHIDE_SUBREDDIT_SUCCESS",p="MOD_LISTING_UNHIDE_SUBREDDIT_PENDING",O="MOD_LISTING_UNHIDE_SUBREDDIT_FAILED"},"./src/reddit/actions/pages/modListing/index.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/app/strings/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/lib/makeListingKey/index.ts"),d=s("./src/reddit/actions/platform.ts"),u=s("./src/reddit/actions/toaster.ts"),l=s("./src/reddit/constants/page.ts"),b=s("./src/reddit/constants/parameters.ts"),p=s("./src/config.ts"),O=s("./src/lib/makeApiRequest/index.ts"),f=s("./src/lib/omitHeaders/index.ts"),m=s("./src/reddit/constants/headers.ts"),j=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),g=s("./src/reddit/helpers/name/index.ts"),y=s("./src/reddit/models/RichTextJson/addRTJParam.ts"),_=(e,t)=>Object(O.c)(e,{data:t,endpoint:Object(j.a)(Object(y.a)(`${p.a.gatewayUrl}/desktopapi/v1/mod`)),method:c.jb.GET});const E=(e,t,s,r)=>Object(O.c)(Object(f.a)(e,[m.a]),{endpoint:`${e.apiUrl}/api/filter/user/${t}/f/mod/${Object(g.b)(s)}`,method:r?c.jb.PUT:c.jb.DELETE,data:{model:JSON.stringify({name:Object(g.g)(s)})}}),h=(e,t,s)=>E(e,t,s,!0),S=(e,t,s)=>E(e,t,s,!1);var T=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),I=s("./src/reddit/helpers/pageActionLoginRedirect.ts"),v=s("./src/reddit/helpers/timeApiRoute/index.ts"),C=s("./src/reddit/models/Toast/index.ts"),R=s("./src/reddit/routes/modListing/index.ts"),A=s("./src/reddit/selectors/user.ts"),D=s("./src/reddit/actions/pages/modListing/constants.ts");s.d(t,"b",function(){return L}),s.d(t,"c",function(){return F}),s.d(t,"a",function(){return z}),s.d(t,"d",function(){return Q});var P=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const x=Object(i.a)(D.f),w=Object(i.a)(D.e),N=Object(i.a)(D.d),k=(e,t)=>async(s,r,n)=>{const c=r(),i=c.listings.postOrder.api.pending[e],o=Object(A.M)(c);if(i)return;s(x({key:e}));const d=await Object(v.a)("modListing",()=>_(n.apiContext(),t)),l=`error-${e}`;d.ok?(s(w(Object.assign({key:e,meta:c.meta},d.body))),s(u.f(l))):(s(N(Object.assign({error:d.error,key:e},d.body))),401===d.status?Object(I.a)(s,c):s(u.e({id:l,kind:C.b.Error,text:Object(a.a)(o,"listings.toast.error"),buttonText:Object(a.a)(o,"listings.toast.retryButton"),buttonAction:k(e,t)})))},L=(e,t)=>async(s,r)=>{var i=e.params.sort;const u=void 0===i?c.Y:i,p=Object(R.d)(e.path),O=p?l.g:l.f,f=Object(o.a)(O,u,e.queryParams),m=r(),j=m.listings.postOrder.ids[f],g=m.listings.postOrder.api.error[f],y=m.listings.postOrder.api.pending[f],_=Object(A.M)(m);if(y||j&&!g&&!t)return void(j&&s(d.l({title:Object(a.a)(_,"modListing.title")})));const E=B(e.queryParams);await s(k(f,Object.assign({},n()(e.queryParams,b.j),n()(e.queryParams,b.i),{filtered:!!p||void 0,moderated_srs:!0,sort:u,t:Object(T.a)(u,E)}))),s(d.l({title:Object(a.a)(_,"modListing.title")}))},U=Object(i.a)(D.i),M=Object(i.a)(D.h),G=Object(i.a)(D.g),F=e=>async(t,s,{apiContext:r})=>{const a=s(),i=a.platform.currentPage;if(!i)return;var d=e.sort;const u=void 0===d?c.Y:d,p=i.queryParams,O=Object(R.d)(i.url),f=O?l.g:l.f,m=Object(o.a)(f,u,p),j=a.listings.postOrder.loadMore[m];if(!j)return;const g=a.listings.postOrder.api.pending[m],y=a.listings.postOrder.fetchedTokens,E=!(!y[m]||!y[m][j.token]);if(g||E)return;const h=B(p);t(U({key:m,fetchedToken:j.token}));const S=await _(r(),Object.assign({after:j.token,dist:j.dist,filtered:!!O||void 0,sort:u,t:Object(T.a)(u,h)},n()(p,b.j))),I=a.listings.postOrder.ids[m],v=Object.assign({},S.body,{postIds:(S.body.postIds||[]).filter(e=>!I||!I.includes(e))});S.ok?t(M(Object.assign({key:m,fetchedToken:j.token,meta:a.meta},v))):t(G(Object.assign({key:m,error:S.error,fetchedToken:j.token},v)))};function B(e){const t=b.s in e&&e[b.s].toUpperCase()||"";return t in c.rc&&c.rc[t]}const $=Object(i.a)(D.c),q=Object(i.a)(D.b),V=Object(i.a)(D.a),H=Object(i.a)(D.l),K=Object(i.a)(D.k),W=Object(i.a)(D.j),Y=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(A.j)(a);var i=P(t?[q,$,V,h]:[K,H,W,S],4);const o=i[0],d=i[1],u=i[2],l=i[3];if(!c||!c.displayText)return;const b=a.platform.currentPage;if(!b||!b.routeMatch)return;s(o(e));const p=await l(n(),c.displayText,e);p.ok?(await s(L(b.routeMatch.match,!0)),s(d(e))):s(u(p.body))},z=e=>Y(e,!0),Q=e=>Y(e,!1)},"./src/reddit/actions/pages/news/index.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/hero.ts"),c=s("./src/reddit/actions/news.ts"),i=s("./src/reddit/actions/pages/news/utils.ts"),o=s("./src/reddit/actions/platform.ts"),d=s("./src/reddit/actions/toaster.ts"),u=s("./src/reddit/constants/news.ts"),l=s("./src/config.ts"),b=s("./src/lib/constants/index.ts"),p=s("./src/lib/makeApiRequest/index.ts"),O=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),f=s("./src/reddit/helpers/timeApiRoute/index.ts"),m=s("./src/reddit/models/News/index.ts"),j=s("./src/reddit/models/Toast/index.ts"),g=s("./src/reddit/routes/news/util.ts"),y=s("./src/reddit/selectors/listings.ts"),_=s("./src/reddit/selectors/news.ts");s.d(t,"c",function(){return h}),s.d(t,"b",function(){return S}),s.d(t,"a",function(){return T}),s.d(t,"d",function(){return A});const E=e=>Object(r.a)(e.user.language,"listings.news.title"),h="PAGE__NEWS_PENDING",S="PAGE__NEWS_LOADED",T="PAGE__NEWS_FAILED",I=Object(n.a)(h),v=Object(n.a)(S),C=Object(n.a)(T),R=(e,t,s,r=!0)=>async(n,a,c)=>{const o=a(),u=Object(y.d)(o,{listingKey:e}),m=o.listings.postOrder.ids[e],j=Object(y.c)(o,{listingKey:e});if(u||m&&!j)return;n(I({key:e}));const g=Object.assign({},Object(i.b)(t,s)),E=await Object(f.a)("news",()=>((e,t)=>Object(p.c)(e,{endpoint:Object(O.a)(`${l.a.gatewayUrl}/desktopapi/v1/news`),method:b.jb.GET,data:Object.assign({},t)}))(c.apiContext(),g)),h=`error-${e}`;if(!E.ok)return D(e,n,o,E.error,h,t,s,r);var S=E.body;const T=S.account,C=S.features,R=S.posts,A=S.postIds,P=S.preferences,x=S.subreddits,w=S.subredditAboutInfo;n(v({account:T,activeCommunityIds:Object(i.a)(A,R),availableTopics:Object(_.d)(o),features:C,key:e,meta:o.meta,postIds:A,posts:R,preferences:P,subreddits:x,subredditsAboutInfo:w})),n(d.f(h))},A=(e,t)=>async(s,r,n)=>{await s(c.g());let i=r();const d=u.g;var l=e.params,b=l.topic;const p=void 0===b?d:b;var O=l.subtopic;const f=void 0===O?"":O,j=Object(_.d)(i);var h=Object(g.c)(j,p,f);const S=h.selectedTopic,T=h.selectedSubtopic;if(p!==d&&(!S||S.topicId===m.a)||""!==f&&!T)return void s(Object(c.e)(null,null));s(c.f({selectedTopic:S,selectedSubtopic:T})),i=r();const I=Object(_.j)(i),v=Object(_.k)(i),C=Object(y.d)(i,{listingKey:I}),A=i.listings.postOrder.ids[I],D=Object(y.c)(i,{listingKey:I});if(C||A&&!D&&!t)return A?s(o.l({title:E(i)})):void 0;const P=Object(_.p)(i);await Promise.all([P?s(Object(a.d)(v,S,T)):null,s(R(I,S,T))]);const x=r();return s(o.l({title:E(x)}))},D=(e,t,s,n,a,c,i,o)=>{t(C({error:n,key:e})),o&&t(d.e({id:a,kind:j.b.Error,text:Object(r.a)(s.user.language,"listings.toast.error"),buttonText:Object(r.a)(s.user.language,"listings.toast.retryButton"),buttonAction:R(e,c,i)}))}},"./src/reddit/actions/pages/news/utils.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return a}),s.d(t,"a",function(){return c}),s.d(t,"c",function(){return i});var r=s("./src/reddit/constants/news.ts"),n=s("./src/reddit/selectors/news.ts");const a=(e,t)=>{let s="";if(e&&t)s=`${t.subtopicId}`;else if(e&&!t){s=(e.subtopics||[]).map(e=>e.subtopicId).join(r.f)}return{subtopic_ids:s,limit:r.a,always_show_media:1}},c=(e,t)=>{const s=[];for(let n=0;n<e.length;n++){const a=t[e[n]];if(a&&"subreddit"===a.belongsTo.type&&!s.includes(a.belongsTo.id)&&s.push(a.belongsTo.id),s.length===r.b)break}return s},i=(e,t="",s="")=>{const r=Object(n.d)(e);let a=null,c=null;if(a=o(r,t)){const e=a.subtopics||[];c=o(e,s)}return{topic:a,subtopic:c}},o=(e,t)=>e.find(e=>e.name.toLowerCase()===t.toLowerCase())||null},"./src/reddit/actions/pages/originalContent.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return E}),s.d(t,"b",function(){return h}),s.d(t,"a",function(){return S}),s.d(t,"d",function(){return R});var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/app/strings/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/lib/makeListingKey/index.ts"),d=s("./src/reddit/actions/moderatingSubreddits.ts"),u=s("./src/reddit/actions/originalContent.ts"),l=s("./src/reddit/actions/platform.ts"),b=s("./src/reddit/actions/toaster.ts"),p=s("./src/reddit/constants/originalContent.ts"),O=s("./src/reddit/constants/page.ts"),f=s("./src/reddit/constants/parameters.ts"),m=s("./src/reddit/endpoints/page/originalContentPage.ts"),j=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),g=s("./src/reddit/helpers/timeApiRoute/index.ts"),y=s("./src/reddit/models/Toast/index.ts");const _=e=>Object(a.a)(e.user.language,"listings.originalContent.title"),E="PAGE__ORIGINAL_CONTENT_PAGE_PENDING",h="PAGE__ORIGINAL_CONTENT_PAGE_LOADED",S="PAGE__ORIGINAL_CONTENT_PAGE_FAILED",T=Object(i.a)(E),I=Object(i.a)(h),v=Object(i.a)(S),C=(e,t)=>async(s,r,n)=>{const c=r();if(c.listings.postOrder.api.pending[e])return;s(T({key:e}));const i=await Object(g.a)("originalContent",()=>Object(m.a)(n.apiContext(),t)),o=`error-${e}`;if(i.ok){s(I(Object.assign({key:e,meta:c.meta},i.body)));const a=[d.c()(s,r,n),s(u.s(t.category)),s(u.t(t.category)),s(u.p()),s(u.r(t.category))];await Promise.all(a),s(b.f(o))}else s(v(Object.assign({error:i.error,key:e},i.body))),s(b.e({id:o,kind:y.b.Error,text:Object(a.a)(c.user.language,"listings.toast.error"),buttonText:Object(a.a)(c.user.language,"listings.toast.retryButton"),buttonAction:C(e,t)}))},R=e=>async(t,s,r)=>{var a=e.params,i=a.sort;const d=void 0===i?c.X.HOT:i;var u=a.categoryName;const b=void 0===u?p.b:u,m=Object.assign({},e.queryParams,{category:b}),g=Object(o.a)(O.j,d,m),y=s(),E=y.listings.postOrder.ids[g],h=y.listings.postOrder.api.error[g],S=y.listings.postOrder.api.pending[g],T=f.s in e.queryParams&&e.queryParams[f.s].toUpperCase()||"",I=T in c.rc&&c.rc[T];if(S||E&&!h)return void(E&&t(l.l({title:_(s())})));await t(C(g,Object.assign({},n()(e.queryParams,f.j),n()(e.queryParams,f.i),{sort:d,t:Object(j.a)(d,I),category:b})));const v=s();t(l.l({title:_(v)}))}},"./src/reddit/actions/pages/partnerSubredditConnection.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return _}),s.d(t,"b",function(){return E}),s.d(t,"a",function(){return h}),s.d(t,"d",function(){return C});var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/app/strings/index.ts"),a=s("./src/lib/addQueryParams/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/lib/makePartnerSubredditConnectionPageKey/index.ts"),d=s("./src/lib/truthyString/index.ts"),u=s("./src/reddit/actions/platform.ts"),l=s("./src/reddit/actions/profile/index.ts"),b=s("./src/reddit/endpoints/user/me.ts"),p=s("./src/reddit/helpers/pageActionLoginRedirect.ts"),O=s("./src/reddit/helpers/timeApiRoute/index.ts"),f=s("./src/reddit/models/ExternalAccount/index.ts"),m=s("./src/reddit/models/User/index.ts"),j=s("./src/reddit/routes/partnerSubredditConnection/constants.ts"),g=s("./src/reddit/selectors/user.ts"),y=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const _="PARTNER_SUBREDDIT_CONNECTION__PAGE_PENDING",E="PARTNER_SUBREDDIT_CONNECTION__PAGE_LOADED",h="PARTNER_SUBREDDIT_CONNECTION__PAGE_FAILED",S=Object(i.a)(_),T=Object(i.a)(E),I=Object(i.a)(h),v=(e,t)=>Object(a.a)(`${j.a}/${e}`,t),C=e=>async(t,s,a)=>{const i=e.queryParams,j=e.params.page,_=i.to,E=i.userId;var h=i.isNsfw;const C=void 0===h?"":h;if(!E||!_||_!==f.a.Patreon)return void t(Object(r.c)("/"));await t((e=>async(t,s,r)=>{const n=s(),a=Object(o.a)(e),c=n.partnerSubredditConnection.api.page.pending[a],i=n.partnerSubredditConnection.api.page.fetched[a],d=n.partnerSubredditConnection.api.page.error[a];if(c||i&&!d)return;S({key:a});const u=[];u.push(Object(b.a)(r.apiContext()));var p=await Object(O.a)("partnerSubredditConnection",()=>Promise.all(u));const f=y(p,1)[0];if(f.ok){const e=f.body.account;t(T({account:e,key:a}));const s=[];if(e){const r=Object(m.f)(e);s.push(t(l.a())),s.push(t(l.b(r)))}await Promise.all(s)}else t(I({error:f.error,key:a}))})({to:_,userId:E}));const R=Object(g.j)(s());R?R.id===E?Object(g.h)(s())||Object(d.a)(C)?t(Object(r.c)(v(c.Nb.NsfwUser,i))):j!==c.Nb.WrongUser&&j!==c.Nb.NsfwUser?t(u.l({title:(e=>Object(n.a)(e.user.language,"title.partnerSubredditConnection"))(s())})):t(Object(r.c)(v(c.Nb.Create,i))):t(Object(r.c)(v(c.Nb.WrongUser,i))):Object(p.a)(t,s())}},"./src/reddit/actions/pages/postCreation.ts":function(e,t,s){"use strict";var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/app/strings/index.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/filterQueryParams/index.ts"),i=s("./src/lib/isFakeSubreddit/index.ts"),o=s("./src/lib/makeActionCreator/index.ts"),d=s("./src/lib/makePostCreationPageKey/index.ts"),u=s("./src/reddit/actions/externalAccount.ts"),l=s("./src/reddit/actions/governance/communityDetails.ts"),b=s("./src/reddit/actions/originalContent.ts"),p=s("./src/reddit/actions/platform.ts"),O=s("./src/reddit/actions/post.ts"),f=s("./src/reddit/actions/postCreation/general.ts"),m=s("./src/reddit/actions/profile/index.ts"),j=s("./src/reddit/actions/subreddit.ts"),g=s("./src/reddit/actions/subredditDuplicates.ts"),y=s("./src/reddit/actions/subredditSettings.ts"),_=s("./src/config.ts"),E=s("./src/lib/makeApiRequest/index.ts"),h=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),S=s("./src/reddit/featureFlags/index.ts"),T=s("./src/reddit/helpers/pageActionLoginRedirect.ts"),I=s("./src/reddit/helpers/timeApiRoute/index.ts"),v=s("./src/reddit/helpers/trackers/postComposer.ts"),C=s("./src/reddit/models/User/index.ts"),R=s("./src/reddit/selectors/postCollection.ts"),A=s("./src/reddit/selectors/posts.ts"),D=s("./src/reddit/selectors/subreddit.ts"),P=s("./src/reddit/selectors/user.ts");s.d(t,"c",function(){return w}),s.d(t,"b",function(){return N}),s.d(t,"a",function(){return k}),s.d(t,"d",function(){return G}),s.d(t,"e",function(){return F});var x=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const w="POST_CREATION__PAGE_PENDING",N="POST_CREATION__PAGE_LOADED",k="POST_CREATION__PAGE_FAILED",L=Object(o.a)(w),U=Object(o.a)(N),M=Object(o.a)(k),G=e=>async(t,s,r)=>{const n=e.collectionId,c=e.profileName,o=e.subredditName,p=Object(d.a)(e),O=s(),f=O.creations.api.page.pending[p],g=O.creations.api.page.fetched[p],T=O.creations.api.page.error[p];if(f||g&&!T)return;const v=[];if(t(L({key:p})),v.push(((e,t)=>Object(E.c)(e,{method:a.jb.GET,endpoint:Object(h.a)(`${_.a.gatewayUrl}/desktopapi/v1/submitpage`),data:{subreddit:t.subredditName,collection_id:t.collectionId}}))(r.apiContext(),{subredditName:o,collectionId:n})),o){!!s().subredditSettings.requirementsBySubreddit[o]||Object(i.a)(o)||v.push(t(Object(y.A)(o)))}v.push(t(b.p())),c&&(v.push(t(m.d(c))),v.push(t(m.b(c))));var R=await Object(I.a)("postCreation",()=>Promise.all(v));const A=x(R,1)[0];if(A.ok){const e=A.body;var w=e.posts;const r=void 0===w?{}:w;t(U(Object.assign({key:p,meta:O.meta},e,{posts:r})));const n=Object(P.j)(s());if(n&&n.hasUserProfile&&await t(m.d(Object(C.f)(n))),await t(u.o()),o&&!Object(i.a)(o)&&await t(j.n(o)),o&&S.d.spPoints(s())){const e=Object(D.z)(s(),o);e&&await t(Object(l.a)({subredditId:e}))}}else t(M({error:A.error,key:p}))},F=e=>async(t,s)=>{var i=e.params;const o=i.subredditName,d=i.profileName,u=e.queryParams,l=u.collection;await t(G({collectionId:l,profileName:d,subredditName:o}));const b=o?Object(D.v)(s(),{subredditName:o}):void 0;if(u.source_id)await t(((e,t)=>async(s,r)=>{const n=e.subredditName,a=e.profileName,c=[];let i;n?i=Object(D.z)(r(),n):a&&(i=Object(P.T)(r(),{userName:a})),i&&c.push(s(Object(g.b)(i,t))),c.push(s(Object(O.A)(t))),await Promise.all(c);const o=Object(A.e)(r(),{postId:t});s(Object(f.l)({postId:t,postTitle:o?o.title:""}))})(e.params,u.source_id));else if(l){const n=Object(R.l)(s(),{collectionId:l});b&&n&&n.subredditId===b.id||t(Object(r.c)(Object(c.a)(e.url,["collection"])))}const m=s();Object(P.F)(m)?(((e,t)=>{const s=e.platform.lastPage;t&&s&&s.meta&&s.meta.name===a.Rb.POST_CREATION&&v.t(e)})(s(),o),t(p.l({title:(e=>{const t=e.user.language,s=e.platform.currentPage;let r="Reddit";if(s&&s.urlParams.subredditName){const t=s.urlParams.subredditName,n=Object(D.v)(e,{subredditName:t});n&&(r=n.name)}return Object(n.a)(t,"title.submit",{subreddit:r})})(s())}))):Object(T.a)(t,m)}},"./src/reddit/actions/pages/postDraft.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/makePostDraftPageKey/index.ts"),a=s("./src/reddit/actions/profile/index.ts"),c=s("./src/config.ts"),i=s("./src/lib/constants/index.ts"),o=s("./src/lib/makeApiRequest/index.ts"),d=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),u=s("./src/reddit/models/RichTextJson/addRTJParam.ts"),l=s("./src/reddit/endpoints/post/draft/helpers.ts"),b=s("./src/reddit/helpers/timeApiRoute/index.ts");s.d(t,"a",function(){return p}),s.d(t,"b",function(){return j});const p="POST_DRAFT__PAGE_LOADED",O=(Object(r.a)("POST_DRAFT__PAGE_PENDING"),Object(r.a)(p)),f=Object(r.a)("POST_DRAFT__PAGE_FAILED"),m=e=>async(t,s,r)=>{const p=e.draftId,m=e.profileName,j=Object(n.a)(e),g=s(),y=g.creations.api.page.pending[j],_=g.creations.api.page.fetched[j],E=g.creations.api.page.error[j];if(y||_&&!E||!p)return;t(a.d(m));const h=await Object(b.a)("postDraft",()=>((e,t,s)=>Object(o.c)(e,{endpoint:Object(d.a)(Object(u.a)(`${c.a.gatewayUrl}/desktopapi/v1/draftpreviewpage/${s}/${t}`)),method:i.jb.GET}))(r.apiContext(),p,m));if(h.ok){const e=h.body;e.drafts[p].kind=Object(l.b)(e.drafts[p].kind),t(O(Object.assign({},e,{key:j})))}else t(f({error:h.error,key:j}))},j=e=>async(t,s,r)=>{await t(m(e.params))}},"./src/reddit/actions/pages/profileComments.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/difference.js"),n=s.n(r),a=s("./node_modules/lodash/pick.js"),c=s.n(a),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/lib/makeListingKey/index.ts"),d=s("./src/reddit/actions/externalAccount.ts"),u=s("./src/reddit/actions/moderatingSubreddits.ts"),l=s("./src/reddit/actions/pages/profileShared.ts"),b=s("./src/reddit/actions/platform.ts"),p=s("./src/reddit/actions/profile/index.ts"),O=s("./src/reddit/actions/subreddit.ts"),f=s("./src/reddit/constants/parameters.ts"),m=s("./src/reddit/contexts/PageLayer/index.tsx"),j=s("./src/config.ts"),g=s("./src/lib/addAllowQuarantinedParam/index.ts"),y=s("./src/lib/constants/index.ts"),_=s("./src/lib/makeApiRequest/index.ts"),E=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const h=(e,t,s)=>Object(_.c)(e,{data:s,endpoint:Object(g.a)(Object(E.a)(`${j.a.gatewayUrl}/desktopapi/v1/user/${t}/comments`)),method:y.jb.GET});var S=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),T=s("./src/reddit/helpers/timeApiRoute/index.ts"),I=s("./src/reddit/selectors/profile.ts"),v=s("./src/reddit/selectors/profileComments.ts");s.d(t,"f",function(){return C}),s.d(t,"e",function(){return R}),s.d(t,"d",function(){return A}),s.d(t,"h",function(){return w}),s.d(t,"c",function(){return N}),s.d(t,"b",function(){return k}),s.d(t,"a",function(){return L}),s.d(t,"g",function(){return F});const C="PAGE__PROFILE_COMMENTS_PENDING",R="PAGE__PROFILE_COMMENTS_LOADED",A="PAGE__PROFILE_COMMENTS_FAILED",D=Object(i.a)(C),P=Object(i.a)(R),x=Object(i.a)(A),w=e=>async(t,s,r)=>{const n=e.queryParams,a=e.params;var i=Object(l.b)(n);const m=i.sort,j=i.t,g=a.profileName,y=Object(o.a)(`u_${g}`,m,e.queryParams);const _=s().profileCommentsPage,E=_.commentIds[y],v=_.api.error[y],C=_.api.pending[y];if(await t(p.d(g)),C||E&&!v){if(E){const e=Object(I.m)(s(),{profileName:g});t(b.l({title:e}))}return}const R=Object.assign({},c()(e.queryParams,[...f.j,f.f]),{sort:m,t:Object(S.a)(m,j)});t(D({key:y}));const A=await Object(T.a)("profileComments",()=>h(r.apiContext(),g,R));if(!A.ok)return t(x({account:A.body.data?A.body.data.account:null,error:A.body.reason?{type:A.body.reason}:A.error,key:y})),void t(b.m(A.status));const w=A.body;t(P(Object.assign({key:y,meta:s().meta},w))),await Promise.all([t(Object(l.c)(g)),t(Object(O.q)()),t(Object(u.b)()),t(d.o(g))])},N="PROFILE_COMMENTS__MORE_ITEMS_PENDING",k="PROFILE_COMMENTS__MORE_ITEMS_LOADED",L="PROFILE_COMMENTS__MORE_ITEMS_FAILED",U=Object(i.a)(N),M=Object(i.a)(k),G=Object(i.a)(L),F=()=>async(e,t,{apiContext:s})=>{const r=t(),a=r.platform.currentPage;if(!a||!a.routeMatch)return;var i=a.routeMatch.match;const d=i.queryParams,u=i.params;var b=Object(l.b)(d);const p=b.sort,O=b.t,j=u.profileName,g=Object(o.a)(`u_${j}`,p,d),y=Object(v.d)(r,{listingKey:g});if(!y)return;const _=Object(v.b)(r,{listingKey:g}),E=Object(v.c)(r,{listingKey:g}),S=E&&E[y.token];if(_||S)return;e(U({key:g,fetchedToken:y.token}));const T=await h(s(),j,Object.assign({after:y.token,dist:y.dist,sort:p,t:O},c()(d,f.j),{layout:Object(m.O)(r,{}).toLowerCase()}));if(T.ok){const t=Object(v.f)(r,{listingKey:g}),s=Object.assign({},T.body,{commentIds:n()(T.body.commentIds,t)});e(M(Object.assign({fetchedToken:y.token,key:g,meta:r.meta},s)))}else e(G({account:T.body.data?T.body.data.account:null,error:T.error,fetchedToken:y.token,key:g}))}},"./src/reddit/actions/pages/profileModSettings.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return d}),s.d(t,"b",function(){return l});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/preferences.ts"),a=s("./src/reddit/actions/profile/index.ts"),c=s("./src/reddit/helpers/pageActionLoginRedirect.ts"),i=s("./src/reddit/models/User/index.ts"),o=s("./src/reddit/selectors/user.ts");const d="PAGE__PROFILE_MOD_SETTINGS_LOADED",u=Object(r.a)(d),l=e=>async(t,s)=>{const r=[t(n.w()),t(Object(a.d)(e.params.profileName))];await Promise.all(r);const d=Object(o.j)(s());d?(await t(Object(a.b)(Object(i.f)(d))),t(u())):Object(c.a)(t,s())}},"./src/reddit/actions/pages/profileOverview.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return T}),s.d(t,"e",function(){return I}),s.d(t,"d",function(){return v}),s.d(t,"c",function(){return C}),s.d(t,"b",function(){return R}),s.d(t,"a",function(){return A}),s.d(t,"g",function(){return L});var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/reddit/actions/moderatingSubreddits.ts"),c=s("./src/reddit/actions/pages/profileShared.ts"),i=s("./src/reddit/actions/subreddit.ts"),o=s("./src/reddit/endpoints/page/profileOverviewPage.ts"),d=s("./src/lib/constants/index.ts"),u=s("./src/reddit/constants/postLayout.ts"),l=s("./src/reddit/constants/parameters.ts"),b=s("./src/reddit/contexts/PageLayer/index.tsx"),p=s("./src/reddit/selectors/listings.ts"),O=s("./src/reddit/selectors/profile.ts"),f=s("./src/reddit/selectors/profileOverviewChronoItems.ts"),m=s("./src/lib/makeActionCreator/index.ts"),j=s("./src/reddit/actions/externalAccount.ts"),g=s("./src/reddit/actions/pinnedPost.ts"),y=s("./src/reddit/actions/platform.ts"),_=s("./src/reddit/actions/profile/index.ts"),E=s("./src/reddit/actions/trophyCase.ts"),h=s("./src/reddit/helpers/makeProfileListingKey/index.ts"),S=s("./src/reddit/helpers/timeApiRoute/index.ts");const T="PAGE__PROFILE_OVERVIEW_CONVERSATIONS_PENDING",I="PAGE__PROFILE_OVERVIEW_CONVERSATIONS_LOADED",v="PAGE__PROFILE_OVERVIEW_CONVERSATIONS_FAILED",C="PAGE__PROFILE_OVERVIEW_CHRONO_PENDING",R="PAGE__PROFILE_OVERVIEW_CHRONO_LOADED",A="PAGE__PROFILE_OVERVIEW_CHRONO_FAILED",D=Object(m.a)(T),P=Object(m.a)(I),x=Object(m.a)(v),w=Object(m.a)(C),N=Object(m.a)(R),k=Object(m.a)(A),L=e=>async(t,s,r)=>{const m=e.queryParams,T=e.params;var I=Object(c.a)(s(),m);const v=I.sort,C=I.t,R=T.profileName,A=u.d[Object(b.O)(s(),{})],L=R.toLowerCase(),M=Object.assign({},n()(e.queryParams,l.j),{sort:v,layout:A,t:C});if(await t(_.d(L)),A===u.d[u.f.Compact]){const r=Object(h.a)(L,d.sb,v,e.queryParams);if(s().profileOverviewPage.chrono.ids[r])return;await t(((e,t,s,r)=>async(r,n,a)=>{const c=n(),i=!!Object(f.f)(c,{listingKey:e}).length,d=!!Object(f.a)(c,{listingKey:e});if(Object(f.b)(c,{listingKey:e})||i&&!d)return;r(w({key:e}));const u=await Object(S.a)("profile",()=>Object(o.a)(a.apiContext(),t,s)),l=u.body,b=l.pinned;if(u.ok){r(N(Object.assign({key:e,meta:c.meta},l)));const s=Object(O.j)(c,t);r(Object(g.h)({profileId:s,pinned:b}))}else r(k({account:u.body.data?u.body.data.account:null,error:u.body.reason?{type:u.body.reason}:u.error,key:e})),r(Object(y.m)(u.status))})(r,L,M))}else{const r=Object(h.a)(L,d.tb,v,e.queryParams);if(s().listings.postOrder.ids[r]&&!s().listings.postOrder.api.error[r])return;await t(((e,t,s,r)=>async(r,n,a)=>{const c=n(),i=!!c.listings.postOrder.ids[e],d=!!Object(p.c)(c,{listingKey:e});if(Object(p.d)(c,{listingKey:e})||i&&!d)return;r(D({key:e}));const u=await Object(S.a)("profile",()=>Object(o.b)(a.apiContext(),t,s)),l=u.body,b=l.pinned,f=l.postIds;if(u.ok){r(P(Object.assign({key:e,meta:c.meta,profileName:t},l,{postIds:f})));const s=Object(O.j)(c,t);r(Object(g.h)({profileId:s,pinned:b}))}else r(x({account:u.body.data?u.body.data.account:null,error:u.body.reason?{type:u.body.reason}:u.error,key:e})),r(Object(y.m)(u.status))})(r,L,M))}await t(Object(i.q)()),await t(Object(a.b)());const G=s();if(!G.platform.currentPage)return;if(200!==G.platform.currentPage.status)return;const F=Object(O.j)(s(),L);await t(E.b(L,F)),t(y.l({title:U(s(),R)})),await t(_.b(L)),await t(j.o(R))},U=(e,t)=>Object(O.m)(e,{profileName:t})},"./src/reddit/actions/pages/profilePosts.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/lib/makeListingKey/index.ts"),i=s("./src/reddit/actions/externalAccount.ts"),o=s("./src/reddit/actions/moderatingSubreddits.ts"),d=s("./src/reddit/actions/pages/profileShared.ts"),u=s("./src/reddit/actions/pinnedPost.ts"),l=s("./src/reddit/actions/platform.ts"),b=s("./src/reddit/actions/profile/index.ts"),p=s("./src/reddit/actions/subreddit.ts"),O=s("./src/reddit/constants/parameters.ts"),f=s("./src/reddit/contexts/PageLayer/index.tsx"),m=s("./src/config.ts"),j=s("./src/lib/addAllowQuarantinedParam/index.ts"),g=s("./src/lib/constants/index.ts"),y=s("./src/lib/makeApiRequest/index.ts"),_=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const E=(e,t,s)=>Object(y.c)(e,{data:s,endpoint:Object(j.a)(Object(_.a)(`${m.a.gatewayUrl}/desktopapi/v1/user/${t}/posts`)),method:g.jb.GET}).then(e=>"pinned"in e.body?e:"postIds"in e.body?Object.assign({},e,{body:Object.assign({},e.body,{pinned:e.body.postIds.filter(t=>e.body.posts[t]&&e.body.posts[t].isPinned).reverse()})}):e);var h=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),S=s("./src/reddit/helpers/timeApiRoute/index.ts"),T=s("./src/reddit/selectors/listings.ts"),I=s("./src/reddit/selectors/profile.ts");s.d(t,"f",function(){return v}),s.d(t,"e",function(){return C}),s.d(t,"d",function(){return R}),s.d(t,"h",function(){return x}),s.d(t,"c",function(){return w}),s.d(t,"b",function(){return N}),s.d(t,"a",function(){return k}),s.d(t,"g",function(){return G});const v="PAGE__PROFILE_POSTS_PENDING",C="PAGE__PROFILE_POSTS_LOADED",R="PAGE__PROFILE_POSTS_FAILED",A=Object(a.a)(v),D=Object(a.a)(C),P=Object(a.a)(R),x=e=>async(t,s,r)=>{const a=e.queryParams,m=e.params;var j=Object(d.b)(a);const g=j.sort,y=j.t,_=m.profileName,v=Object(c.a)(`u_${_}`,g,a),C=s(),R=C.listings.postOrder.ids[v],x=Object(T.c)(C,{listingKey:v}),w=Object(T.d)(C,{listingKey:v});if(await t(b.d(_)),w||R&&!x){if(R){const e=Object(I.m)(s(),{profileName:_});t(l.l({title:e}))}return}const N=Object.assign({},n()(e.queryParams,[...O.j,...O.i,O.f]),{layout:Object(f.O)(C,{}).toLowerCase(),sort:g,t:Object(h.a)(g,y)});t(A({key:v}));const k=await Object(S.a)("profilePosts",()=>E(r.apiContext(),_,N));if(!k.ok)return t(P({account:k.body.data?k.body.data.account:null,error:k.body.reason?{type:k.body.reason}:k.error,key:v})),void t(l.m(k.status));const L=k.body;t(D(Object.assign({key:v,meta:s().meta},L)));const U=Object(I.j)(s(),_),M=L.pinned;t(Object(u.h)({profileId:U,pinned:M})),await Promise.all([t(Object(d.c)(_)),t(Object(p.q)()),t(Object(o.b)()),t(i.o(_))])},w="PROFILE_POSTS__MORE_POSTS_PENDING",N="PROFILE_POSTS__MORE_POSTS_LOADED",k="PROFILE_POSTS__MORE_POSTS_FAILED",L=Object(a.a)(w),U=Object(a.a)(N),M=Object(a.a)(k),G=()=>async(e,t,{apiContext:s})=>{const r=t(),a=r.platform.currentPage;if(!a||!a.routeMatch)return;var i=a.routeMatch.match;const o=i.queryParams,u=i.params;var l=Object(d.b)(o);const b=l.sort,p=l.t,m=u.profileName,j=Object(c.a)(`u_${m}`,b,o),g=Object(T.g)(r,{listingKey:j});if(!g)return;const y=Object(T.d)(r,{listingKey:j}),_=Object(T.e)(r,{listingKey:j,token:g.token});if(y||_)return;e(L({key:j,fetchedToken:g.token}));const h=Object.assign({after:g.token,dist:g.dist,sort:b,t:p},n()(o,O.j),{layout:Object(f.O)(r,{}).toLowerCase()}),S=await E(s(),m,h),I=r.listings.postOrder.ids[j],v=S.body.postIds||[],C=Object.assign({},S.body,{postIds:v.filter(e=>!I||!I.includes(e))});S.ok?(e(U(Object.assign({fetchedToken:g.token,key:j,meta:r.meta},C))),await e(Object(d.c)(m))):e(M({account:S.body.data?S.body.data.account:null,error:S.error,fetchedToken:g.token,key:j}))}},"./src/reddit/actions/pages/profilePrivate/constants.ts":function(e,t,s){"use strict";s.d(t,"h",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"i",function(){return c}),s.d(t,"a",function(){return i}),s.d(t,"f",function(){return o}),s.d(t,"e",function(){return d}),s.d(t,"g",function(){return u}),s.d(t,"d",function(){return l});const r=25,n="PAGE__PROFILE_PRIVATE_PENDING",a="PAGE__PROFILE_PRIVATE_MIXED_LOADED",c="PAGE__PROFILE_PRIVATE_POSTS_LOADED",i="PAGE__PROFILE_PRIVATE_FAILED",o="MORE__PROFILE_PRIVATE_PENDING",d="MORE__PROFILE_PRIVATE_MIXED_LOADED",u="MORE__PROFILE_PRIVATE_POSTS_LOADED",l="MORE__PROFILE_PRIVATE_FAILED"},"./src/reddit/actions/pages/profileShared.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return p}),s.d(t,"a",function(){return O}),s.d(t,"c",function(){return f}),s.d(t,"d",function(){return m});var r=s("./node_modules/lodash/defaults.js"),n=s.n(r),a=s("./node_modules/lodash/pick.js"),c=s.n(a),i=s("./src/reddit/actions/platform.ts"),o=s("./src/reddit/actions/profile/index.ts"),d=s("./src/reddit/actions/trophyCase.ts"),u=s("./src/reddit/selectors/profile.ts"),l=s("./src/lib/constants/index.ts");const b={sort:l.Jb,t:l.Kb};function p(e){return n()(c()(e,["t","sort"]),b)}function O(e,t){return p(t)}const f=e=>async(t,s,r)=>{await Promise.all([t(m(e)),t(j(e))])},m=e=>async(t,s,r)=>{const n=Object(u.j)(s(),e);await t(d.b(e,n))},j=e=>async(t,s,r)=>{const n=Object(u.m)(s(),{profileName:e});t(i.l({title:n})),await t(o.b(e))}},"./src/reddit/actions/pages/shared.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return d}),s.d(t,"a",function(){return u});var r=s("./src/app/strings/index.ts"),n=s("./src/reddit/helpers/getPostFromRouteMatch/index.ts"),a=s("./src/reddit/helpers/routeKey/index.ts"),c=s("./src/reddit/helpers/trackers/screenview.ts"),i=s("./src/telemetry/index.ts"),o=s("./src/telemetry/models/Timer.ts");const d=(e,t)=>{const s=e.user.language;return Object(r.a)(s,`title.${t}`)},u=()=>async(e,t)=>{const s=t(),r=s.platform.currentPage;if(!r)return;const d=r.routeMatch,u=Object(n.a)(s),l=Object(a.c)(d,s,u);l&&i.c.has(l)&&Object(c.f)(d,s,o.TimerType.InApp,i.c.end(l))}},"./src/reddit/actions/pages/subreddit.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return W}),s.d(t,"c",function(){return Y}),s.d(t,"b",function(){return z}),s.d(t,"a",function(){return Q}),s.d(t,"f",function(){return X}),s.d(t,"e",function(){return ee}),s.d(t,"g",function(){return se});var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./node_modules/lodash/some.js"),c=s.n(a),i=s("./src/app/strings/index.ts"),o=s("./src/lib/constants/index.ts"),d=s("./src/lib/isAdHocMultireddit/index.ts"),u=s("./src/lib/isFakeSubreddit/index.ts"),l=s("./src/lib/makeActionCreator/index.ts"),b=s("./src/lib/makeApiRequest/index.ts"),p=s("./src/lib/makeListingKey/index.ts"),O=s("./src/reddit/actions/ad.ts"),f=s("./src/reddit/actions/badge.ts"),m=s("./src/reddit/actions/category.ts"),j=s("./src/reddit/actions/contentGate.ts"),g=s("./src/reddit/actions/economics/tips/async.ts"),y=s("./src/reddit/actions/externalAccount.ts"),_=s("./src/reddit/actions/governance/async.ts"),E=s("./src/reddit/actions/governance/communityDetails.ts"),h=s("./src/reddit/actions/governance/releaseNotes.ts"),S=s("./src/reddit/actions/moderatingSubreddits.ts"),T=s("./src/reddit/actions/platform.ts"),I=s("./src/reddit/actions/preferences.ts"),v=s("./src/reddit/actions/structuredStyles.ts"),C=s("./src/reddit/actions/subreddit.ts"),R=s("./src/reddit/actions/subredditTopContent.ts"),A=s("./src/reddit/actions/toaster.ts"),D=s("./src/reddit/constants/page.ts"),P=s("./src/reddit/constants/parameters.ts"),x=s("./src/reddit/constants/postLayout.ts"),w=s("./src/reddit/contexts/PageLayer/index.tsx"),N=s("./src/reddit/endpoints/governance/posts.ts"),k=s("./src/reddit/endpoints/page/subredditPage.ts"),L=s("./src/reddit/featureFlags/index.ts"),U=s("./src/reddit/helpers/getTimeSortForListing/index.ts"),M=s("./src/reddit/helpers/timeApiRoute/index.ts"),G=s("./src/reddit/models/ModeratingSubreddits/index.ts"),F=s("./src/reddit/models/Toast/index.ts"),B=s("./src/reddit/reducers/sidebarPromotedPosts/models/index.ts"),$=s("./src/reddit/selectors/experiments/exploreV2.ts"),q=s("./src/reddit/selectors/moderatorPermissions.ts"),V=s("./src/reddit/selectors/multireddit.ts"),H=s("./src/reddit/selectors/subreddit.ts"),K=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const W=(e,t)=>async s=>{if(!e.ok&&e.body){const r=e.body.data?e.body.data.account:void 0,n=e.body.data?e.body.data.features:void 0,a=t?t.toLowerCase():"";if(404===e.status)if(e.body.reason===b.a.NotFoundSubreddit)s(j.i({account:r,features:n,subredditName:a}));else if(e.body.reason===b.a.BannedSubreddit){const t=e.body.data?e.body.data.ban_message:void 0;s(j.h({banMessage:t,account:r,features:n,subredditName:a}))}if(403===e.status)if(e.body.reason===b.a.GoldSubreddit)s(j.j({account:r,features:n,subredditName:a}));else if(e.body.reason===b.a.PrivateSubreddit)s(j.k({account:r,features:n,subredditDescription:e.body.data.description,subredditName:a}));else if(e.body.reason===b.a.QuarantinedSubreddit){const t=!e.body.data||e.body.data.quarantine_requires_email_optin;s(j.l({account:r,features:n,subredditName:a,quarantineRequiresEmail:t,quarantineMessage:e.body.data.quarantineMessage,quarantineMessageHtml:e.body.data.quarantineMessageHtml}))}s(I.v({nightmode:!!r&&r.nightmode}))}},Y="PAGE__SUBREDDIT_PENDING",z="PAGE__SUBREDDIT_LOADED",Q="PAGE__SUBREDDIT_FAILED",X=Object(l.a)(Y),J=Object(l.a)(z),Z=Object(l.a)(Q),ee=(e,t,s,r)=>async(n,a,d)=>{const l=a();if(l.listings.postOrder.api.pending[e])return;const b=t!==D.e.All&&t!==D.e.Popular||!l.posts.recent.length?s:Object.assign({},s,{recentPostIds:l.posts.recent});b.layout=x.d[Object(w.O)(l,{})],n(X({key:e}));const p=await Object(M.a)("subreddit",()=>Object(k.a)(d.apiContext(),t,b));n(T.m(p.status));const j=`error-${e}`,E=p.body,v=Object(u.a)(t)||c()(E.subreddits,e=>e.name.toLowerCase()===t.toLowerCase());if(p.ok&&v){let s;const c=E.postIds.filter(e=>!!E.posts[e].isMeta);if(c.length){const e=Object.keys(E.subreddits).reduce((e,s)=>{const r=E.subreddits[s];return r.name.toLowerCase()===t.toLowerCase()?r.id:e},null);if(e){const t=await Object(N.a)(d.apiContext(),e,c);t.ok&&(s=t.body)}}if(n(J(Object.assign({key:e,meta:l.meta,governance:s},E))),!Object(u.a)(t)){const e=Object(H.z)(a(),t);!!Object(H.F)(l,{subredditId:e})||await C.n(t)(n,a,d)}const i=[S.c()(n,a,d)];if(t===D.e.Popular&&Object($.a)(l)&&i.push(n(m.g())),await Promise.all(i),r&&n(A.f(j)),n(Object(O.g)(B.a.SUBREDDIT)),n(Object(y.p)()),L.d.spPoints(a())||L.d.spSupport(a())||L.d.spLoadtest(a())){const e=Object(H.z)(a(),t);if(e&&n(Object(h.a)({subredditId:e})),e){const t=E.postIds.map(e=>{return E.posts[e].authorId}),s=E.postIds;var R=await Promise.all([Object(_.a)(),Object(g.a)()]),P=K(R,2);const r=P[0],c=P[1],i=[n(Object(f.l)({subredditId:e})),n(r({subredditId:e,userIds:t}))];(L.d.spSupport(a())||L.d.spLoadtest(a()))&&i.push(n(c({subredditId:e,contentIds:s}))),await Promise.all(i)}}}else{if(403===p.status||404===p.status)return void n(W(p,t));n(Z(Object.assign({error:!p.ok&&p.error||{type:o.I.NOT_FOUND_ERROR},key:e},E)));const a=p.body.data?p.body.data.account:void 0;n(I.v({nightmode:!!a&&a.nightmode})),r&&n(A.e({id:j,kind:F.b.Error,text:Object(i.a)(l.user.language,"listings.toast.error"),buttonText:Object(i.a)(l.user.language,"listings.toast.retryButton"),buttonAction:ee(e,t,s,r)}))}},te=(e,t)=>{if(Object(u.a)(t)&&Object(d.a)(t)){return Object(V.a)(e,{listingName:t}).displayText}return Object(H.I)(e,{subredditName:t})},se=(e,t)=>async(s,r,a)=>{const c=e.params.subredditName,i=e.queryParams.styling,d=Object(u.a)(c)?o.X.HOT:void 0;var l=e.params.sort;const b=void 0===l?d:l,f=r(),m=Object(p.a)(c,b,e.queryParams),j=f.listings.postOrder.api.error[m],g=f.listings.postOrder.api.pending[m];let _=!!f.listings.postOrder.ids[m];const S=f.listings.postOrder.listingSort[m];S&&S.hasChanged&&(_=!1);let I=Object(H.z)(f,c);const C=(e,t)=>"true"===i&&((e,t)=>Object(q.a)(G.b.config)(e,{subredditId:t})||Object(q.a)(G.b.flair)(e,{subredditId:t}))(e,t),A=P.s in e.queryParams&&e.queryParams[P.s].toUpperCase()||"",D=A in o.rc&&o.rc[A];if(g||_&&!j&&!t){if(C(f,I)&&s(v.t(I)),_){const e=te(r(),c);s(T.l({title:e})),window.addEventListener("load",()=>{s(Object(y.p)())}),f.sidebarPromotedPosts.firstFetch||window.addEventListener("load",()=>{s(Object(O.g)(B.a.SUBREDDIT))}),I&&(L.d.spPoints(r())||L.d.spLoadtest(r()))&&window.addEventListener("load",()=>{s(Object(h.a)({subredditId:I}))})}return}const x=Object.assign({},n()(e.queryParams,[...P.j,...P.i,P.f]),{sort:b,t:Object(U.a)(b,D)});await s(ee(m,c,x,!0)),I=I||Object(H.z)(r(),c);const w=Object(H.s)(r(),{subredditName:c}),N=!!w&&w.userIsSubscriber;if(Object(u.a)(c)||void 0!==b||N||await s(R.d(c)),L.d.spPoints(f)||L.d.spLoadtest(f)){const e=Object(H.z)(r(),c);e&&await s(Object(E.a)({subredditId:e}))}C(r(),I)&&s(v.t(I));const k=te(r(),c);s(T.l({title:k}))}},"./src/reddit/actions/pages/subredditWiki/constants.ts":function(e,t,s){"use strict";s.d(t,"g",function(){return r}),s.d(t,"f",function(){return n}),s.d(t,"e",function(){return a}),s.d(t,"c",function(){return c}),s.d(t,"d",function(){return i}),s.d(t,"b",function(){return o}),s.d(t,"a",function(){return d}),s.d(t,"h",function(){return u});const r="PAGE__SUBREDDIT_WIKI_PAGE_PENDING",n="PAGE__SUBREDDIT_WIKI_PAGE_LOADED",a="PAGE__SUBREDDIT_WIKI_PAGE_FAILED",c="index",i="pages",o="config/automoderator",d="reddit.com",u=["config/description","config/sidebar","config/stylesheet","config/submit_text"]},"./src/reddit/actions/pinnedPost.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return f}),s.d(t,"h",function(){return m}),s.d(t,"d",function(){return j}),s.d(t,"g",function(){return g}),s.d(t,"c",function(){return E}),s.d(t,"f",function(){return h}),s.d(t,"b",function(){return I}),s.d(t,"e",function(){return v}),s.d(t,"i",function(){return w});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/reddit/actions/modal.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/reddit/constants/modals.ts"),d=s("./src/reddit/endpoints/post/index.tsx"),u=s("./src/reddit/models/Toast/index.ts"),l=s("./src/reddit/selectors/posts.ts"),b=s("./src/reddit/selectors/profile.ts"),p=s("./src/reddit/selectors/user.ts"),O=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const f="PINNEDPOST__PINNED_POSTS_LOADED",m=Object(a.a)(f),j="PINNEDPOST__PIN_POST_SUCCESS",g="PINNEDPOST__UNPIN_POST_SUCCESS",y=Object(a.a)(j),_=Object(a.a)(g),E="PINNEDPOST__PIN_POST_PENDING",h="PINNEDPOST__UNPIN_POST_PENDING",S=Object(a.a)(E),T=Object(a.a)(h),I="PINNEDPOST__PIN_POST_FAILURE",v="PINNEDPOST__UNPIN_POST_FAILURE",C=Object(a.a)(I),R=Object(a.a)(v),A=(e,t)=>Object(i.e)({buttonAction:w(t,!0),buttonText:Object(r.a)(e,"posts.postPinnedUndo"),kind:u.b.SuccessMod,text:Object(r.a)(e,"posts.postPinned")}),D=(e,t,s)=>Object(i.e)({buttonAction:w(t,!0),buttonText:Object(r.a)(e,"posts.postUnpinnedUndo"),kind:u.b.SuccessMod,text:Object(r.a)(e,s?"posts.postUnpinnedReloadPage":"posts.postUnpinned")}),P=e=>Object(i.e)({kind:u.b.Error,text:Object(r.a)(e,"posts.couldNotPinPost")}),x=e=>Object(i.e)({kind:u.b.Error,text:Object(r.a)(e,"posts.couldNotUnpinPost")}),w=(e,t=!1)=>async(s,a,{apiContext:f})=>{const m=a(),j=m.posts.models[e];if(!j)return;const g=!Object(l.r)(m,{postId:e}),E=Object(p.M)(m);if(g&&j.isRemoved)return s((e=>Object(i.e)({kind:u.b.Error,text:Object(r.a)(e,"posts.couldNotPinPostRemovedPost")}))(E));const h=j.author,I=Object(b.j)(m,h);var v=O(g?[S,y,C,A,P]:[T,_,R,D,x],5);const w=v[0],N=v[1],k=v[2],L=v[3],U=v[4];if(g){if(Object(l.K)(m,{profileName:h}).length>=n.db)return void s(Object(c.i)(o.a.PINNED_POSTS_LIMIT_REACHED))}const M=Object(l.l)(m,e,h),G=!g&&M;s(w({postId:e,profileId:I})),(await Object(d.q)(f(),e,g,!0)).ok?(s(N({postId:e,profileId:I})),t||s(L(E,e,G))):(s(k({postId:e,profileId:I})),s(U(E)))}},"./src/reddit/actions/platform.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return p}),s.d(t,"b",function(){return O}),s.d(t,"d",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"e",function(){return j}),s.d(t,"f",function(){return g}),s.d(t,"h",function(){return y}),s.d(t,"i",function(){return _}),s.d(t,"m",function(){return S}),s.d(t,"l",function(){return T}),s.d(t,"k",function(){return I}),s.d(t,"j",function(){return v}),s.d(t,"g",function(){return C});var r=s("./src/lib/areUrlsEqual/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/logs/errors.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/lib/matchRoute/index.ts"),o=s("./src/reddit/actions/monthsToMinutes.ts"),d=s("./src/reddit/constants/listings.ts"),u=s("./src/reddit/helpers/routeKey/index.ts"),l=s("./src/reddit/selectors/experiments/m2mV1-5.ts"),b=s("./src/reddit/selectors/monthsToMinutes.ts");const p="PLATFORM__HISTORY_LOCATION_SET",O="PLATFORM__INITIAL_REFERRER_SET",f="PLATFORM__NAVIGATION_CONFIRMATION_REQUESTED",m="PLATFORM__NAVIGATION_CONFIRMATION_DISCARDED",j="PLATFORM__PAGE_META_SET",g="PLATFORM__PAGE_STATUS_SET",y=e=>async(t,s,r)=>{const n=s().platform.currentPage;if(!n)return;const a=Object(i.a)(n.url,e);a&&a.route.action(a.match)(t,s,r)},_=(e,t,s)=>async(a,c,i)=>{const p=c().platform.currentPage;(!s||s.route.chunk===n.r.SUBREDDIT&&d.a.has(s.match.params.subredditName.toLowerCase()))&&window.location.replace(`https://www.reddit.com${e.pathname}${e.search}`);const O=s?Object(u.d)(s,c()):null;const f=c().user;if(a(E({action:t,listingKey:O,location:e,routeMatch:s,user:f})),Object(l.c)(c())&&Object(b.m)(c())&&!Object(b.b)(c())&&a(Object(o.s)()),(!p||!Object(r.a)(p.url,e))&&s){const e=s.match;await s.route.action(e)(a,c,i)}},E=Object(c.a)(p),h=(Object(c.a)(O),Object(c.a)(j)),S=Object(c.a)(g),T=e=>async(t,s,r)=>{const n=s().platform.currentPage;if(!n)return;const a=n.key;await t(h({key:a,meta:e}))},I=Object(c.a)(f),v=Object(c.a)(m),C=()=>async(e,t,s)=>{if(window!==window.parent){Object(a.b)(s.apiContext(),{extra:{errorType:n.s.NOT_ALLOWED_ACCESS,value:"Page was unexpectedly loaded inside iframe"}});try{window.top.location.href=window.location.href}catch(r){}}}},"./src/reddit/actions/polls.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});var r=s("./src/lib/makeActionCreator/index.ts");const n="POLLS__POLL_CREATION_UPDATED",a=Object(r.a)(n)},"./src/reddit/actions/post.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./node_modules/js-cookie/src/js.cookie.js"),a=s.n(n),c=s("./src/app/strings/index.ts"),i=s("./src/lib/addQueryParams/index.ts"),o=s("./src/lib/copyToClipboard/index.ts"),d=s("./src/lib/makeActionCreator/index.ts"),u=s("./src/reddit/actions/platform.ts"),l=s("./src/reddit/actions/video.ts"),b=s("./src/reddit/actions/vote.ts"),p=s("./src/reddit/constants/cookie.ts"),O=s("./src/reddit/constants/history.ts"),f=s("./src/reddit/constants/posts.ts"),m=s("./src/reddit/helpers/overlay/index.ts"),j=s("./src/reddit/models/Media/index.ts"),g=s("./src/reddit/endpoints/post/index.tsx"),y=s("./src/lib/makeGqlRequest/index.ts"),_=s("./src/graphql/operations/RichTextPostContent.json");var E=s("./src/lib/constants/index.ts"),h=s("./src/lib/makeListingKey/index.ts"),S=s("./node_modules/react-router-redux/es/index.js"),T=s("./src/reddit/actions/modal.ts"),I=s("./src/reddit/actions/toaster.ts"),v=s("./src/reddit/constants/adEvents.ts"),C=s("./src/reddit/constants/modals.ts"),R=s("./src/reddit/endpoints/page/commentsPage.ts"),A=s("./src/reddit/helpers/pixels.ts"),D=s("./src/reddit/helpers/trackers/post.ts"),P=s("./src/reddit/models/Flair/index.ts"),x=s("./src/reddit/models/Toast/index.ts"),w=s("./src/reddit/models/User/index.ts"),N=s("./src/reddit/models/Vote/index.ts"),k=s("./src/reddit/selectors/platform.ts"),L=s("./src/reddit/selectors/user.ts"),U=s("./src/reddit/constants/viewabilityEvents.ts"),M=s("./src/reddit/selectors/posts.ts"),G=s("./src/telemetry/index.ts");s.d(t,"c",function(){return F}),s.d(t,"d",function(){return B}),s.d(t,"f",function(){return $}),s.d(t,"e",function(){return q}),s.d(t,"o",function(){return V}),s.d(t,"i",function(){return K}),s.d(t,"B",function(){return Y}),s.d(t,"G",function(){return z}),s.d(t,"D",function(){return Q}),s.d(t,"J",function(){return J}),s.d(t,"n",function(){return Z}),s.d(t,"x",function(){return te}),s.d(t,"y",function(){return se}),s.d(t,"a",function(){return re}),s.d(t,"b",function(){return ne}),s.d(t,"z",function(){return ie}),s.d(t,"k",function(){return oe}),s.d(t,"C",function(){return de}),s.d(t,"w",function(){return ue}),s.d(t,"s",function(){return le}),s.d(t,"F",function(){return be}),s.d(t,"u",function(){return pe}),s.d(t,"t",function(){return Oe}),s.d(t,"m",function(){return fe}),s.d(t,"H",function(){return me}),s.d(t,"I",function(){return je}),s.d(t,"r",function(){return ye}),s.d(t,"g",function(){return _e}),s.d(t,"l",function(){return he}),s.d(t,"j",function(){return Se}),s.d(t,"E",function(){return Te}),s.d(t,"A",function(){return ve}),s.d(t,"q",function(){return Ce}),s.d(t,"v",function(){return Re}),s.d(t,"h",function(){return Ae}),s.d(t,"p",function(){return Pe});const F="POST__EXPANDED_TOGGLED",B="POST__FOCUS_CHANGED",$="POSTS__MUTATED",q="POSTS_LOADED",V=Object(d.a)(F),H=(Object(d.a)(B),Object(d.a)(q)),K="POST__STICKY_POST_SUCCESS",W=Object(d.a)(K),Y=Object(d.a)($),z=(e,t,s,r)=>async(n,a,{apiContext:i})=>{const o=a().posts.models[e];if(!o)return;if(!Object(L.F)(a()))return n(Object(T.l)({actionSource:T.a.Hide,redirectUrl:o.permalink})),void n(Object(T.i)(C.a.REGISTER_MODAL_ID));n(Y({[e]:{hidden:t}}));const d=a(),u=Object(L.M)(d);let l;if((l=t?await Object(g.g)(i(),e):await Object(g.r)(i(),e)).ok){if(r){const r=t?Object(c.a)(u,"posts.hiddenSuccess"):Object(c.a)(u,"posts.unhiddenSuccess"),a=Object(I.d)(r,x.b.Undo,Object(c.a)(u,"posts.hiddenUndo"),z(e,!t,s,!1));n(Object(I.e)(a))}}else if(n(Y({[e]:{hidden:!t}})),r){const e=Object(I.d)(Object(c.a)(u,"error.generic"),x.b.Error);n(Object(I.e)(e))}},Q=e=>async(t,s,{apiContext:r})=>{const n=s().posts.models[e];if(!n)return;if(!Object(L.F)(s()))return t(Object(T.i)(C.a.REGISTER_MODAL_ID)),void t(Object(T.l)({actionSource:T.a.Save,redirectUrl:n.permalink}));const a=n.saved?g.v:g.n;if(t(Y({[e]:{saved:!n.saved}})),(await a(r(),e)).ok){const r=Object(L.M)(s()),a=n.saved?Object(c.a)(r,"posts.unsavedSuccess"):Object(c.a)(r,"posts.savedSuccess"),i=Object(I.d)(a,x.b.Undo,Object(c.a)(r,"posts.savedUndo"),Q(e));t(Object(I.e)(i))}else t(Y({[e]:{saved:n.saved}}))},X=(e,t)=>t().posts.models[e],J=Object(b.b)(X,N.a.upvoted),Z=Object(b.b)(X,N.a.downvoted),ee=e=>`viewing-${e}`,te=e=>async(t,s)=>{const r=s();D.g(r,e),G.c.start(ee(e))},se=(e,t)=>async(s,n)=>{const a=n(),c=ee(e);if(G.c.has(c)){const s=G.c.end(`viewing-${e}`);!t&&s>r.a.telemetry.postConsumedThreshold&&D.a(a,e,s)}},re="AD__IMPRESSION",ne="AD__VIEWABLE_IMPRESSION",ae=Object(d.a)(re),ce=Object(d.a)(ne),ie=(e,t)=>async(s,r)=>{if(!e.isSponsored)return;const n=e.media&&"video"===e.media.type;if(n&&t===U.a.VideoViewable)s(Object(l.B)(e.id));else{if(!n||t!==U.a.VideoFullyViewable)return t===U.a.Impression?(s((e=>async t=>{e.isSponsored&&(Object(A.a)(e.events,v.a.Impression),t(ae({postId:e.id})))})(e)),void D.f(r(),e.id)):void s((e=>async t=>{e.isSponsored&&(Object(A.a)(e.events,v.a.ViewableImpression),t(ce({postId:e.id})))})(e));s(Object(l.A)(e.id))}},oe=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.posts.models[e],c=n.user.account?n.user.account.displayText:null;a&&(t(Y({[e]:{approvedBy:c,bannedBy:null,isApproved:!0,isRemoved:!1,isSpam:!1,modNote:null,numReports:0,modRemovalReason:null,modReasonBy:null}})),(await Object(g.b)(r(),e)).ok||t(Y({[e]:{approvedBy:null,bannedBy:a.bannedBy,isApproved:a.isApproved,isRemoved:a.isRemoved,isSpam:a.isSpam,modNote:a.modNote,numReports:a.numReports||null,modRemovalReason:a.modRemovalReason,modReasonBy:a.modReasonBy}})))},de=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=a.posts.models[e],i=a.user.account?a.user.account.displayText:null;c&&i&&(s(Y({[e]:{approvedBy:null,bannedBy:i,isApproved:!1,isRemoved:!t,isSpam:t}})),(await Object(g.l)(n(),e,t)).ok||s(Y({[e]:{approvedBy:c.approvedBy,bannedBy:c.bannedBy,isApproved:c.isApproved,isRemoved:c.isRemoved,isSpam:c.isSpam}})))},ue=(e,t,s)=>async(r,n,{apiContext:a})=>{const i=n(),o=i.posts.models[e],d=Object(L.M)(i);if(o)if(r(Y({[e]:{hidden:!0}})),(await Object(g.c)(a(),e)).ok){const e=Object(I.d)(Object(c.a)(d,"posts.deleteSuccess"),x.b.SuccessMod);if(s)r(Object(S.b)(t.state[O.a.CloseLocation]));else{const e=Object(k.f)(i);e&&r(Object(S.b)(e.url))}r(Object(I.e)(e))}else{r(Y({[e]:{hidden:!1}}));const t=Object(I.d)(Object(c.a)(d,"error.generic"),x.b.Error);r(Object(I.e)(t))}},le=e=>async(t,s,{apiContext:r})=>{const n=s().posts.models[e];if(!n)return;const a=n.isLocked?g.t:g.i;t(Y({[e]:{isLocked:!n.isLocked}})),(await a(r(),e)).ok||t(Y({[e]:{isLocked:n.isLocked}}))},be=e=>async(t,s,{apiContext:r})=>{const n=s().posts.models[e];if(!n)return;const a=n.isSpoiler?g.w:g.p,c=n.isSpoiler?n.flair.filter(e=>e.type!==P.e.Spoiler):[...n.flair,{text:"spoiler",type:P.e.Spoiler}];t(Y({[e]:{isSpoiler:!n.isSpoiler,flair:c}})),(await a(r(),e)).ok||t(Y({[e]:{isSpoiler:n.isSpoiler,flair:n.flair}}))},pe=e=>async(t,s,{apiContext:r})=>{const n=Object(M.D)(s(),{postId:e});n&&(t(Y({[e]:{isOriginalContent:!n.isOriginalContent}})),(await Object(g.k)(r(),e,!n.isOriginalContent)).ok||t(Y({[e]:{isOriginalContent:n.isOriginalContent}})))},Oe=e=>async(t,s,{apiContext:r})=>{const n=s().posts.models[e];if(!n)return;const a=n.isNSFW?g.u:g.j,c=n.isNSFW?n.flair.filter(e=>e.type!==P.e.Nsfw):[...n.flair,{text:"nsfw",type:P.e.Nsfw}];t(Y({[e]:{isNSFW:!n.isNSFW,flair:c}})),(await a(r(),e)).ok?await t(Ie(e)):t(Y({[e]:{isNSFW:n.isNSFW,flair:n.flair}}))},fe=(e,t)=>async(s,r,{apiContext:n})=>{const a=r().posts.models[e];if(!a)return;const c=E.h[t];s(Y({[e]:{distinguishType:t}})),(await Object(g.d)(n(),e,c)).ok||s(Y({[e]:{distinguishType:a.distinguishType}}))},me=e=>async(t,s,{apiContext:r})=>{const n=s().posts.models[e];if(!n)return;const a=n.ignoreReports?g.s:g.h;t(Y({[e]:{ignoreReports:!n.ignoreReports}})),(await a(r(),e)).ok||t(Y({[e]:{ignoreReports:n.ignoreReports}}))},je=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.posts.models[e];if(!a)return;const c=!a.isStickied;t(Y({[e]:{isStickied:c}}));const i=n.subredditStickyPosts.data[a.belongsTo.id];let o;if(c&&i&&i.length>=2&&(o=i[1],t(Y({[o]:{isStickied:!1}}))),(await Object(g.q)(r(),e,c,!1)).ok){const s=a.belongsTo.id,r=ge(e,c,n.subredditStickyPosts.data[a.belongsTo.id]),i=n.subreddits.models[s].name,o=Object(h.a)(i,E.Y,{});t(W({newStickiedPostList:r,subredditId:s,listingKey:o}))}else t(Y({[e]:{isStickied:a.isStickied}})),o&&t(Y({[o]:{isStickied:!0}}))},ge=(e,t,s)=>{const r=s?[...s]:[];return t?(r.length>=2&&r.splice(1,1,e),r):r.filter(function(t){return t!==e})},ye=e=>async(t,s,{apiContext:r})=>{const n=s().user.language;if(Object(o.a)(e)){const e=Object(I.d)(Object(c.a)(n,"posts.copyLinkSuccess"),x.b.SuccessCommunity);t(Object(I.e)(e))}else{const e=Object(I.d)(Object(c.a)(n,"error.generic"),x.b.Error);t(Object(I.e)(e))}},_e="PREFERENCES__RECENT_POSTS_UPDATED",Ee=Object(d.a)(_e),he=()=>async(e,t)=>{const s=t();if(!s.user.account)return;const n=Object(w.f)(s.user.account);a.a.remove(`${n}${p.h}`,{domain:r.a.cookieDomain}),e(Ee({postIds:[]}))},Se=e=>async(t,s)=>{const n=s();if(!n.user.account||!n.user.account.showRecentPosts||n.posts.recent.indexOf(e)>-1)return;const c=Object(w.f)(n.user.account),i=n.posts.recent?n.posts.recent.slice(0):[];i.push(e),i.length>f.e&&i.shift(),a.a.set(`${c}${p.h}`,`${i.join(",")}`,{domain:r.a.cookieDomain}),t(Ee({postIds:i}))},Te=e=>async(t,s,{apiContext:r})=>{const n=!s().posts.models[e].sendReplies;t(Y({[e]:{sendReplies:n}})),(await Object(g.o)(r(),e,n)).ok||t(Y({[e]:{sendReplies:!n}}))},Ie=e=>async(t,s,r)=>{if(Object(M.D)(s(),{postId:e}))return;const n=await Object(R.a)(r.apiContext(),e,void 0,{limit:1,truncate:0});if(t(Object(u.m)(n.status)),n.ok){const e=n.body;t(H(e.posts))}},ve=e=>async(t,s)=>{await t(Ie(e));const r=Object(M.D)(s(),{postId:e});r&&r.crosspostRootId&&await t(Ie(r.crosspostRootId))},Ce=e=>async(t,s,{apiContext:r})=>{const n=s();if(!Object(L.F)(n))return void t(Object(T.i)(C.a.LOGIN_MODAL_ID));const a=Object(M.D)(n,{postId:e});if(!a)return;const i=a.isFollowed;t(Y({[e]:{isFollowed:!i}}));const o=await Object(g.f)(r(),e,!a.isFollowed),d=Object(L.M)(n);o.ok?t(Object(I.e)({kind:x.b.SuccessMod,text:Object(c.a)(d,i?"posts.event.successfullyUnfollowed":"posts.event.successfullyFollowed")})):(t(Y({[e]:{isFollowed:i}})),t(Object(I.e)({kind:x.b.Error,text:Object(c.a)(d,"posts.event.followFailed")})))},Re=({postOrComment:e,queryParams:t,clickInfo:s})=>async(r,n)=>{const a=n(),c=s&&s.hasNewTabModifier;let o=e.permalink;t&&(o=Object(i.a)(o,t)),a.user.prefs.openPostInNewTab||c?window.open(o):r(Object(m.a)(o))},Ae="RICH_TEXT_POST_CONTENT_LOADED",De=Object(d.a)(Ae),Pe=e=>async(t,s,r)=>{const n=s(),a=Object(M.D)(n,{postId:e}),i=Object(L.M)(n);if(!(a&&a.media&&Object(j.y)(a.media)&&a.media.isRichtextPreview))return;const o=await((e,t)=>Object(y.a)(e,Object.assign({},_,{variables:t})))(r.gqlContext(),{postId:e});if(o.ok){const s=o.body.data,r=s.post&&s.post.content&&s.post.content.richtext;r&&t(De({postId:e,richtextContent:JSON.parse(r)}))}else t(Object(I.e)({kind:x.b.Error,text:Object(c.a)(i,"error.genericPage")}))}},"./src/reddit/actions/postCollection.ts":function(e,t,s){"use strict";var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/app/strings/index.ts"),a=s("./src/lib/filterQueryParams/index.ts"),c=s("./src/lib/makeActionCreator/index.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/reddit/constants/history.ts"),d=s("./src/lib/constants/index.ts"),u=s("./src/lib/makeApiRequest/index.ts"),l=s("./src/lib/omitHeaders/index.ts"),b=s("./src/reddit/constants/headers.ts");var p=(e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/add_post_to_collection.json`,method:d.jb.POST,data:{collection_id:t,link_fullname:s}});var O=(e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/create_collection.json`,method:d.jb.POST,data:{title:t,sr_fullname:s}});var f=(e,t)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/delete_collection.json`,method:d.jb.POST,data:{collection_id:t}}),m=s("./src/config.ts");var j=(e,t)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${m.a.gatewayUrl}/desktopapi/v1/subreddit_collections/${t}`,method:d.jb.GET});var g=(e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/remove_post_in_collection.json`,method:d.jb.POST,data:{collection_id:t,link_fullname:s}});var y=(e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/update_collection_title.json`,method:d.jb.POST,data:{collection_id:t,title:s}});var _=(e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/reorder_collection.json`,method:d.jb.POST,data:{collection_id:t,link_ids:s.join(",")}});var E=(e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/v1/collections/update_collection_description.json`,method:d.jb.POST,data:{collection_id:t,description:s}}),h=s("./src/reddit/helpers/overlay/index.ts"),S=s("./src/reddit/helpers/path/index.ts"),T=s("./src/reddit/models/Toast/index.ts"),I=s("./src/reddit/selectors/platform.ts"),v=s("./src/reddit/selectors/postCollection.ts"),C=s("./src/reddit/selectors/posts.ts"),R=s("./src/reddit/selectors/subreddit.ts");s.d(t,"c",function(){return A}),s.d(t,"d",function(){return D}),s.d(t,"b",function(){return P}),s.d(t,"s",function(){return k}),s.d(t,"f",function(){return L}),s.d(t,"v",function(){return M}),s.d(t,"g",function(){return G}),s.d(t,"x",function(){return B}),s.d(t,"a",function(){return $}),s.d(t,"q",function(){return V}),s.d(t,"r",function(){return K}),s.d(t,"e",function(){return W}),s.d(t,"t",function(){return z}),s.d(t,"o",function(){return Q}),s.d(t,"p",function(){return X}),s.d(t,"n",function(){return J}),s.d(t,"y",function(){return se}),s.d(t,"l",function(){return re}),s.d(t,"m",function(){return ne}),s.d(t,"k",function(){return ae}),s.d(t,"w",function(){return de}),s.d(t,"i",function(){return ue}),s.d(t,"j",function(){return le}),s.d(t,"h",function(){return be}),s.d(t,"u",function(){return me});const A="CREATE_COLLECTION_PENDING",D="CREATE_COLLECTION_SUCCESS",P="CREATE_COLLECTION_FAILED",x=Object(c.a)(A),w=Object(c.a)(D),N=Object(c.a)(P),k=e=>async(t,s,{apiContext:r})=>{const n=Object(I.f)(s());if(!n)return;t(x());const a=await O(r(),e,n.id);let c;if(a.ok){const e=s().meta,r=(e=>({createdAtUTC:e.created_at_utc,id:e.collection_id,lastUpdateUTC:e.last_update_utc,permalink:e.permalink,postIds:e.link_ids,primaryPostId:e.primary_link_id||void 0,subredditId:e.subreddit_id,title:e.title,author:e.author_name||void 0,description:e.description}))(a.body);t(w({collection:r,meta:e})),c=r}else{const e=a.error;t(N(e))}return c},L="GET_SUBREDDIT_COLLECTION_SUCCESS",U=Object(c.a)(L),M=e=>async(t,s,{apiContext:r})=>{const a=s(),c=a.postCollection.subredditToIds||{};if(Object.keys(c).length>0)return;const o=await j(r(),e);o.ok?t(U(o.body)):t(Object(i.e)({kind:T.b.Error,text:Object(n.a)(a.user.language,"error.type.generic")}))},G="REMOVE_POST_FROM_COLLECTION_SUCCESS",F=Object(c.a)(G),B=(e,t,s)=>async(r,a,{apiContext:c})=>{if((await g(c(),e,t)).ok){const c=a(),o=Object(C.D)(c,{postId:t}),d=o&&o.title||"",u=Object(v.l)(c,{collectionId:e}),l=(u&&u.postIds&&u.postIds.indexOf(t)||-1)-1;if(r(F({collectionId:e,postId:t})),s&&l>=0){const t=a(),s=Object(v.l)(t,{collectionId:e}),n=s&&s.postIds&&s.postIds[l]||"",c=Object(C.D)(t,{postId:n});c&&c.permalink&&r(Object(h.a)(c.permalink))}r(Object(i.e)({kind:T.b.SuccessMod,text:Object(n.a)(c.user.language,"collection.postRemovedSuccess",{postTitle:d}),buttonText:Object(n.a)(c.user.language,"collection.undo"),buttonAction:K(e,t)}))}else{const e=a();r(Object(i.e)({kind:T.b.Error,text:Object(n.a)(e.user.language,"error.type.generic")}))}},$="ADD_POST_TO_COLLECTION_SUCCESS",q=Object(c.a)($),V="UPDATE_POST_WITH_COLLECTION_ID",H=Object(c.a)(V),K=(e,t)=>async(s,r,{apiContext:a})=>{const c=r();if((await p(a(),e,t)).ok){s(q({collectionId:e,postId:t})),s(H({collectionId:e,postId:t}));const r=Object(C.D)(c,{postId:t}),a=Object(v.l)(c,{collectionId:e}),o=a&&a.title||"";s(Object(i.e)({kind:T.b.SuccessMod,text:Object(n.a)(c.user.language,"collection.postAddedSuccess",{title:o}),buttonText:Object(n.a)(c.user.language,"collection.view"),buttonAction:Object(h.a)(r.permalink)}))}else s(Object(i.e)({kind:T.b.Error,text:Object(n.a)(c.user.language,"error.type.generic")}))},W="DELETE_COLLECTION_SUCCESS",Y=Object(c.a)(W),z=(e,t)=>async(s,c,{apiContext:o})=>{const d=c();if((await f(o(),e)).ok){const c=d.platform.currentPage.url,o=Object(v.l)(d,{collectionId:e}),u=o&&o.title||"",l=o&&o.subredditId,b=Object(R.b)(d,{subredditId:l})||"/";s(Y({collectionId:e,collection:o})),s(t?Object(r.c)(Object(a.a)(c,["collection"])):Object(r.b)(b)),s(Object(i.e)({kind:T.b.SuccessMod,text:Object(n.a)(d.user.language,"collection.collectionDeletedSuccess",{title:u})}))}else s(Object(i.e)({kind:T.b.Error,text:Object(n.a)(d.user.language,"error.type.generic")}))},Q="UPDATE_COLLECTION_PENDING",X="UPDATE_COLLECTION_SUCCESS",J="UPDATE_COLLECTION_FAILED",Z=Object(c.a)(Q),ee=Object(c.a)(X),te=Object(c.a)(J),se=(e,t)=>async(s,r,{apiContext:a})=>{s(Z());const c=await y(a(),e,t);let o=!1;const d=r();if(c.ok)s(ee({collectionId:e,newTitle:t})),s(Object(i.e)({kind:T.b.SuccessMod,text:Object(n.a)(d.user.language,"collection.editModal.titleUpdateSuccess")})),o=!0;else{const e=c.error;s(te(e)),s(Object(i.e)({kind:T.b.Error,text:Object(n.a)(d.user.language,"error.type.generic")}))}return o},re="UPDATE_COLLECTION_DESCRIPTION_PENDING",ne="UPDATE_COLLECTION_DESCRIPTION_SUCCESS",ae="UPDATE_COLLECTION_DESCRIPTION_FAILED",ce=Object(c.a)(re),ie=Object(c.a)(ne),oe=Object(c.a)(ae),de=e=>async(t,s)=>{const n=s().platform.currentPage.locationState;t(!(!n||!n[o.a.IsOverlay])?Object(h.a)(e.permalink):Object(r.b)(Object(S.b)(e.permalink)))},ue="REORDER_COLLECTION_PENDING",le="REORDER_COLLECTION_SUCCESS",be="REORDER_COLLECTION_FAILED",pe=Object(c.a)(ue),Oe=Object(c.a)(le),fe=Object(c.a)(be),me=e=>async t=>{const s=[],r=e.collectionId,a=e.postIds,c=e.title,o=e.description;a&&s.push(t(((e,t)=>async(s,r,{apiContext:a})=>{s(pe());const c=await _(a(),e,t);let o=!1;const d=r();return c.ok?(s(Oe({collectionId:e,postIds:t})),s(Object(i.e)({kind:T.b.SuccessMod,text:Object(n.a)(d.user.language,"collection.editModal.reorderCollectionSuccess")})),o=!0):(s(fe({error:c.error})),s(Object(i.e)({kind:T.b.Error,text:Object(n.a)(d.user.language,"error.type.generic")}))),o})(r,a))),c&&s.push(t(se(r,c))),void 0!==o&&s.push(t(((e,t)=>async(s,r,{apiContext:a})=>{s(ce());const c=await E(a(),e,t);let o=!1;const d=r();if(c.ok)s(ie({collectionId:e,newDescription:t})),s(Object(i.e)({kind:T.b.SuccessMod,text:Object(n.a)(d.user.language,"collection.editModal.descriptionUpdateSuccess")})),o=!0;else{const e=c.error;s(oe(e)),s(Object(i.e)({kind:T.b.Error,text:Object(n.a)(d.user.language,"error.type.generic")}))}return o})(r,o)));let d=!0;return await Promise.all(s).then(e=>{e.forEach(e=>{e||(d=!1)})}),d}},"./src/reddit/actions/postCreation/constants.ts":function(e,t,s){"use strict";s.d(t,"J",function(){return r}),s.d(t,"K",function(){return n}),s.d(t,"m",function(){return a}),s.d(t,"n",function(){return c}),s.d(t,"A",function(){return i}),s.d(t,"G",function(){return o}),s.d(t,"H",function(){return d}),s.d(t,"l",function(){return u}),s.d(t,"F",function(){return l}),s.d(t,"q",function(){return b}),s.d(t,"P",function(){return p}),s.d(t,"o",function(){return O}),s.d(t,"y",function(){return f}),s.d(t,"C",function(){return m}),s.d(t,"t",function(){return j}),s.d(t,"c",function(){return g}),s.d(t,"b",function(){return y}),s.d(t,"d",function(){return _}),s.d(t,"e",function(){return E}),s.d(t,"f",function(){return h}),s.d(t,"g",function(){return S}),s.d(t,"h",function(){return T}),s.d(t,"i",function(){return I}),s.d(t,"j",function(){return v}),s.d(t,"k",function(){return C}),s.d(t,"r",function(){return R}),s.d(t,"Q",function(){return A}),s.d(t,"R",function(){return D}),s.d(t,"S",function(){return P}),s.d(t,"T",function(){return x}),s.d(t,"U",function(){return w}),s.d(t,"V",function(){return N}),s.d(t,"W",function(){return k}),s.d(t,"X",function(){return L}),s.d(t,"s",function(){return U}),s.d(t,"D",function(){return M}),s.d(t,"x",function(){return G}),s.d(t,"v",function(){return F}),s.d(t,"w",function(){return B}),s.d(t,"u",function(){return $}),s.d(t,"z",function(){return q}),s.d(t,"O",function(){return V}),s.d(t,"p",function(){return H}),s.d(t,"B",function(){return K}),s.d(t,"Y",function(){return W}),s.d(t,"I",function(){return Y}),s.d(t,"a",function(){return z}),s.d(t,"E",function(){return Q}),s.d(t,"M",function(){return X}),s.d(t,"N",function(){return J}),s.d(t,"L",function(){return Z});const r="SUBMIT_VALIDATION_FIELD_HAS_ERROR",n="SUBMIT_VALIDATION_FIELD_IS_VALID",a="POST_CREATION_EDIT_COMPLETE",c="POST_CREATION_EDIT_FAILED",i="POST_CREATION_PENDING_EDIT",o="POST_CREATION_START_EDITING_POST",d="POST_CREATION_STOP_EDITING_POST",u="EDITOR_CONTENT_KEY__NEW_DRAFT",l="STARTED_CONVERTING_EDITOR_CONTENT",b="FINISHED_CONVERTING_EDITOR_CONTENT",p="POST_CREATION__TOGGLE_EDITOR_MODE",O="POST_CREATION__ERRORS_NO_LONGER_VALID",f="POST_CREATION__OC_CATEGORY_SELECTED",m="POST_TITLE_FETCHED",j="INITIALIZE_EDITOR_MODE",g="POST_CREATION__CHANGE_FLAIR",y="POST_CREATION__CHANGE_EVENT_SCHEDULE",_="POST_CREATION__CHANGE_LINK_BODY",E="POST_CREATION__CHANGE_MARKDOWN_BODY",h="POST_CREATION__CHANGE_MEDIA_BODY",S="POST_CREATION__CHANGE_OC_CATEGORY",T="POST_CREATION__CHANGE_RECAPTCHA",I="POST_CREATION__CHANGE_RTE_STATE",v="POST_CREATION__CHANGE_SUBMISSION_TYPE",C="POST_CREATION__CHANGE_TITLE",R="POST_CREATION__GOV_TYPE_CHANGED",A="POST_CREATION__TOGGLE_IS_CHANGED",D="POST_CREATION__TOGGLE_IS_GOV",P="POST_CREATION__TOGGLE_IS_NSFW",x="POST_CREATION__TOGGLE_IS_OC",w="POST_CREATION__TOGGLE_IS_POLL",N="POST_CREATION__TOGGLE_IS_SPOILER",k="POST_CREATION__TOGGLE_POST_TO_TWITTER",L="POST_CREATION__TOGGLE_SEND_REPLIES",U="POST_CREATION__INITIALIZE_CROSSPOST_MODE",M="POST_CREATION__RESET_FORM",G="POST_CREATION__MODAL_TOGGLED",F="POST_CREATION__MEDIA_UPLOAD_PENDING",B="POST_CREATION__MEDIA_UPLOAD_SUCCEEDED",$="POST_CREATION__MEDIA_UPLOAD_FAILED",q="POST_CREATION__PENDING",V="POST_CREATION__SUCCEEDED",H="POST_CREATION__FAILED",K="POST_CREATION__POLL_FAILED",W="POST_CREATION__VALIDATION_FAILED",Y="POST_CREATION__SUBMIT_VALIDATION_FAILED",z="POST_CREATION__CAPTCHA_REQUIRED",Q="POST_CREATION__SET_SUBMIT_MODE",X="POST_CREATION__SUBREDDIT_CHANGE_PENDING",J="POST_CREATION__SUBREDDIT_WILL_CHANGE",Z="POST_CREATION__SUBREDDIT_CHANGE_CANCELED"},"./src/reddit/actions/postCreation/editorContent.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return O}),s.d(t,"a",function(){return f}),s.d(t,"d",function(){return j}),s.d(t,"c",function(){return g});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/toaster.ts"),c=s("./src/reddit/endpoints/post/convert.ts"),i=s("./src/reddit/helpers/localStorage/index.ts"),o=s("./src/reddit/helpers/trackers/postComposer.ts"),d=s("./src/reddit/models/PostCreationForm/index.ts"),u=s("./src/reddit/models/RichTextJson/index.ts"),l=s("./src/reddit/models/Toast/index.ts"),b=s("./src/reddit/selectors/user.ts"),p=s("./src/reddit/actions/postCreation/constants.ts");const O=Object(n.a)(p.F),f=Object(n.a)(p.q),m=Object(n.a)(p.P),j=(e,t,s)=>async(n,i,{apiContext:j})=>{o.i(i(),t);const y=t===d.h.MARKDOWN,_=t===d.h.RICH_TEXT,E=Object(b.M)(i()),h=p.l;if(y&&Object(u.E)(s))return n(m({editorKey:e,editorMode:d.h.MARKDOWN,content:""})),void n(g(t));if(_&&!s)return n(m({editorKey:e,editorMode:d.h.RICH_TEXT,content:u.i})),void n(g(t));n(O(h));const S=await Object(c.a)(j(),t,y?JSON.stringify(s):s);S.ok?(n(f(h)),n(m({editorKey:e,editorMode:t,content:S.body.output})),n(g(t))):(n(f(h)),n(Object(a.e)({duration:a.a,kind:l.b.Error,text:Object(r.a)(E,"error.generic")})))},g=e=>async(t,s)=>{const n=Object(i.e)();if(n>=3)return;const c=s().user.prefs.useMarkdown?d.h.MARKDOWN:d.h.RICH_TEXT,o=Object(b.M)(s());if(e===c)return;const u=e===d.h.MARKDOWN?"postCreation.editorModeModeHintToast.makeMarkdownDefault":"postCreation.editorModeModeHintToast.makeRTEDefault";t(Object(a.e)({buttonAction:async()=>{window.open("/settings/feed")},buttonText:Object(r.a)(o,"postCreation.editorModeModeHintToast.button"),kind:l.b.SuccessCommunity,text:Object(r.a)(o,u)})),Object(i.z)(n+1)}},"./src/reddit/actions/postCreation/general.ts":function(e,t,s){"use strict";s.d(t,"j",function(){return j}),s.d(t,"n",function(){return _}),s.d(t,"r",function(){return E}),s.d(t,"a",function(){return h}),s.d(t,"b",function(){return S}),s.d(t,"c",function(){return I}),s.d(t,"d",function(){return v}),s.d(t,"e",function(){return C}),s.d(t,"g",function(){return R}),s.d(t,"f",function(){return A}),s.d(t,"h",function(){return D}),s.d(t,"i",function(){return P}),s.d(t,"k",function(){return x}),s.d(t,"s",function(){return w}),s.d(t,"t",function(){return N}),s.d(t,"u",function(){return k}),s.d(t,"v",function(){return L}),s.d(t,"w",function(){return U}),s.d(t,"y",function(){return M}),s.d(t,"z",function(){return G}),s.d(t,"l",function(){return F}),s.d(t,"q",function(){return B}),s.d(t,"p",function(){return q}),s.d(t,"x",function(){return H}),s.d(t,"o",function(){return K}),s.d(t,"m",function(){return W});var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/lib/isUrl/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/reddit/actions/modal.ts"),i=s("./src/reddit/actions/subreddit.ts"),o=s("./src/reddit/contexts/PageLayer/index.tsx"),d=s("./src/reddit/endpoints/post/index.tsx"),u=s("./src/reddit/models/PostCreationForm/index.ts"),l=s("./src/reddit/routes/postCreation/constants.ts"),b=s("./src/reddit/selectors/platform.ts"),p=s("./src/reddit/selectors/postCollection.ts"),O=s("./src/reddit/selectors/postCreations.ts"),f=s("./src/reddit/selectors/subreddit.ts"),m=s("./src/reddit/actions/postCreation/constants.ts");const j=Object(a.a)(m.o),g=Object(a.a)(m.y),y=Object(a.a)(m.C),_=(Object(a.a)(m.t),e=>{switch(e){case"markdown":return"self";case"richtext":case"richText":return"self";case"media":return"media";default:return"link"}}),E=e=>async(t,s,{apiContext:r})=>{t(g(e)),Object(f.p)(s(),e).length>0||t(Object(i.o)(e))},h=Object(a.a)(m.b),S=Object(a.a)(m.c),T=Object(a.a)(m.d),I=Object(a.a)(m.e),v=Object(a.a)(m.f),C=Object(a.a)(m.g),R=Object(a.a)(m.h),A=Object(a.a)(m.i),D=Object(a.a)(m.j),P=Object(a.a)(m.k),x=Object(a.a)(m.r),w=Object(a.a)(m.Q),N=(Object(a.a)(m.R),Object(a.a)(m.S)),k=Object(a.a)(m.T),L=Object(a.a)(m.U),U=Object(a.a)(m.V),M=Object(a.a)(m.W),G=Object(a.a)(m.X),F=Object(a.a)(m.s),B=e=>async(t,s,{apiContext:r})=>{t(T(e)),Object(n.a)(e)&&t((e=>async(t,s,{apiContext:r})=>{const n=await Object(d.e)(r(),e);n.ok&&n.body&&n.body.json&&n.body.json.data&&t(y(n.body.json.data))})(e))},$=Object(a.a)(m.D),q=(e,t)=>async(s,n)=>{s($()),s(e?Object(r.b)(l.c):Object(r.b)(Object(O.R)(n(),{pageLayer:t})))},V=Object(a.a)(c.c),H=e=>async t=>{e?e===u.d?t(V(e)):t(c.i(e)):(t(V(e)),t(c.i(e)))},K=e=>async(t,s)=>{const r=s(),n=Object(o.I)(e),a=Object(O.y)(r);if(n&&a){Object(O.J)(r)!==u.c&&t(H(u.c))}else t(q(!1,e))},W=()=>async(e,t)=>{const s=t(),r=Object(b.f)(s);r&&(Object(p.h)(s,{subredditId:r.id})?e(c.i(u.a)):e(c.i(u.b)))}},"./src/reddit/actions/postCreation/subredditChange.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return h}),s.d(t,"b",function(){return S}),s.d(t,"a",function(){return T}),s.d(t,"d",function(){return I}),s.d(t,"c",function(){return v});var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/lib/addQueryParams/index.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/filterQueryParams/index.ts"),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/reddit/actions/modal.ts"),d=s("./src/reddit/actions/pages/postCreation.ts"),u=s("./src/reddit/contexts/PageLayer/selectors.ts"),l=s("./src/reddit/helpers/name/index.ts"),b=s("./src/reddit/models/PostCreationForm/index.ts"),p=s("./src/reddit/routes/postCreation/index.ts"),O=s("./src/reddit/routes/postCreation/constants.ts"),f=s("./src/reddit/selectors/platform.ts"),m=s("./src/reddit/selectors/postCreations.ts"),j=s("./src/reddit/selectors/subreddit.ts"),g=s("./src/reddit/actions/postCreation/constants.ts"),y=s("./src/reddit/actions/postCreation/general.ts");const _=Object(i.a)(g.M),E=Object(i.a)(g.N),h=Object(i.a)(g.L),S=(e,t)=>async(s,r,{apiContext:n})=>{let c=r();const i=e.name,p=e.isProfile,O=Object(f.f)(c),g=O&&!p&&Object(l.a)(O.name,i),y=c.creations.api.subreddit.change.pending;if(g||y)return;const E=Object(u.v)(t);if(p||!i||!Object(m.u)(c))return void s(T(e,E));s(_(e)),await s(Object(d.d)({subredditName:i}));const h=e.allowedPostTypes||Object(j.u)(r(),{subredditName:i});if(!h)return void s(T(e,E));let S;c=r();const I=Object(m.Z)(c),v=Object(m.u)(c);if(I===a.hc.MEDIA&&v){var C=Object(m.H)(c);const e=C.mediaType,t=C.video;if("image"!==e||h.images){if("video"===e&&!h.videos){const e=t&&t.duration||0;h.images?e>a.hb&&(S=b.p.VideoWillBeRemovedTooLongForGif):S=b.p.VideoWillBeRemovedMediaNotAllowed}}else S=b.p.ImageWillBeRemoved}s(S?Object(o.i)(S):T(Object.assign({},e,{allowedPostTypes:h}),E))},T=(e,t,s=!0)=>async(a,c)=>{const i=e.name,o=e.isProfile,d=c().platform.currentPage,u=d.queryParams,l=o?p.b:p.c;let b="";b=i?l(i):Object(p.d)(d.routeMatch.match.path)&&t!==u.draft?O.a:O.c,b=Object(n.a)(b,Object.assign({},u,{draft:t||u.draft})),(t||d.url.toLowerCase()!==b.toLowerCase())&&(a(E(e)),s&&a(Object(y.s)(!0)),a(Object(r.c)(b)))},I=e=>async(t,s)=>{const a=s().platform.currentPage,c=a.queryParams,i=Object(n.a)(a.url,Object.assign({},c,{collection:e}));t(Object(r.c)(i))},v=()=>async(e,t)=>{const s=t().platform.currentPage,n=Object(c.a)(s.url,["collection"]);e(Object(r.c)(n))}},"./src/reddit/actions/postDraft.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/formatApiError/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/reddit/actions/postCreation/general.ts"),i=s("./src/reddit/actions/postCreation/subredditChange.ts"),o=s("./src/reddit/actions/toaster.ts"),d=s("./src/reddit/contexts/PageLayer/selectors.ts"),u=s("./src/app/models/StructuredStylesImageUpload.ts"),l=s("./src/lib/makeApiRequest/index.ts"),b=s("./src/lib/omitHeaders/index.ts");var p=s("./src/reddit/constants/headers.ts"),O=s("./src/reddit/helpers/name/index.ts"),f=s("./src/reddit/models/PostDraft/index.ts"),m=s("./src/reddit/helpers/r2/normalizeProfileSubredditFromR2/index.ts"),j=s("./src/reddit/helpers/r2/normalizeSubredditFromR2/index.ts"),g=s("./src/reddit/models/Subreddit/index.ts");const y=e=>{let t=e.drafts.reduce((e,t)=>{const s=(e=>{let t;return t="link"===e.kind?{kind:f.b.Link,body:e.body||void 0}:"markdown"===e.kind?{kind:f.b.Markdown,body:e.body||void 0}:{kind:f.b.RichText,body:e.body||void 0},Object.assign({subredditId:e.subreddit||void 0,contentCategory:e.content_category||void 0,created:e.created,flair:e.flair,id:e.id,isNSFW:!!e.nsfw,isOriginalContent:!!e.original_content,isSpoiler:!!e.spoiler,modified:e.modified||void 0,sendReplies:!!e.send_replies,isPublicLink:!!e.is_public_link,title:e.title||""},t)})(t);return e.postDraftIds.push(s.id),e.postDrafts[s.id]=s,e},{postDraftIds:[],postDrafts:{},profiles:{},subreddits:{}});return t=e.subreddits.reduce((e,t)=>{if(t.subreddit_type===g.b.User){const s=Object(m.a)(t,Object(O.f)(t.display_name_prefixed));e.profiles[s.id]=s}else{const s=Object(j.a)(t);e.subreddits[s.id]=s}return e},t)};var _=s("./src/reddit/endpoints/post/draft/helpers.ts"),E=s("./src/reddit/models/PostCreationForm/index.ts"),h=s("./src/reddit/helpers/trackers/postComposer.ts"),S=s("./src/reddit/models/Toast/index.ts"),T=s("./src/reddit/models/User/index.ts"),I=s("./src/reddit/selectors/postCreations.ts"),v=s("./src/reddit/selectors/postDraft.ts"),C=s("./src/reddit/selectors/profile.ts"),R=s("./src/reddit/selectors/subreddit.ts"),A=s("./src/reddit/selectors/user.ts");s.d(t,"f",function(){return D}),s.d(t,"e",function(){return P}),s.d(t,"d",function(){return x}),s.d(t,"p",function(){return L}),s.d(t,"j",function(){return U}),s.d(t,"l",function(){return M}),s.d(t,"i",function(){return G}),s.d(t,"m",function(){return F}),s.d(t,"k",function(){return B}),s.d(t,"h",function(){return $}),s.d(t,"n",function(){return q}),s.d(t,"s",function(){return Q}),s.d(t,"r",function(){return X}),s.d(t,"g",function(){return J}),s.d(t,"q",function(){return ee}),s.d(t,"c",function(){return te}),s.d(t,"a",function(){return se}),s.d(t,"b",function(){return re}),s.d(t,"o",function(){return ie});const D="POST_DRAFT__LIST_PENDING",P="POST_DRAFT__LIST_LOADED",x="POST_DRAFT__LIST_FAILED",w=Object(a.a)(D),N=Object(a.a)(P),k=Object(a.a)(x),L=()=>async(e,t,{apiContext:s})=>{const n=t();if(!Object(A.j)(n)||Object(v.b)(n))return;e(w());const a=await(e=>Object(l.c)(Object(b.a)(e,[p.a]),{endpoint:`${e.apiUrl}/api/v1/drafts.json`,method:r.jb.GET}))(s());a.ok?e(N(y(a.body))):e(k(a.error))},U="POST_DRAFT__SAVE_DRAFT_PENDING",M="POST_DRAFT__SAVE_DRAFT_SUCCEEDED",G="POST_DRAFT__SAVE_DRAFT_FAILED",F="POST_DRAFT__SAVE_DRAFT_VALIDATION_FAILED",B="POST_DRAFT__SAVE_DRAFT_SUBMIT_VALIDATION_FAILED",$="POST_DRAFT__SAVE_DRAFT_CAPTCHA_REQUIRED",q="POST_CREATION__TOGGLE_DRAFT_IS_PUBLIC",V=Object(a.a)(U),H=Object(a.a)(M),K=Object(a.a)(G),W=Object(a.a)(F),Y=Object(a.a)(B),z=Object(a.a)($),Q=Object(a.a)(q),X=e=>async(t,s,{apiContext:a})=>{const c=s(),d=Object(v.g)(c),u=Object(I.Q)(c);if(d||u)return;const O=Object(v.h)(c,e);if(!O)return;t(V(O)),h.e(c,O);const f=await((e,t,s)=>Object(l.c)(Object(b.a)(e,[p.a]),{endpoint:`${e.apiUrl}/api/v1/draft`,method:s?r.jb.PUT:r.jb.POST,data:Object(_.a)(t)}).then(e=>e.body.fields&&Object(E.u)(e.body.fields[0])?Object.assign({},e,{body:{},error:{type:r.I.SUBMIT_VALIDATION_ERROR,fields:[{field:e.body.fields[0],msg:e.body.explanation}]}}):e))(a(),O,e);if(f.ok){var m=Object(_.c)(f.body);const s=m.id,r=m.draftsCount;t(H({draftId:s,draftsCount:r})),e||t(Object(i.a)(O.destSubreddit,s,!1))}else{const e=f.error;e.type===r.I.BAD_CAPTCHA_ERROR?t(z()):e.type===r.I.VALIDATION_ERROR?t(W(e)):e.type===r.I.SUBMIT_VALIDATION_ERROR?t(Y(e)):t(K(e));const s=Object(A.M)(c);t(Object(o.e)({duration:o.a,kind:S.b.Error,text:Object(n.a)(s,e)}))}},J="POST_DRAFT__LOAD_DRAFT",Z=Object(a.a)(J),ee=e=>async(t,s,{apiContext:r})=>{t(Z(e));let n=E.e;const a=s();if(e.subredditId){const t=Object(R.G)(a,{subredditId:e.subredditId}),s=Object(C.l)(a,{profileId:e.subredditId}),r=Object(A.j)(a);t?n={isProfile:!1,name:t.name}:s&&r&&(n={isProfile:!0,name:Object(T.f)(r)})}await t(Object(i.a)(n,e.id,!1));const c=Object(v.h)(s(),e.id);c&&h.h(s(),c)},te="POST_DELETE_DRAFT_SUCCEEDED",se="POST_DELETE_DRAFT_FAILED",re="POST_DELETE_DRAFT_PENDING",ne=Object(a.a)(te),ae=Object(a.a)(se),ce=Object(a.a)(re),ie=(e,t)=>async(s,a,{apiContext:i})=>{const p=a();if(Object(v.a)(p,e))return;const O=Object(v.d)(p,{draftId:e});O&&h.f(p,O),s(ce({draftId:e}));const f=await(async(e,t)=>Object(l.c)(Object(b.a)(e,[u.a]),{endpoint:`${e.apiUrl}/api/v1/draft?draft_id=${t}`,method:r.jb.DELETE}))(i(),e);if(f.ok){const r=Object(_.c)(f.body).draftsCount;s(ne({draftId:e,draftsCount:r}));const n=Object(d.v)(t);e===n&&s(Object(c.p)(!0,t))}else{const t=f.error,r=Object(A.M)(a());s(ae({draftId:e,apiError:t})),s(Object(o.e)({duration:o.a,kind:S.b.Error,text:Object(n.a)(r,t)}))}}},"./src/reddit/actions/postFlair.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return p}),s.d(t,"a",function(){return j}),s.d(t,"f",function(){return E}),s.d(t,"b",function(){return I}),s.d(t,"e",function(){return A}),s.d(t,"d",function(){return D}),s.d(t,"l",function(){return N}),s.d(t,"k",function(){return k}),s.d(t,"j",function(){return L}),s.d(t,"g",function(){return U}),s.d(t,"i",function(){return M}),s.d(t,"h",function(){return G});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/post.ts"),c=s("./src/reddit/actions/postFlairStyleTemplate.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/reddit/endpoints/flair/index.ts"),d=s("./src/reddit/models/Flair/index.ts"),u=s("./src/reddit/models/Toast/index.ts"),l=s("./src/reddit/selectors/subreddit.ts"),b=s("./src/reddit/selectors/user.ts");const p="STRUCTURED_STYLES__POSTFLAIR_ENABLED_SETTING_SUCCESS",O=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_ENABLED_SETTING_PENDING"),f=Object(n.a)(p),m=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_ENABLED_SETTING_FAILED"),j="STRUCTURED_STYLES__POSTFLAIR_ALLOW_ASSIGN_OWN_SETTING_SUCCESS",g=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_ALLOW_ASSIGN_OWN_SETTING_PENDING"),y=Object(n.a)(j),_=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_ALLOW_ASSIGN_OWN_SETTING_FAILED"),E="STRUCTURED_STYLES__POSTFLAIR_SAVETEMPLATE_SUCCESS",h=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_SAVETEMPLATE_PENDING"),S=Object(n.a)(E),T=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_SAVETEMPLATE_FAILED"),I="STRUCTURED_STYLES__POSTFLAIR_DELETETEMPLATE_SUCCESS",v=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_DELETETEMPLATE_PENDING"),C=Object(n.a)(I),R=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_DELETETEMPLATE_FAILED"),A="STRUCTURED_STYLES__POSTFLAIR_REORDERTEMPLATES_PENDING",D="STRUCTURED_STYLES__POSTFLAIR_REORDERTEMPLATES_FAILED",P=Object(n.a)(A),x=Object(n.a)("STRUCTURED_STYLES__POSTFLAIR_REORDERTEMPLATES_SUCCESS"),w=Object(n.a)(D),N=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(l.G)(a,{subredditId:e}).name;if(s(O()),(await Object(o.i)(n(),c,t)).ok){s(f({subredditId:e,isEnabled:t}))}else s(m())},k=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(l.G)(a,{subredditId:e}).name;if(s(g()),(await Object(o.h)(n(),t,d.c.LinkFlair,c)).ok){s(y({subredditId:e,canAssignOwn:t}))}else s(_())},L=(e,t,s,n)=>async(a,p,{apiContext:O})=>{const f=p(),m=Object(l.G)(f,{subredditId:t}).name,j=Object(b.M)(f);a(h());const g=await Object(o.d)(O(),e,m,d.c.LinkFlair);if(g.ok){const e=g.body;a(S({subredditId:t,template:e}));const o=Object(i.d)(Object(r.a)(j,"structuredStyles.forms.flair.toast.flairSaved"),u.b.SuccessMod);a(Object(i.e)(o)),e.id&&s&&n&&a(Object(c.g)(t,e.id,s,n))}else{a(T());const s=Object(i.d)(Object(r.a)(j,"structuredStyles.forms.flair.toast.flairNotSaved"),u.b.Error,Object(r.a)(j,"structuredStyles.forms.flair.toast.retryButtonText"),L(e,t));a(Object(i.e)(s))}},U=(e,t)=>async(s,n,{apiContext:a})=>{const c=n(),d=Object(l.G)(c,{subredditId:t}).name,p=Object(b.M)(c);if(s(v()),(await Object(o.a)(a(),e,d)).ok){s(C({subredditId:t,templateId:e}));const n=Object(i.d)(Object(r.a)(p,"structuredStyles.forms.flair.toast.flairDeleted"),u.b.SuccessMod);s(Object(i.e)(n))}else{s(R());const n=Object(i.d)(Object(r.a)(p,"structuredStyles.forms.flair.toast.flairNotDeleted"),u.b.Error,Object(r.a)(p,"structuredStyles.forms.flair.toast.retryButtonText"),U(e,t));s(Object(i.e)(n))}},M=(e,t,s)=>async(n,a,{apiContext:c})=>{const p=a(),O=Object(l.G)(p,{subredditId:s}).name,f=Object(b.M)(p);if(n(P({subredditId:s,templateIds:t})),(await Object(o.c)(c(),O,d.c.LinkFlair,t)).ok){n(x());const e=Object(i.d)(Object(r.a)(f,"structuredStyles.forms.flair.toast.flairReorderSuccess"),u.b.SuccessMod);n(Object(i.e)(e))}else{n(w({subredditId:s,templateIds:e}));const a=Object(i.d)(Object(r.a)(f,"structuredStyles.forms.flair.toast.flairReorderFailure"),u.b.Error,Object(r.a)(f,"structuredStyles.forms.flair.toast.retryButtonText"),M(e,t,s));n(Object(i.e)(a))}},G=({post:e,previewFlair:t,selectedTemplateId:s})=>async(r,n,{apiContext:c})=>{const i=e.flair.filter(e=>!Object(d.k)(e.type));if(t&&i.unshift(t),r(Object(a.B)({[e.id]:{flair:i}})),t){const r=Object(d.j)(t);Object(o.f)(c(),e.id,s,r)}else Object(o.f)(c(),e.id,"","")}},"./src/reddit/actions/postFlairStyleTemplate.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/isEqual.js"),n=s.n(r),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/reddit/actions/apiRequestState.ts"),i=s("./src/reddit/actions/imageUploads.ts"),o=s("./src/reddit/actions/structuredStyles.ts"),d=s("./src/reddit/helpers/getGenericUploadError.ts"),u=s("./src/reddit/helpers/media/index.ts"),l=s("./src/lib/constants/index.ts"),b=s("./src/lib/makeApiRequest/index.ts"),p=s("./src/lib/omitHeaders/index.ts"),O=s("./src/reddit/constants/headers.ts");var f=s("./src/reddit/helpers/trackers/blade.ts"),m=s("./src/reddit/selectors/subreddit.ts"),j=s("./src/telemetry/index.ts"),g=s("./src/reddit/models/Image/index.tsx");s.d(t,"b",function(){return y}),s.d(t,"d",function(){return _}),s.d(t,"e",function(){return E}),s.d(t,"c",function(){return h}),s.d(t,"g",function(){return T}),s.d(t,"a",function(){return I}),s.d(t,"f",function(){return C});const y="POSTFLAIR_STYLETEMPLATE_DRAFT_UPDATED",_=Object(a.a)(y),E=({subredditId:e,flairId:t,imageKey:s,imageData:r})=>async(n,a,c)=>{const o=a(),d=Object(m.G)(o,{subredditId:e});if(!d)return;n(Object(i.k)(r));const f=await(async(e,t,s,r,n,a)=>Object(b.c)(Object(p.a)(e,[O.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/flair_style_asset_upload_s3/${s}`,method:l.jb.POST,data:{filepath:r,imagetype:n,mimetype:a}}))(c.apiContext(),d.name,t,r.file.name,s,await Object(u.f)(r.file));try{const e=await Object(i.g)(a(),f,r,g.a.FlairTemplates);e&&n(Object(i.j)(e))}catch(j){if(j instanceof Error)throw j;n(Object(i.i)(j))}},h="POSTFLAIR_STYLETEMPLATE_SAVED_SUCCESS",S=Object(a.a)(h),T=(e,t,s,r)=>async(a,u,y)=>{a(Object(c.h)(r));const _=y.apiContext,E=u(),h=Object(m.G)(E,{subredditId:e});if(!h)return;const T=E.structuredStyles.flairTemplate.models[t];if(T&&n()(T,s))return;let I=null,v=null;try{(I=await Object(i.f)(E,g.a.FlairTemplates))&&(v=Object(i.m)(I)(a,u,y))}catch(D){const e=Object(d.a)("webSocket");return void a(Object(c.f)(r,e))}const C=await(async(e,t,s,r)=>Object(b.c)(Object(p.a)(e,[O.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/flair_styles/${s}`,method:l.jb.PUT,data:r}))(_(),h.name,t,s),R=T?"edit_post_flair_template":"save_post_flair_template",A=Object(f.f)(E,R);if(C.ok){if(v)try{await v}catch(D){}a(Object(c.e)(r)),a(S({flairId:t,template:s}))}else I&&I.websocket.close(),a(Object(c.f)(r,C.error));a(Object(o.x)()),Object(j.a)(Object.assign({},A,{actionInfo:Object.assign({},A.actionInfo,{success:C.ok})}))},I="POSTFLAIR_STYLETEMPLATE_DELETED_SUCCESS",v=Object(a.a)(I),C=(e,t,s)=>async(r,n,{apiContext:a})=>{const i=n();r(Object(c.h)(s));const d=Object(m.G)(i,{subredditId:e});if(!d)return;const u=await(async(e,t,s)=>Object(b.c)(Object(p.a)(e,[O.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/flair_styles/${s}`,method:l.jb.DELETE}))(a(),d.name,t),g=Object(f.f)(i,"delete_flair_template");u.ok?(r(v({flairId:t})),r(Object(c.e)(s))):r(Object(c.f)(s,u.error)),Object(j.a)(Object.assign({},g,{actionInfo:Object.assign({},g.actionInfo,{success:u.ok})})),r(Object(o.x)())}},"./src/reddit/actions/postList.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=(s("./src/reddit/actions/embedAndImage.ts"),s("./src/reddit/actions/video.ts"),s("./src/reddit/helpers/trackers/postList.ts"));s("./src/reddit/constants/postLayout.ts"),s("./src/reddit/selectors/platform.ts"),s("./src/reddit/selectors/posts.ts");s("./src/reddit/selectors/video.ts");s.d(t,"a",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"c",function(){return d});const a="POSTLIST__MARKED_END",c="POSTLIST__UNMARKED_END",i=Object(r.a)(a),o=Object(r.a)(c),d=(e,t)=>async(s,r)=>{const a=r();e in a.listings.postOrder.fetchedTokens?e in a.listings.postOrder.ids?s(o({listingKey:e})):n.j(a,e):s(i({listingKey:e,listingName:t}))}},"./src/reddit/actions/product.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/governance/errorToast.ts"),a=s("./src/reddit/endpoints/governance/badges.ts"),c=s("./src/config.ts"),i=s("./src/reddit/endpoints/governance/requester.ts");s.d(t,"b",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"a",function(){return u}),s.d(t,"c",function(){return l}),s.d(t,"g",function(){return b}),s.d(t,"e",function(){return p}),s.d(t,"f",function(){return O}),s.d(t,"h",function(){return f}),s.d(t,"i",function(){return h}),s.d(t,"j",function(){return S});const o="PRODUCT__BADGE_PURCHASE_OPENED",d="PRODUCT__BADGE_PURCHASE_SUCCESS",u="PRODUCT__BADGE_PURCHASE_FAILURE",l="PRODUCT__BADGE_PURCHASE_PENDING",b="PRODUCT__FETCH_SUCCESS",p="PRODUCT__FETCH_FAILURE",O="PRODUCT__FETCH_PENDING",f=Object(r.a)(o),m=Object(r.a)(d),j=Object(r.a)(u),g=Object(r.a)(l),y=Object(r.a)(b),_=Object(r.a)(p),E=Object(r.a)(O),h=({productId:e})=>async(t,s,{apiContext:r})=>{const o=s(),d=o.products.models[e],u=o.user.account,l=!!o.products.api.purchase.pending[e];if(d&&d.price&&!l){t(g({productId:e}));const s=await function(e,t){return Object(i.a)(e,{method:"post",endpoint:`${c.a.metaUrl}/orders`,data:t})}(r(),{price:d.price,products:{[e]:"1"},subredditId:d.subredditId});let o;if(s.ok&&u&&(o=await Object(a.c)(r(),d.subredditId,u.id)),s.ok){if(o&&o.ok){var b=o.body;const e=b.badges,r=b.userOwnedBadges;t(m({product:d,badges:e,userOwnedBadges:r,wallet:s.body.wallet}))}}else t(j({productId:e,error:s.error})),Object(n.a)(t,s.error)}},S=({subredditId:e})=>async(t,s,{apiContext:r})=>{t(E({subredditId:e}));const n=await function(e,t){return Object(i.a)(e,{method:"get",endpoint:`${c.a.metaUrl}/products/${t}?type=badge`})}(r(),e);n.ok?t(y({subredditId:e,products:n.body})):t(_({subredditId:e,error:n.error}))}},"./src/reddit/actions/profile/constants.ts":function(e,t,s){"use strict";s.d(t,"h",function(){return r}),s.d(t,"g",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"a",function(){return i}),s.d(t,"i",function(){return o}),s.d(t,"j",function(){return d}),s.d(t,"f",function(){return u}),s.d(t,"e",function(){return l}),s.d(t,"d",function(){return b});const r="PROFILE__PROFILE_INFO_LOADED",n="PROFILE__PROFILE_INFO_FAILED",a="PROFILE__MODERATED_SUBREDDITS_PENDING",c="PROFILE__MODERATED_SUBREDDITS_LOADED",i="PROFILE__MODERATED_SUBREDDITS_FAILED",o="PROFILE__RECEIVED_MODERATED_SUBREDDITS_MODELS",d="PROFILE__RECEIVED_MODERATED_SUBREDDITS_SUBSCRIPTIONS",u="MORE__PROFILE_GQL_MODERATED_PENDING",l="MORE__PROFILE_GQL_MODERATED_LOADED",b="MORE__PROFILE_GQL_MODERATED_FAILED"},"./src/reddit/actions/profile/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/pages/profilePrivate/constants.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts");var d=s("./src/graphql/operations/ModeratedSubreddits.json"),u=s("./src/lib/makeGqlRequest/index.ts");var l=s("./src/reddit/helpers/graphql/normalizeProfileFromGql/index.ts");var b=s("./src/reddit/helpers/r2/normalizeActionableUserFromR2/index.ts"),p=s("./src/reddit/helpers/r2/normalizeProfileAboutInfoFromR2/index.ts"),O=s("./src/reddit/helpers/r2/normalizeProfileSubredditFromR2/index.ts");var f=s("./src/reddit/models/User/index.ts"),m=s("./src/reddit/selectors/profile.ts"),j=s("./src/reddit/selectors/subscriptions.ts"),g=s("./src/reddit/selectors/user.ts"),y=s("./src/reddit/actions/profile/constants.ts");s.d(t,"a",function(){return C}),s.d(t,"d",function(){return R}),s.d(t,"b",function(){return A}),s.d(t,"c",function(){return w});const _=Object(r.a)(y.h),E=Object(r.a)(y.g),h=Object(r.a)(y.c),S=Object(r.a)(y.b),T=Object(r.a)(y.a),I=Object(r.a)(y.i),v=Object(r.a)(y.j),C=()=>async(e,t,{apiContext:s})=>{const r=Object(g.j)(t());r&&r.profileId&&await e(R(Object(f.f)(r)))},R=e=>async(t,s,{apiContext:r})=>{const n=s();if(!(!Object(m.h)(n,{profileName:e})||!Object(m.f)(n,{profileName:e})))return;const d=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/user/${t}/about.json`,method:a.jb.GET,data:{gilding_detail:1,raw_json:1}}))(r(),e);d.ok?t(_(function(e){const t=e.data;return Object.assign({about:Object(p.a)(t),banner:t.subreddit&&t.subreddit.banner_img&&{height:t.subreddit.banner_size[1],url:t.subreddit.banner_img,width:t.subreddit.banner_size[0]},user:Object(b.a)(t),features:t.features},t.subreddit?{profile:Object(O.a)(t.subreddit,t.name)}:null)}(d.body))):t(E(d.body))},A=e=>async(t,s,{apiContext:r})=>{const n={profileName:e};if(Object(m.a)(s(),n))return;if(Object(m.i)(s(),n))return;t(h(n));const d=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/user/${t}/moderated_subreddits.json`,method:a.jb.GET,data:{raw_json:1}}))(r(),e);if(d.ok){const r=function(e){return e?e.map(e=>({communityIcon:e.community_icon,displayText:e.sr_display_name_prefixed,icon:{height:e.icon_size?e.icon_size[1]:0,url:e.icon_img?e.icon_img:"",width:e.icon_size?e.icon_size[0]:0},id:e.name,isNSFW:e.over_18,isQuarantined:!!e.quarantine,name:"user"===e.subreddit_type?e.sr.slice(a.vc.length):e.sr,primaryColor:e.primary_color,subscribers:e.subscribers,title:e.title,type:e.subreddit_type,url:e.url,wls:e.wls})):[]}(d.body.data);t(S({profileName:e,data:r}));const n={},c={};if(r.forEach(e=>{("user"===e.type?c:n)[e.id]=e}),t(I({subreddits:n,profiles:c})),!Object(j.c)(s())){const e=(e=>{const t=e.filter(e=>e.user_is_subscriber);return{subredditOrder:t.filter(e=>"user"!==e.subreddit_type).map(e=>e.name),profileOrder:t.filter(e=>"user"===e.subreddit_type).map(e=>e.name)}})(d.body.data||[]);t(v(e))}}else t(T(d.body))},D=Object(r.a)(y.f),P=Object(r.a)(y.e),x=Object(r.a)(y.d),w=e=>async(t,s,r)=>{const a=s(),c=e.toLowerCase(),i=a.profiles.moderated.pageInfo;if(!i[c]||!i[c].hasNextPage||!i[c].endCursor)return;t(D({profileName:c}));const o=await((e,t)=>Object(u.a)(e,Object.assign({},d,{variables:t})))(r.gqlContext(),{name:c,after:i[c].endCursor,first:n.h}),b=o.body.data;if(o.ok){const e=Object(l.b)(b.redditor.moderatedSubreddits);t(P(Object.assign({profileName:c},e)))}else t(x(o.error))}},"./src/reddit/actions/profileConversations.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/difference.js"),n=s.n(r),a=s("./node_modules/lodash/pick.js"),c=s.n(a),i=s("./src/lib/constants/index.ts"),o=s("./src/lib/makeActionCreator/index.ts"),d=s("./src/reddit/actions/pages/profileShared.ts"),u=s("./src/reddit/constants/parameters.ts"),l=s("./src/reddit/constants/things.ts"),b=s("./src/config.ts"),p=s("./src/lib/makeApiRequest/index.ts"),O=s("./src/reddit/models/RichTextJson/addRTJParam.ts");var f=s("./src/reddit/helpers/makeProfileListingKey/index.ts");s.d(t,"f",function(){return m}),s.d(t,"e",function(){return j}),s.d(t,"d",function(){return g}),s.d(t,"c",function(){return y}),s.d(t,"b",function(){return _}),s.d(t,"a",function(){return E}),s.d(t,"h",function(){return R}),s.d(t,"g",function(){return A});const m="PROFILE_OVERVIEW_CONVERSATIONS__MORE_POSTS_PENDING",j="PROFILE_OVERVIEW_CONVERSATIONS__MORE_POSTS_LOADED",g="PROFILE_OVERVIEW_CONVERSATIONS__MORE_POSTS_FAILED",y="PROFILE__EXTRACOMMENTS_PENDING",_="PROFILE__EXTRACOMMENTS_LOADED",E="PROFILE__EXTRACOMMENTS_FAILED",h=Object(o.a)(m),S=Object(o.a)(j),T=Object(o.a)(g),I=Object(o.a)(_),v=Object(o.a)(y),C=Object(o.a)(E),R=()=>async(e,t,{apiContext:s})=>{const r=t(),a=r.platform.currentPage;if(!a||!a.routeMatch)return;var o=a.routeMatch.match;const l=o.queryParams,m=o.params;var j=Object(d.a)(r,l);const g=j.sort,y=j.t,_=m.profileName,E=_.toLowerCase(),I=Object(f.a)(E,i.tb,g,l),v=r.listings.postOrder.loadMore[I];if(!v)return;const C=r.listings.postOrder.api.pending[I],R=r.listings.postOrder.fetchedTokens,A=!(!R[I]||!R[I][v.token]);if(C||A)return;e(h({key:I,fetchedToken:v.token}));const D=await((e,t,s)=>Object(p.c)(e,{data:s,endpoint:Object(O.a)(`${b.a.gatewayUrl}/desktopapi/v1/user/${t}/conversations`),method:i.jb.GET}))(s(),_,Object.assign({after:v.token,dist:v.dist,sort:g,t:y},c()(l,u.j)));if(D.ok){const t=r.listings.postOrder.ids[I],s=Object.assign({},D.body,{postIds:n()(D.body.postIds,t)});e(S(Object.assign({fetchedToken:v.token,key:I,meta:r.meta,profileName:_},s)))}else e(T({error:D.error,fetchedToken:v.token,key:I,account:D.body.data?D.body.data.account:null}))},A=(e,t,s)=>async(r,n,{apiContext:a})=>{if(n().profileOverviewPage.conversations.extraComments.api.pending[s])return;r(v({extraCommentsId:s}));let c=t;t.startsWith(l.b)&&(c=t.slice(l.b.length));const o=s.split("-")[1],d=await((e,t,s,r)=>Object(p.c)(e,{endpoint:Object(O.a)(`${b.a.gatewayUrl}/desktopapi/v1/user/${t}/morecomments/${s}`),method:i.jb.GET,type:"json",data:{after:r,limit:14}}))(a(),e,c,o);d.ok?r(I(Object.assign({profileName:e,extraCommentsId:s},d.body))):r(C(d.body))}},"./src/reddit/actions/profileOverviewChrono.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return O}),s.d(t,"b",function(){return f}),s.d(t,"a",function(){return m}),s.d(t,"d",function(){return _});var r=s("./node_modules/lodash/difference.js"),n=s.n(r),a=s("./node_modules/lodash/pick.js"),c=s.n(a),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/reddit/helpers/makeProfileListingKey/index.ts"),d=s("./src/reddit/selectors/profileOverviewChronoItems.ts"),u=s("./src/lib/constants/index.ts"),l=s("./src/reddit/constants/parameters.ts"),b=s("./src/reddit/actions/pages/profileShared.ts"),p=s("./src/reddit/endpoints/page/profileOverviewPage.ts");const O="PROFILE_OVERVIEW_CHRONO__MORE_ITEMS_PENDING",f="PROFILE_OVERVIEW_CHRONO__MORE_ITEMS_LOADED",m="PROFILE_OVERVIEW_CHRONO__MORE_ITEMS_FAILED",j=Object(i.a)(O),g=Object(i.a)(f),y=Object(i.a)(m),_=()=>async(e,t,{apiContext:s})=>{const r=t(),a=r.platform.currentPage;if(!a||!a.routeMatch)return;var i=a.routeMatch.match;const O=i.queryParams,f=i.params;var m=Object(b.a)(r,O);const _=m.sort,E=m.t,h=f.profileName,S=Object(o.a)(h,u.sb,_,O),T=Object(d.d)(r,{listingKey:S});if(!T)return;const I=Object(d.b)(r,{listingKey:S}),v=Object(d.c)(r,{listingKey:S}),C=v&&v[T.token];if(I||C)return;e(j({key:S,fetchedToken:T.token}));const R=await Object(p.a)(s(),h,Object.assign({after:T.token,dist:T.dist,sort:_,t:E},c()(O,l.j)));if(R.ok){const t=Object(d.f)(r,{listingKey:S}),s=Object.assign({},R.body,{overviewIds:n()(R.body.overviewIds,t)});e(g(Object.assign({fetchedToken:T.token,key:S,meta:r.meta},s)))}else e(y({error:R.error,fetchedToken:T.token,key:S,account:R.body.data?R.body.data.account:null}))}},"./src/reddit/actions/promo.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return i}),s.d(t,"b",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"c",function(){return l});var r=s("./src/lib/cache/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/reddit/constants/promos.ts");const i="PROMO__HIDE_PROMO",o="PROMO__SHOW_PROMO",d=Object(a.a)(o),u=Object(a.a)(i),l=(e,t)=>async(s,a)=>{switch(e){case c.h.MobilePromoBanner:return s(u({promoType:e})),void Object(r.d)(c.e,!0,(t||3)*n.y);case c.h.UpsellSignUpBannerSmall:return void s(u({promoType:e}));case c.h.UpsellSignUpBannerLarge:case c.h.UpsellSignUpBannerMedium:return s(u({promoType:c.h.UpsellSignUpBannerLarge})),s(u({promoType:c.h.UpsellSignUpBannerMedium})),void Object(r.d)(c.i,!0,n.Dc)}}},"./src/reddit/actions/recommendations.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts");s("./src/config.ts"),s("./src/lib/constants/index.ts"),s("./src/lib/makeApiRequest/index.ts"),s("./src/reddit/helpers/addRedesignIdentifier/index.ts");s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});const n="RECOMMENDED_POSTS_FAILED",a="RECOMMENDED_POSTS_LOADED";Object(r.a)(a),Object(r.a)(n)},"./src/reddit/actions/redditEmbed.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return c}),s.d(t,"a",function(){return i}),s.d(t,"c",function(){return l});var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/endpoints/me/index.ts"),a=s("./src/reddit/helpers/pageActionLoginRedirect.ts");const c="REDDIT_EMBED_LOADED",i="REDDIT_EMBED_FAILED",o=Object(r.a)("REDDIT_EMBED_PENDING"),d=Object(r.a)(c),u=Object(r.a)(i),l=(e,t)=>async(e,s,{apiContext:r})=>{const c=s();e(o());const i=await Object(n.a)(r());i.ok&&i.body?!t||i.body.account?e(d(i.body)):Object(a.a)(e,c):e(u(i.error))}},"./src/reddit/actions/removalReasons/constants.ts":function(e,t,s){"use strict";s.d(t,"k",function(){return r}),s.d(t,"l",function(){return n}),s.d(t,"j",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"c",function(){return i}),s.d(t,"a",function(){return o}),s.d(t,"h",function(){return d}),s.d(t,"i",function(){return u}),s.d(t,"g",function(){return l}),s.d(t,"e",function(){return b}),s.d(t,"f",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"r",function(){return f}),s.d(t,"s",function(){return m}),s.d(t,"q",function(){return j}),s.d(t,"n",function(){return g}),s.d(t,"o",function(){return y}),s.d(t,"p",function(){return _}),s.d(t,"m",function(){return E}),s.d(t,"t",function(){return h});const r="REMOVALREASONS__LOAD_PENDING",n="REMOVALREASONS__LOAD_SUCCESS",a="REMOVALREASONS__LOAD_FAILED",c="REMOVALREASONS__ADD_PENDING",i="REMOVALREASONS__ADD_SUCCESS",o="REMOVALREASONS__ADD_FAILED",d="REMOVALREASONS__EDIT_PENDING",u="REMOVALREASONS__EDIT_SUCCESS",l="REMOVALREASONS__EDIT_FAILED",b="REMOVALREASONS__DELETE_PENDING",p="REMOVALREASONS__DELETE_SUCCESS",O="REMOVALREASONS__DELETE_FAILED",f="REMOVALREASONS__SUBMIT_PENDING",m="REMOVALREASONS__SUBMIT_SUCCESS",j="REMOVALREASONS__SUBMIT_FAILED",g="REMOVALREASONS__MESSAGE_PENDING",y="REMOVALREASONS__MESSAGE_PRIVATE_SUCCESS",_="REMOVALREASONS__MESSAGE_PUBLIC_SUCCESS",E="REMOVALREASONS__MESSAGE_FAILED",h="REMOVALREASONS__REMOVEDITEMS_SELECTED"},"./src/reddit/actions/reportFlow.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return g}),s.d(t,"c",function(){return y}),s.d(t,"b",function(){return _}),s.d(t,"g",function(){return T}),s.d(t,"e",function(){return I}),s.d(t,"a",function(){return v}),s.d(t,"i",function(){return A}),s.d(t,"f",function(){return D}),s.d(t,"h",function(){return w});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/modal.ts"),c=s("./src/reddit/actions/sitewideRules.ts"),i=s("./src/reddit/actions/subreddit.ts"),o=s("./src/reddit/actions/toaster.ts"),d=s("./src/reddit/actions/users.ts"),u=s("./src/reddit/constants/modals.ts"),l=s("./src/reddit/endpoints/moderator/moderatingSubreddits.ts"),b=s("./src/reddit/endpoints/post/index.tsx"),p=s("./src/reddit/helpers/isComment.ts"),O=s("./src/reddit/helpers/isPost.ts"),f=s("./src/reddit/models/Toast/index.ts"),m=s("./src/reddit/selectors/posts.ts"),j=s("./src/reddit/selectors/user.ts");const g="REPORT__PENDING",y="REPORT__LOADED",_="REPORT__FAILED",E=Object(n.a)(g),h=Object(n.a)(y),S=Object(n.a)(_),T=e=>async(t,s,{apiContext:n})=>{const a=e.id,c=s(),i=c.reportFlow.api.pending[a],d=c.reportFlow.userIsMod;if(i)return;t(E({id:a}));const u=`error-report-${a}`;(await Object(b.m)(n(),e)).ok?(t(h({id:a})),t(o.f(u)),d&&t(w())):(t(S({id:a})),t(o.e({id:u,kind:f.b.Error,text:Object(r.a)(c.user.language,"error.tryAgainLater"),buttonText:Object(r.a)(c.user.language,"reportFlow.reportRequest.retry"),buttonAction:T(e)})))},I="REPORT_FLOW__TARGET_SET",v="REPORT_FLOW__OPENED_FROM_MODAL_PAGE",C=Object(n.a)(I),R=Object(n.a)(v),A=(e,t)=>async(s,r,{apiContext:n})=>{const o=r(),l=Object(p.a)(e);if(!Object(O.a)(e)&&!l)return;const b=l?o.comments.models[e]:o.posts.models[e];if(!b)return;if(!Object(j.F)(r()))return s(Object(a.i)(u.a.REGISTER_MODAL_ID)),void s(Object(a.l)({actionSource:a.a.Report,redirectUrl:b.permalink}));s(Object(d.s)(b.author));const f=Object(m.O)(o,{postId:l?o.comments.models[e].postId:o.posts.models[e].id});o.sitewideRules&&o.sitewideRules.length||s(Object(c.b)()),f&&s(Object(i.n)(f.name,f.type)),s(C(e)),s(R(!!t)),f&&s(x(f.name))},D="REPORT_FLOW__USER_IS_MOD_SET",P=Object(n.a)(D),x=e=>async(t,s,{apiContext:r})=>{const n=await Object(l.a)(r());t(P(n.ok&&!!n.body[e]))},w=()=>async(e,t,{apiContext:s})=>{e(C(null))}},"./src/reddit/actions/search.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return O}),s.d(t,"c",function(){return f}),s.d(t,"a",function(){return m}),s.d(t,"e",function(){return j}),s.d(t,"h",function(){return g}),s.d(t,"f",function(){return h}),s.d(t,"d",function(){return S}),s.d(t,"g",function(){return T});var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/app/strings/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/lib/makeSearchKey/index.ts"),d=s("./src/reddit/actions/toaster.ts"),u=s("./src/reddit/constants/parameters.ts"),l=s("./src/reddit/endpoints/page/search.ts"),b=s("./src/reddit/models/Toast/index.ts"),p=s("./src/reddit/selectors/experiments/railsSearchResults.ts");const O="SEARCH__MORE_RESULTS_PENDING",f="SEARCH__MORE_RESULTS_RECEIVED",m="SEARCH__MORE_RESULTS_FAILED",j="SEARCH__UPDATE_SEARCH_QUERY",g=Object(i.a)(j),y=Object(i.a)(O),_=Object(i.a)(f),E=Object(i.a)(m),h=e=>async(t,s,{apiContext:r})=>{const i=s(),O=i.platform.currentPage.queryParams,f=i.platform.currentPage.urlParams.subredditName||i.platform.currentPage.urlParams.multiredditName,m=Object(o.d)(n()(O,u.p)),j=Object.assign({},m,{sort:m.category?c.jc.Relevance:m.sort,t:m.category?c.rc.DAY:m.t}),g=Object(o.c)(f,j),S=Object(p.c)(i);let T;if(e.indexOf(c.kc.Posts)>-1){const e=i.listings.postOrder.loadMore[g];if(!e)return;const t=i.listings.postOrder.api.pending[g],s=i.listings.postOrder.fetchedTokens,r=s[g]&&s[g][e.token];if(t||r)return;T=e.token}else{if(!(e.indexOf(c.kc.Subreddits)>-1||e.indexOf(c.kc.Users)>-1))throw new Error("Should not attempt to fetch more results without a search type");{const e=i.listings.listingOrder.loadMore[g];if(!e)return;const t=i.listings.listingOrder.api.pending[g],s=i.listings.listingOrder.fetchedTokens,r=s[g]&&s[g][e.token];if(t||r)return;T=e.token}}const I=`error-${g}`;t(y({fetchedToken:T,key:g,type:e}));const v=await Object(l.a)(r(),f,Object.assign({},j,{after:T,type:(m.type||[]).join(","),b:S}));v.ok?(t(_(Object.assign({key:g,fetchedToken:T,meta:i.meta,subredditOrMultiName:f,type:e},v.body))),t(d.f(I))):(t(E(Object.assign({key:g,error:v.error,fetchedToken:T,meta:i.meta,type:e},v.body))),t(d.e({id:I,kind:b.b.Error,text:Object(a.a)(i.user.language,"search.toast.moreResultsError"),buttonText:Object(a.a)(i.user.language,"search.toast.retryButton"),buttonAction:h(e)})))},S="SEARCH__TYPEAHEAD_SUCCESS",T=Object(i.a)(S)},"./src/reddit/actions/session.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts");s.d(t,"c",function(){return c}),s.d(t,"d",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"f",function(){return d}),s.d(t,"a",function(){return u}),s.d(t,"b",function(){return l}),s.d(t,"g",function(){return O});const c="SESSION__USER_AUTHENTICATED",i="SESSION__USER_LOGGED_OUT",o="SESSION__USER_REAUTHENTICATED",d="SESSION__USER_REFRESH_FAILED",u="SESSION__LOAT_RECEIVED",l="SESSION__LOAT_REFRESHED",b=(Object(r.a)(c),Object(r.a)(o)),p=Object(r.a)(i),O=(Object(r.a)(d),()=>async(e,t,{apiContext:s})=>{const r=t().user.session;if(r){const t=await((e,t)=>Object(a.c)(e,{data:t,endpoint:"/refreshproxy",method:n.jb.POST},a.d))(s(),r);if(t.ok){const s=t.body;s.unsafeLoggedOut?(r.unsafeLoggedOut||e(p()),e(f(s))):e(b(s))}}}),f=(Object(r.a)(u),Object(r.a)(l))},"./src/reddit/actions/shortcuts.ts":function(e,t,s){"use strict";var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/comment.ts"),c=s("./src/reddit/actions/modal.ts"),i=s("./src/reddit/actions/post.ts"),o=s("./src/reddit/actions/toaster.ts"),d=s("./src/reddit/components/Comments/helpers/hiddenComments.ts"),u=s("./src/reddit/constants/elementIds.ts"),l=s("./src/reddit/constants/modals.ts"),b=s("./src/reddit/constants/postLayout.ts"),p=s("./src/reddit/constants/shortcuts.ts"),O=s("./src/reddit/helpers/getPostFromRouteMatch/index.ts"),f=s("./src/reddit/helpers/overlay/index.ts"),m=s("./src/reddit/helpers/routeKey/index.ts"),j=s("./src/reddit/helpers/trackers/lightbox.ts"),g=s("./src/reddit/selectors/telemetry.ts");const y=e=>()=>({source:"shortcuts",action:"submit",noun:e}),_=(e,t)=>s=>({source:"shortcuts",action:"submit",noun:e,post:g.post(s,t)}),E=(e,t)=>s=>({source:"shortcuts",action:"submit",noun:e,post:g.comment(s,t)}),h=y("show_panel"),S=y("esc_close"),T=y("c_create_post");y("q_navigation");var I=s("./src/reddit/selectors/gild.ts"),v=s("./src/reddit/selectors/goldPurchaseModals.ts"),C=s("./src/reddit/selectors/listings.ts"),R=s("./src/reddit/selectors/platform.ts");s.d(t,"a",function(){return A}),s.d(t,"b",function(){return D}),s.d(t,"c",function(){return x}),s.d(t,"l",function(){return w}),s.d(t,"k",function(){return N}),s.d(t,"p",function(){return k}),s.d(t,"j",function(){return L}),s.d(t,"o",function(){return U}),s.d(t,"t",function(){return M}),s.d(t,"f",function(){return G}),s.d(t,"s",function(){return F}),s.d(t,"h",function(){return B}),s.d(t,"g",function(){return $}),s.d(t,"e",function(){return q}),s.d(t,"m",function(){return V}),s.d(t,"q",function(){return H}),s.d(t,"i",function(){return K}),s.d(t,"n",function(){return W}),s.d(t,"d",function(){return z}),s.d(t,"r",function(){return ee});const A="SHORTCUTS__ACTIVE_COMMENT_SET",D="SHORTCUTS__ACTIVE_POST_SET",P=Object(n.a)(A),x=Object(n.a)(D),w=e=>async(t,s,{apiContext:r})=>{t(Object(c.i)(l.a.KEYBOARD_SHORTCUTS)),e(h)},N=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=a.shortcuts.activePostId,i=a.listings.activeKey,o=a.listings.postOrder.ids[i];if(!c||o.indexOf(c)<0){const e=o[0];return s(x(e)),void J(e)}let d,u=c;do{if(!(d=Object(C.b)(a,{postId:u}))||!d.nextPost)return;u=d.nextPost.id}while(a.posts.models[u].hidden);a.shortcuts.namespace===p.d.Lightbox?(Q(s,d.nextPost),e(t?j.d(c,"next_post",!0):(e=>_("n_next",e))(u))):(s(x(u)),J(u),e((e=>_("j_next",e))(u)))},k=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.shortcuts.activePostId,c=n.listings.activeKey,i=n.listings.postOrder.ids[c];if(!a||i.indexOf(a)<0)return t(x(i[0])),void J(i[0]);if(0===i.indexOf(a))return;let o,d=a;do{if(!(o=Object(C.b)(n,{postId:d}))||!o.prevPost)return;d=o.prevPost.id}while(n.posts.models[d].hidden);n.shortcuts.namespace===p.d.Lightbox?(Q(t,o.prevPost),e((e=>_("p_previous",e))(d))):(t(x(d)),J(d),e((e=>_("k_previous",e))(d)))},L=e=>async(t,s,{apiContext:r})=>{const n=s(),a=X(n);if(!a)return;let c;const i=n.shortcuts.activeCommentId;if(i){const e=n.comments.collapsed[a],t=n.commentsPage.keyToCommentThreadLinkSets[a];if(e[c=i])do{if(!t[c].next)return;c=t[c].next.id}while(d.b(c));else c=t[c].next.id}else{const e=n.commentsPage.keyToHeadCommentId[a];if(!e)return;c=e}t(P(c)),J(c),e((e=>E("j_next",e))(c))},U=e=>async(t,s,{apiContext:r})=>{const n=s(),a=X(n);if(!a)return;let c;const i=n.shortcuts.activeCommentId;if(i&&i!==n.commentsPage.keyToHeadCommentId[a]){const e=n.commentsPage.keyToCommentThreadLinkSets[a];for(c=e[i].prev.id;d.b(c);)c=e[c].prev.id}else{const e=n.commentsPage.keyToHeadCommentId[a];if(!e||i===e)return;c=e}t(P(c)),J(c),e((e=>E("k_previous",e))(c))},M=e=>async(t,s,{apiContext:r})=>{const n=s();var c=n.shortcuts;const o=c.activeCommentId,d=c.activePostId,u=X(n);u&&(o&&!n.comments.collapsed[u][o]?(t(a.nb(o)),e((e=>E("a_upvote",e))(o))):d&&(t(i.J(d)),e((e=>_("a_upvote",e))(d))))},G=e=>async(t,s,{apiContext:r})=>{const n=s();var c=n.shortcuts;const o=c.activeCommentId,d=c.activePostId,u=X(n);u&&(o&&!n.comments.collapsed[u][o]?(t(a.S(o)),e((e=>E("z_downvote",e))(o))):d&&(t(i.n(d)),e((e=>_("z_downvote",e))(d))))},F=e=>async(t,s,{apiContext:r})=>{const n=s();var c=n.shortcuts;const o=c.activeCommentId,d=c.activePostId,u=X(n);u&&(o&&!n.comments.collapsed[u][o]?(t(a.db(o)),e((e=>E("s_save",e))(o))):d&&(t(i.D(d)),e((e=>_("s_save",e))(d))))},B=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.shortcuts.activePostId;a&&!n.posts.models[a].isSponsored&&(t(i.G(a,!n.posts.models[a].hidden,n.shortcuts.namespace===p.d.Lightbox,!0)),t(N(e)),e((e=>_("h_hide",e))(a)))},$=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.shortcuts.activePostId,c=b.a[n.user.prefs.layout];if(a&&(c===b.f.Compact||c===b.f.Classic)){const s=n.posts.models[a].crosspostRootId;(n.posts.models[a].media||s&&n.posts.models[s]&&n.posts.models[s].media)&&(t(i.o({postId:a})),e((e=>_("x_expando",e))(a)))}},q=e=>async(t,s,{apiContext:n})=>{const c=s(),i=c.shortcuts.activeCommentId,o=X(c);if(o&&i){if(c.comments.models[i])t(a.kb({commentId:i,commentsPageKey:o,scrollToAndRemeasure:()=>null}));else if(c.continueThreads.models[i]){const e=c.continueThreads.models[i].parentId,s=c.comments.models[e].permalink;t(Object(r.b)(s))}else t(U(e)),t(a.W(o,i));e((e=>E("enter_comment_collapse",e))(i))}},V=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.listings.activeKey,c=n.listings.postOrder.ids[a],i=n.shortcuts.activePostId;!c||!i||c.indexOf(i)<0||(t(Object(f.a)(n.posts.models[i].permalink)),e((e=>_("enter_open_post",e))(i)))},H=e=>async(t,s,{apiContext:r})=>{const n=s(),c=X(n),i=n.shortcuts.activeCommentId;i&&c&&c!==n.listings.activeKey&&(t(a.lb({commentsPageKey:c,parentCommentId:i})),e((e=>E("r_comment",e))(i)))},K=e=>async(t,s,{apiContext:n})=>{const a=s();if(!a.user.account)return;const c=Object(R.f)(a),i=c?c.url:"/";t(Object(r.b)(`${i}submit`)),e(T)},W=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.shortcuts.activePostId;if(a){const t=n.posts.models[a];if(t.source){const s=t.source.url,r=window.open(s,"_blank");r&&r.focus(),e((e=>_("l_go_to_link",e))(a))}}},Y=[v.d,v.q,e=>!!Object(I.d)(e)],z=(e,t)=>async(s,n,{apiContext:i})=>{const d=n();for(const e of Y)if(e(d))return;const u=document.activeElement,l=d.shortcuts.activeCommentId,b=X(d);if(u&&"true"===u.contentEditable&&l&&b)s(a.N({parentCommentId:l,commentsPageKey:b})),J(l);else if(d.activeModalId)Z(p.b),s(Object(c.i)(d.activeModalId));else if(d.toaster[0])Z(p.b),s(Object(o.f)(d.toaster[0].id));else if(d.shortcuts.namespace===p.d.Lightbox&&d.platform.currentPage){const e=d.platform.currentPage.locationState.closeLocation;e&&(Z(p.b),s(Object(r.b)(e)))}const O=d.shortcuts.activePostId;e(t&&O?j.d(O,"close",!0):S)},Q=(e,t)=>{Z(p.b),e(x(t.id)),document.body.style.overflow="",J(t.id),document.body.style.overflow="hidden",e(Object(f.a)(t.permalink));const s=document.getElementById(u.d);s&&s.scrollTo(0,0)},X=e=>{const t=e.platform.currentPage;if(!t||!t.routeMatch)return;const s=t.routeMatch,r=Object(O.a)(e);return Object(m.c)(s,e,r)},J=e=>{const t=document.getElementById(e);t&&t.focus()},Z=e=>{const t=document.getElementById(e),s=window.scrollX,r=window.scrollY;t&&(t.focus(),window.scrollTo(s,r))},ee=()=>{Z(p.b)}},"./src/reddit/actions/sitewideRules.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts");s.d(t,"a",function(){return d}),s.d(t,"b",function(){return b});const d="SITEWIDE_RULES_LOADED",u=Object(n.a)(d),l=Object(r.f)("reportFlow.sectionHeaders.spamAndAbuse"),b=()=>async(e,t,{apiContext:s})=>{const r=t();if(!r.user||!r.user.language)return;const n=await(e=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/api/sitewide_rules.json`,method:a.jb.GET}))(s());if(n.ok){const t=n.body.sitewide_rules;let s=[];if(t&&t.length){const e={reasonTextToShow:l(r.user.language),nextStepReasons:[t[0],t[1]]};s.push(e),s=s.concat(t.slice(2))}e(u(s))}}},"./src/reddit/actions/structuredStyles.ts":function(e,t,s){"use strict";s.d(t,"h",function(){return v}),s.d(t,"j",function(){return D}),s.d(t,"w",function(){return P}),s.d(t,"v",function(){return N}),s.d(t,"i",function(){return k}),s.d(t,"u",function(){return G}),s.d(t,"e",function(){return F}),s.d(t,"q",function(){return $}),s.d(t,"c",function(){return q}),s.d(t,"o",function(){return H}),s.d(t,"g",function(){return K}),s.d(t,"b",function(){return z}),s.d(t,"n",function(){return X}),s.d(t,"f",function(){return J}),s.d(t,"r",function(){return ee}),s.d(t,"d",function(){return te}),s.d(t,"p",function(){return re}),s.d(t,"a",function(){return ne}),s.d(t,"m",function(){return ae}),s.d(t,"k",function(){return ce}),s.d(t,"x",function(){return ie}),s.d(t,"l",function(){return oe}),s.d(t,"s",function(){return de}),s.d(t,"t",function(){return ue});var r=s("./node_modules/lodash/omit.js"),n=s.n(r),a=s("./node_modules/lodash/pick.js"),c=s.n(a),i=s("./node_modules/react-router-redux/es/index.js"),o=s("./src/lib/filterQueryParams/index.ts"),d=s("./src/lib/makeActionCreator/index.ts"),u=s("./src/reddit/actions/apiRequestState.ts"),l=s("./src/reddit/actions/imageUploads.ts"),b=s("./src/reddit/actions/modal.ts"),p=s("./src/reddit/constants/modals.ts"),O=s("./src/reddit/endpoints/moderator/structuredStyles.ts"),f=s("./src/reddit/helpers/getGenericUploadError.ts"),m=s("./src/reddit/helpers/media/index.ts"),j=s("./src/reddit/models/Image/index.tsx"),g=s("./src/reddit/models/StructuredStyles/index.ts"),y=s("./src/reddit/selectors/activeModalId.ts"),_=s("./src/reddit/selectors/platform.ts"),E=s("./src/reddit/selectors/structuredStyles.ts"),h=s("./src/reddit/selectors/subreddit.ts"),S=s("./src/reddit/selectors/user.ts"),T=s("./src/reddit/helpers/trackers/blade.ts"),I=s("./src/telemetry/index.ts");const v="STRUCTURED_STYLES__STYLES_REQUESTED_LOADED",C=Object(d.a)("STRUCTURED_STYLES__STYLES_REQUESTED_PENDING"),R=Object(d.a)(v),A=Object(d.a)("STRUCTURED_STYLES__STYLES_REQUESTED_FAILED"),D="STRUCTURED_STYLES__STYLES_UPDATED_LOADED",P=Object(d.a)(D),x={bannerBackgroundImage:["bannerBackgroundImagePosition"],bannerPositionedImage:["bannerPositionedImagePosition","secondaryBannerPositionedImage"]},w=e=>{const t=Object.assign({},e);return Object.keys(e).forEach(s=>{x[s]&&!e[s]&&x[s].forEach(e=>t[e]=null)}),t},N=(e,t,s,r)=>async(n,a,c)=>{const i=c.apiContext,o=a(),d=w(t),b=o.structuredStyles.models[e];let p;for(const e in d)if(d[e]!==b[e]){p=!0;break}if(!p)return;n(Object(u.h)(r));const m=Object(T.m)(s)(o);let g=null,y=null;try{(g=await Object(l.f)(a(),j.a.StructuredStyles))&&(y=Object(l.m)(g)(n,a,c))}catch(S){const e=Object(f.a)("webSocket");return void n(Object(u.f)(r,e))}const _=Object(h.G)(o,{subredditId:e}).name,E=await O.c(i(),_,d);if(E.ok){if(y)try{await y}catch(S){}n(Object(u.e)(r)),n(P({subredditId:e,styles:d}))}else g&&g.websocket.close(),n(Object(u.f)(r,E.error));Object(I.a)(Object.assign({},m,{actionInfo:Object.assign({},m.actionInfo,{success:E.ok})}))},k="STRUCTURED_STYLES__STYLES_RESET_LOADED",L=Object(d.a)("STRUCTURED_STYLES__STYLES_RESET_PENDING"),U=Object(d.a)(k),M=Object(d.a)("STRUCTURED_STYLES__STYLES_RESET_FAILED"),G=e=>async(t,s,{apiContext:r})=>{t(L({subredditId:e}));const n=Object(h.G)(s(),{subredditId:e}).name,a=await O.d(r(),n);if(a.ok){const r=s().structuredStyles.models[e],n=r?r.mobileKeyColor:null;t(U({subredditId:e,styles:{mobileKeyColor:n}}))}else t(M(Object.assign({subredditId:e},a.error)))},F="STRUCTURED_STYLES__EDITING_STARTED",B=Object(d.a)(F),$=e=>async(t,s,r)=>{const n=s(),a=n.structuredStyles.models[e]||{},c=Object(S.O)(n);t(B({isNightmodeOn:c,styles:a,subredditId:e})),((e,t)=>async(s,r,{apiContext:n})=>{s(C({subredditId:e}));const a=Object(h.G)(r(),{subredditId:e}).name,c=await O.a(n(),a,t);if(c.ok){let t,r,n;const a=c.body;a.data?(t=a.data.style,r=a.data.content.widgets.items,n=a.data.content.widgets.layout.sidebar.order):(t={},r={},n=[]),s(R({subredditId:e,styles:t,widgets:r,sidebar:n}))}else s(A(Object.assign({subredditId:e},c.error)))})(e,!1)(t,s,r)},q="STRUCTURED_STYLES__DRAFT_UPDATED",V=Object(d.a)(q),H=e=>async(t,s,r)=>{const n=w(e),a=s();for(const e in n)if(Object(g.h)(e))if(n[e]){if("string"!=typeof n[e]){const a=n[e],c=await Object(j.e)(a);Y(e,c)(t,s,r),n[e]=""}}else{const s=Object(E.g)(a,{name:e});s&&t(Object(l.h)(s))}t(V(n))},K="STRUCTURED_STYLES__IMAGE_UPLOAD_ADDED",W=Object(d.a)(K),Y=(e,t)=>async(s,r,n)=>{const a=r(),c=a.structuredStyles.isEditing,i=Object(h.G)(a,{subredditId:c}).name;s(W({imageKey:e,uploadId:t.id})),s(Object(l.k)(t));const o=await O.b(n.apiContext(),i,t.file.name,e,await Object(m.f)(t.file));try{const n=await Object(l.g)(r(),o,t,j.a.StructuredStyles);if(n){const t=n.url;s(Object(l.j)(n)),s(V({[e]:t}))}}catch(d){if(d instanceof Error)throw d;s(Object(l.i)(d))}},z="STRUCTURED_STYLES__DRAFT_REPLACED",Q=Object(d.a)(z),X=(e,t,s)=>async(r,a,i)=>{const o=a(),d=o.structuredStyles.models[e]||{},u=o.structuredStyles.draft,l=Object(T.l)(t)(o);if(s){const t=c()(d,s),a=n()(u,s),i=Object.assign({},a,t);r(Q({subredditId:e,styles:i}))}else{r(Q({subredditId:e,styles:d}))}Object(I.a)(l)},J="STRUCTURED_STYLES__EDITING_STOPPED",Z=Object(d.a)(J),ee=()=>async(e,t,s)=>{const r=t(),n=Object(S.P)(r),a=!!Object(_.a)(r);if(e(Z({nightmodeTempUpdated:n})),a)return;const c=r.platform.currentPage.url;c&&e(Object(i.c)(Object(o.a)(c,["styling","route"])))},te="STRUCTURED_STYLES__EDITING_FLAIR_STARTED",se=Object(d.a)(te),re=e=>async(t,s,r)=>{const n=s().structuredStyles.flairTemplate.models[e]||{};t(se({flairId:e,template:n}))},ne="STRUCTURED_STYLES__DIRTIED_BLADE_EDITOR",ae=Object(d.a)(ne),ce="STRUCTURED_STYLES__UNDIRTIED_BLADE_EDITOR",ie=Object(d.a)(ce),oe=()=>async e=>e(ee()),de=e=>async(t,s)=>{const r=s(),n=Object(E.i)(r);!Object(y.b)(p.a.BLADE_UNSAVED_CHANGES)(r)&&n&&(Object(E.a)(r,{subredditId:e})?t(Object(b.i)(p.a.BLADE_UNSAVED_CHANGES)):t(oe()))},ue=e=>async(t,s)=>{const r=s();Object(E.i)(r)||t(Object(S.O)(r)?Object(b.i)(p.a.BLADE_NIGHTMODE):$(e))}},"./src/reddit/actions/subreddit.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/app/strings/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/isFakeSubreddit/index.ts"),o=s("./src/lib/listingSort/index.ts"),d=s("./src/lib/makeActionCreator/index.ts"),u=s("./src/lib/makeListingKey/index.ts"),l=s("./src/reddit/actions/oldSiteRules.ts"),b=s("./src/reddit/actions/subredditRules/constants.ts"),p=s("./src/reddit/actions/toaster.ts"),O=s("./src/reddit/constants/originalContent.ts"),f=s("./src/reddit/constants/parameters.ts"),m=s("./src/reddit/constants/postLayout.ts"),j=s("./src/reddit/contexts/PageLayer/index.tsx"),g=s("./src/reddit/endpoints/governance/posts.ts"),y=s("./src/reddit/endpoints/modQueue/index.ts"),_=s("./src/lib/makeApiRequest/index.ts"),E=s("./src/lib/omitHeaders/index.ts"),h=s("./src/reddit/constants/headers.ts"),S=s("./src/reddit/endpoints/page/subredditPage.ts"),T=s("./src/graphql/operations/SubredditAbout.json"),I=s("./src/lib/makeGqlRequest/index.ts"),v=s("./src/reddit/endpoints/subreddit/rules.ts"),C=s("./src/reddit/helpers/filterListingResponse/index.ts"),R=s("./src/reddit/models/Subreddit/index.ts");const A={[R.a.Image]:"images",[R.a.Link]:"links",[R.a.Spoiler]:"spoilers",[R.a.Text]:"text",[R.a.Video]:"videos"};var D=e=>{const t=(e=>{return Object.assign({},{images:!1,links:!1,spoilers:!1,text:!1,videos:!1},e.reduce((e,t)=>(e[A[t]]=!0,e),{}))})(e.allowedPostTypes);return{[e.id]:{accountsActive:e.activeCount,allOriginalContent:!1,allowedPostTypes:t,emojisEnabled:!0,originalContentTagEnabled:!0,publicDescription:e.publicDescription.markdown,showMedia:!0,subscribers:e.subscribersCount,userIsSubscriber:e.isSubscribed,usingNewModmail:!0}}},P=s("./src/reddit/models/OcSubreddits/index.ts"),x=s("./src/reddit/models/Toast/index.ts"),w=s("./src/reddit/selectors/listings.ts"),N=s("./src/reddit/selectors/oldSiteRules.ts"),k=s("./src/reddit/selectors/profile.ts"),L=s("./src/reddit/selectors/subreddit.ts"),U=s("./src/reddit/selectors/user.ts");s.d(t,"j",function(){return M}),s.d(t,"i",function(){return G}),s.d(t,"h",function(){return F}),s.d(t,"d",function(){return B}),s.d(t,"p",function(){return H}),s.d(t,"n",function(){return z}),s.d(t,"r",function(){return J}),s.d(t,"g",function(){return Z}),s.d(t,"f",function(){return ee}),s.d(t,"e",function(){return te}),s.d(t,"q",function(){return ae}),s.d(t,"l",function(){return ce}),s.d(t,"m",function(){return ie}),s.d(t,"k",function(){return oe}),s.d(t,"o",function(){return be}),s.d(t,"b",function(){return pe}),s.d(t,"c",function(){return Oe}),s.d(t,"a",function(){return fe}),s.d(t,"s",function(){return ye});const M="SUBREDDIT__MORE_POSTS_PENDING",G="SUBREDDIT__MORE_POSTS_LOADED",F="SUBREDDIT__MORE_POSTS_FAILED",B="SUBREDDIT__META_FILTER_TOGGLED",$=Object(d.a)(M),q=Object(d.a)(G),V=Object(d.a)(F),H=Object(d.a)(B),K=Object(d.a)(b.b),W=Object(d.a)(b.c),Y=Object(d.a)(b.a),z=(e,t)=>async(s,r)=>{t===R.b.User?s(Q(e)):s(X(e)),0===Object(N.a)(r()).length&&s(Object(l.b)())},Q=e=>async(t,s,{apiContext:r})=>{const n=Object(k.j)(s(),e),a=await Object(v.c)(r(),e);if(a.ok){const e=a.body;t(K({rules:e,subredditId:n}))}},X=e=>async(t,s,{gqlContext:r})=>{const n=Object(L.z)(s(),e),c=Object(U.M)(s());t(W());const i=await Object(v.b)(r(),e);if(i.ok){const e=i.body;t(K({rules:e,subredditId:n}))}else{t(Y());const s=`error-block-${e}`;t(p.e({id:s,kind:x.b.Error,text:Object(a.a)(c,"error.tryAgainLater")}))}},J=e=>async(t,s,{apiContext:r})=>{const a=e.subredditName,d=Object(i.a)(a)?c.X.HOT:void 0;let l=e.sort||d,b=e.t;const p=s(),O=p.platform.currentPage?p.platform.currentPage.queryParams:{},y=Object(u.a)(a,l,O),_=p.listings.postOrder.loadMore[y],E=p.listings.postOrder.listingSort[y];if(E&&!l){const e=Object(o.d)(E.sort);l=e.sort,b=e.timeSort}const h=p.listings.postOrder.api.pending[y],T=p.listings.postOrder.fetchedTokens,I=!(!T[y]||!T[y][_.token]);if(h||I)return;t($({key:y,fetchedToken:_.token}));const v=Object.assign({after:_.token,dist:_.dist,layout:m.d[Object(j.O)(p,{})],sort:l,t:b},n()(O,[...f.j,f.f])),R=await Object(S.a)(r(),a,v),A=Object.assign({},R.body,Object(C.a)(p,y,R.body));if(R.ok){let e;const n=A.postIds.filter(e=>!!A.posts[e].isMeta),c=Object(L.z)(s(),a);if(n.length){const t=await Object(g.a)(r(),c,n);t.ok&&(e=t.body)}t(q(Object.assign({fetchedToken:_.token,key:y,meta:p.meta,governance:e},A)))}else t(V(Object.assign({error:R.error,fetchedToken:_.token,key:y},A)))},Z="SUBSCRIPTION__MODERATED_SUBREDDITS_PENDING",ee="SUBSCRIPTION__MODERATED_SUBREDDITS_LOADED",te="SUBSCRIPTION__MODERATED_SUBREDDITS_FAILED",se=Object(d.a)(Z),re=Object(d.a)(ee),ne=Object(d.a)(te),ae=()=>async(e,t,{apiContext:s})=>{const r=t();if(!r.user.account||r.subreddits.moderated.api.fetched)return;e(se());const n=await Object(y.b)(s(),c.nb.Modqueue,{moderated:!0,moderated_limit:50});n.ok?e(re(n.body)):e(ne({error:n.error}))},ce="POST_CREATION__OC_SUBREDDITS_REQUESTED",ie="POST_CREATION__OC_SUBREDDITS_SUCCEEDED",oe="POST_CREATION__OC_SUBREDDITS_FAILED",de=Object(d.a)(ce),ue=Object(d.a)(ie),le=Object(d.a)(oe),be=e=>async(t,s,{apiContext:r})=>{const n=s(),a=Object(u.a)(O.d,"",{category:e}),i=Object(w.j)(n,{listingKey:a}),o=i?i.token:void 0;if(i){const e=Object(w.h)(n,{listingKey:a}),t=Object(w.i)(n,{listingKey:a,token:i.token});if(e||t)return}t(de({key:a,fetchedToken:o}));const d=await((e,t)=>Object(_.c)(Object(E.a)(e,[h.a]),{data:t,endpoint:`${e.apiUrl}/api/oc_category_subreddits.json`,method:c.jb.GET}))(r(),{after:o,category:e});if(d.ok){var l=Object(P.c)(d.body.data.children.map(({data:e})=>e));const e=l.subreddits,s=l.subredditsAboutInfo,r=Object.keys(e);t(ue({key:a,fetchedToken:o,subreddits:e,subredditsAboutInfo:s,token:r[r.length-1]}))}else t(le({key:a,error:d.error}))},pe="SUBREDDIT__ABOUT_PENDING",Oe="SUBREDDIT__ABOUT_SUCCEEDED",fe="SUBREDDIT__ABOUT_FAILED",me=Object(d.a)(pe),je=Object(d.a)(Oe),ge=Object(d.a)(fe),ye=e=>async(t,s,{gqlContext:r})=>{const n=s();if(Object(L.s)(n,{subredditName:e})||n.subreddits.api.about.error[e.toLowerCase()]||n.subreddits.api.about.pending[e.toLowerCase()])return;t(me({subredditName:e}));const a=await((e,t)=>Object(I.a)(e,Object.assign({},T,{variables:{subredditName:t}})))(r(),e);if(a.ok){const s=D(a.body.data.subreddit);t(je({subredditName:e,data:s}))}else t(ge({subredditName:e,error:a.error}))}},"./src/reddit/actions/subredditAutocomplete.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts"),o=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const d=e=>(e.ok&&(e.body.subreddits=e.body.subreddits.map(e=>{var t=e.numSubscribers,s=o(e,["numSubscribers"]);return Object.assign({subscribers:t},s)})),e);var u=s("./src/reddit/helpers/name/index.ts"),l=s("./src/reddit/selectors/subredditAutocomplete.ts");s.d(t,"c",function(){return b}),s.d(t,"b",function(){return p}),s.d(t,"a",function(){return O}),s.d(t,"d",function(){return g});const b="SUBREDDIT_AUTOCOMPLETE__PENDING",p="SUBREDDIT_AUTOCOMPLETE__LOADED",O="SUBREDDIT_AUTOCOMPLETE__FAILED",f=Object(r.a)(b),m=Object(r.a)(p),j=Object(r.a)(O),g=(e,t=!1)=>async(s,r,{apiContext:o})=>{const b=Object(u.f)(e);if(!b)return;const p=r(),O=p.subredditAutocomplete;if(O.api.pending[b]||O.models[b])return;if(Object(l.c)(p,{substring:b}))return;s(f({key:b}));const g=await((e,t)=>Object(a.c)(Object(c.a)(e,[i.a]),{data:t,endpoint:`${e.apiUrl}/api/subreddit_autocomplete.json`,method:n.jb.GET}).then(d))(o(),{query:b,include_over_18:!1,include_profiles:t});g.ok?s(m(Object.assign({key:b},g.body))):s(j({key:b,error:g.error}))}},"./src/reddit/actions/subredditCreation.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts");var d=(e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/provider/subreddit/connect_subreddit`,method:a.jb.POST,data:{campaign_installation_id:t.campaignInstallationId,provider:t.provider,provider_id:t.providerId,subreddit:t.subredditName}});var u=s("./src/reddit/helpers/trackers/subredditCreation.ts"),l=s("./src/reddit/selectors/subreddit.ts"),b=s("./src/telemetry/index.ts");s.d(t,"f",function(){return p}),s.d(t,"g",function(){return O}),s.d(t,"e",function(){return f}),s.d(t,"d",function(){return m}),s.d(t,"i",function(){return _}),s.d(t,"k",function(){return E}),s.d(t,"j",function(){return h}),s.d(t,"b",function(){return S}),s.d(t,"c",function(){return T}),s.d(t,"a",function(){return I}),s.d(t,"h",function(){return A});const p="SUBREDDIT__CREATE_PENDING",O="SUBREDDIT__CREATE_SUCCEEDED",f="SUBREDDIT__CREATE_FAILED",m="SUBREDDIT__CREATE_CLEARED",j=Object(n.a)(p),g=Object(n.a)(O),y=Object(n.a)(f),_=Object(n.a)(m),E=e=>async(t,s,{apiContext:n})=>{const d=s(),p=e.name,O=e.type;if(Object(l.m)(d))return;t(j({subredditName:p}));const f=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/api/v1/subreddit/create_subreddit`,method:a.jb.POST,data:(e=>({public_description:e.publicDescription,name:e.name,type:e.type,over_18:e.over18}))(t)}))(n(),e);f.ok?(t(g({subredditName:p})),window.location.href=`${r.a.redditUrl}${f.body.path}new`,Object(b.a)(Object(u.b)(O,!0)(d))):(Object(b.a)(Object(u.b)(O,!1)(d)),t(y({subredditName:p,error:f.error})))},h=e=>async(t,s,{apiContext:r})=>{const n=s(),d=e.name;if(Object(l.m)(n))return;t(j({subredditName:d}));const u=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{endpoint:`${e.apiUrl}/provider/subreddit/create_subreddit`,method:a.jb.POST,data:(e=>({campaign_installation_id:e.campaignInstallationId,description:e.description,name:e.name,provider:e.provider,provider_id:e.providerId}))(t)}))(r(),e);u.ok?t(g({subredditName:d})):t(y({subredditName:d,error:u.error}))},S="SUBREDDIT__CONNECT_TO_PARTNER_PENDING",T="SUBREDDIT__CONNECT_TO_PARTNER_SUCCEEDED",I="SUBREDDIT__CONNECT_TO_PARTNER_FAILED",v=Object(n.a)(S),C=Object(n.a)(T),R=Object(n.a)(I),A=e=>async(t,s,{apiContext:r})=>{const n=s(),a=e.subredditName;if(Object(l.l)(n))return;t(v({subredditName:a}));const c=await d(r(),e);c.ok?t(C({subredditName:a})):t(R({subredditName:a,error:c.error}))}},"./src/reddit/actions/subredditCrosspostable.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/reddit/actions/subscription.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/omitHeaders/index.ts"),o=s("./src/reddit/constants/headers.ts"),d=s("./src/reddit/selectors/subreddit.ts");s.d(t,"c",function(){return u}),s.d(t,"b",function(){return l}),s.d(t,"a",function(){return b}),s.d(t,"d",function(){return f});const u="SUBREDDIT_CROSSPOSTABLE__PENDING",l="SUBREDDIT_CROSSPOSTABLE__LOADED",b="SUBREDDIT_CROSSPOSTABLE__FAILED",p=(Object(r.a)(u),Object(r.a)(l)),O=Object(r.a)(b),f=()=>async(e,t,{apiContext:s})=>{await e(n.h());var r=t().subreddits.crosspostable;const u=r.api,l=r.ids;if(u.pending||Object.keys(l).length)return;const b=await((e,t)=>Object(c.c)(Object(i.a)(e,[o.a]),{data:t,endpoint:`${e.apiUrl}/api/crosspostable_subreddits.json`,method:a.jb.GET}))(s(),{sr_detail:!1});if(b.ok){const s=t(),r=b.body&&b.body.length?b.body.map(e=>Object(d.z)(s,e)).filter(e=>!!e).reduce((e,t)=>(e[t]=!0,e),{}):{};e(p({subredditIds:r}))}else e(O({error:b.error}))}},"./src/reddit/actions/subredditDuplicates.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/config.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/reddit/models/Post/index.ts");var o=s("./src/reddit/models/Duplicates/index.ts"),d=s("./src/reddit/models/Subreddit/index.ts"),u=s("./src/reddit/selectors/profile.ts"),l=s("./src/reddit/selectors/subreddit.ts");s.d(t,"a",function(){return b}),s.d(t,"b",function(){return O});const b="SUBREDDIT_DUPLICATES_IN_SUBREDDIT_LOADED",p=(Object(r.a)("SUBREDDIT_DUPLICATES_IN_SUBREDDIT_PENDING"),Object(r.a)(b)),O=(e,t)=>async(s,r,{apiContext:b})=>{const O=Object(l.G)(r(),{subredditId:e})||Object(u.l)(r(),{profileId:e});if(!O)return;const f={crossposts_only:!0,sort:"new",sr:Object(d.c)(O)?n.vc+O.name:O.name},m=await((e,t,s)=>Object(c.c)(e,{data:s,endpoint:`${a.a.gatewayUrl}/desktopapi/v1/duplicates/${Object(i.g)(t)}`,method:n.jb.GET}))(b(),t,f);if(m.ok){const r=m.body;s(p({distinguishKey:Object(o.a)(t,f),postIds:r.postIds,posts:r.posts,profiles:r.profiles,subreddits:r.subreddits,subredditId:e}))}}},"./src/reddit/actions/subredditModeration.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/get.js"),n=s.n(r),a=s("./src/lib/makeActionCreator/index.ts"),c=s("./src/app/strings/index.ts"),i=s("./src/reddit/actions/apiRequestState.ts"),o=s("./src/reddit/actions/modal.ts"),d=s("./src/reddit/actions/subreddit.ts"),u=s("./src/reddit/actions/toaster.ts"),l=s("./src/reddit/constants/modals.ts"),b=s("./src/lib/constants/index.ts"),p=s("./src/lib/makeApiRequest/index.ts"),O=s("./src/lib/omitHeaders/index.ts"),f=s("./src/reddit/constants/headers.ts");const m=(e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/contributors`,method:b.jb.GET,data:s}),j=(e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/banned`,method:b.jb.GET,data:s}),g=(e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/moderators`,method:b.jb.GET,data:Object.assign({},s,{count:10})}),y=(e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/moderators_invited`,method:b.jb.GET,data:Object.assign({},s,{count:50})}),_=(e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/muted`,method:b.jb.GET,data:s});var E=s("./src/reddit/helpers/normalizeUsername/index.tsx"),h=s("./src/reddit/models/ModeratingSubreddits/index.ts"),S=s("./src/reddit/models/SubredditModeration/index.ts"),T=s("./src/reddit/models/Toast/index.ts"),I=s("./src/reddit/models/User/index.ts"),v=s("./src/reddit/selectors/activeModalId.ts"),C=s("./src/reddit/selectors/subreddit.ts"),R=s("./src/reddit/selectors/user.ts");s.d(t,"J",function(){return A}),s.d(t,"H",function(){return D}),s.d(t,"G",function(){return P}),s.d(t,"ib",function(){return k}),s.d(t,"M",function(){return L}),s.d(t,"L",function(){return U}),s.d(t,"K",function(){return M}),s.d(t,"jb",function(){return $}),s.d(t,"I",function(){return q}),s.d(t,"N",function(){return V}),s.d(t,"ob",function(){return W}),s.d(t,"hb",function(){return Y}),s.d(t,"e",function(){return z}),s.d(t,"d",function(){return Q}),s.d(t,"c",function(){return X}),s.d(t,"V",function(){return te}),s.d(t,"h",function(){return se}),s.d(t,"g",function(){return re}),s.d(t,"f",function(){return ne}),s.d(t,"W",function(){return oe}),s.d(t,"b",function(){return de}),s.d(t,"i",function(){return ue}),s.d(t,"U",function(){return pe}),s.d(t,"mb",function(){return Oe}),s.d(t,"m",function(){return fe}),s.d(t,"l",function(){return me}),s.d(t,"k",function(){return je}),s.d(t,"Z",function(){return Ee}),s.d(t,"p",function(){return he}),s.d(t,"o",function(){return Se}),s.d(t,"n",function(){return Te}),s.d(t,"ab",function(){return Re}),s.d(t,"j",function(){return Ae}),s.d(t,"q",function(){return De}),s.d(t,"Y",function(){return we}),s.d(t,"nb",function(){return Ne}),s.d(t,"C",function(){return ke}),s.d(t,"B",function(){return Le}),s.d(t,"A",function(){return Ue}),s.d(t,"t",function(){return Be}),s.d(t,"s",function(){return $e}),s.d(t,"r",function(){return qe}),s.d(t,"fb",function(){return We}),s.d(t,"db",function(){return Ye}),s.d(t,"x",function(){return ze}),s.d(t,"w",function(){return Qe}),s.d(t,"v",function(){return Xe}),s.d(t,"eb",function(){return tt}),s.d(t,"a",function(){return st}),s.d(t,"T",function(){return ct}),s.d(t,"Q",function(){return it}),s.d(t,"R",function(){return lt}),s.d(t,"lb",function(){return pt}),s.d(t,"u",function(){return Ot}),s.d(t,"cb",function(){return gt}),s.d(t,"F",function(){return yt}),s.d(t,"E",function(){return _t}),s.d(t,"D",function(){return Et}),s.d(t,"gb",function(){return It}),s.d(t,"y",function(){return vt}),s.d(t,"O",function(){return Rt}),s.d(t,"S",function(){return Dt}),s.d(t,"z",function(){return Pt}),s.d(t,"bb",function(){return wt}),s.d(t,"P",function(){return Nt}),s.d(t,"kb",function(){return Mt}),s.d(t,"X",function(){return Gt});const A="SUBREDDIT__MUTEDUSERS_PENDING",D="SUBREDDIT__MUTEDUSERS_LOADED",P="SUBREDDIT__MUTEDUSERS_FAILED",x=Object(a.a)(A),w=Object(a.a)(D),N=Object(a.a)(P),k=(e,t={})=>async(s,r,{apiContext:n})=>{const a=r(),c=t.after||"",i=Object(S.d)(e,c),o=a.muted.fetchedTokens[i];if(a.muted.api.pending[i]||o)return;s(x({subredditId:e,fetchedToken:c}));const d=a.subreddits.models[e].name,u=await _(n(),d,t);u.ok?s(w(Object.assign({},u.body,{fetchedToken:c}))):s(N({subredditId:e,fetchedToken:c}))},L="SUBREDDIT_MUTEDUSERS_SEARCH_PENDING",U="SUBREDDIT_MUTEDUSERS_SEARCH_LOADED",M="SUBREDDIT_MUTEDUSERS_SEARCH_FAILED",G=Object(a.a)(L),F=Object(a.a)(U),B=Object(a.a)(M),$=(e,t)=>async(s,r,{apiContext:n})=>{const a=r().subreddits.models[e].name,c={username:Object(E.a)(t)};s(G());const i=await _(n(),a,c);i.ok?s(F(i.body)):s(B(i.error))},q="SUBREDDIT_MUTEDUSERS_MUTED_SUCCESS",V="SUBREDDIT_MUTEDUSERS_UNMUTED_SUCCESS",H=Object(a.a)(q),K=Object(a.a)(V),W=(e,t)=>async(s,r,{apiContext:a})=>{const i=r(),o=i.subreddits.models[e].url,d=await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/unfriend`,method:b.jb.POST,data:{api_type:"json",id:s,type:"muted"}}))(a(),o,t);if(d.ok)s(K({subredditId:e,userId:t}));else{const e=n()(d,"body.json.errors[0][1]",Object(c.a)(i.user.language,"error.type.generic"));s(Object(u.e)({kind:T.b.Error,text:e,duration:3e3}))}},Y=(e,t,s)=>async(r,a,{apiContext:i})=>{const o=a(),d=o.subreddits.models[e].url,l=o.subreddits.models[e].name;t=Object(E.a)(t);const m=await((e,t,s,r)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/friend`,method:b.jb.POST,data:{api_type:"json",name:s,note:r,type:"muted"}}))(i(),d,t,s);if(m.ok){const e={username:t};r(Object(u.e)({kind:T.b.SuccessMod,text:Object(c.a)(o.user.language,"subredditModeration.mutedUsers.successAdd")}));const s=await _(i(),l,e);s.ok&&r(H(s.body))}else{const e=n()(m,"body.json.errors[0][1]",Object(c.a)(o.user.language,"error.type.generic"));r(Object(u.e)({kind:T.b.Error,text:e,duration:3e3}))}},z="SUBREDDIT__APPROVEDSUBMITTERS_PENDING",Q="SUBREDDIT__APPROVEDSUBMITTERS_LOADED",X="SUBREDDIT__APPROVEDSUBMITTERS_FAILED",J=Object(a.a)(z),Z=Object(a.a)(Q),ee=Object(a.a)(X),te=(e,t={})=>async(s,r,{apiContext:n})=>{const a=r(),c=t.after||"",i=Object(S.d)(e,c),o=a.approvedSubmitters.fetchedTokens[i];if(a.approvedSubmitters.api.pending[i]||o)return;s(J({subredditId:e,fetchedToken:c}));const d=a.subreddits.models[e].name,u=await m(n(),d,t);u.ok?s(Z(Object.assign({},u.body,{fetchedToken:c}))):s(ee({subredditId:e,fetchedToken:c}))},se="SUBREDDIT_APPROVEDSUBMITTERS_SEARCH_PENDING",re="SUBREDDIT_APPROVEDSUBMITTERS_SEARCH_LOADED",ne="SUBREDDIT_APPROVEDSUBMITTERS_SEARCH_FAILED",ae=Object(a.a)(se),ce=Object(a.a)(re),ie=Object(a.a)(ne),oe=(e,t)=>async(s,r,{apiContext:n})=>{const a=r().subreddits.models[e].name,c={username:Object(E.a)(t)};s(ae());const i=await m(n(),a,c);i.ok?s(ce(i.body)):s(ie(i.error))},de="SUBREDDIT_APPROVEDSUBMITTERS_APPROVED_SUCCESS",ue="SUBREDDIT_APPROVEDSUBMITTERS_UNAPPROVED_SUCCESS",le=Object(a.a)(de),be=Object(a.a)(ue),pe=(e,t)=>async(s,r,{apiContext:a})=>{const i=r(),o=i.subreddits.models[e].url,d=i.subreddits.models[e].name;t=Object(E.a)(t);const l=await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/friend`,method:b.jb.POST,data:{api_type:"json",name:s,type:"contributor"}}))(a(),o,t);if(l.ok){const e={username:t};s(Object(u.e)({kind:T.b.SuccessMod,text:Object(c.a)(i.user.language,"subredditModeration.approvedSubmitters.successAdd",{username:t})}));const r=await m(a(),d,e);r.ok&&s(le(r.body))}else{const e=n()(l,"body.json.errors[0][1]",Object(c.a)(i.user.language,"error.type.generic"));s(Object(u.e)({kind:T.b.Error,text:e,duration:3e3}))}},Oe=(e,t)=>async(s,r,{apiContext:a})=>{const i=r(),o=i.subreddits.models[e].url,d=await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/unfriend`,method:b.jb.POST,data:{api_type:"json",id:s,type:"contributor"}}))(a(),o,t);if(d.ok)s(be({subredditId:e,userId:t}));else{const e=n()(d,"body.json.errors[0][1]",Object(c.a)(i.user.language,"error.type.generic"));s(Object(u.e)({kind:T.b.Error,text:e,duration:3e3}))}},fe="SUBREDDIT__BANNEDUSERS_PENDING",me="SUBREDDIT__BANNEDUSERS_LOADED",je="SUBREDDIT__BANNEDUSERS_FAILED",ge=Object(a.a)(fe),ye=Object(a.a)(me),_e=Object(a.a)(je),Ee=(e,t={})=>async(s,r,{apiContext:n})=>{const a=r(),c=t.after||"",i=Object(S.d)(e,c),o=a.banned.fetchedTokens[i];if(a.banned.api.pending[i]||o)return;s(ge({subredditId:e,fetchedToken:c}));const d=a.subreddits.models[e].name,u=await j(n(),d,t);u.ok?s(ye(Object.assign({},u.body,{fetchedToken:c}))):s(_e({subredditId:e,fetchedToken:c}))},he="SUBREDDIT_BANNEDUSERS_SEARCH_PENDING",Se="SUBREDDIT_BANNEDUSERS_SEARCH_LOADED",Te="SUBREDDIT_BANNEDUSERS_SEARCH_FAILED",Ie=Object(a.a)(he),ve=Object(a.a)(Se),Ce=Object(a.a)(Te),Re=(e,t)=>async(s,r,{apiContext:n})=>{const a=r().subreddits.models[e].name,c={username:Object(E.a)(t)};s(Ie());const i=await j(n(),a,c);i.ok?s(ve(i.body)):s(Ce(i.error))},Ae="SUBREDDIT_BANNEDUSERS_BAN_SUCCESS",De="SUBREDDIT_BANNEDUSERS_UNBAN_SUCCESS",Pe=Object(a.a)(Ae),xe=Object(a.a)(De),we=(e,t,s)=>async(r,a,{apiContext:o})=>{const d=a(),l=d.subreddits.models[e].url,m=d.subreddits.models[e].name;t.username=Object(E.a)(t.username),r(Object(i.h)(s));const g=await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/friend`,method:b.jb.POST,data:{api_type:"json",ban_reason:s.reason,ban_message:s.banMessage,duration:s.duration,name:s.username,note:s.modNote,ban_context:s.contextId,type:"banned"}}))(o(),l,t);if(g.ok){r(Object(i.e)(s));const e={username:t.username};r(Object(u.e)({kind:T.b.SuccessMod,text:Object(c.a)(d.user.language,"subredditModeration.bannedUsers.successAdd")}));const n=await j(o(),m,e);n.ok&&r(Pe(n.body))}else{r(Object(i.f)(s,g.error));const e=n()(g,"body.json.errors[0][1]",Object(c.a)(d.user.language,"error.type.generic"));r(Object(u.e)({kind:T.b.Error,text:e,duration:3e3}))}},Ne=(e,t)=>async(s,r,{apiContext:a})=>{const i=r(),o=i.subreddits.models[e].url,d=await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/unfriend`,method:b.jb.POST,data:{api_type:"json",id:s,type:"banned"}}))(a(),o,t);if(d.ok)s(xe({subredditId:e,userId:t}));else{const e=n()(d,"body.json.errors[0][1]",Object(c.a)(i.user.language,"error.type.generic"));s(Object(u.e)({kind:T.b.Error,text:e,duration:3e3}))}},ke="SUBREDDIT__MODERATORS_PENDING",Le="SUBREDDIT__MODERATORS_LOADED",Ue="SUBREDDIT__MODERATORS_FAILED",Me=Object(a.a)(ke),Ge=Object(a.a)(Le),Fe=Object(a.a)(Ue),Be="SUBREDDIT__EDITABLEMODERATORS_PENDING",$e="SUBREDDIT__EDITABLEMODERATORS_LOADED",qe="SUBREDDIT__EDITABLEMODERATORS_FAILED",Ve=Object(a.a)(Be),He=Object(a.a)($e),Ke=Object(a.a)(qe),We=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(C.G)(a,{subredditId:e}).name,i=t&&t.after?t.after:"",o=t&&t.before?t.before:"",d=Object(S.d)(e,i,o),u=a.moderators.userOrder.data[d],l=a.moderators.userOrder.api.error[d];if(a.moderators.userOrder.api.pending[d]||u&&!l)return;s(Me({subredditId:e,key:d}));const b=await g(n(),c,t);if(b.ok){const t={key:d,response:b.body,subredditId:e};s(Ge(t))}else{const t={error:b.error,subredditId:e,key:d};s(Fe(t))}},Ye=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(C.G)(a,{subredditId:e}).name,i=t&&t.afterEditable?t.afterEditable:"",o=t&&t.beforeEditable?t.beforeEditable:"",d=Object(S.d)(e,i,o),u=a.moderators.editableUserOrder.data[d],l=a.moderators.editableUserOrder.api.error[d];if(a.moderators.editableUserOrder.api.pending[d]||u&&!l)return;s(Ve({subredditId:e,key:d}));const m=Object.assign({},t,{after:i,before:o}),j=await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/moderators_editable`,method:b.jb.GET,data:Object.assign({},s,{count:10})}))(n(),c,m);if(j.ok){const t={key:d,response:j.body,subredditId:e};s(He(t))}else{const t={key:d,error:j.error,subredditId:e};s(Ke(t))}},ze="SUBREDDIT__INVITEDMODERATORS_PENDING",Qe="SUBREDDIT__INVITEDMODERATORS_LOADED",Xe="SUBREDDIT__INVITEDMODERATORS_FAILED",Je=Object(a.a)(ze),Ze=Object(a.a)(Qe),et=Object(a.a)(Xe),tt=e=>async(t,s,{apiContext:r})=>{const n=s(),a=Object(C.G)(n,{subredditId:e}).name;if(n.moderators.invitedModerators.api.pending)return;t(Je());const c=await y(r(),a);if(c.ok){const e=c.body;t(Ze(e))}else t(et(c.error))},st="SUBREDDIT__ADDMODERATOR__SUCCESS",rt=Object(a.a)("SUBREDDIT__ADDMODERATOR_PENDING"),nt=Object(a.a)(st),at=Object(a.a)("SUBREDDIT__ADDMODERATOR__FAILED"),ct=(e,t,s)=>async(r,n,{apiContext:a})=>{const i=n(),o=Object(C.G)(i,{subredditId:e}),d=o.name,l=o.url;t=Object(E.a)(t),r(rt());const m=Object(h.c)(s),j=await((e,t,s,r)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/friend`,method:b.jb.POST,data:{name:s,type:"moderator_invite",permissions:r,api_type:"json"}}))(a(),l,t,m);if(j.ok){const s=await y(a(),d,{username:t});if(j.ok){const t=s.body,n=t.moderatorIds[0];i.moderators.invitedModerators.models[e][n]?r(Object(u.e)({kind:T.b.SuccessCommunity,text:Object(c.a)(i.user.language,"subredditModeration.moderators.userAlreadyInvited")})):(r(Object(u.e)({kind:T.b.SuccessMod,text:Object(c.a)(i.user.language,"subredditModeration.moderators.successAdd")})),r(nt(t)))}}else{const e=j.body.json&&j.body.json.errors;e&&e[0]&&e[0][1]&&r(Object(u.e)({kind:T.b.Error,text:e[0][1],duration:3e3})),r(at())}},it="SUBREDDIT__REMOVEMODERATOR__SUCCESS",ot=Object(a.a)("SUBREDDIT__REMOVEMODERATOR_PENDING"),dt=Object(a.a)(it),ut=Object(a.a)("SUBREDDIT__REMOVEMODERATOR__FAILED"),lt="SUBREDDIT__RESIGNMODERATOR__SUCCESS",bt=Object(a.a)(lt),pt=(e,t,s,r)=>async(n,a,{apiContext:c})=>{const i=a(),o=i.subreddits.models[e].name,d=Object(S.d)(e,s,r);if(n(ot()),(await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/unfriend`,method:b.jb.POST,data:{id:s,type:"moderator",r:t,api_type:"json"}}))(c(),o,t)).ok){n(dt({subredditId:e,userId:t,key:d}));const s=Object(R.j)(i);s&&s.id===t&&n(bt({subredditId:e,userId:t}))}else n(ut())},Ot="SUBREDDIT__EDITMODERATOR__SUCCESS",ft=Object(a.a)("SUBREDDIT__EDITMODERATOR_PENDING"),mt=Object(a.a)(Ot),jt=Object(a.a)("SUBREDDIT__EDITMODERATOR__FAILED"),gt=(e,t,s,r)=>async(n,a,{apiContext:c})=>{const i=a().subreddits.models[e].url;n(ft());const o=Object(h.c)(s);if((await((e,t,s,r)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/setpermissions`,method:b.jb.POST,data:{name:s,type:"moderator",permissions:r,api_type:"json"}}))(c(),i,t,o)).ok){n(mt({permissions:s,subredditId:e,userId:r}))}else n(jt())},yt="SUBREDDIT_MODERATORS_SEARCH_PENDING",_t="SUBREDDIT_MODERATORS_SEARCH_LOADED",Et="SUBREDDIT_MODERATORS_SEARCH_FAILED",ht=Object(a.a)(yt),St=Object(a.a)(_t),Tt=Object(a.a)(Et),It=(e,t)=>async(s,r,{apiContext:n})=>{const a=r().subreddits.models[e].name,c={username:Object(E.a)(t)};s(ht());const i=await g(n(),a,c);i.ok?s(St(i.body)):s(Tt(i.error))},vt="SUBREDDIT_MODERATORS_ACCEPT_INVITE_SUCCESS",Ct=Object(a.a)(vt),Rt="SUBREDDIT_NEWMODERATORPERMISSIONS_LOADED",At=Object(a.a)(Rt),Dt=e=>async(t,s,{apiContext:r})=>{const n=s(),a=n.user.account;if(!a)return;const c=n.subreddits.models[e],i=c.url,o=c.name;if((await((e,t)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}${t}api/accept_moderator_invite`,method:b.jb.POST,data:{api_type:"json"}}))(r(),i)).ok){t(Ct({subredditId:e})),t(Ye(e)),t(tt(e)),t(We(e));const s={username:Object(I.f)(a)},n=await g(r(),o,s);if(n.ok){const s=n.body.moderators[a.id];s&&t(At({[e]:s.modPermissions}))}}},Pt="SUBREDDIT_MODERATORS_DECLINE_INVITE_SUCCESS",xt=Object(a.a)(Pt),wt=e=>async(t,s,{apiContext:r})=>{const n=s().subreddits.models[e].name;(await((e,t)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/decline_mod_invite`,method:b.jb.POST,data:{api_type:"json"}}))(r(),n)).ok&&t(xt({subredditId:e}))},Nt="SUBREDDIT__REMOVEINVITEDMODERATOR__SUCCESS",kt=Object(a.a)("SUBREDDIT__REMOVEINVITEDMODERATOR_PENDING"),Lt=Object(a.a)(Nt),Ut=Object(a.a)("SUBREDDIT__REMOVEINVITEDMODERATOR__FAILED"),Mt=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(C.G)(a,{subredditId:e}).name;s(kt()),(await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{endpoint:`${e.apiUrl}/api/unfriend`,method:b.jb.POST,data:{id:s,type:"moderator_invite",r:t,api_type:"json"}}))(n(),c,t)).ok?s(Lt({subredditId:e,userId:t})):s(Ut())},Gt=e=>async(t,s,{apiContext:r})=>{const n=s();if(e&&!Object(v.b)(l.a.BAN_USER)(n)&&!n.subreddits.rules[e]){const s=Object(C.G)(n,{subredditId:e});await t(Object(d.n)(s.name))}t(Object(o.i)(l.a.BAN_USER))}},"./src/reddit/actions/subredditRules/constants.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return r}),s.d(t,"c",function(){return n}),s.d(t,"a",function(){return a}),s.d(t,"e",function(){return c}),s.d(t,"f",function(){return i}),s.d(t,"g",function(){return o}),s.d(t,"d",function(){return d});const r="SUBREDDIT__RULES_LOADED",n="SUBREDDIT__RULES_PENDING",a="SUBREDDIT__RULES_FAILED",c="SUBREDDIT__RULE_ADDED",i="SUBREDDIT__RULE_EDITED",o="SUBREDDIT__RULE_REMOVED",d="SUBREDDIT__RULES_REORDERED"},"./src/reddit/actions/subredditSettings.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return j}),s.d(t,"a",function(){return y}),s.d(t,"B",function(){return E}),s.d(t,"A",function(){return h}),s.d(t,"N",function(){return S}),s.d(t,"g",function(){return C}),s.d(t,"f",function(){return A}),s.d(t,"c",function(){return P}),s.d(t,"e",function(){return w}),s.d(t,"b",function(){return k}),s.d(t,"m",function(){return U}),s.d(t,"z",function(){return G}),s.d(t,"l",function(){return F}),s.d(t,"y",function(){return $}),s.d(t,"j",function(){return q}),s.d(t,"F",function(){return H}),s.d(t,"v",function(){return K}),s.d(t,"K",function(){return W}),s.d(t,"u",function(){return Y}),s.d(t,"J",function(){return z}),s.d(t,"t",function(){return Q}),s.d(t,"I",function(){return X}),s.d(t,"s",function(){return J}),s.d(t,"H",function(){return Z}),s.d(t,"q",function(){return ee}),s.d(t,"M",function(){return te}),s.d(t,"p",function(){return se}),s.d(t,"L",function(){return re}),s.d(t,"k",function(){return ne}),s.d(t,"x",function(){return ae}),s.d(t,"r",function(){return ce}),s.d(t,"E",function(){return ie}),s.d(t,"o",function(){return oe}),s.d(t,"n",function(){return ue}),s.d(t,"C",function(){return be}),s.d(t,"D",function(){return pe}),s.d(t,"h",function(){return Oe}),s.d(t,"G",function(){return me}),s.d(t,"w",function(){return je}),s.d(t,"i",function(){return ge}),s.d(t,"O",function(){return _e});var r=s("./node_modules/lodash/invert.js"),n=s.n(r),a=s("./src/app/strings/index.ts"),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/reddit/endpoints/subreddit/settings.ts"),d=s("./src/reddit/actions/toaster.ts"),u=s("./src/reddit/helpers/trackers/submitValidation.ts"),l=s("./src/reddit/models/PostRequirements/index.ts"),b=s("./src/reddit/models/Toast/index.ts"),p=s("./src/reddit/models/User/index.ts"),O=s("./src/reddit/selectors/submitValidation.ts"),f=s("./src/reddit/selectors/subreddit.ts"),m=s("./src/reddit/selectors/user.ts");const j="SUBREDDIT_SETTINGS_POST_REQUIREMENTS_LOADED",g=Object(i.a)(j),y="SUBREDDIT_SETTINGS__POST_REQUIREMENTS_BY_SUBREDDIT_LOADED",_=Object(i.a)(y),E=e=>async(t,s,{apiContext:r})=>{t(L());const n=await Object(o.d)(r(),e);n&&n.ok&&t(g(n.body))},h=e=>async(t,s,{apiContext:r})=>{t(L());const n=await Object(o.d)(r(),e);n&&n.ok&&t(_({[e.toLowerCase()]:n.body}))},S=e=>async(t,s,{apiContext:r})=>{const n=s();var a=n.subredditSettings.postRequirements;const c=a.formState,i=a.initialData;if(i){t(R()),u.i(n);const s=T(c);if(null===s){const s=Object(l.a)(c),n=Object(l.c)(s,i),a=await Object(o.h)(r(),e,n);200===a.status?(t(g(s)),t(Object(d.e)({kind:b.b.SuccessCommunity,text:"Submission rules updated successfully"}))):t(N(a.body.explanation))}else t(x(s));t(D())}},T=e=>{const t=e.linkDomain,s=e.titleLength,r=e.postLength,n=e.reposts;var a=t.blacklist;const c=[];if((void 0===a?[]:a).filter(v).length&&c.push({formSection:"linkDomain",formField:"blacklist",error:"Blacklisted domains cannot include reddit hosted content."}),s.isToggled){const e=s.min,t=s.max;e&&e>300&&c.push({formSection:"titleLength",formField:"min",error:"Minimum must be less than 300."}),e&&t&&e>t&&c.push({formSection:"titleLength",formField:"min",error:"Minimum must be less than or equal to maximum"}),t&&(t<2||t>300)&&c.push({formSection:"titleLength",formField:"max",error:"Maximum must be between 2 and 300."})}if(r.isToggled){const e=r.min,t=r.max;e&&e>4e4&&c.push({formSection:"postLength",formField:"min",error:"Minimum must be less than 40,000."}),e&&t&&e>t&&c.push({formSection:"postLength",formField:"min",error:"Minimum must be less than maximum"}),t&&(t<2||t>4e4)&&c.push({formSection:"postLength",formField:"max",error:"Maximum must be between 2 and 40,000."})}return n.isToggled&&n.days&&n.days>90&&c.push({formSection:"reposts",formField:"days",error:"Repost limit must 90 or less"}),c.length?c:null},I=/i\.redd\.it|v.redd.it/,v=e=>I.test(e),C="POST_REQUIREMENTS_UPDATE_STARTED",R=Object(i.a)(C),A="POST_REQUIREMENTS_UPDATE_FINISHED",D=Object(i.a)(A),P="POST_REQUIREMENTS_FORM_VALIDATION_FAILED",x=Object(i.a)(P),w="POST_REQUIREMENTS_UPDATE_FAILED",N=Object(i.a)(w),k="POST_REQUIREMENTS_FETCH_STARTED",L=Object(i.a)(k),U="POST_REQUIREMENTS_BODY_REQUIREMENT",M=Object(i.a)(U),G=e=>async(t,s,{apiContext:r})=>{u.d(s(),e),t(M(e))},F="POST_REQUIREMENTS_LINK_LIST_REQUIREMENT",B=Object(i.a)(F),$=e=>async(t,s,{apiContext:r})=>{u.a(s(),e),t(B(e))},q="POST_REQUIREMENTS_TOGGLE_SECTION",V=Object(i.a)(q),H=e=>async(t,s,{apiContext:r})=>{const n=s(),a=Object(O.b)(n)[e].isToggled;t(V(e)),u.f(n,e,a)},K="UPDATE_TITLE_STRINGS",W=Object(i.a)(K),Y="UPDATE_TITLE_REGEX",z=Object(i.a)(Y),Q="UPDATE_TITLE_MIN_LENGTH",X=Object(i.a)(Q),J="UPDATE_TITLE_MAX_LENGTH",Z=Object(i.a)(J),ee="UPDATE_POST_MIN_LENGTH",te=Object(i.a)(ee),se="UPDATE_POST_MAX_LENGTH",re=Object(i.a)(se),ne="UPDATE_LINK_DOMAINS",ae=Object(i.a)(ne),ce="UPDATE_REPOST_DAYS",ie=Object(i.a)(ce),oe="POST_REQUIREMENTS_POST_GUIDELINES_REQUIREMENT",de=Object(i.a)(oe),ue="POST_REQUIREMENTS_POST_GUIDELINES_GUIDELINE",le=Object(i.a)(ue),be=e=>async(t,s,{apiContext:r})=>{t(de(e))},pe=e=>async(t,s,{apiContext:r})=>{t(le(e))},Oe="SUBREDDIT_SETTINGS_LOADED",fe=Object(i.a)(Oe),me=(e,t)=>async(s,r,{apiContext:n})=>{if(!t||!Object(f.H)(r(),t)){const t=await Object(o.c)(n(),e);t&&t.ok&&s(fe(t.body))}},je=()=>async(e,t,{apiContext:s})=>{const r=Object(m.j)(t());r&&await e(me(c.vc+Object(p.f)(r)))},ge="SUBREDDIT_SETTINGS_UPDATE_SUCCESS",ye=Object(i.a)(ge),_e=(e,t)=>async(s,r,{apiContext:c})=>{const i=await Object(o.g)(c(),e,t),u=Object(m.M)(r());if(i.ok){const t=Object(o.e)(i.body,n()(o.a));s(ye(Object.assign({},t,{subredditId:e}))),s(Object(d.e)({kind:b.b.SuccessCommunity,text:Object(a.a)(u,"subredditCreation.updateCommunitySuccess")}))}else s(Object(d.e)({kind:b.b.Error,text:Object(a.a)(u,"error.tryAgainLater")}))}},"./src/reddit/actions/subredditTopContent.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/graphql/operations/SubredditTopContent.json"),a=s("./src/lib/makeGqlRequest/index.ts"),c=s("./src/reddit/helpers/graphql/normalizeSubredditFromGql/index.ts");s.d(t,"c",function(){return i}),s.d(t,"b",function(){return o}),s.d(t,"a",function(){return d}),s.d(t,"d",function(){return p});const i="SUBREDDIT_TOP_CONTENT__PENDING",o="SUBREDDIT_TOP_CONTENT__LOADED",d="SUBREDDIT_TOP_CONTENT__FAILED",u=Object(r.a)(i),l=Object(r.a)(o),b=Object(r.a)(d),p=e=>async(t,s,r)=>{const i=e.toLowerCase();var o=s().subreddits;const d=o.api,p=o.topContent;if(d.topContent.pending[i]||p[i])return;t(u({subredditName:i}));const O=await((e,t)=>Object(a.a)(e,Object.assign({},n,{variables:t})))(r.gqlContext(),{subredditName:i});if(O.ok){const e=O.body.data.subreddit;if(e){const s=Object(c.b)(e);s&&t(l(Object.assign({subredditName:i},s)))}}else t(b({subredditName:i,error:O.error}))}},"./src/reddit/actions/subscription.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/app/strings/index.ts"),c=s("./src/reddit/actions/header.ts"),i=s("./src/reddit/actions/modal.ts"),o=s("./src/reddit/actions/monthsToMinutes.ts"),d=s("./src/reddit/actions/monthsToMinutes/homeFeed.ts"),u=s("./src/reddit/actions/toaster.ts"),l=s("./src/reddit/constants/modals.ts"),b=s("./src/config.ts"),p=s("./src/lib/makeApiRequest/index.ts"),O=s("./src/lib/omitHeaders/index.ts"),f=s("./src/reddit/constants/headers.ts");var m=s("./src/reddit/models/MonthsToMinutes/index.ts"),j=s("./src/reddit/models/Toast/index.ts"),g=s("./src/reddit/selectors/experiments/m2mV1-5.ts"),y=s("./src/reddit/selectors/monthsToMinutes.ts"),_=s("./src/reddit/selectors/profile.ts"),E=s("./src/reddit/selectors/subreddit.ts"),h=s("./src/reddit/selectors/subscriptions.ts"),S=s("./src/reddit/selectors/toast.ts"),T=s("./src/reddit/selectors/user.ts");s.d(t,"c",function(){return v}),s.d(t,"d",function(){return C}),s.d(t,"b",function(){return R}),s.d(t,"e",function(){return A}),s.d(t,"h",function(){return N}),s.d(t,"g",function(){return k}),s.d(t,"a",function(){return L}),s.d(t,"f",function(){return M});var I=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const v="SUBSCRIPTION__FETCH_DATA_PENDING",C="SUBSCRIPTION__FETCH_DATA_SUCCESS",R="SUBSCRIPTION__FETCH_DATA_FAILURE",A="SUBSCRIPTION__SUBSCRIPTION_TOGGLED",D=Object(n.a)(C),P=Object(n.a)(v),x=Object(n.a)(R),w=Object(n.a)(A),N=(Object(n.a)("SUBSCRIPTION__SUBSCIPTION_TOGGLE_FAILED"),Object(n.a)("SUBSCRIPTION__ORDER_LOADED"),()=>async(e,t,{apiContext:s})=>{const n=t();if(!n.user.account||n.subscriptions.api.fetched)return;e(P());const a=await(e=>Object(p.c)(e,{endpoint:`${b.a.gatewayUrl}/desktopapi/v1/subscriptions`,method:r.jb.GET}))(s());a.ok?e(D(a.body)):e(x({error:a.error}))}),k=(e,t,s)=>async(n,b,{apiContext:v})=>{const C=Object(T.M)(b());var R="subreddit"===e.type?[e.name,Object(E.z)(b(),e.name)]:[`${r.vc}${e.name}`,Object(_.j)(b(),e.name)],A=I(R,2);const D=A[0],P=A[1];if(Object(T.F)(b()))n(w({identifier:{id:P,type:e.type},nameIdentifier:e,profileModels:b().profiles.models,subredditModels:b().subreddits.models,subscriptionsCount:Object(h.a)(b()),userIsSubscriber:t,widgetId:s})),(await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/subscribe`,data:{action:s?"sub":"unsub",sr_name:t,api_type:"json"}}))(v(),D,t)).ok||(n(w({identifier:{id:P,type:e.type},nameIdentifier:e,profileModels:b().profiles.models,subredditModels:b().subreddits.models,subscriptionsCount:Object(h.a)(b()),userIsSubscriber:!t,widgetId:s})),n(Object(u.e)(Object(u.d)(Object(a.a)(C,"profile.somethingWentWrongTryAgain"),j.b.Error))));else if(Object(y.u)(b())){if("profile"===e.type)return void n(Object(u.e)(Object(u.d)(Object(a.a)(C,"monthsToMinutes.subscribeProfileFailToast"),j.b.Error,Object(a.a)(C,"account.signup"),Object(i.i)(l.a.REGISTER_MODAL_ID))));let r=Object(h.a)(b());if(t&&r>=m.e)return void(Object(S.a)(b(),j.a.subscribeCap)||n(Object(u.e)({text:"",duration:-1,kind:j.b.Custom,customToastType:j.a.subscribeCap})));if(n(w({identifier:{id:P,type:e.type},nameIdentifier:e,profileModels:b().profiles.models,subredditModels:b().subreddits.models,subscriptionsCount:Object(h.a)(b()),userIsSubscriber:t,widgetId:s})),r=Object(h.a)(b()),Object(y.p)(b())&&n(Object(o.w)()),t&&r===m.d&&(n(Object(c.h)()),n(Object(o.x)({time:Date.now(),tooltipType:m.j.Home}))),t&&Object(y.v)(b())&&r===m.h&&n(Object(o.t)()),t&&Object(y.w)(b()))if(r!==m.h||Object(S.a)(b(),j.a.subscribeMilestone)){const t=Object(E.v)(b(),{subredditName:e.name});n(Object(u.e)({text:Object(a.a)(C,"monthsToMinutes.subscribeSuccessToast",{subredditName:t.displayText}),kind:j.b.SuccessCommunity,buttonText:Object(a.a)(C,"account.signup"),buttonAction:Object(i.i)(l.a.REGISTER_MODAL_ID)}))}else n(Object(u.e)({customToastType:j.a.subscribeMilestone,kind:j.b.Custom,text:"",duration:-1}));Object(g.c)(b())&&await n(Object(d.f)())}else n(Object(i.l)({actionSource:i.a.Subscribe})),n(Object(i.i)(l.a.REGISTER_MODAL_ID))},L="SUBSCRIPTION__FAVORITE_TOGGLED",U=Object(n.a)(L),M=e=>async(t,s,{apiContext:n})=>{const a=s(),c=a.subreddits.models[e.id];let i=c&&c.name;if(!i){const t=a.profiles.models[e.id];if(!(i=t&&`u_${t.name}`))throw new Error(`actions.subscription -- No subreddit or profile found with id ${e.id}`)}const o=a.subscriptions.favoriteSubredditOrder||[],d=a.subscriptions.favoriteProfileOrder||[],l=o.indexOf(e.id),b=d.indexOf(e.id),m=-1===l&&-1===b,g=a.subreddits.models,y=a.profiles.models;t(U({makeFavorite:m,identifier:e,subredditModels:g,profileModels:y})),(await((e,t,s)=>Object(p.c)(Object(O.a)(e,[f.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/favorite`,data:{make_favorite:s?"true":"false",sr_name:t,api_type:"json"}}))(n(),i,m)).ok||(t(U({makeFavorite:!m,identifier:e,subredditModels:g,profileModels:y})),t(Object(u.e)({text:"Sorry, failed to update favorites.",kind:j.b.Error})))}},"./src/reddit/actions/tags.ts":function(e,t,s){"use strict";var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/toaster.ts");const c=e=>{const t=e.subreddit,s={global:{},[t.id]:{}};t.availableTags&&t.availableTags.edges.reduce((e,{node:t})=>(e[t.subreddit&&t.subreddit.id||"global"][t.id]=t,e),s);const r=t.tags.edges.reduce((e,{node:s})=>(e[t.id][s.tag.id]=s,e),{[t.id]:{}});return{globalSubredditTags:s.global,subredditScopedTags:{[t.id]:s[t.id]},subredditId:t.id,itemTags:r}};var i=s("./src/graphql/operations/CreateSubredditTags.json"),o=s("./src/lib/makeGqlRequest/index.ts");var d=s("./src/graphql/operations/DeleteTags.json");var u=s("./src/graphql/operations/FetchSubredditTags.json");const l=(e,{subredditId:t,pageSize:s=700,after:r,includeAvailableTags:n})=>Object(o.a)(e,Object.assign({},u,{variables:{subredditId:t,pageSize:s,after:r,includeAvailableTags:n}}));var b,p=s("./src/graphql/operations/UpdateSubredditTagStates.json");!function(e){e.TAGGED="TAGGED",e.NONE="NONE"}(b||(b={}));var O=s("./src/reddit/featureFlags/communityTopics.ts"),f=s("./src/reddit/helpers/trackers/communityTopics.ts"),m=s("./src/reddit/models/Toast/index.ts"),j=s("./src/reddit/reducers/tags/selected/index.ts"),g=s("./src/reddit/selectors/tags.ts"),y=s("./src/reddit/selectors/user.ts");s.d(t,"j",function(){return _}),s.d(t,"a",function(){return E}),s.d(t,"i",function(){return h}),s.d(t,"h",function(){return S}),s.d(t,"c",function(){return T}),s.d(t,"d",function(){return I}),s.d(t,"b",function(){return v}),s.d(t,"f",function(){return C}),s.d(t,"g",function(){return R}),s.d(t,"e",function(){return A}),s.d(t,"l",function(){return D}),s.d(t,"m",function(){return P}),s.d(t,"k",function(){return x}),s.d(t,"p",function(){return w}),s.d(t,"o",function(){return N}),s.d(t,"n",function(){return k}),s.d(t,"u",function(){return z}),s.d(t,"t",function(){return Q}),s.d(t,"s",function(){return X}),s.d(t,"r",function(){return J}),s.d(t,"q",function(){return re});const _="TAGS__REQUESTED",E="TAGS__AVAILABLE_LOADED",h="TAGS__LOADED",S="TAGS__FAILURE",T="TAGS__CREATE_REQUESTED",I="TAGS__CREATE_SUCCESS",v="TAGS__CREATE_FAILURE",C="TAGS__DELETE_REQUESTED",R="TAGS__DELETE_SUCCESS",A="TAGS__DELETE_FAILURE",D="TAGS__UPDATE_STATE_REQUESTED",P="TAGS__UPDATE_STATE_SUCCESS",x="TAGS__UPDATE_STATE_FAILURE",w="TAGS__OPTION_SELECTED",N="TAGS__OPTION_DESELECTED",k="TAGS__INPUT_CHANGED",L=Object(n.a)(_),U=Object(n.a)(E),M=Object(n.a)(h),G=Object(n.a)(S),F=Object(n.a)(T),B=Object(n.a)(I),$=Object(n.a)(v),q=Object(n.a)(C),V=Object(n.a)(R),H=Object(n.a)(A),K=Object(n.a)(D),W=Object(n.a)(P),Y=Object(n.a)(x),z=Object(n.a)(w),Q=Object(n.a)(N),X=Object(n.a)(k),J=(e,t=!1)=>async(s,n,{gqlContext:i})=>{const o=n();if(!Object(O.a)(o))return;s(L());const d=await l(i(),{subredditId:e});if(d.ok){const r=d.body;s(M(c(r.data))),t&&f.d(n(),e)}else s(G()),s(Object(a.e)(Object(a.d)(Object(r.a)(Object(y.M)(o),"communityTopics.loadFailed"),m.b.Error,Object(r.a)(Object(y.M)(o),"communityTopics.retry"),J(e,t))))},Z=e=>async(t,s,{gqlContext:n})=>{const i=s();if(!Object(O.a)(i))return;t(L());const o=await l(n(),{subredditId:e});if(o.ok){const e=o.body;t(U(c(e.data)))}else t(G()),t(Object(a.e)(Object(a.d)(Object(r.a)(Object(y.M)(i),"communityTopics.loadFailed"),m.b.Error,Object(r.a)(Object(y.M)(i),"communityTopics.retry"),Z(e))))},ee=(e,t)=>async(s,r,{gqlContext:n})=>{if(!t.length)return;s(F());const a=t.map(t=>Object.assign({subredditId:e},t)),c=await((e,t)=>Object(o.a)(e,Object.assign({},i,{variables:t})))(n(),{input:a}),d=c.body&&c.body.data||null;c.ok&&d&&d.createSubredditTags&&d.createSubredditTags.ok?s(B()):s($())},te=(e,t)=>async(s,r,{gqlContext:n})=>{if(!t.length)return;s(q());const a=await((e,t)=>Object(o.a)(e,Object.assign({},d,{variables:t})))(n(),{input:t}),c=a.body&&a.body.data||null;a.ok&&c&&c.deleteTags&&c.deleteTags.ok?s(V({subredditId:e,tags:t})):s(H())},se=(e,t)=>async(s,r,{gqlContext:n})=>{if(!t.length)return;s(K());const a=await((e,t)=>Object(o.a)(e,Object.assign({},p,{variables:t})))(n(),{input:{subredditId:e,tagStates:t}}),c=a.body&&a.body.data||null;a.ok&&c&&c.updateSubredditTagStates&&c.updateSubredditTagStates.ok?s(W()):s(Y())},re=e=>async(t,s,n)=>{const c=s(),i=Object(g.g)(c,{subredditId:e}),o=Object(g.d)(c,{subredditId:e}),d=Object(g.l)(c,{subredditId:e}),u=Object(g.m)(c,{subredditId:e}),l=i.filter(e=>!!e.id&&!!e.action).map(e=>({tagId:e.id,state:e.action===j.a.ADD?b.TAGGED:b.NONE}));if(d.length>0){const r=new Set([...Object.keys(o)]);await ee(e,d)(t,s,n),await Z(e)(t,s,n);const a=Object(g.d)(s(),{subredditId:e}),c=new Set([...Object.keys(a).filter(e=>!r.has(e))]);d.forEach(e=>{for(const t of c){const s=a[t];if(s&&s.text.toLowerCase()===e.text.toLowerCase()&&s.type===e.type)return c.delete(t),void l.push({tagId:s.id,state:b.TAGGED})}})}await Promise.all([se(e,l)(t,s,n),te(e,u)(t,s,n)]),Object(g.j)(s())&&t(Object(a.e)(Object(a.d)(Object(r.a)(Object(y.M)(c),"communityTopics.savePartialFailed"),m.b.Error,Object(r.a)(Object(y.M)(c),"communityTopics.retry"),re(e)))),t(J(e,!0))}},"./src/reddit/actions/tracking.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c});var r=s("./src/lib/makeActionCreator/index.ts");const n="TRACKING__VIEWPORT_DATA_LOADED",a="TRACKING__VIEWPORT_DATA_UNLOADED",c=Object(r.a)(n);Object(r.a)(a)},"./src/reddit/actions/trophyCase.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./node_modules/lodash/pickBy.js"),a=s.n(n),c=s("./src/lib/constants/index.ts"),i=s("./src/lib/makeApiRequest/index.ts"),o=s("./src/lib/omitHeaders/index.ts"),d=s("./src/lib/redditId/index.ts"),u=s("./src/reddit/constants/headers.ts");var l=(e,t)=>Object(i.c)(Object(o.a)(e,[u.a]),{method:c.jb.GET,endpoint:`${e.apiUrl}/user/${t}/trophies.json`}).then(e=>{const t=e.body&&e.body.data&&e.body.data.trophies;if(e.ok&&t){const s=a()(t.map(b),"id"),r=Object.keys(s);return Object.assign({},e,{body:{trophies:s,trophyIds:r}})}return e});const b=e=>({awardId:e.data.award_id,description:e.data.description||"",icon:e.data.icon_40||"",id:Object(d.b)(e.data.id,e.kind),name:e.data.name,url:e.data.url||""});s.d(t,"a",function(){return p}),s.d(t,"b",function(){return m});const p="TROPHYCASE__FETCH_SUCCESS",O=Object(r.a)(p),f=Object(r.a)("TROPHYCASE__FETCH_FAILED"),m=(e,t)=>async(s,r,{apiContext:n})=>{const a=await l(n(),e);a.ok?s(O(Object.assign({profileId:t,profileName:e},a.body))):s(f({profileId:t,error:a.error}))}},"./src/reddit/actions/upload.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return u}),s.d(t,"h",function(){return l}),s.d(t,"c",function(){return b}),s.d(t,"e",function(){return p}),s.d(t,"g",function(){return O}),s.d(t,"b",function(){return f}),s.d(t,"a",function(){return m}),s.d(t,"f",function(){return j}),s.d(t,"l",function(){return _}),s.d(t,"j",function(){return C}),s.d(t,"k",function(){return R}),s.d(t,"i",function(){return A});var r=s("./node_modules/lodash/get.js"),n=s.n(r),a=s("./node_modules/uuid/v4.js"),c=s.n(a),i=s("./src/lib/makeActionCreator/index.ts"),o=s("./src/lib/uploadToS3/index.ts"),d=s("./src/reddit/models/Upload/index.ts");const u="UPLOAD_PENDING",l="UPLOAD_UPLOADING",b="UPLOAD_METADATA_CHANGED",p="UPLOAD_PROGRESS",O="UPLOAD_SUCCESS",f="UPLOAD_FAILED",m="UPLOAD_CANCELED",j="UPLOAD_REMOVED",g=Object(i.a)(u),y=Object(i.a)(l),_=Object(i.a)(b),E=Object(i.a)(p),h=Object(i.a)(O),S=Object(i.a)(f),T=Object(i.a)(m),I=Object(i.a)(j),v=new Map,C=(e,t)=>{const s=v.get(e)||[];s.push(t),v.set(e,s)},R=(e,t,s,r=!1)=>async(a,i,{apiContext:u})=>{const l=t;if(i().uploads[l]&&Object(d.d)(i().uploads[l]))return;const b=c()(),p=()=>{const e=i().uploads[l];return!e||e.id!==b||e.status===d.a.CANCELED};a(g({key:l,id:b,file:e}));var O=await s(i().uploads[l]);const f=O.uploadLease,m=O.error;if(p())return;if(m||!f)return void a(S({key:l,error:m}));let j;C(b,()=>{j&&j.abort()}),a(y({key:l}));const _=await Object(o.a)(e,f,e=>(j=e,r&&e.on("progress",e=>{if(!p()&&"upload"===e.direction){const t={percent:e.percent,total:e.total,uploaded:e.loaded};a(E({key:l,progress:t}))}}),e));if(j=null,!p())if(_.ok){const e=decodeURIComponent(_.body.PostResponse.Location);a(h({key:l,url:e}))}else{const e=n()(_,"body.Error.Message.0"),t=Object.assign({type:"ERROR"},e?{fields:[{field:"0",msg:e}]}:{});a(S({key:l,error:t}))}},A=(e,t=!1)=>(s,r)=>{const n=r().uploads[e];n&&(((e,t)=>{const s=v.get(e);s&&s.forEach(s=>s(e,t)),v.delete(e)})(n.id,t),s(t?I({key:e}):T({key:e})))}},"./src/reddit/actions/userBlocks.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return d}),s.d(t,"e",function(){return u}),s.d(t,"d",function(){return l}),s.d(t,"h",function(){return f}),s.d(t,"b",function(){return m}),s.d(t,"c",function(){return j}),s.d(t,"a",function(){return g}),s.d(t,"g",function(){return h});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/toaster.ts"),c=s("./src/reddit/endpoints/accounts/index.ts"),i=s("./src/reddit/models/Toast/index.ts"),o=s("./src/reddit/selectors/user.ts");const d="USER_BLOCK__PENDING",u="USER_BLOCK__LOADED",l="USER_BLOCK__FAILED",b=Object(n.a)(d),p=Object(n.a)(u),O=Object(n.a)(l),f=e=>async(t,s,{apiContext:n})=>{const o=s();if(o.blockUser.api.pending[e])return;t(b({username:e}));const d=await Object(c.a)(n(),e),u=`error-block-${e}`;if(d.ok)d.body.name&&t(p(d.body)),t(a.f(u)),t(a.e({kind:i.b.SuccessCommunity,text:Object(r.a)(o.user.language,"settings.page.saveRequestSuccess")}));else{const s={type:d.error?d.error.type:"Unknown error",username:e};t(O(s)),t(a.e({id:u,kind:i.b.Error,text:Object(r.a)(o.user.language,"error.tryAgainLater"),buttonText:Object(r.a)(o.user.language,"reportFlow.blockUser.retry"),buttonAction:f(e)}))}},m="USER_UNBLOCK__PENDING",j="USER_UNBLOCK__SUCCESS",g="USER_UNBLOCK__FAILED",y=Object(n.a)(m),_=Object(n.a)(j),E=Object(n.a)(g),h=e=>async(t,s,{apiContext:n})=>{const d=s(),u=Object(o.j)(d),l=u?u.id:void 0;l&&(t(y({name:e})),(await Object(c.b)(n(),l,e)).ok?(t(_({name:e})),t(a.e({kind:i.b.SuccessCommunity,text:Object(r.a)(d.user.language,"settings.page.saveRequestSuccess")}))):(t(a.e({kind:i.b.Error,text:Object(r.a)(d.user.language,"error.tryAgainLater")})),t(E({name:e}))))}},"./src/reddit/actions/userFlair.ts":function(e,t,s){"use strict";s.d(t,"i",function(){return m}),s.d(t,"a",function(){return j}),s.d(t,"d",function(){return g}),s.d(t,"b",function(){return h}),s.d(t,"h",function(){return v}),s.d(t,"c",function(){return D}),s.d(t,"g",function(){return N}),s.d(t,"f",function(){return k}),s.d(t,"e",function(){return G}),s.d(t,"o",function(){return q}),s.d(t,"n",function(){return V}),s.d(t,"m",function(){return H}),s.d(t,"l",function(){return K}),s.d(t,"j",function(){return W}),s.d(t,"k",function(){return Y}),s.d(t,"p",function(){return z});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./node_modules/lodash/isEmpty.js"),c=s.n(a),i=s("./src/reddit/actions/authorFlair.ts"),o=s("./src/reddit/actions/toaster.ts"),d=s("./src/reddit/endpoints/flair/index.ts"),u=s("./src/reddit/models/Flair/index.ts"),l=s("./src/reddit/models/Toast/index.ts"),b=s("./src/reddit/models/User/index.ts"),p=s("./src/reddit/selectors/subreddit.ts"),O=s("./src/reddit/selectors/user.ts"),f=s("./src/reddit/selectors/userFlair.ts");const m="USER_FLAIR_DATA__MUTATED",j="AUTHOR_FLAIR_DATA__MUTATED",g="STRUCTURED_STYLES__USERFLAIR_ENABLED_SETTING_SUCCESS",y=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_ENABLED_SETTING_PENDING"),_=Object(n.a)(g),E=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_ENABLED_SETTING_FAILED"),h="STRUCTURED_STYLES__USERFLAIR_ALLOW_ASSIGN_OWN_SETTING_SUCCESS",S=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_ALLOW_ASSIGN_OWN_SETTING_PENDING"),T=Object(n.a)(h),I=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_ALLOW_ASSIGN_OWN_SETTING_FAILED"),v="STRUCTURED_STYLES__USERFLAIR_SAVETEMPLATE_SUCCESS",C=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_SAVETEMPLATE_PENDING"),R=Object(n.a)(v),A=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_SAVETEMPLATE_FAILED"),D="STRUCTURED_STYLES__USERFLAIR_DELETETEMPLATE_SUCCESS",P=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_DELETETEMPLATE_PENDING"),x=Object(n.a)(D),w=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_DELETETEMPLATE_FAILED"),N="STRUCTURED_STYLES__USERFLAIR_REORDERTEMPLATES_PENDING",k="STRUCTURED_STYLES__USERFLAIR_REORDERTEMPLATES_FAILED",L=Object(n.a)(N),U=Object(n.a)("STRUCTURED_STYLES__USERFLAIR_REORDERTEMPLATES_SUCCESS"),M=Object(n.a)(k),G="USERFLAIR_FETCH_SUCCESS",F=Object(n.a)(G),B=Object(n.a)(m),$=Object(n.a)(j),q=(e,t,s,r,n)=>async(a,c,{apiContext:i})=>{const o=c(),l=o.user.account;let O;l&&(O=Object(b.f)(l));const m=Object.assign({},Object(f.b)(o,{subredditId:n}).displaySettings,{isUserEnabled:s}),j={userName:r,subredditId:n,applied:e,displaySettings:m};a(r===O?B(j):$(j));const g=Object(p.G)(o,{subredditId:n}),y=e&&Object(u.j)(e);Object(d.e)(i(),r,g.name,t,y),Object(d.g)(i(),s,g.name)},V=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(p.G)(a,{subredditId:e}).name;if(s(y()),(await Object(d.j)(n(),c,t)).ok){s(_({subredditId:e,isEnabled:t}))}else s(E())},H=(e,t)=>async(s,r,{apiContext:n})=>{const a=r(),c=Object(p.G)(a,{subredditId:e}).name;if(s(S()),(await Object(d.h)(n(),t,u.c.UserFlair,c)).ok){s(T({subredditId:e,canAssignOwn:t}))}else s(I())},K=(e,t)=>async(s,n,{apiContext:a})=>{const c=n(),i=Object(p.G)(c,{subredditId:t}).name,b=Object(O.M)(c);s(C());const f=await Object(d.d)(a(),e,i,u.c.UserFlair);if(f.ok){const e={subredditId:t,template:f.body};s(R(e));const n=Object(o.d)(Object(r.a)(b,"structuredStyles.forms.flair.toast.flairSaved"),l.b.SuccessMod);s(Object(o.e)(n))}else{s(A());const n=Object(o.d)(Object(r.a)(b,"structuredStyles.forms.flair.toast.flairNotSaved"),l.b.Error,Object(r.a)(b,"structuredStyles.forms.flair.toast.retryButtonText"),K(e,t));s(Object(o.e)(n))}},W=(e,t)=>async(s,n,{apiContext:a})=>{const c=n(),i=Object(p.G)(c,{subredditId:t}).name,u=Object(O.M)(c);if(s(P()),(await Object(d.a)(a(),e,i)).ok){s(x({subredditId:t,templateId:e}));const n=Object(o.d)(Object(r.a)(u,"structuredStyles.forms.flair.toast.flairDeleted"),l.b.SuccessMod);s(Object(o.e)(n))}else{s(w());const n=Object(o.d)(Object(r.a)(u,"structuredStyles.forms.flair.toast.flairNotDeleted"),l.b.Error,Object(r.a)(u,"structuredStyles.forms.flair.toast.retryButtonText"),W(e,t));s(Object(o.e)(n))}},Y=(e,t,s)=>async(n,a,{apiContext:c})=>{const i=a(),b=Object(p.G)(i,{subredditId:s}).name,f=Object(O.M)(i);if(n(L({subredditId:s,templateIds:t})),(await Object(d.c)(c(),b,u.c.UserFlair,t)).ok){n(U());const e=Object(o.d)(Object(r.a)(f,"structuredStyles.forms.flair.toast.flairReorderSuccess"),l.b.SuccessMod);n(Object(o.e)(e))}else{n(M({subredditId:s,templateIds:e}));const a=Object(o.d)(Object(r.a)(f,"structuredStyles.forms.flair.toast.flairReorderFailure"),l.b.Error,Object(r.a)(f,"structuredStyles.forms.flair.toast.retryButtonText"),Y(e,t,s));n(Object(o.e)(a))}},z=(e,t)=>async(s,n,{apiContext:a})=>{const u=n(),b=u.userFlair;if(b&&b[e]&&b[e].displaySettings.isEnabled&&c()(b[e].templateIds)){const n=Object(p.G)(u,{subredditId:e}).name,c=await Object(d.b)(a(),n);if(c.ok)s(F(c.body)),s(Object(i.b)({username:t,subredditId:e}));else{const e=Object(O.M)(u),t=Object(o.d)(Object(r.a)(e,"error.type.generic"),l.b.Error);s(Object(o.e)(t))}}else s(Object(i.b)({username:t,subredditId:e}))}},"./src/reddit/actions/userWhitelist.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return o}),s.d(t,"f",function(){return d}),s.d(t,"d",function(){return u}),s.d(t,"g",function(){return O}),s.d(t,"b",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"a",function(){return j}),s.d(t,"h",function(){return E});var r=s("./src/app/strings/index.ts"),n=s("./src/lib/makeActionCreator/index.ts"),a=s("./src/reddit/actions/toaster.ts"),c=s("./src/reddit/endpoints/accounts/index.ts"),i=s("./src/reddit/models/Toast/index.ts");const o="USER_WHITELIST__PENDING",d="USER_WHITELIST__SUCCESS",u="USER_WHITELIST__FAILED",l=Object(n.a)(o),b=Object(n.a)(d),p=Object(n.a)(u),O=e=>async(t,s,{apiContext:n})=>{t(l());const o=await Object(c.d)(n(),e),d=s();o.ok?o.body.name&&(t(b(o.body)),t(a.e({kind:i.b.SuccessCommunity,text:Object(r.a)(d.user.language,"settings.page.saveRequestSuccess")}))):(t(p()),t(a.e({kind:i.b.Error,text:Object(r.a)(d.user.language,"error.tryAgainLater")})))},f="USER_UNWHITELIST__PENDING",m="USER_UNWHITELIST__SUCCESS",j="USER_UNWHITELIST__FAILED",g=Object(n.a)(f),y=Object(n.a)(m),_=Object(n.a)(j),E=e=>async(t,s,{apiContext:n})=>{const o=s();t(g({name:e})),(await Object(c.c)(n(),e)).ok?(t(y({name:e})),t(a.e({kind:i.b.SuccessCommunity,text:Object(r.a)(o.user.language,"settings.page.saveRequestSuccess")}))):(t(_({name:e})),t(a.e({kind:i.b.Error,text:Object(r.a)(o.user.language,"error.tryAgainLater")})))}},"./src/reddit/actions/usernameAvailable.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts");var o;s.d(t,"b",function(){return o}),s.d(t,"a",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"d",function(){return l}),s.d(t,"e",function(){return b}),s.d(t,"f",function(){return j}),function(e){e[e.Available=0]="Available",e[e.Error=1]="Error",e[e.Pending=2]="Pending",e[e.Unavailable=3]="Unavailable"}(o||(o={}));const d="USERNAME_AVAILABLE__AVAILABLE",u="USERNAME_AVAILABLE__FAILURE",l="USERNAME_AVAILABLE__PENDING",b="USERNAME_AVAILABLE__UNAVAILABLE",p=Object(r.a)(d),O=Object(r.a)(u),f=Object(r.a)(l),m=Object(r.a)(b),j=({username:e})=>async(t,s,{apiContext:r})=>{const d=s().users.nameAvailable;if(!d[e]||d[e]===o.Error){t(f({username:e}));const s=await((e,t)=>Object(a.c)(Object(c.a)(e,[i.a]),{method:n.jb.GET,endpoint:`${e.apiUrl}/api/username_available.json?user=${t.username}`,type:"json"}))(r(),{username:e});s.ok?s.body?t(p({username:e})):t(m({username:e})):t(O({username:e}))}}},"./src/reddit/actions/vote.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/reddit/actions/modal.ts"),c=s("./src/reddit/actions/monthsToMinutes.ts"),i=s("./src/reddit/actions/monthsToMinutes/homeFeed.ts"),o=s("./src/reddit/constants/adEvents.ts"),d=s("./src/reddit/constants/modals.ts"),u=s("./src/lib/makeApiRequest/index.ts"),l=s("./src/lib/omitHeaders/index.ts"),b=s("./src/reddit/constants/headers.ts"),p=s("./src/reddit/helpers/addRedesignIdentifier/index.ts");var O=s("./src/reddit/helpers/isComment.ts"),f=s("./src/reddit/helpers/isPost.ts"),m=s("./src/reddit/helpers/pixels.ts"),j=s("./src/reddit/models/MonthsToMinutes/index.ts"),g=s("./src/reddit/models/Toast/index.ts"),y=s("./src/reddit/models/Vote/index.ts"),_=s("./src/reddit/selectors/comments.ts"),E=s("./src/reddit/selectors/experiments/m2mV1-5.ts"),h=s("./src/reddit/selectors/monthsToMinutes.ts"),S=s("./src/reddit/selectors/posts.ts"),T=s("./src/reddit/selectors/telemetry.ts"),I=s("./src/reddit/selectors/toast.ts"),v=s("./src/reddit/selectors/user.ts"),C=s("./src/reddit/actions/toaster.ts");s.d(t,"a",function(){return R}),s.d(t,"b",function(){return D});const R="VOTE__VOTE_CAST",A=Object(r.a)(R),D=(e,t)=>s=>async(r,R,{apiContext:D})=>{if(!Object(v.F)(R())&&!Object(h.u)(R()))return r(Object(a.l)({actionSource:a.a.Vote})),void r(Object(a.i)(d.a.REGISTER_MODAL_ID));const P=e(s,R),x=y.b(P,t),w=Object(f.a)(s)?P.postId:s;if(r(A({id:w,isInstance:!1,vote:t})),Object(h.u)(R())&&x!==y.a.notVoted&&Object(h.H)(R())===j.i&&(Object(h.v)(R())?r(Object(c.t)()):Object(h.w)(R())&&!Object(I.a)(R(),g.a.voteMilestone)&&r(Object(C.e)({customToastType:g.a.voteMilestone,kind:g.b.Custom,text:"",duration:n.N}))),(R().posts.instances[w]||[]).forEach(e=>{r(A({id:e,isInstance:!0,vote:t}))}),x)if(Object(f.a)(s)){const e=Object(S.D)(R(),{postId:s}),r=t>0?o.a.Upvote:o.a.Downvote;Object(m.a)(e.events,r)}else if(Object(O.a)(s)){const e=Object(_.n)(R(),{commentId:s});if(e){const s=Object(S.D)(R(),{postId:e.postId}),r=t>0?o.a.CommentUpvote:o.a.CommentDownvote;Object(m.a)(s.events,r)}}if((await((e,t,s)=>Object(u.c)(Object(l.a)(e,[b.a]),{endpoint:Object(p.a)(`${e.apiUrl}/api/vote`),method:n.jb.POST,data:{id:t,dir:s,api_type:"json"}}))(D(),w,x)).ok||r(A({id:w,isInstance:!1,vote:t})),Object(E.c)(R())){const e=Object(T.subredditByPostOrCommentId)(R(),s);e&&e.name&&r(Object(i.h)({id:s,subredditName:e.name})),await r(Object(i.f)())}}},"./src/reddit/actions/widgets.ts":function(e,t,s){"use strict";var r=s("./src/lib/makeActionCreator/index.ts"),n=s("./src/app/strings/index.ts"),a=s("./src/reddit/actions/apiRequestState.ts"),c=s("./src/reddit/actions/imageUploads.ts"),i=s("./src/reddit/actions/toaster.ts"),o=s("./src/lib/constants/index.ts"),d=s("./src/lib/makeApiRequest/index.ts"),u=s("./src/lib/omitHeaders/index.ts"),l=s("./src/reddit/constants/headers.ts");var b=s("./src/reddit/helpers/getGenericUploadError.ts"),p=s("./src/reddit/helpers/media/index.ts"),O=s("./src/lib/assertNever.ts"),f=s("./src/reddit/selectors/subreddit.ts"),m=s("./src/reddit/models/Image/index.tsx"),j=s("./src/reddit/models/Toast/index.ts"),g=s("./src/reddit/models/Widgets/index.ts"),y=s("./src/reddit/selectors/user.ts");s.d(t,"c",function(){return _}),s.d(t,"h",function(){return h}),s.d(t,"e",function(){return S}),s.d(t,"j",function(){return I}),s.d(t,"d",function(){return v}),s.d(t,"i",function(){return R}),s.d(t,"b",function(){return A}),s.d(t,"l",function(){return P}),s.d(t,"f",function(){return x}),s.d(t,"g",function(){return w}),s.d(t,"a",function(){return N}),s.d(t,"k",function(){return L});const _="WIDGETS__WIDGET_CREATED",E=Object(r.a)(_),h=(e,t,s)=>async(r,p,O)=>{const _=O.apiContext;r(Object(a.h)(s));const h=p(),S=Object(f.G)(h,{subredditId:e}).name,T=Object(y.M)(h),I=Object(g.i)(t);let v=null;try{v=await Object(c.f)(h,m.a.Widgets)}catch(R){const e=Object(b.a)("webSocket");return void r(Object(a.f)(s,e))}const C=await(async(e,t,s)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:`${e.apiUrl}/r/${t}/api/widget`,method:o.jb.POST,type:"json",data:s}))(_(),S,I);if(C.ok){const o=C.body,d=o.id;if("calendar"===t.kind&&r(Object(i.e)({kind:j.b.SuccessMod,text:Object(n.a)(T,"structuredStyles.widgets.calendar.toastText.created")})),v)try{await Object(c.m)(v)(r,p,O)}catch(R){}r(E({subredditId:e,widget:o,widgetId:d})),r(Object(a.e)(s))}else v&&v.websocket.close(),r(Object(a.f)(s,C.error))},S="WIDGETS__WIDGET_UPDATED",T=Object(r.a)(S),I=(e,t,s)=>async(r,p,_)=>{const E=_.apiContext;r(Object(a.h)(s));const h=t.id,S=p(),I=Object(f.G)(S,{subredditId:e}).name,v=Object(y.M)(S),C=Object(g.i)(t);let R=null,A=null;try{(R=await Object(c.f)(S,m.a.Widgets))&&(A=Object(c.m)(R)(r,p,_))}catch(P){const e=Object(b.a)("webSocket");return void r(Object(a.f)(s,e))}const D=await(async(e,t,s)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:`${e.apiUrl}/r/${t}/api/widget/${s.id}`,method:o.jb.PUT,type:"json",data:s}))(E(),I,C);if(D.ok){const c=function(e,t,s){switch(e.kind){case"calendar":case"id-card":case"subreddit-rules":return Object.assign({},e,t);case"community-list":{const r={};for(const t of e.data)r[t.name]=t;return Object.assign({},t,{data:t.data.map(e=>{if(!("subscribers"in r[e])){const t={subredditName:e},r=Object(f.v)(s,t),n=Object(f.s)(s,t);return{name:r.name,subscribers:r?r.subscribers:void 0,iconUrl:r?r.communityIcon:void 0,isNSFW:r?r.isNSFW:void 0,isSubscribed:n?n.userIsSubscriber:void 0}}return r[e]})})}case"button":case"custom":case"image":case"menu":case"moderators":case"textarea":case"post-flair":return t;default:return Object(O.a)(e)}}(t,D.body,S);if(r(T({subredditId:e,widgetId:h,widget:c})),A)try{await A}catch(P){}"calendar"===t.kind&&r(Object(i.e)({kind:j.b.SuccessMod,text:Object(n.a)(v,"structuredStyles.widgets.calendar.toastText.updated")})),r(Object(a.e)(s))}else R&&R.websocket.close(),r(Object(a.f)(s,D.error))},v="WIDGET_DELETED",C=Object(r.a)(v),R=(e,t,s)=>async(r,n,{apiContext:c})=>{r(Object(a.h)(s));const i=t.id,b=Object(f.G)(n(),{subredditId:e}).name,p=await(async(e,t,s)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:`${e.apiUrl}/r/${t}/api/widget/${s.id}`,method:o.jb.DELETE,type:"json"}))(c(),b,t);p.ok?(r(Object(a.e)(s)),r(C({subredditId:e,widgetId:i}))):r(Object(a.f)(s,p.error))},A="WIDGETS_SORTED",D=Object(r.a)(A),P=(e,t)=>async(s,r,{apiContext:n})=>{const a=Object(f.G)(r(),{subredditId:e}).name;(await(async(e,t,s)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:`${e.apiUrl}/r/${t}/api/widget_order/sidebar`,method:o.jb.PATCH,type:"json",data:s}))(n(),a,t)).ok&&s(D({subredditId:e,widgetIds:t}))},x=({imageData:e})=>async(t,s,r)=>{const n=s(),a=n.structuredStyles.isEditing,i=Object(f.G)(n,{subredditId:a}).name;t(Object(c.k)(e));const b=await(async(e,t,s,r)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:`${e.apiUrl}/r/${t}/api/widget_image_upload_s3`,method:o.jb.POST,data:{filepath:s,mimetype:r}}))(r.apiContext(),i,e.file.name,await Object(p.f)(e.file));try{const r=await Object(c.g)(s(),b,e,m.a.Widgets);r&&t(Object(c.j)(r))}catch(O){if(O instanceof Error)throw O;t(Object(c.i)(O))}},w=Object(r.a)("WIDGETS__STARTED_EDITING_WIDGET"),N="WIDGETS__LOADED",k=Object(r.a)(N),L=(e,t)=>async(s,r,{apiContext:n})=>{s(Object(a.h)(t));const c=Object(f.G)(r(),{subredditId:e}).name,i=await(async(e,t)=>Object(d.c)(Object(u.a)(e,[l.a]),{endpoint:`${e.apiUrl}/r/${t}/api/widgets`,method:o.jb.GET,type:"json"}))(n(),c);if(i.ok){const r=i.body;s(k({subredditId:e,widgets:r})),s(Object(a.e)(t))}else s(Object(a.f)(t,i.error))}},"./src/reddit/components/Comments/helpers/hiddenComments.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return n}),s.d(t,"a",function(){return a}),s.d(t,"c",function(){return c});let r={};function n(e){return e in r}function a(e){r[e]=!0}function c(){r={}}},"./src/reddit/constants/elementIds.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"c",function(){return n}),s.d(t,"d",function(){return a}),s.d(t,"b",function(){return c});const r="bladeContainer",n="header",a="overlayScrollContainer",c="collectionPostListScrollContainer"},"./src/reddit/constants/explore.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n});const r=3,n=3},"./src/reddit/constants/listings.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"c",function(){return a});s("./src/app/strings/index.ts");const r=new Set(["friends","random"]);var n;!function(e){e.All="all",e.Explore="explore",e.Home="home",e.News="news",e.Original="original",e.Popular="popular",e.SubredditCreation="subredditCreation"}(n||(n={}));const a={[n.Home]:"/",[n.Popular]:"/r/popular",[n.All]:"/r/all",[n.Original]:"/original",[n.News]:"/news",[n.Explore]:"/explore",[n.SubredditCreation]:"/subreddits/create"}},"./src/reddit/constants/modals.ts":function(e,t,s){"use strict";var r;s.d(t,"a",function(){return r}),function(e){e.ADD_REMOVAL_REASON="add_removal_reason",e.ALPHA_CONSUMER="alpha_consumer",e.BADGE_PICKER="badge_picker",e.BADGE_PURCHASE="badge_purchase",e.BAN_USER="ban_user",e.BETA_CONSUMER="beta_consumer",e.BLADE_NIGHTMODE="blade_nightmode",e.BLADE_UNSAVED_CHANGES="blade_unsaved_changes",e.CONFIRM_CLOSE_COIN_MODAL_ID="confirm_close_coin_modal_id",e.CONFIRM_CLOSE_PREMIUM_MODAL_ID="confirm_close_premium_modal_id",e.CREATE_SUBREDDIT_CHAT="create_subreddit_chat",e.DELETE_SUBREDDIT_CHAT="delete_subreddit_chat",e.ECONOMY_SUPPORT_MODAL="economy_support_modal",e.EDIT_SUBREDDIT_CHAT="edit_subreddit_chat",e.GOLD_INTRODUCTION="gold_introduction",e.GOLD_MODAL_CLICK_TEST="gold_modal_click_test",e.GOVERNANCE_OPT_OUT="governance_opt_out",e.GOVERNANCE_RELEASE_NOTES="governance_release_notes",e.HARBERGER_TAX_BANNER_MANAGE="harberger_tax_banner_manage",e.HARBERGER_TAX_BANNER_PURCHASE="harberger_tax_banner_purchase",e.KEYBOARD_SHORTCUTS="keyboard_shortcuts",e.LOGIN_MODAL_ID="account_manager_login",e.MANAGE_SUBREDDIT_CHAT="manage_subreddit_chat",e.MOD_BETA="mod_beta",e.MUTE_USER="mute_user",e.PINNED_POSTS_LIMIT_REACHED="pinned_posts_limit_reached",e.REDESIGN_MODAL="redesign_modal",e.REGISTER_MODAL_ID="account_manager_register",e.SPEZ_MODAL="spez_modal",e.SUBREDDIT_CHAT_SETTINGS="subreddit_chat_settings",e.TRANSFER_POINTS="community_points_transfer",e.USER_FLAIR_MODAL_ID="user_flair_modal"}(r||(r={}))},"./src/reddit/constants/promos.ts":function(e,t,s){"use strict";var r,n;s.d(t,"h",function(){return r}),s.d(t,"f",function(){return n}),s.d(t,"e",function(){return a}),s.d(t,"j",function(){return c}),s.d(t,"g",function(){return i}),s.d(t,"c",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"a",function(){return u}),s.d(t,"b",function(){return l}),s.d(t,"k",function(){return b}),s.d(t,"i",function(){return p}),function(e){e.MobilePromoBanner="mobilePromoBanner",e.UpsellSignUpBannerLarge="upsellSignUpBannerLarge",e.UpsellSignUpBannerMedium="upsellSignUpBannerMedium",e.UpsellSignUpBannerSmall="upsellSignUpBannerSmall"}(r||(r={})),function(e){e[e.FrontPage=0]="FrontPage",e[e.SubredditPage=1]="SubredditPage",e[e.CommentsPage=2]="CommentsPage"}(n||(n={}));const a="seen_mobile_promo",c=3;var i,o,d;!function(e){e.mobilePromoBanner="desktop_xpromo_banner"}(i||(i={})),function(e){e.Test1="test_1",e.Test2="test_2"}(o||(o={})),function(e){e.Test1="test_1",e.Test2="test_2"}(d||(d={}));const u="47afc8f7-ed6c-497d-8750-200e43f3bdd8",l="026bd85a-79e4-449e-b75c-207e347c5d96",b={welcome:"welcome",join:"join",vote:"vote",personalize:"personalize"};!function(e){e.welcome="signup_upsell_banner_welcome",e.join="signup_upsell_banner_redditor",e.vote="signup_upsell_banner_discuss",e.personalize="signup_upsell_banner_personalize"}(i||(i={}));const p="seen_logged_out_upsell_banner"},"./src/reddit/constants/shortcuts.ts":function(e,t,s){"use strict";var r,n;s.d(t,"d",function(){return r}),s.d(t,"c",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"a",function(){return c}),function(e){e.CommentPage="CommentPage",e.Global="Global",e.Lightbox="Lightbox",e.Listing="Listing",e.Modqueue="Modqueue"}(r||(r={})),function(e){e.Close="CLOSE",e.CollapseOrLoad="COLLAPSE_OR_LOAD",e.Downvote="DOWNVOTE",e.Expando="EXPANDO",e.Hide="HIDE",e.Konami="KONAMI",e.NewPost="NEW_POST",e.NextComment="NEXT_COMMENT",e.NextPost="NEXT_POST",e.OpenIndex="OPEN_INDEX",e.OpenLightbox="OPEN_LIGHTBOX",e.OpenLink="OPEN_LINK",e.PrevComment="PREV_COMMENT",e.PrevPost="PREV_POST",e.Reply="REPLY",e.Save="SAVE",e.Upvote="UPVOTE"}(n||(n={}));const a="SHORTCUT_FOCUSABLE_DIV",c=[9,13,32]},"./src/reddit/constants/viewabilityEvents.ts":function(e,t,s){"use strict";var r;s.d(t,"a",function(){return r}),function(e){e[e.Viewable=1]="Viewable",e[e.VideoViewable=2]="VideoViewable",e[e.VideoFullyViewable=3]="VideoFullyViewable",e[e.Impression=4]="Impression"}(r||(r={}))},"./src/reddit/controls/FormFields/index.tsx":function(e,t,s){"use strict";s.d(t,"a",function(){return f}),s.d(t,"b",function(){return y}),s.d(t,"c",function(){return E}),s.d(t,"d",function(){return C}),s.d(t,"e",function(){return R});var r,n=s("./node_modules/react/index.js"),a=s.n(n),c=s("./bundled-modules/styled-components/styled-components.min.js"),i=s.n(c),o=s("./src/reddit/helpers/styles/mixins/fonts.tsx"),d=s("./src/reddit/icons/svgs/Plus/index.tsx"),u=s("./src/reddit/icons/svgs/Trash2/index.tsx"),l=s("./src/reddit/models/Theme/NewColorSystem/index.ts"),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},p=(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(e,t,s,n){var a=e&&e.defaultProps,c=arguments.length-3;if(t||0===c||(t={}),t&&a)for(var i in a)void 0===t[i]&&(t[i]=a[i]);else t||(t=a||{});if(1===c)t.children=n;else if(c>1){for(var o=Array(c),d=0;d<c;d++)o[d]=arguments[d+3];t.children=o}return{$$typeof:r,type:e,key:void 0===s?null:""+s,ref:null,props:t,_owner:null}}),O=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const f=i.a.input.withConfig({componentId:"s18ppx8l-0"})(["background-color: ",";border: 1px solid ",";color: ",";box-sizing: border-box;height: 48px;margin-bottom: 8px;border-radius: 4px;padding: 12px 24px 4px 12px;width: 100%;&:focus {border: solid 1px #0079D3;}&:focus + label {top: 8px;left: 12px;}&:invalid + label {top: 8px;left: 12px;}"],e=>Object(l.c)(e).body,e=>Object(l.c)(e).line,e=>Object(l.c)(e).bodyText),m=i.a.label.withConfig({componentId:"s18ppx8l-1"})(["","cursor: text;color: ",";position: absolute;top: ",";left: ",";transition: 0.2s;"],o.labelsFont,e=>Object(l.c)(e).actionIcon,e=>e.hasValue?"8px":"19px",e=>e.hasValue?"12px":"15px"),j=i.a.div.withConfig({componentId:"s18ppx8l-2"})(["position: relative;display: inline-block;"," {background-color: ",";color: ",";padding-bottom: 12px;border-color: ","}"],f,e=>Object(l.c)(e).body,e=>Object(l.c)(e).bodyText,e=>!1===e.isValid?"#f00":"rgb(229, 229, 229)"),g=e=>{"LABEL"===e.target.tagName&&(e.target.parentElement.firstElementChild.focus(),e.stopPropagation())},y=e=>{e.label,e.children;const t=e.inputRef,s=e.className,r=O(e,["label","children","inputRef","className"]),n=void 0!==e.value&&""!==e.value;return p(j,{className:s,hasLabel:!!e.label,onClick:g,isValid:e.isValid},void 0,a.a.createElement(f,b({innerRef:t},r)),e.label&&p(m,{hasValue:n},void 0,e.label),e.children)},_=i.a.div.withConfig({componentId:"s18ppx8l-3"})(["position: relative;display: inline-block;"," {background-color: ",";color: ",";padding-bottom: 0;&::placeholder {color: transparent;}&:focus {border: solid 1px ",";outline: none;&::placeholder {color: ",";}}}"],f,e=>Object(l.c)(e).body,e=>Object(l.c)(e).bodyText,e=>Object(l.c)(e).button,e=>Object(l.c)(e).metaText),E=e=>{e.label,e.children;const t=e.inputRef,s=e.className,r=e.redditStyle,n=O(e,["label","children","inputRef","className","redditStyle"]),c=void 0!==e.value&&""!==e.value;return p(_,{className:s,redditStyle:r,onClick:g},void 0,a.a.createElement(f,b({innerRef:t},n)),e.label&&p(m,{hasValue:c},void 0,e.label),e.children)},h=i()(u.b).withConfig({componentId:"s18ppx8l-4"})(["height: 20px;&:hover {fill: rgb(114, 113, 113);}"]),S=i.a.div.withConfig({componentId:"s18ppx8l-5"})(["position: absolute;cursor: pointer;top: 14px;right: 16px;display: inline-block;"]),T=i()(d.a).withConfig({componentId:"s18ppx8l-6"})(["height: 17px;background-color: #A5A4A4;fill: white;border-radius: 3px;position: absolute;right: 16px;&:hover {background-color: rgb(114, 113, 113);}"]),I=i()(e=>p("div",{className:e.className,onClick:e.onClick},void 0,e.text," ",p(T,{}))).withConfig({componentId:"s18ppx8l-7"})(["background-color: ",";border: dashed 1px #ddd;color: ",";cursor: pointer;height: 32px;padding: 16px 12px 0px 12px;position: relative;border-radius: 4px;margin-bottom: 8px;"],e=>Object(l.c)(e).body,e=>Object(l.c)(e).bodyText),v=i.a.div.withConfig({componentId:"s18ppx8l-8"})(["display: flex;flex-direction: column;padding: 0px 8px;"]);var C;!function(e){e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE"}(C||(C={}));class R extends a.a.Component{constructor(){super(...arguments),this.state={addingNewInputs:!1},this.addValue=(()=>{const e=this.props.values.slice();this.props.buttonOnTop?e.unshift(""):e.push(""),this.props.onChange(e),this.props.onEvent&&this.props.onEvent({action:C.ADD})}),this.updateValue=((e,t)=>{const s=this.props.values.slice();s[t]=e.target.value,this.props.onChange(s)}),this.removeValue=(e=>{const t=this.props.values.slice(),s=t[e];t.splice(e,1),this.props.onChange(t),this.props.onEvent&&this.props.onEvent({action:C.REMOVE,value:s,index:e})})}componentWillReceiveProps(e){e.values.length>this.props.values.length&&this.setState({addingNewInputs:!0})}componentDidUpdate(){this.focusedInput&&this.state.addingNewInputs&&(this.focusedInput.focus(),this.setState({addingNewInputs:!1}))}setInputRef(e,t){this.state.addingNewInputs&&(!this.props.buttonOnTop||this.props.buttonOnTop&&!t)&&(this.focusedInput=e)}renderFields(){var e=this.props;const t=e.values,s=e.disabled,r=e.label,n=e.placeholder;return t.map((e,t)=>p(y,{inputRef:e=>this.setInputRef(e,t),disabled:s,type:"text",label:r,onChange:e=>this.updateValue(e,t),placeholder:n,value:e,style:{paddingRight:"36px"}},void 0,p(S,{onClick:()=>this.removeValue(t)},void 0,p(h,{}))))}render(){var e=this.props;const t=e.buttonOnTop,s=e.values,r=e.maxLength,n=e.addValueText,a=e.disabled;this.focusedInput=null;const c=!(!!r&&s.length>=r)&&!a;return p(v,{className:this.props.className},void 0,t&&c&&p(I,{onClick:this.addValue,text:n}),this.renderFields(),!t&&c&&p(I,{onClick:this.addValue,text:n}))}}},"./src/reddit/endpoints/accounts/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return i}),s.d(t,"b",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"c",function(){return u});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/headers.ts");const i=async(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{data:{name:t},endpoint:`${e.apiUrl}/api/block_user`,method:r.jb.POST}),o=async(e,t,s)=>Object(n.c)(Object(a.a)(e,[c.a]),{data:{name:s,container:t,type:"enemy"},endpoint:`${e.apiUrl}/api/unfriend`,method:r.jb.POST}),d=async(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{data:{name:t},endpoint:`${e.apiUrl}/api/add_whitelisted?include_model`,method:r.jb.POST}),u=async(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{data:{name:t},endpoint:`${e.apiUrl}/api/remove_whitelisted`,method:r.jb.POST})},"./src/reddit/endpoints/category/categoryList.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return o});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/categories.tsx"),i=s("./src/reddit/constants/headers.ts");const o=e=>{const t={},s=[];return e.forEach((e,r)=>{const n={attr:e.category_attr,color:e.category_color||c.a[r%c.a.length],icon:e.category_icon,id:e.category_id,name:e.category_name};s.push(n.id),t[n.id]=n}),{categories:t,categoryIds:s}};t.a=(e=>Object(n.c)(Object(a.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/available_subreddit_categories.json?use_extended_categories=true`,method:r.jb.GET}))},"./src/reddit/endpoints/category/subreddits.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return d});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/headers.ts"),i=s("./src/reddit/helpers/r2/normalizeSubredditFromR2/index.ts"),o=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const d=e=>{const t=[],s=[],r={},n={};return e.data.children.forEach(({data:e})=>{const a=Object(i.a)(e);t.push(a.id),s.push(a.name),r[a.id]=a,n[a.id]={accountsActive:e.accounts_active,allOriginalContent:e.all_original_content,bannerBackgroundColor:e.banner_background_color,bannerBackgroundImage:e.banner_background_image,contentCategory:e.content_category,keyColor:e.key_color,originalContentTagEnabled:e.original_content_tag_enabled,publicDescription:e.public_description,subscribers:e.subscribers,userIsSubscriber:e.user_is_subscriber}}),{subredditIds:t,subredditNames:s,subreddits:r,subredditsAboutInfo:n}};t.a=((e,t,s=100)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(o.a)(`${e.apiUrl}/api/subreddits_in_category.json?category_id=${t}&limit=${s}`),method:r.jb.GET}))},"./src/reddit/endpoints/chat/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return l}),s.d(t,"c",function(){return b}),s.d(t,"i",function(){return O}),s.d(t,"d",function(){return f}),s.d(t,"f",function(){return m}),s.d(t,"e",function(){return j}),s.d(t,"h",function(){return g}),s.d(t,"a",function(){return _}),s.d(t,"g",function(){return h}),s.d(t,"j",function(){return S});var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts");const o="api/v1",d=`${o}/sendbird`;var u;!function(e){e.PUBLIC="all"}(u||(u={}));const l=10,b=10;class p extends Error{constructor(e,t){super(e),this.response=t}}const O=async(e,t,s)=>{const d={};return s&&(d.public_mode=u.PUBLIC),Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${o}/subreddit/${t}/channels`,method:n.jb.GET,data:d})},f=async(e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${o}/subreddit/channels/create`,method:n.jb.POST,data:JSON.stringify({room:s.room,room_type:s.roomType,description:s.description,subreddit:s.subreddit,automute_account_age_threshold:s.minimumAcctAge,automute_on_join_duration:s.newMemberAge})}),m=async(e,t,s,d)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${o}/subreddit/channels/${t}`,method:n.jb.PUT,data:JSON.stringify({room:d.room,description:d.description,automute_account_age_threshold:d.minimumAcctAge,automute_on_join_duration:d.newMemberAge})}),j=async(e,t)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${o}/subreddit/channels/${t}`,method:n.jb.DELETE}),g=async e=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${d}/config`,method:n.jb.GET});var y,_;function E(e){const t={bannedWords:e.profanity_filter&&e.profanity_filter.keywords,regexes:e.profanity_filter&&e.profanity_filter.regex_filters,rateLimit:e.user_messages_per_channel,domains:e.domain_filter&&e.domain_filter.domains&&e.domain_filter.domains.join(", "),useDefaultProfanityFilter:e.profanity_filter&&e.profanity_filter.should_check_global,domainFilterOption:void 0};if(!1===e.allow_links)t.domainFilterOption=_.BLOCK_ALL_DOMAINS;else{var s=e.domain_filter;const r=(s=void 0===s?{type:void 0}:s).type;r===y.BLOCK_MODE?t.domainFilterOption=_.BLOCK_BANNED_DOMAINS:r===y.ALLOW_MODE?t.domainFilterOption=_.ALLOW_APPROVED_DOMAINS:t.domainFilterOption=_.ALLOW_ALL_DOMAINS}return t}async function h(e,t){const s=await Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${o}/chat/subreddit/${t}/settings`,method:n.jb.GET});if(s.ok&&s.body)return E(s.body)}async function S(e,t,s){const d=await Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${r.a.sendbirdServiceUrl}/${o}/chat/subreddit/${t}/settings`,method:n.jb.PUT,data:JSON.stringify(function(e){const t={};return e.rateLimit&&e.rateLimit>0&&(t.user_messages_per_channel=e.rateLimit,t.user_messages_per_channel_duration=b),void 0===e.bannedWords&&void 0===e.regexes&&void 0===e.useDefaultProfanityFilter||(t.profanity_filter={keywords:e.bannedWords,regex_filters:e.regexes,should_check_global:e.useDefaultProfanityFilter}),e.domainFilterOption===_.BLOCK_ALL_DOMAINS?(t.allow_links=!1,t.domain_filter={type:y.DISABLE}):e.domainFilterOption===_.ALLOW_ALL_DOMAINS?(t.allow_links=!0,t.domain_filter={type:y.DISABLE}):e.domainFilterOption===_.ALLOW_APPROVED_DOMAINS&&e.domains?(t.allow_links=!0,t.domain_filter={type:y.ALLOW_MODE,domains:e.domains.split(",")}):e.domainFilterOption===_.BLOCK_BANNED_DOMAINS&&e.domains&&(t.allow_links=!0,t.domain_filter={type:y.BLOCK_MODE,domains:e.domains.split(",")}),t}(s))});if(d.ok&&d.body)return Object.assign({},d,{body:E(d.body)});throw new p("Failed to update subreddit chat settings",d)}!function(e){e[e.BLOCK_MODE=2]="BLOCK_MODE",e[e.ALLOW_MODE=1]="ALLOW_MODE",e[e.DISABLE=0]="DISABLE"}(y||(y={})),function(e){e.ALLOW_ALL_DOMAINS="Allow all domains",e.ALLOW_APPROVED_DOMAINS="Allow links to approved domains",e.BLOCK_BANNED_DOMAINS="Block links to banned domains",e.BLOCK_ALL_DOMAINS="Block all domains"}(_||(_={}))},"./src/reddit/endpoints/flair/index.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return o}),s.d(t,"f",function(){return d}),s.d(t,"g",function(){return u}),s.d(t,"j",function(){return l}),s.d(t,"i",function(){return b}),s.d(t,"h",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"a",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"b",function(){return j});var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts");const o=(e,t,s,r,o)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/r/${s}/api/selectflair`,method:n.jb.POST,data:{api_type:"json",flair_template_id:r,name:t,text:o}}),d=(e,t,s,r)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/selectflair`,method:n.jb.POST,data:{api_type:"json",flair_template_id:s,link:t,text:r}}),u=(e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/r/${s}/api/setflairenabled`,method:n.jb.POST,data:{api_type:"json",flair_enabled:t}}),l=async(e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/enable_sr_user_flair.json`,method:n.jb.POST,data:{subreddit:t,enabled:s}}),b=async(e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/enable_sr_link_flair.json`,method:n.jb.POST,data:{subreddit:t,enabled:s}}),p=async(e,t,s,r)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/enable_sr_user_flair_self_assign.json`,method:n.jb.POST,data:{subreddit:r,flair_type:s,enabled:t}}),O=async(e,t,s,r)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/flairtemplate_v2`,method:n.jb.POST,data:{flair_template_id:t.id,text:t.text,text_editable:t.textEditable,flair_type:r,text_color:t.textColor,background_color:t.backgroundColor,mod_only:t.modOnly,r:s}}),f=async(e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/deleteflairtemplate`,method:n.jb.POST,data:{flair_template_id:t,r:s}}),m=async(e,t,s,r)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/v1/${t}/flair_template_order/${s}`,method:n.jb.PATCH,type:"json",data:r}),j=async(e,t)=>Object(a.c)(e,{endpoint:`${r.a.gatewayUrl}/desktopapi/v1/subreddits/${t}/userFlair`,method:n.jb.GET,headers:{[i.a]:i.a}})},"./src/reddit/endpoints/gold/purchase.ts":function(e,t,s){"use strict";s.d(t,"g",function(){return l}),s.d(t,"f",function(){return b}),s.d(t,"h",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"e",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"i",function(){return j}),s.d(t,"a",function(){return g}),s.d(t,"b",function(){return y});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/headers.ts"),i=s("./src/reddit/helpers/genericServerError/index.ts"),o=s("./src/reddit/helpers/r2/normalizeGildingsFromR2/index.ts"),d=s("./src/reddit/helpers/r2/normalizeR2APIErrors/index.ts");const u=(e,t)=>e.ok?e.body.json&&e.body.json.errors.length?Object.assign({},e,{ok:!1,error:Object(d.a)(e)}):Object.assign({},e):Object.assign({},e,{error:e.error||Object(i.a)(t)}),l=async({coins:e,context:t,correlationId:s,language:i,pennies:o,rememberCard:d,token:l,savedCardId:b})=>{const p={token:l?l.id:void 0,coins:e,pennies:o,remember_card:d,card_id:b,correlation_id:s};return Object(n.c)(Object(a.a)(t,[c.a]),{method:r.jb.POST,endpoint:`${t.apiUrl}/api/v2/gold/stripe/buy_coins`,data:p}).then(e=>u(e,i))},b=async({coins:e,context:t,correlationId:s,gildParams:i,language:d,pennies:l,rememberCard:b,thingId:p,token:O,savedCardId:f})=>{const m=i.gildType,j=i.includeMessage,g=i.isAnonymous,y=i.message,_={token:O?O.id:void 0,coins:e,pennies:l,thing_id:p,gild_type:m,message:j?y:"",is_anonymous:g,remember_card:b,card_id:f,correlation_id:s};return Object(n.c)(Object(a.a)(t,[c.a]),{method:r.jb.POST,endpoint:`${t.apiUrl}/api/v2/gold/stripe/buy_coins_and_gild`,data:_}).then(e=>(e&&e.ok&&e.body&&e.body.gildings&&(e.body.gildings=Object(o.a)(e.body.gildings)),Object.assign({},e))).then(e=>u(e,d))},p=async({context:e,correlationId:t,language:s,pennies:i,token:o})=>{const d={token:o.id,pennies:i,correlation_id:t};return Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/v2/gold/stripe/buy_premium_subscription`,data:d}).then(e=>u(e,s))},O=async(e,t,s,i)=>{const o={button_id:s,correlation_id:i};return Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/v2/gold/paypal/initiate_coins_payment`,data:o}).then(e=>u(e,t))},f=async(e,t,s,i)=>{const o={button_id:s,correlation_id:i};return Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/v2/gold/paypal/initiate_premium_payment`,data:o}).then(e=>u(e,t))},m=async(e,t,s,i,o,d,l,b)=>{const p={button_id:s,thing_id:i,gild_type:o,message:d,is_anonymous:l,correlation_id:b};return Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/v2/gold/paypal/initiate_coins_and_gild_payment`,data:p}).then(e=>u(e,t))},j=async(e,t,s)=>{const i={token:s.id};return Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/v2/gold/stripe/update_creditcard`,data:i}).then(e=>e.ok?Object.assign({},e):Object.assign({},e,{error:Object(d.a)(e)}))},g=async(e,t)=>{const s={card_id:t};return Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:`${e.apiUrl}/api/v2/gold/stripe/delete_creditcard`,data:s}).then(e=>e.ok?Object.assign({},e):Object.assign({},e,{error:Object(d.a)(e)}))},y=async(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.GET,endpoint:`${e.apiUrl}/api/v2/gold/stripe/creditcards`}).then(e=>e.ok?Object.assign({},e):Object.assign({},e,{error:Object(d.a)(e)}))},"./src/reddit/endpoints/governance/badges.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c}),s.d(t,"a",function(){return i});var r=s("./src/config.ts"),n=s("./src/reddit/endpoints/governance/requester.ts");async function a(e,t){const s=Object(n.a)(e,{method:"get",endpoint:`${r.a.metaUrl}/badges/${t}?selected=true`}),a=await s;if(a.ok){const e={},t={},s=a.body;return Object.keys(s).forEach(r=>{const n=s[r];t[r]=n,e[n.userId]||(e[n.userId]=[]),e[n.userId].push(n.id)}),Object.assign({},a,{body:{badges:t,usersAppliedBadges:e}})}return a}async function c(e,t,s){const a=await Object(n.a)(e,{method:"get",endpoint:`${r.a.metaUrl}/badges/${t}?users=${s}`});if(a.ok){const e={},t=[],s=a.body;return Object.keys(s).forEach(r=>{const n=s[r];e[r]=n,t.push(n.id)}),Object.assign({},a,{body:{badges:e,userOwnedBadges:t}})}return a}function i(e,t,s,a=!0){return Object(n.a)(e,{method:"patch",endpoint:`${r.a.metaUrl}/badges/${t}/${s}`,data:{selected:a}})}},"./src/reddit/endpoints/governance/posts.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return a});var r=s("./src/config.ts"),n=(s("./src/reddit/models/Poll/index.ts"),s("./src/reddit/endpoints/governance/requester.ts"));function a(e,t,s){return Object(n.a)(e,{method:"get",endpoint:`${r.a.metaUrl}/polls/${t}?postIds=${s.join(",")}`})}},"./src/reddit/endpoints/governance/requester.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n});var r=s("./src/lib/makeApiRequest/index.ts");function n(e,t){return Object(r.c)(e,Object.assign({},t,{type:"json"})).then(e=>{if(e.ok)return{body:e.body,ok:!0,status:e.status};return{error:e.error&&e.error.fields&&e.error.fields[0]?e.error.fields[0].msg:Object.assign({},e.body,{code:e.status}),ok:!1,status:e.status}})}},"./src/reddit/endpoints/me/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return c});var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts");const c=e=>Object(a.c)(e,{endpoint:`${r.a.gatewayUrl}/desktopapi/v1/me`,method:n.jb.GET})},"./src/reddit/endpoints/modQueue/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return d}),s.d(t,"a",function(){return u});var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/omitHeaders/index.ts"),i=s("./src/reddit/constants/headers.ts"),o=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const d=(e,t,s)=>Object(a.c)(e,{endpoint:Object(o.a)(`${r.a.gatewayUrl}/desktopapi/v1/${t}`),method:n.jb.GET,data:Object.assign({moderated_limit:25},s)}),u=(e,t,s)=>Object(a.c)(Object(c.a)(e,[i.a]),{endpoint:`${e.apiUrl}/api/v1/modactions/${t}`,method:n.jb.POST,type:"json",data:s})},"./src/reddit/endpoints/moderator/moderatingSubreddits.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/headers.ts");t.a=(async e=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:`${e.apiUrl}/subreddit_permissions`,method:r.jb.GET}))},"./src/reddit/endpoints/page/commentsPage.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/reddit/models/RichTextJson/addRTJParam.ts");t.a=((e,t,s,i)=>Object(a.c)(e,{data:i,endpoint:s?Object(c.a)(`${r.a.gatewayUrl}/desktopapi/v1/postcomments/${t}/${s}`):Object(c.a)(`${r.a.gatewayUrl}/desktopapi/v1/postcomments/${t}`),method:n.jb.GET}))},"./src/reddit/endpoints/page/frontpage.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/graphql/operations/Frontpage.json"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/lib/makeGqlRequest/index.ts"),o=s("./src/lib/performanceTimings/index.tsx"),d=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),u=s("./src/reddit/constants/postLayout.ts");function l(e){return e?u.b[e]:u.e}var b=s("./src/reddit/helpers/graphql/normalizeFrontpageFromGql/index.ts"),p=s("./src/reddit/models/RichTextJson/addRTJParam.ts"),O=s("./src/reddit/selectors/user.ts");s.d(t,"c",function(){return m}),s.d(t,"d",function(){return j}),s.d(t,"b",function(){return g});var f=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const m=(e,t)=>Object(i.a)(e,Object.assign({},n,{variables:t})),j=(e,t)=>{const s=t.isMobile,r=t.layout,n=t.sort,a=t.t,c=Object(O.K)(e),i={recentPostIds:e.posts.recent,includeIdentity:c&&!e.user.account,includeFeatured:!0};return n&&(i.sort=n.toUpperCase()),a&&(i.range=a.toUpperCase()),s&&(i.pageSize=l(r)),i},g=async(e,t,s)=>{const r=Date.now(),n=await m(e,t),c=Date.now();if(!n.ok)return n;const i=Date.now(),d=Object(b.a)(n.body.data),u=Date.now(),l=[{duration:c-r,logKeyType:o.a.gqlFetchTiming},{duration:u-i,logKeyType:o.a.gqlNormalizationTiming}];return Object(o.g)(a.r.FRONTPAGE,s,l),Object.assign({},n,{body:d})};t.a=((e,t)=>{let n={};if(t){const e=t.isMobile,s=t.recentPostIds,r=f(t,["isMobile","recentPostIds"]);n=Object.assign({},r,e?{limit:l(t.layout)}:{},s?{recentPostIds:s.join(",")}:{})}return t&&t.useMockData?(()=>new Promise(async e=>{const t=await s.e("MockData").then(s.bind(null,"./src/reddit/endpoints/page/mocks/frontpage.ts")).then(e=>e.default);setTimeout(()=>e(t()),2e3)}))():Object(c.c)(e,{endpoint:Object(d.a)(Object(p.a)(`${r.a.gatewayUrl}/desktopapi/v1/frontpage`)),method:a.jb.GET,data:Object.assign({},n)})})},"./src/reddit/endpoints/page/myMultiredditFeed.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),i=s("./src/reddit/models/RichTextJson/addRTJParam.ts");t.a=((e,t,s)=>Object(a.c)(e,{data:s,endpoint:Object(c.a)(Object(i.a)(`${r.a.gatewayUrl}/desktopapi/v1/me/multireddits/${t}`)),method:n.jb.GET}))},"./src/reddit/endpoints/page/originalContentPage.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),i=s("./src/reddit/models/RichTextJson/addRTJParam.ts");t.a=((e,t)=>Object(a.c)(e,{data:t,endpoint:Object(c.a)(Object(i.a)(`${r.a.gatewayUrl}/desktopapi/v1/original`)),method:n.jb.GET}))},"./src/reddit/endpoints/page/profileOverviewPage.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return o}),s.d(t,"a",function(){return d});var r=s("./src/config.ts"),n=s("./src/lib/addAllowQuarantinedParam/index.ts"),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/makeApiRequest/index.ts"),i=s("./src/reddit/models/RichTextJson/addRTJParam.ts");const o=(e,t,s)=>Object(c.c)(e,{data:s,endpoint:Object(n.a)(Object(i.a)(`${r.a.gatewayUrl}/desktopapi/v1/user/${t}/conversations`)),method:a.jb.GET}).then(e=>"pinned"in e.body?e:"postIds"in e.body?Object.assign({},e,{body:Object.assign({},e.body,{pinned:e.body.postIds.filter(t=>e.body.posts[t]&&e.body.posts[t].isPinned).reverse()})}):e),d=(e,t,s)=>Object(c.c)(e,{data:s,endpoint:Object(n.a)(Object(i.a)(`${r.a.gatewayUrl}/desktopapi/v1/user/${t}/overview`)),method:a.jb.GET}).then(e=>"pinned"in e.body?e:"overviewIds"in e.body?Object.assign({},e,{body:Object.assign({},e.body,{pinned:e.body.overviewIds.filter(t=>e.body.posts[t]&&e.body.posts[t].isPinned).reverse()})}):e)},"./src/reddit/endpoints/page/search.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/lib/search/index.ts"),i=s("./src/reddit/helpers/correlationIdTracker.ts"),o=s("./src/reddit/models/RichTextJson/addRTJParam.ts");t.a=((e,t,s)=>Object(a.c)(e,{data:((e,t)=>{let s=t?Object.assign({},e,{type:e.restrict_sr?"link":e.type}):e;(s=s.type?s:Object.assign({},s,{type:"link,sr,user"})).q=Object(c.a)(e.q);const r=Object(i.c)(i.a.SearchResults);return r&&(s.search_correlation_id=r),s})(s||{},t),endpoint:Object(o.a)(t?`${r.a.gatewayUrl}/desktopapi/v1/subreddits/${t}/search`:`${r.a.gatewayUrl}/desktopapi/v1/search`),method:n.jb.GET}))},"./src/reddit/endpoints/page/subredditPage.ts":function(e,t,s){"use strict";var r=s("./src/config.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/lib/makeApiRequest/index.ts"),c=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),i=s("./src/reddit/models/RichTextJson/addRTJParam.ts"),o=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};t.a=((e,t,s)=>Object(a.c)(e,{endpoint:Object(c.a)(Object(i.a)(`${r.a.gatewayUrl}/desktopapi/v1/subreddits/${t}`)),method:n.jb.GET,data:s&&(e=>{var t=e.recentPostIds,s=o(e,["recentPostIds"]);return t&&t.length?Object.assign({},s,{recentPostIds:t.join(",")}):s})(s)||{}}))},"./src/reddit/endpoints/post/convert.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/headers.ts"),i=s("./src/reddit/helpers/addRedesignIdentifier/index.ts"),o=s("./src/reddit/models/PostCreationForm/index.ts");t.a=((e,t,s)=>{const d={output_mode:"markdown"===t?t:"rtjson"};return t===o.h.MARKDOWN?d.richtext_json=s:d.markdown_text=s,Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/convert_rte_body_format`),method:r.jb.POST,data:d})})},"./src/reddit/endpoints/post/draft/helpers.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return c}),s.d(t,"b",function(){return i}),s.d(t,"a",function(){return o});var r=s("./src/reddit/constants/originalContent.ts"),n=s("./src/reddit/models/Flair/index.ts"),a=s("./src/reddit/models/PostDraft/index.ts");const c=e=>({id:e.json.data.id,draftsCount:e.json.data.drafts_count}),i=e=>{switch(e){case"link":return a.b.Link;case"markdown":return a.b.Markdown;case"richtext":return a.b.RichText;default:return"self"}},o=e=>Object.assign({id:e.draftId||void 0},(e=>e.destSubreddit.id?{subreddit:e.destSubreddit.id,target:e.destSubreddit.isProfile?"profile":"subreddit"}:{})(e),{kind:(e=>{switch(e.kind){case a.b.Link:return"link";case a.b.Markdown:return"markdown";case a.b.RichText:return"richtext";default:return"self"}})(e),title:(e=>e.title.substring(0,300))(e),body:(e=>{switch(e.kind){case a.b.Link:case a.b.Markdown:return e.body;case a.b.RichText:return JSON.stringify({document:e.body})}})(e),spoiler:e.isSpoiler,nsfw:e.isNSFW,original_content:e.isOC,content_category:e.ocCategory===r.c?void 0:e.ocCategory||void 0},(e=>e?{flair_id:e.templateId||null,flair_text:Object(n.j)(e)||null,flair_text_color:e.textColor||null,flair_background_color:e.backgroundColor||null}:{flair_id:null,flair_text:null,flair_text_color:null,flair_background_color:null})(e.flair),{send_replies:e.sendReplies,is_public_link:e.isPublicLink})},"./src/reddit/endpoints/post/index.tsx":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeApiRequest/index.ts"),a=s("./src/lib/omitHeaders/index.ts"),c=s("./src/reddit/constants/headers.ts"),i=s("./src/reddit/helpers/addRedesignIdentifier/index.ts");s.d(t,"b",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"e",function(){return u}),s.d(t,"f",function(){return l}),s.d(t,"g",function(){return b}),s.d(t,"r",function(){return p}),s.d(t,"i",function(){return O}),s.d(t,"t",function(){return f}),s.d(t,"k",function(){return m}),s.d(t,"j",function(){return j}),s.d(t,"u",function(){return g}),s.d(t,"o",function(){return y}),s.d(t,"l",function(){return _}),s.d(t,"c",function(){return E}),s.d(t,"n",function(){return h}),s.d(t,"v",function(){return S}),s.d(t,"p",function(){return T}),s.d(t,"w",function(){return I}),s.d(t,"h",function(){return v}),s.d(t,"s",function(){return C}),s.d(t,"q",function(){return R}),s.d(t,"a",function(){return A}),s.d(t,"m",function(){return D});const o=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/approve`),method:r.jb.POST,data:{id:t}}),d=(e,t,s)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/distinguish/${s}`),method:r.jb.POST,data:{id:t}}),u=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/fetch_title`),method:r.jb.POST,data:{url:t,api_type:"json"}}),l=(e,t,s)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/follow_post`),method:r.jb.POST,data:{follow:s,fullname:t}}),b=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/hide`),method:r.jb.POST,data:{id:t}}),p=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/unhide`),method:r.jb.POST,data:{id:t}}),O=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/lock`),method:r.jb.POST,data:{id:t}}),f=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/unlock`),method:r.jb.POST,data:{id:t}}),m=(e,t,s)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/set_original_content`),method:r.jb.POST,data:{fullname:t,should_set_oc:s}}),j=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/marknsfw`),method:r.jb.POST,data:{id:t}}),g=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/unmarknsfw`),method:r.jb.POST,data:{id:t}}),y=(e,t,s)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:`${e.apiUrl}/api/sendreplies`,method:r.jb.POST,data:{id:t,state:s}}),_=(e,t,s)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/remove`),method:r.jb.POST,data:{id:t,spam:s}}),E=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/del`),method:r.jb.POST,data:{id:t}}),h=(e,t)=>((e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/save`),method:r.jb.POST,data:{id:t}}))(e,t),S=(e,t)=>((e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/unsave`),method:r.jb.POST,data:{id:t}}))(e,t),T=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/spoiler`),method:r.jb.POST,data:{id:t}}),I=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:Object(i.a)(`${e.apiUrl}/api/unspoiler`),method:r.jb.POST,data:{id:t}}),v=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:`${e.apiUrl}/api/ignore_reports`,method:r.jb.POST,data:{id:t}}),C=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:`${e.apiUrl}/api/unignore_reports`,method:r.jb.POST,data:{id:t}}),R=(e,t,s,i)=>Object(n.c)(Object(a.a)(e,[c.a]),{endpoint:`${e.apiUrl}/api/set_subreddit_sticky`,method:r.jb.POST,data:{id:t,state:s,to_profile:i}});var A;!function(e){e.Rule="rule",e.SiteRule="siteRule",e.Other="other",e.FileComplaint="fileComplaint"}(A||(A={}));const D=(e,t)=>Object(n.c)(Object(a.a)(e,[c.a]),{method:r.jb.POST,endpoint:Object(i.a)(`${e.apiUrl}/api/report`),data:P(t)}),P=e=>{const t={thing_id:e.id,api_type:"json"},s=e.reason;switch(s.kind){case A.Other:return Object.assign({},t,{reason:"other",other_reason:s.rule});case A.Rule:return Object.assign({},t,{reason:s.rule,rule_reason:s.rule});case A.SiteRule:default:return Object.assign({},t,{reason:"site_reason_selected",site_reason:s.rule})}}},"./src/reddit/endpoints/subreddit/rules.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/camelCase.js"),n=s.n(r),a=s("./node_modules/lodash/mapKeys.js"),c=s.n(a),i=s("./src/graphql/operations/SubredditRules.json"),o=s("./src/lib/constants/index.ts"),d=s("./src/lib/makeApiRequest/index.ts"),u=s("./src/lib/makeGqlRequest/index.ts"),l=s("./src/lib/omitHeaders/index.ts"),b=s("./src/reddit/constants/headers.ts"),p=s("./src/reddit/helpers/graphql/helpers.ts"),O=s("./src/reddit/models/Rule/index.ts");s.d(t,"b",function(){return m}),s.d(t,"c",function(){return j}),s.d(t,"a",function(){return y}),s.d(t,"f",function(){return _}),s.d(t,"d",function(){return E}),s.d(t,"e",function(){return h});const f=({rules:e})=>({rules:e.map(e=>Object.assign({},c()(e,(e,t)=>n()(t)),{kind:"link"===e.kind?"post":e.kind}))}),m=(e,t)=>Object(u.a)(e,Object.assign({},i,{variables:{subredditName:t}})).then(e=>(e.ok&&e.body&&(e.body=(e=>{return{rules:(e.data.subreddit&&e.data.subreddit.rules||[]).map(e=>({kind:O.b[e.kind],description:e.content.markdown,descriptionHtml:e.content.markdown,descriptionRichText:e.content.richtext,shortName:e.name,violationReason:e.violationReason||"",createdUtc:Object(p.j)(e.createdAt,p.a.Millis),priority:e.priority}))}})(e.body)),e)),j=(e,t)=>Object(d.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/user/${t}/about/rules.json`,method:o.jb.GET}).then(e=>(e.ok&&e.body.rules&&(e.body=f(e.body)),e)),g=e=>e.ok?(e.body=Object(O.g)(JSON.parse(e.body.json.data.rules)),e):e.body,y=async(e,t,s)=>Object(d.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/add_subreddit_rule`,method:o.jb.POST,data:{r:t,short_name:s.rule,kind:s.kind===O.a.post?"link":s.kind,violation_reason:s.reason,description:s.description,api_type:"json",raw_json:1}}).then(e=>g(e)),_=async(e,t,s,r)=>Object(d.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/update_subreddit_rule`,method:o.jb.POST,data:{r:t,short_name:s.rule,kind:s.kind===O.a.post?"link":s.kind,violation_reason:s.reason,description:s.description,old_short_name:r,api_type:"json",raw_json:1}}).then(e=>g(e)),E=async(e,t,s)=>Object(d.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/remove_subreddit_rule`,method:o.jb.POST,data:{r:t,short_name:s,api_type:"json",raw_json:1}}).then(e=>g(e)),h=async(e,t,s)=>Object(d.c)(Object(l.a)(e,[b.a]),{endpoint:`${e.apiUrl}/api/reorder_subreddit_rules`,method:o.jb.POST,data:{r:t,new_rule_order:(e=>e.map(e=>encodeURIComponent(e)).join())(s),api_type:"json",raw_json:1}}).then(e=>g(e))},"./src/reddit/helpers/adCount/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return c}),s.d(t,"b",function(){return i});var r=s("./src/lib/constants/index.ts"),n=s("./src/reddit/reducers/sidebarPromotedPosts/models/index.ts"),a=s("./src/reddit/selectors/platform.ts");const c=(e,t,s)=>[e,t,s].join("/"),i=(e,t)=>{switch(t){case n.a.SUBREDDIT:case n.a.COMMENTS_OVERLAY:case n.a.COMMENTS:{const t=Object(a.h)(e);return[c(r.d.ABOVE_THE_FOLD,t,0),c(r.d.BELOW_THE_FOLD,t,1)]}case n.a.FRONTPAGE:return[c(r.d.ABOVE_THE_FOLD,!1,0),c(r.d.BELOW_THE_FOLD,!1,1)];case n.a.MULTIREDDIT:case n.a.SEARCH_RESULTS:return[c(r.d.BELOW_THE_FOLD,!1,0)];default:return[c(r.d.ABOVE_THE_FOLD,!1,0),c(r.d.BELOW_THE_FOLD,!1,1)]}}},"./src/reddit/helpers/canonicalUrls.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return d}),s.d(t,"a",function(){return u}),s.d(t,"b",function(){return l});var r=s("./node_modules/react-router-redux/es/index.js"),n=s("./src/lib/addQueryParams/index.ts"),a=s("./src/lib/isAdHocMultireddit/index.ts"),c=s("./src/lib/isFakeSubreddit/index.ts"),i=s("./src/reddit/selectors/multireddit.ts"),o=s("./src/reddit/selectors/subreddit.ts");const d=(e,t,s)=>{const a=s.params,c=s.queryParams,o=s.url,d=a.multiredditName,u=Object(i.d)(e,{multiredditName:d});if(!u)return;const l=o===u,b=o.endsWith("/");if(l&&b)return;const p=b?o:`${o}/`,O=l?p:`${u}${p.substr(u.length)}`;t(Object(r.c)(Object(n.a)(O,c)))},u=(e,t,s)=>{const a=s.params,c=s.queryParams,i=s.url,d=a.subredditName;if(d){const s=`/user/${d}/`,a=i.endsWith("/"),u=Object(o.a)(e,{profileName:d});if(!u)return;const l=s===u;if(l&&a)return;const b=a?i:`${i}/`,p=l?b:b.replace(s,u);t(Object(r.c)(Object(n.a)(p,c)))}},l=(e,t,s)=>{const d=s.params,u=s.queryParams,l=s.url,b=d.subredditName;if(b){const s=`/r/${b}/`,d=l.endsWith("/");let p=l;if(Object(c.a)(b)&&Object(a.a)(b)){const t=Object(i.a)(e,{listingName:b}).subredditIds,r=Object(o.M)(e,{subredditIds:t}).map(e=>e.name).join("+");p=(d?l:`${l}/`).replace(s,`/r/${r}/`)}else{const t=Object(o.c)(e,{subredditName:b});if(!t)return;const r=(Object(c.a)(b)?s.toLowerCase():s)===t;if(r&&d)return;const n=d?l:`${l}/`;p=r?n:n.replace(s,t)}t(Object(r.c)(Object(n.a)(p,u)))}}},"./src/reddit/helpers/commentList/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c}),s.d(t,"d",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"a",function(){return d});var r=s("./src/reddit/constants/comments.ts"),n=s("./src/reddit/selectors/comments.ts");const a=(e,t)=>t().comments.models[e],c=e=>{switch(e.commentLink.type){case r.a.Comment:return e.commentsDict[e.commentLink.id];case r.a.MoreComments:return e.moreCommentsDict[e.commentLink.id];case r.a.ContinueThread:return e.continueThreadDict[e.commentLink.id]}},i=(e,t)=>e.type===r.a.MoreComments?t[e.id].numComments:1,o=(e,t,s,r)=>{let a=Object(n.o)(r,{commentLink:t,commentsPageKey:e}),c=t;for(;a&&a.depth>s&&a.prev&&(c=a.prev,(a=Object(n.o)(r,{commentLink:c,commentsPageKey:e}))&&!(a.depth<=s)););return c.id},d=(e,t)=>{const s=e.commentLists,r=e.comments;if(s[t].head)return Object.keys(r).filter(e=>(e=>!1!==e.collapsed)(r[e]))}},"./src/reddit/helpers/correlationIdTracker.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"c",function(){return i}),s.d(t,"d",function(){return o}),s.d(t,"b",function(){return d});var r,n=s("./node_modules/uuid/v4.js"),a=s.n(n);!function(e){e.Explore="Explore",e.GildingFlow="GildingFlow",e.GiftPremiumFlow="GiftPremiumFlow",e.GoldPayment="GoldPayment",e.PostComposer="PostComposer",e.PremiumSettings="PremiumSettings",e.RabbitHole="RabbitHole",e.SearchResults="SearchResults"}(r||(r={}));const c={},i=e=>c[e],o=e=>c[e]=a()(),d=e=>c[e]=void 0},"./src/reddit/helpers/filterListingResponse/index.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/findLastIndex.js"),n=s.n(r),a=s("./src/reddit/selectors/telemetry.ts"),c=s("./src/telemetry/index.ts"),i=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};t.a=((e,t,s)=>{var r=s.postIds,o=s.posts,d=i(s,["postIds","posts"]);const u=e.listings.postOrder.ids[t],l=(r||[]).filter(e=>!u||!u.includes(e)),b=u.map(t=>e.posts.models[t]),p=b.length-(n()(b,e=>e.isSponsored)+1),O=l.map(e=>o[e]);let f;const m=[];for(let n=0;n<O.length;n++){const s=O[n];s.isSponsored&&(null==f&&p+n>=4||n-f>=4)?(f=n,m.push(s.id)):s.isSponsored?s.isSponsored&&Object(c.a)(Object.assign({source:"feed",action:"remove",noun:"ad"},a.defaults(e),{listing:a.listing(e,t)})):m.push(s.id)}return Object.assign({},d,{posts:o,postIds:m})})},"./src/reddit/helpers/genericServerError/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/app/strings/index.ts");const a=Object(n.f)("error.type.generic");t.a=(e=>({type:r.I.SERVER_ERROR,fields:[{field:"",msg:a(e)}]}))},"./src/reddit/helpers/getCommentsPageSort/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/reddit/constants/parameters.ts");t.a=((e,t,s)=>{const a=s&&s.suggestedSort?s.suggestedSort:"";let c,i,o=!1;t&&t.prefs&&(c=t.prefs.defaultCommentSort),a?i=a:c&&(i=c);const d=n.q in e?e[n.q]:"";return(r.xc.has(d)?d:i)===d&&(i=d,o=!0),{hasSortParam:o,sortToUse:i}})},"./src/reddit/helpers/getGenericUploadError.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n});var r=s("./src/lib/constants/index.ts");function n(e){return{type:r.I.UNKNOWN_ERROR,fields:[{field:e,msg:"Image failed to upload"}]}}},"./src/reddit/helpers/getTimeSortForListing/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/listingSort/index.ts");t.a=((e,t)=>{if(e)return Object(n.a)(e)?t||r.sc:void 0})},"./src/reddit/helpers/governanceErrorText/index.ts":function(e,t,s){"use strict";function r(e){return e[0].toUpperCase()+e.slice(1)}function n(e){return"extra"in e?"string"==typeof e.extra?e.extra:Object.keys(e.extra).map(t=>e.extra[t]).map(r).join(" "):"Something wen't wrong. Please try again later."}s.d(t,"a",function(){return n})},"./src/reddit/helpers/graphql/helpers.ts":function(e,t,s){"use strict";s.d(t,"k",function(){return a}),s.d(t,"i",function(){return c}),s.d(t,"h",function(){return i}),s.d(t,"a",function(){return o}),s.d(t,"j",function(){return d}),s.d(t,"b",function(){return l}),s.d(t,"c",function(){return b}),s.d(t,"f",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"g",function(){return f}),s.d(t,"e",function(){return j});var r=s("./src/reddit/models/Gold/Gild/index.tsx"),n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(s.push(c.value),!t||s.length!==t);r=!0);}catch(o){n=!0,a=o}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();const a=(e,t=null)=>{try{return JSON.parse(e)}catch(s){return t}},c=e=>{switch(e){case"UP":return 1;case"DOWN":return-1;default:return 0}},i=e=>e.reduce((e,{type:t,total:s})=>{const n=Object(r.d)(t.id);return n&&(e[n]=s),e},{gid1:0,gid2:0,gid3:0});var o;!function(e){e[e.Seconds=3]="Seconds",e[e.Millis=0]="Millis"}(o||(o={}));const d=(e,t=o.Seconds)=>{if(!e)return 0;let s=Date.parse(e);return Number.isNaN(s)&&(s=Date.parse(e.replace("+0000","Z"))),Number.isNaN(s)||s<=0?0:s-s%Math.pow(10,t)},u=e=>{const t={},s=e.split("?")[1];if(!s)return t;const r=s.split("&");for(const i of r){var a=i.split("="),c=n(a,2);const e=c[0],s=c[1];t[e]=s}return t},l=(e,t,s=[])=>{if("string"!=typeof e||"string"!=typeof t||e.split("?")[0]!==t.split("?")[0])return!1;const r=["auto","crop",...s],n=u(e),a=u(t);return[...new Set([...Object.keys(n),...Object.keys(a)])].filter(e=>!r.includes(e)).every(e=>{switch(e){case"s":return n[e]&&a[e];case"blur":const t=parseInt(n[e]),s=parseInt(a[e]);return!isNaN(t)&&!isNaN(s)&&Math.abs(t-s)<=10;default:return n[e]===a[e]}})},b=(e,t)=>e===t||l(e,t),p=()=>!0,O=(e,t)=>e&&e.toUpperCase()===t,f=(e,t)=>Math.abs(e-t)<Math.max(20,.1*e),m=window.URL,j=(e,t,s=[])=>{try{const n=new m(e),a=new m(t);for(const e of s)n.searchParams.delete(e),a.searchParams.delete(e);return n.searchParams.sort(),a.searchParams.sort(),n.toString()===a.toString()}catch(r){return!1}}},"./src/reddit/helpers/graphql/normalizeFlairFromGql/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/models/Flair/index.ts"),n=s("./src/reddit/helpers/graphql/helpers.ts");t.a=(e=>{const t=[],s=e.text;var a=e.template;const c=a.id,i=a.textColor,o=a.richtext,d=a.type,u=a.text,l=a.backgroundColor,b=Object.assign({backgroundColor:l||""},c&&{templateId:c},i&&{textColor:(e=>{switch(e){case r.g.Dark:return r.d.Dark;case r.g.Light:return r.d.Light}})(i)});return d===r.e.Richtext?(t.push(Object.assign({type:d,richtext:Object(n.k)(o,[])},b)),u&&t.push(Object.assign({type:r.e.Text,text:u},b))):t.push(Object.assign({type:d,text:s},b)),t})},"./src/reddit/helpers/graphql/normalizeFrontpageFromGql/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/models/Post/index.ts"),n=s("./src/reddit/models/Live/index.ts"),a=s("./src/reddit/helpers/graphql/normalizePostFlairFromGql/index.ts"),c=s("./src/reddit/helpers/graphql/normalizePostFromGql/index.ts"),i=s("./src/reddit/helpers/graphql/normalizePreferencesFromGql/index.ts"),o=s("./src/reddit/helpers/graphql/normalizeProfileFromGql/index.ts"),d=s("./src/reddit/helpers/graphql/normalizeSubredditFromGql/index.ts"),u=s("./src/reddit/helpers/graphql/normalizeUserFromGql/index.ts");t.a=(({trendingSubreddits:e=[],identity:t,home:s,featuredAnnouncement:l,featuredLiveEvent:b,recentPosts:p=[]})=>{const O=[],f=[],m={postIds:[],postInstances:{},posts:{},postFlair:{},profiles:{},subreddits:{}},j=e=>{if(m.posts[e.id])return e.id;const t=Object(c.d)(e);m.posts[t.id]=t;const s=e.crosspostRoot;s&&s.type===r.a.Post&&s.post&&j(s.post);let n=t.id;switch(e.__typename){case r.d.ProfilePost:m.profiles[e.profile.id]||(m.profiles[e.profile.id]=Object(o.a)(e.profile));break;case r.d.SubredditPost:m.subreddits[e.subreddit.id]||(m.subreddits[e.subreddit.id]=Object(d.a)(e.subreddit)),m.postFlair[e.subreddit.id]||(m.postFlair[e.subreddit.id]=Object(a.a)(e.subreddit));break;case r.d.AdPost:const s=Object(c.b)(e);if(!s){n=null;break}n=s,m.posts[s]=Object.assign({},t,{id:s,permalink:`${t.permalink}?instanceId=${s}`}),m.posts[t.id]||(m.posts[t.id]=Object.assign({},t,{events:[]})),m.postInstances[e.id]||(m.postInstances[e.id]=[]),m.postInstances[e.id].push(s)}return n};for(const r of e){const e=Object(d.a)(r);m.subreddits[e.id]=e,O.push(e.id)}for(const r of s.posts.edges){const e=r.node,t=j(e);t&&m.postIds.push(t)}for(const r of p){if(!r)continue;const e=j(r);e&&f.push(e)}const g=m.postIds.length-1,y=g>=0?m.postIds[g]:"",_=s.posts.dist;return Object.assign({},m,{account:t&&Object(u.a)(t)||null,featuredLiveThread:((e,t)=>t&&e?{announcementUrl:t.url,buttonCta:t.callToAction,description:t.description||e.description||"",id:t.id||e.id,isAnnouncement:!0,numTimesDismissable:t.maxDismissCount,title:t.title||e.title,icon:n.a[t.icon]&&t.icon.toLowerCase(),viewerCount:e.viewerCount}:null)(b,l)||{},preferences:t&&Object(i.a)(t.preferences,t.interactions)||null},0!==O.length&&{trendingSubredditIds:O},0!==f.length&&{recentPostIds:f},{token:y},null!==_&&{dist:_})})},"./src/reddit/helpers/graphql/normalizeModeratorPartFromGql/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/helpers/graphql/helpers.ts");const n=(e,t)=>!!e&&(e.verdict===`MOD_${t.toUpperCase()}`||e.verdict===`ADMIN_${t.toUpperCase()}`);t.a=(({moderationInfo:e})=>{if(!e)return;const t=(e=>e&&e.verdictBy&&e.verdictBy.name||null)(e),s=(e=>e&&Object(r.j)(e.verdictAt)||null)(e),a=n(e,"spammed"),c=n(e,"approved"),i=n(e,"removed");var o=c?{approvedBy:t,approvedAtUTC:s}:{bannedBy:t,bannedAtUTC:s},d=o.approvedBy;const u=void 0===d?null:d;var l=o.approvedAtUTC;const b=void 0===l?null:l;var p=o.bannedBy;const O=void 0===p?null:p;var f=o.bannedAtUTC;const m=void 0===f?null:f;return Object.assign({isSpam:a,isApproved:c,isRemoved:i,ignoreReports:e.isReportingIgnored,numReports:e.reportCount,modNote:e.modNote,approvedBy:u,approvedAtUTC:b,bannedBy:O,bannedAtUTC:m},i&&{modReasonBy:t})})},"./src/reddit/helpers/graphql/normalizePostFlairFromGql/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/models/Flair/index.ts");function n({isEnabled:e=!1,position:t}){return{isEnabled:e,position:function(e){switch(e){case r.f.LEFT:return r.a.Left;case r.f.RIGHT:return r.a.Right;default:return null}}(t)}}t.a=(({postFlairSettings:e})=>Object.assign({},e&&{displaySettings:e&&n(e)}))},"./src/reddit/helpers/graphql/normalizePostFromGql/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/raven/index.ts"),a=s("./src/reddit/constants/adEvents.ts"),c=s("./src/reddit/helpers/graphql/normalizeFlairFromGql/index.ts"),i=s("./src/reddit/helpers/graphql/normalizeModeratorPartFromGql/index.ts");const o=/i\.redd\.it|v\.redd\.it|i\.reddituploads\.com/;var d=s("./src/reddit/models/Flair/index.ts"),u=s("./src/reddit/models/Media/index.ts");const l=e=>{switch(e){case"IMPRESSION":return a.a.Impression;case"CLICK":return a.a.Click;case"COMMENTS_VIEW":return a.a.CommentsView;case"UPVOTE":return a.a.Upvote;case"DOWNVOTE":return a.a.Downvote;case"COMMENT_SUBMITTED":return a.a.CommentSubmitted;case"VIEWABLE_IMPRESSION":return a.a.ViewableImpression;case"COMMENT_UPVOTE":return a.a.CommentUpvote;case"COMMENT_DOWNVOTE":return a.a.CommentDownvote}};var b=s("./src/reddit/models/Post/index.ts"),p=s("./src/reddit/models/PostCreationForm/index.ts"),O=s("./src/reddit/models/User/index.ts"),f=s("./src/reddit/helpers/graphql/helpers.ts");s.d(t,"c",function(){return g}),s.d(t,"b",function(){return C}),s.d(t,"d",function(){return A});var m=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const j={document:[]},g=e=>e.__typename===b.d.DeletedProfilePost||e.__typename===b.d.DeletedSubredditPost,y=[b.c.Image,b.c.Video,b.c.Gifvideo],_=e=>{var t=e.domain,s=e.url,r=m(e,["domain","url"]);if(r.__typename===b.d.AdPost||!r.isSelfPost&&!(e=>o.test(e))(t||"")){const e=r.outboundLink&&r.outboundLink.expiresAt&&Object(f.j)(r.outboundLink.expiresAt);return Object.assign({displayText:t||"",url:s||""},r.outboundLink&&e&&{outboundUrl:r.outboundLink.url||void 0,outboundUrlCreated:e-36e5,outboundUrlExpiration:e})}return null},E={small:108,medium:216,large:320,xlarge:640,xxlarge:960,xxxlarge:1080},h=(e,t)=>{const s=e&&(t?e.animated:e.still);if(!s)return[];const r=e&&e.still&&e.still.source?e.still.source.dimensions.width:0;return Object.keys(E).reduce((e,n)=>{const a=s[t?`${t}_${n}`:n];if(!a||E[n]>r)return e;const c=Object.assign({url:a.url},a.dimensions);return c?[...e,c]:e},[])},S=e=>e.authorOnlyInfo&&e.authorOnlyInfo.contentMode===b.b.Markdown?p.h.MARKDOWN:p.h.RICH_TEXT,T=e=>Math.min(e.height,e.width),I={events:[],isBlank:!1,isSponsored:!1},v=/\.gif\?(.*$)/,C=e=>{const t=e.adEvents.find(e=>l(e.type)===a.a.Impression),s=t&&t.url&&t.url.match(v);return s&&s[1]?`t3_${s[1]}`:null},R=e=>{const t=e.adEvents,s=e.callToAction,r=e.domain,n=e.isBlank;return{callToAction:s,domainOverride:r,events:(e=>e.map(({type:e,url:t})=>({url:t||"",type:l(e)})))(t),isBlank:n,isSponsored:!0}};t.a=(e=>{const t={post:A(e)},s=e.crosspostRoot;return s&&s.type===b.a.Post&&s.post&&(t.crosspost=A(s.post)),t});const A=e=>{const t=e.commentCount,s=e.createdAt,a=e.crosspostCount,o=e.crosspostRoot,l=e.domain,p=e.gildingTotals,g=e.id,E=e.isArchived,v=e.isHidden,C=e.isLocked,A=e.isNsfw,D=e.isOriginalContent,P=e.isSaved,x=e.isSpoiler,w=e.isStickied,N=e.permalink,k=e.score,L=e.suggestedCommentSort,U=e.title,M=e.upvoteRatio,G=e.viewCount,F=e.voteState,B=o&&(o.type===b.a.Post?o.post&&o.post.id:o.comment&&o.comment.id);o&&!B&&Object(n.c)("Lack of post or comment in crosspostRoot",{extra:{postId:g},settings:{serverLogging:!1}});const $=p&&Object(f.h)(p),q=(e=>e.__typename===b.d.SubredditPost&&e.subreddit&&e.subreddit.originalContentCategories&&0!==e.subreddit.originalContentCategories.length?e.subreddit.originalContentCategories:null)(e)||void 0,V=Object.assign({author:r.D,authorId:"",approvedAtUTC:null,approvedBy:null,bannedAtUTC:null,bannedBy:null,belongsTo:{id:"",type:"subreddit"},contentCategories:q,created:Object(f.j)(s),crosspostParentId:B,crosspostRootId:B,distinguishType:null,domain:l||"",events:[],flair:(e=>{var t=e.flair,s=e.isNsfw,r=e.isSpoiler,n=m(e,["flair","isNsfw","isSpoiler"]);const a=[];t&&a.push(...Object(c.a)(t)),r&&a.push({text:"spoiler",type:d.e.Spoiler}),s&&a.push({text:"nsfw",type:d.e.Nsfw});let i=!1;return n.__typename===b.d.ProfilePost?i=n.profile.isQuarantined:n.__typename===b.d.SubredditPost&&(i=n.subreddit.isQuarantined),i&&a.push({text:"quarantined",type:d.e.Quarantined}),a})(e),gildings:$,goldCount:$?$.gid2:0,hidden:v,id:g,ignoreReports:!1,isApproved:!1,isArchived:E,isBlank:!1,isCrosspostable:!1,isLocked:C,isMediaOnly:!1,isMeta:!1,isNSFW:A,isOriginalContent:D,isPinned:!1,isRemoved:!1,isScoreHidden:null===k,isSpam:!1,isSpoiler:x,isSponsored:!1,isStickied:w,media:null,modReports:[],numComments:t||0,numCrossposts:a||0,numReports:null,permalink:`https://www.reddit.com${N}`,postCategories:null,postId:g,previewComments:[],saved:P,score:null!==k&&k>0?k:0,sendReplies:!1,source:_(e),suggestedSort:L&&r.t[L]||null,thumbnail:{height:null,url:"",width:null},title:U||"",upvoteRatio:M,userReports:[],viewCount:G||0,voteState:F?Object(f.i)(F):0},e.__typename===b.d.AdPost?R(e):I,Object(i.a)(e));if(e.__typename===b.d.DeletedProfilePost||e.__typename===b.d.DeletedSubredditPost)return V;const H=e.authorInfo,K=e.authorOnlyInfo,W=e.distinguishedAs,Y=e.isCrosspostable,z=e.isMediaOnly,Q=e.isPollIncluded,X=e.media,J=e.postEventInfo,Z=(e=>e&&e.still&&e.still.source?Object.assign({url:e.still.source.url},e.still.source.dimensions):void 0)(X);return Object.assign({},V,{author:H&&(e=>e&&e.__typename!==O.d.DeletedRedditor?"name"in e&&e.name||"":r.D)(H)||r.D,authorId:H&&H.id||"",belongsTo:(e=>{switch(e.__typename){case b.d.SubredditPost:return{id:e.subreddit.id,type:"subreddit"};default:return{id:e.profile.id,type:"profile"}}})(e),distinguishType:(e=>e?e.toLowerCase():null)(W),isCrosspostable:Y,isMediaOnly:z,isMeta:Q,media:((e,t)=>{const s=e.media,r=e.content,n=(e=>e.isSpoiler||e.isNsfw)(e)?s&&s.obfuscatedStill&&s.obfuscatedStill.source&&s.obfuscatedStill.source.url:null;switch(t){case u.m.VIDEO:{const e=400,r=h(s),a=s&&s.still&&s.still.source&&Object.assign({url:s.still.source.url},s.still.source.dimensions);let c;if(r.length){c=r.reduce((e,t)=>e.width>t.width?e:t);const t=r.reduce((t,s)=>T(s)>e&&a&&T(s)<T(a)?[...t,s]:t,[]);t.length&&(c=t.reduce((e,t)=>T(e)<T(t)?e:t))}else c=a;return{type:t,obfuscated:n,hlsUrl:s&&s.streaming&&s.streaming.hlsUrl||"",dashUrl:s&&s.streaming&&s.streaming.dashUrl||"",isGif:!!s&&!!s.streaming&&s.streaming.isGif,scrubberThumbSource:s&&s.streaming&&s.streaming.scrubberMediaUrl||"",width:s&&s.streaming?s.streaming.dimensions.width:0,height:s&&s.streaming?s.streaming.dimensions.height:0,posterUrl:c.url}}case u.m.TEXT:return{type:t,obfuscated:null,markdownContent:e.content?e.content.markdown:"",content:"",rteMode:S(e)};case u.m.RTJSON:return{type:t,obfuscated:null,markdownContent:e.content?e.content.markdown:"",richtextContent:Object(f.k)(r.richtext,j),content:"",rteMode:S(e),mediaMetadata:e.content&&e.content.richtextMedia&&e.content.richtextMedia.length?e.content.richtextMedia:null};case u.m.IMAGE:{const r=s&&s.animated&&s.animated.gif_source?"gif":null;let a="";return"i.redd.it"===e.domain&&e.url?a=e.url:s&&s.still&&s.still.source&&(a=s.still.source.url),{type:t,obfuscated:n,resolutions:h(s,r),width:s&&s.still&&s.still.source?s.still.source.dimensions.width:0,height:s&&s.still&&s.still.source?s.still.source.dimensions.height:0,content:a}}case u.m.EMBED:return{type:t,obfuscated:n,width:s&&s.video?s.video.dimensions.width:0,height:s&&s.video?s.video.dimensions.height:0,provider:s&&s.video&&s.video.attribution&&s.video.attribution.providerName||"",content:s&&s.video&&s.video.embedUrl?s.video.embedUrl:""};case u.m.GIFVIDEO:return{type:t,obfuscated:n,resolutions:h(s,"mp4"),width:s&&s.still&&s.still.source?s.still.source.dimensions.width:0,height:s&&s.still&&s.still.source?s.still.source.dimensions.height:0,gifBackgroundImage:s&&s.still&&s.still.source?s.still.source.url:"",content:s&&s.animated&&s.animated.mp4_source?s.animated.mp4_source.url:""};default:return null}})(e,(e=>{const t=e.media;if(e.isSelfPost)return e.content&&e.content.richtext?u.m.RTJSON:u.m.TEXT;switch(t&&t.typeHint){case b.c.Image:return u.m.IMAGE;case b.c.Gifvideo:return u.m.GIFVIDEO;case b.c.Video:return u.m.VIDEO;case b.c.Embed:return u.m.EMBED;default:return null}})(e)),thumbnail:(e=>{const t=e.thumbnail?Object.assign({url:e.thumbnail.url},e.thumbnail.dimensions):{url:"",width:null,height:null};return e.__typename===b.d.AdPost&&e.authorOnlyInfo&&t.url?t:e.isNsfw?Object.assign({},t,{url:"nsfw"}):e.isSpoiler?Object.assign({},t,{url:"spoiler"}):e.__typename!==b.d.SubredditPost||e.subreddit.isThumbnailsEnabled?e.isSelfPost?Object.assign({},t,{url:"self"}):t:e.isSelfPost?Object.assign({},t,{url:"self"}):e.media&&e.media.typeHint&&y.includes(e.media.typeHint)?Object.assign({},t,{url:"image"}):Object.assign({},t,{url:"default"})})(e)},Z&&{preview:Z},K&&{sendReplies:K.isReceivingPostReplies},J&&{eventInfo:(({isLive:e,startsAt:t,endsAt:s})=>({eventIsLive:e,eventStart:Date.parse(t),eventEnd:Date.parse(s)}))(J)})}},"./src/reddit/helpers/graphql/normalizePreferencesFromGql/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/models/User/index.ts");t.a=((e,t)=>({allowClickTracking:e.isClickTrackingEnabled,autoplayVideo:!e.isVideoAutoplayDisabled,defaultCommentSort:e.defaultCommentSort&&r.c[e.defaultCommentSort]?e.defaultCommentSort.toLowerCase():r.c.CONFIDENCE.toLowerCase(),geopopular:e.geopopular,hideNSFW:e.isNsfwMediaBlocked,labelNSFW:e.isNsfwLabelShown,markMessagesRead:e.isMessageAutoReadEnabled,nightmode:e.isNightModeEnabled,over18:e.isNsfwContentShown,profileOptOut:e.isLegacyProfilesEnabled,account:{openPostInNewTab:e.isNewTabOpenedForPostView,sort:e.globalCommunityPostFeedSort.range?`${e.globalCommunityPostFeedSort.sort.toLowerCase()}_${e.globalCommunityPostFeedSort.range.toLowerCase()}`:e.globalCommunityPostFeedSort.sort.toLowerCase(),stylesEnabled:e.isCommunityStylingEnabled,rememberCommunitySort:e.isCommunityPostFeedSortingPreserved,useMarkdown:e.isMarkdownDefaultEditorMode,rememberCommunityLayout:e.isCommunityLayoutPreserved,layout:e.postFeedLayout.toLowerCase(),hasSeenCustomizeFlyout:t&&t.isDefaultPostLayoutAware}}))},"./src/reddit/helpers/graphql/normalizeProfileFromGql/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return i});var r=s("./src/reddit/helpers/graphql/normalizeSubredditFromGql/index.ts"),n=s("./src/reddit/models/Subreddit/index.ts"),a=s("./src/reddit/models/User/index.ts"),c=s("./src/reddit/models/WhitelistStatus/index.ts");const i=({pageInfo:e,edges:t})=>{const s={moderatedSubredditIds:[],pageInfo:e,subreddits:{}};for(const n of t){const e=n.node,t=Object(r.a)(e);s.subreddits[t.id]=t,s.moderatedSubredditIds.push(t.id)}return s};t.a=(({name:e,path:t,redditor:s,styles:r,wls:i,id:o,title:d,isQuarantined:u,isNSFW:l,subscribers:b})=>{var p=r&&r.legacyIcon&&{width:r.legacyIcon.dimensions.width,height:r.legacyIcon.dimensions.height}||{width:null,height:null};const O=p.width,f=p.height,m=r&&r.legacyPrimaryColor,j=s&&s.__typename===a.d.AvailableRedditor&&s.prefixedName||"";return Object.assign({url:t,displayText:j,icon:{url:r&&r.icon||"",width:O,height:f},communityIcon:r&&r.icon||"",type:n.b.User,name:e.substr(2)},m&&{primaryColor:m},i&&{whitelistStatus:i.toLowerCase(),wls:c.a[i]},{id:o,title:d,isQuarantined:u,isNSFW:l,subscribers:b})})},"./src/reddit/helpers/graphql/normalizeSubredditFromGql/index.ts":function(e,t,s){"use strict";var r,n=s("./src/lib/constants/index.ts"),a=s("./src/reddit/helpers/graphql/normalizePostFromGql/index.ts");!function(e){e.Comment="Comment",e.PostInfo="PostInfo",e.RedditorInfo="RedditorInfo",e.Subreddit="Subreddit"}(r||(r={}));var c=s("./src/reddit/models/WhitelistStatus/index.ts");s.d(t,"b",function(){return i});const i=e=>{const t={posts:{},subredditTopContent:{}},s=[];if(e.__typename!==r.Subreddit)return null;const c=e.id,i=e.isSubscribed,o=e.name,d=e.topContent,u=d.posts,l=d.range;return u.forEach(e=>{var r=Object(a.a)(e);const n=r.post,c=r.crosspost,i=n.id;if(t.posts[i]=n,s.push(i),c){const e=c.id;t.posts[e]=c}}),t.subredditTopContent[o.toLowerCase()]={id:c,isSubscribed:i,name:o,postIds:s,range:n.rc[l]},t};t.a=(e=>{const t=e.path,s=e.prefixedName,r=e.type,n=e.styles,a=e.wls,i=e.id,o=e.isQuarantined,d=e.isNSFW,u=e.name,l=e.subscribers,b=e.title,p=e.isFreeFormReportingAllowed;var O=n&&n.legacyIcon&&{iconUrl:n.legacyIcon.url,width:n.legacyIcon.dimensions.width,height:n.legacyIcon.dimensions.height}||{iconUrl:"",width:null,height:null};const f=O.iconUrl,m=O.width,j=O.height,g=n&&n.primaryColor,y=n&&n.icon;return Object.assign({url:t,displayText:s,icon:{url:f,width:m,height:j}},y&&{communityIcon:y},{type:r.toLowerCase(),primaryColor:g||""},a&&{whitelistStatus:a.toLowerCase(),wls:c.a[a]},{freeFormReports:p,id:i,isQuarantined:o,isNSFW:d,name:u,subscribers:l,title:b})})},"./src/reddit/helpers/graphql/normalizeUserFromGql/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return o});var r=s("./src/reddit/models/User/index.ts"),n=s("./src/reddit/helpers/graphql/helpers.ts"),a=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const c=e=>e&&e.unreadCount?e.unreadCount:0,i=/^u\//,o=e=>e.__typename===r.d.DeletedRedditor?null:"name"in e&&e.name||null;t.a=(e=>{var t=e.redditor,s=e.inbox,o=e.premium,d=e.preferences,u=e.coins,l=a(e,["redditor","inbox","premium","preferences","coins"]);let b={commentKarma:0,hasUserProfile:!1,id:t.id,isGold:!1,postKarma:0,url:""};if(t.__typename===r.d.AvailableRedditor){const e=t.karma,s=t.profile,r=s&&s.styles&&s.styles.legacyIcon&&s.styles.legacyIcon.url;b=Object.assign({},b,r&&{accountIcon:r},{commentKarma:e?e.fromComments:0,displayText:t.name,hasExternalAccount:t.isLinkedToExternalAccount,hasUserProfile:!!s,isGold:!!t.isGilded,postKarma:e?e.fromPosts:0,profileId:s&&s.id||void 0,url:t.prefixedName&&(e=>e.replace(i,"/user/"))(t.prefixedName)||void 0})}const p=l.interactions,O=l.modMail;return Object.assign({},b,{coins:u,created:Object(n.j)(l.createdAt,n.a.Seconds)/1e3,creddits:o?o.creddits:0,goldExpiration:(e=>e&&e.expiresAt&&Object(n.j)(e.expiresAt,n.a.Seconds)/1e3||null)(o),hasUnreadMail:c(s)>0,hasUnreadModmail:!!O&&O.isUnread,hasUnreadOldModmail:!!O&&O.isUnread,hasVerifiedEmail:!!l.isEmailVerified,inboxCount:c(s),inRedesignBeta:d.isInRedesignBeta,isEmployee:!!l.isEmployee,isFPR:!!l.isForcePasswordReset,isMod:!!l.isModerator,isSuspended:l.isSuspended,nightmode:d.isNightModeEnabled,seenLayoutSwitch:!!p&&p.isLayoutSwitchAware,seenPremiumAdblockModal:!!p&&p.isAdblockModalAware,seenRedesignModal:!!p&&p.isRedesignModalAware,seenSubredditChatFtux:!!p&&p.isSubredditChatAware,showRecentPosts:d.isRecentPostsShown,showTrending:d.isTrendingSubredditsShown},o&&o.subscription&&{hasAndroidSubscription:o.subscription.isAndroidAvailable,hasGoldSubscription:o.subscription.isGoldAvailable,hasIOSSubscription:o.subscription.isIOSAvailable,hasPaypalSubscription:o.subscription.isPaypalAvailable,hasStripeSubscription:o.subscription.isStripeAvailable})})},"./src/reddit/helpers/makeProfileListingKey/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return a});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeListingKey/index.ts");const a=(e,t)=>`${r.vc}${e.toLowerCase()}--private--${t}`;t.a=((e,t,s,a={})=>{const c=`${r.vc}${e}--${t}`;return Object(n.a)(c,s,a)})},"./src/reddit/helpers/monthsToMinutes/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return d}),s.d(t,"a",function(){return u});var r=s("./node_modules/js-cookie/src/js.cookie.js"),n=s.n(r),a=s("./src/config.ts"),c=s("./src/reddit/constants/cookie.ts"),i=s("./src/reddit/constants/localStorage.ts"),o=s("./src/reddit/selectors/monthsToMinutes.ts");const d=e=>{const t=(e=>e.join(","))(Object(o.x)(e)),s=new Date;s.setFullYear(s.getFullYear()+2),n.a.set(c.d,t,{expires:s,domain:a.a.cookieDomain})},u=()=>{localStorage.removeItem(i.l),n.a.remove(c.d,{domain:a.a.cookieDomain})}},"./src/reddit/helpers/normalizeUsername/index.tsx":function(e,t,s){"use strict";t.a=(e=>{const t=/^((\/u\/)|(u\/))/;return/^((\/u\/)|(u\/))(.+)/.test(e)?e.replace(t,""):e})},"./src/reddit/helpers/onBeforeRequestFactory/index.ts":function(e,t,s){"use strict";var r=s("./node_modules/url/url.js"),n=s.n(r),a=s("./node_modules/js-cookie/src/js.cookie.js"),c=s.n(a),i=s("./src/config.ts"),o=s("./src/lib/constants/index.ts"),d=s("./src/reddit/selectors/subreddit.ts");const u=new RegExp("^/desktopapi/v1/(duplicates/[^/]+|frontpage|news|search|subreddits/(all|popular))(/|$)"),l=new RegExp("^/desktopapi/v1/(search|subreddits|postcomments|collection_postcomments|submitpage)(/|$)"),b=new RegExp("^/desktopapi/v1/(subreddits|postcomments|collection_postcomments)/?$"),p=new RegExp("^/desktopapi/v1/(postcomments)(/+|$)"),O=new RegExp("^/desktopapi/v1/frontpage/?$");var f=(e,t)=>{const s=new Set;e.user.session&&!e.user.session.unsafeLoggedOut&&(e.user.account||(s.add("identity"),s.add("prefs"),s.add("prefsAccount")),(e=>!u.test(e.pathname||""))(t)&&s.add("identity"),(e=>p.test(e.pathname||""))(t)&&s.add("meta")),!e.live.isFrontpageLoaded&&(e=>O.test(e.pathname||""))(t)&&s.add("featuredLiveThread");const r=t.pathname||"";if(l.test(r)||b.test(r)){const t=e.platform.currentPage&&e.platform.currentPage.urlParams.subredditName||"",r=Object(d.z)(e,t);r&&e.structuredStyles.models[r]||s.add("structuredStyles"),e.user.prefs.subreddit[r]||s.add("prefsSubreddit")}return[...s].join(",")};t.a=(e=>t=>{const s=n.a.parse(t.endpoint,!0),r=s.host,a=`${s.protocol}//${r}`,d=t.method===o.jb.GET?"data":"query",u=t[d]||{};if(a===i.a.gatewayUrl){const t=c.a.get("over18")||"";u.allow_over18=t,u.include=f(e.getState(),s)}t[d]=u})},"./src/reddit/helpers/pageActionLoginRedirect.ts":function(e,t,s){"use strict";s("./node_modules/history/index.js"),s("./src/reddit/actions/platform.ts");var r=s("./src/config.ts");t.a=((e,t)=>{const s=t.platform.currentPage&&t.platform.currentPage.url;let n=`${r.a.accountManagerOrigin}/login/`;const a=window.location.origin;s&&(n+=`?dest=${encodeURIComponent(`${a}${s}`)}`),window.location.href=n})},"./src/reddit/helpers/r2/normalizeActionableUserFromR2/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/reddit/helpers/r2/normalizeGildingsFromR2/index.ts");t.a=(e=>Object.assign({accountIcon:e.icon_img,commentKarma:e.comment_karma,created:e.created,displayName:e.name,displayNamePrefixed:e.subreddit&&e.subreddit.display_name_prefixed,displayText:e.name,gildedLastMonth:e.gilded_last_month?Object(n.a)(e.gilded_last_month):null,hasUserProfile:!!e.subreddit,hideFromRobots:!!e.hide_from_robots,id:`${r.wb.ACCOUNT}_${e.id}`,isEmployee:e.is_employee,isFollowing:e.has_subscribed,isGold:e.is_gold,isAdmin:e.is_admin,isMod:e.is_mod,isNSFW:!(!e.subreddit||!e.subreddit.over_18),prefShowSnoovatar:e.pref_show_snoovatar,prefShowTwitter:e.pref_show_twitter,postKarma:e.link_karma,url:`/user/${e.name}`,username:e.name},e.subreddit?{profileId:e.subreddit.name}:null))},"./src/reddit/helpers/r2/normalizeCommentFromR2/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/reddit/helpers/isComment.ts"),a=s("./src/reddit/helpers/r2/normalizeGildingsFromR2/index.ts"),c=s("./src/reddit/models/Vote/index.ts"),i=s("./src/reddit/models/Comment/index.ts");t.a=((e,t)=>{const s={approvedAtUTC:e.approved_at_utc,approvedBy:e.approved_by,author:e.author,authorId:e.author_fullname,bannedAtUTC:e.banned_at_utc,bannedBy:e.banned_by,body:e.body_html,bodyMD:e.body,collapsed:e.collapsed,collapsedReason:e.collapsed_reason,created:e.created_utc,deletedBy:d(e),distinguishType:e.distinguished||"",editedAt:null,gildings:e.gildings?Object(a.a)(e.gildings):null,goldCount:e.gilded,id:e.name,ignoreReports:e.ignore_reports,isAdmin:"admin"===e.distinguished,isApproved:e.approved,isDeleted:e.author===r.D,isMod:"moderator"===e.distinguished,isOp:e.is_submitter,isRemoved:e.removed,isScoreHidden:e.score_hidden,isSpam:e.spam,isStickied:e.stickied,isSaved:e.isSaved,subredditId:e.subreddit_id,markdown:e.body,media:{type:"rtjson",richtextContent:o(e.rtjson),rteMode:e.rte_mode},modReports:e.mod_reports,modReportsDismissed:e.mod_reports_dismissed,numReports:e.num_reports,parentId:Object(n.a)(e.parent_id)?e.parent_id:null,permalink:e.permalink,postAuthor:e.link_author||null,postId:e.link_id,postTitle:e.link_title||null,sendReplies:e.send_replies,score:e.score,userReports:e.user_reports,userReportsDismissed:e.user_reports_dismissed,voteState:(e=>!0===e?c.a.upvoted:!1===e?c.a.downvoted:c.a.notVoted)(e.likes)};return e.all_awardings&&(s.allAwardings=(e=>e.map(e=>({awardType:e.award_type,coinPrice:e.coin_price,coinReward:e.coin_reward,count:e.count,daysOfDripExtension:e.days_of_drip_extension,daysOfPremium:e.days_of_premium,description:e.description,iconUrl:e.icon_url,id:e.id,isEnabled:e.is_enabled,name:e.name})))(e.all_awardings)),s});const o=e=>"string"==typeof e?JSON.parse(e):e,d=e=>e.author!==r.D?null:e.body===r.E?i.a.User:e.body===r.Pb?i.a.Moderator:null},"./src/reddit/helpers/r2/normalizeGildingsFromR2/index.ts":function(e,t,s){"use strict";t.a=(e=>({gid1:e.gid_1,gid2:e.gid_2,gid3:e.gid_3}))},"./src/reddit/helpers/r2/normalizePostFromR2/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/helpers/r2/normalizeGildingsFromR2/index.ts"),n=s("./src/reddit/models/Flair/index.ts"),a=s("./src/reddit/models/Media/index.ts"),c=s("./src/reddit/models/PostCreationForm/index.ts"),i=s("./src/reddit/models/Vote/index.ts");t.a=(e=>{return{author:e.author,authorId:e.author_fullname,approvedAtUTC:e.approved_at_utc,approvedBy:e.approved_by,bannedAtUTC:e.banned_at_utc,bannedBy:e.banned_by,belongsTo:{type:"user"===e.subreddit_type?"profile":"subreddit",id:e.subreddit_id||""},callToAction:e.call_to_action||null,created:1e3*e.created,crosspostParentId:e.cross_post_parent_id||null,crosspostRootId:e.cross_post_root_id||null,distinguishType:e.distinguish_type||null,domain:e.domain,domainOverride:e.domain_override||null,events:e.events||[],flair:(e=>{const t=[];return e.link_flair_richtext&&e.link_flair_richtext.length&&t.push({richtext:e.link_flair_richtext,type:n.e.Richtext,textColor:e.link_flair_text_color||"dark",backgroundColor:e.link_flair_background_color||"",templateId:e.link_flair_template_id}),e.link_flair_text&&t.push({text:e.link_flair_text,type:n.e.Text,textColor:e.link_flair_text_color||"dark",backgroundColor:e.link_flair_background_color||"",templateId:e.link_flair_template_id}),e.spoiler&&t.push({text:"spoiler",type:n.e.Spoiler}),e.over_18&&t.push({text:"nsfw",type:n.e.Nsfw}),t})(e),gildings:e.gildings?Object(r.a)(e.gildings):null,goldCount:e.gilded||0,hidden:e.hidden,id:e.name,ignoreReports:e.ignore_reports,isApproved:e.approved,isArchived:e.archived,isBlank:e.is_blank,isCrosspostable:e.is_crosspostable,isFollowed:e.is_followed||!1,isLocked:e.locked,isMediaOnly:e.media_only,isMeta:e.is_meta,isNSFW:e.over_18,isOriginalContent:e.is_original_content,isPinned:e.pinned,isRemoved:e.removed,isSpam:e.spam,isSpoiler:e.spoiler,isSponsored:e.promoted,isStickied:e.stickied,media:(e=>{const t=e.preview&&e.preview.enabled;let s=!1,r=null,n={},i={};const o=e.over_18||e.spoiler;if(e.preview&&(s=!!(i=e.preview.images[0].variants).mp4,n=e.preview.images[0].source,o&&(r=i.obfuscated.source.url)),e.is_self)return Object.assign({content:e.selftext_html,type:a.m.TEXT,markdownContent:e.selftext,obfuscated:r,rteMode:e.rte_mode||c.h.RICH_TEXT},e.rtjson&&{richtextContent:e.rtjson,type:a.m.RTJSON,mediaMetadata:e.media_metadata});if(e.media&&e.media.reddit_video){const t=e.media.reddit_video;return{hlsUrl:t.hls_url,dashUrl:t.dash_url,isGif:t.is_gif,scrubberThumbSource:t.scrubber_media_url,obfuscated:r,posterUrl:t.url,width:t.width,height:t.height,type:a.m.VIDEO}}if(e.secure_media&&e.secure_media.oembed)return{content:e.secure_media_embed.media_domain_url,type:a.m.EMBED,width:e.secure_media.oembed.width,height:e.secure_media.oembed.height,obfuscated:r,provider:e.secure_media.oembed.provider_name};if(t&&s)return{content:i.mp4.source.url,type:a.m.GIFVIDEO,width:i.mp4.source.width,height:i.mp4.source.height,gifBackgroundImage:n.url,gifBackgroundResolutions:e.preview.images[0].resolutions,obfuscated:r,resolutions:i.mp4.resolutions};if(t){const t=i.gif?i.gif.resolutions:e.preview.images[0].resolutions;return{content:n.url,type:a.m.IMAGE,width:n.width,height:n.height,obfuscated:r,resolutions:t}}return null})(e),modNote:e.mod_note||null,modReports:e.mod_reports,numComments:e.num_comments,numCrossposts:e.num_crossposts||0,numReports:e.num_reports||0,permalink:`https://www.reddit.com${e.permalink}`,postCategories:(e=>e?e.map(e=>({categoryId:e.category_id,categoryName:e.category_name})):[])(e.post_categories),preview:e.preview&&e.preview.images&&e.preview.images[0]&&e.preview.images[0].source?{url:e.preview.images[0].source.url,width:e.preview.images[0].source.width,height:e.preview.images[0].source.height}:void 0,previewComments:[],previousVisits:e.previous_visits,postId:e.name,modRemovalReason:e.mod_reason_title,modReasonBy:e.mod_reason_by,saved:e.saved,score:e.score,isScoreHidden:!!e.hide_score,sendReplies:e.send_replies,source:(e=>{const t={};if(e.promoted&&e.outbound_link||!e.is_self&&!e.is_reddit_media_domain){if(t.displayText=e.domain,t.url=e.url,e.outbound_link){const s=e.outbound_link;t.outboundUrl=s.url,t.outboundUrlExpiration=s.expiration,t.outboundUrlCreated=s.created}return t}return null})(e),suggestedSort:e.suggested_sort,thumbnail:{url:e.thumbnail,width:e.thumbnail_width,height:e.thumbnail_height},title:e.title,userReports:e.user_reports,upvoteRatio:e.upvote_ratio,viewCount:e.view_count||0,voteState:Object(i.d)(e.likes)}})},"./src/reddit/helpers/r2/normalizeProfileAboutInfoFromR2/index.ts":function(e,t,s){"use strict";t.a=(e=>({commentKarma:e.comment_karma,hasExternalAccount:e.has_external_account,postKarma:e.link_karma,prefShowTwitter:e.pref_show_twitter,publicDescription:e.subreddit?e.subreddit.public_description:"",userIsSubscriber:e.subreddit&&e.subreddit.user_is_subscriber||!1}))},"./src/reddit/helpers/r2/normalizeProfileSubredditFromR2/index.ts":function(e,t,s){"use strict";var r=s("./src/reddit/helpers/r2/normalizeSubredditFromR2/index.ts"),n=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};t.a=((e,t)=>{const s=Object(r.a)(e),a=(s.wls,n(s,["wls"]));return Object.assign({},a,{name:t})})},"./src/reddit/helpers/r2/normalizeR2APIErrors/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts");t.a=(e=>({type:(e=>{for(const t of e)switch(t[0]){case r.I.NO_STRIPE_SUBSCRIPTION:case r.I.USER_DOESNT_EXIST:case r.I.USER_REQUIRED_ERROR:case r.I.VALIDATION_ERROR:return t[0];case r.I.NO_USER:case r.I.NO_TEXT:case r.I.NO_URL:return r.I.VALIDATION_ERROR;case r.I.CREDIT_CARD_FAILURE:case r.I.CREDIT_CARD_FAILURE_GENERIC:return r.I.CREDIT_CARD_FAILURE;default:continue}return r.I.VALIDATION_ERROR})(e.body.json.errors),fields:e.body.json.errors.map(e=>({field:e[2]||"",msg:e[1]}))}))},"./src/reddit/helpers/routeKey/index.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return C}),s.d(t,"d",function(){return R}),s.d(t,"f",function(){return A}),s.d(t,"e",function(){return P}),s.d(t,"a",function(){return w}),s.d(t,"b",function(){return L});var r=s("./node_modules/lodash/pick.js"),n=s.n(r),a=s("./src/lib/constants/index.ts"),c=s("./src/lib/isFakeSubreddit/index.ts"),i=s("./src/lib/makeCommentsPageKey/index.ts"),o=s("./src/lib/makeExplorePageKey/index.ts"),d=s("./src/lib/makeListingKey/index.ts"),u=s("./src/lib/makePartnerSubredditConnectionPageKey/index.ts"),l=s("./src/lib/makePostCreationPageKey/index.ts"),b=s("./src/lib/makeSearchKey/index.ts"),p=s("./src/reddit/constants/postLayout.ts"),O=s("./src/reddit/helpers/makeProfileListingKey/index.ts"),f=s("./src/reddit/actions/pages/subredditWiki/constants.ts"),m=s("./src/reddit/constants/originalContent.ts"),j=s("./src/reddit/constants/page.ts"),g=s("./src/reddit/constants/parameters.ts"),y=s("./src/reddit/helpers/getCommentsPageSort/index.ts"),_=s("./src/reddit/models/Comment/index.ts"),E=s("./src/reddit/models/Multireddit/index.ts"),h=s("./src/reddit/models/Post/index.ts"),S=s("./src/reddit/models/User/index.ts"),T=s("./src/reddit/routes/modListing/index.ts"),I=s("./src/reddit/selectors/frontpage.ts"),v=s("./src/reddit/selectors/news.ts");const C=(e,t,s)=>{const r=e.route.meta.name;if(!r||!a.W.has(r)&&r!==a.Rb.COINS&&r!==a.Rb.COMMENTS&&r!==a.Rb.POST_CREATION&&r!==a.Rb.PREMIUM&&r!==a.Rb.SEARCH_RESULTS&&r!==a.Rb.PARTNER_SUBREDDIT_CONNECTION&&r!==a.Rb.EXPLORE&&r!==a.Rb.SETTINGS||!s&&r===a.Rb.COMMENTS)return null;switch(r){case a.Rb.POST_CREATION:return Object(l.a)(e.match.params);case a.Rb.INDEX:case a.Rb.LISTING:case a.Rb.SUBREDDIT:case a.Rb.SUBREDDIT_WIKI:case a.Rb.ORIGINAL_CONTENT:return R(e,t);case a.Rb.PROFILE_COMMENTS:case a.Rb.PROFILE_POSTS:case a.Rb.PROFILE_OVERVIEW:case a.Rb.PROFILE_PRIVATE:return A(e,t);case a.Rb.MULTIREDDIT:return D(e,t);case a.Rb.NEWS:return P(e,t);case a.Rb.COMMENTS:return w(e,t,s);case a.Rb.SEARCH_RESULTS:return x(e);case a.Rb.COINS:case a.Rb.PREMIUM:return r;case a.Rb.SETTINGS:return k(e);case a.Rb.PARTNER_SUBREDDIT_CONNECTION:return N(e);case a.Rb.EXPLORE:return L(e);default:return null}},R=(e,t)=>{const s=e.route,r=e.match,n=s.meta.name;if(!a.W.has(n)&&n!==a.Rb.POST_CREATION&&n!==a.Rb.SUBREDDIT_WIKI)return null;const i=r.queryParams;switch(n){case a.Rb.INDEX:case a.Rb.LISTING:const s=Object(I.a)(t),O=r.params,g=O.sort?O.sort:s;return Object(d.a)(j.b,g,i);case a.Rb.PROFILE_COMMENTS:case a.Rb.PROFILE_POSTS:{const e=r.params.profileName,t=i.sort;return Object(d.a)(`u_${e}`,t,i)}case a.Rb.POST_CREATION:case a.Rb.SUBREDDIT:{const e=r.params,t=e.subredditName,s=!t||Object(c.a)(t)?a.X.HOT:void 0;var o=e.sort;const n=void 0===o?s:o;return Object(d.a)(t,n,i)}case a.Rb.SUBREDDIT_WIKI:{const e=r.params.subredditName||f.a;return Object(d.a)(e,a.X.HOT,i)}case a.Rb.ORIGINAL_CONTENT:{var u=r.params,l=u.categoryName;const e=void 0===l?m.b:l;var b=u.sort;const t=void 0===b?a.X.HOT:b;return Object(d.a)(j.j,t,Object.assign({},i,{category:e}))}case a.Rb.MOD_LISTING:{var p=r.params.sort;const e=void 0===p?a.Y:p,t=Object(T.d)(r.path)?j.g:j.f;return Object(d.a)(t,e,i)}case a.Rb.MULTIREDDIT:return D(e,t);case a.Rb.NEWS:return P(e,t);case a.Rb.SEARCH_RESULTS:return C(e,t,null);default:return null}},A=(e,t)=>{const s=e.route,r=e.match,n=s.meta.name;if(!a.W.has(n)&&n!==a.Rb.POST_CREATION)return null;const c=r.params,i=r.queryParams,o=c.profileName;var u=i.sort;const l=void 0===u?a.Jb:u;switch(n){case a.Rb.PROFILE_OVERVIEW:const e=(t.user.prefs&&t.user.prefs.profileLayout?t.user.prefs.profileLayout:p.f.Large)===p.f.Compact?a.sb:a.tb;return Object(O.a)((o||"").toLowerCase(),e,l,i);case a.Rb.PROFILE_COMMENTS:case a.Rb.PROFILE_POSTS:return Object(d.a)(`u_${o}`,l,i);case a.Rb.PROFILE_PRIVATE:const s=c.listingType;return Object(O.b)(o.toLowerCase(),s);default:return null}},D=(e,t)=>{const s=e.route,r=e.match;if(s.meta.name!==a.Rb.MULTIREDDIT)return null;const n=r.params,c=r.queryParams,i=n.multiredditName;var o=n.sort;const u=void 0===o?a.X.HOT:o;let l=n.username;l||(l=t.user.account?Object(S.f)(t.user.account):"me");const b=Object(E.c)(l,i);return Object(d.a)(b,u,c)},P=(e,t)=>{const s=e.route,r=e.match;if(s.meta.name!==a.Rb.NEWS)return null;var n=r.params;const c=n.topic,i=n.subtopic;return Object(v.h)(t.user,c||"",i||"")},x=e=>{const t=e.route,s=e.match;if(t.meta.name!==a.Rb.SEARCH_RESULTS)return null;const r=s.params.subredditName,c=Object(b.d)(n()(s.queryParams,g.p));return Object(b.c)(r,c)},w=(e,t,s)=>{const r=e.route,n=e.match,c=r.meta.name;if(!c||c!==a.Rb.COMMENTS)return null;var o=n.params;const d=o.partialCommentId,u=o.partialPostId,l=Object(h.f)(u),b=d&&Object(_.d)(d);var p=Object(y.a)(n.queryParams,t.user,s);const O=p.hasSortParam,f=p.sortToUse;return Object(i.a)(l,b,{sort:f,hasSortParam:O})},N=e=>{const t=e.route,s=e.match,r=t.meta.name;if(!r||r!==a.Rb.PARTNER_SUBREDDIT_CONNECTION)return;const n=s.queryParams;return Object(u.a)(n)},k=e=>"SettingsPage-"+e.match.params.page,L=e=>{const t=e.route,s=e.match,r=t.meta.name;if(!r||r!==a.Rb.EXPLORE)return null;const n=s.queryParams.categoryName;return Object(o.a)({categoryName:n})}},"./src/reddit/helpers/timeApiRoute/index.ts":function(e,t,s){"use strict";var r=s("./src/lib/constants/index.ts"),n=s("./src/telemetry/index.ts");t.a=async function(e,t){const s=n.c.start();try{const a=await t();return Object(n.b)(r.o.Redesign,{page:e,type:"route",duration:n.c.end(s)}),a}finally{n.c.cancel(s)}}},"./src/reddit/helpers/trackers/blade.ts":function(e,t,s){"use strict";s.d(t,"m",function(){return c}),s.d(t,"l",function(){return i}),s.d(t,"g",function(){return o}),s.d(t,"h",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"d",function(){return l}),s.d(t,"n",function(){return p}),s.d(t,"b",function(){return O}),s.d(t,"a",function(){return f}),s.d(t,"i",function(){return m}),s.d(t,"j",function(){return j}),s.d(t,"k",function(){return g}),s.d(t,"f",function(){return y}),s.d(t,"e",function(){return _}),s.d(t,"o",function(){return E});var r=s("./src/reddit/constants/blade.ts"),n=s("./src/reddit/selectors/telemetry.ts");const a=(e,t)=>s=>Object.assign({},n.defaults(s),{source:r.d.Appearance,action:"click",noun:e,actionInfo:n.actionInfo(s,{paneName:t}),subreddit:n.subreddit(s)}),c=e=>a("save_style",e),i=e=>a("cancel_style",e),o=e=>t=>({source:r.d.Structure,action:"click",noun:e,screen:n.screen(t),subreddit:n.subreddit(t)}),d=e=>t=>({source:r.d.Appearance,action:"click",noun:e,screen:n.screen(t),subreddit:n.subreddit(t)}),u=(e,t)=>s=>({source:"colorpicker",action:"click",noun:e,actionInfo:n.actionInfo(s,{paneName:r.h[t]}),screen:n.screen(s),subreddit:n.subreddit(s)}),l=e=>t=>({source:r.i[e],action:"click",noun:"colorpicker",actionInfo:n.actionInfo(t,{paneName:r.h[e]}),screen:n.screen(t),subreddit:n.subreddit(t)}),b=e=>({screen:n.screen(e),subreddit:n.subreddit(e)}),p=()=>e=>Object.assign({source:r.d.Appearance,action:"view",noun:"blade"},b(e)),O=e=>t=>Object.assign({source:r.a[e],action:"click",noun:r.b[e]},b(t)),f=()=>e=>Object.assign({source:r.d.Appearance,action:"click",noun:"back"},b(e)),m=e=>t=>Object.assign({source:r.d.PostFlairManagement,action:"click",noun:e},b(t)),j=e=>t=>Object.assign({source:r.d.PostFlairManagement,action:"toggle",noun:"post_flair_template",actionInfo:{settingValue:e?"on":"off"}},b(t)),g=e=>t=>Object.assign({source:r.d.UserFlairManagement,action:"click",noun:e},b(t)),y=(e,t)=>Object.assign({},n.defaults(e),m(t)(e)),_=e=>t=>({source:"emoji",action:"click",noun:e,screen:n.screen(t),subreddit:n.subreddit(t)}),E=e=>t=>({source:r.d.MenuLinks,action:"click",noun:e?"wiki_link_on":"wiki_link_off",screen:n.screen(t),subreddit:n.subreddit(t),userSubreddit:n.userSubreddit(t)})},"./src/reddit/helpers/trackers/chat.ts":function(e,t,s){"use strict";s.d(t,"m",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"c",function(){return d}),s.d(t,"d",function(){return u}),s.d(t,"b",function(){return l}),s.d(t,"a",function(){return b}),s.d(t,"k",function(){return p}),s.d(t,"g",function(){return O}),s.d(t,"l",function(){return f}),s.d(t,"i",function(){return m}),s.d(t,"h",function(){return j}),s.d(t,"j",function(){return g}),s.d(t,"f",function(){return y});var r=s("./src/reddit/constants/chat.ts"),n=s("./src/reddit/selectors/telemetry.ts"),a=s("./src/telemetry/models/Event.ts");const c=e=>({screen:Object(n.screen)(e),subreddit:Object(n.subreddit)(e)}),i=()=>e=>Object.assign({source:a.b.ChatSidebarWidget,action:"view",noun:"chat_rooms",chat:Object(n.numberChannels)(e)},c(e)),o=e=>t=>Object.assign({source:a.b.ChatSidebarWidget,action:"click",noun:"view_room",chat:Object(n.channel)(t,e)},c(t)),d=e=>t=>Object.assign({source:a.b.ChatSidebarWidget,action:"click",noun:"join_room",chat:Object(n.channel)(t,e)},c(t)),u=()=>e=>Object.assign({source:a.b.ChatSidebarWidget,action:"click",noun:"view_all_rooms",chat:Object(n.numberChannels)(e)},c(e)),l=e=>t=>Object.assign({source:a.b.ChatSidebarModal,action:"click",noun:"view_room",chat:Object(n.channel)(t,e)},c(t)),b=e=>t=>Object.assign({source:a.b.ChatSidebarModal,action:"click",noun:"join_room",chat:Object(n.channel)(t,e)},c(t)),p=()=>e=>Object.assign({source:a.b.ChatSetup,action:"view",noun:"create_chat_room"},c(e)),O=e=>t=>{const s=e.channelSendbirdUrl,n=e.type;return Object.assign({source:a.b.ChatSetup,action:"submit",noun:"create_chat_room",chat:{id:s,type:r.f[n]}},c(t))},f=()=>e=>Object.assign({source:a.b.ChatSetup,action:"view",noun:"edit_chat_room"},c(e)),m=e=>t=>{const s=e.channelSendbirdUrl,n=e.type;return Object.assign({source:a.b.ChatSetup,action:"submit",noun:"edit_chat_room",chat:{id:s,type:r.f[n]}},c(t))},j=e=>t=>{const s=e.channelSendbirdUrl,n=e.type;return Object.assign({source:a.b.ChatSetup,action:"submit",noun:"delete_chat_room",chat:{id:s,type:r.f[n]}},c(t))},g=()=>e=>Object.assign({source:a.b.Nav,action:"view",noun:"orangered_06"},c(e)),y=e=>t=>Object.assign({source:"settings_privacy",action:"save",noun:"receive_chat_invites",setting:{value:e,oldValue:e},actionInfo:Object(n.actionInfo)(t,{settingValue:e})},Object(n.defaults)(t))},"./src/reddit/helpers/trackers/coins.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return i}),s.d(t,"f",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"b",function(){return l}),s.d(t,"a",function(){return b}),s.d(t,"c",function(){return p});var r=s("./src/reddit/selectors/telemetry.ts"),n=s("./node_modules/uuid/v4.js"),a=s.n(n);let c;const i=()=>c,o=()=>c=a()(),d=()=>c=void 0,u="coins_marketing",l=()=>e=>Object.assign({source:u,action:"click",noun:"get_coins",correlationId:i()},r.defaults(e)),b=e=>t=>Object.assign({source:u,action:"click",noun:`coins_${e}`,correlationId:i()},r.defaults(t)),p=()=>e=>Object.assign({source:u,action:"click",noun:"get_premium",correlationId:i()},r.defaults(e))},"./src/reddit/helpers/trackers/commentList.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return a});var r=s("./src/telemetry/index.ts"),n=s("./src/reddit/selectors/telemetry.ts");const a=(e,t)=>{Object(r.a)(Object.assign({action:"view",source:"commentlist",noun:"bottom"},n.defaults(e),{listing:n.listing(e,t),subreddit:n.subreddit(e)}))}},"./src/reddit/helpers/trackers/commentsPage.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return d}),s.d(t,"b",function(){return u}),s.d(t,"e",function(){return l}),s.d(t,"a",function(){return b}),s.d(t,"c",function(){return p}),s.d(t,"d",function(){return O});var r=s("./src/app/models/Draft.ts"),n=s("./src/lib/constants/index.ts"),a=s("./src/reddit/constants/tracking.ts"),c=s("./src/reddit/selectors/telemetry.ts"),i=s("./src/telemetry/index.ts");const o=e=>{const t=(e=>{const t=e.platform.currentPage;if(t&&t.routeMatch){const e=t.routeMatch.match.params;if(e&&e.partialPostId)return`${n.wb.POST}_${e.partialPostId}`}})(e);return Object.assign({source:"comment_composer",action:a.b.CLICK},c.defaults(e),{screen:c.screen(e),subreddit:c.subreddit(e),post:t?c.post(e,t):null,profile:c.profile(e)})},d=(e,t)=>Object(i.a)(Object.assign({noun:"comment"},o(e),{commentComposer:{editorMode:t}})),u=e=>Object(i.a)(Object.assign({noun:"cancel"},o(e))),l=(e,t)=>{t===r.a.replyToPost&&Object(i.a)(Object.assign({noun:"input"},o(e)))},b=(e,t)=>Object(i.a)(Object.assign({source:"comment",noun:"delete",action:"click"},c.defaults(t),{screen:c.screen(t),subreddit:c.subreddit(t),post:c.post(t,e)})),p=e=>Object(i.a)(Object.assign({noun:"edit"},o(e))),O=e=>Object(i.a)(Object.assign({noun:"save_edit"},o(e)))},"./src/reddit/helpers/trackers/communityTopics.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return o}),s.d(t,"b",function(){return d}),s.d(t,"a",function(){return u}),s.d(t,"d",function(){return l});var r=s("./src/reddit/selectors/tags.ts"),n=s("./src/reddit/selectors/telemetry.ts"),a=s("./src/telemetry/index.ts");const c=(e,t,s)=>{if(!s.id)return{content:s.displayText};const n=Object(r.b)(e)[s.id]||Object(r.d)(e,{subredditId:t})[s.id];return n?{id:n.id,content:n.text,type:n.type}:null},i=(e,t)=>Object.assign({},n.defaults(e),{subreddit:Object.assign({},n.subreddit(e)||{},{id:t},((e,t)=>Object(r.i)(e,{itemId:t}).reduce(({topicTagIds:e,topicTagContents:t,topicTagTypes:s},r)=>(e.push(r.tag.id),t.push(r.tag.text),s.push(r.tag.type),{topicTagIds:e,topicTagContents:t,topicTagTypes:s}),{topicTagIds:[],topicTagContents:[],topicTagTypes:[]}))(e,t)),source:"community_settings",action:"click"}),o=(e,t,s)=>{return!Object(r.e)(e,{subredditId:t})&&s.id?Object(a.a)(((e,t,s)=>Object.assign({},i(e,t),{topicTag:c(e,t,s),noun:"topic_auto_suggest"}))(e,t,s)):s.id?Object(a.a)(((e,t,s)=>Object.assign({},i(e,t),{topicTag:c(e,t,s),noun:"topic_auto_complete"}))(e,t,s)):Object(a.a)(((e,t,s)=>Object.assign({},i(e,t),{topicTag:c(e,t,s),noun:"topic_add_new"}))(e,t,s))},d=(e,t,s)=>Object(a.a)(Object.assign({},i(e,t),{topicTag:c(e,t,s),noun:"topic_remove"})),u=(e,t)=>Object(a.a)(Object.assign({},i(e,t),{noun:"topic_tag_field"})),l=(e,t)=>Object(a.a)(Object.assign({},i(e,t),{noun:"save"}))},"./src/reddit/helpers/trackers/lightbox.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"f",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"a",function(){return l}),s.d(t,"b",function(){return b});var r=s("./src/reddit/constants/tracking.ts"),n=s("./src/telemetry/index.ts"),a=s("./src/reddit/selectors/platform.ts"),c=s("./src/reddit/selectors/telemetry.ts");const i=(e,t,s)=>r=>({source:Object(a.h)(r)||s?"post_lightbox":"post_detail",action:"click",noun:t,post:c.post(r,e),profile:c.profile(r),screen:c.screen(r),subreddit:c.subreddit(r)}),o=(e,t)=>s=>{const r=c.currentPost(s);return r?i(r.id,e,t)(s):{source:Object(a.h)(s)||t?"post_lightbox":"post_detail",action:"click",noun:e,profile:c.profile(s),screen:c.screen(s),subreddit:c.subreddit(s)}},d=(e,t)=>s=>Object(n.a)(Object.assign({},i(e,t)(s),c.defaults(s))),u=e=>t=>({source:"id_card",action:r.b.CLICK,noun:e,post:c.currentPost(t),profile:c.profile(t),screen:c.screen(t),subreddit:c.subreddit(t),userSubreddit:c.userSubreddit(t)}),l=e=>t=>({source:"id_banner",action:r.b.CLICK,noun:e,post:c.currentPost(t),profile:c.profile(t),screen:c.screen(t),subreddit:c.subreddit(t),userSubreddit:c.userSubreddit(t)}),b=e=>({source:"id_banner",action:r.b.VIEW,noun:"id_banner",post:c.currentPost(e),profile:c.profile(e),screen:c.screen(e),subreddit:c.subreddit(e),userSubreddit:c.userSubreddit(e)})},"./src/reddit/helpers/trackers/post.ts":function(e,t,s){"use strict";s.d(t,"g",function(){return a}),s.d(t,"f",function(){return c}),s.d(t,"a",function(){return i}),s.d(t,"d",function(){return o}),s.d(t,"b",function(){return d}),s.d(t,"c",function(){return l}),s.d(t,"e",function(){return b});var r=s("./src/telemetry/index.ts"),n=s("./src/reddit/selectors/telemetry.ts");const a=(e,t)=>Object(r.a)(Object.assign({source:"post",action:"view",noun:"post"},n.defaults(e),{post:n.post(e,t),profile:n.profile(e),media:n.media(e,t),screen:n.screen(e),subreddit:n.subreddit(e)})),c=(e,t)=>Object(r.a)(Object.assign({source:"post",action:"view",noun:"ad"},n.defaults(e),{post:n.post(e,t),media:n.media(e,t),screen:n.screen(e),subreddit:n.subreddit(e)})),i=(e,t,s)=>Object(r.a)(Object.assign({source:"post",action:"consume",noun:"post"},n.defaults(e),{post:n.post(e,t,s),media:n.media(e,t),screen:n.screen(e),subreddit:n.subreddit(e)})),o=(e,t)=>s=>({source:"post",action:"click",noun:t,post:n.post(s,e),media:n.media(s,e),screen:n.screen(s),session:n.session(s),subreddit:n.subreddit(s)||n.subredditByPostOrCommentId(s,e)}),d=(e,t)=>s=>Object(r.a)(Object.assign({source:"post",action:"click",noun:t},n.defaults(s),{post:n.post(s,e),media:n.media(s,e),screen:n.screen(s),session:n.session(s),subreddit:n.subreddit(s)})),u=(e,t)=>({post:n.post(e,t),profile:n.profile(e)}),l=e=>t=>Object.assign({action:"pin",noun:"post",source:"profile"},u(t,e),n.defaults(t)),b=e=>t=>Object.assign({action:"unpin",noun:"post",source:"profile"},u(t,e),n.defaults(t))},"./src/reddit/helpers/trackers/postComposer.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return j}),s.d(t,"c",function(){return g}),s.d(t,"t",function(){return y}),s.d(t,"s",function(){return _}),s.d(t,"o",function(){return E}),s.d(t,"v",function(){return h}),s.d(t,"n",function(){return S}),s.d(t,"i",function(){return T}),s.d(t,"q",function(){return I}),s.d(t,"p",function(){return v}),s.d(t,"l",function(){return C}),s.d(t,"k",function(){return R}),s.d(t,"u",function(){return A}),s.d(t,"d",function(){return D}),s.d(t,"m",function(){return P}),s.d(t,"x",function(){return x}),s.d(t,"y",function(){return w}),s.d(t,"z",function(){return N}),s.d(t,"w",function(){return k}),s.d(t,"j",function(){return U}),s.d(t,"h",function(){return M}),s.d(t,"e",function(){return G}),s.d(t,"f",function(){return F}),s.d(t,"b",function(){return B}),s.d(t,"r",function(){return $}),s.d(t,"g",function(){return q});var r=s("./src/reddit/constants/tracking.ts"),n=s("./src/reddit/helpers/correlationIdTracker.ts"),a=s("./src/reddit/helpers/media/index.ts"),c=s("./src/reddit/models/PostCreationForm/index.ts"),i=s("./src/reddit/models/PostDraft/index.ts"),o=s("./src/reddit/selectors/postDraft.ts"),d=s("./src/reddit/selectors/telemetry.ts"),u=s("./src/reddit/selectors/user.ts"),l=s("./src/telemetry/index.ts"),b=s("./src/telemetry/models/PostComposer.ts"),p=s("./src/telemetry/models/PostDraft.ts");const O={imageOnly:"image",linkOnly:"link",media:"media",poll:"self",post:"self",crosspost:"crosspost"},f=e=>Object.assign({source:"post_composer",action:r.b.CLICK},d.defaults(e),{screen:d.screen(e),correlationId:Object(n.c)(n.a.PostComposer)}),m=(e,t)=>"self"!==t?{}:{editorMode:e.user.prefs.editorMode===c.h.MARKDOWN?"markdown":"rte"},j=e=>{Object(l.a)(Object.assign({noun:"cancel"},f(e)))},g=e=>{Object(l.a)(Object.assign({noun:"discard"},f(e)))},y=e=>{Object(l.a)(Object.assign({noun:"subreddit_choice",subreddit:d.subreddit(e)},f(e)))},_=e=>{Object(l.a)(Object.assign({noun:"subreddit_selector"},f(e)))},E=(e,t)=>{Object(l.a)(Object.assign({noun:"post_type_selector",postComposer:{type:O[t]}},f(e)))},h=(e,t,s)=>{"image_upload"===t||"video_upload"===t?Object(l.a)(Object.assign({noun:t},f(e))):Object(l.a)(Object.assign({noun:"text_option",postComposer:{textType:t,finalStatus:s?"on":"off"}},f(e)))},S=(e,t)=>{Object(l.a)(Object.assign({noun:"post",subreddit:d.subreddit(e),postComposer:Object.assign({type:t},m(e,t))},f(e)))},T=(e,t)=>{const s=t===c.h.MARKDOWN?"markdown_mode":"rte_mode";Object(l.a)(Object.assign({noun:s},f(e)))},I=(e,t)=>{Object(l.a)(Object.assign({noun:"save",subreddit:d.subreddit(e),postComposer:Object.assign({type:t},m(e,t))},f(e)))},v=(e,t)=>{const s=e.uploads[t];s.error&&Object(l.a)(Object.assign({},f(e),{noun:"media",action:"reject",actionInfo:Object.assign({},d.actionInfo(e),{reason:JSON.stringify(s.error)})}))},C=(e,t)=>{t.forEach(t=>{const s=Object(a.e)(t.type);s&&Object(l.a)(Object.assign({},f(e),{action:"drag",noun:s}))})},R=(e,t,s)=>{Object(l.a)(Object.assign({},f(e),{noun:"input",postComposer:{inputType:s},action:t}))},A=(e,t,s)=>{Object(l.a)(Object.assign({},f(e),{noun:s,action:Object(b.getToggleAction)(t)}))},D=e=>{Object(l.a)(Object.assign({},f(e),{noun:"hide_oc_description",action:"click"}))},P=(e,t)=>{Object(l.a)(Object.assign({},f(e),{action:"click",noun:"share_profile_post_to_category",subreddit:{categoryName:t}}))},x=e=>{Object(l.a)(Object.assign({},f(e),{action:"click",noun:"recommend_oc_community"}))},w=(e,t)=>{Object(l.a)(Object.assign({},f(e),{action:"click",noun:"recommended_oc_category",subreddit:{categoryName:t}}))},N=(e,t,s)=>{Object(l.a)(Object.assign({},f(e),{action:"click",noun:"recommended_oc_subreddit",subreddit:{id:s.id,name:s.name,categoryName:t}}))},k=e=>{Object(l.a)(Object.assign({},f(e),{noun:"recommend_oc_community",action:"close"}))},L=(e,t)=>{if(t){const s=d.subredditById(e,t);if(s)return{subreddit:s};const r=d.profileById(e,t);if(r)return{profile:r}}},U=(e,t)=>{const s=t.draftId,r=t.destSubreddit,n=Object(u.j)(e),a=Object(o.d)(e,{draftId:s}),c={authorId:n?n.id:void 0,createdTimestamp:a?a.created:void 0,id:s||void 0,nsfw:t.isNSFW,originalContent:t.isOC,spoiler:t.isSpoiler,titleLength:t.title.length};switch(t.kind){case i.b.Link:c.type=p.DraftType.Link,c.urlLength=t.body.length;break;case i.b.Markdown:c.type=p.DraftType.Self,c.bodyTextLength=t.body.length;break;case i.b.RichText:c.type=p.DraftType.RichText,t.documentStats&&(c.bodyTextLength=t.documentStats.textLength,c.numberRteImages=t.documentStats.rteImagesCount,c.numberRteVideos=t.documentStats.rteVideosCount);break;case i.b.Image:c.type=p.DraftType.Image;break;case i.b.Video:c.type=p.DraftType.Video}return Object.assign({postDraft:c},L(e,r.id))},M=(e,t)=>{Object(l.a)(Object.assign({noun:"draft_load"},f(e),U(e,t)))},G=(e,t)=>{Object(l.a)(Object.assign({noun:t.draftId?"draft_update":"draft_create"},f(e),U(e,t)))},F=(e,t)=>{Object(l.a)(Object.assign({noun:"draft_delete"},f(e),((e,t)=>{const s=Object(u.j)(e),r={authorId:s?s.id:void 0,createdTimestamp:t.created,id:t.id,nsfw:t.isNSFW,originalContent:t.isOriginalContent,spoiler:t.isSpoiler,titleLength:t.title.length};switch(t.kind){case i.b.Link:r.type=p.DraftType.Link,r.urlLength=(t.body||"").length;break;case i.b.Markdown:r.type=p.DraftType.Self,r.bodyTextLength=(t.body||"").length;break;case i.b.RichText:r.type=p.DraftType.RichText}return Object.assign({postDraft:r},L(e,t.subredditId))})(e,t)))},B=e=>{Object(l.a)(Object.assign({},f(e),{noun:"social_connect_link",action:r.b.CLICK}))},$=(e,t)=>{Object(l.a)(Object.assign({},f(e),{noun:"twitter_share_checkbox",action:Object(b.getToggleAction)(t)}))},q=(e,t,s)=>{Object(l.a)(Object.assign({},f(e),U(e,t),{noun:"draft_share",action:s?"enable":"disable"}))}},"./src/reddit/helpers/trackers/premium.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return i}),s.d(t,"g",function(){return o}),s.d(t,"e",function(){return d}),s.d(t,"a",function(){return l}),s.d(t,"c",function(){return b}),s.d(t,"d",function(){return p}),s.d(t,"b",function(){return O});var r=s("./src/reddit/selectors/telemetry.ts"),n=s("./node_modules/uuid/v4.js"),a=s.n(n);let c;const i=()=>c,o=()=>c=a()(),d=()=>c=void 0,u="premium_marketing",l=()=>e=>Object.assign({source:u,action:"click",noun:"get_premium",correlationId:i()},r.defaults(e)),b=()=>e=>Object.assign({source:u,action:"click",noun:"price",correlationId:i()},r.defaults(e)),p=()=>e=>Object.assign({source:u,action:"click",noun:"redeem_code",correlationId:i()},r.defaults(e)),O=()=>e=>Object.assign({source:u,action:"click",noun:"manage",correlationId:i()},r.defaults(e))},"./src/reddit/helpers/trackers/screenview.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return g}),s.d(t,"c",function(){return y}),s.d(t,"j",function(){return _}),s.d(t,"k",function(){return E}),s.d(t,"i",function(){return h}),s.d(t,"l",function(){return S}),s.d(t,"b",function(){return T}),s.d(t,"g",function(){return I}),s.d(t,"d",function(){return v}),s.d(t,"e",function(){return C}),s.d(t,"a",function(){return D}),s.d(t,"h",function(){return P}),s.d(t,"m",function(){return k});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makePostDraftPageKey/index.ts"),a=s("./src/reddit/helpers/routeKey/index.ts"),c=s("./src/reddit/helpers/trackers/postComposer.ts"),i=s("./src/reddit/helpers/trackers/profileSettings.ts"),o=s("./src/reddit/models/Comment/index.ts"),d=s("./src/reddit/models/Post/index.ts"),u=s("./src/reddit/selectors/news.ts"),l=s("./src/reddit/selectors/profile.ts"),b=s("./src/reddit/selectors/subreddit.ts"),p=s("./src/reddit/helpers/trackers/coins.ts"),O=s("./src/reddit/helpers/trackers/premium.ts"),f=s("./src/reddit/selectors/postDraft.ts"),m=s("./src/reddit/selectors/telemetry.ts"),j=s("./src/telemetry/index.ts");const g=(e,t,s,c)=>{const l=e.route.meta.name;if(l)switch(l){case r.Rb.COMMENTS:var b=e.match.params;const C=b.partialCommentId,k=b.partialPostId,L=Object(d.f)(k),U=Object(a.a)(e,t,t.posts.models[L]);if(!U)return;const M=C&&Object(o.d)(C);Object(j.a)(T(U,L,M,s,c)(t));break;case r.Rb.INDEX:case r.Rb.LISTING:case r.Rb.MULTIREDDIT:case r.Rb.SUBREDDIT:case r.Rb.ORIGINAL_CONTENT:const G=Object(a.d)(e,t);if(!G)return;var p=e.match;const F=p.params,B=p.queryParams;var O=F.sort;const $=void 0===O?r.X.HOT:O,q=B.t;Object(j.a)(y(G,$,s,c,q)(t));break;case r.Rb.PROFILE_OVERVIEW:{const n=Object(a.f)(e,t);if(!n)return;var f=e.match;const i=f.params,o=f.queryParams;var m=i.sort;const d=void 0===m?r.Jb:m,u=o.t;Object(j.a)(_(n,d,s,c,u)(t))}break;case r.Rb.PROFILE_POSTS:{const n=Object(a.f)(e,t);if(!n)return;const i=e.match.queryParams;var g=i.sort;const o=void 0===g?r.Jb:g;var S=i.t;const d=void 0===S?r.sc:S;Object(j.a)(E(n,o,s,c,d)(t))}break;case r.Rb.PROFILE_COMMENTS:{const n=Object(a.f)(e,t);if(!n)return;const i=e.match.queryParams;var I=i.sort;const o=void 0===I?r.Jb:I;var v=i.t;const d=void 0===v?r.sc:v;Object(j.a)(h(n,o,s,c,d)(t))}break;case r.Rb.SETTINGS:e.match.params.page===r.lc.Profile?Object(i.j)(t):Object(j.a)(w(s,c)(t));break;case r.Rb.POST_CREATION:break;case r.Rb.NEWS:const V=Object(a.e)(e,t);if(!V)return;const H=Object(u.m)(t.user);Object(j.a)(y(V,H,s,c)(t));break;case r.Rb.POST_DRAFT:{const r=e.match.params.draftId,a=Object(n.a)(e.match.params);if(!a)return;R(t,a,r,s,c);break}case r.Rb.PARTNER_SUBREDDIT_CONNECTION:Object(j.a)(A(s,c)(t));break;case r.Rb.COINS:Object(j.a)(D(s,c)(t));break;case r.Rb.PREMIUM:Object(j.a)(P(s,c)(t));break;case r.Rb.APPEAL:Object(j.a)(x(s,c)(t));break;case r.Rb.EXPLORE:{const r=Object(a.b)(e);if(!r)return;Object(j.a)(N(r,s,c)(t));break}}},y=(e,t,s,r,n)=>a=>{const c=m.listing(a,e);c&&(c.sort=t,n&&(c.sortTime=n));const i=a.listings.postOrder.api,o=!i.error[e]&&!i.pending[e];return Object.assign({listing:c,source:"global",action:"view",noun:"screen"},m.defaults(a),{actionInfo:m.actionInfo(a,{success:o}),news:m.news(a),screen:m.screen(a),subreddit:m.subreddit(a),timer:m.timer(s,r),userSubreddit:m.userSubreddit(a),adblock:m.adblock(a)})},_=(e,t,s,r,n)=>a=>{const c=m.listing(a,e);c&&(c.sort=t,n&&(c.sortTime=n));const i=a.listings.postOrder.api,o=!i.error[e]&&!i.pending[e];return Object.assign({listing:c,source:"global",action:"view",noun:"screen"},m.defaults(a),{actionInfo:m.actionInfo(a,{success:o}),profile:m.profile(a),screen:m.screen(a),subreddit:m.subreddit(a),timer:m.timer(s,r),userSubreddit:m.userSubreddit(a),adblock:m.adblock(a)})},E=(e,t,s,r,n)=>a=>{const c=m.listing(a,e);c&&(c.sort=t,n&&(c.sortTime=n));const i=a.listings.postOrder.api,o=!i.error[e]&&!i.pending[e];return Object.assign({listing:c,source:"global",action:"view",noun:"screen"},m.defaults(a),{actionInfo:m.actionInfo(a,{success:o}),profile:m.profile(a),screen:m.screen(a),subreddit:m.subreddit(a),timer:m.timer(s,r),userSubreddit:m.userSubreddit(a),adblock:m.adblock(a)})},h=(e,t,s,r,n)=>a=>{const c=m.profileComments(a,e);c&&(c.sort=t,n&&(c.sortTime=n));const i=a.profileCommentsPage.api,o=!i.error[e]&&!i.pending[e];return Object.assign({listing:c,source:"global",action:"view",noun:"screen"},m.defaults(a),{actionInfo:m.actionInfo(a,{success:o}),profile:m.profile(a),screen:m.screen(a),subreddit:m.subreddit(a),timer:m.timer(s,r),userSubreddit:m.userSubreddit(a),adblock:m.adblock(a)})},S=e=>(t,s)=>r=>{const n=!r.profilePrivatePage.api.error[e]&&!r.profilePrivatePage.api.pending[e];return Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(r),{actionInfo:m.actionInfo(r,{success:n}),profile:m.profile(r),screen:m.screen(r),subreddit:m.subreddit(r),timer:m.timer(s,t),userSubreddit:m.userSubreddit(r),adblock:m.adblock(r)})},T=(e,t,s,r,n)=>a=>{const c=a.commentsPage.api,i=!c.error[e]&&!c.pending[e],o=Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(a),{actionInfo:m.actionInfo(a,{success:i}),post:m.post(a,t),profile:m.profile(a),screen:m.screen(a),subreddit:m.subreddit(a),timer:m.timer(r,n),userSubreddit:m.userSubreddit(a),adblock:m.adblock(a)});return s&&(o.comment=m.comment(a,s)),o},I=(e,t,s)=>r=>{const n=r.creations.api.page.fetched[e],a=r.platform.currentPage?r.platform.currentPage.queryParams.source_id:void 0;return Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(r),{actionInfo:m.actionInfo(r,{success:n}),post:a?m.post(r,a):void 0,screen:m.screen(r),subreddit:m.subreddit(r),timer:m.timer(t,s),userSubreddit:m.userSubreddit(r),adblock:m.adblock(r)})},v=(e,t,s)=>{Object(j.a)(Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(e),{actionInfo:m.actionInfo(e,{success:t}),screen:m.screen(e),subreddit:m.subredditById(e,Object(b.z)(e,s)),userSubreddit:m.userSubreddit(e),adblock:m.adblock(e)}))},C=(e,t,s,r)=>{Object(j.a)(Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(e),{profile:m.profileById(e,Object(l.j)(e,r)),screen:m.screen(e),subreddit:m.subredditById(e,Object(b.z)(e,s)),userSubreddit:m.userSubreddit(e),adblock:m.adblock(e)}))},R=(e,t,s,r,n)=>{const a=e.creations.api.page.pending[t],i=!e.creations.api.page.error[t]&&!a&&!!s,o=Object(f.h)(e,s);Object(j.a)(Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(e),{actionInfo:m.actionInfo(e,{success:i}),screen:m.screen(e),subreddit:m.subreddit(e),timer:m.timer(r,n),userSubreddit:m.userSubreddit(e),adblock:m.adblock(e)},o?Object(c.j)(e,o):{}))},A=(e,t)=>s=>Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(s),{actionInfo:m.actionInfo(s),screen:m.screen(s),timer:m.timer(e,t),userSubreddit:m.userSubreddit(s),adblock:m.adblock(s)}),D=(e,t)=>s=>Object.assign({source:"coins_marketing",action:"view",noun:"page",correlationId:p.e()},m.defaults(s),{timer:m.timer(e,t),adblock:m.adblock(s)}),P=(e,t)=>s=>Object.assign({source:"premium_marketing",action:"view",noun:"page",correlationId:O.f()},m.defaults(s),{timer:m.timer(e,t),adblock:m.adblock(s)}),x=(e,t)=>s=>Object.assign({source:"appeal",action:"view",noun:"page"},m.defaults(s),{timer:m.timer(e,t)}),w=(e,t)=>s=>Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(s),{actionInfo:m.actionInfo(s),timer:m.timer(e,t)}),N=(e,t,s)=>r=>{const n=r.listings.listingOrder.api,a=!n.error[e]&&!n.pending[e];return Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(r),{actionInfo:m.actionInfo(r,{success:a}),screen:m.screen(r),timer:m.timer(t,s),userSubreddit:m.userSubreddit(r),adblock:m.adblock(r)})},k=()=>e=>Object.assign({source:"global",action:"view",noun:"screen"},m.defaults(e))},"./src/reddit/helpers/trackers/submitValidation.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return o}),s.d(t,"c",function(){return d}),s.d(t,"h",function(){return b}),s.d(t,"g",function(){return p}),s.d(t,"d",function(){return f}),s.d(t,"a",function(){return m}),s.d(t,"b",function(){return j}),s.d(t,"e",function(){return _}),s.d(t,"i",function(){return E}),s.d(t,"j",function(){return h});var r=s("./src/reddit/controls/FormFields/index.tsx"),n=s("./src/reddit/selectors/telemetry.ts"),a=s("./src/telemetry/index.ts");const c=e=>Object.assign({source:"submit_validation"},n.defaults(e),{profile:n.profile(e),subreddit:n.subreddit(e)}),i={titleRegEx:"title_regex",titleStrings:"title_required_word",titleLength:"title_length",reposts:"repost_frequency",flair:"post_flair"},o=(e,t,s)=>{Object(a.a)(Object.assign({},c(e),{action:s?"deselect":"select",noun:i[t]}))},d=(e,t)=>t.action===r.d.ADD?u(e):t.action===r.d.REMOVE&&t.value&&void 0!==t.index?l(e,t.value,t.index):void 0,u=e=>{Object(a.a)(Object.assign({},c(e),{action:"add",noun:"title_required_word"}))},l=(e,t,s)=>{Object(a.a)(Object.assign({},c(e),{action:"remove",noun:"title_required_word",actionInfo:n.actionInfo(e,{settingValue:t,position:s})}))},b=(e,t)=>{Object(a.a)(Object.assign({},c(e),{action:"change",noun:"title_min",actionInfo:n.actionInfo(e,{settingValue:t})}))},p=(e,t)=>{Object(a.a)(Object.assign({},c(e),{action:"change",noun:"title_max",actionInfo:n.actionInfo(e,{settingValue:t})}))},O={none:"optional",required:"required",notAllowed:"not_allowed"},f=(e,t)=>{const s=O[t];Object(a.a)(Object.assign({},c(e),{action:"toggle",noun:"post_body",actionInfo:n.actionInfo(e,{settingValue:s})}))},m=(e,t)=>{Object(a.a)(Object.assign({},c(e),{action:"toggle",noun:"domain",actionInfo:n.actionInfo(e,{settingValue:"none"===t?"no_filtering":t})}))},j=(e,t,s)=>{if(t.action===r.d.ADD){return g(e,"whitelist"===s?"add_whitelist":"add_blacklist")}if(t.action===r.d.REMOVE&&t.value&&void 0!==t.index){const r="whitelist"===s?"remove_whitelist":"remove_blacklist";return y(e,t.value,t.index,r)}},g=(e,t)=>{Object(a.a)(Object.assign({},c(e),{action:t,noun:"domain"}))},y=(e,t,s,r)=>{Object(a.a)(Object.assign({},c(e),{action:r,noun:"domain",actionInfo:n.actionInfo(e,{settingValue:t,position:s})}))},_=(e,t)=>{Object(a.a)(Object.assign({},c(e),{action:"change",noun:"repost_days",actionInfo:n.actionInfo(e,{settingValue:t})}))},E=e=>{Object(a.a)(Object.assign({},c(e),{action:"click",noun:"save"}))},h=e=>{Object(a.a)(Object.assign({source:"global",noun:"screen",action:"view"},n.defaults(e),{profile:n.profile(e),subreddit:n.subreddit(e)}))}},"./src/reddit/helpers/trackers/subredditCreation.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});var r=s("./src/reddit/selectors/telemetry.ts");const n=e=>t=>Object.assign({source:e,noun:"create_community_button",action:"click"},r.defaults(t),{actionInfo:r.actionInfo(t,{settingValue:t.user.account&&t.user.account.isMod?"existing_mod":"new_mod"})}),a=(e,t)=>s=>Object.assign({source:"community_form",noun:"save_community_button",action:"click"},r.defaults(s),{actionInfo:r.actionInfo(s,{settingValue:e,success:t})})},"./src/reddit/icons/svgs/Plus/index.tsx":function(e,t,s){"use strict";s("./node_modules/react/index.js");var r,n=(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(e,t,s,n){var a=e&&e.defaultProps,c=arguments.length-3;if(t||0===c||(t={}),t&&a)for(var i in a)void 0===t[i]&&(t[i]=a[i]);else t||(t=a||{});if(1===c)t.children=n;else if(c>1){for(var o=Array(c),d=0;d<c;d++)o[d]=arguments[d+3];t.children=o}return{$$typeof:r,type:e,key:void 0===s?null:""+s,ref:null,props:t,_owner:null}});t.a=(e=>n("svg",{className:e.className,viewBox:"0 0 20 20",version:"1.1"},void 0,n("g",{stroke:"none"},void 0,n("g",{transform:"translate(-34.000000, -136.000000)",fill:"inherit"},void 0,n("path",{d:"M45.2,147.2 L48.8,147.2 C49.46272,147.2 50,146.66272 50,146 C50,145.33728 49.46272,144.8 48.8,144.8 L45.2,144.8 L45.2,141.2 C45.2,140.53728 44.66272,140 44,140 C43.33728,140 42.8,140.53728 42.8,141.2 L42.8,144.8 L39.2,144.8 C38.53728,144.8 38,145.33728 38,146 C38,146.66272 38.53728,147.2 39.2,147.2 L42.8,147.2 L42.8,150.8 C42.8,151.46272 43.33728,152 44,152 C44.66272,152 45.2,151.46272 45.2,150.8 L45.2,147.2 Z",id:"Combined-Shape"})))))},"./src/reddit/icons/svgs/Trash2/index.tsx":function(e,t,s){"use strict";s.d(t,"a",function(){return o});s("./node_modules/react/index.js");var r,n=s("./bundled-modules/styled-components/styled-components.min.js"),a=s.n(n),c=s("./src/reddit/models/Theme/NewColorSystem/index.ts"),i=(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(e,t,s,n){var a=e&&e.defaultProps,c=arguments.length-3;if(t||0===c||(t={}),t&&a)for(var i in a)void 0===t[i]&&(t[i]=a[i]);else t||(t=a||{});if(1===c)t.children=n;else if(c>1){for(var o=Array(c),d=0;d<c;d++)o[d]=arguments[d+3];t.children=o}return{$$typeof:r,type:e,key:void 0===s?null:""+s,ref:null,props:t,_owner:null}});const o=e=>i("svg",{className:e.className,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",onClick:e.onClick},void 0,i("path",{d:"M16.5,2H12.71l-.85-.85A.5.5,0,0,0,11.5,1h-3a.5.5,0,0,0-.35.15L7.29,2H3.5a.5.5,0,0,0-.5.5v1a.5.5,0,0,0,.5.5h13a.5.5,0,0,0,.5-.5v-1A.5.5,0,0,0,16.5,2Z"}),i("path",{d:"M16.5,5H3.5a.5.5,0,0,0-.5.5v12A1.5,1.5,0,0,0,4.5,19h11A1.5,1.5,0,0,0,17,17.5V5.5A.5.5,0,0,0,16.5,5ZM6.75,15.5a.75.75,0,0,1-1.5,0v-7a.75.75,0,0,1,1.5,0Zm4,0a.75.75,0,0,1-1.5,0v-7a.75.75,0,0,1,1.5,0Zm4,0a.75.75,0,0,1-1.5,0v-7a.75.75,0,0,1,1.5,0Z"}));t.b=a()(o).withConfig({componentId:"s69qjd8-0"})(["fill: ",";"],e=>Object(c.c)(e).actionIcon)},"./src/reddit/models/ApiRequestState/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return c});var r,n=s("./node_modules/uuid/v4.js"),a=s.n(n);!function(e){e[e.Pending=0]="Pending",e[e.Complete=1]="Complete",e[e.Failed=2]="Failed"}(r||(r={}));const c=()=>a()()},"./src/reddit/models/Comment/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"d",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"c",function(){return d}),s.d(t,"b",function(){return u});var r,n=s("./src/reddit/constants/comments.ts"),a=s("./src/reddit/constants/things.ts"),c=s("./src/lib/constants/index.ts");!function(e){e.User="user",e.Moderator="moderator"}(r||(r={}));const i=e=>`${a.a}${e}`,o=e=>({id:e,type:n.a.Comment}),d=e=>e.author===c.D;var u;!function(e){e.DeletedComment="DeletedComment",e.Comment="Comment"}(u||(u={}))},"./src/reddit/models/DiscoveryUnit/index.ts":function(e,t,s){"use strict";var r,n,a,c;s.d(t,"b",function(){return i}),s.d(t,"d",function(){return o}),s.d(t,"c",function(){return d}),s.d(t,"e",function(){return u}),s.d(t,"a",function(){return l}),s.d(t,"f",function(){return b}),s.d(t,"g",function(){return p}),s.d(t,"h",function(){return O}),function(e){e.Community="community",e.CommunityCategory="community_category",e.FavoriteSubreddits="favorite_subreddits",e.Listing="listing",e.RecentlyVisitedSubreddits="recently_visited_subreddits",e.SubredditListing="subreddit_listing"}(r||(r={})),function(e){e.Communities="communities",e.Explore="explore",e.Frontpage="front_page",e.Popular="popular",e.SubredditListing="subreddit_listing"}(n||(n={})),function(e){e.Large="large",e.Small="small"}(a||(a={})),function(e){e.Wide="wide",e.Description="description",e.ActionButton="action_button",e.SeeMore="see_more",e.HideItems="hide_items",e.HideUnit="hide_unit",e.ShowLess="show_less",e.PostShowSubredditHeader="post_show_subreddit_header",e.UnitShowSubredditHeader="unit_show_subreddit_header",e.PreviewMode="preview_mode"}(c||(c={}));const i="posts_in_category_rails_hero",o="posts_in_subreddit_hero",d="posts_in_category_rails_small",u="posts_in_subreddit_small",l="community_banner_posts",b="search_posts",p="search_subreddits",O="trending_on_popular"},"./src/reddit/models/Duplicates/index.ts":function(e,t,s){"use strict";function r(e,t){return`${e}-sort[${t.sort}]-crossposts_only[${t.crossposts_only}]`}s.d(t,"a",function(){return r})},"./src/reddit/models/Emoji/index.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return r}),s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c}),s.d(t,"e",function(){return i});const r=24,n=64e3,a=128,c=128,i=(e,t,s)=>({name:e,url:t,subredditId:s})},"./src/reddit/models/ExternalAccount/index.ts":function(e,t,s){"use strict";var r;s.d(t,"a",function(){return r}),function(e){e.Patreon="patreon",e.Twitter="twitter"}(r||(r={}))},"./src/reddit/models/Gold/Award.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return a});var r,n=s("./src/config.ts");!function(e){e.Global="GLOBAL",e.Moderator="MODERATOR",e.Community="COMMUNITY"}(r||(r={}));r.Global,n.a.assetPath;const a={awardType:r.Global,coinPrice:500,coinReward:100,description:"",daysOfDripExtension:0,icon:{url:`${n.a.assetPath}/img/gold/badges/award-gold-medium.png?v=2`},id:"gid_2",isEnabled:!0,name:"Gold",daysOfPremium:7};r.Global,n.a.assetPath;var c;!function(e){e.Global="global",e.Community="community",e.Moderator="moderator"}(c||(c={}))},"./src/reddit/models/Gold/Coins/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a}),s.d(t,"c",function(){return c});var r=s("./src/config.ts");const n={coins500:{coins:500,pennies:199,assetPath:`${r.a.assetPath}/img/gold/coins-package-500.png`},coins1100:{coins:1100,pennies:399,assetPath:`${r.a.assetPath}/img/gold/coins-package-1100.png`},coins1800:{coins:1800,pennies:599,assetPath:`${r.a.assetPath}/img/gold/coins-package-1800.png`},coins7200:{coins:7200,pennies:1999,assetPath:`${r.a.assetPath}/img/gold/coins-package-7200.png`},coins40000:{coins:4e4,pennies:9999,assetPath:`${r.a.assetPath}/img/gold/coins-package-40000.png`},coinsVariable:{coins:1/0,pennies:1/0,assetPath:`${r.a.assetPath}/img/gold/coins-package-40000.png`}},a=(e,t)=>{for(const s in n){if("coins500"===s)continue;const r=n[s];if(t-r.coins<=e)return r}return n.coins40000},c=e=>{const t=n.coins40000;if(e<=t.coins)return a(0,e);const s=t.pennies/t.coins,r=n.coinsVariable;return r.coins=e,r.pennies=Math.ceil(s*e),r}},"./src/reddit/models/Gold/Gild/index.tsx":function(e,t,s){"use strict";s.d(t,"b",function(){return a}),s.d(t,"a",function(){return o}),s.d(t,"d",function(){return u}),s.d(t,"e",function(){return b}),s.d(t,"c",function(){return O});s("./node_modules/react/index.js");var r,n,a,c=s("./src/config.ts"),i=(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(e,t,s,n){var a=e&&e.defaultProps,c=arguments.length-3;if(t||0===c||(t={}),t&&a)for(var i in a)void 0===t[i]&&(t[i]=a[i]);else t||(t=a||{});if(1===c)t.children=n;else if(c>1){for(var o=Array(c),d=0;d<c;d++)o[d]=arguments[d+3];t.children=o}return{$$typeof:r,type:e,key:void 0===s?null:""+s,ref:null,props:t,_owner:null}});!function(e){e.Silver="silver",e.Gold="gold",e.Platinum="platinum"}(n||(n={})),function(e){e.Gid1="gid_1",e.Gid2="gid_2",e.Gid3="gid_3"}(a||(a={}));const o="GildedLastMonth--Tooltip",d=new Set(Object.keys(a).map(e=>a[e])),u=e=>d.has(e)?e.replace(/_/,""):null,l={[a.Gid1]:{title:"gold.gildModal.awardSelector.silver.title",color:"#A5A4A4",cost:100,modelField:a.Gid1,benefits:["gold.gildModal.awardSelector.silver.benefit1"],benefitsTitle:"gold.gildModal.awardSelector.silver.benefitsTitle",icon:({className:e})=>i("img",{className:e,src:`${c.a.assetPath}/img/gold/badges/award-silver-medium.png?v=2`}),awardMessage:"gold.gildModal.awardSelector.silver.awardMessage",enabled:!0},[a.Gid2]:{title:"gold.gildModal.awardSelector.gold.title",color:"#DDBB38",cost:500,modelField:a.Gid2,benefits:["gold.gildModal.awardSelector.gold.benefit1"],benefitsTitle:"gold.gildModal.awardSelector.gold.benefitsTitle",icon:({className:e})=>i("img",{className:e,src:`${c.a.assetPath}/img/gold/badges/award-gold-medium.png?v=2`}),awardMessage:"gold.gildModal.awardSelector.gold.awardMessage",enabled:!0},[a.Gid3]:{title:"gold.gildModal.awardSelector.platinum.title",color:"#0DD2BA",cost:1800,modelField:a.Gid3,benefits:["gold.gildModal.awardSelector.platinum.benefit1"],benefitsTitle:"gold.gildModal.awardSelector.platinum.benefitsTitle",icon:({className:e})=>i("img",{className:e,src:`${c.a.assetPath}/img/gold/badges/award-platinum-medium.png?v=2`}),awardMessage:"gold.gildModal.awardSelector.platinum.awardMessage",enabled:!0}},b=e=>l[e],p={[a.Gid1]:0,[a.Gid2]:0,[a.Gid3]:0},O=(e,t)=>Object.assign({},e,{gildings:t||p})},"./src/reddit/models/Live/index.ts":function(e,t,s){"use strict";var r,n;s.d(t,"b",function(){return r}),s.d(t,"a",function(){return n}),function(e){e.Ama="ama",e.Announcement="announcement",e.Document="document",e.Moderation="moderation",e.Snoo="snoo"}(r||(r={})),function(e){e.Ama="AMA",e.Announcement="ANNOUNCEMENT",e.Document="DOCUMENT",e.Moderation="MODERATION",e.Snoo="SNOO"}(n||(n={}))},"./src/reddit/models/ModQueue/index.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return a}),s.d(t,"a",function(){return c}),s.d(t,"c",function(){return o}),s.d(t,"d",function(){return d});var r=s("./src/reddit/helpers/isPost.ts"),n=s("./src/reddit/models/Flair/index.ts");const a=1;var c;!function(e){e.Approve="approve",e.Flair="flair",e.IgnoreReports="ignore_reports",e.Lock="lock",e.MarkNSFW="mark_nsfw",e.RemovalReason="removal_reason",e.Remove="remove",e.Spam="spam",e.Spoiler="spoiler",e.UnignoreReports="unignore_reports",e.Unlock="unlock",e.UnmarkNSFW="unmark_nsfw",e.Unspoiler="unspoiler"}(c||(c={}));const i={},o={ignore_reports:c.UnignoreReports,lock:c.Unlock,mark_nsfw:c.UnmarkNSFW,remove:c.Approve,spam:c.Approve,spoiler:c.Unspoiler,unignore_reports:c.IgnoreReports,unlock:c.Lock,unmark_nsfw:c.MarkNSFW,unspoiler:c.Spoiler},d=(e,t,s,a,o)=>{switch(t){case"approve":{const e={};return s.forEach(t=>{e[t]={approvedBy:a,isApproved:!0,isRemoved:!1,isSpam:!1,bannedBy:null,modNote:null,modReasonBy:null,modRemovalReason:null,numReports:0}}),e}case"flair":{const t={};return s.forEach(s=>{if(Object(r.a)(s)){const r=e[s].flair.filter(e=>e.type===n.e.Nsfw||e.type===n.e.Spoiler);o&&o.flair&&r.push(o.flair),t[s]={flair:r}}}),t}case"ignore_reports":{const e={};return s.forEach(t=>{e[t]={ignoreReports:!0}}),e}case"lock":{const e={};return s.forEach(t=>{e[t]={isLocked:!0}}),e}case"mark_nsfw":{const t={},a={text:"nsfw",type:n.e.Nsfw};return s.forEach(s=>{if(Object(r.a)(s)){const r=e[s],n=r.isNSFW?r.flair:r.flair?[...r.flair,a]:{[s]:a};t[s]={isNSFW:!0,flair:n}}}),t}case"remove":{const e={};return s.forEach(t=>{e[t]={approvedBy:null,isApproved:!1,isRemoved:!0,isSpam:!1,bannedBy:a}}),e}case"spam":{const e={};return s.forEach(t=>{e[t]={approvedBy:null,isApproved:!1,isRemoved:!1,isSpam:!0,bannedBy:a}}),e}case"spoiler":{const t={},a={text:"spoiler",type:n.e.Spoiler};return s.forEach(s=>{if(Object(r.a)(s)){const r=e[s],n=r.isSpoiler?r.flair:r.flair?[...r.flair,a]:{[s]:a};t[s]={isSpoiler:!0,flair:n}}}),t}case"unignore_reports":{const e={};return s.forEach(t=>{e[t]={ignoreReports:!1}}),e}case"unlock":{const e={};return s.forEach(t=>{e[t]={isLocked:!1}}),e}case"unmark_nsfw":{const t={};return s.forEach(s=>{if(Object(r.a)(s)){const r=e[s],a=r.flair?r.flair.filter(e=>e.type!==n.e.Nsfw):null;t[s]={isNSFW:!1,flair:a}}}),t}case"unspoiler":{const t={};return s.forEach(s=>{if(Object(r.a)(s)){const r=e[s],a=r.flair?r.flair.filter(e=>e.type!==n.e.Spoiler):null;t[s]={isSpoiler:!1,flair:a}}}),t}case c.RemovalReason:{const e={};return s.forEach(t=>{e[t]={modNote:o&&o.modNote,modReasonBy:a,modRemovalReason:o&&o.removalReason}}),e}default:return i}}},"./src/reddit/models/Poll/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"f",function(){return c}),s.d(t,"e",function(){return i}),s.d(t,"c",function(){return o}),s.d(t,"d",function(){return d});var r,n,a=s("./node_modules/bignumber.js/bignumber.js");!function(e){e.GovGeneric="governance:generic",e.ReplaceTopMod="governance:replace-top-mod",e.Spinoff="governance:spin-off"}(r||(r={})),function(e){e.ByVoters="byVoters",e.ByVotingPower="byVotingPower",e.ByLockedVotingPower="byLockedVotingPower"}(n||(n={}));const c={[r.ReplaceTopMod]:()=>[{text:"Yes"},{text:"No"}],[r.Spinoff]:e=>[{text:e?`Yes, I'd like to join r/${e}`:"Yes, I'd like to join the new community"},{text:"No"}]};function i(e,t){const s=!!e.options.filter(e=>t.options[e.id].userSelected).length,r=new Date(e.endsAt).getTime()<Date.now();return s||r}function o(e,t){let s=e.options[0],r=new a.BigNumber(t.options[s.id].votes);for(const n of e.options){const e=new a.BigNumber(t.options[n.id].votes);e.isGreaterThan(r)&&(s=n,r=e)}return s}function d(e){switch(e.type){case r.GovGeneric:case r.ReplaceTopMod:case r.Spinoff:return!0;default:return!1}}},"./src/reddit/models/PostRequirements/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return c}),s.d(t,"b",function(){return i}),s.d(t,"c",function(){return o});var r=s("./node_modules/lodash/isEqual.js"),n=s.n(r);const a=e=>"number"==typeof e&&e<2?null:e,c=e=>{const t={},s=e.titleRegEx,r=e.titleStrings,n=e.titleLength,c=e.postLength,i=e.linkDomain,o=e.linkListPermission,d=e.postBodyRequirement,u=e.postingGuidelines,l=e.reposts,b=e.flair;return r.isToggled?t.ruleTitleStrings=r.strings.filter(e=>!!e):t.ruleTitleStrings=[],s.isToggled?t.ruleTitleRegex=s.regex.filter(e=>!!e):t.ruleTitleRegex=[],n.isToggled?(t.ruleTitleTextMaxLength=n.max,t.ruleTitleTextMinLength=a(n.min)):(t.ruleTitleTextMaxLength=null,t.ruleTitleTextMinLength=null),c.isToggled?(t.ruleBodyTextMaxLength=c.max,t.ruleBodyTextMinLength=a(c.min)):(t.ruleBodyTextMaxLength=null,t.ruleBodyTextMinLength=null),t.ruleLinkListPermission=o,"none"!==o&&("whitelist"===o?t.ruleLinkWhitelist=i.whitelist.filter(e=>!!e):t.ruleLinkBlacklist=i.blacklist.filter(e=>!!e)),t.noopGuidelinesRequirement=u.requirement,"none"!==u.requirement&&(t.noopGuidelines=u.guidelines),l.isToggled?t.ruleLinkRepostAge=l.days:t.ruleLinkRepostAge=null,t.ruleBodyRequirement=d,t.ruleFlairRequired=b.isToggled,t},i=(e,t)=>{const s=Object.assign({},e);return s.isLoading=!1,s.titleStrings.isToggled=!!t.ruleTitleStrings.length,s.titleStrings.strings=t.ruleTitleStrings,s.titleRegEx.isToggled=!!t.ruleTitleRegex.length,s.titleRegEx.regex=t.ruleTitleRegex,s.titleLength.isToggled=null!==t.ruleTitleTextMinLength||null!==t.ruleTitleTextMaxLength,s.titleLength.min=t.ruleTitleTextMinLength,s.titleLength.max=t.ruleTitleTextMaxLength,s.postLength.isToggled=null!==t.ruleBodyTextMinLength||null!==t.ruleBodyTextMaxLength,s.postLength.min=t.ruleBodyTextMinLength,s.postLength.max=t.ruleBodyTextMaxLength,s.postingGuidelines.requirement=t.noopGuidelinesRequirement,s.postingGuidelines.guidelines=t.noopGuidelines,s.postBodyRequirement=t.ruleBodyRequirement,s.linkListPermission=t.ruleLinkListPermission,s.linkDomain.whitelist=t.ruleLinkWhitelist,s.linkDomain.blacklist=t.ruleLinkBlacklist,s.reposts.isToggled=null!==t.ruleLinkRepostAge,s.reposts.days=t.ruleLinkRepostAge,s.flair.isToggled=t.ruleFlairRequired,s},o=(e,t)=>{const s={};for(const r in e){const a=e[r];Array.isArray(a)?n()(a,t[r])||(s[r]=a):a!==t[r]&&(s[r]=a)}return s}},"./src/reddit/models/Rule/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return a}),s.d(t,"d",function(){return c}),s.d(t,"f",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"c",function(){return d}),s.d(t,"g",function(){return u});const r={all:"all",post:"post",comment:"comment"},n={all:"all",link:"post",comment:"comment"},a={LINK_AND_COMMENT:"all",LINK:"post",COMMENT:"comment"},c=15,i=100,o=100,d=500,u=e=>({rules:e.map(e=>({kind:n[e.kind],description:e.description,descriptionHtml:e.description_html,shortName:e.short_name,violationReason:e.violation_reason,createdUtc:e.created_utc,priority:e.priority}))})},"./src/reddit/models/SearchDiscoveryUnit/index.ts":function(e,t,s){"use strict";var r,n,a;s.d(t,"c",function(){return r}),s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a}),function(e){e.Default="DEFAULT",e.Trending="TRENDING"}(r||(r={})),function(e){e.Communities="COMMUNITIES",e.Posts="POSTS",e.Queries="QUERIES"}(n||(n={})),function(e){e.Carousel="CAROUSEL",e.Hero="HERO",e.Row="ROW",e.Widget="WIDGET"}(a||(a={}))},"./src/reddit/models/SubredditChannel/index.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return r}),s.d(t,"a",function(){return n}),s.d(t,"b",function(){return c}),s.d(t,"d",function(){return i}),s.d(t,"e",function(){return o});var r,n,a=s("./src/chat/models/Channel/utils/removeSendbirdPrefix.ts");!function(e){e.Public="public",e.Private="private"}(r||(r={})),function(e){e.Joined="joined",e.Invited="invited",e.Unsorted="none"}(n||(n={}));const c={channelId:"",channelSendbirdUrl:"",subredditId:"",name:"",description:"",membersCount:0,type:r.Public,channelState:n.Unsorted,minimumAcctAge:0,newMemberAge:0,isModQueue:!1},i=e=>{const t={};return e.length&&e.forEach(e=>{const s=(e=>({channelId:Object(a.a)(e.url),channelSendbirdUrl:e.url,channelState:e.member_state,subredditId:e.subreddit.id,isModQueue:e.is_modqueue,name:e.name,type:e.type,description:e.description,membersCount:e.member_count,minimumAcctAge:e.automute_account_age_threshold||0,newMemberAge:e.automute_on_join_duration||0}))(e);t[s.channelId]=s}),t},o=e=>({channelId:Object(a.a)(e.channel_url),channelSendbirdUrl:e.channel_url,channelState:n.Joined,subredditId:e.subreddit_id,isModQueue:!1,name:e.room,type:e.roomType,description:e.description,membersCount:1,minimumAcctAge:e.automute_account_age_threshold,newMemberAge:e.automute_on_join_duration})},"./src/reddit/models/Tags/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"c",function(){return a}),s.d(t,"e",function(){return c}),s.d(t,"d",function(){return i});const r=25,n=64;var a;!function(e){e.EVENT="EVENT",e.COLLECTION="COLLECTION",e.CLASSIFICATION="CLASSIFICATION",e.POST_CLASSIFICATION="POST_CLASSIFICATION",e.SUBREDDIT_CLASSIFICATION="SUBREDDIT_CLASSIFICATION",e.COMMENT_CLASSIFICATION="COMMENT_CLASSIFICATION"}(a||(a={}));const c=(e,t=!1)=>({id:e.id,displayText:e.text,selected:t}),i=(e,t=!1)=>c(e.tag,t)},"./src/reddit/models/WhitelistAndBlocked.ts":function(e,t,s){"use strict";var r;s.d(t,"a",function(){return r}),function(e){e.pending="pending",e.error="error",e.waitingForRequest="waitingForRequest"}(r||(r={}))},"./src/reddit/reducers/comments/visitHighlightingFilter/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});var r,n=s("./src/reddit/actions/comment.ts"),a=s("./src/reddit/actions/platform.ts");!function(e){e.First="First",e.Last="Last",e.None="None"}(r||(r={}));const c=r.Last;t.b=((e=c,t)=>{switch(t.type){case a.a:return c;case n.a:return t.payload.sort;default:return e}})},"./src/reddit/reducers/economics/paymentSystems/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});var r,n=s("./src/reddit/actions/economics/paymentSystems/constants.ts"),a=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};!function(e){e[e.Failure=0]="Failure",e[e.Fetched=1]="Fetched",e[e.NotFetched=2]="NotFetched",e[e.Pending=3]="Pending"}(r||(r={}));const c={status:r.NotFetched};t.b=((e=c,t)=>{switch(t.type){case n.a:if(e.status===r.Fetched&&e.data.stripe&&e.data.stripe.sources){const s=t.payload.cardId,r=e.data.stripe.sources,n=s,c=(r[n],a(r,["symbol"==typeof n?n:n+""]));return Object.assign({},e,{data:Object.assign({},e.data,{stripe:Object.assign({},e.data.stripe,{sources:c})})})}return e;case n.b:return{error:t.payload.error,status:r.Failure};case n.c:return{data:t.payload,status:r.Fetched};case n.d:return{status:r.Pending};default:return e}})},"./src/reddit/reducers/index.ts":function(e,t,s){"use strict";var r=s("./node_modules/redux/es/index.js"),n=s("./src/app/reducers/meta/index.ts"),a=s("./src/app/reducers/tooltipId/index.ts"),c=s("./src/reddit/actions/modal.ts");const i={};var o=(e=i,t)=>{switch(t.type){case c.e:return t.payload.actionSource||t.payload.redirectUrl?Object.assign({},e,t.payload):i;default:return e}},d=s("./src/reddit/actions/authorFlair.ts"),u=s("./src/reddit/actions/badge.ts"),l=s("./src/reddit/actions/economics/support/constants.ts"),b=s("./src/reddit/actions/governance/constants.ts"),p=s("./src/reddit/actions/harbergerTax/constants.ts"),O=s("./src/reddit/actions/platform.ts"),f=s("./src/reddit/actions/postCreation/constants.ts"),m=s("./src/reddit/actions/product.ts"),j=s("./src/reddit/actions/reportFlow.ts"),g=s("./src/reddit/actions/structuredStyles.ts"),y=s("./src/reddit/constants/modals.ts");var _=(e=null,t)=>{switch(t.type){case c.c:{const s=t.payload;return e===s?null:s}case c.b:case f.x:case c.d:case O.a:case j.e:return null;case g.f:return e===y.a.BLADE_UNSAVED_CHANGES?null:e;case g.e:return e===y.a.BLADE_NIGHTMODE?null:e;case d.a:return e===y.a.USER_FLAIR_MODAL_ID?null:y.a.USER_FLAIR_MODAL_ID;case u.c:return y.a.BADGE_PICKER;case m.b:return y.a.BADGE_PURCHASE;case b.e:return y.a.GOVERNANCE_OPT_OUT;case b.r:return y.a.TRANSFER_POINTS;case b.o:return y.a.GOVERNANCE_RELEASE_NOTES;case p.c:return y.a.HARBERGER_TAX_BANNER_PURCHASE;case p.a:return y.a.HARBERGER_TAX_BANNER_MANAGE;case l.a:return y.a.ECONOMY_SUPPORT_MODAL;default:return e}},E=s("./src/reddit/actions/post.ts"),h=s("./src/reddit/actions/video.ts");const S={};var T=(e=S,t)=>{switch(t.type){case E.a:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adImpression=Date.now(),r}case E.b:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adViewableImpression=Date.now(),r}case h.d:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adVideoViewable=Date.now(),r}case h.a:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adVideoFullyViewable=Date.now(),r}case h.c:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adVideoStarted=Date.now(),r}case h.b:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adVideoPlayedWithSound=Date.now(),r}case h.q:{const s=t.payload.postId,r=Object.assign({},e);return r[s]||(r[s]={}),r[s].adVideoPlayedExpanded=Date.now(),r}case h.e:{var s=t.payload;const r=s.postId,n=s.percentage,a=Object.assign({},e);a[r]||(a[r]={});const c=`adVideoWatchedPercent${n}`;return a[r].adVideoWatchedPercent||(a[r][c]={}),a[r][c]=Date.now(),a}case h.f:{var r=t.payload;const s=r.postId,n=r.seconds,a=Object.assign({},e);a[s]||(a[s]={});const c=`adVideoWatchedSeconds${n}`;return a[s].adVideoWatchedSeconds||(a[s][c]={}),a[s][c]=Date.now(),a}default:return e}},I=s("./src/reddit/actions/alpha.ts");const v={notFound:{users:[],subreddits:[]},error:null,pending:!1};var C=(e=v,t)=>{switch(t.type){case I.d:case I.a:{const s=t.paylod.error;return Object.assign({},e,{error:s,pending:!1})}case I.e:case I.b:return Object.assign({},e,{error:null,pending:!0});case I.c:case I.f:{const s=t.payload.notFound;return Object.assign({},e,{error:null,pending:!1,notFound:s})}default:return e}},R=s("./src/reddit/actions/apiRequestState.ts");const A={};var D=(e=A,t)=>{switch(t.type){case R.d:case R.a:case R.b:{const s=t.payload;return Object.assign({},e,{[s.apiRequestId]:s})}case R.c:{const s=t.payload;if(!(s in e))return e;if(1===Object.keys(e).length)return A;const r=Object.assign({},e);return delete r[s],r}default:return e}},P=s("./src/reddit/actions/appeal.ts");var x=(e=!1,t)=>{switch(t.type){case P.e:case P.b:return!1;case P.a:return!0;case P.d:return!1;default:return e}};var w=(e=!1,t)=>{switch(t.type){case P.e:return!0;case P.b:case P.a:case P.d:return!1;default:return e}};var N=(e=!1,t)=>{switch(t.type){case P.b:return!0;case P.e:case P.a:case P.d:return!1;default:return e}},k=Object(r.c)({error:x,pending:w,success:N}),L=Object(r.c)({api:k}),U=s("./src/reddit/actions/subredditModeration.ts");var M=(e=null,t)=>{switch(t.type){case U.e:case U.d:return null;case U.c:return t.payload;default:return e}},G=s("./src/reddit/models/SubredditModeration/index.ts");const F={};var B=(e=F,t)=>{switch(t.type){case U.e:{var s=t.payload;const r=s.subredditId,n=s.fetchedToken,a=Object(G.d)(r,n);return Object.assign({},e,{[a]:!0})}case U.d:case U.c:{var r=t.payload;const s=r.subredditId,n=r.fetchedToken,a=Object(G.d)(s,n);return Object.assign({},e,{[a]:!1})}default:return e}},$=Object(r.c)({error:M,pending:B});const q={};var V=(e=q,t)=>{switch(t.type){case U.d:{var s=t.payload;const r=s.fetchedToken,n=s.subredditId,a=Object(G.d)(n,r);return Object.assign({},e,{[a]:!0})}default:return e}};const H={};var K=(e=H,t)=>{switch(t.type){case U.d:var s=t.payload;return{[s.subredditId]:s.after};default:return e}},W=s("./node_modules/lodash/merge.js"),Y=s.n(W);const z={};var Q=(e=z,t)=>{switch(t.type){case U.b:case U.d:{var s=t.payload;const r={[s.subredditId]:s.approvedSubmitters};return Y()(Object.assign({},e),r)}case U.i:{var r=t.payload;const s=r.subredditId,n=r.userId,a=Object.assign({},e);return delete a[s][n],a}default:return e}};var X=(e=null,t)=>{switch(t.type){case U.h:case U.g:return null;case U.f:return t.payload;default:return e}};var J=(e=!1,t)=>{switch(t.type){case U.h:return!0;case U.g:case U.f:return!1;default:return e}},Z=Object(r.c)({error:X,pending:J});var ee=(e=null,t)=>{switch(t.type){case U.h:return null;case U.g:{const e=t.payload.approvedSubmitterIds[0];return e?t.payload.approvedSubmitters[e]:null}default:return e}},te=Object(r.c)({api:Z,result:ee});const se={};var re=(e=se,t)=>{switch(t.type){case U.d:{var s=t.payload;const r=s.subredditId,n=s.approvedSubmitterIds;return e[r]?Object.assign({},e,{[r]:[...e[r],...n]}):Object.assign({},e,{[r]:n})}case U.i:{var r=t.payload;const s=r.subredditId,n=r.userId;return{[s]:e[s].filter(e=>e!==n)}}case U.b:{var n=t.payload;const s=n.subredditId,r=n.approvedSubmitterIds[0];return r&&e[s]&&-1===e[s].indexOf(r)?{[s]:[r,...e[s]]}:e}default:return e}},ne=Object(r.c)({api:$,fetchedTokens:V,loadMore:K,models:Q,search:te,userOrder:re});var ae=(e=null,t)=>{switch(t.type){case d.a:return t.payload;default:return e}},ce=s("./src/reddit/actions/comment.ts"),ie=s("./src/reddit/actions/modQueue/constants.ts"),oe=s("./src/reddit/actions/page.ts"),de=s("./src/reddit/actions/pages/profileComments.ts"),ue=s("./src/reddit/actions/pages/profilePosts.ts"),le=s("./src/reddit/actions/pages/profilePrivate/constants.ts"),be=s("./src/reddit/actions/pages/subreddit.ts"),pe=s("./src/reddit/actions/profileConversations.ts"),Oe=s("./src/reddit/actions/subreddit.ts"),fe=s("./src/reddit/actions/userFlair.ts"),me=s("./src/reddit/models/User/index.ts");const je={};var ge=(e=je,t)=>{switch(t.type){case le.c:case le.i:case le.e:case le.g:case oe.q:{const s=t.payload.authorFlair;return s?Y()(Object.assign({},e),s):e}case ce.t:case be.b:case oe.b:case de.b:case de.e:case ue.e:case ue.b:case pe.e:case Oe.i:{var s=t.payload;const r=s.account,n=s.authorFlair,a=s.userFlair,c=Y()(Object.assign({},e),n);if(!a||!r)return c;const i=Object.keys(a)[0];return i&&Object(me.f)(r)?(c[i]||(c[i]={}),c):c}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{var r=t.payload.response;const s=r.account,n=r.authorFlair,a=r.userFlair,c=Y()(Object.assign({},e),n);if(!a||!s)return c;const i=Object.keys(a)[0];return i&&Object(me.f)(s)?(c[i]||(c[i]={}),c):c}case fe.i:{var n=t.payload;const s=n.subredditId,r=n.userName,a=n.applied,c=n.displaySettings.isUserEnabled;return Object.assign({},e,{[s]:Object.assign({},e[s],{[r]:c?a:null})})}case fe.a:{var a=t.payload;const s=a.subredditId,r=a.userName,n=a.applied,c=a.displaySettings.isEnabled;return Object.assign({},e,{[s]:Object.assign({},e[s],{[r]:c?n:null})})}default:return e}},ye=Object(r.c)({inContext:ae,models:ge}),_e=s("./src/reddit/actions/gold/constants.ts");var Ee=(e=null,t)=>{switch(t.type){case _e.d:case _e.e:return null;case _e.c:return t.payload;default:return e}};var he=(e=!1,t)=>{switch(t.type){case O.a:case _e.e:case _e.c:return!1;case _e.d:return!0;default:return e}},Se=Object(r.c)({error:Ee,pending:he}),Te=Object(r.c)({api:Se});var Ie=(e=null,t)=>{switch(t.type){case _e.C:case _e.B:return null;case _e.A:return t.payload;default:return e}};const ve={};var Ce=(e=ve,t)=>{switch(t.type){case _e.C:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!0})}case _e.B:case _e.A:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}},Re=Object(r.c)({error:Ie,pending:Ce});const Ae={};var De=(e=Ae,t)=>{switch(t.type){case _e.B:{var s=t.payload;const r=s.awards,n=s.subredditId,a=r.map(e=>e.id);return Object.assign({},e,{[n]:a})}case _e.e:{var r=t.payload;const s=r.award,n=r.subredditId;if(s&&s.id){if(!e[n])return Object.assign({},e,{[n]:[s.id]});if(-1===e[n].indexOf(s.id))return Object.assign({},e,{[n]:[s.id,...e[n]]})}return e}case _e.h:{var n=t.payload;const s=n.awardId,r=n.subredditId,a=Object.assign({},e);if(a[r]){const e=a[r].indexOf(s);if(-1!==e){const t=[...a[r]];return t.splice(e,1),a[r]=t,a}}return e}default:return e}},Pe=Object(r.c)({api:Re,order:De}),xe=s("./src/reddit/actions/discoveryUnit.ts"),we=s("./src/reddit/actions/frontpage.ts"),Ne=s("./src/reddit/actions/hero.ts"),ke=s("./src/reddit/actions/multireddit.ts"),Le=s("./src/reddit/actions/originalContent.ts"),Ue=s("./src/reddit/actions/pages/collectionCommentsPage.ts"),Me=s("./src/reddit/actions/pages/modListing/constants.ts"),Ge=s("./src/reddit/actions/pages/news/index.ts"),Fe=s("./src/reddit/actions/pages/originalContent.ts"),Be=s("./src/reddit/actions/pages/postCreation.ts"),$e=s("./src/reddit/actions/pages/profileOverview.ts"),qe=s("./src/reddit/actions/profileOverviewChrono.ts"),Ve=s("./src/reddit/actions/recommendations.ts"),He=s("./src/reddit/actions/search.ts"),Ke=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const We={};var Ye=(e=We,t)=>{switch(t.type){case _e.B:{const s=t.payload.awards.reduce((e,t)=>(e[t.id]=t,e),{});return Y()(Object.assign({},e),s)}case _e.e:{const s=t.payload.award;return s&&s.id?e[s.id]?Y()(Object.assign({},e),{[s.id]:s}):Object.assign({},e,{[s.id]:s}):e}case _e.k:{const s=t.payload.awardId;return e[s]?Object.assign({},e,{[s]:Object.assign({},e[s],{isEnabled:!1})}):e}case Ue.b:case oe.b:case Be.b:case Me.e:case Me.h:case Ge.b:case de.b:case de.e:case $e.e:case $e.b:case ue.e:case ue.b:case be.b:case oe.g:case oe.l:case be.b:case Fe.b:case ke.b:case Le.e:case Le.h:case we.b:case pe.e:case Ve.b:case Oe.i:case qe.b:case Ne.b:case xe.e:case He.c:case oe.q:{const s={},r=t.payload.posts;for(const e in r){const t=r[e].allAwardings||[];for(const e of t){e.count;const t=e.iconUrl,r=Ke(e,["count","iconUrl"]),n=Object.assign({},r,{icon:{url:t},awardType:r.awardType.toUpperCase()});s[e.id]=n}}return Object.assign({},e,s)}case ce.t:case Ue.b:case oe.b:case de.b:case de.e:case $e.b:case $e.e:case pe.b:case pe.e:case qe.b:case le.c:case le.e:{const s={},r=t.payload.comments;for(const e in r){const t=r[e].allAwardings||[];for(const e of t){e.count;const t=e.iconUrl,r=Ke(e,["count","iconUrl"]),n=Object.assign({},r,{icon:{url:t},awardType:r.awardType.toUpperCase()});s[e.id]=n}}return Object.assign({},e,s)}default:return e}},ze=Object(r.c)({create:Te,manageable:Pe,models:Ye});const Qe={};var Xe=(e=Qe,t)=>{switch(t.type){case u.e:case u.f:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:void 0})}case u.d:{var s=t.payload;const r=s.subredditId,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Je={};var Ze=(e=Je,t)=>{switch(t.type){case u.e:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!0})}case u.f:case u.d:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}},et=Object(r.c)({error:Xe,pending:Ze});const tt={};var st=(e=tt,t)=>{switch(t.type){case u.h:case u.i:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:void 0})}case u.g:{var s=t.payload;const r=s.subredditId,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const rt={};var nt=(e=rt,t)=>{switch(t.type){case u.h:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!0})}case u.i:case u.g:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}},at=Object(r.c)({error:st,pending:nt}),ct=Object(r.c)({subreddit:et,user:at});const it={};var ot=(e=it,t)=>{switch(t.type){case u.f:case u.i:case m.d:{const s=t.payload.badges;return Object.assign({},e,s)}default:return e}},dt=Object(r.c)({api:ct,models:ot});var ut=(e=null,t)=>{switch(t.type){case U.m:case U.l:return null;case U.k:return t.payload;default:return e}};const lt={};var bt=(e=lt,t)=>{switch(t.type){case U.m:{var s=t.payload;const r=s.subredditId,n=s.fetchedToken,a=Object(G.d)(r,n);return Object.assign({},e,{[a]:!0})}case U.l:case U.k:{var r=t.payload;const s=r.subredditId,n=r.fetchedToken,a=Object(G.d)(s,n);return Object.assign({},e,{[a]:!1})}default:return e}},pt=Object(r.c)({error:ut,pending:bt});const Ot={};var ft=(e=Ot,t)=>{switch(t.type){case U.l:{var s=t.payload;const r=s.fetchedToken,n=s.subredditId,a=Object(G.d)(n,r);return Object.assign({},e,{[a]:!0})}default:return e}},mt=s("./src/reddit/actions/inContextModeration.ts");var jt=(e=null,t)=>{switch(t.type){case mt.a:return t.payload;default:return e}};const gt={};var yt=(e=gt,t)=>{switch(t.type){case U.l:var s=t.payload;return{[s.subredditId]:s.after};default:return e}};const _t={};var Et=(e=_t,t)=>{switch(t.type){case U.j:case U.l:{var s=t.payload;const r={[s.subredditId]:s.bannedUsers};return Y()(Object.assign({},e),r)}case U.q:{var r=t.payload;const s=r.subredditId,n=r.userId,a=Object.assign({},e);return delete a[s][n],a}default:return e}};var ht=(e=null,t)=>{switch(t.type){case U.p:case U.o:return null;case U.n:return t.payload;default:return e}};var St=(e=!1,t)=>{switch(t.type){case U.p:return!0;case U.o:case U.n:return!1;default:return e}},Tt=Object(r.c)({error:ht,pending:St});var It=(e=null,t)=>{switch(t.type){case U.p:case U.n:return null;case U.o:{const e=t.payload.bannedUserIds[0];return e?t.payload.bannedUsers[e]:null}default:return e}},vt=Object(r.c)({api:Tt,result:It});const Ct={};var Rt=(e=Ct,t)=>{switch(t.type){case U.l:{var s=t.payload;const r=s.subredditId,n=s.bannedUserIds;return e[r]?Object.assign({},e,{[r]:[...e[r],...n]}):Object.assign({},e,{[r]:n})}case U.q:{var r=t.payload;const s=r.subredditId,n=r.userId;return{[s]:e[s].filter(e=>e!==n)}}case U.j:{var n=t.payload;const s=n.subredditId,r=n.bannedUserIds[0];return r&&e[s]&&-1===e[s].indexOf(r)?{[s]:[r,...e[s]]}:e}default:return e}},At=Object(r.c)({api:pt,fetchedTokens:ft,inContext:jt,loadMore:yt,models:Et,search:vt,userOrder:Rt}),Dt=s("./src/reddit/actions/userBlocks.ts");const Pt={};var xt=(e=Pt,t)=>{switch(t.type){case Dt.f:case Dt.e:{const s=t.payload.userId;return Object.assign({},e,{[s]:null})}case Dt.d:{var s=t.payload;const r=s.userId,n=s.type;return Object.assign({},e,{[r]:n})}default:return e}};const wt={};var Nt=(e=wt,t)=>{switch(t.type){case Dt.f:{const s=t.payload.userId;return Object.assign({},e,{[s]:!0})}case Dt.e:case Dt.d:{const s=t.payload.userId;return Object.assign({},e,{[s]:!1})}default:return e}},kt=Object(r.c)({error:xt,pending:Nt}),Lt=Object(r.c)({api:kt}),Ut=s("./src/reddit/actions/ad.ts");const Mt={isViewSafe:!0,hasBrandSafetyBeenAssessed:!1};var Gt=(e=Mt,t)=>{switch(t.type){case Ut.a:return Object.assign({},e,{isViewSafe:t.payload.isViewSafe,hasBrandSafetyBeenAssessed:!0});case be.c:case oe.m:case oe.h:return Object.assign({},e,{hasBrandSafetyBeenAssessed:!1});default:return e}},Ft=s("./src/reddit/actions/category.ts");var Bt=(e=null,t)=>{switch(t.type){case Ft.b:case Ft.c:return null;case Ft.a:return t.payload.error||null;default:return e}};var $t=(e=!1,t)=>{switch(t.type){case Ft.c:return!1;case Ft.b:return!0;default:return e}};var qt=(e=!1,t)=>{switch(t.type){case Ft.c:return!0;case Ft.b:case Ft.a:return!1;default:return e}},Vt=Object(r.c)({error:Bt,loaded:$t,pending:qt});const Ht={};var Kt=(e=Ht,t)=>{switch(t.type){case Ft.f:case Ft.e:{const s=t.payload.categoryId,r=Object.assign({},e);return delete r[s],r}case Ft.d:{var s=t.payload;const r=s.categoryId,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Wt={};var Yt=(e=Wt,t)=>{switch(t.type){case Ft.f:{const s=t.payload.categoryId;return Object.assign({},e,{[s]:!1})}case Ft.e:{const s=t.payload.categoryId;return Object.assign({},e,{[s]:!0})}default:return e}};const zt={};var Qt=(e=zt,t)=>{switch(t.type){case Ft.f:{const s=t.payload.categoryId;return Object.assign({},e,{[s]:!0})}case Ft.e:case Ft.d:{const s=t.payload.categoryId;return Object.assign({},e,{[s]:!1})}default:return e}},Xt=Object(r.c)({error:Kt,loaded:Yt,pending:Qt}),Jt=Object(r.c)({list:Vt,subreddits:Xt}),Zt=s("./node_modules/lodash/isEmpty.js"),es=s.n(Zt);const ts=[];var ss=(e=ts,t)=>{switch(t.type){case Ft.b:{const s=t.payload.categoryIds;return es()(s)?e:s}default:return e}};const rs={};var ns=(e=rs,t)=>{switch(t.type){case Ft.b:{const s=t.payload.categories;return es()(s)?e:Object.assign({},e,s)}default:return e}},as=s("./node_modules/lodash/forOwn.js"),cs=s.n(as),is=s("./src/reddit/helpers/name/index.ts");const os={};var ds=(e=os,t)=>{switch(t.type){case Ft.b:{const s=t.payload.categories;if(es()(s))return e;const r={};return cs()(s,e=>{r[Object(is.f)(e.name)]=e.id}),Object.assign({},e,r)}default:return e}},us=Object(r.c)({api:Jt,ids:ss,models:ns,nameToId:ds}),ls=s("./src/reddit/actions/chat/init.ts");var bs=(e=!1,t)=>{switch(t.type){case ls.a:return!0;default:return e}},ps=s("./src/reddit/actions/chat/sendbirdProxy.ts"),Os=s("./src/reddit/actions/chat/subredditChannel.ts");var fs=(e=!1,t)=>{switch(t.type){case Os.b:case Os.a:return!!t.payload.isUserSubredditChatEnabled;case ps.a:return t.payload.user_subreddit_chat_enabled;default:return e}},ms=s("./src/chat/actions/promo/constants.ts");const js={displaySubredditChatFtux:!1};var gs=(e=js,t)=>{switch(t.type){case ms.a:{const s=t.payload;return Object.assign({},e,{[s]:!0})}case ms.b:{const s=t.payload;return Object.assign({},e,{[s]:!1})}default:return e}},ys=s("./src/reddit/actions/chat/subredditSettings.ts");const _s={subredditId:null,bannedWords:"",domains:"",rateLimit:-1,regexes:[]};var Es=(e=_s,t)=>{switch(t.type){case ys.a:return Object.assign({},t.payload);default:return e}},hs=s("./src/reddit/actions/chat/unreadCount.ts");const Ss={apiError:null};var Ts=(e=Ss,t)=>{switch(t.type){case hs.a.REQUEST_FAILED:{const e=t.payload;return Object.assign({},Ss,{apiError:e})}case hs.a.REQUEST_SUCCESS:case hs.a.REQUEST_PENDING:return Ss;default:return e}};var Is=(e=!1,t)=>{switch(t.type){case hs.a.REQUEST_PENDING:return!0;case hs.a.REQUEST_FAILED:case hs.a.REQUEST_SUCCESS:return!1;default:return e}},vs=Object(r.c)({error:Ts,pending:Is});const Cs={basicChannelCount:0,subredditChannelCount:0};var Rs=(e=Cs,t)=>{switch(t.type){case hs.a.SYNC:case hs.a.REQUEST_SUCCESS:{const e=t.payload;return Object.assign({},e)}default:return e}},As=Object(r.c)({api:vs,count:Rs}),Ds=Object(r.c)({isInited:bs,isUserSubredditChatEnabled:fs,subredditSettings:Es,promos:gs,unread:As}),Ps=s("./src/reddit/actions/claimgold.ts");var xs=(e=null,t)=>{switch(t.type){case Ps.a:return t.payload.error&&t.payload.error.fields&&t.payload.error.fields[0]&&t.payload.error.fields[0].msg;case Ps.d:case Ps.e:case Ps.c:return null;default:return e}};var ws=(e=!1,t)=>{switch(t.type){case Ps.d:case Ps.c:case Ps.a:return!1;case Ps.b:return!0;default:return e}};var Ns=(e=!1,t)=>{switch(t.type){case Ps.b:case Ps.d:case Ps.c:case Ps.a:return!1;case Ps.f:return!0;default:return e}},ks=Object(r.c)({error:xs,pending:ws,showLoader:Ns});var Ls=(e="",t)=>{switch(t.type){case Ps.g:return t.payload;case Ps.e:return"";default:return e}};var Us=(e=!1,t)=>{switch(t.type){case Ps.e:return!0;case Ps.c:case Ps.d:return!1;default:return e}},Ms=Object(r.c)({api:ks,code:Ls,showModal:Us}),Gs=s("./node_modules/lodash/get.js"),Fs=s.n(Gs);const Bs={};var $s=(e=Bs,t)=>{switch(t.type){case ce.d:{var s=t.payload;const r=s.commentsPageKey,n=s.commentId;return Object.assign({},e,{[r]:Object.assign({},e[r],{[n]:!Fs()(e,[r,n],!1)})})}case ce.e:{var r=t.payload;const s=r.commentsPageKey,n=r.commentId;return Object.assign({},e,{[s]:Object.assign({},e[s],{[n]:!1})})}case ce.t:case Ue.b:case oe.b:{var n=t.payload;const s=n.key,r=n.shouldCollapse;if(!r)return e;const a=r.reduce((e,t)=>Object.assign({},e,{[t]:!0}),{});return Object.assign({},e,{[s]:Object.assign({},e[s],a)})}default:return e}},qs=s("./src/app/models/Draft.ts"),Vs=s("./src/lib/makeDraftKey/index.ts"),Hs=s("./src/reddit/models/PostCreationForm/index.ts");const Ks={};var Ws=(e=Ks,t)=>{switch(t.type){case ce.p:{const s=t.payload.draftKey;return Object.assign({},e,{[s]:Object.assign({},e[s],{autofocusDisabled:!0})})}case ce.j:{var s=t.payload;const r=s.draftKey,n=s.hasFocus;return e[r]?Object.assign({},e,{[r]:Object.assign({},e[r],{hasFocus:n})}):e}case oe.e:{const s=t.payload.draftKey;return Object.assign({},e,{[s]:{rteState:null,draftType:qs.a.replyToPost}})}case Ue.b:case Ue.c:case oe.d:{var r=t.payload;const s=r.postId,n=r.commentMode,a=Object(Vs.a)(qs.a.replyToPost,s);return Object.assign({},e,{[a]:{rteState:null,hasFocus:!1,commentMode:n,draftType:qs.a.replyToPost}})}case oe.b:{var n=t.payload;const s=n.postId,r=n.preferences;if(!r||!r.account)return e;const a=Object(Vs.a)(qs.a.replyToPost,s),c=r.account.useMarkdown?Hs.h.MARKDOWN:Hs.h.RICH_TEXT;return Object.assign({},e,{[a]:Object.assign({},e[a],{commentMode:c})})}case ce.l:var a=t.payload;const d=a.draftKey,u=a.content,l=a.editorMode;return e[d]?Object.assign({},e,{[d]:Object.assign({},e[d],{commentMode:l,rteState:null,text:l===Hs.h.MARKDOWN?u:null,rtJson:l===Hs.h.RICH_TEXT?u:null})}):e;case ce.q:case ce.o:{var c=t.payload;const s=c.draftKey,r=c.formData;return Object.assign({},e,{[s]:Object.assign({},r,{hasFocus:!0})})}case ce.k:{var i=t.payload;const s=i.draftKey,r=i.formData;return null===e[s]?e:Object.assign({},e,{[s]:Object.assign({},e[s],r)})}case ce.f:{const s=t.payload.draftKey,r=e[s];return r&&r.draftType===qs.a.replyToPost?Object.assign({},e,{[s]:Object.assign({},r,{rteState:null,text:""})}):Object.assign({},e,{[s]:null})}case ce.F:{const s=t.payload.draftKey,r=e[s];return Object.assign({},e,{[s]:Object.assign({},r,{rteState:null,text:""})})}case ce.E:case ce.A:{const s=t.payload.draftKey;return Object.assign({},e,{[s]:null})}case ce.D:{var o=t.payload;const s=o.draftKey,r=o.draft;return Object.assign({},e,{[s]:r})}default:return e}};const Ys={};var zs=(e=Ys,t)=>{switch(t.type){case ce.h:{const s=t.payload.commentListNodeId;return Object.assign({},e,{[s]:!0})}case ce.i:{const s=t.payload.commentListNodeId;return Object.assign({},e,{[s]:!e[s]})}default:return e}};const Qs={};var Xs=(e=Qs,t)=>{switch(t.type){case ce.c:{var s=t.payload;const r=s.commentListNodeIds,n=s.commentsPageKey,a=r.reduce((t,s)=>(t[s]=!Fs()(e,[n,s],!1),t),{});return Object.assign({},e,{[n]:Object.assign({},e[n],a)})}case ce.b:{var r=t.payload;const s=r.commentListNodeIds,n=r.commentsPageKey,a=s.reduce((e,t)=>(e[t]=!0,e),{});return Object.assign({},e,{[n]:Object.assign({},e[n],a)})}case ce.t:case Ue.b:case oe.b:{var n=t.payload;const s=n.key,r=n.shouldHide;if(!r)return e;const a=r.reduce((e,t)=>(e[t]=!0,e),{});return Object.assign({},e,{[s]:Object.assign({},e[s],a)})}default:return e}};const Js={};var Zs=(e=Js,t)=>{switch(t.type){case ce.q:{var s=t.payload;const r=s.commentId,n=s.commentsPageKey;return Object.assign({},e,{[n]:Object.assign({},e[n],{[r]:!0})})}case ce.g:case ce.y:case ce.A:{var r=t.payload;const s=r.commentId,n=r.commentsPageKey;return Object.assign({},e,{[n]:Object.assign({},e[n],{[s]:!1})})}default:return e}},er=s("./node_modules/lodash/isEqual.js"),tr=s.n(er),sr=s("./node_modules/lodash/mergeWith.js"),rr=s.n(sr),nr=s("./node_modules/lodash/omit.js"),ar=s.n(nr),cr=s("./src/reddit/actions/vote.ts"),ir=s("./src/reddit/helpers/isComment.ts"),or=s("./src/reddit/models/Comment/index.ts"),dr=s("./src/reddit/models/Gold/Gild/index.tsx"),ur=s("./src/reddit/models/ModQueue/index.ts"),lr=s("./src/reddit/models/Vote/index.ts"),br=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const pr={},Or=["next","prev","depth"],fr=e=>ar()(e,Or),mr=e=>{const t=e.allAwardings,s=br(e,["allAwardings"]);if(!t)return e;const r={};for(const n of t)r[n.id]=n.count;return Object.assign({},s,{awardCountsById:r})};var jr=(e=pr,t)=>{switch(t.type){case ce.E:case ce.F:{const s=t.payload.comment;return Object.assign({},e,{[s.id]:s})}case ce.t:case Ue.b:case oe.b:case de.b:case de.e:case $e.b:case $e.e:case pe.b:case pe.e:case qe.b:case le.c:case le.e:{const s=Object.assign({},e),r=(e=>t=>{for(let s=0;s<e.length;s++)t=e[s](t);return t})([fr,mr]);for(const n in t.payload.comments){const a=e[n],c=t.payload.comments[n];a?tr()(a,c)||(c.postAuthor||(c.postAuthor=a.postAuthor),c.postTitle||(c.postTitle=a.postTitle),s[n]=r(c)):s[n]=r(c)}return s}case ce.x:{const s=t.payload.id;return Object.assign({},e,{[s]:Object.assign({},e[s],{isDeleted:!0,deletedBy:or.a.User})})}case ce.m:{const s=t.payload;return rr()(Object.assign({},e),s,(e,t)=>Object.assign({},e,t))}case cr.a:{var s=t.payload;const r=s.id,n=s.vote,a=e[r];return a?Object.assign({},e,{[r]:Object(lr.c)(a,n)}):e}case _e.q:{var r=t.payload;const s=r.gildings,n=r.id,a=e[n];return a?Object.assign({},e,{[n]:Object(dr.c)(a,s)}):e}case U.l:{const s=t.payload.comments;return Object.assign({},e,s)}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{const s=t.payload.response.comments;return Object.assign({},e,s)}case ie.d:case ie.v:{var n=t.payload;const s=n.operation,r=n.ids,a=n.username,c=n.options,i=r.filter(e=>Object(ir.a)(e)),o=Object(ur.d)(e,s,i,a,c);return rr()(Object.assign({},e),o,(e,t)=>Object.assign({},e,t))}case oe.q:{const s=t.payload.comments;return Object.assign({},e,s)}default:return e}};const gr={};var yr=(e=gr,t)=>{switch(t.type){case ce.o:{var s=t.payload;const r=s.parentCommentId,n=s.commentsPageKey;return Object.assign({},e,{[n]:Object.assign({},e[n],{[r]:!0})})}case ce.n:case ce.E:{var r=t.payload;const s=r.parentCommentId,n=r.commentsPageKey;return Object.assign({},e,{[n]:Object.assign({},e[n],{[s]:!1})})}default:return e}};const _r={};var Er=(e=_r,t)=>{switch(t.type){case ce.n:case ce.D:case ce.z:case ce.F:case ce.E:case ce.A:{const s=t.payload.draftKey;return Object.assign({},e,{[s]:null})}case ce.C:case ce.y:{var s=t.payload;const r=s.draftKey,n=s.error;return Object.assign({},e,{[r]:n})}case ce.v:{var r=t.payload;const s=r.id,n=r.error;return Object.assign({},e,{[s]:n})}case ce.w:case ce.x:{const s=t.payload.id;return Object.assign({},e,{[s]:null})}default:return e}};const hr={};var Sr=(e=hr,t)=>{switch(t.type){case ce.D:case ce.z:{const s=t.payload.draftKey;return Object.assign({},e,{[s]:!0})}case ce.E:case ce.F:case ce.A:case ce.C:case ce.y:{const s=t.payload.draftKey;return Object.assign({},e,{[s]:!1})}case ce.w:{const s=t.payload.id;return Object.assign({},e,{[s]:!0})}case ce.x:case ce.v:{const s=t.payload.id;return Object.assign({},e,{[s]:!1})}default:return e}},Tr=Object(r.c)({error:Er,pending:Sr}),Ir=s("./src/reddit/reducers/comments/visitHighlightingFilter/index.ts"),vr=Object(r.c)({collapsed:$s,drafts:Ws,focused:zs,hidden:Xs,isEditing:Zs,models:jr,replyFormOpen:yr,submit:Tr,visitHighlightFilter:Ir.b});const Cr={};var Rr=(e=Cr,t)=>{switch(t.type){case Ue.d:case Ue.b:case oe.d:case oe.b:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case Ue.a:case oe.a:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n||{}})}default:return e}};const Ar={};var Dr=(e=Ar,t)=>{switch(t.type){case Ue.c:case oe.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}default:return e}};const Pr={};var xr=(e=Pr,t)=>{switch(t.type){case Ue.d:case oe.d:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case Ue.b:case Ue.a:case oe.b:case oe.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},wr=Object(r.c)({error:Rr,fullyLoaded:Dr,pending:xr}),Nr=s("./node_modules/lodash/mapValues.js"),kr=s.n(Nr),Lr=s("./src/reddit/helpers/commentList/index.ts");const Ur={};function Mr(e){const t=e;return kr()(t,({depth:e,next:t,prev:s})=>({depth:e,next:t,prev:s}))}var Gr=(e=Ur,t)=>{switch(t.type){case ce.t:{var s=t.payload;const r=s.comments,n=s.commentLists,a=s.continueThreads,c=s.key,i=s.moreCommentsItem,o=s.moreComments,d=n[i.postId],u=e[c],l={},b=u[i.id];if(b.prev){const e=b.prev.id;l[e]=Object.assign({},u[e],{next:d.head||b.next})}if(b.next){const e=b.next.id;l[e]=Object.assign({},u[e],{prev:d.tail||b.prev})}if(d.head&&d.tail){const e=Object(Lr.c)({commentLink:d.head,commentsDict:r,moreCommentsDict:o,continueThreadDict:a}),t=Object(Lr.c)({commentLink:d.tail,commentsDict:r,moreCommentsDict:o,continueThreadDict:a});e.prev=b.prev,t.next=b.next}return Object.assign({},e,{[c]:Object.assign({},e[c],Mr(r),Mr(a),Mr(o),l)})}case Ue.b:case oe.b:{var r=t.payload;const s=r.comments,n=r.continueThreads,a=r.key,c=r.moreComments;return Object.assign({},e,{[a]:Object.assign({},e[a],Mr(s),Mr(n),Mr(c))})}case ce.F:{var n=t.payload;const s=n.comment,r=n.commentsPageKey,a=n.headCommentId,c=e[r],i={};let o=null;return a&&(i[a]=Object.assign({},c[a],{prev:Object(or.e)(s.id)}),o=Object(or.e)(a)),Object.assign({},e,{[r]:Object.assign({},e[r],i,{[s.id]:{depth:0,next:o,prev:null}})})}case ce.E:{var a=t.payload;const s=a.comment,r=a.commentsPageKey,n=a.parentCommentId,c=a.depth,i=e[r],o={};let d=null;const u=i[n].next;return u&&(o[u.id]=Object.assign({},i[u.id],{prev:Object(or.e)(s.id)}),d=u),o[n]=Object.assign({},i[n],{next:Object(or.e)(s.id)}),Object.assign({},e,{[r]:Object.assign({},e[r],o,{[s.id]:{depth:c,next:d,prev:Object(or.e)(n)}})})}default:return e}};const Fr={};var Br=(e=Fr,t)=>{switch(t.type){case ce.F:{var s=t.payload;const r=s.comment,n=s.commentsPageKey;return Object.assign({},e,{[n]:r.id})}case Ue.b:case oe.b:{var r=t.payload;const s=r.commentLists,n=r.key,a=r.postId;return Object.assign({},e,{[n]:s[a]&&s[a].head?s[a].head.id:null})}default:return e}};const $r={};var qr=(e=$r,t)=>{switch(t.type){case Ue.d:case Ue.b:case Ue.c:case oe.d:{var s=t.payload;const r=s.key,n=s.postId;return Object.assign({},e,{[r]:n})}case ce.F:{var r=t.payload;const s=r.parentId,n=r.commentsPageKey;return e[n]?e:Object.assign({},e,{[n]:s})}default:return e}},Vr=Object(r.c)({api:wr,keyToCommentThreadLinkSets:Gr,keyToHeadCommentId:Br,keyToPostId:qr}),Hr=s("./src/reddit/actions/contentGate.ts");const Kr={};var Wr=(e=Kr,t)=>{switch(t.type){case Hr.a:{const s=t.payload.subredditName;if(s){if(e[s]){const t={[s]:{goldSubreddit:!0}};return rr()(Object.assign({},e),Object.assign({},t))}return Object.assign({},e,{[s]:{goldSubreddit:!0}})}return e}case Hr.b:{var s=t.payload;const r=s.subredditDescription,n=s.subredditName;if(n){if(e[n]){const t={[n]:{privateSubreddit:!0,subredditDescription:r}};return rr()(Object.assign({},e),Object.assign({},t))}return Object.assign({},e,{[n]:{privateSubreddit:!0,subredditDescription:r}})}return e}case Hr.c:{var r=t.payload;const s=r.subredditName,n=r.quarantineRequiresEmail,a=r.quarantineMessage,c=r.quarantineMessageHtml;return s?Object.assign({},e,{[s]:Object.assign({},e[s],{quarantinedSubreddit:!0,quarantineRequiresEmail:n,quarantineMessage:a,quarantineMessageHtml:c})}):e}case Hr.e:{var n=t.payload;const s=n.subredditName,r=n.banMessage;if(s){if(e[s]){const t={[s]:{subredditBanned:!0,subredditBanMessage:r}};return rr()(Object.assign({},e),Object.assign({},t))}return Object.assign({},e,{[s]:{subredditBanned:!0,subredditBanMessage:r}})}return e}case Hr.f:{const s=t.payload.subredditName;if(s){if(e[s]){const t={[s]:{subredditDoesNotExist:!0}};return rr()(Object.assign({},e),Object.assign({},t))}return Object.assign({},e,{[s]:{subredditDoesNotExist:!0}})}return e}default:return e}};const Yr={};var zr=(e=Yr,t)=>{switch(t.type){case ce.t:case Ue.b:case oe.b:return Object.assign({},e,t.payload.continueThreads);default:return e}},Qr=Object(r.c)({models:zr}),Xr=s("./src/reddit/actions/postCollection.ts");var Jr=(e=null,t)=>{switch(t.type){case c.c:case Xr.d:case Xr.c:case Xr.p:case Xr.o:return null;case Xr.b:case Xr.n:return t.payload;default:return e}};var Zr=(e=!1,t)=>{switch(t.type){case Xr.c:case Xr.o:return!0;case Xr.d:case Xr.b:case Xr.p:case Xr.n:return!1;default:return e}},en=Object(r.c)({error:Jr,pending:Zr}),tn=Object(r.c)({createOrUpdate:en}),sn=s("./src/reddit/actions/postDraft.ts");const rn={};var nn=(e=rn,t)=>{switch(t.type){case sn.c:case sn.b:{const s=t.payload.draftId;return Object.assign({},e,{[s]:null})}case sn.a:{var s=t.payload;const r=s.apiError,n=s.draftId;return Object.assign({},e,{[n]:r})}default:return e}};const an={};var cn=(e=an,t)=>{switch(t.type){case sn.b:{const s=t.payload.draftId;return Object.assign({},e,{[s]:!0})}case sn.c:case sn.a:{const s=t.payload.draftId;return Object.assign({},e,{[s]:!1})}default:return e}},on=Object(r.c)({error:nn,pending:cn});var dn=(e=null,t)=>{switch(t.type){case sn.d:return t.payload;case sn.f:case sn.e:return null;default:return e}};var un=(e=!1,t)=>{switch(t.type){case sn.f:return!0;case sn.e:case sn.d:return!1;default:return e}},ln=Object(r.c)({error:dn,pending:un});const bn={apiError:null,needsCaptcha:!1,validationError:null,submitValidationError:null};var pn=(e=bn,t)=>{switch(t.type){case sn.l:case sn.j:return bn;case sn.i:{const e=t.payload;return Object.assign({},bn,{apiError:e})}case sn.m:{const e=t.payload;return Object.assign({},bn,{validationError:e})}case sn.k:{const e=t.payload;return Object.assign({},bn,{submitValidationError:e})}case sn.h:return Object.assign({},bn,{needsCaptcha:!0});default:return e}};var On=(e=!1,t)=>{switch(t.type){case sn.j:return!0;case sn.l:case sn.i:case sn.m:case sn.k:case sn.h:return!1;default:return e}},fn=Object(r.c)({error:pn,pending:On}),mn=Object(r.c)({deleteDraft:on,listing:ln,save:fn});const jn={};var gn=(e=jn,t)=>{switch(t.type){case f.F:{const s=t.payload;return Object.assign({},e,{[s]:!0})}case f.q:{const s=t.payload;return Object.assign({},e,{[s]:!1})}default:return e}},yn=Object(r.c)({pending:gn});var _n=(e=null,t)=>{switch(t.type){case f.v:case f.w:case f.d:case f.e:case f.f:case f.j:case f.k:case f.o:case f.N:return null;case f.u:return t.payload;default:return e}};var En=(e=!1,t)=>{switch(t.type){case f.v:return!0;case f.w:case f.u:return!1;default:return e}},hn=Object(r.c)({error:_n,pending:En}),Sn=Object(r.c)({converting:yn,mediaUpload:hn});const Tn={};var In=(e=Tn,t)=>{switch(t.type){case Be.b:case Be.c:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case Be.a:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const vn={};var Cn=(e=vn,t)=>{switch(t.type){case Be.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}case Be.b:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}default:return e}};const Rn={};var An=(e=Rn,t)=>{switch(t.type){case Be.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case Be.b:case Be.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},Dn=Object(r.c)({error:In,fetched:Cn,pending:An});const Pn={apiError:null,needsCaptcha:!1,pollError:void 0,validationError:null,submitValidationError:null};var xn=(e=Pn,t)=>{switch(t.type){case f.O:case f.z:case f.d:case f.e:case f.f:case f.j:case f.k:case f.o:case f.N:case f.D:return Pn;case f.i:return t.payload.isContentChanged?Pn:e;case f.p:{const e=t.payload;return Object.assign({},Pn,{apiError:e})}case f.Y:{const e=t.payload;return Object.assign({},Pn,{validationError:e})}case f.I:{const e=t.payload;return Object.assign({},Pn,{submitValidationError:e})}case f.a:return Object.assign({},Pn,{needsCaptcha:!0});case f.B:return Object.assign({},Pn,{pollError:t.payload});default:return e}};var wn=(e=!1,t)=>{switch(t.type){case f.z:return!0;case f.O:case f.p:case f.Y:case f.I:case f.B:case f.a:return!1;default:return e}},Nn=Object(r.c)({error:xn,pending:wn});var kn=(e=null,t)=>{switch(t.type){case f.A:case f.G:return null;case f.n:return t.payload;default:return e}};var Ln=(e=!1,t)=>{switch(t.type){case f.A:return!0;case f.n:case f.m:return!1;default:return e}},Un=Object(r.c)({error:kn,pending:Ln}),Mn=Object(r.c)({submit:Nn,update:Un});var Gn=(e=null,t)=>{switch(t.type){case f.N:case f.L:case f.M:return null;default:return e}};var Fn=(e=!1,t)=>{switch(t.type){case f.M:return!0;case f.L:case f.N:return!1;default:return e}},Bn=Object(r.c)({error:Gn,pending:Fn}),$n=Object(r.c)({change:Bn}),qn=Object(r.c)({collection:tn,draft:mn,editor:Sn,page:Dn,post:Mn,subreddit:$n}),Vn=s("./src/reddit/actions/pages/postDraft.ts");const Hn={};var Kn=(e=Hn,t)=>{switch(t.type){case sn.e:return t.payload.postDrafts||Hn;case sn.c:{const s=e,r=t.payload.draftId;return ar()(s,r)}case f.O:{const s=t.payload.draftId;return s?ar()(e,s):e}case Vn.a:return t.payload.drafts;default:return e}},Wn=s("./src/lib/constants/index.ts");const Yn=e=>{if(e.payload&&e.payload.routeMatch)return e.payload.routeMatch.route.meta.name},zn=e=>{if(e.payload&&e.payload.routeMatch&&e.payload.routeMatch.match)return e.payload.routeMatch.match.queryParams};var Qn=s("./src/reddit/models/PostDraft/index.ts");var Xn=(e="",t)=>{switch(t.type){case f.d:return t.payload||"";case f.D:return"";case O.a:{if(Yn(t)!==Wn.Rb.POST_CREATION)return"";const s=zn(t);return s&&s.url?s.url||"":e}case sn.g:{const e=t.payload;return e.kind===Qn.b.Link&&e.body||""}default:return e}};var Jn=(e="",t)=>{switch(t.type){case f.e:return t.payload||"";case f.D:case f.H:return"";case f.P:return t.payload.editorMode===Hs.h.MARKDOWN?t.payload.content||"":e;case O.a:{if(Yn(t)!==Wn.Rb.POST_CREATION)return"";const s=zn(t);return s&&s.text?(e=>e?e.replace(/\+/g," "):"")(s.text):e}case sn.g:{const e=t.payload;return e.kind===Qn.b.Markdown&&e.body||""}default:return e}},Zn=s("./src/reddit/actions/upload.ts");var ea=(e=null,t)=>{switch(t.type){case f.f:return t.payload||null;case f.D:return null;case O.a:return Yn(t)!==Wn.Rb.POST_CREATION?null:e;case sn.g:return null;case Zn.a:case Zn.f:return t.payload.key===Hs.m?null:e;default:return e}},ta=s("./src/reddit/components/RichTextEditor/RTEState/index.tsx");const sa=ta.a.createInitial;var ra=(e=sa(),t)=>{switch(t.type){case f.i:return t.payload.rteState;case f.D:return ta.a.createInitial();case f.P:{const s=t.payload;return s.editorMode===Hs.h.RICH_TEXT&&s.editorKey===Hs.g.POST_CREATION?ta.a.createInitial(s.content):e}case O.a:return Yn(t)!==Wn.Rb.POST_CREATION?ta.a.createInitial():e;case sn.g:{const e=t.payload;return e.kind===Qn.b.RichText?ta.a.createInitial(e.body):ta.a.createInitial()}default:return e}},na=Object(r.c)({link:Xn,markdown:Jn,media:ea,rte:ra});var aa=(e=null,t)=>{switch(t.type){case f.b:return t.payload||null;case f.D:case sn.g:case f.N:return null;case O.a:return Yn(t)===Wn.Rb.POST_CREATION?e:null;default:return e}};var ca=(e=null,t)=>{switch(t.type){case f.c:return t.payload||null;case f.D:return null;case O.a:return Yn(t)===Wn.Rb.POST_CREATION?e:null;case sn.g:return t.payload.flair||null;default:return e}};var ia=(e=null,t)=>{switch(t.type){case f.r:return t.payload.type||null;case f.j:case f.D:case O.a:return null;default:return e}};var oa=(e=!1,t)=>{switch(t.type){case f.S:return t.payload||!1;case f.D:return!1;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;case sn.g:return t.payload.isNSFW||!1;default:return e}};var da=(e=!1,t)=>{switch(t.type){case f.T:return t.payload||!1;case f.D:return!1;case f.N:return!!t.payload.name&&e;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;case sn.g:return t.payload.isOriginalContent||!1;default:return e}};var ua=(e=!1,t)=>{switch(t.type){case f.U:return t.payload||!1;case f.D:return!1;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;default:return e}};var la=(e=!1,t)=>{switch(t.type){case f.D:return!1;case sn.n:return t.payload;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;case sn.g:return t.payload.isPublicLink;default:return e}};var ba=(e=!1,t)=>{switch(t.type){case f.V:return t.payload||!1;case f.D:return!1;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;case sn.g:return t.payload.isSpoiler||!1;default:return e}};var pa=(e="",t)=>{switch(t.type){case b.b:return t.payload.subredditName;case O.a:case f.j:case f.r:case f.D:case b.h:return"";default:return e}};var Oa=(e="",t)=>{switch(t.type){case b.c:return t.payload.username;case O.a:case f.j:case f.r:case f.D:case b.h:return"";default:return e}};var fa=(e=null,t)=>{switch(t.type){case f.M:case f.N:return t.payload;case f.L:case O.a:return null;default:return e}};var ma=(e=null,t)=>{switch(t.type){case f.g:return t.payload||null;case f.D:return null;case O.a:return Yn(t)===Wn.Rb.POST_CREATION?e:null;case sn.g:return t.payload.contentCategory||null;default:return e}},ja=s("./src/reddit/actions/polls.ts");var ga=(e=null,t)=>{switch(t.type){case ja.a:return Object.assign({},t.payload);case b.h:case f.D:return null;default:return e}};var ya=(e=!1,t)=>{const s=t.type,r=t.payload;switch(s){case f.W:return r||!1;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;case sn.g:return!1;default:return e}};var _a=(e="",t)=>{switch(t.type){case f.h:return t.payload||"";case O.a:return Yn(t)!==Wn.Rb.POST_CREATION?"":e;default:return e}};var Ea=(e=!0,t)=>{switch(t.type){case f.D:return!0;case f.X:return t.payload;case O.a:return Yn(t)!==Wn.Rb.POST_CREATION||e;case sn.g:return t.payload.sendReplies;default:return e}};const ha=Wn.hc.POST;var Sa=(e=ha,t)=>{switch(t.type){case f.D:return ha;case f.s:return Wn.hc.CROSSPOST;case f.j:return t.payload.submissionType||ha;case O.a:{if(Yn(t)!==Wn.Rb.POST_CREATION)return ha;const i=zn(t);if(!i)return e;var s=i.title;const o=void 0===s?"":s;var r=i.url;const d=void 0===r?"":r;var n=i.text;const u=void 0===n?"":n;var a=i.media;const l=void 0!==a&&a;var c=i.selftext;const b=void 0!==c&&c,p=o&&!u&&!b;return l?Wn.hc.MEDIA:d||p?Wn.hc.LINK_ONLY:u||b?Wn.hc.POST:e}case sn.g:{const e=t.payload;return Qn.a[e.kind]}default:return e}},Ta=s("./src/reddit/models/Poll/index.ts");const Ia=e=>`Should ${e||"username"} become the top moderator?`,va=e=>e?`Should we spin-off to r/${e}?`:"Should we spin-off to a new community?";var Ca=(e="",t)=>{switch(t.type){case f.s:return t.payload.postTitle||"";case f.k:return t.payload||"";case f.C:{const s=t.payload.title;return e||s||""}case f.D:return"";case O.a:{if(Yn(t)!==Wn.Rb.POST_CREATION)return"";const s=zn(t);return s&&s.title?(e=>e?e.replace(/\+/g," "):"")(s.title):e}case sn.g:return t.payload.title;case f.r:{var s=t.payload;const r=s.oldType,n=s.type;return n===Ta.a.ReplaceTopMod?Ia(""):n===Ta.a.Spinoff?va(""):r===Ta.a.ReplaceTopMod||r===Ta.a.Spinoff?"":e}case b.c:{const e=t.payload.username;return Ia(e)}case b.b:{const e=t.payload.subredditName;return va(e)}case f.j:{const s=t.payload.extra;return!s||s.govType!==Ta.a.ReplaceTopMod&&s.govType!==Ta.a.Spinoff?e:""}default:return e}},Ra=Object(r.c)({body:na,eventSchedule:aa,flair:ca,govType:ia,isNSFW:oa,isOC:da,isPoll:ua,isPublicLink:la,isSpoiler:ba,newSubreddit:pa,newTopMod:Oa,nextSubreddit:fa,ocCategory:ma,postToTwitter:ya,polls:ga,recaptcha:_a,sendReplies:Ea,submissionType:Sa,title:Ca});const Aa={title:null,body:null,link:null,flair:null};var Da=(e=Aa,t)=>{switch(t.type){case f.c:case f.d:case f.e:return e[Wn.vb.BODY]?Object.assign({},e,{[Wn.vb.BODY]:null}):e;case f.i:{const s=t.payload.isContentChanged;return e[Wn.vb.BODY]&&s?Object.assign({},e,{[Wn.vb.BODY]:null}):e}case f.k:return e[Wn.vb.TITLE]?Object.assign({},e,{[Wn.vb.TITLE]:null}):e;case f.J:{var s=t.payload;const r=s.field,n=s.msg;return Object.assign({},e,{[r]:n})}case f.K:{const s=t.payload;return Object.assign({},e,{[s]:null})}case f.o:{const s=t.payload;return s?Object.assign({},e,{[s]:null}):Aa}case f.I:{const s=t.payload;if(s&&s.fields&&s.fields.length){const t=s.fields[0],r=t.field,n=t.msg;return Object.assign({},e,{[r]:n})}return e}case O.a:return Yn(t)!==Wn.Rb.POST_CREATION?Aa:e;default:return e}};var Pa=(e=!1,t)=>{switch(t.type){case f.b:case f.c:case f.d:case f.e:case f.f:case f.g:case f.k:case f.j:case f.S:case f.T:case f.V:case sn.n:case f.X:return!0;case f.i:return!!t.payload.isContentChanged||e;case f.O:return!1;case f.Q:return t.payload;case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&e;case f.D:case sn.l:case sn.g:return!1;default:return e}};var xa=(e=null,t)=>{switch(t.type){case f.x:return e===t.payload?null:t.payload||null;case c.c:return t.payload?null:e;case O.a:return Yn(t)!==Wn.Rb.POST_CREATION?null:e;default:return e}},wa=s("./src/reddit/routes/postCreation/index.ts");var Na=(e=null,t)=>{const s=t.type,r=t.payload;switch(s){case f.y:return r;case f.M:return"";case O.a:return Yn(t)===Wn.Rb.POST_CREATION&&Object(wa.d)(t.payload.routeMatch.route.path)?e:null;default:return e}};const ka=Hs.q.Post;var La=(e=ka,t)=>{switch(t.type){case f.z:return Hs.q.Post;case f.E:return t.payload;case sn.j:return Hs.q.Draft;case O.a:return Yn(t)!==Wn.Rb.POST_CREATION?ka:e;default:return e}},Ua=Object(r.c)({fieldValidation:Da,isChanged:Pa,modalId:xa,ocCategory:Na,submitMode:La});var Ma=(e="",t)=>{switch(t.type){case f.G:return t.payload.editorMode===Hs.h.MARKDOWN?t.payload.postContent||"":e;case f.H:return"";case f.P:return t.payload.editorMode===Hs.h.MARKDOWN?t.payload.content||"":e;default:return e}};const Ga=ta.a.createInitial;var Fa=(e=Ga(),t)=>{switch(t.type){case f.H:return ta.a.createInitial();case f.G:{const s=t.payload;return s.editorMode===Hs.h.RICH_TEXT&&"object"==typeof s.postContent?ta.a.createInitial(s.postContent,s.mediaMetadata):e}case f.P:{const s=t.payload;return s.editorMode===Hs.h.RICH_TEXT&&s.editorKey===Hs.g.POST_EDITING?ta.a.createInitial(s.content):e}default:return e}},Ba=Object(r.c)({markdown:Ma,rte:Fa});const $a=Hs.h.RICH_TEXT;var qa=(e=$a,t)=>{switch(t.type){case f.G:return t.payload.editorMode;case f.H:return $a;case f.P:return t.payload.editorMode;default:return e}};var Va=(e=null,t)=>{switch(t.type){case f.G:return t.payload.postId;case f.H:return null;default:return e}},Ha=Object(r.c)({draft:Ba,editorMode:qa,postId:Va}),Ka=Object(r.c)({api:qn,drafts:Kn,formData:Ra,formState:Ua,postEditing:Ha}),Wa=s("./src/reddit/actions/dashboard.ts");const Ya={selectedComponent:null,subredditPending:!1,subredditLoaded:{}};var za=(e=Ya,t)=>{switch(t.type){case Wa.a:return Object.assign({},e,{selectedComponent:t.payload});case Wa.c:{const s=t.payload,r=e.subredditLoaded[s];return Object.assign({},e,{subredditPending:!r,subredditLoaded:Object.assign({},e.subredditLoaded,{[s]:r||!1})})}case Wa.b:{const s=t.payload;return Object.assign({},e,{subredditPending:!1,subredditLoaded:Object.assign({},e.subredditLoaded,{[s]:!0})})}default:return e}};var Qa=(e=null,t)=>{switch(t.type){case xe.b:case xe.c:return null;case xe.a:return t.payload.error||null;default:return e}};var Xa=(e=!1,t)=>{switch(t.type){case xe.c:return!1;case xe.b:return!0;default:return e}};var Ja=(e=!1,t)=>{switch(t.type){case xe.c:return!0;case xe.b:case xe.a:return!1;default:return e}},Za=Object(r.c)({error:Qa,loaded:Xa,pending:Ja}),ec=Object(r.c)({list:Za});const tc={};var sc=(e=tc,t)=>{switch(t.type){case xe.b:{const s=t.payload.discoveryUnits;return es()(s)?e:Object.assign({},e,s)}default:return e}};const rc={};var nc=(e=rc,t)=>{switch(t.type){case xe.b:{const s=t.payload.discoveryUnits;if(es()(s))return e;const r={};return cs()(s,e=>{r[Object(is.f)(e.unitName)]=e.id}),Object.assign({},e,r)}default:return e}},ac=Object(r.c)({api:ec,models:sc,nameToId:nc});var cc=(e=null,t)=>{switch(t.type){case l.a:return t.payload;case c.b:return null;default:return e}},ic=s("./src/reddit/reducers/economics/paymentSystems/index.ts"),oc=s("./src/reddit/actions/economics/tips/constants.ts");const dc={};var uc=(e=dc,t)=>{switch(t.type){case oc.a:{var s=t.payload;const r=s.subredditId,n=s.tipData,a=e[r]||{};return Object.assign({},e,{[r]:Object.assign({},a,n)})}case l.b:{var r=t.payload;const s=r.amount,n=r.contentId,a=r.subredditId,c=e[a]||{},i=c[n]||{},o=i.amounts||{usdr:{amount:"0"}},d=o.usdr,u=d.amount||"0",l=String(parseInt(u)+parseInt(s));return Object.assign({},e,{[a]:Object.assign({},c,{[n]:Object.assign({},i,{amounts:Object.assign({},o,{usdr:Object.assign({},d,{amount:l})})})})})}default:return e}},lc=Object(r.c)({currentPaymentTarget:cc,paymentSystems:ic.b,tipDetails:uc}),bc=s("./src/reddit/actions/emoji.ts"),pc=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const Oc={};var fc=(e=Oc,t)=>{switch(t.type){case bc.e:case bc.c:return e;case bc.f:return t.payload;case bc.d:{var s=t.payload;const r=s.emojiName,n=s.subredditId,a=e[n],c=r,i=(a[c],pc(a,["symbol"==typeof c?c:c+""]));return Object.assign({},e,{[n]:i})}case bc.g:{const s=t.payload,r=e[s.subredditId],n={url:s.url,name:s.name},a=Object.assign({},r,{[s.name]:n});return Object.assign({},e,{[s.subredditId]:a})}default:return e}},mc=s("./src/reddit/actions/externalAccount.ts");const jc={};var gc=(e=jc,t)=>{switch(t.type){case mc.e:case mc.f:{const s=t.payload.provider;return Object.assign({},e,{[s]:null})}case mc.d:{var s=t.payload;const r=s.provider,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const yc={};var _c=(e=yc,t)=>{switch(t.type){case mc.e:{const s=t.payload.provider;return Object.assign({},e,{[s]:!0})}case mc.f:case mc.d:{const s=t.payload.provider;return Object.assign({},e,{[s]:!1})}default:return e}},Ec=Object(r.c)({error:gc,pending:_c});const hc={};var Sc=(e=hc,t)=>{switch(t.type){case mc.l:case mc.k:{const s=t.payload.provider;return Object.assign({},e,{[s]:null})}case mc.j:{var s=t.payload;const r=s.provider,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Tc={};var Ic=(e=Tc,t)=>{switch(t.type){case mc.b:{const s=t.payload.provider;return Object.assign({},e,{[s]:!0})}case mc.c:case mc.a:{const s=t.payload.provider;return Object.assign({},e,{[s]:!1})}default:return e}},vc=Object(r.c)({error:Sc,pending:Ic});const Cc={};var Rc=(e=Cc,t)=>{switch(t.type){case mc.i:case mc.h:{const s=t.payload.subredditName;return Object.assign({},e,{[s]:null})}case mc.g:{var s=t.payload;const r=s.subredditName,n=s.apiError;return Object.assign({},e,{[r]:n})}default:return e}};const Ac={};var Dc=(e=Ac,t)=>{switch(t.type){case mc.h:{const s=t.payload.subredditName;return Object.assign({},e,{[s]:!0})}default:return e}};const Pc={};var xc=(e=Pc,t)=>{switch(t.type){case mc.i:{const s=t.payload.subredditName;return Object.assign({},e,{[s]:!0})}case mc.h:case mc.g:{const s=t.payload.subredditName;return Object.assign({},e,{[s]:!1})}default:return e}},wc=Object(r.c)({error:Rc,fetched:Dc,pending:xc});const Nc={};var kc=(e=Nc,t)=>{switch(t.type){case mc.l:case mc.k:{const s=t.payload.username;return Object.assign({},e,{[s]:null})}case mc.j:{var s=t.payload;const r=s.username,n=s.apiError;return Object.assign({},e,{[r]:n})}default:return e}};const Lc={};var Uc=(e=Lc,t)=>{switch(t.type){case mc.l:{const s=t.payload.username;return Object.assign({},e,{[s]:!0})}case mc.k:case mc.j:{const s=t.payload.username;return Object.assign({},e,{[s]:!1})}default:return e}},Mc=Object(r.c)({error:kc,pending:Uc}),Gc=Object(r.c)({connect:Ec,disconnect:vc,user:Mc,subreddit:wc});const Fc={};var Bc=(e=Fc,t)=>{switch(t.type){case mc.h:{var s=t.payload;const r=s.subredditName,n=s.accountsData;return Object.assign({},e,{[r]:n})}default:return e}};const $c={};var qc=(e=$c,t)=>{switch(t.type){case mc.k:{var s=t.payload;const r=s.username,n=s.accountsData;return Object.assign({},e,{[r]:n})}case mc.c:{var r=t.payload;const s=r.username,n=r.provider,a=e[s];return a&&a[n]?Object.assign({},e,{[s]:ar()(a,n)}):e}default:return e}},Vc=Object(r.c)({api:Gc,user:qc,subreddit:Bc}),Hc=s("./src/reddit/featureFlags/index.ts"),Kc=s("./src/lib/truthyString/index.ts");const Wc=Hc.a.reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),Yc=Hc.a.reduce((e,t)=>(e[t]=null,e),{});var zc=(e=Yc,t)=>{switch(t.type){case O.a:{const s=zn(t);if(void 0!==s){const t={};for(const e in s){const r=Object(Hc.g)(e);if(r){const n=Wc[r.toLowerCase()];if(n){const r=s[e],a="string"!=typeof r||Object(Kc.a)(r);t[n]=a}}}if(Object.keys(t).length>0)return Object.assign({},e,t)}return e}case Hc.b:{var s=t.payload;const r=s.featureName,n=s.currentValue;return n===e[r]?e:Object.assign({},e,{[r]:n})}case Hc.c:{var r=t.payload;const s=r.featureName,n=r.currentValue;return Object.assign({},e,{[s]:!n})}default:return e}},Qc=Object(r.c)({overrides:zc}),Xc=s("./src/lib/makeActionCreator/index.ts");Object(Xc.a)("FONTS_FONT_FILES_PARSED");const Jc=[];var Zc=(e=Jc,t)=>{switch(t.type){case"FONTS_FONT_FILES_PARSED":return t.payload.fonts;default:return e}};var ei=(e=null,t)=>{switch(t.type){case _e.l:return t.payload.error&&t.payload.error.fields&&t.payload.error.fields[0]&&t.payload.error.fields[0].msg||"An unknown error occurred";case _e.a:case O.a:case _e.E:case _e.q:return null;default:return e}};var ti=(e=!1,t)=>{switch(t.type){case _e.a:case O.a:case _e.q:case _e.l:return!1;case _e.m:return!0;default:return e}};var si=(e=!1,t)=>{switch(t.type){case _e.m:case _e.a:case O.a:case _e.q:case _e.l:return!1;case _e.r:return!0;default:return e}},ri=Object(r.c)({error:ei,pending:ti,showLoader:si});var ni=(e=null,t)=>{switch(t.type){case _e.D:case _e.E:return t.payload;case _e.q:case O.a:case _e.a:return null;default:return e}};const ai=dr.b.Gid2;var ci=(e=ai,t)=>{switch(t.type){case _e.n:return t.payload;case _e.E:return ai;default:return e}};var ii=(e=!1,t)=>{switch(t.type){case _e.o:return t.payload;case _e.E:return!1;default:return e}};var oi=(e=!0,t)=>{switch(t.type){case _e.p:return t.payload;case _e.E:return!0;default:return e}};var di=(e=!1,t)=>{switch(t.type){case _e.D:return!0;default:return e}};var ui=(e="",t)=>{switch(t.type){case _e.s:return t.payload;case _e.E:return"";default:return e}};const li=s("./src/reddit/models/Gold/Award.ts").b;var bi=(e=li,t)=>{switch(t.type){case _e.G:return t.payload;case _e.E:return li;default:return e}},pi=Object(r.c)({api:ri,gildModalThingId:ni,gildType:ci,includeMessage:ii,isAnonymous:oi,isIframed:di,message:ui,selectedAward:bi});var Oi=(e=null,t)=>{switch(t.type){case _e.t:return t.payload.error&&t.payload.error.fields&&t.payload.error.fields[0]&&t.payload.error.fields[0].msg||"An unknown error occurred";case _e.b:case O.a:case _e.F:case _e.y:return null;default:return e}};var fi=(e=!1,t)=>{switch(t.type){case _e.b:case O.a:case _e.y:case _e.t:return!1;case _e.u:return!0;default:return e}},mi=Object(r.c)({error:Oi,pending:fi});var ji=(e="",t)=>{switch(t.type){case _e.F:return t.payload;case O.a:case _e.b:case _e.y:return"";default:return e}},gi=Object(r.c)({api:mi,givePremiumModalAccountName:ji}),yi=s("./src/reddit/actions/goldPurchaseModals/coinPurchaseModal.ts"),_i=s("./src/reddit/actions/goldPurchaseModals/constants.ts");var Ei=(e="selectPayment",t)=>{switch(t.type){case yi.b:return"selectPayment";case _i.f:return"paymentCompleted";default:return e}};var hi=(e=null,t)=>{switch(t.type){case yi.a:case _e.a:case _e.q:return null;case yi.c:return t.payload&&t.payload.thingId?t.payload.thingId:e;default:return e}};var Si=(e=null,t)=>{switch(t.type){case yi.b:return t.payload.coinPackage;case _i.f:case yi.a:return null;default:return e}};var Ti=(e=!1,t)=>{switch(t.type){case yi.b:return!0;case _e.E:case O.a:case yi.a:return!1;default:return e}},Ii=Object(r.c)({activePage:Ei,gildThingId:hi,purchasePackage:Si,showModal:Ti}),vi=s("./src/reddit/actions/goldPurchaseModals/premiumPurchaseModal.ts");var Ci=(e="",t)=>{switch(t.type){case _i.b:return t.payload.cardName;case _i.i:return t.payload!==Wn.Lb?"":e;case yi.a:case vi.a:case _i.c:case O.a:return"";default:return e}};var Ri=(e="",t)=>{switch(t.type){case _i.l:{var s=t.payload;const r=s.error;return"cardCvc"===s.elementType?r&&r.message||"":e}case _i.i:return t.payload!==Wn.Lb?"":e;case yi.a:case vi.a:case _i.c:case O.a:return"";default:return e}};var Ai=(e="",t)=>{switch(t.type){case _i.l:{var s=t.payload;const r=s.error;return"cardExpiry"===s.elementType?r&&r.message||"":e}case _i.i:return t.payload!==Wn.Lb?"":e;case yi.a:case vi.a:case _i.c:case O.a:return"";default:return e}};var Di=(e="",t)=>{switch(t.type){case _i.l:{var s=t.payload;const r=s.error;return"cardNumber"===s.elementType?r&&r.message||"":e}case _i.i:return t.payload!==Wn.Lb?"":e;case yi.a:case vi.a:case _i.c:case O.a:return"";default:return e}};var Pi=(e="",t)=>{switch(t.type){case _i.a:return t.payload.message||e;case _i.b:return"";case _i.i:return t.payload!==Wn.Lb?"":e;case yi.a:case vi.a:case _i.c:case O.a:return"";default:return e}};var xi=(e="",t)=>{switch(t.type){case _i.l:{var s=t.payload;const r=s.error;return"postalCode"===s.elementType?r&&r.message||"":e}case _i.i:return t.payload!==Wn.Lb?"":e;case yi.a:case vi.a:case _i.c:case O.a:return"";default:return e}},wi=Object(r.c)({cardCvc:Ri,cardExpiry:Ai,cardNumber:Di,nameOnCard:Pi,postalCode:xi});const Ni=Wn.Mb;var ki=(e=Ni,t)=>{switch(t.type){case yi.b:case vi.b:return Ni;case _i.i:return t.payload;default:return e}};var Li=(e=null,t)=>{switch(t.type){case _i.g:return t.payload||e;case _i.i:return t.payload.method===Wn.Mb?null:e;case yi.b:case vi.b:case _e.E:return null;default:return e}};var Ui=(e="",t)=>{switch(t.type){case yi.b:case vi.b:return"";case yi.d:case vi.c:{const e=t.payload;return e.body&&e.body.passthrough?e.body.passthrough:""}default:return e}},Mi=Object(r.c)({errorMessage:Li,passthrough:Ui});var Gi=(e=!0,t)=>{switch(t.type){case _i.o:return!e;case _i.i:return t.payload!==Wn.Lb||e;case yi.a:case vi.a:case O.a:return!0;default:return e}};const Fi=[];var Bi=(e=Fi,t)=>{switch(t.type){case _i.e:return t.payload;case _i.d:{const s=t.payload;return e.filter(e=>e.cardId!==s)}default:return e}};var $i=(e=!1,t)=>{switch(t.type){case _i.h:return!0;case _i.e:return!1;default:return e}};var qi=(e=null,t)=>{switch(t.type){case _i.a:case _i.m:return t.payload.message||e;case _i.k:return t.payload;case _i.l:case _i.b:case _i.n:return null;case _i.i:return t.payload===Wn.Lb?null:e;default:return e}};var Vi=(e=!1,t)=>{switch(t.type){case _i.a:case _i.k:case _i.m:return!1;case _i.i:return t.payload!==Wn.Lb&&e;case _i.n:return!0;default:return e}},Hi=Object(r.c)({errorMessage:qi,pending:Vi});var Ki=(e=null,t)=>{switch(t.type){case _i.j:return t.payload;case _i.d:return t.payload===e?null:e;default:return e}},Wi=Object(r.c)({cardName:Ci,cardValidation:wi,paymentMethod:ki,paypal:Mi,rememberCard:Gi,savedCards:Bi,savedCardsPending:$i,stripeToken:Hi,useSavedCard:Ki});var Yi=(e="selectPayment",t)=>{switch(t.type){case vi.b:return"selectPayment";case _i.f:return"paymentCompleted";default:return e}};var zi=(e=!1,t)=>{switch(t.type){case vi.b:return!0;case O.a:case vi.a:return!1;default:return e}},Qi=Object(r.c)({activePage:Yi,showModal:zi});var Xi=(e=!1,t)=>{switch(t.type){case _i.p:case _i.r:return!1;case _i.q:return!0;default:return e}},Ji=Object(r.c)({pending:Xi}),Zi=Object(r.c)({coinPurchaseModal:Ii,payment:Wi,premiumPurchaseModal:Qi,updateCardModal:Ji}),eo=s("./src/app/actions/overlayEvents.ts"),to=s("./src/reddit/actions/header.ts");var so=(e=!1,t)=>{switch(t.type){case to.a:return!1;case to.b:return!0;case to.c:return!e;case eo.b:return!1;default:return e}},ro=Object(r.c)({isSubscriptionsDropdownOpen:so}),no=s("./src/reddit/actions/imageUploads.ts");const ao={};var co=(e=ao,t)=>{switch(t.type){case no.d:{const s=t.payload;return Object.assign({},e,{[s.id]:s})}case no.c:case no.e:case no.b:{const s=t.payload;return e[s.id]?Object.assign({},e,{[s.id]:s}):e}case no.a:{const s=t.payload;if(!e[s.id])return e;const r=Object.assign({},e);return delete r[s.id],r}default:return e}},io=s("./src/reddit/actions/moderatingSubreddits.ts");var oo=(e=!1,t)=>{switch(t.type){case io.a:{if(e)return e;const s=t.payload;return Object.keys(s).some(e=>!0===s[e].posts)}case be.b:case Ue.b:case oe.b:case Be.b:{if(e)return e;const s=t.payload;return s.subredditPermissions&&s.subreddits?s.subredditPermissions.posts:e}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{if(e)return e;const s=t.payload.response,r=s.moderatingSubreddits,n=s.moderatingProfiles;let a=Object.keys(r).some(e=>!0===r[e].posts);return a||(a=Object.keys(n).some(e=>!0===r[e].posts)),a}default:return e}},uo=s("./src/reddit/actions/jsApi.ts");const lo=[];var bo=(e=lo,t)=>{switch(t.type){case uo.a:{const s=t.payload;return-1===e.indexOf(s)&&(e=[...e,s]).sort(),e}default:return e}},po=s("./src/reddit/actions/leaderboard/constants.ts"),Oo=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const fo={};var mo=(e=fo,t)=>{switch(t.type){case po.b:{var s=t.payload;const r=s.key,n=s.data;return Object.assign({},e,{[r]:n})}case po.c:case po.d:{const s=t.payload.key;return e[s],Oo(e,["symbol"==typeof s?s:s+""])}default:return e}},jo=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const go={};var yo=(e=go,t)=>{switch(t.type){case po.b:case po.d:{const s=t.payload.key;return e[s],jo(e,["symbol"==typeof s?s:s+""])}case po.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}default:return e}},_o=Object(r.c)({error:mo,pending:yo});const Eo={};var ho=(e=Eo,t)=>{switch(t.type){case po.a:{var s=t.payload;const r=s.dateRange,n=s.subredditId;return Object.assign({},e,{[n]:r})}default:return e}};const So={};var To=(e=So,t)=>{switch(t.type){case po.d:{var s=t.payload;const r=s.key,n=s.data;return Object.assign({},e,{[r]:n})}default:return e}},Io=Object(r.c)({api:_o,dateRangeSelection:ho,models:To});var vo=(e="",t)=>{switch(t.type){case O.a:return t.payload.listingKey||e;default:return e}},Co=s("./src/reddit/actions/pages/explore.ts");const Ro={};var Ao=(e=Ro,t)=>{switch(t.type){case He.b:case He.c:case oe.p:case oe.q:{var s=t.payload;const r=s.key,n=s.type;return-1===n.indexOf(Wn.kc.Subreddits)&&-1===n.indexOf(Wn.kc.Users)?e:Object.assign({},e,{[r]:null})}case He.a:case oe.o:{var r=t.payload;const s=r.key,n=r.error,a=r.type;return-1===a.indexOf(Wn.kc.Subreddits)&&-1===a.indexOf(Wn.kc.Users)?e:Object.assign({},e,{[s]:n})}case xe.f:case xe.e:case Co.c:case Co.b:case Oe.l:case Oe.m:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case xe.d:case Co.a:case Oe.k:{var n=t.payload;const s=n.key,r=n.error;return Object.assign({},e,{[s]:r})}default:return e}};const Do={};var Po=(e=Do,t)=>{switch(t.type){case He.b:case oe.p:{var s=t.payload;const r=s.key,n=s.type;return-1===n.indexOf(Wn.kc.Subreddits)&&-1===n.indexOf(Wn.kc.Users)?e:Object.assign({},e,{[r]:!0})}case He.c:case He.a:case oe.q:case oe.o:{var r=t.payload;const s=r.key,n=r.type;return-1===n.indexOf(Wn.kc.Subreddits)&&-1===n.indexOf(Wn.kc.Users)?e:Object.assign({},e,{[s]:!1})}case xe.f:case Co.c:case Oe.l:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case xe.e:case xe.d:case Co.b:case Co.a:case Oe.m:case Oe.k:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},xo=Object(r.c)({error:Ao,pending:Po});const wo={};var No=(e=wo,t)=>{switch(t.type){case He.c:{var s=t.payload;const r=s.fetchedToken,n=s.key,a=s.type;if(-1===a.indexOf(Wn.kc.Subreddits)&&-1===a.indexOf(Wn.kc.Users))return e;const c=e[n];return Object.assign({},e,{[n]:Object.assign({},c,{[r]:!0})})}case xe.e:case Co.b:case Oe.m:{var r=t.payload;const s=r.fetchedToken,n=r.key;return Object.assign({},e,{[n]:Object.assign({},e[n],{[s]:!0})})}default:return e}};const ko={};var Lo=(e=ko,t)=>{switch(t.type){case He.c:{var s=t.payload;const r=s.key,n=s.listingOrder,a=s.type;return-1===a.indexOf(Wn.kc.Subreddits)&&-1===a.indexOf(Wn.kc.Users)?e:Object.assign({},e,{[r]:e[r].concat(n)})}case oe.q:{var r=t.payload;const s=r.key,n=r.listingOrder,a=r.type;return-1===a.indexOf(Wn.kc.Subreddits)&&-1===a.indexOf(Wn.kc.Users)?e:Object.assign({},e,{[s]:n})}default:return e}};const Uo={};var Mo=(e=Uo,t)=>{switch(t.type){case Co.b:{var s=t.payload;const r=s.key,n=s.ids;return n&&0!==n.length?Object.assign({},e,{[r]:[...e[r]||[],...n]}):e}default:return e}},Go=s("./src/lib/omitKey/index.ts");const Fo={};var Bo=(e=Fo,t)=>{switch(t.type){case He.c:case oe.q:{var s=t.payload;const r=s.key,n=s.tokens,a=s.type;return-1===a.indexOf(Wn.kc.Subreddits)&&-1===a.indexOf(Wn.kc.Users)?e:n.listings?Object.assign({},e,{[r]:{token:n.listings}}):Object(Go.a)(e,r)}case xe.e:case Co.b:case Oe.m:{var r=t.payload;const s=r.key,n=r.token;return Object.assign({},e,{[s]:{token:n}})}default:return e}},$o=Object(r.c)({api:xo,identifiers:Lo,ids:Mo,fetchedTokens:No,loadMore:Bo});const qo={};var Vo=(e=qo,t)=>{switch(t.type){case Ne.b:case Ne.c:case Ge.b:case Ge.c:case Fe.c:case Fe.b:case oe.h:case oe.g:case oe.m:case oe.l:case be.c:case be.b:case we.c:case we.b:case Me.e:case Me.f:case Me.i:case Me.h:case ke.c:case ke.b:case Le.f:case Le.e:case ue.f:case ue.e:case ue.c:case ue.b:case pe.f:case pe.e:case $e.f:case $e.e:case Oe.j:case Oe.i:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case oe.p:case oe.q:case He.b:case He.c:{var s=t.payload;const r=s.key;return-1===s.type.indexOf(Wn.kc.Posts)?e:Object.assign({},e,{[r]:null})}case Ne.a:case Ge.a:case oe.f:case oe.k:case be.a:case we.a:case Me.g:case ke.a:case Le.d:case Oe.h:case pe.d:case $e.d:case ue.d:case ue.a:{var r=t.payload;const s=r.key,n=r.error;return Object.assign({},e,{[s]:n})}case oe.o:case He.a:{var n=t.payload;const s=n.error,r=n.key;return-1===n.type.indexOf(Wn.kc.Posts)?e:Object.assign({},e,{[r]:s})}default:return e}};const Ho={};var Ko=(e=Ho,t)=>{switch(t.type){case Ge.c:case Fe.c:case oe.h:case oe.m:case ue.f:case $e.f:case be.c:case we.c:case Me.f:case Me.i:case ke.c:case Le.f:case pe.f:case ue.c:case Oe.j:case Ne.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case oe.p:case He.b:{var s=t.payload;const r=s.key;return-1===s.type.indexOf(Wn.kc.Posts)?e:Object.assign({},e,{[r]:!0})}case Fe.b:case oe.g:case oe.f:case oe.k:case oe.l:case $e.d:case $e.e:case ue.d:case ue.e:case be.b:case be.a:case we.b:case we.a:case Me.e:case Me.d:case Me.h:case Me.g:case ke.b:case ke.a:case Ge.b:case Ge.a:case Le.e:case Le.d:case pe.d:case pe.e:case ue.a:case ue.b:case Oe.i:case Oe.h:case Ne.b:case Ne.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}case oe.q:case oe.o:case He.c:case He.a:{var r=t.payload;const s=r.key;return-1===r.type.indexOf(Wn.kc.Posts)?e:Object.assign({},e,{[s]:!1})}default:return e}},Wo=Object(r.c)({error:Vo,pending:Ko}),Yo=s("./src/reddit/actions/postList.ts");const zo={};var Qo=(e=zo,t)=>{switch(t.type){case Yo.a:{var s=t.payload;const r=s.listingKey,n=s.listingName;return Object.assign({},e,{[r]:n})}case Yo.b:{const s=t.payload.listingKey;return s in e?ar()(e,[s]):e}default:return e}};const Xo={};var Jo=(e=Xo,t)=>{switch(t.type){case Me.e:case Ge.b:case oe.g:case oe.l:case be.b:case ue.e:case Fe.b:case Ne.b:{const s=t.payload.key;return Object.assign({},e,{[s]:{}})}case we.b:case Me.h:case ke.b:case Le.e:case pe.e:case ue.b:case Oe.i:{var s=t.payload;const r=s.key,n=s.fetchedToken,a=e[r];return Object.assign({},e,{[r]:Object.assign({},a,{[n]:!0})})}case He.c:{var r=t.payload;const s=r.fetchedToken,n=r.key;if(r.type.indexOf(Wn.kc.Posts)>-1){const t=e[n];return Object.assign({},e,{[n]:Object.assign({},t,{[s]:!0})})}return e}default:return e}};const Zo={};var ed=(e=Zo,t)=>{switch(t.type){case oe.h:case Me.f:case oe.m:case ue.f:case be.c:case $e.f:case ue.f:{const s=t.payload.key;return Object.assign({},e,{[s]:[]})}case xe.e:case Me.e:case Ge.b:case Fe.b:case oe.g:case oe.l:case be.b:case $e.e:case ue.e:case Ve.b:case Ne.b:{var s=t.payload;const r=s.key,n=s.postIds;return Object.assign({},e,{[r]:n})}case we.b:case Me.h:case ke.b:case Le.e:case ue.b:case pe.e:case Oe.i:{var r=t.payload;const s=r.key,n=r.postIds;return Object.assign({},e,{[s]:e[s].concat(n)})}case oe.q:{var n=t.payload;const s=n.key,r=n.postOrder;return-1===n.type.indexOf(Wn.kc.Posts)?e:Object.assign({},e,{[s]:r})}case He.c:{var a=t.payload;const s=a.key,r=a.postOrder;return-1===a.type.indexOf(Wn.kc.Posts)?e:Object.assign({},e,{[s]:e[s].concat(r)})}case E.i:{var c=t.payload;const s=c.newStickiedPostList,r=c.listingKey;if(!e[r])return e;const n=[...e[r]].filter(e=>!s.includes(e));return n.unshift(...s),Object.assign({},e,{[r]:n})}default:return e}},td=s("./src/lib/makeListingKey/index.ts"),sd=s("./src/reddit/actions/preferences.ts");const rd={};var nd=(e=rd,t)=>{switch(t.type){case be.b:{var s=t.payload;const r=s.key,n=s.listingSort;return n&&!Object(td.b)(r)?Object.assign({},e,{[r]:{sort:n,hasChanged:!1}}):e}case sd.a:case sd.o:{const t={};return Object.keys(e).forEach(s=>{t[s]=Object.assign({},e[s],{hasChanged:!0})}),t}default:return e}};const ad={};var cd=(e=ad,t)=>{switch(t.type){case oe.g:case oe.l:case be.b:case $e.e:case ue.e:case Fe.b:case we.b:case Me.e:case Me.h:case ke.b:case Le.e:case pe.e:case ue.b:case Oe.i:{var s=t.payload;const r=s.key,n=s.token,a=s.dist;return n?Object.assign({},e,{[r]:{token:n,dist:a}}):Object(Go.a)(e,r)}case He.c:case oe.q:{var r=t.payload;const s=r.key,n=r.tokens;return-1===r.type.indexOf(Wn.kc.Posts)?e:n.posts?Object.assign({},e,{[s]:{token:n.posts}}):Object(Go.a)(e,s)}default:return e}},id=Object(r.c)({api:Wo,endMarkers:Qo,fetchedTokens:Jo,ids:ed,listingSort:nd,loadMore:cd}),od=Object(r.c)({activeKey:vo,listingOrder:$o,postOrder:id});var dd=(e=null,t)=>{switch(t.type){case oe.g:return es()(t.payload.featuredLiveThread)?e:t.payload.featuredLiveThread;default:return e}};var ud=(e=!1,t)=>{switch(t.type){case oe.g:return!0;default:return e}},ld=Object(r.c)({featured:dd,isFrontpageLoaded:ud}),bd=s("./src/reddit/reducers/mediaPlayback/index.ts");const pd={};var Od=(e=pd,t)=>{switch(t.type){case be.b:case Ue.b:case oe.b:case Be.b:{const s=t.payload;if(!s.subredditPermissions||!s.subreddits)return e;const r=Object.keys(s.subredditAboutInfo||{});if(1!==r.length)return e;const n=r[0];return Object.assign({},e,{[n]:s.subredditPermissions})}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{const s=t.payload.response,r=s.moderatingSubreddits,n=s.moderatingProfiles;return Object.assign({},e,r,n)}case Oe.f:case Me.e:case ie.n:{const s=t.payload,r=s.moderatingSubreddits,n=s.moderatingProfiles;return Object.assign({},e,r,n)}case U.R:{const s=t.payload.subredditId;return Object(Go.a)(e,s)}case U.O:{const s=t.payload;return Object.assign({},e,s)}default:return e}},fd=s("./src/reddit/actions/moderationLog/constants.ts");const md={};var jd=(e=md,t)=>{switch(t.type){case fd.b:{var s=t.payload;const r=s.actionIds,n=s.key,a=s.subredditId;return Object.assign({},e,{[a]:Object.assign({},e[a]||{},{[n]:r})})}default:return e}};const gd={};var yd=(e=gd,t)=>{switch(t.type){case fd.b:{var s=t.payload;const r=s.normalizedModerationLog,n=s.subredditId,a={};r.forEach(e=>{a[e.id]=e});const c={[n]:a};return Y()(Object.assign({},e),c)}default:return e}},_d=Object(r.c)({itemOrder:jd,models:yd});var Ed=(e=null,t)=>{switch(t.type){case fd.b:return t.payload.endCursor;default:return e}};const hd={};var Sd=(e=hd,t)=>{switch(t.type){case fd.b:{var s=t.payload;const r=s.hasNextPage,n=s.subredditId;return Object.assign({},e,{[n]:r})}default:return e}};const Td={};var Id=(e=Td,t)=>{switch(t.type){case fd.b:{var s=t.payload;const r=s.hasPreviousPage,n=s.subredditId;return Object.assign({},e,{[n]:r})}default:return e}};const vd=[];var Cd=(e=vd,t)=>{switch(t.type){case fd.a:{var s=t.payload;const r=s.normalizedModerators,n=s.subredditId;return Object.assign({},e,{[n]:r})}default:return e}};var Rd=(e=null,t)=>{switch(t.type){case fd.b:return t.payload.startCursor;default:return e}},Ad=Object(r.c)({actions:_d,endCursor:Ed,hasNextPage:Sd,hasPreviousPage:Id,moderators:Cd,startCursor:Rd});const Dd={};var Pd=(e=Dd,t)=>{switch(t.type){case U.s:{const s=t.payload.response,r={[s.subredditId]:s.moderators};return Y()(Object.assign({},e),r)}case U.u:{var s=t.payload;const r=s.subredditId,n=s.userId,a=s.permissions,c=Object.assign({},e);return c[r][n].modPermissions=a,Y()(Object.assign({},e),Object.assign({},c))}case U.Q:{var r=t.payload;const s=r.subredditId,n=r.userId,a=Object.assign({},e);return delete a[s][n],a}case U.E:{const s=t.payload,r=s.moderators,n=s.subredditId,a=n in e?e[n]:{};return Object.assign({},e,{[n]:Object.assign({},a,r)})}default:return e}};const xd={};var wd=(e=xd,t)=>{switch(t.type){case U.t:case U.s:{var s=t.payload;const r=s.key;return s.subredditId?Object.assign({},e,{[r]:null}):e}case U.r:{var r=t.payload;const s=r.error,n=r.key;return r.subredditId?Object.assign({},e,{[n]:s}):e}default:return e}};const Nd={};var kd=(e=Nd,t)=>{switch(t.type){case U.r:case U.s:{var s=t.payload;const r=s.subredditId,n=s.key;return r?Object.assign({},e,{[n]:!1}):e}case U.t:{var r=t.payload;const s=r.subredditId,n=r.key;return s?Object.assign({},e,{[n]:!0}):e}default:return e}},Ld=Object(r.c)({error:wd,pending:kd});const Ud={};var Md=(e=Ud,t)=>{switch(t.type){case U.s:{var s=t.payload;const r=s.subredditId,n=s.response,a=s.key,c=n.moderatorIds;return Object.assign({},e,{[r]:Object.assign({},e[r]||{},{[a]:c})})}case U.Q:{var r=t.payload;const s=r.subredditId,n=r.userId,a=r.key,c=e[s][a].filter(e=>e!==n);return Object.assign({},e,{[s]:Object.assign({},e[s]||{},{[a]:c})})}default:return e}},Gd=Object(r.c)({data:Md,api:Ld});var Fd=(e=null,t)=>{switch(t.type){case U.x:case U.w:return null;case U.v:return t.payload;default:return e}};var Bd=(e=!1,t)=>{switch(t.type){case U.w:case U.v:return!1;case U.x:return!0;default:return e}},$d=Object(r.c)({error:Fd,pending:Bd});const qd={};var Vd=(e=qd,t)=>{switch(t.type){case U.w:{var s=t.payload;const r=s.subredditId,n=s.moderators;return Object.assign({},e,{[r]:n})}case U.P:{var r=t.payload;const s=r.subredditId,n=r.userId,a=Object.assign({},e);return delete a[s][n],a}case U.a:{const s=t.payload,r={[s.subredditId]:s.moderators};return Y()(Object.assign({},e),r)}default:return e}};const Hd={};var Kd=(e=Hd,t)=>{switch(t.type){case U.w:{var s=t.payload;const r=s.subredditId,n=s.moderatorIds;return Object.assign({},e,{[r]:n})}case U.P:{var r=t.payload;const s=r.subredditId,n=r.userId,a=e[s].filter(e=>e!==n);return Object.assign({},e,{[s]:a})}case U.a:{const s=t.payload,r=s.subredditId,n=s.moderatorIds,a=[...e[r]||[],...n];return Object.assign({},e,{[r]:a})}default:return e}},Wd=Object(r.c)({api:$d,models:Vd,userOrder:Kd}),Yd=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const zd={};var Qd=(e=zd,t)=>{switch(t.type){case U.B:{var s=t.payload;const r={[s.subredditId]:s.response.invitePending};return Y()(Object.assign({},e),r)}case U.y:case U.z:{const s=t.payload.subredditId;return e[s],Yd(e,["symbol"==typeof s?s:s+""])}default:return e}};const Xd={};var Jd=(e=Xd,t)=>{switch(t.type){case U.s:{const e=t.payload.response;return{[e.subredditId]:{after:e.after,before:e.before}}}default:return e}};const Zd={};var eu=(e=Zd,t)=>{switch(t.type){case U.B:{const e=t.payload.response;return{[e.subredditId]:{after:e.after,before:e.before}}}default:return e}};const tu={};var su=(e=tu,t)=>{switch(t.type){case U.B:{const s=t.payload.response,r={[s.subredditId]:s.moderators};return Y()(Object.assign({},e),r)}case U.u:{const s=t.payload,r=s.subredditId,n=s.userId,a=s.permissions;if(e[r]&&e[r][n]){const t=Object.assign({},e);return t[r][n].modPermissions=a,t}return e}default:return e}};var ru=(e=null,t)=>{switch(t.type){case U.F:case U.E:return null;case U.D:return t.payload;default:return e}};var nu=(e=!1,t)=>{switch(t.type){case U.F:return!0;case U.E:case U.D:return!1;default:return e}},au=Object(r.c)({error:ru,pending:nu});var cu=(e=null,t)=>{switch(t.type){case U.F:case U.D:case U.Q:return null;case U.E:{const e=t.payload.moderatorIds[0];return e?t.payload.moderators[e]:null}case U.u:{var s=t.payload;const r=s.userId,n=s.permissions;return e&&e.id===r&&!tr()(e.modPermissions,n)?Object.assign({},e,{modPermissions:n}):e}default:return e}},iu=Object(r.c)({api:au,result:cu});const ou={};var du=(e=ou,t)=>{switch(t.type){case U.C:case U.B:{var s=t.payload;const r=s.subredditId,n=s.key;return r?Object.assign({},e,{[n]:null}):e}case U.A:{var r=t.payload;const s=r.error,n=r.subredditId,a=r.key;return n?Object.assign({},e,{[a]:s}):e}default:return e}};const uu={};var lu=(e=uu,t)=>{switch(t.type){case U.A:case U.B:{var s=t.payload;const r=s.subredditId,n=s.key;return r?Object.assign({},e,{[n]:!1}):e}case U.C:{var r=t.payload;const s=r.subredditId,n=r.key;return s?Object.assign({},e,{[n]:!0}):e}default:return e}},bu=Object(r.c)({error:du,pending:lu});const pu={};var Ou=(e=pu,t)=>{switch(t.type){case U.B:{var s=t.payload;const r=s.response,n=s.subredditId,a=s.key,c=r.moderatorIds;return Object.assign({},e,{[n]:Object.assign({},e[n]||{},{[a]:c})})}case U.Q:{var r=t.payload;const s=r.subredditId,n=r.userId,a=Object.assign({},e[s]);return Object.keys(e[s]).forEach(t=>{const r=e[s][t].filter(e=>e!==n);a[t]=r}),Object.assign({},e,{[s]:a})}default:return e}},fu=Object(r.c)({data:Ou,api:bu}),mu=Object(r.c)({editableModerators:Pd,editableUserOrder:Gd,invitedModerators:Wd,invitePending:Qd,loadMoreModerators:eu,loadMoreEditableModerators:Jd,models:su,search:iu,userOrder:fu});var ju=(e=null,t)=>{switch(t.type){case Me.b:case Me.k:return null;case Me.a:case Me.j:return t.payload;default:return e}};var gu=(e=!1,t)=>{switch(t.type){case Me.b:case Me.k:return!0;case Me.c:case Me.a:case Me.l:case Me.j:return!1;default:return e}},yu=Object(r.c)({error:ju,pending:gu});const _u=[];var Eu=(e=_u,t)=>{switch(t.type){case Me.e:{const s=t.payload.filteredSubreddits;return s||e}case Me.j:{const s=t.payload;return[...e,s]}case Me.k:case Me.a:{const s=t.payload;return e.filter(e=>e!==s)}default:return e}},hu=Object(r.c)({api:yu,names:Eu}),Su=Object(r.c)({filteredSubreddits:hu}),Tu=s("./src/reddit/actions/modMode.ts");var Iu=(e=!0,t)=>{switch(t.type){case Tu.a:return t.payload.enabled;default:return e}};var vu=(e=null,t)=>{switch(t.type){case ie.e:case ie.d:return null;case ie.c:return t.payload;default:return e}};var Cu=(e=!1,t)=>{switch(t.type){case ie.e:return!0;case ie.d:case ie.c:case ie.v:case ie.u:return!1;default:return e}},Ru=Object(r.c)({error:vu,pending:Cu});const Au={};var Du=(e=Au,t)=>{switch(t.type){case ie.a:{const s=t.payload.ids,r={};return s.forEach(e=>r[e]=!0),Object.assign({},e,r)}case ie.g:{const s=t.payload.ids;return ar()(e,s)}case ie.f:{const e=t.payload.ids,s={};return e.forEach(e=>s[e]=!0),s}default:return e}};const Pu={};var xu=(e=Pu,t)=>{switch(t.type){case ie.d:{var s=t.payload;const e=s.operation,r=s.ids;return"approve"===e?Pu:{[ur.c[e]]:r}}default:return e}},wu=Object(r.c)({api:Ru,selectedItems:Du,undoLastAction:xu});var Nu=(e=null,t)=>{switch(t.type){case ie.j:case ie.i:return null;case ie.h:return t.payload;default:return e}};var ku=(e=!1,t)=>{switch(t.type){case ie.j:return!0;case ie.i:case ie.h:return!1;default:return e}},Lu=Object(r.c)({error:Nu,pending:ku});const Uu={};var Mu=(e=Uu,t)=>{switch(t.type){case ie.i:{var s=t.payload;const r=s.listingKey,n=s.page,a=s.response.modqueue;return Object.assign({},e,{[r]:Object.assign({},e[r]||{},{[n]:a})})}default:return e}};const Gu={};var Fu=(e=Gu,t)=>{switch(t.type){case ie.i:{var s=t.payload;const e=s.listingKey,r=s.response.modqueue;return{[e]:r[r.length-1]||null}}default:return e}},Bu=Object(r.c)({api:Lu,itemOrder:Mu,loadMore:Fu});var $u=(e=null,t)=>{switch(t.type){case Me.e:return t.payload.moderatingSubreddits?null:e;case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:return t.payload.response.moderatedAfter;case ie.n:return t.payload.moderatedAfter;default:return e}};const qu=[];var Vu=(e=qu,t)=>{switch(t.type){case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:return t.payload.response.listingOrder;case ie.n:{const s=t.payload.listingOrder;return[...e,...s]}case Me.e:{const s=t.payload.listingOrder;return s||e}default:return e}};var Hu=(e=!1,t)=>{switch(t.type){case ie.b:return!0;default:return e}};var Ku=(e=!1,t)=>{switch(t.type){case ie.n:return!0;case ie.b:return!1;default:return e}},Wu=Object(r.c)({after:$u,data:Vu,loaded:Hu,pending:Ku});var Yu=(e=null,t)=>{switch(t.type){case ie.m:case ie.l:return null;case ie.k:return t.payload;default:return e}};var zu=(e=!1,t)=>{switch(t.type){case ie.m:return!0;case ie.l:case ie.k:return!1;default:return e}},Qu=Object(r.c)({error:Yu,pending:zu});const Xu={};var Ju=(e=Xu,t)=>{switch(t.type){case ie.l:{var s=t.payload;const r=s.listingKey,n=s.page,a=s.response.modqueue;return Object.assign({},e,{[r]:Object.assign({},e[r]||{},{[n]:a})})}default:return e}};const Zu={};var el=(e=Zu,t)=>{switch(t.type){case ie.l:{var s=t.payload;const e=s.listingKey,r=s.response.modqueue;return{[e]:r[r.length-1]||null}}default:return e}},tl=Object(r.c)({api:Qu,itemOrder:Ju,loadMore:el});var sl=(e=null,t)=>{switch(t.type){case ie.q:case ie.p:return null;case ie.o:return t.payload;default:return e}};var rl=(e=!1,t)=>{switch(t.type){case ie.q:return!0;case ie.p:case ie.o:return!1;default:return e}},nl=Object(r.c)({error:sl,pending:rl});const al={};var cl=(e=al,t)=>{switch(t.type){case ie.p:{var s=t.payload;const r=s.listingKey,n=s.page,a=s.response.modqueue;return Object.assign({},e,{[r]:Object.assign({},e[r]||{},{[n]:a})})}default:return e}};const il={};var ol=(e=il,t)=>{switch(t.type){case ie.p:{var s=t.payload;const e=s.listingKey,r=s.response.modqueue;return{[e]:r[r.length-1]||null}}default:return e}},dl=Object(r.c)({api:nl,itemOrder:cl,loadMore:ol});var ul=(e=null,t)=>{switch(t.type){case ie.t:case ie.s:return null;case ie.r:return t.payload;default:return e}};var ll=(e=!1,t)=>{switch(t.type){case ie.t:return!0;case ie.s:case ie.r:return!1;default:return e}},bl=Object(r.c)({error:ul,pending:ll});const pl={};var Ol=(e=pl,t)=>{switch(t.type){case ie.s:{var s=t.payload;const r=s.listingKey,n=s.page,a=s.response.modqueue;return Object.assign({},e,{[r]:Object.assign({},e[r]||{},{[n]:a})})}default:return e}};const fl={};var ml=(e=fl,t)=>{switch(t.type){case ie.s:{var s=t.payload;const e=s.listingKey,r=s.response.modqueue;return{[e]:r[r.length-1]||null}}default:return e}},jl=Object(r.c)({api:bl,itemOrder:Ol,loadMore:ml});var gl=(e=null,t)=>{switch(t.type){case ie.z:case ie.y:return null;case ie.x:return t.payload;default:return e}};var yl=(e=!1,t)=>{switch(t.type){case ie.z:return!0;case ie.y:case ie.x:return!1;default:return e}},_l=Object(r.c)({error:gl,pending:yl});const El={};var hl=(e=El,t)=>{switch(t.type){case ie.y:{var s=t.payload;const r=s.listingKey,n=s.page,a=s.response.modqueue;return Object.assign({},e,{[r]:Object.assign({},e[r]||{},{[n]:a})})}default:return e}};const Sl={};var Tl=(e=Sl,t)=>{switch(t.type){case ie.y:{var s=t.payload;const e=s.listingKey,r=s.response.modqueue;return{[e]:r[r.length-1]||null}}default:return e}},Il=Object(r.c)({api:_l,itemOrder:hl,loadMore:Tl}),vl=Object(r.c)({bulkAction:wu,edited:Bu,moderatedCommunitiesOrder:Wu,modqueue:tl,reports:dl,spam:jl,unmoderated:Il}),Cl=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const Rl={};var Al=(e=Rl,t)=>{switch(t.type){case ce.u:{const s=t.payload.moreCommentsId;return Object.assign({},e,{[s]:null})}case ce.t:{const s=t.payload.moreCommentsItem;return Object.assign({},e,{[s.id]:null})}case ce.s:{const s=t.payload,r=s.moreCommentsItem,n=Cl(s,["moreCommentsItem"]);return Object.assign({},e,{[r.id]:n||{}})}default:return e}};const Dl={};var Pl=(e=Dl,t)=>{switch(t.type){case ce.u:{const s=t.payload.moreCommentsId;return Object.assign({},e,{[s]:!0})}case ce.s:case ce.t:{const s=t.payload.moreCommentsItem;return Object.assign({},e,{[s.id]:!1})}default:return e}},xl=Object(r.c)({error:Al,pending:Pl});const wl={};var Nl=(e=wl,t)=>{switch(t.type){case ce.t:case Ue.b:case oe.b:return Object.assign({},e,t.payload.moreComments);default:return e}},kl=Object(r.c)({api:xl,models:Nl});var Ll=(e=!1,t)=>{switch(t.type){case ke.d:return!1;case ke.e:return!0;default:return e}};var Ul=(e=!1,t)=>{switch(t.type){case ke.d:return!0;case ke.e:return!1;default:return e}},Ml=Object(r.c)({fetched:Ll,pending:Ul}),Gl=s("./node_modules/lodash/union.js"),Fl=s.n(Gl);const Bl={};var $l=(e=Bl,t)=>{switch(t.type){case oe.l:case ke.b:for(const s in t.payload.multiredditsByUser){const r=e[s],n=t.payload.multiredditsByUser[s];if(r){const t=Fl()(r,n);return tr()(r,t)?e:Object.assign({},e,{[s]:t})}return Object.assign({},e,{[s]:n})}return Bl;case ke.e:for(const s in t.payload.multiredditsByUser){const r=t.payload.multiredditsByUser[s];return e[s]&&tr()(r,e[s])?e:Object.assign({},e,{[s]:r})}return Bl;default:return e}};const ql={};var Vl=(e=ql,t)=>{switch(t.type){case oe.l:case ke.b:case ke.e:{let s={};for(const r in t.payload.multireddits){const n=t.payload.multireddits[r];r in e&&tr()(e[n.url],n)||(s=Object.assign({},s,{[r]:n}))}return es()(s)?e:Object.assign({},e,s)}default:return e}},Hl=Object(r.c)({api:Ml,byUserId:$l,models:Vl});var Kl=(e=null,t)=>{switch(t.type){case U.J:case U.H:return null;case U.G:return t.payload;default:return e}};const Wl={};var Yl=(e=Wl,t)=>{switch(t.type){case U.J:{var s=t.payload;const r=s.subredditId,n=s.fetchedToken,a=Object(G.d)(r,n);return Object.assign({},e,{[a]:!0})}case U.H:case U.G:{var r=t.payload;const s=r.subredditId,n=r.fetchedToken,a=Object(G.d)(s,n);return Object.assign({},e,{[a]:!1})}default:return e}},zl=Object(r.c)({error:Kl,pending:Yl});const Ql={};var Xl=(e=Ql,t)=>{switch(t.type){case U.H:{var s=t.payload;const r=s.fetchedToken,n=s.subredditId,a=Object(G.d)(n,r);return Object.assign({},e,{[a]:!0})}default:return e}};var Jl=(e=null,t)=>{switch(t.type){case mt.b:return t.payload;default:return e}};const Zl={};var eb=(e=Zl,t)=>{switch(t.type){case U.H:var s=t.payload;return{[s.subredditId]:s.after};default:return e}};const tb={};var sb=(e=tb,t)=>{switch(t.type){case U.I:case U.H:{var s=t.payload;const r={[s.subredditId]:s.mutedUsers};return Y()(Object.assign({},e),r)}case U.N:{var r=t.payload;const s=r.subredditId,n=r.userId,a=Object.assign({},e);return delete a[s][n],a}default:return e}};var rb=(e=null,t)=>{switch(t.type){case U.M:case U.L:return null;case U.K:return t.payload;default:return e}};var nb=(e=!1,t)=>{switch(t.type){case U.M:return!0;case U.L:case U.K:return!1;default:return e}},ab=Object(r.c)({error:rb,pending:nb});var cb=(e=null,t)=>{switch(t.type){case U.M:case U.K:return null;case U.L:{const e=t.payload.mutedUserIds[0];return e?t.payload.mutedUsers[e]:null}default:return e}},ib=Object(r.c)({api:ab,result:cb});const ob={};var db=(e=ob,t)=>{switch(t.type){case U.H:{var s=t.payload;const r=s.subredditId,n=s.mutedUserIds;return e[r]?Object.assign({},e,{[r]:[...e[r],...n]}):Object.assign({},e,{[r]:n})}case U.N:{var r=t.payload;const s=r.subredditId,n=r.userId;return{[s]:e[s].filter(e=>e!==n)}}case U.I:{var n=t.payload;const s=n.subredditId,r=n.mutedUserIds[0];return r&&e[s]&&-1===e[s].indexOf(r)?{[s]:[r,...e[s]]}:e}default:return e}},ub=Object(r.c)({api:zl,fetchedTokens:Xl,inContext:Jl,loadMore:eb,models:sb,search:ib,userOrder:db});const lb={};var bb=(e=lb,t)=>{switch(t.type){case Ge.b:var s=t.payload;const r=s.key,n=s.activeCommunityIds;return Object.assign({},e,{[r]:n});default:return e}},pb=Object(r.c)({activeCommunityIds:bb});var Ob=(e=null,t)=>{switch(t.type){case Ne.b:case Ne.c:case Ge.b:case Ge.c:return null;case Ge.a:case Ne.a:return t.payload;default:return e}};var fb=(e=!1,t)=>{switch(t.type){case Ne.c:case Ge.c:return!0;case Ne.a:case Ne.b:case Ge.a:case Ge.b:return!1;default:return e}},mb=Object(r.c)({error:Ob,pending:fb}),jb=s("./node_modules/lodash/values.js"),gb=s.n(jb),yb=s("./src/reddit/models/News/index.ts");const _b={},Eb=(e,t)=>e.reduce((e,s)=>{const r=Object.assign({belongsTo:s.belongsTo,heroSource:s.preview||{},id:s.id,status:yb.b.Latest,thumbnailUrl:s.preview&&s.preview.url||""},hb(t,s));return e[r.id]=r,e},{}),hb=(e,t)=>{let s,r;return e.find(e=>!(!e.subtopics||!e.subtopics.length)&&!!e.subtopics.find(n=>{if(n.subreddits&&n.subreddits.length){const a=t&&t.belongsTo&&t.belongsTo.id||"";if(a&&n.subreddits.includes(a))return s=n,r=e,!0}return!1})),{topic:r,subtopic:s}};var Sb=(e=_b,t)=>{switch(t.type){case Ge.b:case Ne.b:{var s=t.payload;const r=s.availableTopics,n=s.posts,a=Eb(gb()(n),r);return Object.assign({},e,a)}default:return e}},Tb=Object(r.c)({api:mb,models:Sb}),Ib=s("./src/reddit/actions/news.ts");var vb=(e=null,t)=>{switch(t.type){case Ib.c:case Ib.b:return null;case Ib.a:return t.payload;default:return e}};var Cb=(e=!1,t)=>{switch(t.type){case Ib.c:return!0;case Ib.a:case Ib.b:return!1;default:return e}},Rb=Object(r.c)({error:vb,pending:Cb});const Ab={availableTopics:[],selectedSubtopic:null,selectedTopic:null};var Db=(e=Ab,t)=>{switch(t.type){case Ib.d:var s=t.payload;const r=s.selectedTopic,n=s.selectedSubtopic;return Object.assign({},e,{selectedTopic:r,selectedSubtopic:n});case Ib.b:const a=t.payload;return Object.assign({},e,{selectedTopic:e.selectedTopic||a[0]||null,availableTopics:a});default:return e}},Pb=Object(r.c)({api:Rb,models:Db}),xb=Object(r.c)({topics:Pb,stories:Tb,communityInfo:pb}),wb=s("./src/reddit/actions/nps.ts");const Nb={pending:!1,success:!1,dest:void 0};var kb=(e=Nb,t)=>{switch(t.type){case wb.c:return Object.assign({},Nb,{pending:!0});case wb.a:return Nb;case wb.b:{const e=t.payload.dest;return Object.assign({},Nb,{success:!0,dest:e})}default:return e}},Lb=s("./src/reddit/actions/oldSiteRules.ts");const Ub=[];var Mb=(e=Ub,t)=>{switch(t.type){case Lb.a:return t.payload.oldSiteRules;default:return e}};const Gb={};var Fb=(e=Gb,t)=>{switch(t.type){case Le.i:case Le.h:{const s=t.payload.category;return Object.assign({},e,{[s]:null})}case Le.g:{var s=t.payload;const r=s.category,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Bb={};var $b=(e=Bb,t)=>{switch(t.type){case Le.i:{const s=t.payload.category;return Object.assign({},e,{[s]:!0})}case Le.h:case Le.g:{const s=t.payload.category;return Object.assign({},e,{[s]:!1})}default:return e}},qb=Object(r.c)({error:Fb,pending:$b}),Vb=Object(r.c)({api:qb});var Hb=(e=null,t)=>{switch(t.type){case Le.c:case Le.b:return null;case Le.a:return t.payload;default:return e}};var Kb=(e=!1,t)=>{switch(t.type){case Le.c:return!0;case Le.b:case Le.a:return!1;default:return e}},Wb=Object(r.c)({error:Hb,pending:Kb});const Yb={};var zb=(e=Yb,t)=>{switch(t.type){case Le.b:return 0===t.payload.length?Yb:t.payload.reduce((e,t)=>(e[t.name]=t,e),{});default:return e}},Qb=Object(r.c)({api:Wb,models:zb});const Xb={};var Jb=(e=Xb,t)=>{switch(t.type){case Le.l:case Le.k:{const s=t.payload.category;return Object.assign({},e,{[s]:null})}case Le.j:{var s=t.payload;const r=s.category,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Zb={};var ep=(e=Zb,t)=>{switch(t.type){case Le.l:{const s=t.payload.category;return Object.assign({},e,{[s]:!0})}case Le.k:case Le.j:{const s=t.payload.category;return Object.assign({},e,{[s]:!1})}default:return e}},tp=Object(r.c)({error:Jb,pending:ep}),sp=Object(r.c)({api:tp});const rp={};var np=(e=rp,t)=>{switch(t.type){case Le.o:case Le.n:{const s=t.payload.category;return Object.assign({},e,{[s]:null})}case Le.m:{var s=t.payload;const r=s.category,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const ap={};var cp=(e=ap,t)=>{switch(t.type){case Le.l:{const s=t.payload.category;return Object.assign({},e,{[s]:!0})}case Le.k:case Le.j:{const s=t.payload.category;return Object.assign({},e,{[s]:!1})}default:return e}},ip=Object(r.c)({error:np,pending:cp}),op=Object(r.c)({api:ip}),dp=Object(r.c)({bestPosts:Vb,categories:Qb,topCommunities:sp,topCreators:op}),up=s("./src/reddit/actions/pages/partnerSubredditConnection.ts");const lp={};var bp=(e=lp,t)=>{switch(t.type){case up.b:case up.c:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case up.a:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const pp={};var Op=(e=pp,t)=>{switch(t.type){case up.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}case up.b:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}default:return e}};const fp={};var mp=(e=fp,t)=>{switch(t.type){case up.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case up.b:case up.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},jp=Object(r.c)({error:bp,fetched:Op,pending:mp}),gp=Object(r.c)({page:jp}),yp=Object(r.c)({api:gp}),_p=s("./node_modules/history/index.js"),Ep=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const hp={allowNavigationCallback:null,currentPage:null,lastPage:null,referrers:{},sessionReferrer:null,metas:{}};var Sp=(e=hp,t)=>{switch(t.type){case O.a:{const s=e.currentPage,r=t.payload,n=r.routeMatch,a=r.location,c=a.key,i=Object(_p.createPath)(a),o=n?((e,t,s,r)=>{const n=s.route,a=(n.action,Ep(n,["action"]));return{key:e,locationState:r.state,meta:s.route.meta,queryParams:s.match.queryParams,routeMatch:Object.assign({},s,{route:a}),status:200,url:t,urlParams:s.match.params}})(c,i,n,a):((e,t)=>({key:e,locationState:{},meta:null,queryParams:{},routeMatch:null,status:404,url:t,urlParams:{}}))(c,i);let d=e.referrers;if("PUSH"===r.action){const e=s&&s.url||"";d=Object.assign({},d,{[c]:e})}else if("REPLACE"===r.action&&s&&d[s.key]){const e=s.key,t=d[e],r=Ep(d,["symbol"==typeof e?e:e+""]);d=Object.assign({},r,{[c]:t})}return Object.assign({},e,{referrers:d,currentPage:o,lastPage:s})}case O.e:{const s=t.payload,r=s.key,n=s.meta;return Object.assign({},e,{metas:Object.assign({},e.metas,{[r]:n})})}case O.f:{if(!e.currentPage)return e;const s=t.payload,r=Object.assign({},e.currentPage,{status:s});return Object.assign({},e,{currentPage:r})}case Ue.b:case oe.b:return!e.currentPage||t.payload.postMeta,e;case O.b:return e;case O.d:{const s=t.payload.allowNavigationCallback;return Object.assign({},e,{allowNavigationCallback:s})}case O.c:return Object.assign({},e,{allowNavigationCallback:null});default:return e}},Tp=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const Ip={};var vp=(e=Ip,t)=>{switch(t.type){case b.k:{const s=t.payload.pollResults.pollId;return e[s],Tp(e,["symbol"==typeof s?s:s+""])}case b.j:{const s=t.payload.pollId;return e[s],Tp(e,["symbol"==typeof s?s:s+""])}case b.i:{var s=t.payload;const r=s.pollId,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Cp={};var Rp=(e=Cp,t)=>{switch(t.type){case b.k:{const s=t.payload.pollResults.pollId;return Object.assign({},e,{[s]:!1})}case b.i:{const s=t.payload.pollId;return Object.assign({},e,{[s]:!1})}case b.j:{const s=t.payload.pollId;return Object.assign({},e,{[s]:!0})}default:return e}},Ap=Object(r.c)({error:vp,pending:Rp}),Dp=Object(r.c)({voting:Ap});const Pp={};var xp=(e=Pp,t)=>{switch(t.type){case b.h:{const s=t.payload.poll;return Object.assign({},e,{[s.id]:s})}case oe.g:case be.b:case Oe.i:case we.b:case Ue.b:case oe.b:{const s=t.payload.governance;if(s){const t=Object.keys(s).reduce((e,t)=>{const r=s[t].poll;return e[r.id]=r,e},{});return Object.assign({},e,t)}return e}default:return e}};const wp={};var Np=(e=wp,t)=>{switch(t.type){case b.k:{var s=t.payload.pollResults;const r=s[Ta.b.ByLockedVotingPower],n=s.pollId;return r?Object.assign({},e,{[n]:r}):e}case oe.g:case be.b:case Oe.i:case we.b:case Ue.b:case oe.b:{const s=t.payload.governance;if(s){const t=Object.keys(s).reduce((e,t)=>{var r=s[t].pollResults;const n=r[Ta.b.ByLockedVotingPower],a=r.pollId;return n&&(e[a]=n),e},{});return Object.assign({},e,t)}return e}default:return e}};const kp={};var Lp=(e=kp,t)=>{switch(t.type){case b.k:{var s=t.payload.pollResults;const r=s[Ta.b.ByVoters],n=s.pollId;return Object.assign({},e,{[n]:r})}case oe.g:case be.b:case Oe.i:case we.b:case Ue.b:case oe.b:{const s=t.payload.governance;if(s){const t=Object.keys(s).reduce((e,t)=>{var r=s[t].pollResults;const n=r[Ta.b.ByVoters];return e[r.pollId]=n,e},{});return Object.assign({},e,t)}return e}default:return e}};const Up={};var Mp=(e=Up,t)=>{switch(t.type){case b.k:{var s=t.payload.pollResults;const r=s[Ta.b.ByVotingPower],n=s.pollId;return Object.assign({},e,{[n]:r})}case oe.g:case be.b:case Oe.i:case we.b:case Ue.b:case oe.b:{const s=t.payload.governance;if(s){const t=Object.keys(s).reduce((e,t)=>{var r=s[t].pollResults;const n=r[Ta.b.ByVotingPower];return e[r.pollId]=n,e},{});return Object.assign({},e,t)}return e}default:return e}},Gp=Object(r.c)({byLockedVotingPower:Np,byVoters:Lp,byVotingPower:Mp});const Fp={};var Bp=(e=Fp,t)=>{switch(t.type){case b.k:{var s=t.payload.pollResults;const r=s.pollId,n=s.rewardPoints;return n?Object.assign({},e,{[r]:n}):e}default:return e}},$p=Object(r.c)({api:Dp,models:xp,results:Gp,rewards:Bp});const qp={reorderError:null,updateDescriptionError:null};var Vp=(e=qp,t)=>{switch(t.type){case Xr.i:case Xr.j:return Object.assign({},e,{reorderError:null});case Xr.h:return Object.assign({},e,{reorderError:t.payload});case Xr.l:case Xr.m:return Object.assign({},e,{updateDescriptionError:null});case Xr.k:return Object.assign({},e,{updateDescriptionError:t.payload});default:return e}};const Hp={reorderPending:!1,updateDescriptionPending:!1};var Kp=(e=Hp,t)=>{switch(t.type){case Xr.i:return Object.assign({},e,{reorderPending:!0});case Xr.h:case Xr.j:return Object.assign({},e,{reorderPending:!1});case Xr.l:return Object.assign({},e,{updateDescriptionPending:!0});case Xr.k:case Xr.m:return Object.assign({},e,{updateDescriptionPending:!1});default:return e}},Wp=Object(r.c)({error:Vp,pending:Kp}),Yp=s("./src/reddit/helpers/path/index.ts");const zp={},Qp=e=>{const t=e.protocol,s=e.domain;return e=>{const r=Object(Yp.b)(e.permalink);return Object.assign({},e,{permalink:`${t}://${s}${r}`})}};var Xp=(e=zp,t)=>{switch(t.type){case Be.b:case Me.e:case Me.h:case Ge.b:case de.b:case de.e:case $e.e:case $e.b:case ue.e:case ue.b:case be.b:case oe.g:case oe.l:case be.b:case Ue.b:case oe.b:case E.e:case Fe.b:case ke.b:case Le.e:case Le.h:case we.b:case pe.e:case Ve.b:case Oe.i:case He.c:case qe.b:case oe.q:case Xr.f:{var s=t.payload;const r=s.collections,n=s.meta;if(!r)return e;let a=r;if(n){const e=Qp(n);a=kr()(r,e)}return Object.assign({},e,a)}case Xr.d:{var r=t.payload;const s=r.collection,n=r.meta;if(!s)return e;const a=s.id;let c=s;return n&&(c=Qp(n)(s)),Object.assign({},e,{[a]:c})}case Xr.g:{var n=t.payload;const s=n.collectionId,r=n.postId,a=e[s];return a?Object.assign({},e,{[s]:Object.assign({},a,{postIds:a.postIds.filter(e=>e!==r)})}):e}case Xr.a:{var a=t.payload;const s=a.collectionId,r=a.postId,n=e[s];return n&&r?Object.assign({},e,{[s]:Object.assign({},n,{postIds:[...n.postIds,r]})}):e}case Xr.e:{const s=t.payload.collectionId,r=Object.assign({},e);return delete r[s],r}case Xr.p:{var c=t.payload;const s=c.collectionId,r=c.newTitle,n=e[s];return n?Object.assign({},e,{[s]:Object.assign({},n,{title:r})}):e}case Xr.j:{var i=t.payload;const s=i.collectionId,r=i.postIds,n=e[s];return n?Object.assign({},e,{[s]:Object.assign({},n,{postIds:[...r]})}):e}case Xr.m:{var o=t.payload;const s=o.collectionId,r=o.newDescription,n=e[s];return n?Object.assign({},e,{[s]:Object.assign({},n,{description:r})}):e}default:return e}};const Jp={};var Zp=(e=Jp,t)=>{switch(t.type){case Be.b:case Xr.f:{const s=t.payload.collections;if(!s)return e;const r=Object.keys(s);if(!r.length)return e;const n=s[r[0]].subredditId;return Object.assign({},e,{[n]:r})}case Xr.d:{const s=t.payload.collection,r=s.subredditId,n=e[r]||[];return Object.assign({},e,{[r]:[...n,s.id]})}case Xr.e:{var s=t.payload;const r=s.collectionId,n=s.collection;if(!n)return e;const a=n&&e[n.subredditId];return a?Object.assign({},e,{[n.subredditId]:a.filter(e=>e!==r)}):e}default:return e}},eO=Object(r.c)({models:Xp,subredditToIds:Zp,api:Wp}),tO=s("./src/reddit/actions/postFlair.ts"),sO=s("./src/reddit/models/Flair/index.ts");const rO={},nO={displaySettings:{isEnabled:!1,position:sO.a.Left},permissions:{canAssignOwn:!1},templateIds:[],templates:{}},aO=(e,t)=>{if(!t)return e;const s=Object.keys(t);return 0===s.length?e:s.reduce((e,s)=>(e[s]=Object.assign({},nO,e[s],t[s]),e),Object.assign({},e))};var cO=(e=rO,t)=>{switch(t.type){case Be.b:case we.b:case Me.e:case Me.h:case ke.b:case Le.e:case Fe.b:case Ue.b:case oe.b:case oe.g:case oe.l:case oe.q:case be.b:case de.b:case de.e:case le.c:case le.i:case le.e:case le.g:case pe.e:case qe.b:case qe.b:case $e.b:case $e.e:case ue.b:case ue.e:case Ve.b:case He.c:case He.c:case Oe.i:return aO(e,t.payload.postFlair);case tO.c:{var s=t.payload;const r=s.subredditId,n=s.isEnabled,a=e[r].displaySettings,c=Object.assign({},a,{isEnabled:n});return Object.assign({},e,{[r]:Object.assign({},e[r],{displaySettings:c})})}case tO.a:{var r=t.payload;const s=r.subredditId,n=r.canAssignOwn,a=e[s].permissions,c=Object.assign({},a,{canAssignOwn:n});return Object.assign({},e,{[s]:Object.assign({},e[s],{permissions:c})})}case tO.f:{var n=t.payload;const s=n.subredditId,r=n.template,a=e[s],c=a.templates,i=a.templateIds,o=Object.assign({},c,{[r.id]:r}),d=[...i];return d.includes(r.id)||d.push(r.id),Object.assign({},e,{[s]:Object.assign({},a,{templates:o,templateIds:d})})}case tO.b:{var a=t.payload;const s=a.subredditId,r=a.templateId,n=e[s],c=n.templates,i=n.templateIds,o=ar()(c,r),d=i.filter(e=>e!==r);return Object.assign({},e,{[s]:Object.assign({},n,{templates:o,templateIds:d})})}case tO.e:case tO.d:{const s=t.payload,r=e[s.subredditId];return Object.assign({},e,{[s.subredditId]:Object.assign({},r,{templateIds:s.templateIds})})}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{const s=t.payload.response;return aO(e,s.postFlair)}default:return e}};const iO={};var oO=(e=iO,t)=>{switch(t.type){case Le.h:{var s=t.payload;const r=s.category,n=s.posts;return e[r]?e:Object.assign({},e,{[r]:Object.keys(n)})}default:return e}},dO=s("./src/reddit/actions/embedAndImage.ts");const uO={};var lO=(e=uO,t)=>{switch(t.type){case dO.b:{const s=t.payload.postId;return e[s]?Object.assign({},e,{[s]:!1}):e}case dO.a:{const s=t.payload.postId;return Object.assign({},e,{[s]:!0})}}return e},bO=Object(r.c)({loadable:lO});const pO={};var OO=(e=pO,t)=>{switch(t.type){case E.c:{const s=t.payload.postId;return Object.assign({},e,{[s]:!e[s]})}default:return e}};var fO=(e=null,t)=>{switch(t.type){case E.d:return t.payload.postId;default:return e}};const mO={};var jO=(e=mO,t)=>{switch(t.type){case Me.e:case Me.h:case oe.g:case be.b:case Fe.b:case Le.e:case Le.h:case we.b:case pe.e:case Ve.b:case Oe.i:case He.c:case oe.q:return rr()(Object.assign({},e),t.payload.postInstances,(e,t)=>{if(e)return e.concat(t)});default:return e}};const gO={};var yO=(e=gO,t)=>{switch(t.type){case b.h:{const s=t.payload.poll;return Object.assign({},e,{[s.postId]:s.id})}case oe.g:case be.b:case Oe.i:case we.b:case Ue.b:case oe.b:{const s=t.payload.governance;if(s){const t=Object.keys(s).reduce((e,t)=>{const r=s[t];return e[t]=r.poll.id,e},{});return Object.assign({},e,t)}return e}default:return e}},_O=s("./src/reddit/actions/events.ts"),EO=s("./src/reddit/actions/monthsToMinutes.ts"),hO=s("./src/reddit/actions/subredditTopContent.ts"),SO=s("./src/reddit/helpers/isPost.ts"),TO=s("./node_modules/lodash/pickBy.js"),IO=s.n(TO);function vO(e,t){const s=IO()(t,(t,s="")=>!e[s]||!tr()(e[s],t));return Object.keys(s).length>0?Object.assign({},e,s):e}var CO=s("./src/reddit/models/Media/index.ts"),RO=s("./src/reddit/models/Post/index.ts"),AO=s("./src/reddit/actions/subredditDuplicates.ts"),DO=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const PO={},xO=e=>{const t=e.protocol,s=e.domain;return e=>{const r=Object(Yp.b)(e.permalink);return Object.assign({},e,{permalink:`${t}://${s}${r}`})}},wO=e=>{let t=e.source;return t&&t.outboundUrlCreated&&(t=Object.assign({},t,{outboundUrlReceived:Date.now()}),e.source=t),e},NO=e=>{const t=e.allAwardings,s=DO(e,["allAwardings"]);if(!t)return e;const r={};for(const n of t)r[n.id]=n.count;return Object.assign({},s,{awardCountsById:r})},kO=e=>t=>{for(let s=0;s<e.length;s++)t=e[s](t);return t},LO=(e,t)=>{const s={},r=t.posts;return Object.keys(r).length?(Object.keys(r).map(t=>{const n=r[t],a=e[t];a&&(s[t]=a.voteState===lr.a.notVoted?Object(lr.c)(a,n):a)}),Object.assign({},e,s)):e};var UO=(e=PO,t)=>{switch(t.type){case O.a:if(Yn(t)===Wn.Rb.COMMENTS){const s=zn(t),r=(e=>{if(e.payload&&e.payload.routeMatch&&e.payload.routeMatch.match)return e.payload.routeMatch.match.params})(t);if(s&&s.instanceId&&r&&r.partialPostId){const t=s.instanceId,n=Object(RO.f)(r.partialPostId);if(e[n]&&e[t])return Object.assign({},e,{[n]:((e,t)=>Object.assign({},e,{events:t.events,source:t.source}))(e[n],e[t])})}}return e;case Ue.b:case oe.b:{const s=xO(t.payload.meta);return Object.assign({},e,kr()(t.payload.posts,kO([s,wO,NO,(e=>t=>{const s=e[t.id];return s&&s.events&&(t.events=s.events,t.source=s.source),t})(e),(e=>t=>{const s=e[t.id];return s&&s.isSponsored&&(t.isSponsored=s.isSponsored),t})(e)])))}case E.e:return vO(e,t.payload);case AO.a:return vO(e,t.payload.posts);case Be.b:case Me.e:case Me.h:case Ge.b:case de.b:case de.e:case $e.e:case $e.b:case ue.e:case ue.b:case be.b:case oe.g:case oe.l:case be.b:case Fe.b:case ke.b:case Le.e:case Le.h:case we.b:case pe.e:case Ve.b:case Oe.i:case qe.b:case Ne.b:{const s=xO(t.payload.meta);return Object.assign({},e,kr()(t.payload.posts,kO([s,wO,NO,(e=>t=>{const s=e[t.id];return t&&t.media&&s&&s.media&&Object(CO.y)(t.media)&&t.media.isRichtextPreview&&Object(CO.y)(s.media)&&!s.media.isRichtextPreview&&(t.media.richtextContent=s.media.richtextContent,t.media.isRichtextPreview=!1),t})(e)])))}case xe.e:case He.c:case oe.q:{const s=xO(t.payload.meta),r=kr()(t.payload.posts,kO([s,NO,wO]));return rr()(Object.assign({},e),r,(e,t)=>Object.assign({},t,e))}case E.f:{const s=t.payload;return rr()(Object.assign({},e),s,(e,t)=>Object.assign({},e,t))}case cr.a:{var s=t.payload;const r=s.id,n=s.vote,a=e[r];return a?Object.assign({},e,{[r]:Object(lr.c)(a,n)}):e}case ce.F:{const s=t.payload.comment.postId,r=e[s];return r?Object.assign({},e,{[s]:Object.assign({},r,{numComments:r.numComments+1})}):e}case ce.x:{const s=t.payload.postId,r=e[s];return r?Object.assign({},e,{[s]:Object.assign({},r,{numComments:r.numComments-1})}):e}case _e.q:{var r=t.payload;const s=r.id,n=r.gildings,a=e[s];return a?Object.assign({},e,{[s]:Object(dr.c)(a,n)}):e}case U.l:{const s=t.payload.posts;return Object.assign({},e,s)}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{const s=t.payload.response.posts;return Object.assign({},e,s)}case ie.d:case ie.v:{var n=t.payload;const s=n.operation,r=n.ids,a=n.username,c=n.options,i=r.filter(e=>Object(SO.a)(e)),o=Object(ur.d)(e,s,i,a,c);return rr()(Object.assign({},e),o,(e,t)=>Object.assign({},e,t))}case EO.c:return LO(e,t.payload);case EO.i:{const s=t.payload;return LO(e,s.votes)}case Xr.q:{var a=t.payload;const s=a.postId,r=a.collectionId,n=e[s];if(n&&r){const t=n.collectionIds||[];return t.push(r),Object.assign({},e,{[s]:Object.assign({},n,{collectionIds:[...t]})})}return e}case Xr.e:{var c=t.payload;const s=c.collectionId,r=c.collection,n=r&&r.postIds||[],a={};return n.forEach(t=>{const r=e[t],n=r&&r.collectionIds;if(n){const e=n.filter(e=>e!==s);a[t]=Object.assign({},r,{collectionIds:e})}}),Object.assign({},e,a)}case Xr.g:{var i=t.payload;const s=i.collectionId,r=i.postId;if(!s||!r)return e;const n=e[r],a=n&&n.collectionIds;if(!a)return e;const c=a.filter(e=>e!==s);return Object.assign({},e,{[r]:Object.assign({},n,{collectionIds:c})})}case _O.START_EVENT_NOW_SUCCESS:{const s=t.payload.postId;if(!s)return e;const r=e[s];if(!r||!r.eventInfo)return e;const n=r.eventInfo;return Object.assign({},e,{[s]:Object.assign({},r,{eventInfo:Object.assign({},n,{eventIsLive:!0})})})}case _O.EDIT_EVENT_TIME_SUCCESS:{var o=t.payload;const s=o.postId,r=o.eventInfo;if(!s||!r)return e;const n=e[s];return n?Object.assign({},e,{[s]:Object.assign({},n,{eventInfo:Object.assign({},r)})}):e}case le.c:case le.i:case le.e:case le.g:case hO.b:return Object.assign({},t.payload.posts,e);case E.h:{var d=t.payload;const s=d.postId,r=d.richtextContent,n=e[s];return n&&n.media&&Object(CO.y)(n.media)?Object.assign({},e,{[s]:Object.assign({},n,{media:Object.assign({},n.media,{richtextContent:r,isRichtextPreview:!1})})}):e}default:return e}};const MO=[];var GO=(e=MO,t)=>{switch(t.type){case E.g:return t.payload.postIds;case Fe.b:case oe.g:case be.b:{const s=t.payload.recentPostIds;return s&&s.length?s:e}default:return e}},FO=s("./src/reddit/reducers/posts/video/index.ts"),BO=Object(r.c)({bestOCPosts:oO,embedAndImage:bO,expanded:OO,focus:fO,instances:jO,metaMap:yO,models:UO,recent:GO,video:FO.a}),$O=s("./src/lib/reducers/addAuthentication/index.ts");const qO={};var VO=Object($O.a)((e=qO,t)=>{switch(t.type){case Ue.b:case oe.b:{var s=t.payload;const r=s.postId,n=s.commentLists,a=s.comments,c=n[r]&&n[r].head;return c&&a[c.id]&&a[c.id].isStickied?Object.assign({},e,{[r]:c.id}):e}case ce.B:{var r=t.payload;const e=r.id;return{[r.postId]:e}}default:return e}},qO),HO=Object(r.c)({data:VO});const KO={};var WO=(e=KO,t)=>{switch(t.type){case m.f:case m.g:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:void 0})}case m.e:{var s=t.payload;const r=s.subredditId,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const YO={};var zO=(e=YO,t)=>{switch(t.type){case m.f:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!0})}case m.g:case m.e:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}},QO=Object(r.c)({error:WO,pending:zO});const XO={};var JO=(e=XO,t)=>{switch(t.type){case m.d:{const s=t.payload.product;return Object.assign({},e,{[s.id]:void 0})}case m.c:case p.d:case p.e:case p.g:case p.h:{const s=t.payload.productId;return Object.assign({},e,{[s]:void 0})}case m.a:case p.b:case p.f:{var s=t.payload;const r=s.productId,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const ZO={};var ef=(e=ZO,t)=>{switch(t.type){case m.c:case p.d:{const s=t.payload.productId;return Object.assign({},e,{[s]:!0})}case m.d:{const s=t.payload.product;return Object.assign({},e,{[s.id]:!1})}case m.a:case p.b:case p.e:{const s=t.payload.productId;return Object.assign({},e,{[s]:!1})}default:return e}},tf=Object(r.c)({error:JO,pending:ef}),sf=Object(r.c)({fetch:QO,purchase:tf});var rf=(e=null,t)=>{switch(t.type){case m.b:return t.payload.productId;case c.b:return null;default:return e}};const nf={};var af=(e=nf,t)=>{switch(t.type){case m.g:{const s=t.payload.products;return Object.assign({},e,s)}default:return e}},cf=Object(r.c)({api:sf,currentlyPurchasing:rf,models:af});const of={};var df=(e=of,t)=>{switch(t.type){case de.f:case de.e:case de.c:case de.b:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case de.d:case de.a:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const uf={};var lf=(e=uf,t)=>{switch(t.type){case de.f:case de.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case de.e:case de.d:case de.b:case de.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},bf=Object(r.c)({error:df,pending:lf});const pf={};var Of=(e=pf,t)=>{switch(t.type){case de.e:{var s=t.payload;const r=s.key,n=s.commentIds;return Object.assign({},e,{[r]:n})}case de.b:{var r=t.payload;const s=r.key,n=r.commentIds,a=e[s]||[];return Object.assign({},e,{[s]:a.concat(n)})}default:return e}},ff=s("./src/reddit/actions/commentList.ts");const mf={};var jf=(e=mf,t)=>{switch(t.type){case ff.a:{var s=t.payload;const r=s.listingKey,n=s.listingName;return Object.assign({},e,{[r]:n})}case ff.b:{const s=t.payload.listingKey;return s in e?ar()(e,s):e}default:return e}};const gf={};var yf=(e=gf,t)=>{switch(t.type){case de.e:{const s=t.payload.key;return Object.assign({},e,{[s]:{}})}case de.b:{var s=t.payload;const r=s.key,n=s.fetchedToken,a=e[r];return Object.assign({},e,{[r]:Object.assign({},a,{[n]:!0})})}default:return e}};const _f={};var Ef=(e=_f,t)=>{switch(t.type){case de.e:case de.b:{var s=t.payload;const r=s.key,n=s.dist,a=s.token;return a?Object.assign({},e,{[r]:{dist:n,token:a}}):Object(Go.a)(e,r)}default:return e}},hf=Object(r.c)({api:bf,endMarkers:jf,fetchedTokens:yf,commentIds:Of,loadMore:Ef}),Sf=s("./src/reddit/actions/pages/profileModSettings.ts");var Tf=(e=!0,t)=>{switch(t.type){case Sf.a:return!1;default:return e}},If=Object(r.c)({pending:Tf}),vf=Object(r.c)({api:If});const Cf={};var Rf=(e=Cf,t)=>{switch(t.type){case $e.c:case $e.b:case qe.c:case qe.b:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case $e.a:case qe.a:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Af={};var Df=(e=Af,t)=>{switch(t.type){case $e.c:case qe.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case $e.b:case $e.a:case qe.b:case qe.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},Pf=Object(r.c)({error:Rf,pending:Df});const xf={};var wf=(e=xf,t)=>{switch(t.type){case $e.b:{const s=t.payload.key;return Object.assign({},e,{[s]:{}})}case qe.b:{var s=t.payload;const r=s.key,n=s.fetchedToken,a=e[r];return Object.assign({},e,{[r]:Object.assign({},a,{[n]:!0})})}default:return e}};const Nf={};var kf=(e=Nf,t)=>{switch(t.type){case $e.b:case qe.b:{var s=t.payload;const r=s.key,n=s.overviewIds,a=e[r]||[];return Object.assign({},e,{[r]:[...a,...n]})}default:return e}};const Lf={};var Uf=(e=Lf,t)=>{switch(t.type){case $e.b:case qe.b:{var s=t.payload;const r=s.key,n=s.dist,a=s.token;return a?Object.assign({},e,{[r]:{dist:n,token:a}}):Object(Go.a)(e,r)}default:return e}},Mf=Object(r.c)({api:Pf,fetchedTokens:wf,ids:kf,loadMore:Uf});const Gf={};var Ff=(e=Gf,t)=>{switch(t.type){case $e.f:case $e.e:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case $e.d:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n||{}})}default:return e}};const Bf={};var $f=(e=Bf,t)=>{switch(t.type){case $e.f:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case $e.e:case $e.d:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},qf=Object(r.c)({error:Ff,pending:$f});const Vf={};var Hf=(e=Vf,t)=>{switch(t.type){case pe.c:case pe.b:{const s=t.payload.extraCommentsId;return Object.assign({},e,{[s]:null})}case pe.a:{var s=t.payload;const r=s.extraCommentsId,n=s.error;return Object.assign({},e,{[r]:n||{}})}default:return e}};const Kf={};var Wf=(e=Kf,t)=>{switch(t.type){case pe.c:{const s=t.payload.extraCommentsId;return Object.assign({},e,{[s]:!0})}case pe.b:case pe.a:{const s=t.payload.extraCommentsId;return Object.assign({},e,{[s]:!1})}default:return e}},Yf=Object(r.c)({error:Hf,pending:Wf});const zf={};var Qf=(e=zf,t)=>{switch(t.type){case $e.e:case pe.b:case pe.e:return Object.assign({},e,t.payload.extraComments);default:return e}},Xf=Object(r.c)({api:Yf,models:Qf}),Jf=s("./src/lib/makeOverviewConversationsItemKey/index.ts");const Zf={};function em(e){const t=e;return kr()(t,({depth:e,next:t,prev:s})=>({depth:e,next:t,prev:s}))}const tm=(e,t,s)=>{const r={};for(const n in t){const e=t[n],s=e.postId;r.hasOwnProperty(s)?r[s]=Object.assign({},r[s],{[n]:e}):r[s]={[n]:e}}for(const n in s){const e=s[n],t=e.postId;r.hasOwnProperty(t)?r[t]=Object.assign({},r[t],{[n]:e}):r[t]={[t]:e}}return r};var sm=(e=Zf,t)=>{switch(t.type){case $e.e:case pe.e:{var s=t.payload;const r=s.comments,n=s.extraComments,a=s.postIds,c=s.profileName,i=tm(a,r,n),o={};for(const e of a)o[Object(Jf.a)(e,c)]=i.hasOwnProperty(e)?em(i[e]):{};return Object.assign({},e,o)}case pe.b:{var r=t.payload;const s=r.comments,n=r.commentLists,a=r.extraComments,c=r.extraCommentsId,i=r.postIds,o=r.profileName;if(0===i.length){const t=Object.keys(e).find(t=>void 0!==e[t][c]);if(!t)return e;const s=Object.assign({},e[t])[c].prev,r=s&&s.id||"";return Object.assign({},e,{[t]:Object.assign({},e[t],{[r]:Object.assign({},e[t][r],{next:null})})})}const d=i[0],u=em(tm(i,s,a)[d]),l=Object(Jf.a)(d,o),b=Object.assign({},e[l]),p=b[c].prev,O=p&&p.id||"",f=n[d].head,m=f&&f.id||"",j={id:m,type:"comment"},g=Object.assign({},b,{[O]:Object.assign({},b[O],{next:j})},u,{[m]:Object.assign({},u[m],{prev:p})});return Object.assign({},e,{[l]:g})}default:return e}};const rm={};var nm=(e=rm,t)=>{switch(t.type){case $e.e:case pe.e:{var s=t.payload;const r=s.commentLists,n=s.postIds,a=s.profileName,c={};for(const e of n)c[Object(Jf.a)(e,a)]=r[e]&&r[e].head?r[e].head.id:null;return Object.assign({},e,c)}default:return e}};const am={};var cm=(e=am,t)=>{switch(t.type){case $e.e:case pe.e:{var s=t.payload;const r=s.postIds,n=s.profileName,a={};for(const e of r)a[Object(Jf.a)(e,n)]=e;return Object.assign({},e,a)}default:return e}},im=Object(r.c)({api:qf,extraComments:Xf,keyToCommentThreadLinkSets:sm,keyToHeadCommentId:nm,keyToPostId:cm}),om=Object(r.c)({chrono:Mf,conversations:im});const dm={};var um=(e=dm,t)=>(t.type,e);const lm={};var bm=(e=lm,t)=>{switch(t.type){case le.a:case le.d:{var s=t.payload;const r=s.listingKey,n=s.error;return Object.assign({},e,{[r]:n})}case le.b:case le.c:case le.i:case le.f:case le.e:case le.g:{const s=t.payload.listingKey;return Object.assign({},e,{[s]:null})}default:return e}};const pm={};var Om=(e=pm,t)=>{switch(t.type){case le.b:case le.f:{const s=t.payload.listingKey;return Object.assign({},e,{[s]:!0})}case le.a:case le.d:case le.c:case le.i:case le.e:case le.g:{const s=t.payload.listingKey;return Object.assign({},e,{[s]:!1})}default:return e}},fm=Object(r.c)({error:bm,pending:Om});const mm={};var jm=(e=mm,t)=>{switch(t.type){case le.c:case le.i:case le.e:case le.g:{var s=t.payload;const r=s.listingKey,n=s.itemIds;return Object.assign({},e,{[r]:[...e[r]||[],...n]})}default:return e}};const gm={};var ym=(e=gm,t)=>{switch(t.type){case le.i:case le.c:case le.e:case le.g:{var s=t.payload;const r=s.pageInfo,n=s.listingKey;return r?Object.assign({},e,{[n]:r}):gm}default:return e}},_m=Object(r.c)({api:fm,ids:jm,pageInfo:ym}),Em=s("./src/reddit/actions/profile/constants.ts"),hm=s("./src/reddit/actions/subscription.ts");const Sm={};var Tm=(e=Sm,t)=>{switch(t.type){case oe.q:case He.c:return Object.assign({},e,t.payload.profileAboutInfo);case Em.h:{const s=t.payload;return s.profile?Object.assign({},e,{[s.profile.id]:s.about}):e}case hm.e:{var s=t.payload;const r=s.identifier,n=s.userIsSubscriber;if("profile"!==r.type)return e;const a=r.id;return Object.assign({},e,{[a]:Object.assign({},e[a],{userIsSubscriber:n})})}case Le.n:{const s=t.payload.profilesAboutInfo;return s?0===Object.keys(s).length?e:Object.assign({},e,s):e}case sd.m:{const s=t.payload,r=e[s.subredditId];if(!r)return e;if(r.publicDescription===s.settings.publicDescription)return e;const n=Object.assign({},r,{publicDescription:s.settings.publicDescription});return Object.assign({},e,{[s.subredditId]:n})}default:return e}};const Im={},vm=(e,t)=>{if(!t)return e;const s=Object.keys(t);if(!s.length)return e;const r={};return s.forEach(s=>{const n=e[s],a=Object.assign({},t[s]);n&&tr()(n,a)||(r[s]=a)}),Object.keys(r).length?Object.assign({},e,r):e};var Cm=(e=Im,t)=>{switch(t.type){case we.b:case Ue.b:case oe.b:case oe.g:case de.b:case de.e:case le.c:case le.i:case le.e:case le.g:case $e.b:case $e.e:case ue.e:case qe.b:case we.b:case Me.e:case Me.h:case Le.e:case Le.n:case He.c:case Oe.i:case Em.i:case pe.b:case pe.e:case oe.q:case Fe.b:case Be.b:case sn.e:case Vn.a:case be.b:case oe.l:case Ve.b:case hm.d:return vm(e,t.payload.profiles);case He.d:{const s=t.payload.typeaheadSuggestions;return Object.keys(s).length?vm(e,s.profiles):e}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:case ie.n:{const s=t.payload.response.profiles;return vm(e,s)}case Em.h:{const s=t.payload.profile;return s?vm(e,{[s.id]:s}):e}case sd.m:{const r=t.payload;var s=r.settings;const n=s.title,a=s.over18,c=e[r.subredditId];return!c||c.title===n&&c.isNSFW===a?e:Object.assign({},e,{[r.subredditId]:Object.assign({},c,{id:r.subredditId,title:n,isNSFW:a})})}default:return e}};const Rm={};var Am=(e=Rm,t)=>{switch(t.type){case Em.c:case Em.f:{const s=t.payload.profileName;return Object.assign({},e,{[(s||"").toLowerCase()]:!0})}case Em.a:case Em.b:case Em.d:case Em.e:{const s=t.payload.profileName;return Object.assign({},e,{[(s||"").toLowerCase()]:!1})}default:return e}},Dm=Object(r.c)({pending:Am});const Pm={};var xm=(e=Pm,t)=>{switch(t.type){case Em.b:{var s=t.payload;const r=s.profileName,n=s.data.map(e=>e.id);return Object.assign({},e,{[(r||"").toLowerCase()]:n})}case Em.e:case le.c:case le.i:case le.e:case le.g:{var r=t.payload;const s=r.profileName,n=r.moderatedSubredditIds;return n?Object.assign({},e,{[s]:[...e[s]||[],...n]}):e}default:return e}};const wm={};var Nm=(e=wm,t)=>{switch(t.type){case Em.e:{var s=t.payload;const r=s.pageInfo,n=s.profileName;return Object.assign({},e,{[n]:r})}case le.c:case le.i:{var r=t.payload;const s=r.moderatedPageInfo,n=r.profileName;return Object.assign({},e,{[n]:s})}default:return e}},km=Object(r.c)({api:Dm,models:xm,pageInfo:Nm}),Lm=s("./src/reddit/actions/pinnedPost.ts");const Um={};var Mm=Object($O.a)((e=Um,t)=>{switch(t.type){case Lm.a:{var s=t.payload;const r=s.pinned,n=s.profileId;return Object.assign({},e,{[n]:r})}case Lm.d:{var r=t.payload;const s=r.postId,n=r.profileId,a=e[n]||[];return Object.assign({},e,{[n]:[...a,s].slice(-Wn.db)})}case Lm.g:{var n=t.payload;const s=n.postId,r=n.profileId,a=e[r]||[];return Object.assign({},e,{[r]:a.filter(e=>e!==s)})}default:return e}},Um);const Gm={};var Fm=Object($O.a)((e=Gm,t)=>{switch(t.type){case Lm.a:{var s=t.payload;const r=s.pinned,n=s.profileId;return Object.assign({},e,{[n]:r})}default:return e}},Gm);const Bm={};var $m=Object($O.a)((e=Bm,t)=>{switch(t.type){case Lm.c:case Lm.f:{var s=t.payload;const r=s.postId,n=s.profileId,a=e[n]||[];return Object.assign({},e,{[n]:[...a,r]})}case Lm.b:case Lm.e:case Lm.d:case Lm.g:{var r=t.payload;const s=r.postId,n=r.profileId,a=e[n]||[];return Object.assign({},e,{[n]:a.filter(e=>e!==s)})}default:return e}},Bm),qm=Object(r.c)({data:Mm,initialData:Fm,pending:$m}),Vm=s("./src/reddit/actions/trophyCase.ts");const Hm={};var Km=(e=Hm,t)=>{switch(t.type){case Vm.a:{var s=t.payload;const r=s.profileId,n=s.trophyIds;return Object.assign({},e,{[r]:n})}default:return e}},Wm=Object(r.c)({about:Tm,models:Cm,moderated:km,pinnedPosts:qm,trophyCases:Km}),Ym=s("./src/reddit/actions/promo.ts");const zm={mobilePromoBanner:!1,upsellSignUpBannerLarge:!1,upsellSignUpBannerMedium:!1,upsellSignUpBannerSmall:null};var Qm=(e=zm,t)=>{switch(t.type){case Ym.b:{const s=t.payload.promoType;return Object.assign({},e,{[s]:!0})}case Ym.a:{const s=t.payload.promoType;return Object.assign({},e,{[s]:!1})}default:return e}};const Xm={};var Jm=(e=Xm,t)=>{switch(t.type){case Ue.b:case oe.b:case de.b:case ce.t:case ue.b:case pe.e:case pe.b:case qe.b:case Oe.i:case be.b:case $e.e:case $e.b:case de.e:case ue.e:{const s=t.payload.providerFlair;return s?Y()(s,e):e}default:return e}},Zm=Object(r.c)({models:Jm});const ej={};var tj=(e=ej,t)=>{switch(t.type){case Ve.b:return Object.assign({},e,t.payload);case Ve.a:default:return e}},sj=s("./src/reddit/actions/removalReasons/constants.ts");var rj=(e=null,t)=>{switch(t.type){case sj.k:case sj.l:case sj.b:case sj.c:case sj.h:case sj.i:case sj.e:case sj.f:return null;case sj.j:case sj.a:case sj.g:case sj.d:return t.payload;default:return e}};var nj=(e=!1,t)=>{switch(t.type){case sj.k:case sj.b:case sj.h:case sj.e:return!0;case sj.l:case sj.j:case sj.c:case sj.a:case sj.i:case sj.g:case sj.f:case sj.d:return!1;default:return e}},aj=Object(r.c)({error:rj,pending:nj}),cj=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const ij={};var oj=(e=ij,t)=>{switch(t.type){case sj.l:{const s=t.payload.response.data;return Object.assign({},e,s)}case sj.c:case sj.i:{const s=t.payload.reason;return Object.assign({},e,{[s.id]:s})}case sj.f:{const s=t.payload.reasonId;return e[s],cj(e,["symbol"==typeof s?s:s+""])}default:return e}};const dj={};var uj=(e=dj,t)=>{switch(t.type){case sj.l:{var s=t.payload;const r=s.subredditId,n=s.response.order;return Object.assign({},e,{[r]:n})}case sj.c:{var r=t.payload;const s=r.subredditId,n=r.reason;return Object.assign({},e,{[s]:[...e[s],n.id]})}case sj.f:{var n=t.payload;const s=n.subredditId,r=n.reasonId,a=[...e[s]].filter(e=>e!==r);return Object.assign({},e,{[s]:a})}default:return e}};var lj=(e=null,t)=>{switch(t.type){case sj.t:{var s=t.payload;const e=s.subredditId;return{itemIds:s.itemIds,subredditId:e}}default:return e}},bj=Object(r.c)({api:aj,models:oj,reasonOrder:uj,removedItemIds:lj});const pj={};var Oj=(e=pj,t)=>{switch(t.type){case j.d:case j.c:{const s=t.payload.id;return Object.assign({},e,{[s]:!1})}case j.b:{const s=t.payload.id;return Object.assign({},e,{[s]:!0})}case j.e:{const s=t.payload;return s?Object.assign({},e,{[s]:!1}):e}default:return e}};const fj={};var mj=(e=fj,t)=>{switch(t.type){case j.d:{const s=t.payload.id;return Object.assign({},e,{[s]:!0})}case j.c:case j.b:{const s=t.payload.id;return Object.assign({},e,{[s]:!1})}case j.e:{const s=t.payload;return s?Object.assign({},e,{[s]:!1}):e}default:return e}};const jj={};var gj=(e=jj,t)=>{switch(t.type){case j.c:{const s=t.payload.id;return Object.assign({},e,{[s]:!0})}case j.d:case j.b:{const s=t.payload.id;return Object.assign({},e,{[s]:!1})}case j.e:{const s=t.payload;return s?Object.assign({},e,{[s]:!1}):e}default:return e}},yj=Object(r.c)({error:Oj,pending:mj,success:gj});var _j=(e=!1,t)=>{switch(t.type){case j.a:return t.payload;case c.c:return!t.payload&&e;case O.a:return!1;case j.e:return!!t.payload&&e;default:return e}};var Ej=(e=null,t)=>{switch(t.type){case j.e:return t.payload;case c.c:return t.payload?null:e;case O.a:return null;default:return e}};var hj=(e=!1,t)=>{switch(t.type){case j.f:return t.payload;case j.e:return!1;default:return e}},Sj=Object(r.c)({api:yj,openedFromModalPage:_j,postOrCommentId:Ej,userIsMod:hj});Object(Xc.a)("REQUEST_HOST_SET");var Tj=(e="",t)=>{switch(t.type){case"REQUEST_HOST_SET":return t.payload;default:return e}};Object(Xc.a)("RUN_TIME_ENV_VARS__IS_STAGING");const Ij={staging:!1,startTimeInMillis:(new Date).getTime()};var vj=(e=Ij,t)=>{switch(t.type){case"RUN_TIME_ENV_VARS__IS_STAGING":return Object.assign({},e,{staging:!0});default:return e}};var Cj=(e=null,t)=>{switch(t.type){case oe.q:case He.e:{const e=t.payload.searchQuery;return e||null}default:return e}};const Rj={};var Aj=(e=Rj,t)=>{switch(t.type){case He.d:{var s=t.payload;const r=s.order,n=s.searchQuery;return Object.assign({},e,{[n.toLowerCase()]:r})}default:return e}},Dj=s("./src/reddit/models/Search/index.ts");const Pj={};var xj=(e=Pj,t)=>{switch(t.type){case He.d:{const s=t.payload.typeaheadSuggestions,r={};return Object.keys(s).forEach(e=>{const t=s[e];return r[e]=Object(Dj.d)(t)}),Object.assign({},e,r)}default:return e}},wj=Object(r.c)({idsByQuery:Aj,models:xj});const Nj={};var kj=(e=Nj,t)=>{switch(t.type){case oe.q:{var s=t.payload;const r=s.viewTreatment,n=s.key;return r?Object.assign({},e,{[n]:r}):e}default:return e}},Lj=Object(r.c)({searchQuery:Cj,typeahead:wj,viewTreatment:kj}),Uj=s("./src/reddit/models/SearchDiscoveryUnit/index.ts");const Mj={};var Gj=(e=Mj,t)=>{switch(t.type){case oe.q:{var s=t.payload;const r=s.key,n=s.listingOrder,a=s.postOrder,c=s.posts,i=s.searchQuery,o=s.subreddits,d=s.viewTreatment,u={subredditIcons:[],displayText:null,subredditOccurrences:0,searchQuery:i};if(d===Uj.c.Trending){const e=[];if(n&&n.map(t=>{!e.includes(t.id)&&o[t.id]&&(e.push(t.id),u.subredditIcons.push({url:o[t.id].icon.url,subredditName:o[t.id].name}),u.displayText||(u.displayText=o[t.id].displayText))}),a)for(let t=0;e.length<5&&t<a.length;t++){const s=c[a[t]],r=s&&s.belongsTo?s.belongsTo.id:void 0;r&&!e.includes(r)&&o[r]&&(e.push(r),u.subredditIcons.push({url:o[r].icon.url,subredditName:o[r].name}))}o&&(u.subredditOccurrences=Object.keys(o).length-1)}return Object.assign({},e,{[r]:u})}default:return e}};const Fj={};var Bj=(e=Fj,t)=>{switch(t.type){case oe.q:{var s=t.payload;const r=s.key,n=s.searchDiscoveryUnits;return n&&Object.keys(n).length?Object.assign({},e,{[r]:n}):e}default:return e}};const $j={};var qj=(e=$j,t)=>{switch(t.type){case oe.q:{var s=t.payload;const r=s.key,n=s.searchDiscoveryUnitOrder;return n?Object.assign({},e,{[r]:n}):$j}default:return e}},Vj=Object(r.c)({headerContent:Gj,models:Bj,order:qj}),Hj=s("./src/reddit/actions/shortcuts.ts");var Kj=(e=null,t)=>{switch(t.type){case Hj.a:return t.payload;case O.a:return null;default:return e}};var Wj=(e=null,t)=>{switch(t.type){case Hj.b:return t.payload||null;default:return e}},Yj=s("./src/reddit/constants/history.ts"),zj=s("./src/reddit/constants/shortcuts.ts"),Qj=s("./src/reddit/helpers/history/index.ts");const Xj=zj.d.Global,Jj=e=>{switch(e.name){case"comments":return Object(Qj.b)(Yj.a.IsOverlay)?zj.d.Lightbox:zj.d.CommentPage;case"subredditCreation":return Object(Qj.b)(Yj.a.IsOverlay)?zj.d.Lightbox:Xj;case"index":case"listing":case"multireddit":case"searchResults":case"subreddit":return zj.d.Listing;case"modQueuePages":return zj.d.Modqueue;default:return Xj}};var Zj=(e=Xj,t)=>{switch(t.type){case O.a:const s=t.payload;if(s.routeMatch){const e=s.routeMatch.route.meta;return Jj(e)}return Xj;default:return e}},eg=Object(r.c)({activeCommentId:Kj,activePostId:Wj,namespace:Zj});var tg=(e=!1,t)=>{if(e)return e;switch(t.type){case Ut.b:case Ut.c:return!0;default:return e}},sg=s("./src/reddit/reducers/sidebarPromotedPosts/models/index.ts"),rg=Object(r.c)({firstFetch:tg,models:sg.b}),ng=s("./src/reddit/actions/sitewideRules.ts");const ag=[];var cg=(e=ag,t)=>{switch(t.type){case ng.a:return t.payload;default:return e}},ig=s("./src/reddit/models/StructuredStyles/index.ts");const og={};var dg=(e=og,t)=>{switch(t.type){case g.h:case g.b:case g.e:return t.payload.styles;case g.f:return og;case g.c:{const s=t.payload;return Object.assign({},e,s)}case g.i:{const e=t.payload;return Object(ig.d)(e.styles)}default:return e}},ug=s("./src/reddit/actions/exportImportStyles.ts");var lg=(e=null,t)=>{switch(t.type){case ug.c:case ug.b:return null;case ug.a:return t.payload;default:return e}};var bg=(e=!1,t)=>{switch(t.type){case ug.c:return!0;case ug.b:case ug.a:return!1;default:return e}},pg=Object(r.c)({error:lg,pending:bg}),Og=s("./src/reddit/actions/postFlairStyleTemplate.ts");const fg={};var mg=(e=fg,t)=>{switch(t.type){case g.d:case Og.b:var s=t.payload;return{[s.flairId]:s.template};case g.k:return fg;case Og.a:case tO.b:case g.i:return fg;default:return e}};const jg={};var gg=(e=jg,t)=>{switch(t.type){case be.b:case Ue.b:case oe.b:case oe.q:case He.c:case Be.b:case Vn.a:{const s=t.payload;if(!s.structuredStyles||!s.structuredStyles.data)return e;const r=s.structuredStyles.data.flairTemplate;return Object.assign({},e,r)}case Og.c:{var s=t.payload;const r=s.flairId,n=s.template;return Object.assign({},e,{[r]:n})}case Og.a:{const s=t.payload.flairId;return Object(Go.a)(e,s)}case tO.b:{const s=t.payload.templateId;return Object(Go.a)(e,s)}case g.i:return jg;default:return e}},yg=Object(r.c)({draft:mg,models:gg});const _g={};var Eg=(e=_g,t)=>{switch(t.type){case g.g:{const s=t.payload;return Object.assign({},e,{[s.imageKey]:s.uploadId})}case g.i:case g.f:return _g;default:return e}};var hg=(e=!1,t)=>{switch(t.type){case g.k:case g.f:return!1;case g.a:return!0;default:return e}};var Sg=(e=null,t)=>{switch(t.type){case g.e:return t.payload.subredditId;case g.f:return null;case O.a:return t.payload.location.search.indexOf("styling=true")>-1?e:null;case sd.f:return null;default:return e}};const Tg={};var Ig=(e=Tg,t)=>{switch(t.type){case be.b:case Ue.b:case oe.b:case Be.b:case Vn.a:{const s=t.payload;if(!s.structuredStyles||!s.structuredStyles.data)return e;const r=Object.keys(s.subredditAboutInfo||{});if(1!==r.length)return e;const n=r[0],a=s.structuredStyles.data.style;return Object.assign({},e,{[n]:a})}case He.c:case oe.q:{const s=t.payload;if(!s.structuredStyles||!s.structuredStyles.data)return e;if(!s.subredditName)return e;let r;if(cs()(s.subreddits,(e,t)=>{if(e.name.toLowerCase()===s.subredditName.toLowerCase())return r=t,!1}),!r)return e;const n=s.structuredStyles.data.style;return Object.assign({},e,{[r]:n})}case g.j:{const s=t.payload,r=e[s.subredditId];return Object.assign({},e,{[s.subredditId]:Object.assign({},r,s.styles)})}case g.h:{const s=t.payload;return Object.assign({},e,{[s.subredditId]:s.styles})}case g.i:{const s=t.payload,r=Object(ig.d)(s.styles);return Object.assign({},e,{[s.subredditId]:r})}case Em.h:{const s=t.payload,r=s.banner,n=s.profile;if(!r||!n)return e;const a=e[n.id];return Object.assign({},e,{[n.id]:Object.assign({},a,{bannerBackgroundImage:r.url})})}case sd.k:{const s=t.payload;return"profileBanner"===s.key?vO(e,{[s.subredditId]:{bannerBackgroundImage:s.imageUrl}}):e}case sd.j:{const s=t.payload;return"profileBanner"===s.key?vO(e,{[s.subredditId]:{bannerBackgroundImage:void 0}}):e}default:return e}},vg=Object(r.c)({draft:dg,exportStyles:pg,flairTemplate:yg,imagePreviews:Eg,isBladeEditorDirty:hg,isEditing:Sg,models:Ig});Object(Xc.a)("STYLESHEETS__EXTRACTED_FROM_MANIFEST");var Cg=(e="",t)=>{switch(t.type){case"STYLESHEETS__EXTRACTED_FROM_MANIFEST":return t.payload;default:return e}},Rg=s("./src/reddit/actions/subredditAutocomplete.ts");const Ag={};var Dg=(e=Ag,t)=>{switch(t.type){case Rg.c:case Rg.b:{const s=t.payload.key;return Object.assign({},e,{[s]:null})}case Rg.a:{var s=t.payload;const r=s.key,n=s.error;return Object.assign({},e,{[r]:n})}default:return e}};const Pg={};var xg=(e=Pg,t)=>{switch(t.type){case Rg.c:{const s=t.payload.key;return Object.assign({},e,{[s]:!0})}case Rg.b:case Rg.a:{const s=t.payload.key;return Object.assign({},e,{[s]:!1})}default:return e}},wg=Object(r.c)({error:Dg,pending:xg});const Ng={};var kg=(e=Ng,t)=>{switch(t.type){case Rg.b:{const s=t.payload.key;return Object.assign({},e,{[s]:t.payload})}default:return e}},Lg=Object(r.c)({api:wg,models:kg});const Ug={};var Mg=(e=Ug,t)=>{switch(t.type){case Os.c:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!0})}case Os.a:case Os.d:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}};const Gg={};var Fg=(e=Gg,t)=>{switch(t.type){case Os.d:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!0})}case Os.a:case Os.c:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}};const Bg={};var $g=(e=Bg,t)=>{switch(t.type){case Os.d:{const s=t.payload.subredditId;return e[s]?e:Object.assign({},e,{[s]:!1})}case Os.a:{var s=t.payload;const r=s.subredditId,n=s.isSubredditWhitelisted;return Object.assign({},e,{[r]:n})}case Os.c:{const s=t.payload.subredditId;return Object.assign({},e,{[s]:!1})}default:return e}},qg=Object(r.c)({error:Mg,pending:Fg,whitelist:$g}),Vg=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const Hg={};var Kg=(e=Hg,t)=>{switch(t.type){case Os.a:return Object.assign({},e,t.payload.collection);case Os.e:{const s=t.payload.channel;return Object.assign({},e,{[s.channelId]:Object.assign({},s)})}case Os.f:{var s=t.payload;const r=s.channel,n=s.editedSubredditChannelData;return r.name=n.room,r.description=n.description,r.minimumAcctAge=r.minimumAcctAge,r.newMemberAge=r.newMemberAge,Object.assign({},e,{[r.channelId]:Object.assign({},r)})}case Os.g:{const s=t.payload;return e[s],Vg(e,["symbol"==typeof s?s:s+""])}default:return e}};var Wg=(e=null,t)=>{switch(t.type){case Os.h:return t.payload.channelId;case Os.g:return e===t.payload?null:e;default:return e}},Yg=Object(r.c)({api:qg,models:Kg,selected:Wg}),zg=s("./src/reddit/actions/monthsToMinutes/homeFeed.ts");const Qg={};var Xg=(e=Qg,t)=>{switch(t.type){case Ue.b:case oe.b:case oe.q:case be.a:case be.b:case Be.b:case Vn.a:case de.b:case de.e:case $e.b:case $e.a:case $e.e:case $e.d:case ue.e:case pe.b:case pe.e:case He.c:{const s=t.payload.subredditAboutInfo;if(!s)return e;const r=Object.keys(s);return 0===r.length?e:r.reduce((e,t)=>(s[t]&&(e[t]?e[t]=Object.assign({},e[t],s[t]):e[t]=s[t]),e),Object.assign({},e))}case bc.a:{var s=t.payload;const r=s.subredditId,n=s.emojisEnabled,a=e[r],c=Object.assign({},a,{emojisEnabled:n});return Object.assign({},e,{[r]:c})}case hm.e:{var r=t.payload;const s=r.identifier,n=r.userIsSubscriber;if("subreddit"!==s.type)return e;const a=s.id;return Object.assign({},e,{[a]:Object.assign({},e[a],{userIsSubscriber:n})})}case Ft.e:case zg.b:case Ge.b:case Le.k:case Oe.m:{const s=t.payload.subredditsAboutInfo;if(!s)return e;const r=Object.keys(s);return 0===r.length?e:r.reduce((e,t)=>(s[t]&&(e[t]=e[t]?Object.assign({},e[t],s[t]):s[t]),e),Object.assign({},e))}case bc.b:{const s=t.payload,r=s.emojiCustomSize,n=s.subredditId,a=e[n];if(!a)return e;const c=Object.assign({},a);if(r){const e=r.width,t=r.height;c.emojisCustomSize=[e,t]}else delete c.emojisCustomSize;return Object.assign({},e,{[n]:c})}case Oe.c:{const s=t.payload.data;return Object.assign({},e,s)}default:return e}};const Jg={};var Zg=(e=Jg,t)=>{switch(t.type){case Oe.b:case Oe.c:{const s=t.payload.subredditName;return Object.assign({},e,{[s.toLowerCase()]:null})}case Oe.a:{var s=t.payload;const r=s.subredditName,n=s.error;return Object.assign({},e,{[r.toLowerCase()]:n})}default:return e}};var ey=(e=!1,t)=>{switch(t.type){case Oe.b:return!0;case Oe.c:case Oe.a:return!1;default:return e}},ty=Object(r.c)({error:Zg,pending:ey}),sy=s("./src/reddit/actions/subredditCreation.ts");var ry=(e=null,t)=>{switch(t.type){case sy.a:return t.payload.error||null;case sy.b:case sy.c:return null;default:return e}};var ny=(e=null,t)=>{switch(t.type){case sy.c:return t.payload.subredditName||null;case sy.a:case sy.b:return null;default:return e}};var ay=(e=!1,t)=>{switch(t.type){case sy.b:return!0;case sy.c:case sy.a:return!1;default:return e}},cy=Object(r.c)({error:ry,lastConnectedSubredditId:ny,pending:ay});const iy={apiError:null};var oy=(e=iy,t)=>{switch(t.type){case sy.e:{const s=t.payload.error;return Object.assign({},e,{apiError:s})}case sy.d:case sy.f:case sy.g:return iy;default:return e}};var dy=(e=null,t)=>{switch(t.type){case sy.g:return t.payload.subredditName||null;case sy.f:case sy.e:return null;default:return e}};var uy=(e=!1,t)=>{switch(t.type){case sy.f:return!0;case sy.g:case sy.e:return!1;default:return e}},ly=Object(r.c)({error:oy,lastCreatedSubredditId:dy,pending:uy}),by=s("./src/reddit/actions/subredditRules/constants.ts");var py=(e=!1,t)=>{switch(t.type){case by.c:return!0;case by.a:case by.b:return!1;default:return e}},Oy=s("./src/reddit/actions/pages/subredditWiki/constants.ts");const fy={};var my=(e=fy,t)=>{switch(t.type){case Oy.g:case Oy.f:{const s=t.payload.options.subredditName;return Object.assign({},e,{[s.toLowerCase()]:null})}case Oy.e:{const s=t.payload,r=s.options,n=s.error,a=r.subredditName;return Object.assign({},e,{[a.toLowerCase()]:n})}default:return e}};const jy={};var gy=(e=jy,t)=>{switch(t.type){case Oy.g:{const s=t.payload.options.subredditName;return Object.assign({},e,{[s.toLowerCase()]:!0})}case Oy.f:case Oy.e:{const s=t.payload.options.subredditName;return Object.assign({},e,{[s.toLowerCase()]:!1})}default:return e}},yy=Object(r.c)({error:my,pending:gy});const _y={};var Ey=(e=_y,t)=>{switch(t.type){case hO.c:case hO.b:{const s=t.payload.subredditName;return Object.assign({},e,{[s.toLowerCase()]:null})}case hO.a:{var s=t.payload;const r=s.subredditName,n=s.error;return Object.assign({},e,{[r.toLowerCase()]:n})}default:return e}};const hy={};var Sy=(e=hy,t)=>{switch(t.type){case hO.c:{const s=t.payload.subredditName;return Object.assign({},e,{[s.toLowerCase()]:!0})}case hO.b:case hO.a:{const s=t.payload.subredditName;return Object.assign({},e,{[s.toLowerCase()]:!1})}default:return e}},Ty=Object(r.c)({error:Ey,pending:Sy}),Iy=Object(r.c)({about:ty,connectToPartner:cy,create:ly,rules:py,topContent:Ty,wiki:yy}),vy=s("./node_modules/lodash/isNil.js"),Cy=s.n(vy);const Ry={};var Ay=(e=Ry,t)=>{switch(t.type){case Oe.d:{var s=t.payload;const r=s.subredditId,n=s.forceState;return Object.assign({},e,{[r]:Cy()(n)?!e[r]:n})}default:return e}},Dy=Object(r.c)({meta:Ay});const Py={};var xy=(e=Py,t)=>{switch(t.type){case Ft.e:{var s=t.payload;const r=s.categoryId,n=s.subredditIds;return es()(n)?e:Object.assign({},e,{[r]:n})}default:return e}},wy=s("./src/reddit/actions/subredditCrosspostable.ts");var Ny=(e=null,t)=>{switch(t.type){case wy.a:return t.payload.error;case wy.c:case wy.b:return null;default:return e}};var ky=(e=!1,t)=>{switch(t.type){case wy.c:return!0;case wy.b:case wy.a:return!1;default:return e}},Ly=Object(r.c)({errors:Ny,pending:ky});const Uy={};var My=(e=Uy,t)=>{switch(t.type){case wy.b:{const s=t.payload.subredditIds;return tr()(e,s)?e:s}default:return e}},Gy=Object(r.c)({api:Ly,ids:My});const Fy={};var By=(e=Fy,t)=>{switch(t.type){case AO.a:{const s=t.payload,r=s.subredditId,n=s.distinguishKey,a=s.postIds;if(!(r in e))return Object.assign({},e,{[r]:{[n]:a}});const c=e[r];return vO(c,{[n]:a})===c?e:Object.assign({},e,{[r]:Object.assign({},c,{[n]:a})})}default:return e}},$y=Object(r.c)({models:By});const qy={};var Vy=(e=qy,t)=>{switch(t.type){case b.a:{var s=t.payload;const r=s.assets,n=s.subredditId;return Object.assign({},e,{[n]:r})}case p.e:case p.h:{var r=t.payload;const s=r.subredditId,n=r.mainHeader,a=e[s]||{};return Object.assign({},e,{[s]:Object.assign({},a,{mainHeader:n})})}default:return e}};const Hy={};var Ky=(e=Hy,t)=>{switch(t.type){case b.a:{var s=t.payload;const r=s.subredditId,n=s.distribution;return Object.assign({},e,{[r]:n})}default:return e}};const Wy={};var Yy=(e=Wy,t)=>{switch(t.type){case b.a:{var s=t.payload;const r=s.subredditId,n=s.meta;return Object.assign({},e,{[r]:n})}default:return e}};const zy={};var Qy=(e=zy,t)=>{switch(t.type){case b.p:{var s=t.payload;const r=s.subredditId,n=s.releaseNotes;return Object.assign({},e,{[r]:n})}default:return e}},Xy=Object(r.c)({assets:Vy,distributions:Ky,meta:Yy,releaseNotes:Qy}),Jy=s("./node_modules/lodash/isEqualWith.js"),Zy=s.n(Jy),e_=s("./src/lib/forceHttps/index.ts"),t_=s("./src/reddit/models/Subreddit/index.ts");const s_={},r_=(e,t)=>{return!Zy()(e,t,(e,t,s)=>{if("subscribers"===s)return!0})},n_=(e,t)=>{if(!t)return e;const s=Object.keys(t);if(!s.length)return e;const r={};for(let n=0;n<s.length;n++){const a=s[n],c=e[a],i=t[a];c&&!r_(c,i)||(r[a]=i)}return Object.keys(r).length?Object.assign({},e,r):e};var a_=(e=s_,t)=>{switch(t.type){case hm.d:return((e,t)=>{const s=Object.keys(t);if(s.length){const r=Object.assign({},e);return s.forEach(s=>{const n=e[s],a=t[s],c=n?Object.assign({},n,a):Object.assign({},a);a.icon.url?c.icon.url=Object(e_.a)(a.icon.url):n&&n.icon.url?c.icon=n.icon:c.icon.url="",r[s]=c}),r}return e})(e,t.payload.subreddits||{});case Ft.e:case we.b:case Me.e:case Me.h:case ie.n:case ke.b:case ke.e:case Ge.b:case Le.e:case Le.k:case Fe.b:case Ue.b:case zg.b:case oe.b:case oe.g:case oe.l:case de.b:case de.e:case le.c:case le.i:case le.e:case le.g:case $e.b:case $e.e:case ue.b:case ue.e:case Em.e:case oe.q:case be.b:case Be.b:case sn.e:case Vn.a:case Em.i:case pe.b:case pe.e:case qe.b:case Ve.b:case He.c:case Oe.f:case Oe.i:case Oe.m:case Ne.b:return n_(e,t.payload.subreddits||{});case ie.i:case ie.l:case ie.p:case ie.s:case ie.y:{const s=t.payload.response.subreddits;return n_(e,s)}case He.d:{const s=t.payload.typeaheadSuggestions;return n_(e,s.subreddits||{})}case EO.i:{const s=t.payload.subreddits,r={};return Object.keys(s).map(e=>{const t=s[e];r[e]=((e,t)=>({displayText:`r/${e}`,name:e,id:t,icon:{height:null,url:"",width:null},subscribers:0,title:e,type:t_.b.Public,url:`/r/${e}`,isNSFW:!1}))(t,e)}),Object.assign({},r,e)}default:return e}};var c_=(e=null,t)=>{switch(t.type){case Oe.e:return t.payload.error;case Oe.g:case Oe.f:return null;default:return e}};var i_=(e=!1,t)=>{switch(t.type){case Oe.g:case Oe.f:return!0;case Oe.e:return!1;default:return e}};var o_=(e=!1,t)=>{switch(t.type){case Oe.g:return!0;case Oe.f:case Oe.e:return!1;default:return e}},d_=Object(r.c)({errors:c_,fetched:i_,pending:o_});var u_=(e=null,t)=>{switch(t.type){case Oe.f:{const e=t.payload.subreddits,s=Object.keys(e);return s.sort((t,s)=>e[t].displayText.toLowerCase()>e[s].displayText.toLowerCase()?1:-1),s}default:return e}},l_=Object(r.c)({api:d_,order:u_});const b_=[];var p_=(e=b_,t)=>{switch(t.type){case Oe.m:{const s=t.payload.subreddits;if(!s)return e;const r=Object.keys(s);if(0===r.length)return e;const n=r.filter(t=>!e.includes(t));return 0===n.length?e:[...e,...n]}default:return e}};const O_={};var f_=(e=O_,t)=>{switch(t.type){case m.g:{var s=t.payload;const r=s.subredditId,n=s.products,a=Object.keys(n).reduce((e,t)=>(e[t]=!0,e),{});return Object.assign({},e,{[r]:a})}default:return e}};const m_={};var j_=(e=m_,t)=>{switch(t.type){case by.b:{var s=t.payload;const r=s.rules,n={[s.subredditId]:{rules:r.rules}};return Object.assign({},e,n)}case by.e:{var r=t.payload;const s=r.rules,n=r.subredditId,a={[n]:{rules:[...e[n].rules,...s.rules]}};return Object.assign({},e,a)}case by.f:{var n=t.payload;const s=n.rules,r=n.subredditId,a=n.oldName;s.rules.shortName!==a&&(e[r].rules=e[r].rules.filter(e=>e.shortName!==a));const c={[r]:{rules:[...s.rules,...e[r].rules]}};return c[r].rules.sort((e,t)=>e.priority-t.priority),Object.assign({},e,c)}case by.g:case by.d:{var a=t.payload;const s=a.rules,r={[a.subredditId]:{rules:s.rules}};return Object.assign({},e,r)}default:return e}},g_=s("./src/reddit/actions/subredditSettings.ts");const y_={};var __=(e=y_,t)=>{switch(t.type){case g_.h:{const e=t.payload;return{[e.subredditId]:e}}case g_.i:{const s=t.payload,r=e[s.subredditId]||{};return Object.assign({},e,{[s.subredditId]:Object.assign({},r,s)})}case sd.m:{const s=t.payload,r=e[s.subredditId]||{},n=Object.assign({},r,s.settings);return Object.assign({},e,{[s.subredditId]:n})}default:return e}};const E_={};var h_=(e=E_,t)=>{switch(t.type){case Oy.f:const s=t.payload,r=s.subredditWiki,n=s.options,a=r&&r.index;if(!a)return e;const c=n.subredditName;return Object.assign({},e,{[c.toLowerCase()]:a});default:return e}};const S_={};var T_=(e=S_,t)=>{switch(t.type){case Oy.f:const r=t.payload;var s=r.options;const n=s.subredditName,a=s.wikiPageName;if(!a||!r.subredditWiki.page)return e;const c=n.toLowerCase(),i=r.subredditWiki.page;return Object.assign({},e,{[c]:Object.assign({},e[c],{[a.toLowerCase()]:i})});default:return e}},I_=Object(r.c)({listingPage:h_,pages:T_});const v_={};var C_=(e=v_,t)=>{switch(t.type){case Le.k:{var s=t.payload;const r=s.category,n=s.subreddits;return Object.assign({},e,{[r]:Object.keys(n)})}default:return e}};const R_={};var A_=(e=R_,t)=>{switch(t.type){case hO.b:{const s=t.payload.subredditTopContent;return Object.assign({},e,s)}default:return e}};const D_=[];var P_=(e=D_,t)=>{switch(t.type){case Fe.b:case oe.g:case be.b:{const s=t.payload.trendingSubredditIds;return s&&s.length?s:e}default:return e}},x_=Object(r.c)({about:Xg,api:Iy,appliedFilters:Dy,byCategory:xy,crosspostable:Gy,duplicates:$y,gov:Xy,models:a_,moderated:l_,original:p_,products:f_,rules:j_,settings:__,subredditWiki:I_,top:C_,topContent:A_,trending:P_}),w_=s("./node_modules/lodash/cloneDeep.js"),N_=s.n(w_);const k_={titleRegEx:{regex:null},titleStrings:{strings:null},titleLength:{min:null,max:null},postLength:{min:null,max:null},postingGuidelines:{guidelines:null},postBodyRequirement:{requirement:null},linkListPermission:{permission:null},linkDomain:{whitelist:null,blacklist:null},reposts:{days:null}};var L_=(e=k_,t)=>{const s=t.type,r=t.payload;switch(s){case g_.c:const t=N_()(e);return r.forEach(e=>{const s=e.formSection,r=e.formField,n=e.error;t[s][r]=n}),t;case g_.g:return k_;default:return e}},U_=s("./src/reddit/models/PostRequirements/index.ts");const M_={isLoading:!0,isSaving:!1,hasFormError:!1,serverError:null,titleStrings:{isToggled:!1,strings:[]},titleRegEx:{isToggled:!1,regex:[]},titleLength:{isToggled:!1,min:null,max:null},postLength:{isToggled:!1,min:null,max:null},postingGuidelines:{requirement:"none",guidelines:null},postBodyRequirement:"none",linkListPermission:"none",linkDomain:{whitelist:[],blacklist:[]},reposts:{isToggled:!1,days:null},flair:{isToggled:!1}};var G_=(e=M_,t)=>{const s=t.type,r=t.payload;switch(s){case g_.b:return Object.assign({},e,{isLoading:!0});case g_.j:const t=r;return Object.assign({},e,{[t]:Object.assign({},e[t],{isToggled:!e[t].isToggled})});case g_.v:const n=r.map(e=>e.substring(0,40));return Object.assign({},e,{titleStrings:Object.assign({},e.titleStrings,{strings:n})});case g_.u:const a=r.map(e=>e.substring(0,100));return Object.assign({},e,{titleRegEx:Object.assign({},e.titleRegEx,{regex:a})});case g_.t:return Object.assign({},e,{titleLength:Object.assign({},e.titleLength,{min:""!==r?parseInt(r):""})});case g_.s:return Object.assign({},e,{titleLength:Object.assign({},e.titleLength,{max:""!==r?parseInt(r):""})});case g_.q:return Object.assign({},e,{postLength:Object.assign({},e.postLength,{min:""!==r?parseInt(r):""})});case g_.p:return Object.assign({},e,{postLength:Object.assign({},e.postLength,{max:""!==r?parseInt(r):""})});case g_.k:const c=e.linkListPermission;return Object.assign({},e,{linkDomain:Object.assign({},e.linkDomain,{[c]:r})});case g_.r:return Object.assign({},e,{reposts:Object.assign({},e.reposts,{days:""!==r?parseInt(r):""})});case g_.m:return Object.assign({},e,{postBodyRequirement:r});case g_.l:const i="none"!==r;return Object.assign({},e,{linkDomain:Object.assign({},e.linkDomain,{isToggled:i}),linkListPermission:r});case g_.o:return Object.assign({},e,{postingGuidelines:Object.assign({},e.postingGuidelines,{requirement:r})});case g_.n:const o=r&&r.length>400?r.substring(0,400):r;return Object.assign({},e,{postingGuidelines:Object.assign({},e.postingGuidelines,{guidelines:o})});case g_.d:return Object(U_.b)(M_,r);case g_.c:return Object.assign({},e,{hasFormError:!0});case g_.e:return Object.assign({},e,{serverError:r});case g_.g:return Object.assign({},e,{hasFormError:!1,serverError:null,isSaving:!0});case g_.f:return Object.assign({},e,{isSaving:!1});default:return e}};var F_=(e=null,t)=>{const s=t.type,r=t.payload;switch(s){case g_.d:return r;default:return e}},B_=Object(r.c)({formState:G_,formErrors:L_,initialData:F_});const $_={};var q_=(e=$_,t)=>{const s=t.type,r=t.payload;switch(s){case g_.a:return Object.assign({},e,r);default:return e}},V_=Object(r.c)({postRequirements:B_,requirementsBySubreddit:q_});const H_={};var K_=Object($O.a)((e=H_,t)=>{switch(t.type){case be.b:{var s=t.payload;const r=s.postIds,n=s.posts,a=r.slice(0,2).reduce((e,t)=>{if(n[t].isStickied){const s=n[t].belongsTo.id;e[s]?e[s].push(t):e[s]=[t]}return e},{});return Y()(Object.assign({},e),a)}case E.i:{var r=t.payload;const s=r.newStickiedPostList,n=r.subredditId;return Object.assign({},e,{[n]:s})}default:return e}},H_),W_=Object(r.c)({data:K_});var Y_=(e=null,t)=>{switch(t.type){case hm.b:return t.payload.error;case hm.c:case hm.d:return null;default:return e}};var z_=(e=!1,t)=>{switch(t.type){case hm.c:case hm.d:case EO.i:return!0;case hm.b:return!1;default:return e}};var Q_=(e=!1,t)=>{switch(t.type){case hm.c:return!0;case hm.d:case hm.b:return!1;default:return e}},X_=Object(r.c)({errors:Y_,fetched:z_,pending:Q_}),J_=(e,t,s)=>{let r,n,a=e.length-1,c=0;for(;c<=a;){const i=s(r=e[n=(c+a)/2|0],t);if(i<0){if((c=n+1)>a)return c}else{if(!(i>0))return n;if((a=n-1)<c)return a+1}}return(c+a)/2|0},Z_=s("./src/reddit/constants/posts.ts");const eE=[];var tE=(e=eE,t)=>{switch(t.type){case hm.d:{var s=t.payload;const e=s.profiles,r=s.favoriteProfileIds,n=s.favoriteSubredditIds;let a;return(a=r&&r.length?r:n?n.filter(t=>!!e[t]):[]).sort((t,s)=>e[t].displayText.toLowerCase()>e[s].displayText.toLowerCase()?1:-1),a}case hm.a:{var r=t.payload;const s=r.makeFavorite,n=r.identifier,a=r.profileModels,c=n.id;if(n.type!==Z_.a.PROFILE)return e;const i=e?e.slice():[];if(s){const e=J_(i,c,(e,t)=>a[e].displayText.toLowerCase()>a[t].displayText.toLowerCase()?1:-1);i.splice(e,0,c)}else{const e=i.indexOf(c);i.splice(e,1)}return i}case hm.e:{var n=t.payload;const s=n.identifier,r=n.userIsSubscriber,a=s.id;if(s.type!==Z_.a.PROFILE||r||!e)return e;const c=e.indexOf(a);if(-1===c)return e;const i=e?e.slice():[];return i.splice(c,1),i}default:return e}};const sE=[];var rE=(e=sE,t)=>{switch(t.type){case hm.d:{var s=t.payload;const e=s.subreddits,r=s.favoriteSubredditIds,n=r?r.filter(t=>!!e[t]):[];return n.sort((t,s)=>e[t].displayText.toLowerCase()>e[s].displayText.toLowerCase()?1:-1),n}case hm.a:{var r=t.payload;const s=r.makeFavorite,n=r.identifier,a=r.subredditModels,c=n.id;if(n.type!==Z_.a.SUBREDDIT)return e;const i=e?e.slice():[];if(s){const e=J_(i,c,(e,t)=>a[e].displayText.toLowerCase()>a[t].displayText.toLowerCase()?1:-1);i.splice(e,0,c)}else{const e=i.indexOf(c);i.splice(e,1)}return i}case hm.e:{var n=t.payload;const s=n.identifier,r=n.userIsSubscriber,a=s.id;if(s.type!==Z_.a.SUBREDDIT||r||!e)return e;const c=e.indexOf(a);if(-1===c)return e;const i=e?e.slice():[];return i.splice(c,1),i}default:return e}},nE=s("./node_modules/lodash/uniq.js"),aE=s.n(nE);const cE=[];var iE=(e=cE,t)=>{switch(t.type){case Em.j:{const s=t.payload.profileOrder;return aE()([...e,...s])}case hm.d:{const e=t.payload.profiles,s=Object.keys(e);return s.sort((t,s)=>e[t].displayText.toLowerCase()>e[s].displayText.toLowerCase()?1:-1),s}case hm.e:{var s=t.payload;const r=s.identifier,n=s.profileModels,a=s.userIsSubscriber,c=r.id;if(r.type!==Z_.a.PROFILE)return e;const i=e?e.slice():[];if(a){const e=J_(i,c,(e,t)=>n[e].displayText.toLowerCase()>n[t].displayText.toLowerCase()?1:-1);i.splice(e,0,c)}else{const e=i.indexOf(c);i.splice(e,1)}return i}default:return e}};const oE=[];var dE=(e=oE,t)=>{switch(t.type){case Em.j:{const s=t.payload.subredditOrder;return aE()([...e,...s])}case hm.d:{const e=t.payload.subreddits,s=Object.keys(e);return s.sort((t,s)=>e[t].displayText.toLowerCase()>e[s].displayText.toLowerCase()?1:-1),s}case hm.e:{var s=t.payload;const r=s.identifier,n=s.subredditModels,a=s.userIsSubscriber,c=r.id;if(r.type!==Z_.a.SUBREDDIT||!c)return e;const i=e?e.slice():[];if(a){const e=J_(i,c,(e,t)=>n[e].displayText.toLowerCase()>n[t].displayText.toLowerCase()?1:-1);i.splice(e,0,c)}else{const e=i.indexOf(c);i.splice(e,1)}return i}case EO.i:{const e=t.payload;return Object.keys(e.subreddits)}default:return e}},uE=Object(r.c)({api:X_,favoriteProfileOrder:tE,favoriteSubredditOrder:rE,profileOrder:iE,subredditOrder:dE}),lE=s("./src/reddit/actions/tags.ts");const bE={pending:!1,error:!1};var pE=(e=bE,t)=>{switch(t.type){case lE.c:return Object.assign({},e,{pending:!0});case lE.d:return{error:!1,pending:!1};case lE.b:return{error:!0,pending:!1};default:return e}};const OE={pending:!1,error:!1};var fE=(e=OE,t)=>{switch(t.type){case lE.f:return Object.assign({},e,{pending:!0});case lE.g:return{error:!1,pending:!1};case lE.e:return{error:!0,pending:!1};default:return e}};const mE={pending:!1,error:!1};var jE=(e=mE,t)=>{switch(t.type){case lE.j:return Object.assign({},e,{pending:!0});case lE.i:case lE.a:return{error:!1,pending:!1};case lE.h:return{error:!0,pending:!1};default:return e}};const gE={pending:!1,error:!1};var yE=(e=gE,t)=>{switch(t.type){case lE.l:return Object.assign({},e,{pending:!0});case lE.m:return{error:!1,pending:!1};case lE.k:return{error:!0,pending:!1};default:return e}},_E=Object(r.c)({create:pE,deleteTag:fE,fetch:jE,update:yE});const EE={global:[],recommendedGlobal:[]};var hE=(e=EE,t)=>{switch(t.type){case lE.i:case lE.a:{const e=t.payload.globalSubredditTags,s=Object.keys(e).sort((t,s)=>{const r=e[t].text.toLowerCase(),n=e[s].text.toLowerCase();return r<n?-1:r>n?1:0}),r=s.filter(t=>e[t].isRecommended);return{global:s,recommendedGlobal:r}}default:return e}};const SE={globalSubredditTags:{},subredditScopedTags:{},itemTags:{},sortedItemTags:{}};var TE=(e=SE,t)=>{switch(t.type){case lE.a:{var s=t.payload;const r=s.globalSubredditTags,n=s.subredditScopedTags,a=s.subredditId;return Object.assign({},e,{globalSubredditTags:Object.assign({},e.globalSubredditTags,r),subredditScopedTags:Object.assign({},e.subredditScopedTags,{[a]:Object.assign({},e.subredditScopedTags[a]||{},n[a]||{})})})}case lE.i:{var r=t.payload;const s=r.globalSubredditTags,n=r.subredditScopedTags,a=r.itemTags,c=r.subredditId;return{globalSubredditTags:Object.assign({},e.globalSubredditTags,s),subredditScopedTags:Object.assign({},e.subredditScopedTags,{[c]:Object.assign({},e.subredditScopedTags[c]||{},n[c]||{})}),itemTags:Object.assign({},e.itemTags,{[c]:Object.assign({},a[c]||{})}),sortedItemTags:Object.assign({},e.sortedItemTags,{[c]:(e=>gb()(e).sort((t,s)=>{const r=e[t.tag.id].tag.text.toLowerCase(),n=e[s.tag.id].tag.text.toLowerCase();return r<n?-1:r>n?1:0}))(a[c]||{})})}}case lE.g:{var n=t.payload;const s=n.subredditId,r=n.tags.reduce((e,{tagId:t})=>(delete e[t],e),Object.assign({},e.subredditScopedTags[s]||{}));return Object.assign({},e,{subredditScopedTags:Object.assign({},e.subredditScopedTags,{[s]:r})})}default:return e}},IE=s("./src/reddit/reducers/tags/selected/index.ts"),vE=Object(r.c)({api:_E,availableGlobalTagOrder:hE,models:TE,selected:IE.b}),CE=s("./src/reddit/actions/redditEmbed.ts"),RE=s("./src/reddit/models/Theme/index.ts");const AE={current:RE.c,cached:{}};var DE=(e=AE,t)=>{switch(t.type){case Hr.a:case Hr.b:case Hr.e:case Hr.c:case Hr.f:case Me.e:case Me.h:case Ge.b:case Fe.b:case Ue.a:case oe.a:case Ue.b:case oe.b:case Ue.d:case oe.d:case oe.g:case be.b:case oe.l:case up.b:case we.b:case Le.e:case CE.b:case Oe.i:case He.c:case oe.q:case sd.i:case Be.b:case Vn.a:return t.payload&&t.payload.preferences&&t.payload.preferences.nightmode?t.payload.preferences.nightmode?{current:RE.b,cached:{}}:{current:RE.c,cached:{}}:e;case de.d:case de.e:case $e.a:case $e.b:case $e.d:case $e.e:case ue.d:case ue.e:{const s=t.payload.account;return s?s.nightmode?{current:RE.b,cached:{}}:{current:RE.c,cached:{}}:e}case ie.k:case ie.m:case ie.l:case ie.j:case ie.i:case ie.q:case ie.p:case ie.s:case ie.t:case ie.z:case ie.y:return t.payload&&t.payload.response&&t.payload.response.preferences&&t.payload.response.preferences.nightmode?t.payload.response.preferences.nightmode?{current:RE.b,cached:{}}:{current:RE.c,cached:{}}:e;case sd.h:return t.payload?t.payload.nightmode?{current:RE.b,cached:{}}:{current:RE.c,cached:{}}:e;case g.e:return{current:RE.c,cached:{}};case g.f:return t.payload.nightmodeTempUpdated?{current:RE.b,cached:{}}:e;default:return e}},PE=s("./src/reddit/actions/toaster.ts");const xE=[];var wE=(e=xE,t)=>{switch(t.type){case PE.c:{const s=t.payload,r=[];let n=!1;for(const t of e){const e=t.id===s.id?s:t;r.push(e),n=n||e===s}return n||r.push(s),r}case PE.b:{const s=t.payload;return e.filter(e=>e.id!==s)}default:return e}},NE=s("./src/reddit/actions/tracking.ts");const kE={};var LE=(e=kE,t)=>{switch(t.type){case NE.a:{const s=t.payload.routeKey;return Object.assign({},e,{[s]:!0})}case NE.b:{const s=t.payload.routeKey;return Object.assign({},e,{[s]:!1})}default:return e}},UE=Object(r.c)({viewportDataLoaded:LE});var ME=(e=null,t)=>{switch(t.type){case b.s:case b.t:return null;case b.q:return t.payload.error;default:return e}};var GE=(e=!1,t)=>{switch(t.type){case b.s:return!0;case b.q:case b.t:return!1;default:return e}},FE=Object(r.c)({error:ME,pending:GE});var BE=(e=null,t)=>{switch(t.type){case b.r:return(t.payload?t.payload.contentId:null)||null;case c.b:case b.t:return null;default:return e}};var $E=(e="",t)=>{switch(t.type){case b.r:return(t.payload?t.payload.recipient:"")||"";case b.t:return"";default:return e}},qE=Object(r.c)({api:FE,contentId:BE,initialRecipient:$E}),VE=Object(r.c)({communityPoints:qE});const HE=[];var KE=(e=HE,t)=>{switch(t.type){case be.b:case oe.r:{const s=t.payload.items;return s||e}default:return e}},WE=Object(r.c)({models:KE});const YE={};var zE=(e=YE,t)=>{switch(t.type){case Vm.a:{const s=t.payload.trophies;return Object.assign({},e,s)}default:return e}},QE=s("./src/reddit/models/Upload/index.ts");const XE={};var JE=(e=XE,t)=>{switch(t.type){case Zn.d:{var s=t.payload;const r=s.key,n=s.id,a=s.file,c=e[r],i=c&&c.file===a?Object.assign({},c.metadata):{};return Object.assign({},e,{[r]:{key:r,id:n,file:a,metadata:i,url:void 0,status:QE.a.PENDING}})}case Zn.h:{const s=t.payload.key,r=e[s];return Object.assign({},e,{[s]:Object.assign({},r,{status:QE.a.UPLOADING})})}case Zn.c:{var r=t.payload;const s=r.key,n=r.metadata,a=e[s];return Object.assign({},e,{[s]:Object.assign({},a,{metadata:n})})}case Zn.e:{var n=t.payload;const s=n.key,r=n.progress,a=e[s];return Object.assign({},e,{[s]:Object.assign({},a,{progress:r})})}case Zn.g:{var a=t.payload;const s=a.key,r=a.url,n=e[s];return Object.assign({},e,{[s]:Object.assign({},n,{status:QE.a.SUCCESS,url:r})})}case Zn.b:{var c=t.payload;const s=c.key,r=c.error,n=e[s];return Object.assign({},e,{[s]:Object.assign({},n,{status:QE.a.FAILED,error:r})})}case Zn.a:{const s=t.payload.key,r=e[s];return Object.assign({},e,{[s]:Object.assign({},r,{status:QE.a.CANCELED})})}case Zn.f:{const s=t.payload.key,r=e[s];return r.metadata.localUrl&&window.URL.revokeObjectURL(r.metadata.localUrl),ar()(e,s)}default:return e}};const ZE={};var eh=(e=ZE,t)=>{switch(t.type){case b.a:{var s=t.payload;const r=s.subredditId,n=s.wallet;if(!n)return e;const a=e[r]||{};return Object.assign({},e,{[r]:Object.assign({},a,{latest:n,byDate:Object.assign({},a.byDate||{},{[n.at]:n})})})}case b.w:{const s=t.payload,r=Object.assign({},e);return Object.keys(s).forEach(t=>{const n=s[t],a=e[t],c={latest:a?a.latest.at<=n.at?n:a.latest:n,byDate:Object.assign({},a?a.byDate:{},{[n.at]:n})};r[t]=c}),r}case m.d:{var r=t.payload;const s=r.product,n=r.wallet,a=e[s.subredditId]||{};return Object.assign({},e,{[s.subredditId]:Object.assign({},a,{[n.at]:n,latest:n})})}case b.t:{var n=t.payload;const s=n.subredditId,r=n.wallet,a=e[s]||{};return Object.assign({},e,{[s]:Object.assign({},a,{[r.at]:r,latest:r})})}default:return e}},th=s("./src/reddit/actions/users.ts");const sh=(e,t)=>!t||tr()(e,t)?e:t;var rh=Object($O.a)((e=null,t)=>{switch(t.type){case P.c:case P.d:case Hr.a:case Hr.b:case Hr.c:case Hr.e:case Hr.f:case Me.e:case Me.h:case Me.g:case ke.a:case ke.b:case Ge.b:case Le.d:case Le.e:case Fe.a:case Fe.b:case Ue.a:case oe.a:case Ue.b:case oe.b:case oe.f:case oe.g:case oe.k:case oe.l:case be.a:case up.b:case de.b:case de.a:case de.e:case de.d:case le.c:case le.i:case $e.e:case $e.d:case $e.b:case $e.a:case ue.e:case ue.d:case be.b:case oe.o:case oe.q:case Be.b:case Vn.a:case He.a:case He.c:case CE.a:case CE.b:case sd.i:case th.e:return sh(e,t.payload.account);case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:case ie.k:case ie.h:case ie.o:case ie.r:case ie.x:{const s=t.payload.response;return s?sh(e,s.account):e}case th.c:return e?Object.assign({},e,{seenLayoutSwitch:!0}):e;case c.d:return e?Object.assign({},e,{seenRedesignModal:!0}):e;case sd.k:case sd.j:{const s=t.payload;return e&&"profileIcon"===s.key?Object.assign({},e,{accountIcon:s.imageUrl}):e}case _e.y:case _e.q:{const s=t.payload.coins;return e?Object.assign({},e,{coins:s}):e}case _i.f:{const s=t.payload.coins;return s&&e?Object.assign({},e,{coins:s}):e}default:return e}},null),nh=s("./src/reddit/models/WhitelistAndBlocked.ts");const ah={};var ch=(e=ah,t)=>{switch(t.type){case Dt.f:return Object.assign({},e,{new:nh.a.pending});case Dt.d:return Object.assign({},e,{new:nh.a.error});case Dt.e:return Object.assign({},e,{new:nh.a.waitingForRequest});case Dt.b:{const s=t.payload.name;return Object.assign({},e,{[s]:nh.a.pending})}case Dt.a:{const s=t.payload.name;return Object.assign({},e,{[s]:nh.a.error})}case Dt.c:{const s=t.payload.name;return Object.assign({},e,{[s]:nh.a.waitingForRequest})}default:return e}};const ih=[];var oh=(e=ih,t)=>{switch(t.type){case Dt.e:return[t.payload,...e];case Dt.c:{const s=t.payload.name;return e.filter(e=>e.name!==s)}case sd.i:return t.payload.blockedUsers;default:return e}},dh=Object(r.c)({api:ch,data:oh}),uh=s("./src/reddit/actions/chat/constants.ts"),lh=s("./src/reddit/actions/chat/userSettings.ts");const bh=uh.a.anybody;var ph=(e=bh,t)=>{switch(t.type){case lh.a:return t.payload?t.payload.invitePolicy:e;default:return e}},Oh=Object(r.c)({invitePolicy:ph});const fh=(e,t)=>void 0===t||e&&t===e.count?e:Object.assign({},e,{count:t});var mh=(e=null,t)=>{switch(t.type){case Be.b:{const s=t.payload.drafts;return e&&tr()(e,s)?e:Object.assign({},e,s)}case f.O:{const s=t.payload.response.draftsCount;return fh(e,s)}case sn.e:{const s=t.payload.postDraftIds;return fh(e,s.length)}case sn.c:case sn.l:{const s=t.payload.draftsCount;return fh(e,s)}default:return e}},jh=s("./src/reddit/actions/global.ts");const gh={welcomeModal:!1,localStorageLoaded:!1};var yh=(e=gh,t)=>{switch(t.type){case jh.a:{const s=t.payload;return null===s.welcome_modal_see_store||void 0===s.welcome_modal_see_store?e:Object.assign({},e,{localStorageLoaded:!0,welcomeModal:s.welcome_modal_see_store})}case EO.e:return Object.assign({},e,{welcomeModal:!0});default:return e}};const _h={};var Eh=(e=_h,t)=>{switch(t.type){case jh.a:{const s=t.payload;return null===s.local_persisted_experiments_store||void 0===s.local_persisted_experiments_store?e:s.local_persisted_experiments_store}default:return e}},hh=s("./src/reddit/actions/experiments.ts");const Sh=[];var Th=(e=Sh,t)=>{switch(t.type){case hh.a:return t.payload.experimentVariants.map(({id:e,experimentName:t,name:s,version:r})=>({id:parseInt(e),name:t,variant:s||void 0,version:r}));default:return e}};const Ih=/^experiment_(.*)$/i,vh=e=>{const t=e.match(Ih);if(null!==t)return t[1]},Ch={};var Rh=(e=Ch,t)=>{switch(t.type){case O.a:{const s=zn(t);if(!s)return e;const r={};for(const e in s){const t=vh(e);t&&(r[t.toLowerCase()]=s[e]||"")}return es()(r)?e:Object.assign({},e,r)}case hh.b:{var s=t.payload;const r=s.experimentName,n=s.override;return r?Object.assign({},e,{[r]:n||""}):e}default:return e}},Ah=Object(r.c)({dismissed:yh,models:Th,localPersisted:Eh,overrides:Rh});function Dh(e,t){return t?e&&tr()(e,t)?e:t:e}const Ph={};var xh=Object($O.a)((e=Ph,t)=>{switch(t.type){case Hr.a:case Hr.b:case Hr.c:case Hr.e:case Hr.f:case Me.e:case Ge.b:case Fe.a:case Fe.b:case Ue.a:case oe.a:case Ue.b:case oe.b:case oe.f:case oe.g:case oe.k:case oe.l:case be.a:case up.b:case Em.h:case de.e:case de.d:case $e.e:case $e.d:case $e.b:case $e.a:case ue.e:case ue.d:case be.b:case oe.o:case oe.q:case Be.b:case CE.a:case CE.b:case sd.i:case th.e:{const s=t.payload.features;return s?Dh(e,s):e}case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:case ie.k:case ie.h:case ie.o:case ie.r:case ie.x:{const s=t.payload.response;return s&&s.features?Dh(e,s.features):e}default:return e}},Ph);var wh=(e=!1,t)=>{switch(t.type){case sd.e:return!0;case sd.d:return!1;default:return e}};var Nh=(e="en",t)=>(t.type,e);var kh=(e=!1,t)=>{switch(t.type){case EO.i:return t.payload.accountCompleteness.closed;case EO.d:return!0;default:return e}};var Lh=(e=!1,t)=>{switch(t.type){case EO.i:return t.payload.accountCompleteness.collapsed;case EO.g:return!1;case EO.f:return!0;default:return e}};var Uh=(e=null,t)=>{switch(t.type){case EO.b:return t.payload;case EO.f:case hm.e:case cr.a:return null;default:return e}};var Mh=(e=!0,t)=>{switch(t.type){case EO.i:return t.payload.accountCompleteness.sleeping;case EO.a:return!1;default:return e}},Gh=s("./src/reddit/actions/monthsToMinutes/accountCompleteness.ts"),Fh=s("./src/reddit/models/MonthsToMinutes/index.ts");const Bh=Fh.b.Initial;var $h=(e=Bh,t)=>{switch(t.type){case EO.i:return t.payload.accountCompleteness.step;case Gh.a:return t.payload||e;case zg.a:return Fh.b.HomeVisited;default:return e}},qh=Object(r.c)({closed:kh,collapsed:Lh,sleeping:Mh,selectedTab:Uh,step:$h});var Vh=(e=!1,t)=>{switch(t.type){case EO.i:case EO.h:return!0;default:return e}};const Hh=[];var Kh=(e=Hh,t)=>{switch(t.type){case zg.a:case EO.k:{const s=t.payload;return s.length?s:e}case hm.e:{var s=t.payload;const r=s.nameIdentifier;return s.userIsSubscriber?[...e,r.name]:[...e.filter(e=>r.name!==e)]}default:return e}};const Wh=[];var Yh=(e=Wh,t)=>{switch(t.type){case zg.b:return t.payload.subredditNames||Wh;case EO.i:return t.payload.homeFeed.similar;default:return e}};const zh=[];var Qh=(e=zh,t)=>{switch(t.type){case zg.c:{const s=t.payload,r=Object(is.f)(s);return e.includes(r)?e:[...e,r]}case EO.i:return t.payload.homeFeed.views;default:return e}};const Xh={};var Jh=(e=Xh,t)=>{switch(t.type){case zg.d:{var s=t.payload;const r=s.id,n=s.subredditName,a=Object(is.f)(n);return e[r]===a?e:Object.assign({},e,{[r]:a})}case EO.i:return t.payload.homeFeed.votes;default:return e}},Zh=Object(r.c)({similar:Yh,views:Qh,votes:Jh});var eS=(e=!1,t)=>{switch(t.type){case zg.a:case EO.k:return t.payload.length>=3||e;case oe.i:return!0;case hm.e:{var s=t.payload;const r=s.subscriptionsCount,n=s.userIsSubscriber;return!(1===r&&!n)&&e}default:return e}};var tS=(e=null,t)=>{switch(t.type){case cr.a:return Fh.g.Vote;case hm.e:return Fh.g.Subscribe;default:return e}};var sS=(e=!1,t)=>{switch(t.type){case EO.j:return!1;case cr.a:case hm.e:return!0;default:return e}};const rS={[Fh.j.Home]:{},[Fh.j.SubscribeFeed]:{},[Fh.j.SubscribeIdCard]:{},[Fh.j.SubscribeReminder]:{},[Fh.j.Vote]:{},[Fh.j.VoteReminder]:{},[Fh.j.VoteSuccess]:{}};var nS=(e=rS,t)=>{switch(t.type){case EO.i:{var s=t.payload.tooltip;const r=s.homeTooltipTime,n=s.subscribeTooltipTime,a=s.subscribeIdCardTooltipTime,c=s.voteTooltipTime;return e[Fh.j.Home].time=r,e[Fh.j.SubscribeFeed].time=n,e[Fh.j.Vote].time=c,e[Fh.j.SubscribeIdCard]={isDismissed:!0,time:a},Object.assign({},e)}case EO.l:{var r=t.payload;const s=r.postId,n=r.time,a=r.tooltipType,c={isDismissed:!1,postId:s,time:n};return Object.assign({},e,{[a]:c})}case EO.m:{const s=t.payload,r=Object.assign({},e[s]);return r.isDismissed=!0,Object.assign({},e,{[s]:r})}case cr.a:{const s=t.payload.id;let r=Object.assign({},e[Fh.j.VoteSuccess]);return r.isDismissed||r.postId||(r={isDismissed:!1,postId:s}),Object.assign({},e,{[Fh.j.VoteSuccess]:r})}case oe.i:{const t=Object.assign({},e[Fh.j.Home]);return t.isDismissed=!0,Object.assign({},e,{[Fh.j.Home]:t})}case O.a:case sd.g:{const t=Object.assign({},e);return Object.keys(e).map(s=>{const r=Object.assign({},e[s]);(r.postId||r.time)&&(r.isDismissed=!0),t[s]=r}),t}case to.e:return Object.assign({},e,{[Fh.j.Home]:Object.assign({},e[Fh.j.Home],{isDismissed:!0})});default:return e}};const aS=[];var cS=(e=aS,t)=>{switch(t.type){case oe.b:{const s=t.payload.postId;return e.includes(s)?e:[...e,s]}case EO.i:return t.payload.views.posts;default:return e}},iS=Object(r.c)({posts:cS}),oS=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const dS={};var uS=(e=dS,t)=>{switch(t.type){case cr.a:{var s=t.payload;const r=s.id,n=s.vote;if(!Object(ir.a)(r))return e;if(e[r]===n){const t=r;return e[t],oS(e,["symbol"==typeof t?t:t+""])}return Object.assign({},e,{[r]:n})}case EO.i:return t.payload.votes.comments;default:return e}},lS=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&(s[r[n]]=e[r[n]])}return s};const bS={};var pS=(e=bS,t)=>{switch(t.type){case cr.a:{var s=t.payload;const r=s.id,n=s.isInstance,a=s.vote;if(!Object(SO.a)(r)||n)return e;if(e[r]===a){const t=r;return e[t],lS(e,["symbol"==typeof t?t:t+""])}return Object.assign({},e,{[r]:a})}case EO.i:return t.payload.votes.posts;default:return e}},OS=Object(r.c)({comments:uS,posts:pS}),fS=Object(r.c)({accountCompleteness:qh,dataLoaded:Vh,feedMultiName:Kh,homeFeed:Zh,isFrontpageHome:eS,lastMilestoneAction:tS,milestoneActionFresh:sS,tooltips:nS,views:iS,votes:OS});const mS={blob:"",loid:"",loidCreated:"",version:-1};var jS=(e=mS,t)=>{switch(t.type){case th.d:return t.payload;default:return e}},gS=s("./src/reddit/actions/notifications/constants.ts");var yS=(e=null,t)=>{switch(t.type){case gS.b:return t.payload.error||null;case gS.d:case gS.c:return null;default:return e}};var _S=(e=!1,t)=>{switch(t.type){case gS.d:return!1;case gS.c:return!0;default:return e}};var ES=(e=!1,t)=>{switch(t.type){case gS.d:return!0;case gS.c:case gS.b:return!1;default:return e}},hS=Object(r.c)({error:yS,loaded:_S,pending:ES});var SS=(e=null,t)=>{switch(t.type){case gS.k:return t.payload.error||null;case gS.m:case gS.l:return null;default:return e}};var TS=(e=!1,t)=>{switch(t.type){case gS.m:return!1;case gS.l:return!0;default:return e}};var IS=(e=!1,t)=>{switch(t.type){case gS.m:return!0;case gS.l:case gS.k:return!1;default:return e}},vS=Object(r.c)({error:SS,loaded:TS,pending:IS}),CS=Object(r.c)({getPreferences:hS,setPreferences:vS});var RS=(e=!1,t)=>{switch(t.type){case gS.n:return!0;case gS.e:case gS.g:case gS.h:return!1;default:return e}};const AS={chatMessages:!1,trendingPosts:!1,unreadMessages:!1};var DS=(e=AS,t)=>{switch(t.type){case gS.c:case gS.m:case gS.k:{const s=t.payload.preferences;return es()(s)?e:s}default:return e}},PS=Object(r.c)({api:CS,isPrePromptVisible:RS,preferences:DS});const xS={};var wS=(e=xS,t)=>{switch(t.type){case u.i:{var s=t.payload;const r=s.subredditId,n=s.userOwnedBadges.reduce((e,t)=>(e[t]=!0,e),{});return Object.assign({},e,{[r]:Object.assign({},e[r]||{},n)})}case m.d:{var r=t.payload;const s=r.userOwnedBadges,n=r.product,a=s.reduce((e,t)=>(e[t]=!0,e),{});return Object.assign({},e,{[n.subredditId]:Object.assign({},e[n.subredditId]||{},a)})}default:return e}},NS=s("./src/reddit/reducers/user/prefs/index.ts");var kS=(e="",t)=>{switch(t.type){case th.f:return t.payload;default:return e}},LS=s("./src/reddit/actions/session.ts");var US=(e=null,t)=>{switch(t.type){case LS.a:case LS.b:case LS.c:case LS.e:return t.payload;case LS.d:return null;default:return e}};var MS=(e=!1,t)=>{switch(t.type){case LS.f:return!0;default:return e}};var GS=(e="",t)=>{switch(t.type){case th.j:return t.payload;default:return e}},FS=s("./node_modules/lodash/shuffle.js"),BS=s.n(FS),$S=s("./src/reddit/constants/categories.tsx");const qS=[];var VS=(e=qS,t)=>{switch(t.type){case to.d:return BS()(Object.keys($S.b));default:return e}};var HS=(e=null,t)=>{switch(t.type){case hh.a:{const e=t.payload;return e.identity&&e.identity.isEmployee}default:return e}};var KS=(e=null,t)=>{switch(t.type){case hh.a:return t.payload.isLoggedIn;default:return e}},WS=Object(r.c)({isEmployee:HS,isLoggedIn:KS}),YS=s("./src/reddit/actions/userWhitelist.ts");const zS={};var QS=(e=zS,t)=>{switch(t.type){case YS.e:return Object.assign({},e,{new:nh.a.pending});case YS.d:return Object.assign({},e,{new:nh.a.error});case YS.f:return Object.assign({},e,{new:nh.a.waitingForRequest});case YS.b:{const s=t.payload.name;return Object.assign({},e,{[s]:nh.a.pending})}case YS.a:{const s=t.payload.name;return Object.assign({},e,{[s]:nh.a.error})}case YS.c:{const s=t.payload.name;return Object.assign({},e,{[s]:nh.a.waitingForRequest})}default:return e}};const XS=[];var JS=(e=XS,t)=>{switch(t.type){case YS.f:return[t.payload,...e];case YS.c:{const s=t.payload.name;return e.filter(e=>e.name!==s)}case sd.i:return t.payload.whitelistedUsers;default:return e}},ZS=Object(r.c)({api:QS,data:JS}),eT=Object(r.c)({account:rh,blocked:dh,chatSettings:Oh,drafts:mh,experiments:Ah,features:xh,isCustomizeFlyoutShowing:wh,language:Nh,loggedOutData:fS,loid:jS,notificationPrefs:PS,ownedBadges:wS,prefs:NS.b,reddaid:kS,session:US,sessionRefreshFailed:MS,sessionTracker:GS,shuffledCategories:VS,temporaryGQL:WS,wallets:eh,whitelist:ZS});const tT={};var sT=(e=tT,t)=>{switch(t.type){case be.b:case Be.b:case Vn.a:case Ue.b:case oe.b:case fe.e:return Object.assign({},e,t.payload.userFlair);case ie.l:case ie.i:case ie.p:case ie.s:case ie.y:{const s=t.payload.response.userFlair,r=Object.assign({},e);return Object.keys(s).forEach(e=>{r[e]||(r[e]=s[e])}),r}case fe.i:{var s=t.payload;const r=s.subredditId,n=s.applied,a=s.displaySettings;return Object.assign({},e,{[r]:Object.assign({},e[r],{applied:n,displaySettings:a})})}case fe.d:{var r=t.payload;const s=r.subredditId,n=r.isEnabled,a=e[s].displaySettings,c=Object.assign({},a,{isEnabled:n});return Object.assign({},e,{[s]:Object.assign({},e[s],{displaySettings:c})})}case fe.b:{var n=t.payload;const s=n.subredditId,r=n.canAssignOwn,a=e[s].permissions,c=Object.assign({},a,{canAssignOwn:r});return Object.assign({},e,{[s]:Object.assign({},e[s],{permissions:c})})}case fe.h:{const s=t.payload,r=e[s.subredditId],n=e[s.subredditId].templates,a=e[s.subredditId].templateIds,c=Object.assign({},n,{[s.template.id]:s.template}),i=[...a];return i.includes(s.template.id)||i.push(s.template.id),Object.assign({},e,{[s.subredditId]:Object.assign({},r,{templates:c,templateIds:i})})}case fe.c:{const s=t.payload,r=e[s.subredditId],n=e[s.subredditId].templates,a=e[s.subredditId].templateIds,c=ar()(n,s.templateId),i=a.filter(e=>e!==s.templateId);return Object.assign({},e,{[s.subredditId]:Object.assign({},r,{templates:Object.assign({},c),templateIds:i})})}case fe.g:case fe.f:{const s=t.payload,r=e[s.subredditId];return Object.assign({},e,{[s.subredditId]:Object.assign({},r,{templateIds:s.templateIds})})}default:return e}};const rT={};var nT=(e=rT,t)=>{switch(t.type){case th.i:case th.h:{const s=t.payload.username;return Object.assign({},e,{[s.toLowerCase()]:null})}case th.g:{var s=t.payload;const r=s.username,n=s.error;return Object.assign({},e,{[r.toLowerCase()]:n})}default:return e}};var aT=(e=!1,t)=>{switch(t.type){case th.i:return!0;case th.h:case th.g:return!1;default:return e}},cT=Object(r.c)({error:nT,pending:aT});const iT={};var oT=(e=iT,t)=>{switch(t.type){case u.f:{var s=t.payload;const r=s.subredditId,n=s.usersAppliedBadges,a=Object.keys(n).reduce((t,s)=>{const a=n[s];return t[s]=Object.assign({},e[s]||{},{[r]:a}),t},{});return Object.assign({},e,a)}case u.b:{var r=t.payload;const s=r.badgeIds,n=r.subredditId,a=r.userId;return Object.assign({},e,{[a]:Object.assign({},e[a]||{},{[n]:s})})}case u.a:{var n=t.payload;const s=n.previousBadgeIds,r=n.subredditId,a=n.userId;return Object.assign({},e,{[a]:Object.assign({},e[a]||{},{[r]:s})})}default:return e}};const dT={},uT=(e,t)=>{const s=Object.keys(t);if(!s.length)return e;const r={};return s.forEach(s=>{const n=e[s],a=t[s];n&&tr()(n,a)||(r[s.toLowerCase()]=a)}),Object.keys(r).length?Object.assign({},e,r):e};var lT=(e=dT,t)=>{switch(t.type){case Le.n:{const s=t.payload.users;return uT(e,s)}case th.h:{const s=t.payload.data;return uT(e,s)}case Em.h:{const s=t.payload.user;return uT(e,{[s.username]:s})}case _e.q:{var s=t.payload;const r=s.gildee,n=s.gildType,a=e[r.toLowerCase()];if(!a)return e;const c=a.gildedLastMonth,i=Object(dr.d)(n);return i?uT(e,{[r.toLowerCase()]:Object.assign({},a,{gildedLastMonth:Object.assign({},c,{[i]:(c&&c[i]||0)+1})})}):e}default:return e}},bT=s("./src/reddit/actions/usernameAvailable.ts");const pT={};var OT=(e=pT,t)=>{switch(t.type){case bT.a:{const s=t.payload.username;return Object.assign({},e,{[s]:bT.b.Available})}case bT.c:{const s=t.payload.username;return Object.assign({},e,{[s]:bT.b.Error})}case bT.d:{const s=t.payload.username;return Object.assign({},e,{[s]:bT.b.Pending})}case bT.e:{const s=t.payload.username;return Object.assign({},e,{[s]:bT.b.Unavailable})}default:return e}};const fT={};var mT=(e=fT,t)=>{switch(t.type){case b.n:{var s=t.payload;const r=s.subredditId,n=s.wallets,a=Object.keys(n).reduce((t,s)=>{const a=e[s]||{},c=Object.assign({},a,{[r]:n[s]});return Object.assign({},t,{[s]:c})},{});return Object.assign({},e,a)}default:return e}};const jT={};var gT=(e=jT,t)=>{switch(t.type){case Le.n:{var s=t.payload;const r=s.category,n=s.users;return Object.assign({},e,{[r]:Object.keys(n)})}default:return e}},yT=Object(r.c)({api:cT,appliedBadges:oT,models:lT,nameAvailable:OT,publicWallets:mT,topOCCreators:gT});const _T={};var ET=(e=_T,t)=>{switch(t.type){case Ue.b:case oe.b:case be.b:case Oe.i:case oe.q:case Be.b:case Vn.a:{const s=t.payload.structuredStyles;if(!s||!s.data)return e;const r=s.data.content.widgets.layout.idCardWidget,n=Object.keys(t.payload.subredditAboutInfo||{});if(1!==n.length)return e;const a=n[0];return Object.assign({},e,{[a]:r})}default:return e}},hT=s("./src/reddit/actions/widgets.ts");const ST={};var TT=(e=ST,t)=>{switch(t.type){case Ue.b:case oe.b:case be.b:case Oe.i:case Be.b:{const s=t.payload.structuredStyles;if(!s||!s.data)return e;const r=s.data.content.widgets.items,n=s.data.content.widgets.layout.topbar.order.filter(e=>r[e]&&"menu"===r[e].kind);if(!n.length)return e;const a=Object.keys(t.payload.subredditAboutInfo||{});if(1!==a.length)return e;const c=a[0];return Object.assign({},e,{[c]:n[0]})}case hT.c:{const s=t.payload;return"menu"!==s.widget.kind?e:Object.assign({},e,{[s.subredditId]:s.widgetId})}case hT.d:{const s=t.payload;return e[s.subredditId]===s.widgetId?Object.assign({},e,{[s.subredditId]:null}):e}default:return e}};const IT={};var vT=(e=IT,t)=>{switch(t.type){case be.b:{const s=t.payload,r=s.structuredStyles&&s.structuredStyles.data&&s.structuredStyles.data.content;if(!r)return e;const n=r.widgets;return Object.assign({},e,n.items)}case g.h:{const s=t.payload;return Object.assign({},e,s.widgets)}case hT.a:{const s=t.payload;return Object.assign({},e,s.widgets.items)}case hT.e:case hT.c:{const s=t.payload;return Object.assign({},e,{[s.widget.id]:s.widget})}case hT.d:{const s=t.payload,r=Object.assign({},e);return delete r[s.widgetId],r}case Ue.b:case oe.b:case be.b:case Oe.i:case oe.q:case Be.b:case Vn.a:{const s=t.payload.structuredStyles;if(!s||!s.data)return e;const r=s.data.content.widgets;return Object.assign({},e,r.items)}case hm.e:{var s=t.payload;const r=s.userIsSubscriber,n=s.nameIdentifier,a=s.widgetId;if(!e[a]||"community-list"!==e[a].kind)return Object.assign({},e);const c=r,i=e[a],o=i.data.map(e=>{const t=Object.assign({},e);return n.name===t.name&&(t.isSubscribed=c),t});return Object.assign({},e,{[a]:Object.assign({},i,{data:o})})}default:return e}};const CT={};var RT=(e=CT,t)=>{switch(t.type){case be.b:case oe.b:case Oe.i:case Be.b:{const s=t.payload.structuredStyles;if(!s||!s.data)return e;const r=s.data.content.widgets.layout.moderatorWidget,n=Object.keys(t.payload.subredditAboutInfo||{});if(1!==n.length)return e;const a=n[0];return Object.assign({},e,{[a]:r})}default:return e}};const AT={};var DT=(e=AT,t)=>{switch(t.type){case be.b:case Be.b:case Vn.a:{const s=t.payload,r=s.structuredStyles&&s.structuredStyles.data&&s.structuredStyles.data.content;if(!r)return e;const n=Object.keys(s.subredditAboutInfo||{});if(1!==n.length)return e;const a=n[0],c=r.widgets.layout.sidebar.order;return Object.assign({},e,{[a]:c})}case g.h:{const s=t.payload;return Object.assign({},e,{[s.subredditId]:s.sidebar})}case hT.a:{const s=t.payload;return Object.assign({},e,{[s.subredditId]:s.widgets.layout.sidebar.order})}case hT.b:{const s=t.payload;return Object.assign({},e,{[s.subredditId]:s.widgetIds})}case hT.c:{const s=t.payload;if("menu"===s.widget.kind)return e;if(!e[s.subredditId])return Object.assign({},e,{[s.subredditId]:[s.widgetId]});const r=e[s.subredditId].concat(s.widgetId);return Object.assign({},e,{[s.subredditId]:r})}case hT.d:{const s=t.payload;if(!e[s.subredditId])return e;const r=e[s.subredditId].filter(e=>e!==s.widgetId);return Object.assign({},e,{[s.subredditId]:r})}case Ue.b:case oe.b:case be.b:case oe.q:case Oe.i:case Be.b:case Vn.a:{const s=t.payload.structuredStyles;if(!(s&&s.data&&s.data.content.widgets))return e;const r=s.data.content.widgets.layout.sidebar.order,n=Object.keys(t.payload.subredditAboutInfo||{});if(1!==n.length)return e;const a=n[0];return Object.assign({},e,{[a]:r})}default:return e}},PT=Object(r.c)({idCardIds:ET,menuIds:TT,models:vT,moderatorIds:RT,sidebar:DT});t.a=Object(r.c)({accountManagerModalData:o,activeModalId:_,ads:T,alpha:C,apiRequestState:D,appeal:L,approvedSubmitters:ne,authorFlair:ye,awards:ze,badges:dt,banned:At,blockUser:Lt,brandSafety:Gt,categories:us,chat:Ds,claimGold:Ms,comments:vr,commentsPage:Vr,contentGate:Wr,continueThreads:Qr,creations:Ka,dashboard:za,discoveryUnits:ac,economics:lc,emojis:fc,externalAccount:Vc,featureFlags:Qc,fontFiles:Zc,gild:pi,goldPurchase:Zi,header:ro,imageUploads:co,isModeratorWithPostPerms:oo,jsApi:bo,leaderboard:Io,listings:od,live:ld,mediaPlayback:bd.a,meta:n.a,moderatingSubreddits:Od,moderationLog:Ad,moderators:mu,modListingPage:Su,modModeEnabled:Iu,modQueue:vl,moreComments:kl,multireddits:Hl,muted:ub,news:xb,nps:kb,oldSiteRules:Mb,originalContent:dp,partnerSubredditConnection:yp,platform:Sp,postCollection:eO,polls:$p,postFlair:cO,posts:BO,postStickiedComments:HO,givePremium:gi,products:cf,profileCommentsPage:hf,profilePrivatePage:_m,profileModSettingsPage:vf,profileOverviewPage:om,profilePostsPage:um,profiles:Wm,providerFlair:Zm,promos:Qm,recommendations:tj,removalReasons:bj,reportFlow:Sj,requestHost:Tj,runTimeEnvVars:vj,search:Lj,searchDiscoveryUnits:Vj,shortcuts:eg,sidebarPromotedPosts:rg,sitewideRules:cg,structuredStyles:vg,stylesheets:Cg,subredditAutocomplete:Lg,subredditChannels:Yg,subreddits:x_,subredditSettings:V_,subredditStickyPosts:W_,subscriptions:uE,tags:vE,themes:DE,toaster:wE,tooltipId:a.a,tracking:UE,transfers:VE,trending:WE,trophies:zE,uploads:JE,user:eT,userFlair:sT,users:yT,widgets:PT})},"./src/reddit/reducers/sidebarPromotedPosts/models/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});var r,n=s("./src/reddit/actions/ad.ts");!function(e){e[e.FRONTPAGE=0]="FRONTPAGE",e[e.COMMENTS_OVERLAY=1]="COMMENTS_OVERLAY",e[e.COMMENTS=2]="COMMENTS",e[e.SUBREDDIT=3]="SUBREDDIT",e[e.MULTIREDDIT=4]="MULTIREDDIT",e[e.SEARCH_RESULTS=5]="SEARCH_RESULTS"}(r||(r={}));const a={};t.b=((e=a,t)=>{switch(t.type){case n.d:case n.b:{const s=t.payload;return Object.assign({},e,s)}case n.c:case n.d:return e;case n.e:return a;default:return e}})},"./src/reddit/reducers/tags/selected/index.ts":function(e,t,s){"use strict";var r=s("./node_modules/lodash/uniqWith.js"),n=s.n(r),a=s("./node_modules/lodash/values.js"),c=s.n(a),i=s("./src/reddit/actions/tags.ts");const o=e=>!e.id,d=e=>!!e.id,u=(e,t)=>o(e)&&o(t)?e.displayText.toLowerCase().trim()===t.displayText.toLowerCase().trim():!(!d(e)||!d(t))&&e.id===t.id;var l,b=s("./src/reddit/models/Tags/index.ts");s.d(t,"a",function(){return l}),function(e){e.ADD="ADD",e.REMOVE="REMOVE"}(l||(l={}));const p={selectedOptions:{},deselectedOptions:{},inputByItemId:{}};t.b=((e=p,t)=>{switch(t.type){case i.i:{var s=t.payload;const r=s.subredditId,a=s.itemTags,i=n()([...(e.selectedOptions[r]||[]).map(e=>{if(!e.id){const t=c()(a[r]||{}).find(t=>e.displayText.toLowerCase().trim()===t.tag.text.toLowerCase().trim());if(t)return Object.assign({},Object(b.d)(t,!0),{action:null})}return e}),...c()(a[r]||{}).map(e=>Object.assign({},Object(b.d)(e,!0),{action:null}))],u);return Object.assign({},e,{selectedOptions:Object.assign({},e.selectedOptions,{[r]:i.map(e=>Object.assign({},e,{action:e.id?null:e.action}))}),deselectedOptions:Object.assign({},e.deselectedOptions,{[r]:[]})})}case i.p:{var r=t.payload;const s=r.subredditId,a=r.option,c=(e.deselectedOptions[s]||[]).slice(),i=c.findIndex(e=>u(e,a));let o=l.ADD;return i>-1&&(o=null,c.splice(i,1)),Object.assign({},e,{selectedOptions:Object.assign({},e.selectedOptions,{[s]:n()([...e.selectedOptions[s]||[],Object.assign({},a,{action:o})],u)}),deselectedOptions:Object.assign({},e.deselectedOptions,{[s]:c})})}case i.o:{var a=t.payload;const s=a.subredditId,r=a.option,n=(e.deselectedOptions[s]||[]).slice(),c=(e.selectedOptions[s]||[]).slice(),i=c.findIndex(e=>u(e,r));return i>-1&&(null===c[i].action&&n.push(Object.assign({},c[i],{action:l.REMOVE})),c.splice(i,1)),Object.assign({},e,{selectedOptions:Object.assign({},e.selectedOptions,{[s]:c}),deselectedOptions:Object.assign({},e.deselectedOptions,{[s]:n})})}case i.n:{var o=t.payload;const s=o.subredditId,r=o.input;return Object.assign({},e,{inputByItemId:Object.assign({},e.inputByItemId,{[s]:r})})}default:return e}})},"./src/reddit/reducers/user/prefs/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});var r,n=s("./node_modules/lodash/isEqual.js"),a=s.n(n),c=s("./node_modules/lodash/merge.js"),i=s.n(c),o=s("./node_modules/lodash/pick.js"),d=s.n(o),u=s("./src/lib/constants/index.ts"),l=s("./src/reddit/actions/comment.ts"),b=s("./src/reddit/actions/contentGate.ts"),p=s("./src/reddit/actions/frontpage.ts"),O=s("./src/reddit/actions/header.ts"),f=s("./src/reddit/actions/modQueue/constants.ts"),m=s("./src/reddit/actions/originalContent.ts"),j=s("./src/reddit/actions/page.ts"),g=s("./src/reddit/actions/pages/collectionCommentsPage.ts"),y=s("./src/reddit/actions/pages/modListing/constants.ts"),_=s("./src/reddit/actions/pages/news/index.ts"),E=s("./src/reddit/actions/pages/originalContent.ts"),h=s("./src/reddit/actions/pages/partnerSubredditConnection.ts"),S=s("./src/reddit/actions/pages/postCreation.ts"),T=s("./src/reddit/actions/pages/postDraft.ts"),I=s("./src/reddit/actions/pages/profileComments.ts"),v=s("./src/reddit/actions/pages/profileOverview.ts"),C=s("./src/reddit/actions/pages/profilePosts.ts"),R=s("./src/reddit/actions/pages/subreddit.ts"),A=s("./src/reddit/actions/postCreation/constants.ts"),D=s("./src/reddit/actions/postDraft.ts"),P=s("./src/reddit/actions/preferences.ts"),x=s("./src/reddit/actions/redditEmbed.ts"),w=s("./src/reddit/actions/search.ts"),N=s("./src/reddit/actions/structuredStyles.ts"),k=s("./src/reddit/actions/subreddit.ts"),L=s("./src/reddit/actions/users.ts"),U=s("./src/reddit/constants/postLayout.ts"),M=s("./src/reddit/constants/preferences.ts"),G=s("./src/reddit/constants/theme.ts"),F=s("./src/reddit/models/PostCreationForm/index.ts"),B=s("./src/reddit/models/PostDraft/index.ts"),$=s("./src/reddit/models/User/index.ts");!function(e){e.Whitelisted="whitelisted",e.Everyone="everyone"}(r||(r={}));const q=[...["acceptPrivateMessages","allowClickTracking","autoplayVideo","collapseReadMessages","defaultCommentSort","emailDigests","emailUnreadMessages","emailUnsubscribe","geopopular","hideAds","hideFromRobots","hideNSFW","highlightComments","inBeta","labelNSFW","markMessagesRead","nightmode","over18","profileOptOut","showMessagesInInbox","showNotifications","showTwitter","showUsernameMentionNotifications"],...M.a],V={acceptPrivateMessages:void 0,allowClickTracking:!1,autoplayVideo:!0,collapsedTraySections:$.a,commentMode:F.h.RICH_TEXT,layout:U.c.Card,rememberCommunityLayout:!1,defaultCommentSort:u.t.CONFIDENCE,editorMode:F.h.RICH_TEXT,featuresViewedHistory:$.b,geopopular:void 0,globalTheme:G.a,hamburgerTray:void 0,hasSeenCustomizeFlyout:!0,hideNSFW:!0,labelNSFW:!0,markMessagesRead:!0,nightmode:!1,openPostInNewTab:!1,over18:!1,profileLayout:void 0,profileOptOut:!1,showActiveCommunities:!0,showTwitter:!1,sort:u.Z.Hot,stylesEnabled:!0,subreddit:{},subscriptionsPinned:void 0,rememberCommunitySort:!1,useMarkdown:!1},H={stylesEnabled:!0,layout:void 0,sort:void 0},K=(e,t)=>{if(!t)return e;const s=d()(Object.assign({},t.account,t),q),r=t.subreddit,n=Object.assign({},e.subreddit);Object.keys(r||{}).forEach(e=>{n[e]=Object.assign({},H,r&&r[e])});const c=Object.assign({},e,s,{subreddit:n});if(c.useMarkdown!==e.useMarkdown){const e=c.useMarkdown?F.h.MARKDOWN:F.h.RICH_TEXT;c.editorMode=e,c.commentMode=e}return a()(c,e)?e:c},W=(e,t,s)=>K(e,{subreddit:{[t]:Object.assign({},H,e.subreddit[t],s)}});t.b=((e=V,t)=>{switch(t.type){case l.l:case l.r:{const s=t.payload.editorMode;return Object.assign({},e,{commentMode:s})}case A.t:case A.P:{const s=t.payload.editorMode;return Object.assign({},e,{editorMode:s})}case O.e:return Object.assign({},e,{subscriptionsPinned:!0});case O.f:return Object.assign({},e,{subscriptionsPinned:!1});case D.g:{const s=t.payload.kind;return Object.assign({},e,{editorMode:s===B.b.Markdown?F.h.MARKDOWN:F.h.RICH_TEXT})}case P.g:{const s=t.payload.layout;return e.layout===s?e:Object.assign({},e,{layout:s})}case P.n:{var s=t.payload;const r=s.layout,n=s.subredditId;return W(e,n,{layout:r})}case P.e:return Object.assign({},e,{hasSeenCustomizeFlyout:!0});case P.l:return e.profileLayout===t.payload.profileLayout?e:Object.assign({},e,{profileLayout:t.payload.profileLayout});case b.d:return Object.assign({},e,{over18:!0});case P.b:return void 0!==t.payload?Object.assign({},e,{autoplayVideo:t.payload.autoplayVideo}):e;case P.h:return void 0!==t.payload?Object.assign({},e,{nightmode:t.payload.nightmode}):e;case N.e:return t.payload.isNightmodeOn?Object.assign({},e,{nightmode:!1,nightmodeTempUpdated:!0}):e;case N.f:return t.payload.nightmodeTempUpdated?Object.assign({},e,{nightmode:!0,nightmodeTempUpdated:!1}):e;case P.f:return void 0!==t.payload?Object.assign({},e,{hamburgerTray:t.payload.set}):Object.assign({},e,{hamburgerTray:!e.hamburgerTray});case P.c:return void 0!==t.payload?Object.assign({},e,{collapsedTraySections:i()({},e.collapsedTraySections,t.payload)}):e;case L.a:case L.b:return Object.assign({},e,{featuresViewedHistory:i()({},e.featuresViewedHistory,t.payload)});case b.a:case b.b:case b.e:case b.c:case b.f:case y.e:case y.h:case _.b:case E.b:case g.a:case j.a:case g.b:case j.b:case g.d:case j.d:case j.g:case R.b:case j.l:case h.b:case I.e:case v.e:case v.b:case C.e:case p.b:case m.e:case k.i:case w.c:case x.b:case S.b:case T.a:case P.i:case j.q:case P.a:return t.payload&&t.payload.preferences?K(e,t.payload.preferences):e;case P.o:{var r=t.payload;const s=r.subredditId,n=r.prefs;return W(e,s,n)}case I.d:case v.d:case v.a:case C.d:if(t.payload&&t.payload.account){const s=t.payload.account.nightmode;if(e.nightmode!==s)return Object.assign({},e,{nightmode:s})}return e;case f.k:case f.m:case f.l:case f.j:case f.i:case f.q:case f.p:case f.s:case f.t:case f.z:case f.y:return t.payload&&t.payload.response&&t.payload.response.preferences?K(e,t.payload.preferences):e;case P.m:{const s=t.payload.additional.showActiveCommunities;return e.showActiveCommunities!==s?Object.assign({},e,{showActiveCommunities:s}):e}default:return e}})},"./src/reddit/routes/modListing/index.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return i}),s.d(t,"b",function(){return o}),s.d(t,"d",function(){return u});var r=s("./node_modules/lodash/flatten.js"),n=s.n(r),a=s("./src/lib/constants/index.ts"),c=s("./src/reddit/actions/pages/modListing/index.ts");const i="/r/mod",o="/me/f/mod",d=[i,o],u=e=>e.startsWith(o),l=n()(d.map(e=>Object.keys(a.X).map(t=>`${e}/:sort(${a.X[t]})?`))).map(e=>({path:e,action:c.b,chunk:a.r.MOD_LISTING,exact:!0,meta:{name:a.Rb.MOD_LISTING},pretfetches:[a.r.SUBREDDIT,a.r.COMMENTS_PAGE]}));t.c=l},"./src/reddit/routes/partnerSubredditConnection/constants.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});const r="/subreddits/connect"},"./src/reddit/routes/postCreation/index.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return i}),s.d(t,"b",function(){return o}),s.d(t,"d",function(){return d});var r=s("./src/lib/constants/index.ts"),n=s("./src/reddit/actions/pages/postCreation.ts"),a=s("./src/reddit/routes/postCreation/constants.ts");const c=[a.c,a.d,a.b,a.a],i=e=>a.d.replace(/:subredditName/,e),o=e=>a.b.replace(/:profileName/,e),d=e=>e.split("?")[0]===a.a,u=c.map(e=>({path:e,action:n.e,chunk:r.r.POST_CREATION,exact:!0,meta:{name:r.Rb.POST_CREATION},prefetches:[r.r.COMMENTS_PAGE]}));t.a=u},"./src/reddit/selectors/activeModalId.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n});const r=e=>e.activeModalId,n=e=>t=>t.activeModalId===e},"./src/reddit/selectors/category.ts":function(e,t,s){"use strict";s.d(t,"g",function(){return u}),s.d(t,"h",function(){return l}),s.d(t,"k",function(){return b}),s.d(t,"l",function(){return p}),s.d(t,"j",function(){return O}),s.d(t,"i",function(){return f}),s.d(t,"f",function(){return m}),s.d(t,"e",function(){return g}),s.d(t,"a",function(){return _}),s.d(t,"b",function(){return E}),s.d(t,"d",function(){return h}),s.d(t,"c",function(){return S}),s.d(t,"m",function(){return T}),s.d(t,"n",function(){return I}),s.d(t,"o",function(){return v});var r=s("./node_modules/reselect/lib/index.js"),n=s("./src/lib/objectSelector/index.ts"),a=s("./src/reddit/constants/experiments.ts"),c=s("./src/reddit/helpers/name/index.ts"),i=s("./src/reddit/models/Widgets/index.ts"),o=s("./src/reddit/selectors/subreddit.ts");const d=[],u=e=>e.categories.api.list.loaded,l=e=>e.categories.api.list.pending,b=(e,{id:t})=>t?e.categories.api.subreddits.loaded[t]:void 0,p=(e,{id:t})=>t?e.categories.api.subreddits.pending[t]:void 0,O=(e,{id:t})=>t?e.categories.models[t]:void 0,f=e=>e.categories.nameToId,m=(e,{categoryName:t})=>{const s=e.categories.nameToId[Object(c.f)(t)];if(s)return O(e,{id:s})},j=new Set(["nba","nfl"]),g=Object(r.createSelector)(e=>e.categories.ids,e=>e.categories.models,(e,t)=>{const s=a.u,r={};let n=1e3;const i=[];for(const a of e){const e=t[a];j.has(Object(c.f)(e.name))||(s[e.name]||(r[e.name]=n++),i.push(e))}return i.sort((e,t)=>{return(s[e.name]||r[e.name])-(s[t.name]||r[t.name])})}),y=(e,{categoryName:t})=>{const s=m(e,{categoryName:t});return s&&e.subreddits.byCategory[s.id]||d},_=Object(r.createSelector)((e,{id:t})=>{if(!t)return d;return e.subreddits.byCategory[t]||d},o.L,e=>e.subreddits.about,(e,t,s)=>e.map(e=>Object(i.h)(t[e],s[e]))),E=()=>Object(n.a)(Object(r.createSelector)(y,o.L,o.t,(e,t,s)=>e.map(e=>Object(i.h)(t[e],s[e])))),h=Object(r.createSelector)(y,o.L,(e,t)=>0===e.length?d:e.map(e=>t[e])),S=()=>Object(n.a)(Object(r.createSelector)(y,o.L,(e,t)=>0===e.length?d:e.map(e=>{const s=t[e];return s?s.name:""}).filter(Boolean))),T=Object(r.createSelector)((e,t)=>e.listings.listingOrder.ids[t.listingKey]||d,e=>e.categories.models,(e,t)=>e.map(e=>t[e])),I=Object(n.a)(Object(r.createSelector)((e,t)=>e.listings.listingOrder.ids[t.listingKey]||d,e=>e.subreddits.models,(e,t)=>e.map(e=>t[e]))),v=(e,t)=>{const s=t?e.posts.models[t]:null;return s&&s.postCategories?s.postCategories:null}},"./src/reddit/selectors/claimgold.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n});const r=e=>e.claimGold.code,n=e=>e.claimGold.showModal},"./src/reddit/selectors/discoveryUnit.ts":function(e,t,s){"use strict";s.d(t,"h",function(){return O}),s.d(t,"i",function(){return f}),s.d(t,"f",function(){return m}),s.d(t,"j",function(){return j}),s.d(t,"b",function(){return g}),s.d(t,"e",function(){return y}),s.d(t,"a",function(){return _}),s.d(t,"d",function(){return E}),s.d(t,"g",function(){return h}),s.d(t,"c",function(){return S});var r=s("./src/lib/constants/index.ts"),n=s("./src/lib/makeListingKey/index.ts"),a=s("./src/lib/objectSelector/index.ts"),c=s("./src/reddit/helpers/name/index.ts"),i=s("./src/reddit/models/DiscoveryUnit/index.ts"),o=s("./src/reddit/selectors/category.ts"),d=s("./src/reddit/selectors/experiments/exploreV2.ts"),u=s("./src/reddit/selectors/listings.ts"),l=s("./src/reddit/selectors/posts.ts"),b=s("./src/reddit/selectors/subreddit.ts");const p=[],O=e=>e.discoveryUnits.api.list.loaded,f=e=>e.discoveryUnits.api.list.pending,m=(e,{unitName:t})=>{const s=e.discoveryUnits.nameToId[Object(c.f)(t)];return e.discoveryUnits.models[s]},j=()=>Object(a.a)((e,{listingKey:t})=>{const s=Object(l.F)(e);return Object(l.y)(e,{listingKey:t}).filter(e=>{const t=s[e];return t&&!t.isStickied&&!t.isSponsored})}),g=()=>Object(a.a)((e,{categoryName:t,id:s,unitName:a})=>{let c;if(t&&!(c=Object(o.f)(e,{categoryName:t})))return p;const i=s||c&&c.id,d=Object(n.a)(a,r.X.HOT,{category:i});return j()(e,{listingKey:d})}),y=()=>Object(a.a)((e,{listingKey:t,unitName:s,subredditName:a})=>{if(!Object(b.v)(e,{subredditName:a}))return p;const c=t||Object(n.a)(s,r.X.HOT,{subredditName:a});return j()(e,{listingKey:c})}),_=e=>{if(Object(d.a)(e))return m(e,{unitName:i.c})},E=e=>{if(Object(d.a)(e))return m(e,{unitName:i.d})},h=(e,{listingKey:t,shouldLoadMore:s})=>{const r=Object(u.j)(e,{listingKey:t}),n=r?r.token:void 0,a=Object(u.h)(e,{listingKey:t});if(r){if(!s)return;{const s=Object(u.i)(e,{listingKey:t,token:r.token});if(a||s)return}}else{const s=Object(u.f)(e,{listingKey:t});if(a||s)return}return{fetchedToken:n}},S=e=>m(e,{unitName:i.a})},"./src/reddit/selectors/experiments/exploreV2.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return a}),s.d(t,"b",function(){return c}),s.d(t,"e",function(){return i}),s.d(t,"f",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"a",function(){return u});var r=s("./src/reddit/constants/experiments.ts"),n=s("./src/reddit/helpers/chooseVariant/index.ts");const a=e=>e===r.H.ExploreOld,c=e=>e===r.H.ExploreStandardSearchCommunity||e===r.H.ExploreTrendingDUCommunity||e===r.H.ExploreTrendingDUCommunityPopular||e===r.H.ExploreTrendingSearchCommunity,i=e=>e===r.H.ExploreTrendingDUCommunity||e===r.H.ExploreTrendingDUCommunityPopular,o=e=>e===r.H.ExploreTrendingSearchCommunity,d=e=>e===r.H.ExploreTrendingDUCommunityPopular,u=(e,t)=>{const s=Object(n.b)(e,{experimentEligibilitySelector:e=>!e.user.temporaryGQL.isLoggedIn,experimentName:r.D,expEventOverride:t?t.expEventOverride:void 0});return Object(r.R)(s)?void 0:s}},"./src/reddit/selectors/experiments/postSeo.ts":function(e,t,s){"use strict";s.d(t,"e",function(){return c}),s.d(t,"a",function(){return i}),s.d(t,"c",function(){return o}),s.d(t,"d",function(){return d}),s.d(t,"b",function(){return u});var r=s("./src/reddit/constants/experiments.ts"),n=s("./src/reddit/helpers/chooseVariant/index.ts"),a=s("./src/reddit/selectors/user.ts");const c=e=>Object(n.b)(e,{experimentName:r.x,experimentEligibilitySelector:e=>!Object(a.F)(e)}),i=e=>e===r.z.DUOnBottom,o=e=>e===r.z.ListingOnBottom,d=e=>e===r.z.ListingOnBottom||e===r.z.DUOnBottom,u=e=>e===r.z.ListingOnBottom||e===r.z.DUOnBottom},"./src/reddit/selectors/experiments/railsSearchResults.ts":function(e,t,s){"use strict";s.d(t,"c",function(){return c}),s.d(t,"b",function(){return i}),s.d(t,"a",function(){return o});var r=s("./src/reddit/constants/experiments.ts"),n=s("./src/reddit/helpers/chooseVariant/index.ts"),a=s("./src/reddit/selectors/user.ts");const c=e=>Object(a.D)(e)||r.F.Treatment1===Object(n.b)(e,{experimentEligibilitySelector:n.a,experimentName:r.B}),i=e=>r.G.Treatment1===Object(n.b)(e,{experimentEligibilitySelector:n.a,experimentName:r.C}),o=e=>r.m.Disabled===Object(n.b)(e,{experimentEligibilitySelector:n.a,experimentName:r.i})},"./src/reddit/selectors/externalAccount.ts":function(e,t,s){"use strict";s.d(t,"f",function(){return i}),s.d(t,"b",function(){return d}),s.d(t,"c",function(){return u}),s.d(t,"e",function(){return l}),s.d(t,"a",function(){return b}),s.d(t,"d",function(){return p});var r=s("./src/reddit/constants/posts.ts"),n=s("./src/reddit/models/ExternalAccount/index.ts"),a=s("./src/reddit/models/User/index.ts"),c=s("./src/reddit/selectors/user.ts");const i=(e,{username:t})=>!!e.externalAccount.api.user.pending[t],o=(e,{username:t})=>e.externalAccount.user[t],d=e=>{const t=Object(c.j)(e);if(!t)return;const s=Object(a.f)(t),r=o(e,{username:s});return r?r.twitter:void 0},u=e=>!!e.externalAccount.api.connect.pending[n.a.Twitter],l=(e,{profileName:t})=>{if(!t)return null;const s=o(e,{username:t});if(!s)return null;const r=s[n.a.Twitter];if(!r)return null;const i=Object(c.j)(e);if(!(i&&Object(a.f)(i).toLowerCase()===t.toLowerCase()))return r;const d=Object(c.bb)(e,{userName:t});return d?d.prefShowTwitter?r:null:r},b=(e,t)=>{if(Object(c.j)(e)){const s=p(e,t);if(s)return!!s.currentUserIsSupporter}return!1},p=(e,t)=>{const s=t.name,a=t.type;let c;return a===r.a.SUBREDDIT?c=((e,{subredditName:t})=>e.externalAccount.subreddit[t])(e,{subredditName:s}):a===r.a.PROFILE&&(c=o(e,{username:s})),c?c[n.a.Patreon]:null}},"./src/reddit/selectors/frontpage.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return i});var r=s("./src/lib/constants/index.ts"),n=s("./src/reddit/constants/experiments.ts"),a=s("./src/reddit/helpers/chooseVariant/index.ts"),c=s("./src/reddit/selectors/user.ts");const i=e=>{if(e.user&&e.user.session&&!e.user.session.unsafeLoggedOut)return r.X.BEST;if(Object(c.F)(e)||!Object(c.H)(e))return r.X.HOT;switch(Object(a.b)(e,{experimentEligibilitySelector:a.a,experimentName:n.v})){case n.w.Treatment1:return r.X.TOP;default:return r.X.HOT}}},"./src/reddit/selectors/gild.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return r}),s.d(t,"c",function(){return n}),s.d(t,"i",function(){return a}),s.d(t,"f",function(){return c}),s.d(t,"g",function(){return i}),s.d(t,"h",function(){return o}),s.d(t,"b",function(){return d}),s.d(t,"e",function(){return u}),s.d(t,"a",function(){return l});const r=e=>e.gild.gildModalThingId,n=(e,t)=>e.gild.gildModalThingId===t,a=e=>e.gild.gildType,c=e=>e.gild.includeMessage,i=e=>e.gild.isAnonymous,o=e=>e.gild.isIframed,d=e=>e.gild.message,u=e=>e.gild.api.pending,l=e=>e.gild.api.error},"./src/reddit/selectors/goldPurchaseModals.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r}),s.d(t,"b",function(){return n}),s.d(t,"d",function(){return a}),s.d(t,"c",function(){return c}),s.d(t,"p",function(){return i}),s.d(t,"q",function(){return o}),s.d(t,"u",function(){return d}),s.d(t,"e",function(){return u}),s.d(t,"j",function(){return l}),s.d(t,"s",function(){return b}),s.d(t,"t",function(){return p}),s.d(t,"r",function(){return O}),s.d(t,"v",function(){return f}),s.d(t,"h",function(){return m}),s.d(t,"i",function(){return j}),s.d(t,"k",function(){return g}),s.d(t,"m",function(){return y}),s.d(t,"n",function(){return _}),s.d(t,"l",function(){return E}),s.d(t,"o",function(){return h}),s.d(t,"g",function(){return S}),s.d(t,"f",function(){return T});const r=e=>e.goldPurchase.coinPurchaseModal.activePage,n=e=>e.goldPurchase.coinPurchaseModal.gildThingId||void 0,a=e=>e.goldPurchase.coinPurchaseModal.showModal,c=e=>e.goldPurchase.coinPurchaseModal.purchasePackage,i=e=>e.goldPurchase.premiumPurchaseModal.activePage,o=e=>e.goldPurchase.premiumPurchaseModal.showModal,d=e=>e.goldPurchase.updateCardModal.pending,u=e=>e.goldPurchase.payment.paymentMethod,l=e=>e.goldPurchase.payment.cardName,b=e=>e.goldPurchase.payment.savedCardsPending,p=e=>e.goldPurchase.payment.savedCards,O=e=>e.goldPurchase.payment.rememberCard,f=e=>e.goldPurchase.payment.useSavedCard,m=e=>e.goldPurchase.payment.cardValidation.cardCvc,j=e=>e.goldPurchase.payment.cardValidation.cardExpiry,g=e=>e.goldPurchase.payment.cardValidation.cardNumber,y=e=>e.goldPurchase.payment.cardValidation.nameOnCard,_=e=>e.goldPurchase.payment.cardValidation.postalCode,E=e=>e.goldPurchase.payment.stripeToken.errorMessage,h=e=>e.goldPurchase.payment.stripeToken.pending,S=e=>e.goldPurchase.payment.paypal.passthrough,T=e=>e.goldPurchase.payment.paypal.errorMessage},"./src/reddit/selectors/imageUploads.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n}),s.d(t,"b",function(){return a});var r=s("./src/reddit/models/Image/index.tsx");const n=e=>e.imageUploads,a=(e,t)=>{const s=n(e),a=[];for(const n in s){const e=s[n];e.kind===r.b.TempUploaded&&e.context===t&&a.push(e)}return a}},"./src/reddit/selectors/oldSiteRules.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return r});const r=e=>e.oldSiteRules},"./src/reddit/selectors/originalContent.ts":function(e,t,s){"use strict";s.d(t,"d",function(){return O}),s.d(t,"e",function(){return f}),s.d(t,"c",function(){return m}),s.d(t,"h",function(){return j}),s.d(t,"g",function(){return y}),s.d(t,"f",function(){return _}),s.d(t,"i",function(){return E}),s.d(t,"k",function(){return h}),s.d(t,"j",function(){return S}),s.d(t,"a",function(){return T}),s.d(t,"b",function(){return I});var r=s("./node_modules/lodash/values.js"),n=s.n(r),a=s("./node_modules/reselect/lib/index.js"),c=s("./src/app/strings/index.ts"),i=s("./src/lib/objectSelector/index.ts"),o=s("./src/reddit/constants/originalContent.ts"),d=s("./src/reddit/selectors/profile.ts"),u=s("./src/reddit/selectors/user.ts");const l=[],b=Object(c.f)("postCreation.modifiers.originalContentCategories.none"),p=Object(c.f)("postCreation.modifiers.originalContentCategories.best"),O=e=>e.originalContent.categories.api.pending,f=e=>e.originalContent.categories.models,m=Object(a.createSelector)(f,e=>n()(e).sort((e,t)=>e.name.localeCompare(t.name))),j=Object(a.createSelector)(m,e=>e.filter(e=>e.submittable)),g=Object(a.createSelector)(m,e=>e.filter(e=>e.discoverable)),y=Object(a.createSelector)(g,e=>e.reduce((e,t)=>(e[t.name]=t,e),{})),_=Object(a.createSelector)(u.M,g,(e,t)=>[{discoverable:!0,name:o.b,displayText:p(e),submittable:!1},...t]),E=Object(a.createSelector)(u.M,j,(e,t)=>[{discoverable:!1,name:o.c,displayText:b(e),submittable:!0},...t]),h=(e,{categoryName:t})=>e.users.topOCCreators[t]||l,S=Object(i.a)((e,{userNames:t})=>t.map(t=>{return{user:Object(u.bb)(e,{userName:t}),profile:Object(d.h)(e,{profileName:t})}})),T=(e,{categoryName:t})=>e.posts.bestOCPosts[t]||l,I=(e,{categoryName:t})=>e.originalContent.bestPosts.api.pending[t]},"./src/reddit/selectors/profileOverviewChronoItems.ts":function(e,t,s){"use strict";var r=s("./src/lib/objectSelector/index.ts"),n=s("./src/reddit/models/Flair/index.ts"),a=s("./src/reddit/models/PostCreationForm/index.ts");n.e.Text,n.e.Spoiler,n.e.Text,n.e.Spoiler,a.h.RICH_TEXT,n.e.Text,n.e.Spoiler,a.h.RICH_TEXT,n.e.Text,n.e.Spoiler,a.h.RICH_TEXT;var c=s("./src/reddit/helpers/isComment.ts");s.d(t,"f",function(){return i}),s.d(t,"e",function(){return d}),s.d(t,"h",function(){return l}),s.d(t,"g",function(){return b}),s.d(t,"a",function(){return p}),s.d(t,"b",function(){return O}),s.d(t,"d",function(){return f}),s.d(t,"c",function(){return m});const i=Object(r.a)((e,{listingKey:t})=>{const s=e.posts.models;return o(e,{listingKey:t}).filter(e=>{if(Object(c.a)(e))return!0;{const t=s[e];return t&&!t.hidden}})}),o=Object(r.a)((e,{listingKey:t})=>{const s=e.profileOverviewPage.chrono.ids[t];return s?[...s]:[]}),d=Object(r.a)((e,{listingKey:t})=>{return i(e,{listingKey:t}).reduce((t,s)=>{const r=Object(c.a)(s)?e.comments.models[s].postId:s;return t[s]=r,t},{})}),u=(Object(r.a)((e,{listingKey:t})=>{const s=e.posts.models;return u(e,{listingKey:t}).filter(e=>{const t=s[e];return t&&!t.hidden})}),Object(r.a)((e,{listingKey:t})=>{return i(e,{listingKey:t}).map(t=>Object(c.a)(t)?e.comments.models[t].postId:t)})),l=Object(r.a)((e,{listingKey:t})=>{const s=e.posts.models,r=u(e,{listingKey:t}),n={};return r.forEach(e=>n[e]=s[e]),n}),b=Object(r.a)((e,{listingKey:t})=>{const s=e.comments.models,r=i(e,{listingKey:t}),n={};return r.forEach(e=>!!Object(c.a)(e)&&(n[e]=s[e])),n}),p=(e,{listingKey:t})=>e.profileOverviewPage.chrono.api.error[t],O=(e,{listingKey:t})=>e.profileOverviewPage.chrono.api.pending[t],f=(e,{listingKey:t})=>e.profileOverviewPage.chrono.loadMore[t],m=(e,{listingKey:t})=>e.profileOverviewPage.chrono.fetchedTokens[t]},"./src/reddit/selectors/submitValidation.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return r}),s.d(t,"a",function(){return n}),s.d(t,"c",function(){return a});const r=e=>e.subredditSettings.postRequirements.formState,n=e=>e.subredditSettings.postRequirements.formErrors,a=e=>e.creations.formState.fieldValidation},"./src/reddit/selectors/tags.ts":function(e,t,s){"use strict";s.d(t,"j",function(){return c}),s.d(t,"k",function(){return i}),s.d(t,"e",function(){return o}),s.d(t,"h",function(){return d}),s.d(t,"b",function(){return p}),s.d(t,"d",function(){return O}),s.d(t,"c",function(){return f}),s.d(t,"f",function(){return m}),s.d(t,"i",function(){return j}),s.d(t,"a",function(){return g}),s.d(t,"g",function(){return y}),s.d(t,"l",function(){return _}),s.d(t,"m",function(){return E});var r=s("./node_modules/lodash/values.js"),n=s.n(r),a=s("./src/reddit/models/Tags/index.ts");const c=e=>e.tags.api.create.error||e.tags.api.deleteTag.error||e.tags.api.fetch.error||e.tags.api.update.error,i=e=>e.tags.api.create.pending||e.tags.api.deleteTag.pending||e.tags.api.fetch.pending||e.tags.api.update.pending,o=(e,{subredditId:t})=>e.tags.selected.inputByItemId[t]||"",d=(e,{subredditId:t})=>e.tags.selected.selectedOptions[t]||[],u=(e,{subredditId:t})=>e.tags.selected.deselectedOptions[t]||[],l={},b={},p=e=>e.tags.models.globalSubredditTags,O=(e,{subredditId:t})=>e.tags.models.subredditScopedTags[t]||b,f=(e,t)=>{const s=n()(t);for(let r=0;r<s.length;r++)if(s[r].text.toLowerCase().trim()===e.toLowerCase().trim())return s[r];return null},m=(e,{itemId:t})=>e.tags.models.itemTags[t]||l,j=(e,{itemId:t})=>e.tags.models.sortedItemTags[t]||[],g=(e,{thingId:t})=>n()(((e,{thingId:t})=>{const s=o(e,{subredditId:t})?(e=>e.tags.availableGlobalTagOrder.global.map(t=>e.tags.models.globalSubredditTags[t]))(e):(e=>e.tags.availableGlobalTagOrder.recommendedGlobal.map(t=>e.tags.models.globalSubredditTags[t]))(e),r=d(e,{subredditId:t}),n=s.reduce((e,t)=>(e[t.id]=Object(a.e)(t),e),{});return r.reduce((e,t)=>(t.id&&e[t.id]&&(e[t.id].selected=!0),e),n)})(e,{thingId:t})).filter(e=>!e.selected),y=(e,{subredditId:t})=>d(e,{subredditId:t}).concat(u(e,{subredditId:t})),_=(e,{subredditId:t})=>d(e,{subredditId:t}).filter(e=>!e.id&&!!e.action).map(e=>({text:e.displayText,type:a.c.CLASSIFICATION})),E=(e,{subredditId:t})=>{const s=O(e,{subredditId:t});return u(e,{subredditId:t}).filter(e=>!!e.id&&!!s[e.id]).map(e=>({tagId:e.id}))}},"./src/reddit/selectors/toast.ts":function(e,t,s){"use strict";s.d(t,"a",function(){return n});var r=s("./node_modules/reselect/lib/index.js");const n=Object(r.createSelector)(e=>e.toaster,(e,t)=>t,(e,t)=>e.find(e=>e.customToastType===t))},"./src/reddit/selectors/userFlair.ts":function(e,t,s){"use strict";s.d(t,"b",function(){return n}),s.d(t,"a",function(){return a}),s.d(t,"c",function(){return c});var r=s("./src/reddit/models/Flair/index.ts");const n=(e,{subredditId:t})=>e.userFlair[t],a=(e,{subredditId:t})=>!e.userFlair[t]||e.userFlair[t].displaySettings.isEnabled,c=(e,{subredditId:t})=>e.userFlair[t]?e.userFlair[t].displaySettings.position:r.a.Right}}]);
|
|
//# sourceMappingURL=Governance~Reddit.ffd46ccf201bcf6d2095.js.map
|