1"use strict";(self.webpackChunkmicroblog=self.webpackChunkmicroblog||[]).push([[2869,6611],{89336(t,e,r){var n=r(2435),i=r(69627),o=r(13903);let s=(0,n.pM)({__name:"CommunityAvatar",props:{size:{default:"large"},community:{},avatarClass:{default:void 0},noLink:{type:Boolean}},setup(t){let e=(0,n.EW)(()=>t.noLink?void 0:t.community.detailsLink);return(s,a)=>((0,n.uX)(),(0,n.Wv)(o.Ay,{"avatar-sid":t.community.avatarSID,letter:t.community.letter,digit:t.community.digit,title:t.community.title,size:t.size,link:(0,i.R1)(e),"default-avatar":r(77310),"avatar-class":t.avatarClass},null,8,["avatar-sid","letter","digit","title","size","link","default-avatar","avatar-class"]))}});r.d(e,["A",0,s])},55774(t,e,r){r(3362);var n=r(2435),i=r(69627),o=r(14643),s=r(51984),a=r(46807),u=r(47981),c=r(99291),l=r(98247),m=r(28644),p=r(22847),y=r(36611),d=r(47242),g=r(11095),f=r(58193);let h={key:0,class:"flex flex-col grow"},v={class:"flex-center flex-col grow px-4"},w={class:"rounded-full absolute top-0 left-1/2 -translate-50% bg-background"},b={class:"@text-h2 text-black text-center mt-10"},C={class:"mt-1 @text-title1-r text-gray-700 text-center"},A={class:"flex items-center justify-between mt-60px w-full"},D={class:"@text-body text-gray-600"},k={class:"flex items-center max-w-full"},I=["innerHTML"],S={class:"flex items-center justify-between mt-2"},P={class:"@text-body text-gray-600"},j={class:"text-black @text-body"},L={success:{icon:r(87736),bgClass:"bg-primary-500/15",iconClass:"text-primary-500",titleKey:"successful-buy-community",descriptionKey:"successful-buy-community-description",actionKey:"continue"},error:{icon:r(54415),bgClass:"bg-error-500/15",iconClass:"text-error-500",titleKey:"unsuccessful-buy-community",descriptionKey:"unsuccessful-buy-community-description",actionKey:"go-back"}},x=(0,n.pM)({...{async beforeRouteEnter(){if(!await (0,l.XB)())return{path:"/showcase",replace:!0}}},__name:"status",setup(t){let{getActiveCommunityInstance:e}=(0,m.r)(),r=(0,n.EW)(()=>e()),x=(0,y.useCommunityStore)(),R=(0,d.KR)(null),T=(0,d.KR)("success"),M=(0,d.KR)(""),z=(0,n.EW)(()=>r.value?M.value.length?M.value:(0,g.Ay)(L[T.value].descriptionKey,[(0,g.Ay)(r.value.entitySingleTitleKey)]):""),E=(0,n.EW)(()=>r.value?"success"===T.value&&R.value?R.value.detailsLink:r.value.baseRoute:""),{LoadingContainer:B}=(0,u.A)(async()=>{let t=await (0,l.XB)();if(t){R.value=await x.getOrFetchCommunity({communityID:t.community.ID});try{let e=await R.value.join({businessPackageID:t.businessPackageID});return await (0,l.s9)(),e}catch(t){T.value="error",(0,f.TF)(t)&&(M.value=t.message)}}}),O=new c.$().formatDate("yyyy/mm/dd");return(t,e)=>{let u=(0,n.g2)("BaseHeader");return(0,i.R1)(r)?((0,n.uX)(),(0,n.CE)("div",h,[(0,n.bF)((0,i.R1)(B),null,{default:(0,n.k6)(()=>[(0,n.bF)(u,{"start-section":"none","center-section":"logo",title:t.__("buy-x",[t.__((0,i.R1)(r).entitySingleTitleKey)])},null,8,["title"]),(0,n.Lk)("div",v,[(0,i.R1)(R)?((0,n.uX)(),(0,n.CE)("div",{key:0,class:(0,o.C4)(["relative rounded-4 px-5 pb-4 max-w-full",L[(0,i.R1)(T)].bgClass])},[(0,n.Lk)("div",w,[(0,n.bF)(a.A,{src:L[(0,i.R1)(T)].icon,class:(0,o.C4)(["s-64px",L[(0,i.R1)(T)].iconClass])},null,8,["src","class"])]),(0,n.Lk)("h2",b,(0,o.v_)(t.__(L[(0,i.R1)(T)].titleKey,[t.__((0,i.R1)(r).entitySingleTitleKey)])),1),(0,n.Lk)("p",C,(0,o.v_)((0,i.R1)(z)),1),(0,n.Lk)("div",A,[(0,n.Lk)("span",D,(0,o.v_)(t.__((0,i.R1)(r).entitySingleTitleKey))+":",1),(0,n.Lk)("div",k,[(0,n.bF)(p.A,{community:(0,i.R1)(R),size:"medium",class:"ms-2"},null,8,["community"]),(0,n.Lk)("span",{class:"@text-h3-b grow min-w-0 truncate text-primary-500 ms-1",innerHTML:(0,i.R1)(R).sanitizedTitle},null,8,I)])]),(0,n.Lk)("div",S,[(0,n.Lk)("span",P,(0,o.v_)(t.__("date"))+":",1),(0,n.Lk)("span",j,(0,o.v_)((0,i.R1)(O)),1)])],2)):(0,n.Q3)("",!0),(0,n.bF)(s.A,{link:(0,i.R1)(E),class:"min-w-150px mt-4"},{default:(0,n.k6)(()=>[(0,n.eW)((0,o.v_)(t.__(L[(0,i.R1)(T)].actionKey)),1)]),_:1},8,["link"])])]),_:1})])):(0,n.Q3)("",!0)}}});r.d(e,["A",0,x])},22847(t,e,r){let n=r(89336).A;r.d(e,["A",0,n])},52869(t,e,r){r.r(e);let n=r(55774).A;r.d(e,["default",0,n])},11379(t,e,r){r.d(e,{Jy:()=>i,Xg:()=>s,rg:()=>a,xF:()=>o}),r(3362);var n=r(60507);async function i(t){return(await (0,n.zA)("/networkCategory/list",t)).categories}function o(t){return(0,n.zA)("/networkCategory/create",t)}function s(t){return(0,n.zA)("/networkCategory/edit",t)}function a(t){return(0,n.zA)("/networkCategory/remove",t)}},98247(t,e,r){r.d(e,{Bc:()=>u,CZ:()=>g,E6:()=>m,Jd:()=>y,Kd:()=>l,Nd:()=>d,XB:()=>a,ds:()=>p,dy:()=>o,s9:()=>c,yw:()=>s,zr:()=>i});var n=r(94108);function i(){return(0,n.fm)("promote:premium")}function o(t){return(0,n.ph)("promote:premium",t)}function s(){return(0,n.ww)("promote:premium")}function a(){return(0,n.fm)("promote:community")}function u(t){return(0,n.ph)("promote:community",t)}function c(){return(0,n.ww)("promote:community")}function l(){return(0,n.fm)("promote:bundle")}function m(t){return(0,n.ph)("promote:bundle",t)}function p(){return(0,n.ww)("promote:bundle")}function y(){return(0,n.fm)("promote:boshra")}function d(t){return(0,n.ph)("promote:boshra",t)}function g(){return(0,n.ww)("promote:boshra")}},34680(t,e,r){r.d(e,{E:()=>h,c:()=>f}),r(16280),r(23792),r(18111),r(7588),r(61701),r(3362),r(15472),r(62953);var n=r(53169),i=r(58638),o=r(56195),s=r(8e4),a=r(39448),u=r(17428),c=r(43862),l=r(18830),m=r(36982),p=r(15031),y=r(66718),d=r(36611),g=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
1a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};class f extends y.k{constructor(){super(h,"ID")}}class h extends c.Y{constructor(t,e=!0){let r=(0,d.useCommunityStore)();super(t),this.subscribersShowcase=new m.L(this,l.g.center,"subscribers"),this.guestsShowcase=new m.L(this,l.g.center,"all"),this.posts=[],e&&r.map.addPlain(t)}get hasPost(){return!!this.posts.length}canMovePostDown(t){return t<this.posts.length-1}canMovePostUp(t){return t>0}isOwner(t){return this.ownerUserID===t.userID}async movePostDown(t){try{if(!this.canMovePostDown(t))return;await this.setPostOrder({operation:"down",postID:this.posts[t].postID}),(0,a.wg)(this.posts,t,t+1)}catch(t){(0,a.wH)(t)}}async movePostUp(t){try{if(!this.canMovePostUp(t))return;await this.setPostOrder({operation:"up",postID:this.posts[t].postID}),(0,a.wg)(this.posts,t,t-1)}catch(t){(0,a.wH)(t)}}async getPostsList(t){var e;let r=(0,s.D)(),u=(0,n.A)(),c=await (0,i.rd)(t);r.map.addPlainMany(c.posts),u.map.addPlainMany(c.usersSummary);let l=o.j.fromPlainList(c.index);if(null==(e=c.contentQuestionExerciseCount)||e.forEach(t=>{let e=r.map.get(t.postID);e&&(e.setExercisesCount(t.exercisesCount),e.setQuestionsCount(t.questionsCount))}),!t.pagination)throw Error("pagination not sent");let m=(0,a.n4)((0,p.F)(),t.pagination);return!this.posts.length||m?this.posts=l:this.posts=[...this.posts,...l],{pagination:c.pagination,indexes:l}}async getMembersList(t){let e=await (0,i.vb)(t),r=(0,n.A)().map.addPlainMany(e.usersSummary);return{...e,usersSummary:r}}async getModeratorsList(t){let e=await (0,i.if)(t),r=(0,n.A)().map.addPlainMany(e.usersSummary);return{...e,usersSummary:r}}addModerator(t){return(0,i.yE)(t)}removeModerator(t){return(0,i.jN)({...t,communityID:this.ID})}async edit(t){let e=(0,d.useCommunityStore)(),r=await (0,i.GD)({...this==null?void 0:this.toPlain(),...t});e.fromPlain(r.community)}async setPrice(t){let e=t.isFreeSubscription?0:t.subscriptionCost,r=0;if(!t.isFreeSubscription&&t.hasDiscount){if(null==t.subscriptionCostAfterDiscount)return!1;r=t.subscriptionCostAfterDiscount}if(null!=e&&r>e)return!1;let n=!t.isFreeSubscription&&t.hasDiscount&&null!=e&&r<e;return await (0,i.Np)({...t,subscriptionCost:e,subscriptionCostAfterDiscount:n?r:0,hasDiscount:n}),!0}async updateStatus(t){await (0,i.jZ)(t),this.status=t.status}setPostOrder(t){return(0,i.wB)(t)}addMember(t){return(0,i.yQ)({...t,communityID:this.ID})}async join(t={}){let e=await (0,i.yQ)({communityID:this.ID,...t});this.contributionStatus=e.status,"member"===e.status&&this.membersCount++}async leave(t={}){await (0,i.Nd)(t)}async kick(t){await (0,i.el)({userID:t.userID}),this.membersCount--}}g([(0,u.pj)()],h.prototype,"orderingMode",void 0),g([(0,u.pj)()],h.prototype,"viewMode",void 0),g([(0,u.pj)()],h.prototype,"hasShowcase",void 0),g([(0,u.pj)()],h.prototype,"bannerSID",void 0),g([(0,u.pj)()],h.prototype,"joinLink",void 0),g([(0,u.pj)()],h.prototype,"progressPercent",void 0),g([(0,u.pj)()],h.prototype,"networkCategory",void 0),g([(0,u.pj)()],h.prototype,"contentAccessWithDirectLink",void 0),g([(0,u.pj)()],h.prototype,"communityBundleContributionStatus",void 0)},61865(t,e,r){r.d(e,{w:()=>a}),r(18111),r(61701),r(15472);var n=r(36611),i=r(53169),o=r(17428),s=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};class a extends o.SS{get user(){return(0,i.A)().map.safeGet(this.userID)}get community(){return(0,n.useCommunityStore)().map.get(this.communityID)}}s([(0,o.pj)()],a.prototype,"ID",void 0),s([(0,o.pj)()],a.prototype,"userID",void 0),s([(0,o.pj)()],a.prototype,"communityID",void 0),s([(0,o.pj)()],a.prototype,"status",void 0)},35129(t,e,r){r.d(e,{O:()=>i}),r(18111),r(61701);var n=r(61865);let i=(0,r(46645).nY)("communityMember",()=>({fromPlainList:function(t){return t?t.map(t=>new n.w(t)):[]}}))},98895(t,e,r){r.d(e,{V:()=>u}),r(18111),r(61701),r(15472);var n=r(99291),i=r(36611),o=r(17428),s=r(79667),a=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;
1a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};class u extends o.SS{get community(){return(0,i.useCommunityStore)().map.get(this.communityID)}get createdTimeString(){return n.$.fromTimestampSeconds(this.createdTime).formatDate("yyyy/mm/dd - hh:mm")}get finalAmountString(){return(0,s.$)(this.priceInfo.subscriptionCostAfterDiscount)}get subscriptionCostString(){return(0,s.$)(this.priceInfo.subscriptionCost)}get subscriptionCostAfterDiscountString(){return(0,s.$)(this.priceInfo.subscriptionCostAfterDiscount)}get currency(){switch(this.priceInfo.currency){case"IRR":return"n-currency.IRR";case"USD":return"n-currency.USD";default:return"n-currency.TMN"}}}a([(0,o.pj)()],u.prototype,"communityID",void 0),a([(0,o.pj)()],u.prototype,"createdTime",void 0),a([(0,o.pj)()],u.prototype,"priceInfo",void 0)},99742(t,e,r){r.d(e,{l:()=>o}),r(18111),r(61701);var n=r(46645),i=r(98895);let o=(0,n.nY)("communityPurchaseHistory",()=>({fromPlainList:function(t){return t?t.map(t=>new i.V(t)):[]}}))},36611(t,e,r){r.d(e,{useCommunityStore:()=>m}),r(18111),r(61701),r(3362);var n=r(58638),i=r(34680),o=r(35129),s=r(99742),a=r(1369),u=r(67322),c=r(53169),l=r(3869);let m=(0,r(46645).nY)("community",()=>{let t=new i.c;function e(e){let r=(0,u.x)(),n=t.addPlain(e);return n.categories=r.fromPlainList(e.networkCategories),n}function r(t){return t?t.map(e):[]}async function m(t){let r=(0,c.A)(),i=await (0,n.eR)(t);return r.map.addPlainMany(i.usersSummary),i.userSummary&&r.map.addPlain(i.userSummary),e(i.community)}async function p(e){let r=t.get(e.communityID),n=m(e);return r||n}async function y(t){if(t.title&&t.membershipType&&t.customizationType)return e((await (0,n.m$)({...t,title:t.title,membershipType:t.membershipType,writePermission:"owner",customizationType:t.customizationType,orderingMode:"contentCreatedTimeASC",viewMode:"postStyle"})).community)}async function d(t){let e=await (0,n.Q4)(t),i=(0,c.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:r(e.communities),usersSummary:i}}async function g(t){let e=await (0,n.cg)(t),i=(0,c.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:r(e.communities),usersSummary:i}}async function f(t){let e=await (0,n.jd)(t),i=(0,c.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:r(e.communities),usersSummary:i}}async function h(){let t=await (0,n.jd)({},{"app-scope-tenant":"boshra"}),e=(0,c.A)().map.addPlainMany(t.usersSummary);return{pagination:{...t.pagination},communities:r(t.communities),usersSummary:e}}async function v(t){let e=await (0,n.SE)(t),i=(0,c.A)().map.addPlainMany(e.usersSummary),s=r(e.communities),a=(0,o.O)().fromPlainList(e.members);return{pagination:{...e.pagination},communities:s,usersSummary:i,members:a}}async function w(t){let e=await (0,n.Li)(t),i=(0,c.A)(),o=(0,s.l)();return i.fromPlainList(e.usersSummary),{pagination:{...e.pagination},communities:r(e.communities),purchaseHistory:o.fromPlainList(e.purchaseHistory)}}return{map:t,fromPlain:e,fromPlainList:r,create:y,get:m,getOrFetchCommunity:p,getCommunityListAll:d,getCommunityList:g,getCommunityListModeratedByMe:f,getCommunityListManagedByMe:v,getPurchaseHistory:w,getCommunityBasedOnRoute:function(e=l.p){let r,n=null==e?void 0:e.currentRoute.value.params.communityId;if(n){let e=(0,a.U)();r=t.get(n)||e.map.get(n)||void 0}return r},getBoshraCommunityListModeratedByMe:h}})},43862(t,e,r){r.d(e,{Y:()=>d,u:()=>y}),r(89463),r(23792),r(44114),r(18111),r(61701),r(3362),r(15472),r(62953);var n=r(58638),i=r(55570),o=r(15846),s=r(53169),a=r(39448),u=r(17428),c=r(66718),l=r(11095),m=r(6816),p=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};class y extends c.k{constructor(){super(d,"ID")}}class d extends i.M{constructor(){super(...arguments),this.mode="view",this.categories=[]}get recentModerators(){let t=(0,s.A)().map;return this.moderatorsRecentContributed.map(e=>t.safeGet(e))}get ownerUser(){return(0,s.A)().map.safeGet(this.ownerUserID)}get hasMoreDescription(){return this.description.length>300||this.description.split("\n").length>8}get sanitizedDescription(){return o.W.processText(this.description)}get membersCountString(){return(0,a.Nf)(this.membersCount)}get moderatorsCountString(){return(0,a.Nf)(this.moderatorsCount)}get staffsCountString(){return(0,a.Nf)(this.staffsCount)}get editLink(){return`${this.detailsLink}/set`}
1get createPostLink(){return`${this.detailsLink}/compose`}get membersPageLink(){return`${this.detailsLink}/members`}get viewSettingsPageLink(){return`${this.detailsLink}/settings/view`}get permissionsViewPageLink(){return`${this.detailsLink}/settings/permissions-view`}get permissionsWritePageLink(){return`${this.detailsLink}/settings/permissions-write`}get membershipPageLink(){return`${this.detailsLink}/settings/membership`}get moderatorsPageLink(){return`${this.detailsLink}/moderators`}get fullLink(){return"https://farsnews.ir"+this.detailsLink}get canViewMembersList(){let t=this.viewMembersPermission;switch(this.contributionStatus){case"member":return"member"===t||"all"===t;case"moderator":case"owner":return!0;default:return!1}}get summarizeContentsCount(){return(0,a.Nf)(this.contentsCount)}get mainCategoryTitleLocalized(){var t;return(null==(t=this.categories)||null==(t=t[0])?void 0:t.localizedTitle)||(0,l.Ay)("category")}get manageCategoriesLink(){if(this.isCurrentUserOwner)return`${this.detailsLink}/categories`}get canDisplayCategories(){var t;return!!this.isCurrentUserOwner||null!=(t=this.categories)&&!!t.length}get moreCategoriesNumber(){if(this.categories.length>1)return this.categories.length-1}getSanitizedSummarizedDescription(){return o.W.processText(this.getSummarizedDescription())}getSummarizedDescription(){if(!this.hasMoreDescription)return this.description;let t=this.description.substring(0,300);return t=t.split("\n").slice(0,8).join("\n"),`${t}â¦`}setMode(t){this.mode=t}acceptJoinRequest(t){return(0,n.lD)({action:"accept",communityID:this.ID,userID:t})}rejectJoinRequest(t){return(0,n.lD)({action:"reject",communityID:this.ID,userID:t})}removeJoinRequest(t){return(0,n.lD)({action:"remove",communityID:this.ID,userID:t})}async addNetworkCategory(t){3===this.categories.length?(0,m.GY)((0,l.Ay)("category-error-message",[3]),{type:"warning"}):(await (0,n.bU)({networkCategoryID:t.ID}),this.categories.push(t))}async removeNetworkCategory(t){await (0,n.ei)({networkCategoryID:t.ID});let e=this.categories.findIndex(e=>e.ID===t.ID);~e&&this.categories.splice(e,1)}}p([(0,u.pj)(),(0,u.W6)("sanitizedDescription")],d.prototype,"description",void 0),p([(0,u.pj)()],d.prototype,"ownerUserID",void 0),p([(0,u.pj)()],d.prototype,"customizationType",void 0),p([(0,u.pj)()],d.prototype,"viewMembersPermission",void 0),p([(0,u.pj)()],d.prototype,"showInPublicDirectory",void 0),p([(0,u.pj)()],d.prototype,"status",void 0),p([(0,u.pj)(),(0,u.W6)("membersCountString")],d.prototype,"membersCount",void 0),p([(0,u.pj)(),(0,u.W6)("summarizeContentsCount")],d.prototype,"contentsCount",void 0),p([(0,u.pj)(),(0,u.W6)("moderatorsCountString")],d.prototype,"moderatorsCount",void 0),p([(0,u.pj)()],d.prototype,"moderatorsRecentContributed",void 0),p([(0,u.pj)(),(0,u.W6)("staffsCountString")],d.prototype,"staffsCount",void 0),p([(0,u.pj)()],d.prototype,"createdTime",void 0),p([(0,u.pj)()],d.prototype,"staffAccessToThisCommunity",void 0),p([(0,u.pj)()],d.prototype,"networkCategories",void 0),p([(0,u.PP)()],d.prototype,"sanitizedDescription",null),p([(0,u.PP)()],d.prototype,"membersCountString",null),p([(0,u.PP)()],d.prototype,"moderatorsCountString",null),p([(0,u.PP)()],d.prototype,"staffsCountString",null),p([(0,u.PP)()],d.prototype,"summarizeContentsCount",null)},1369(t,e,r){r(18111),r(61701);var n=r(43862),i=r(67322);let o=(0,r(46645).nY)("communitySummary",()=>{let t=new n.u;function e(e){let r=(0,i.x)(),n=t.addPlain(e);return n.categories=r.fromPlainList(e.networkCategories),n}return{map:t,fromPlain:e,fromPlainList:function(t){return t?t.map(e):[]}}});r.d(e,["U",0,o])},3515(t,e,r){r.d(e,{x:()=>m,z:()=>l}),r(23792),r(44114),r(18111),r(7588),r(3362),r(15472),r(62953);var n=r(67322),i=r(11379),o=r(11095),s=r(17428),a=r(66718),u=r(28644),c=function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s};class l extends s.SS{constructor(t){super(t)}get localizedTitle(){let t=(0,o.TH)();return this.title[t.language]}get editLink(){let{getActiveCommunityInstance:t}=(0,u.r)(),e=t();return e?`${e.baseRoute}/category/set/${this.ID}`:""}getChildren(){if(!this.subCategories)return[];let t=[];
1return this.subCategories.forEach(e=>t.push(new l(e))),t}getCategoryWithChildren(){return[this,...this.getChildren()]}async edit(t){await (0,i.Xg)({...t,networkCategoryID:this.ID}),t.iconSID&&(this.iconSID=t.iconSID),t.title&&(this.title=t.title)}async remove(t){let e=(0,n.x)();await (0,i.rg)({networkCategoryID:this.ID}),t?e.removeSubCategory(t,this):e.removeCategory(this)}}c([(0,s.pj)()],l.prototype,"ID",void 0),c([(0,s.pj)()],l.prototype,"parentID",void 0),c([(0,s.pj)()],l.prototype,"title",void 0),c([(0,s.pj)()],l.prototype,"iconSID",void 0),c([(0,s.pj)()],l.prototype,"subCategories",void 0);class m extends a.k{constructor(){super(l,"ID")}safeGet(t){let e=(0,n.x)();return this.get(t)||e.getDefaultNetworkCategory()}}},67322(t,e,r){r.d(e,{x:()=>c}),r(23792),r(44114),r(18111),r(20116),r(61701),r(13579),r(3362),r(62953);var n=r(46645),i=r(3515),o=r(11379),s=r(28644),a=r(47242),u=r(2435);let c=(0,n.nY)("networkCategory",()=>{let t,e=new i.x,r=(0,a.Kh)({}),n=(0,u.EW)(()=>{let{getActiveCommunityInstance:t}=(0,s.r)(),e=t();return e?e.customizationType:"book"});function c(t){r[n.value]||(r[n.value]=[]),r[n.value].push(l(t))}function l(t){return e.addPlain(t)}function m(t){return t?t.map(l):[]}async function p(){var t,e,i;if(null!=(t=r[n.value])&&t.length)return{categories:r[n.value],hasChildren:null==(i=r[n.value])?void 0:i.some(t=>t.getChildren().length>0)};let s=await (0,o.Jy)({});r[n.value]=m(s);let a=null==(e=r[n.value])?void 0:e.some(t=>t.getChildren().length>0);return{categories:r[n.value],hasChildren:a}}async function y(t){let e=await (0,o.xF)(t);return t.parentID||c(e.networkCategory),e}async function d(t){var e;for(let i of(null!=(e=r[n.value])&&e.length||await p(),r[n.value])){if(i.ID===t)return i;let e=i.getChildren().find(e=>e.ID===t);if(e)return e}}return{getList:p,fromPlainList:m,fromPlain:l,getDefaultNetworkCategory:function(){return t||(t=new i.z({ID:"-1",iconSID:"",parentID:"-1",subCategories:[],title:{ar:"",en:"",fa:""}})),t},addCategory:c,addSubCategory:function(t,e){var i;let o=null==(i=r[n.value])?void 0:i.find(e=>e.ID===t);o&&(o.subCategories||(o.subCategories=[]),o.subCategories.push(e))},removeCategory:function(t){if(!r[n.value])return;let e=r[n.value].findIndex(e=>e.ID===t.ID);~e&&r[n.value].splice(e,1)},removeSubCategory:function(t,e){var i,o;let s=null==(i=r[n.value])?void 0:i.find(e=>e.ID===t);if(!s||!s.subCategories)return;let a=s.subCategories.findIndex(t=>t.ID===e.ID);~a&&(null==(o=s.subCategories)||o.splice(a,1))},categories:(0,u.EW)(()=>r[n.value]),create:y,get:async function(t){var e;let s=null==(e=r[n.value])?void 0:e.find(e=>e.ID===t);if(s)return s;let a=await (0,o.Jy)({parentCategoryID:t});return new i.z(a[0])},MAX_TITLE_LENGTH:32,search:d}})},36982(t,e,r){r.d(e,{L:()=>p}),r(16280),r(44114),r(18111),r(20116),r(7588),r(61701),r(3362);var n=r(38130),i=r(50219),o=r(65276),s=r(73132),a=r(62906),u=r(53169),c=r(58193),l=r(11095),m=r(69627);class p extends s._{constructor(t,e,r){super(),this.community=t,this.column=e,this.visibility=r}get key(){return this.community.ID}get defaultAutoBlockSeederType(){return"manual"}get canManageBlocks(){return this.community.isCurrentUserOwner}get canManageContents(){return this.community.canWrite}get addBlockLink(){return`${this.community.detailsLink}/showcase/block`}get contentSingleTitleKey(){return"content"}get contentPluralTitleKey(){return"contents"}isCommunityShowcase(){return!0}async addBlock(t){var e,r;let s=(0,i.q)(),p=(0,a.d)(),y=(0,u.A)();if(!t.type)throw(0,c.mT)((0,l.Ay)("block-type-error"));if(!t.contentType)throw(0,c.mT)({message:(0,l.Ay)("empty-block-content-type-error"),track:!1});let d=await (0,n.Xp)({communityID:this.community.ID,showcaseType:"community",title:t.title,titleURL:t.titleURL,type:t.type,location:o._.showcase,locationColumn:this.column,contentType:t.contentType,seeder:t.seeder||"manual",config:(0,m.ux)(t.config),visibility:this.visibility}),g=s.fromPlainList(d.blocks);await (null==(e=g[0].getMetaData())||null==(r=e.getData)?void 0:r.call(e)),g.forEach(t=>{var e;null==(e=t.blockTabs)||e.forEach(e=>{e.contents.forEach(e=>{var r;let n=null==(r=d.showcaseContents)?void 0:r.find(t=>t.entityID===e.entityID);n&&p.addPlainToMap(n,t.contentType)})})}),y.map.addPlainMany(d.usersSummary),this.blocks.push(g[0])}async getBlocksList(t=!1){let e=(0,i.q)(),r=(0,a.d)(),s=(0,u.A)();if(!this.community.ID)throw Error("community.ID not provided!");let c=await (0,n.gj)({location:o._.showcase,showcaseType:this.showcaseType(),visibility:this.visibility}),l=e.fromPlainList(c[`${this.column}Blocks`]);for(let t=0;t<l.length;t++){var m,p;let e=l[t];await (null==(m=e.getMetaData())||null==(p=m.getData)?void 0:p.call(m))}l.forEach(t=>{var e;
1null==(e=t.blockTabs)||e.forEach(e=>{e.contents.forEach(e=>{var n;let i=null==(n=c.showcaseContents)?void 0:n.find(t=>t.entityID===e.entityID);i&&r.addPlainToMap(i,t.contentType)})})}),s.map.addPlainMany(c.usersSummary),this.blocks=l}canSetAutoBlock(){return!1}showcaseType(){return"community"}canSetAutoBlockSource(){return!0}}},54415(t){t.exports='<svg fill="none" viewBox="0 0 80 80"><rect width="80" height="80" fill="var(--svg-secondary-color)" rx="40"/><path fill="currentColor" d="m31.656 53.076 8.348-8.381 8.348 8.381 4.734-4.733-8.382-8.348 8.382-8.348-4.734-4.734-8.348 8.382-8.348-8.382-4.734 4.733 8.382 8.349-8.382 8.348z"/><path fill="currentColor" fill-rule="evenodd" d="M39.999 5.833c18.866 0 34.166 15.3 34.166 34.167S58.865 74.167 40 74.167c-18.867 0-34.167-15.3-34.167-34.167S21.133 5.833 40 5.833ZM67.499 40c0-15.2-12.3-27.5-27.5-27.5s-27.5 12.3-27.5 27.5 12.3 27.5 27.5 27.5 27.5-12.3 27.5-27.5" clip-rule="evenodd"/></svg>'},77310(t){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAAYFBMVEV4qY/////3+vj2+fju9fHu9PHm7+rl7+rd6uPd6ePV5NzU5NzM39XM3tXE2c7D2c7D2M681Me71Me708erybmqybmiw7Kav6uavquZvquSuaSRuaSJtJ2Js52BrpaArpYSHq3YAAAB70lEQVR42u3c3W7aQBRF4X3cTAslkE6mDj+F+P3fsioNllNaEim28S7rux0JnSUkOL4YCwAAAAAAAAAAAACAW7J+WNzFR31Z1LqKJlfRk1Srw278X7JGtk/Rr5VGtauib086sp0/PjUazb6KAdQaTYohLDSWHINIGsk+BqKR3EfHctuo62ycN0/HD0jRSjtJbgHraKWDDANW0TrIMWAWJ0tZBtzFydYzIFqNe4AIIIAAAggg4K3T9ayKWe0bkOMouwbkeJE9A3K0smNAjo7sF5DjlewWkOMP2Ssgx5lsFfA3BB
1BwkwGleAcUqTgHFEkqvgFFR8U1oOhF8QwoahXHgKKO4hdQ9EqxCKjO528Vh4B5d/5/F8wnG7DpzH+hoJ5sgEo7/8XT6Qbo+zyq+Va6eDrlgPcggAACCCCAAAIIIIAAAggggAACCCCAgGsGHK8i2t3giFauLK+gRIT3HRoCCCCAAAJ6DFhuG99VIiLtrHehSAfvZS4O5tvo0n2d3roHNO4B0/y8//8buIuTjWfAwv1XaBWtH5YBG/d/YlXdAseAx+hYru22UT1X3s8D0mMM4rPG8uz+eh7/FyRpN0BB0m+2BbXeYcKvaSsaW4k+fdP49vcpelI96Tq2D/OPR6SvdSMAAAAAAAAAAAAAAG7BT6sSH2T3mWX5AAAAAElFTkSuQmCC"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.