1"use strict";(self.webpackChunkmicroblog=self.webpackChunkmicroblog||[]).push([[3185,6611],{49717(e,t,r){r(74423),r(18111),r(22489),r(3362);var n=r(2435),i=r(69627),o=r(14643),a=r(36596),l=r(46422),s=r(40838),u=r(97884),c=r(47242),d=r(11095);let p=(0,n.pM)({__name:"BottomSheetSelectItem",props:(0,n.zz)({title:{},items:{},itemsKey:{default:"value"},height:{default:80},searchable:{type:Boolean},bodyClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:(0,n.zz)(["close"],["update:modelValue"]),setup(e,{emit:t}){let r=(0,n.fn)(e,"modelValue"),p=(0,c.KR)(e.searchable?"":null),m=(0,n.EW)(()=>{var t;return e.searchable&&p.value&&(null==(t=p.value)?void 0:t.length)!==0?e.items.filter(e=>null==e?void 0:e.text.toLowerCase().includes(p.value.toLowerCase())):e.items});async function y(e){r.value=e,await (0,n.dY)(),t("close")}let v={type:"text",title:e.title,searchPlaceholder:(0,d.Ay)("search")};return(t,c)=>((0,n.uX)(),(0,n.CE)("div",{class:"bs-body-wrapper flex flex-col",style:(0,o.Tr)({height:`${e.height}vh`})},[(0,n.bF)(a.A,{"search-query":(0,i.R1)(p),"onUpdate:searchQuery":c[0]||(c[0]=e=>(0,i.i9)(p)?p.value=e:null),"header-config":v},null,8,["search-query"]),(0,n.Lk)("div",{class:(0,o.C4)(["flex flex-col bs-form-wrapper",e.bodyClass])},[(0,i.R1)(m).length?((0,n.uX)(),(0,n.Wv)(u.A,{key:0,items:(0,i.R1)(m),"key-field":e.itemsKey},{default:(0,n.k6)(({item:e})=>{var t;return[(0,n.bF)(s.A,{title:e.text,selected:(null==(t=r.value)?void 0:t.value)===e.value,icon:e.icon,image:e.image,onClick:t=>y(e)},null,8,["title","selected","icon","image","onClick"])]}),_:1},8,["items","key-field"])):((0,n.uX)(),(0,n.Wv)(l.A,{key:1,title:t.__("no-items-found")},null,8,["title"]))],2)],4))}});r.d(t,["A",0,p])},87933(e,t,r){var n=r(2435),i=r(46249),o=r(69627),a=r(14643);let l=["aria-valuemax","aria-valuenow"],s={dir:"ltr",class:"absolute left-1/2 top-1/2 -translate-1/2 text-12px"},u=["stroke-width","cx","cy","r"],c=["stroke-width","stroke-dasharray","stroke-dashoffset","cx","cy","r"],d=(0,n.pM)({__name:"CircularProgressBar",props:{maxCount:{},count:{},radius:{},label:{},stroke:{},fixRadius:{type:Boolean},containerClass:{}},emits:["svgClick"],setup(e,{emit:t}){let r=(0,n.EW)(()=>e.stroke||3),d=(0,n.EW)(()=>e.count<=e.maxCount+9),p=(0,n.EW)(()=>e.fixRadius||e.count<=e.maxCount-21?e.radius:e.radius+2),m=(0,n.EW)(()=>2*p.value+2*r.value),y=(0,n.EW)(()=>e.count/e.maxCount),v=(0,n.EW)(()=>1-Math.min(y.value,1)),f=(0,n.EW)(()=>2*Math.PI*p.value),g=(0,n.EW)(()=>v.value*f.value);return(y,v)=>((0,n.uX)(),(0,n.CE)("div",{class:"n-y292xp",style:(0,a.Tr)({width:`${(0,o.R1)(m)}px`,height:`${(0,o.R1)(m)}px`}),role:"progressbar","aria-valuemax":e.maxCount,"aria-valuemin":"0","aria-valuenow":e.count},[(0,n.Lk)("p",s,[(0,n.RG)(y.$slots,"label",{},()=>[(0,n.eW)((0,a.v_)(e.label),1)])]),(0,n.RG)(y.$slots,"default"),(0,o.R1)(d)?((0,n.uX)(),(0,n.CE)("svg",{key:0,role:"presentation",class:"s-full absolute",onClick:v[0]||(v[0]=(0,i.D$)(e=>t("svgClick"),["prevent"]))},[(0,n.Lk)("circle",{fill:"none","stroke-width":(0,o.R1)(r),stroke:"currentColor",class:(0,a.C4)(["n-jwvu1c",e.containerClass]),cx:(0,o.R1)(p)+(0,o.R1)(r),cy:(0,o.R1)(p)+(0,o.R1)(r),r:(0,o.R1)(p)},null,10,u),(0,n.Lk)("circle",{style:{transition:"stroke-dashoffset 0.3s"},fill:"none","stroke-width":(0,o.R1)(r),"stroke-linecap":"round","stroke-dasharray":(0,o.R1)(f),"stroke-dashoffset":(0,o.R1)(g),stroke:"currentColor",cx:(0,o.R1)(p)+(0,o.R1)(r),cy:(0,o.R1)(p)+(0,o.R1)(r),r:(0,o.R1)(p)},null,8,c)])):(0,n.Q3)("",!0)],12,l))}});r.d(t,["A",0,d])},68084(e,t,r){r(3362);var n=r(2435),i=r(14643),o=r(98321),a=r(51984),l=r(46807),s=r(2239),u=r(11095);let c={class:"flex items-center justify-between p-2 rounded-3 border-1 border-gray-100"},d={class:"flex items-center"},p={class:"@text-title2-s truncate min-w-0"},m={class:"px-6px py-1 rounded-2 border-1 border-gray-200 text-gray-600 ms-2 @text-subtitle-s truncate min-w-0"},y=(0,n.pM)({__name:"GroupLevelCard",props:{educationGroup:{},bundle:{}},emits:["remove"],setup(e,{emit:t}){async function y(){e.educationGroup.levels&&(await e.bundle.removeEduGroup(e.educationGroup.levels[0].eduGroupLevelID),t("remove",e.educationGroup.ID))}function v(){var t;
1(0,s.fH)({subtitle:(0,u.Ay)("confirm-deleting-group",[e.bundle.title,e.educationGroup.localizedTitle,(null==(t=e.educationGroup.levels)?void 0:t[0].localizedTitle)||""]),okText:(0,u.Ay)("remove"),type:"error",action:y,title:(0,u.Ay)("confirm-deletion-operation"),icon:r(98321)})}return(t,r)=>{var s;return(0,n.uX)(),(0,n.CE)("div",c,[(0,n.Lk)("div",d,[(0,n.Lk)("div",p,(0,i.v_)(e.educationGroup.localizedTitle),1),(0,n.Lk)("div",m,(0,i.v_)(null==(s=e.educationGroup.levels)?void 0:s[0].localizedTitle),1)]),(0,n.bF)(a.A,{"style-type":"text",color:"error",class:"p-0",action:v},{default:(0,n.k6)(()=>[(0,n.bF)(l.A,{src:o,class:"s-22px"})]),_:1})])}}});r.d(t,["A",0,y])},41592(e,t,r){var n=r(2435),i=r(69627),o=r(14643),a=r(17e3);let l=(0,n.pM)({__name:"CharacterCounter",props:{count:{},maxCount:{},threshold:{},alwaysShowCounter:{type:Boolean},fixRadius:{type:Boolean},radius:{default:9}},setup(e){let t=(0,n.EW)(()=>{let t=e.maxCount-e.threshold;return e.count<=t?"normal":e.count<=e.maxCount?"warn":"overflow"}),r=(0,n.EW)(()=>e.alwaysShowCounter?e.count.toString():e.count>=e.maxCount-e.threshold?`${e.maxCount-e.count}`:"");return(l,s)=>((0,n.uX)(),(0,n.Wv)(a.A,{count:e.count,"max-count":e.maxCount,radius:e.radius,label:(0,i.R1)(r),"fix-radius":e.fixRadius,class:(0,o.C4)({"text-warning-500":"warn"===(0,i.R1)(t),"text-primary-500":"normal"===(0,i.R1)(t),"text-error-500":"overflow"===(0,i.R1)(t)})},null,8,["count","max-count","radius","label","fix-radius","class"]))}});r.d(t,["A",0,l])},58867(e,t,r){var n=r(2435),i=r(14643),o=r(46807);let a={class:"n-np9k6l"},l=["innerHTML"],s=["textContent"],u={key:3,class:"@text-body text-gray-600 w-full break-words"},c={key:4,class:"mt-4"},d=(0,n.pM)({__name:"Empty",props:{title:{},subtitle:{},icon:{},isTitleHtml:{type:Boolean},titleClass:{}},setup:e=>(t,r)=>((0,n.uX)(),(0,n.CE)("div",a,[e.icon?((0,n.uX)(),(0,n.Wv)(o.A,{key:0,src:e.icon,class:"n-n1ry8y"},null,8,["src"])):(0,n.Q3)("",!0),(0,n.RG)(t.$slots,"image"),e.isTitleHtml?((0,n.uX)(),(0,n.CE)("div",{key:1,class:(0,i.C4)(["n-et9jeg",e.titleClass]),innerHTML:e.title},null,10,l)):((0,n.uX)(),(0,n.CE)("p",{key:2,class:(0,i.C4)(["n-et9jeg",e.titleClass]),textContent:(0,i.v_)(e.title)},null,10,s)),e.subtitle?((0,n.uX)(),(0,n.CE)("p",u,(0,i.v_)(e.subtitle),1)):(0,n.Q3)("",!0),t.$slots.button?((0,n.uX)(),(0,n.CE)("div",c,[(0,n.RG)(t.$slots,"button")])):(0,n.Q3)("",!0)]))});r.d(t,["A",0,d])},12793(e,t,r){var n=r(2435),i=r(46249),o=r(69627),a=r(14643),l=r(20369),s=r(88346),u=r(46807),c=r(47242),d=r(13114);let p={class:"leading-14px me-1 break-all"},m=["dir"],y={key:0,class:"absolute top-0 end-0 h-full w-60px pointer-events-none bg-gradient-to-l rtl:bg-gradient-to-r from-background dark:from-backgroundDark"},v=(0,n.pM)({__name:"BaseErrorHint",props:{errors:{}},setup(e){let t=(0,c.KR)(!1),r=(0,c.KR)(!1),v=(0,c.KR)(null);function f(){r.value&&(t.value=!t.value)}return(0,n.wB)(()=>e.errors,function(){(0,n.dY)(()=>{requestAnimationFrame(()=>{let e=v.value;e&&(r.value=e.scrollHeight>1.9*e.clientHeight)})})},{deep:!0,immediate:!0}),(0,n.wB)(t,e=>{let t=v.value;if(!t)return;let r="height 300ms ease",n=t.scrollHeight+"px";if(t.style.overflow="hidden",e){t.style.height="20px",t.style.transition=r,requestAnimationFrame(()=>{t.style.height=n});let e=()=>{t.style.height="auto",t.removeEventListener("transitionend",e)};t.addEventListener("transitionend",e)}else t.style.height=n,t.style.transition=r,requestAnimationFrame(()=>{t.style.height="20px"})}),(0,d.MLh)("scroll",()=>{t.value=!1}),(c,d)=>((0,n.uX)(),(0,n.Wv)(i.eB,{name:"fade"},{default:(0,n.k6)(()=>[e.errors&&e.errors.length>0?((0,n.uX)(),(0,n.CE)("div",{key:0,class:(0,a.C4)(["@text-subtitle-2 start-0 h-18px mx-4 absolute border-2px -translate-y-10px dark:border-[rgba(248,151,153,0.15)] border-[rgba(244,34,47,0.1)] bg-backgroundLight dark:bg-backgroundDark ps-1 text-errorLight-500 dark:text-errorLight-200",[{"curs
1or-pointer px-6px":(0,o.R1)(r)},(0,o.R1)(t)?"@z-input-error rounded-2 ":"rounded-full "]]),onClick:(0,i.D$)(f,["stop"])},[(0,n.Lk)("div",{class:(0,a.C4)(["relative pe-6px transition-all duration-300 ease-in-out",[(0,o.R1)(t)?"h-auto":""]]),style:{contain:"layout"}},[(0,n.Lk)("div",{ref_key:"contentRef",ref:v,class:(0,a.C4)({"of-hidden":!(0,o.R1)(t),"me-6px":(0,o.R1)(r)})},[(0,n.Lk)("div",p,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.errors,(e,t)=>{var r;return(0,n.uX)(),(0,n.CE)("div",{key:t,dir:null!=(r=(0,o.R1)(s.J)(e))?r:void 0},(0,a.v_)(e),9,m)}),128))])],2),(0,n.bF)(i.eB,{name:"fade"},{default:(0,n.k6)(()=>[(0,o.R1)(r)&&!(0,o.R1)(t)?((0,n.uX)(),(0,n.CE)("div",y)):(0,n.Q3)("",!0)]),_:1}),(0,o.R1)(r)?((0,n.uX)(),(0,n.CE)("button",{key:0,type:"button",class:(0,a.C4)(["absolute top-0 end-0 text-errorLight-500 dark:text-errorLight-200 transition-transform duration-300",{"rotate-180":(0,o.R1)(t)}])},[(0,n.bF)(u.A,{src:l,class:"s-4"})],2)):(0,n.Q3)("",!0)],2)],2)):(0,n.Q3)("",!0)]),_:1}))}});r.d(t,["A",0,v])},3350(e,t,r){r(74423);var n=r(2435),i=r(46249),o=r(69627),a=r(14643),l=r(73595),s=r(31515),u=r(60371),c=r(46807),d=r(84920),p=r(34129),m=r(39448),y=r(37011),v=r(10167),f=r(47242);let g=["type","placeholder","readonly","autocomplete","inputmode","disabled","maxlength"],h=["rows","placeholder","readonly","autocomplete","disabled"],b={key:1,class:"flex-center"},C={enabled:{default:"text-gray-600",error:"text-errorLight-500 dark:text-errorLight-200"},focused:{default:"text-black",error:"text-errorLight-500 dark:text-errorLight-200"},filledOut:{default:"text-gray-600",error:"text-errorLight-500 dark:text-errorLight-200"}},k={enabled:{default:"border-gray-200",error:"border-errorLight-500 dark:border-errorLight-200"},focused:{default:"border-black",error:"border-errorLight-500 dark:border-errorLight-200"},filledOut:{default:"border-gray-200",error:"border-errorLight-500 dark:border-errorLight-200"}},w={enabled:{default:"text-gray-600",error:"text-errorLight-500 dark:text-errorLight-200"},focused:{default:"text-black",error:"text-errorLight-500 dark:text-errorLight-200"},filledOut:{default:"text-gray-600",error:"text-errorLight-500 dark:text-errorLight-200"}},x={enabled:{default:"text-gray-600",error:"text-errorLight-500 dark:text-errorLight-200"},focused:{default:"text-black",error:"text-errorLight-500 dark:text-errorLight-200"},filledOut:{default:"text-gray-600",error:"text-errorLight-500 dark:text-errorLight-200"}},D=(0,n.pM)({...{},__name:"BaseInput",props:{...(0,u.jv)(),type:{type:String,required:!0},modelValue:{type:[String,Number],required:!1,default:null},numeric:{type:Boolean,required:!1,default:void 0},rows:{type:Number,default:4},numberGroup:{type:Boolean,default:!1},roundedClass:{type:String,required:!1},appendIconClass:{type:String,required:!1,default:""},labelMovedClass:{type:String,required:!1,default:""},labelPositionClass:{type:String,required:!1,default:""},forcedFocus:{type:Boolean,default:!1},labelDirection:{type:String,default:void 0}},emits:["update:modelValue","change","error","click","appendIconClick","prependIconClick","focus","blur","input"],setup(e,{expose:t,emit:r}){let u=(0,f.KR)(null),D=(0,f.KR)(!1),L=(0,n.EW)(()=>void 0!==S.value&&""!==S.value),I=(0,n.EW)(()=>!!e.placeholder&&!!e.label||D.value||L.value),A=(0,n.EW)(()=>{var t;return null!=(t=e.numeric)?t:["tel","number","country-code"].includes(e.type)});A.value&&"country-code"!==e.type&&(0,s.A)(u,"n");let R=(0,p.M)(e.name),S=(0,n.EW)({get:()=>R?R.value.value:e.modelValue,set(e){R?R.value.value=e:r("update:modelValue",e)}}),P=(0,n.EW)(()=>D.value||e.forcedFocus?"focused":L.value?"filledOut":"enabled"),j=(0,n.EW)(()=>e.error||null!=R&&R.visibleErrors.value?"error":"default"),E=(0,n.EW)(()=>e.inputmode?e.inputmode:e.numeric||"country-code"===e.type?"numeric":void 0),z=(0,n.EW)(()=>e.placeholder?e.placeholder:!e.floatingLabel&&e.label?e.label:void 0),T=(0,n.EW)(()=>["n-kmtrfz",{"pointer-events-none":e.canClickOnly,"@text-h3-r placeholder:@text-h3-r":"large"===e.size,"@text-title1-r placeholder:@text-title1-r":"small"===e.size,"dir-ltr":e.numeric},e.numberGroup||A.value?"n-i2wmft":"n-scquwg",e.inputClass]);function M(){var e;S.value="",null==(e=u.value)||e.focus()}function B(){return w[P.value][j.value]}function G(t){r("input");let n=t.target.value;"country-code"===e.type&&(n=(n=(0,m.Qg)(n)).startsWith("+")?"+"+n.slice(1).replace(/\D/g,"").slice(0,3):"+"+n.replace(/\D/g,"")),S.value=n}let _=(0,n.EW)(()=>
1{if(e.infoText)return e.infoText;if(e.characterLimit&&"string"==typeof S.value&&!e.showCharacterLimitCircular){var t,r;return`${null!=(t=null==(r=S.value)?void 0:r.length)?t:0}/${e.characterLimit}`}return null});function W(e){R&&(R.touched.value=!0),r("change",e)}function X(t){var r,n,i;if(!A.value||"country-code"===e.type)return;t.preventDefault();let o=(null==(r=t.clipboardData)?void 0:r.getData("text/plain"))||"",a=(0,m.Qg)(o).replace(/[^\d.-]/g,"");if(!a)return;let l=t.currentTarget,s=null!=(n=l.selectionStart)?n:0,u=null!=(i=l.selectionEnd)?i:0;l.value=l.value.slice(0,s)+a+l.value.slice(u);let c=s+a.length;l.setSelectionRange(c,c),S.value=l.value,l.dispatchEvent(new Event("input",{bubbles:!0}))}function $(){D.value=!0,r("focus")}function O(){D.value=!1,r("blur")}return(0,n.sV)(()=>{if(e.numberGroup){let e=u.value;e.addEventListener("keydown",t=>{let{key:r,which:n}=t,{selectionStart:i,value:o}=e,a=o[i-1],l=o[i];("Backspace"===r||8===n)&&","===a?(t.preventDefault(),e.setSelectionRange(i-2,i-1),document.execCommand("delete")):("Delete"===r||46===n)&&","===l&&(t.preventDefault(),e.setSelectionRange(i+1,i+2),document.execCommand("delete"))})}}),t({input:u,isFocused:D}),(0,n.sV)(()=>{var t;e.autoFocus&&(null==(t=u.value)||t.focus())}),(t,s)=>{var p;return(0,n.uX)(),(0,n.CE)("div",{class:(0,a.C4)(["select-none relative",{"opacity-50":e.disabled}])},[(0,n.Lk)("div",{class:(0,a.C4)(["n-9183d5",[k[P.value][j.value],{"ring-1 ring-errorLight-500 dark:ring-errorLight-200":"error"===(0,o.R1)(j),"ring-1 ring-black":"focused"===(0,o.R1)(P)&&"error"!==(0,o.R1)(j),"cursor-pointer":t.canClickOnly&&!t.disabled,"n-xoojut":"small"===t.size,"n-wupqrw":"large"===t.size,"h-10":"small"===t.size&&"textarea"!==e.type,"n-3xfhsp":"large"===t.size&&"textarea"!==e.type},e.roundedClass]]),onClick:s[4]||(s[4]=e=>r("click",e))},[t.floatingLabel&&t.label?((0,n.uX)(),(0,n.CE)("span",{key:0,class:(0,a.C4)(["transition-transform transform-origin-start duration-300 absolute px-1 rounded-8px pointer-events-none min-w-0",[!I.value&&e.prependIcon&&"large"===e.size?"-translate-y-1/2 translate-x-32px rtl:-translate-y-1/2 rtl:-translate-x-32px":!I.value&&e.prependIcon&&"small"===e.size?"-translate-y-1/2 translate-x-24px rtl:-translate-y-1/2 rtl:-translate-x-24px":I.value||e.prependIcon?I.value?e.labelMovedClass||"-translate-y-150% scale-85 bg-backgroundLight dark:bg-backgroundDark":void 0:"-translate-y-1/2",I.value&&e.labelPositionClass?e.labelPositionClass:"textarea"===e.type?"top-6":"top-50%",C[P.value][j.value],e.labelDirection?"rtl"===e.labelDirection?"right-3":"left-3":"start-3",{"@text-h3-r":"large"===t.size,"@text-title1-r":"small"===t.size}]])},(0,a.v_)(t.label),3)):(0,n.Q3)("",!0),t.prependIcon?((0,n.uX)(),(0,n.CE)("button",{key:1,type:"button",class:"shrink-0 me-1",onClick:s[0]||(s[0]=e=>r("prependIconClick",e))},[(0,n.bF)(c.A,{src:t.prependIcon,class:(0,a.C4)([B(),{"s-6":"large"===t.size,"s-5":"small"===t.size}])},null,8,["src","class"])])):(0,n.Q3)("",!0),(0,n.RG)(t.$slots,"default",{},()=>["textarea"!==e.type?(0,n.bo)(((0,n.uX)(),(0,n.CE)("input",{key:0,ref_key:"inputElement",ref:u,"onUpdate:modelValue":s[1]||(s[1]=e=>(0,o.i9)(S)?S.value=e:null),class:(0,a.C4)((0,o.R1)(T)),type:e.type,placeholder:(0,o.R1)(z),readonly:t.readonly,autocomplete:t.autocomplete,inputmode:(0,o.R1)(E),disabled:t.disabled,spellcheck:"false",maxlength:t.maxLength,onFocus:$,onBlur:O,onChange:W,onInput:G,onPaste:X},null,42,g)),[[i.hp,(0,o.R1)(S)]]):(0,n.bo)(((0,n.uX)(),(0,n.CE)("textarea",{key:1,ref_key:"inputElement",ref:u,"onUpdate:modelValue":s[2]||(s[2]=e=>(0,o.i9)(S)?S.value=e:null),class:(0,a.C4)(["pt-4 resize-none scroll-container",[(0,o.R1)(T)]]),rows:e.rows,placeholder:(0,o.R1)(z),readonly:t.readonly,autocomplete:t.autocomplete,disabled:t.disabled,spellcheck:"false",onFocus:$,onBlur:O,onChange:W,onInput:G},null,42,h)),[[i.Jo,(0,o.R1)(S)]])]),t.showResetButton||t.appendIcon||t.$slots.append?((0,n.uX)(),(0,n.CE)("div",{key:2,class:(0,a.C4)(["shrink-0 relative ms-1 flex-center mt-3",[{"s-6":"large"===t.size&&!t.$slots.append,"s-5":"small"===t.size&&!t.$slots.append},e.appendIconClass]])},[(0,n.RG)(t.$slots,"append",{},()=>[(0,n.bF)(i.eB,{name:"fade",mode:"out-in"},{default:(0,n.k6)(()=>{var e;return[(0,o.R1)(L)&&t.showResetButton?((0,n.uX)(),(0,n.CE)("button",{key:"1",class:"s-full flex-center",type:"button",onClick:(0,i.D$)(M,["stop"])},[(0,n.bF)(c.A,{class:"absolute inset-0 text-gray-600",src:l})])):t.showCharacterLimitCircular?((0,n.uX)(),(0,n.CE)("div",b,[t.characterLimit?((0,n.uX)(),(0,n.Wv)(y.A,{key:0,count:null==(e=(0,o.R1)(S))?void 0:e.length,"max-count":t.characterLimit,threshold:10,class:"shrink-0"},null,8,["count","max-count"])):(0,n.Q3)("",!0)])):t.appendIcon?((0,n.uX)(),(0,n.CE)("button",{key:"2",class:"s-full flex-center",type:"button",onClick:s[3]||(s[3]=e=>r("appendIconClick",e))},[(0,n.bF)(c.A,{class:(0,a.C4)(["absolute inset-0",B()]),src:t.appendIcon},null,8,["class","src"])])):(0,n.Q3)("",!0)]}),_:1})])],2)):(0,n.Q3)("",!0)],2),(0,o.R1)(R)&&null!=(p=(0,o.R1)(R))&&p.visibleErrors.value?(0,n.bo)(((0,n.uX)(),(0,n.Wv)(d.A,{key:0,errors:(0,o.R1)(R).visibleErrors.value},null,8,["errors"])),[[(0,o.R1)(v.A)]]):t.error&&"string"==typeof t.error?(0,n.bo)(((0,n.uX)(),(0,n.Wv)(d.A,{key:1,errors:[t.error]},null,8,["errors"])),[[(0,o.R1)(v.A)]]):(0,n.Q3)("",!0),(0,o.R1)(_)?((0,n.uX)(),(0,n.CE)("p",{key:2,class:(0,a.C4)(["@text-subtitle-2 mt-2 ps-1 dir-start",[x[P.value][j.value],"end"===e.infoTextDirection?"text-end":"text-start"]])},[(0,n.Lk)("bdi",null,(0,a.v_)((0,o.R1)(_)),1)],2)):(0,n.Q3)("",!0)],2)}}});r.d(t,["A",0,D])},90561(e,t,r){r(18111),r(20116);var n=r(2435),i=r(69627),o=r(60371),a=r(92445),l=r(39448),s=r(2334),u=r(56558),c=r(47242);let d=(0,n.pM)({__name:"InputSelect",props:(0,n.zz)({...(0,o.jv)(),items:{type:Array,required:!0},itemsKey:{type:String,default:"value"},title:{type:String,required:!1,default:""},searchable:{type:Boolean,required:!1,default:!1},height:{type:Number,required:!1,default:80},searchId:{type:String,required:!1,default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){let t=(0,l.rg)(e,["items","title","searchable"]),o=(0,n.fn)(e,"modelValue"),d=(0,c.KR)(!1),p=(0,n.EW)({get:()=>e.items.find(e=>e.value===o.value),set(e){o.value=e.value}});function m(){e.disabled||(d.value=!0)}return(o,l)=>{var c;return(0,n.uX)(),(0,n.CE)("div",null,[(0,n.bF)(a.A,(0,n.v6)((0,i.R1)(t),{"model-value":(null==(c=(0,i.R1)(p))?void 0:c.text)||"",type:"text","append-icon":r(827),"can-click-only":"",readonly:"",onClick:m}),null,16,["model-value","append-icon"]),(0,n.bF)(s.A,{modelValue:(0,i.R1)(d),"onUpdate:modelValue":l[2]||(l[2]=e=>(0,i.i9)(d)?d.value=e:null)},{default:(0,n.k6)(()=>[(0,n.bF)(u.A,{modelValue:(0,i.R1)(p),"onUpdate:modelValue":l[0]||(l[0]=e=>(0,i.i9)(p)?p.value=e:null),items:e.items,"items-key":e.itemsKey,height:e.height,title:e.title,searchable:e.searchable,onClose:l[1]||(l[1]=e=>d.value=!1)},null,8,["modelValue","items","items-key","height","title","searchable"])]),_:1},8,["modelValue"])])}}});r.d(t,["A",0,d])},39227(e,t,r){var n=r(2435),i=r(69627),o=r(14643),a=r(88346),l=r(46807);let s=["disabled"],u=["src"],c={class:"flex flex-col grow min-w-0 truncate"},d={key:0,class:"@text-subtitle-2 text-gray-600 truncate"},p=(0,n.pM)({__name:"SelectiveButtonItem",props:{iconType:{},icon:{},image:{},title:{},subtitle:{},selected:{type:Boolean},value:{},disabled:{type:Boolean}},setup:e=>(t,r)=>((0,n.uX)(),(0,n.CE)("button",{type:"button",disabled:e.disabled,class:(0,o.C4)(["disabled:opacity-50 rounded-3 min-h-52px px-10px flex items-center w-full text-start",{"bg-primaryLight-400/15 dark:bg-primaryDark-400/15 text-primaryLight-500 dark:text-primaryDark-200":e.selected}])},[e.image?((0,n.uX)(),(0,n.CE)("img",{key:0,src:e.image,class:"s-10 me-3 shrink-0",width:"40",height:"40"},null,8,u)):e.icon?((0,n.uX)(),(0,n.CE)("div",{key:1,class:(0,o.C4)(["rounded-full me-3 shrink-0 flex-center",{"s-10 bg-primary-500":"filled"===e.iconType}])},[(0,n.bF)(l.A,{src:e.icon,class:(0,o.C4)("filled"===e.iconType?"s-5":"s-6")},null,8,["src","class"])],2)):(0,n.Q3)("",!0),(0,n.Lk)("div",c,[(0,n.RG)(t.$slots,"title",{},()=>[(0,n.Lk)("span",{class:(0,o.C4)(["@text-title1-s",{"text-end":"ltr"===(0,i.R1)(a.J)(e.title||"")}])},(0,o.v_)(e.title),3)]),e.subtitle?((0,n.uX)(),(0,n.CE)("span",d,(0,o.v_)(e.subt
1itle),1)):(0,n.Q3)("",!0)])],10,s))});r.d(t,["A",0,p])},83157(e,t,r){var n=r(2435);let i={class:"w-full"},o=(0,n.pM)({__name:"VirtualList",props:{items:{},keyField:{}},setup:e=>(t,r)=>((0,n.uX)(),(0,n.CE)("ul",i,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.items,r=>((0,n.uX)(),(0,n.CE)("li",{key:r[e.keyField],class:"w-full"},[(0,n.RG)(t.$slots,"default",{item:r})]))),128))]))});r.d(t,["A",0,o])},5842(e,t,r){r(44114),r(18111),r(20116),r(61701),r(3362);var n=r(2435),i=r(46249),o=r(69627),a=r(14643),l=r(51984),s=r(53163),u=r(48008),c=r(47981),d=r(83831),p=r(3348),m=r(47242);let y={key:0,class:"w-full mb-4 mt-2"},v={key:1,class:"@text-title1-b mb-10px"},f=(0,n.pM)({__name:"groups-and-levels",setup(e){let t=(0,d.R)(),r=(0,p.A)(),{LoadingContainer:f,result:g}=(0,c.A)(async()=>{let e=await t.get(),n=await r.getList(),i=await e.communityBundle.getToEduGroupList(),o=n.eduGroups.map(e=>{var t;return{text:e.localizedTitle,value:e.ID,levels:null==(t=e.levels)?void 0:t.map(e=>({text:e.localizedTitle,value:e.eduGroupLevelID}))}});return{bundle:e.communityBundle,bundleGroups:i,allGroups:o}}),h=(0,m.KR)(),b=(0,m.KR)(),C=(0,n.EW)(()=>{var e;let t=null==(e=g.value)?void 0:e.allGroups.find(e=>e.value===h.value);return(null==t?void 0:t.levels)||[]});async function k(){var e,t;if(!b.value)return;let r=await (null==(e=g.value)?void 0:e.bundle.addToEduGroup(b.value));r&&(null==(t=g.value)||t.bundleGroups.push(r)),h.value=void 0,b.value=void 0}return(e,t)=>{let r=(0,n.g2)("BaseHeader");return(0,n.uX)(),(0,n.CE)("div",null,[(0,n.bF)(r,{"start-section":"back","center-section":"title",title:e.__("manage-groups-and-levels")},null,8,["title"]),(0,n.bF)((0,o.R1)(f),{class:"px-3 mt-5"},{default:(0,n.k6)(()=>{var r;return[null!=(r=(0,o.R1)(g))&&r.bundle?((0,n.uX)(),(0,n.Wv)(i.F,{key:0,name:"list"},{default:(0,n.k6)(()=>{var r,i;return[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)((0,o.R1)(g).bundleGroups,e=>((0,n.uX)(),(0,n.Wv)(s.A,{key:e.ID,bundle:(0,o.R1)(g).bundle,"education-group":e,class:"mb-2",onRemove:t=>(function(e){if(!g.value)return;let t=g.value.bundleGroups.findIndex(t=>t.ID===e);~t&&g.value.bundleGroups.splice(t,1)})(e.ID)},null,8,["bundle","education-group","onRemove"]))),128)),null!=(r=(0,o.R1)(g))&&r.bundleGroups.length?((0,n.uX)(),(0,n.CE)("hr",
1y)):(0,n.Q3)("",!0),((0,n.uX)(),(0,n.CE)("div",v,(0,a.v_)(e.__("add-group-and-level")),1)),(0,o.R1)(g).allGroups.length?((0,n.uX)(),(0,n.Wv)(u.A,{key:2,modelValue:(0,o.R1)(h),"onUpdate:modelValue":t[0]||(t[0]=e=>(0,o.i9)(h)?h.value=e:null),items:(0,o.R1)(g).allGroups,placeholder:e.__("choose-group")},null,8,["modelValue","items","placeholder"])):(0,n.Q3)("",!0),((0,n.uX)(),(0,n.Wv)(u.A,{key:3,modelValue:(0,o.R1)(b),"onUpdate:modelValue":t[1]||(t[1]=e=>(0,o.i9)(b)?b.value=e:null),items:(0,o.R1)(C),placeholder:e.__("choose-level"),class:"mt-2",disabled:!(0,o.R1)(h)||!(null!=(i=(0,o.R1)(C))&&i.length)},null,8,["modelValue","items","placeholder","disabled"])),((0,n.uX)(),(0,n.Wv)(l.A,{key:4,class:"mt-10px max-w-60px",color:"secondary",size:"mini",disabled:!(0,o.R1)(h)||!(0,o.R1)(b),action:k},{default:(0,n.k6)(()=>[(0,n.eW)((0,a.v_)(e.__("add")),1)]),_:1},8,["disabled"]))]}),_:1})):(0,n.Q3)("",!0)]}),_:1})])}}});r.d(t,["A",0,f])},56558(e,t,r){let n=r(49717).A;r.d(t,["A",0,n])},17e3(e,t,r){let n=r(87933).A;r.d(t,["A",0,n])},53163(e,t,r){let n=r(68084).A;r.d(t,["A",0,n])},37011(e,t,r){let n=r(41592).A;r.d(t,["A",0,n])},46422(e,t,r){let n=r(58867).A;r.d(t,["A",0,n])},84920(e,t,r){let n=r(12793).A;r.d(t,["A",0,n])},92445(e,t,r){let n=r(3350).A;r.d(t,["A",0,n])},48008(e,t,r){let n=r(90561).A;r.d(t,["A",0,n])},40838(e,t,r){let n=r(39227).A;r.d(t,["A",0,n])},97884(e,t,r){let n=r(83157).A;r.d(t,["A",0,n])},93185(e,t,r){r.r(t);let n=r(5842).A;r.d(t,["default",0,n])},53159(e,t,r){r.d(t,{Jh:()=>l,Ns:()=>i,ZF:()=>a,u4:()=>o});var n=r(60507);function i(e){return(0,n.zA)("/academy/student/list",e,{autoAbort:!0})}function o(e){return(0,n.zA)("/academy/student/eduGroupJoin",e)}function a(e){return(0,n.zA)("/academy/student/eduProfile",e)}function l(e){return(0,n.zA)("/academy/homework/list",e)}},68558(e,t,r){r.d(t,{EN:()=>p,Ir:()=>b,Js:()=>v,Kb:()=>g,YM:()=>i,Z_:()=>a,_r:()=>o,cC:()=>d,dC:()=>u,gV:()=>c,lt:()=>C,mn:()=>m,r8:()=>y,vL:()=>h,xs:()=>f,y5:()=>s,y9:()=>l});var n=r(60507);function i(e){return(0,n.zA)("/communityBundle/create",e)}function o(e){return(0,n.zA)("/communityBundle/community/add",e)}function a(e){return(0,n.zA)("/communityBundle/list/all",e)}function l(){return(0,n.zA)("/communityBundle/get")}function s(e){return(0,n.zA)("/communityBundle/edit",e)}function u(e){return(0,n.zA)("/communityBundle/status/update",e)}function c(e){return(0,n.zA)("/communityBundle/staff/list",e)}function d(e){return(0,n.zA)("/communityBundle/enrollment/list",e)}function p(){return(0,n.zA)("/communityBundle/list/attendedByMe")}function m(){return(0,n.zA)("/communityBundle/list/moderatedByMe")}function y(e){return(0,n.zA)("/communityBundle/eduGroupLevel/add",e)}function v(e){return(0,n.zA)("/communityBundle/eduGroupLevel/remove",e)}function f(){return(0,n.zA)("/communityBundle/eduGroupLevel/list")}function g(e){return(0,n.zA)("/communityBundle/enroll",e)}function h(e){return(0,n.zA)("/communityBundle/staff/add",e)}function b(e){return(0,n.zA)("/communityBundle/staff/remove",e)}function C(e){return(0,n.zA)("/communityBundle/pricing/set",e)}},77018(e,t,r){r.d(t,{AP:()=>i,Iv:()=>c,aM:()=>u,iO:()=>o,iT:()=>l,m2:()=>d,sK:()=>a,yL:()=>s});var n=r(60507);function i(e){return(0,n.zA)("/academy/student/eduGroup/detail",e)}function o(){return(0,n.zA)("/academy/eduGroup/list")}function a(e){return(0,n.zA)("/academy/eduGroup/create",e)}function l(e){return(0,n.zA)("/academy/eduGroup/remove",e)}function s(e){return(0,n.zA)("/academy/eduGroup/edit",e)}function u(e){return(0,n.zA)("/academy/eduGroupLevel/create",e)}function c(e){return(0,n.zA)("/academy/eduGroupLevel/edit",e)}function d(e){return(0,n.zA)("/academy/eduGroupLevel/remove",e)}},11379(e,t,r){r.d(t,{Jy:()=>i,Xg:()=>a,rg:()=>l,xF:()=>o}),r(3362);var n=r(60507);async function i(e){return(await (0,n.zA)("/networkCategory/list",e)).categories}function o(e){return(0,n.zA)("/networkCategory/create",e)}function a(e){return(0,n.zA)("/networkCategory/edit",e)}function l(e){return(0,n.zA)("/networkCategory/remove",e)}},10167(e,t,r){let n=(0,r(17905).s)({delay:100},e=>{e.scrollIntoView({behavior:"smooth",block:"start"})});r.d(t,["A",0,{mounted(e){requestAnimationFrame(()=>{n(e)})}}])},34129(e,t,r){r.d(t,{M:()=>c,m:()=>u}),r(18111),r(81148),r(22489),r(61701),r(3362);var n=r(39448),i=r(21820),o=r(69627),a=r(47242),l=r(2435);let s="validation";function u(e,{validate:t=!0,noValidateOnSubmit:r=!1}={}){let c={};for(let t in e)c[t]=e[t].default;let d=(0,a.Kh)(c),p={};for(let t in e)p[t]={touched:!1,valid:!1};let m=(0,a.Kh)(p),y=(0,l.EW)(()=>Object.values(m).every(e=>e.valid)),v=(0,a.KR)(0),f=(0,a.KR)(i.lQ),g=(0,a.KR)(!1);async function h(e){null==e||e.preventDefault();let t=(0,o.R1)(r);if(!g.value&&(v.value++,y.value||t))try{g.value=!0,await f.value()}catch(e){(0,n.wH)(e)}finally{g.value=!1}}let b={formSchema:e,formValues:d,formValidity:m,trySubmitTimes:v,validate:(0,o.KR)(t)};return(0,l.Gt)(s,b),{form:d,validity:m,valid:y,submitLoading:g,handleSubmit:h,trySubmitTimes:v,onSubmit:function(e){f.value=e}}}function c(e){if(!e)return;let t=(0,l.WQ)(s);if(!t)return void console.error("parent form is not existed!");let r=(0,l.EW)(()=>t.formSchema[e]),n=(0,o.lW)(t.formValues,e),{touched:i,valid:a}=(0,o.QW)(t.formValidity[e]),u=(0,l.EW)(()=>{var e;return(null==(e=r.value.validate)?void 0:e.map(e=>e(n.value)).filter(e=>!0!==e))||[]});(0,l.wB)(u,e=>{a.value=0===e.length},{immediate:!0});let c=(0,l.EW)(()=>t.validate.value&&(0!==t.trySubmitTimes.value||i.value)&&0!==u.value.length?u.value:null);return{errors:u,visibleErrors:c,valid:a,touched:i,value:n,validate:t.validate}}},93020(e,t,r){r.d(t,{N:()=>d}),r(44114),r(3362),r(15472);
1var n=r(68558),i=r(17428),o=r(39448),a=r(79667),l=r(3348),s=r(26046),u=r(11095),c=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class d extends s._{constructor(e,t=!0,r){super(e,t),this.communities=r}get isMembershipFree(){return 0===this.priceInfo.subscriptionCostAfterDiscount}get membershipCostString(){return(0,a.$)(this.priceInfo.subscriptionCostAfterDiscount)}get durationDaysString(){return(0,u.Ay)("n-day",[this.durationDays])}get capacityString(){return(0,u.Ay)("n-capacity",[this.capacity])}get isActive(){return"start"===this.status}isMember(){return"none"!==this.contributionStatus}get canViewAdminsList(){let e=this.viewAdminsPermission;switch(this.contributionStatus){case"member":return"all"===e;case"staff":case"owner":return!0;default:return!1}}get canViewMembersList(){let e=this.viewMembersPermission;switch(this.contributionStatus){case"member":return"all"===e;case"staff":case"owner":return!0;default:return!1}}get isCurrentUserOwner(){return"owner"===this.contributionStatus}get membersCountString(){return(0,o.Nf)(this.membersCount)}get staffCountString(){return(0,o.Nf)(this.staffCount)}async addCommunity(e){await (0,n._r)({communityID:e.ID}),(this.communities||[]).push(e)}async addToEduGroup(e){let t=(0,l.A)(),r=await (0,n.r8)({eduGroupLevelID:e});return t.fromPlain(r.eduGroup)}removeEduGroup(e){return(0,n.Js)({eduGroupLevelID:e})}async getToEduGroupList(){let e=(0,l.A)(),t=await (0,n.xs)();return e.fromPlainList(t.eduGroups)}edit(e){return(0,n.y5)(e)}async updateStatus(e){await (0,n.dC)(e),this.status=e.status}async join(e){await (0,n.Kb)(e)}addStaff(e,t){return(0,n.vL)({communityID:t.ID,staffUserID:e.userID})}setPrice(e){return(0,n.lt)(e)}}c([(0,i.pj)()],d.prototype,"bannerSID",void 0),c([(0,i.pj)()],d.prototype,"membershipType",void 0),c([(0,i.pj)()],d.prototype,"membershipCost",void 0),c([(0,i.pj)()],d.prototype,"renewalCost",void 0),c([(0,i.pj)()],d.prototype,"viewMembersPermission",void 0),c([(0,i.pj)()],d.prototype,"viewAdminsPermission",void 0),c([(0,i.pj)()],d.prototype,"showInPublicDirectory",void 0),c([(0,i.pj)()],d.prototype,"durationDays",void 0),c([(0,i.pj)()],d.prototype,"capacity",void 0),c([(0,i.pj)()],d.prototype,"hasCertificate",void 0),c([(0,i.pj)()],d.prototype,"hasFinalExam",void 0),c([(0,i.pj)()],d.prototype,"status",void 0),c([(0,i.pj)()],d.prototype,"communitiesCount",void 0),c([(0,i.pj)(),(0,i.W6)("membersCountString")],d.prototype,"membersCount",void 0),c([(0,i.pj)(),(0,i.W6)("staffCountString")],d.prototype,"staffCount",void 0),c([(0,i.pj)()],d.prototype,"contributionStatus",void 0),c([(0,i.pj)()],d.prototype,"priceInfo",void 0),c([(0,i.PP)()],d.prototype,"membersCountString",null),c([(0,i.PP)()],d.prototype,"staffCountString",null)},83831(e,t,r){r.d(t,{R:()=>l}),r(18111),r(61701),r(3362);var n=r(68558),i=r(93020),o=r(36611),a=r(53169);let l=(0,r(46645).nY)("bundle",()=>{function e(e,t){return new i.N(e,!0,t)}function t(t){return t?t.map(t=>e(t)):[]}async function r(){let e=(0,a.A)(),r=await (0,n.EN)();return{usersSummary:e.fromPlainList(r.usersSummary),communityBundles:t(r.communityBundles)}}async function l(){let e=(0,a.A)(),r=await (0,n.mn)();return{usersSummary:e.fromPlainList(r.usersSummary),communityBundles:t(r.communityBundles)}}async function s(){let t=(0,a.A)(),r=(0,o.useCommunityStore)(),i=await (0,n.y9)();return{usersSummary:t.map.addPlainMany(i.usersSummary),communityBundle:e(i.communityBundle,r.fromPlainList(i.communities))}}return{create:async function(t){return e((await (0,n.YM)({communityBundle:{...t}})).communityBundle)},fromPlain:e,get:s,getList:async function(e){let r=(0,a.A)(),i=await (0,n.Z_)(e);return{...i,usersSummary:r.fromPlainList(i.usersSummary),communityBundles:t(i.communityBundles)}},fromPlainList:t,getAttendedByMeList:r,getModeratedByMeList:l}})},45645(e,t,r){r.d(t,{e:()=>p}),r(78350),r(44114),r(30237),r(18111),r(22489),r(30531),r(61701),r(3362),r(15472);
1var n=r(15846),i=r(53159),o=r(3348),a=r(17428),l=r(66718),s=r(77018),u=r(11095),c=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};function d(e){var t;return!!(null==(t=e[(0,u.TH)().language])?void 0:t.trim())}class p extends l.k{constructor(){super(m,"ID")}}class m extends a.SS{constructor(e,t=!0){let r=(0,o.A)();super(e,t),t&&r.map.add(this)}getSanitizedTitle(){return n.W.processText(this.localizedTitle)}getLastLevelID(){var e;return null!=(e=this.levels)&&e.length?this.levels[this.levels.length-1].eduGroupLevelID:""}getSanitizedLastLevel(){var e;if(!(null!=(e=this.levels)&&e.length))return"";let t=this.levels[this.levels.length-1];return n.W.processText(t.localizedTitle)}getLevelAsSelectableItemsArray(){return this.levels?this.levels.map(e=>({text:e.localizedTitle,value:e.eduGroupLevelID})):[]}joinStudent(e){return(0,i.u4)({...e})}async addLevel(e){let t=await (0,s.aM)({eduGroupID:this.ID,localization:e});d(e)&&(this.levels||(this.levels=[]),this.levels.push({localizedTitle:t.localization,eduGroupLevelID:t.eduGroupLevelID,localizedTitles:e}))}async removeLevel(e){var t;await (0,s.m2)({eduGroupLevelID:e}),this.levels=null==(t=this.levels)?void 0:t.filter(t=>t.eduGroupLevelID!==e)}async editLevel(e,t){var r;let n=await (0,s.Iv)({eduGroupLevelID:e,localization:t});this.levels=null==(r=this.levels)?void 0:r.flatMap(r=>r.eduGroupLevelID!==e?r:d(t)?{...r,localizedTitle:n.localization,localizedTitles:t}:[])}}c([(0,a.pj)()],m.prototype,"ID",void 0),c([(0,a.pj)()],m.prototype,"localizedTitle",void 0),c([(0,a.pj)()],m.prototype,"levels",void 0),c([(0,a.pj)()],m.prototype,"iconSID",void 0),c([(0,a.pj)()],m.prototype,"type",void 0),c([(0,a.pj)()],m.prototype,"localizedTitles",void 0)},3348(e,t,r){r.d(t,{A:()=>l}),r(18111),r(61701),r(3362);var n=r(77018),i=r(83831),o=r(45645),a=r(53169);let l=(0,r(46645).nY)("educationGroup",()=>{let e=new o.e;function t(t){return e.addPlain(t)}function r(t){return e.addPlainMany(t)}async function l(){return{eduGroups:r((await (0,n.iO)()).eduGroups)}}async function s(t){return e.get(t)||await l(),e.get(t)}async function u(e){let r=(0,a.A)(),o=(0,i.R)(),l=await (0,n.AP)(e);return{eduGroup:t(l.eduGroup),usersSummary:r.fromPlainList(l.usersSummary),communityBundles:o.fromPlainList(l.communityBundles)}}async function c(e){await (0,n.yL)(e),await l()}return{map:e,fromPlain:t,fromPlainList:r,getList:l,getGroupById:s,getAsSelectableItemsArray:function(e){return e.map(e=>({text:e.localizedTitle,value:e.ID}))},getBundleList:u,create:function(e){return(0,n.sK)(e)},remove:function(e){return(0,n.iT)(e)},edit:c}})},34680(e,t,r){r.d(t,{E:()=>g,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),a=r(8e4),l=r(39448),s=r(17428),u=r(43862),c=r(18830),d=r(36982),p=r(15031),m=r(66718),y=r(36611),v=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class f extends m.k{constructor(){super(g,"ID")}}class g extends u.Y{constructor(e,t=!0){let r=(0,y.useCommunityStore)();super(e),this.subscribersShowcase=new d.L(this,c.g.center,"subscribers"),this.guestsShowcase=new d.L(this,c.g.center,"all"),this.posts=[],t&&r.map.addPlain(e)}get hasPost(){return!!this.posts.length}canMovePostDown(e){return e<this.posts.length-1}canMovePostUp(e){return e>0}isOwner(e){return this.ownerUserID===e.userID}async movePostDown(e){try{if(!this.canMovePostDown(e))return;await this.setPostOrder({operation:"down",postID:this.posts[e].postID}),(0,l.wg)(this.posts,e,e+1)}catch(e){(0,l.wH)(e)}}async movePostUp(e){try{if(!this.canMovePostUp(e))return;await this.setPostOrder({operation:"up",postID:this.posts[e].postID}),(0,l.wg)(this.posts,e,e-1)}catch(e){(0,l.wH)(e)}}async getPostsList(e){var t;let r=(0,a.D)(),s=(0,n.A)(),u=await (0,i.rd)(e);r.map.addPlainMany(u.posts),s.map.addPlainMany(u.usersSummary);let c=o.j.fromPlainList(u.index);
1if(null==(t=u.contentQuestionExerciseCount)||t.forEach(e=>{let t=r.map.get(e.postID);t&&(t.setExercisesCount(e.exercisesCount),t.setQuestionsCount(e.questionsCount))}),!e.pagination)throw Error("pagination not sent");let d=(0,l.n4)((0,p.F)(),e.pagination);return!this.posts.length||d?this.posts=c:this.posts=[...this.posts,...c],{pagination:u.pagination,indexes:c}}async getMembersList(e){let t=await (0,i.vb)(e),r=(0,n.A)().map.addPlainMany(t.usersSummary);return{...t,usersSummary:r}}async getModeratorsList(e){let t=await (0,i.if)(e),r=(0,n.A)().map.addPlainMany(t.usersSummary);return{...t,usersSummary:r}}addModerator(e){return(0,i.yE)(e)}removeModerator(e){return(0,i.jN)({...e,communityID:this.ID})}async edit(e){let t=(0,y.useCommunityStore)(),r=await (0,i.GD)({...this==null?void 0:this.toPlain(),...e});t.fromPlain(r.community)}async setPrice(e){let t=e.isFreeSubscription?0:e.subscriptionCost,r=0;if(!e.isFreeSubscription&&e.hasDiscount){if(null==e.subscriptionCostAfterDiscount)return!1;r=e.subscriptionCostAfterDiscount}if(null!=t&&r>t)return!1;let n=!e.isFreeSubscription&&e.hasDiscount&&null!=t&&r<t;return await (0,i.Np)({...e,subscriptionCost:t,subscriptionCostAfterDiscount:n?r:0,hasDiscount:n}),!0}async updateStatus(e){await (0,i.jZ)(e),this.status=e.status}setPostOrder(e){return(0,i.wB)(e)}addMember(e){return(0,i.yQ)({...e,communityID:this.ID})}async join(e={}){let t=await (0,i.yQ)({communityID:this.ID,...e});this.contributionStatus=t.status,"member"===t.status&&this.membersCount++}async leave(e={}){await (0,i.Nd)(e)}async kick(e){await (0,i.el)({userID:e.userID}),this.membersCount--}}v([(0,s.pj)()],g.prototype,"orderingMode",void 0),v([(0,s.pj)()],g.prototype,"viewMode",void 0),v([(0,s.pj)()],g.prototype,"hasShowcase",void 0),v([(0,s.pj)()],g.prototype,"bannerSID",void 0),v([(0,s.pj)()],g.prototype,"joinLink",void 0),v([(0,s.pj)()],g.prototype,"progressPercent",void 0),v([(0,s.pj)()],g.prototype,"networkCategory",void 0),v([(0,s.pj)()],g.prototype,"contentAccessWithDirectLink",void 0),v([(0,s.pj)()],g.prototype,"communityBundleContributionStatus",void 0)},26046(e,t,r){r.d(t,{_:()=>s}),r(89463),r(18111),r(61701),r(15472);var n=r(15846),i=r(53169),o=r(17428),a=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let l=/\p{L}/u;class s extends o.SS{get detailsLink(){return`/academy/${this.ID}`}get editLink(){return`/academy/bundle/set/${this.ID}`}get settingsLink(){return`/academy/${this.ID}/settings`}get groupsAndLevelsSettingsLink(){return`${this.settingsLink}/groups-and-levels`}get permissionsSettingsLink(){return`${this.settingsLink}/permissions`}get membershipSettingsLink(){return`${this.settingsLink}/membership`}get conditionsSettingsLink(){return`${this.settingsLink}/conditions`}get staffListLink(){return`/academy/${this.ID}/moderators`}get studentsListLink(){return`/academy/${this.ID}/students`}get setStaffLink(){return`${this.staffListLink}/set`}get letter(){var e;return(null==(e=l.exec(this.title))?void 0:e[0])||""}get digit(){return+this.ownerUserID.slice(-1)}get ownerUser(){return(0,i.A)().map.safeGet(this.ownerUserID)}isOwner(e){return this.ownerUserID===e.userID}getSanitizedTitle(){return n.W.processText(this.title)}getSanitizedDescription(){return n.W.processText(this.description)}getCommunityLink(e){return`/academy/${this.ID}/${e.ID}`}}a([(0,o.pj)()],s.prototype,"ID",void 0),a([(0,o.pj)(),(0,o.W6)("sanitizedDescription")],s.prototype,"description",void 0),a([(0,o.pj)()],s.prototype,"ownerUserID",void 0),a([(0,o.pj)()],s.prototype,"title",void 0),a([(0,o.pj)()],s.prototype,"avatarSID",void 0)},61865(e,t,r){r.d(t,{w:()=>l}),r(18111),r(61701),r(15472);var n=r(36611),i=r(53169),o=r(17428),a=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class l extends o.SS{get user(){return(0,i.A)().map.safeGet(this.userID)}get community(){return(0,n.useCommunityStore)().map.get(this.communityID)}}a([(0,o.pj)()],l.prototype,"ID",void 0),a([(0,o.pj)()],l.prototype,"userID",void 0),a([(0,o.pj)()],l.prototype,"communityID",void 0),a([(0,o.pj)()],l.prototype,"status",void 0)},35129(e,t,r){r.d(t,{O:()=>i}),r(18111),r(61701);var n=r(61865);let i=(0,r(46645).nY)("communityMember",()=>({fromPlainList:function(e){return e?e.map(e=>new n.w(e)):[]}}))},98895(e,t,r){r.d(t,{V:()=>s}),r(18111),r(61701),r(15472);var n=r(99291),i=r(36611),o=r(17428),a=r(79667),l=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class s extends o.SS{get community(){return(0,i.useCommunityStore)().map.get(this.communityID)}
1get createdTimeString(){return n.$.fromTimestampSeconds(this.createdTime).formatDate("yyyy/mm/dd - hh:mm")}get finalAmountString(){return(0,a.$)(this.priceInfo.subscriptionCostAfterDiscount)}get subscriptionCostString(){return(0,a.$)(this.priceInfo.subscriptionCost)}get subscriptionCostAfterDiscountString(){return(0,a.$)(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"}}}l([(0,o.pj)()],s.prototype,"communityID",void 0),l([(0,o.pj)()],s.prototype,"createdTime",void 0),l([(0,o.pj)()],s.prototype,"priceInfo",void 0)},99742(e,t,r){r.d(t,{l:()=>o}),r(18111),r(61701);var n=r(46645),i=r(98895);let o=(0,n.nY)("communityPurchaseHistory",()=>({fromPlainList:function(e){return e?e.map(e=>new i.V(e)):[]}}))},36611(e,t,r){r.d(t,{useCommunityStore:()=>d}),r(18111),r(61701),r(3362);var n=r(58638),i=r(34680),o=r(35129),a=r(99742),l=r(1369),s=r(67322),u=r(53169),c=r(3869);let d=(0,r(46645).nY)("community",()=>{let e=new i.c;function t(t){let r=(0,s.x)(),n=e.addPlain(t);return n.categories=r.fromPlainList(t.networkCategories),n}function r(e){return e?e.map(t):[]}async function d(e){let r=(0,u.A)(),i=await (0,n.eR)(e);return r.map.addPlainMany(i.usersSummary),i.userSummary&&r.map.addPlain(i.userSummary),t(i.community)}async function p(t){let r=e.get(t.communityID),n=d(t);return r||n}async function m(e){if(e.title&&e.membershipType&&e.customizationType)return t((await (0,n.m$)({...e,title:e.title,membershipType:e.membershipType,writePermission:"owner",customizationType:e.customizationType,orderingMode:"contentCreatedTimeASC",viewMode:"postStyle"})).community)}async function y(e){let t=await (0,n.Q4)(e),i=(0,u.A)().map.addPlainMany(t.usersSummary);return{pagination:{...t.pagination},communities:r(t.communities),usersSummary:i}}async function v(e){let t=await (0,n.cg)(e),i=(0,u.A)().map.addPlainMany(t.usersSummary);return{pagination:{...t.pagination},communities:r(t.communities),usersSummary:i}}async function f(e){let t=await (0,n.jd)(e),i=(0,u.A)().map.addPlainMany(t.usersSummary);return{pagination:{...t.pagination},communities:r(t.communities),usersSummary:i}}async function g(){let e=await (0,n.jd)({},{"app-scope-tenant":"boshra"}),t=(0,u.A)().map.addPlainMany(e.usersSummary);return{pagination:{...e.pagination},communities:r(e.communities),usersSummary:t}}async function h(e){let t=await (0,n.SE)(e),i=(0,u.A)().map.addPlainMany(t.usersSummary),a=r(t.communities),l=(0,o.O)().fromPlainList(t.members);return{pagination:{...t.pagination},communities:a,usersSummary:i,members:l}}async function b(e){let t=await (0,n.Li)(e),i=(0,u.A)(),o=(0,a.l)();return i.fromPlainList(t.usersSummary),{pagination:{...t.pagination},communities:r(t.communities),purchaseHistory:o.fromPlainList(t.purchaseHistory)}}return{map:e,fromPlain:t,fromPlainList:r,create:m,get:d,getOrFetchCommunity:p,getCommunityListAll:y,getCommunityList:v,getCommunityListModeratedByMe:f,getCommunityListManagedByMe:h,getPurchaseHistory:b,getCommunityBasedOnRoute:function(t=c.p){let r,n=null==t?void 0:t.currentRoute.value.params.communityId;if(n){let t=(0,l.U)();r=e.get(n)||t.map.get(n)||void 0}return r},getBoshraCommunityListModeratedByMe:g}})},43862(e,t,r){r.d(t,{Y:()=>y,u:()=>m}),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),a=r(53169),l=r(39448),s=r(17428),u=r(66718),c=r(11095),d=r(6816),p=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class m extends u.k{constructor(){super(y,"ID")}}class y extends i.M{constructor(){super(...arguments),this.mode="view",this.categories=[]}get recentModerators(){let e=(0,a.A)().map;return this.moderatorsRecentContributed.map(t=>
1e.safeGet(t))}get ownerUser(){return(0,a.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,l.Nf)(this.membersCount)}get moderatorsCountString(){return(0,l.Nf)(this.moderatorsCount)}get staffsCountString(){return(0,l.Nf)(this.staffsCount)}get editLink(){return`${this.detailsLink}/set`}get 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://virasty.com"+this.detailsLink}get canViewMembersList(){let e=this.viewMembersPermission;switch(this.contributionStatus){case"member":return"member"===e||"all"===e;case"moderator":case"owner":return!0;default:return!1}}get summarizeContentsCount(){return(0,l.Nf)(this.contentsCount)}get mainCategoryTitleLocalized(){var e;return(null==(e=this.categories)||null==(e=e[0])?void 0:e.localizedTitle)||(0,c.Ay)("category")}get manageCategoriesLink(){if(this.isCurrentUserOwner)return`${this.detailsLink}/categories`}get canDisplayCategories(){var e;return!!this.isCurrentUserOwner||null!=(e=this.categories)&&!!e.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 e=this.description.substring(0,300);return e=e.split("\n").slice(0,8).join("\n"),`${e}â¦`}setMode(e){this.mode=e}acceptJoinRequest(e){return(0,n.lD)({action:"accept",communityID:this.ID,userID:e})}rejectJoinRequest(e){return(0,n.lD)({action:"reject",communityID:this.ID,userID:e})}removeJoinRequest(e){return(0,n.lD)({action:"remove",communityID:this.ID,userID:e})}async addNetworkCategory(e){3===this.categories.length?(0,d.GY)((0,c.Ay)("category-error-message",[3]),{type:"warning"}):(await (0,n.bU)({networkCategoryID:e.ID}),this.categories.push(e))}async removeNetworkCategory(e){await (0,n.ei)({networkCategoryID:e.ID});let t=this.categories.findIndex(t=>t.ID===e.ID);~t&&this.categories.splice(t,1)}}p([(0,s.pj)(),(0,s.W6)("sanitizedDescription")],y.prototype,"description",void 0),p([(0,s.pj)()],y.prototype,"ownerUserID",void 0),p([(0,s.pj)()],y.prototype,"customizationType",void 0),p([(0,s.pj)()],y.prototype,"viewMembersPermission",void 0),p([(0,s.pj)()],y.prototype,"showInPublicDirectory",void 0),p([(0,s.pj)()],y.prototype,"status",void 0),p([(0,s.pj)(),(0,s.W6)("membersCountString")],y.prototype,"membersCount",void 0),p([(0,s.pj)(),(0,s.W6)("summarizeContentsCount")],y.prototype,"contentsCount",void 0),p([(0,s.pj)(),(0,s.W6)("moderatorsCountString")],y.prototype,"moderatorsCount",void 0),p([(0,s.pj)()],y.prototype,"moderatorsRecentContributed",void 0),p([(0,s.pj)(),(0,s.W6)("staffsCountString")],y.prototype,"staffsCount",void 0),p([(0,s.pj)()],y.prototype,"createdTime",void 0),p([(0,s.pj)()],y.prototype,"staffAccessToThisCommunity",void 0),p([(0,s.pj)()],y.prototype,"networkCategories",void 0),p([(0,s.PP)()],y.prototype,"sanitizedDescription",null),p([(0,s.PP)()],y.prototype,"membersCountString",null),p([(0,s.PP)()],y.prototype,"moderatorsCountString",null),p([(0,s.PP)()],y.prototype,"staffsCountString",null),p([(0,s.PP)()],y.prototype,"summarizeContentsCount",null)},1369(e,t,r){r(18111),r(61701);var n=r(43862),i=r(67322);let o=(0,r(46645).nY)("communitySummary",()=>{let e=new n.u;function t(t){let r=(0,i.x)(),n=e.addPlain(t);return n.categories=r.fromPlainList(t.networkCategories),n}return{map:e,fromPlain:t,fromPlainList:function(e){return e?e.map(t):[]}}});r.d(t,["U",0,o])},3515(e,t,r){r.d(t,{x:()=>d,z:()=>c}),r(23792),r(44114),r(18111),r(7588),r(3362),r(15472),r(62953);var n=r(67322),i=r(11379),o=r(11095),a=r(17428),l=r(66718),s=r(28644),u=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class c extends a.SS{constructor(e){super(e)}get localizedTitle(){let e=(0,o.TH)();return this.title[e.language]}get editLink(){let{getActiveCommunityInstance:e}=(0,s.r)(),t=e();return t?`${t.baseRoute}/category/set/${this.ID}`:""}getChildren(){if(!this.subCategories)return[];let e=[];
1return this.subCategories.forEach(t=>e.push(new c(t))),e}getCategoryWithChildren(){return[this,...this.getChildren()]}async edit(e){await (0,i.Xg)({...e,networkCategoryID:this.ID}),e.iconSID&&(this.iconSID=e.iconSID),e.title&&(this.title=e.title)}async remove(e){let t=(0,n.x)();await (0,i.rg)({networkCategoryID:this.ID}),e?t.removeSubCategory(e,this):t.removeCategory(this)}}u([(0,a.pj)()],c.prototype,"ID",void 0),u([(0,a.pj)()],c.prototype,"parentID",void 0),u([(0,a.pj)()],c.prototype,"title",void 0),u([(0,a.pj)()],c.prototype,"iconSID",void 0),u([(0,a.pj)()],c.prototype,"subCategories",void 0);class d extends l.k{constructor(){super(c,"ID")}safeGet(e){let t=(0,n.x)();return this.get(e)||t.getDefaultNetworkCategory()}}},67322(e,t,r){r.d(t,{x:()=>u}),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),a=r(28644),l=r(47242),s=r(2435);let u=(0,n.nY)("networkCategory",()=>{let e,t=new i.x,r=(0,l.Kh)({}),n=(0,s.EW)(()=>{let{getActiveCommunityInstance:e}=(0,a.r)(),t=e();return t?t.customizationType:"book"});function u(e){r[n.value]||(r[n.value]=[]),r[n.value].push(c(e))}function c(e){return t.addPlain(e)}function d(e){return e?e.map(c):[]}async function p(){var e,t,i;if(null!=(e=r[n.value])&&e.length)return{categories:r[n.value],hasChildren:null==(i=r[n.value])?void 0:i.some(e=>e.getChildren().length>0)};let a=await (0,o.Jy)({});r[n.value]=d(a);let l=null==(t=r[n.value])?void 0:t.some(e=>e.getChildren().length>0);return{categories:r[n.value],hasChildren:l}}async function m(e){let t=await (0,o.xF)(e);return e.parentID||u(t.networkCategory),t}async function y(e){var t;for(let i of(null!=(t=r[n.value])&&t.length||await p(),r[n.value])){if(i.ID===e)return i;let t=i.getChildren().find(t=>t.ID===e);if(t)return t}}return{getList:p,fromPlainList:d,fromPlain:c,getDefaultNetworkCategory:function(){return e||(e=new i.z({ID:"-1",iconSID:"",parentID:"-1",subCategories:[],title:{ar:"",en:"",fa:""}})),e},addCategory:u,addSubCategory:function(e,t){var i;let o=null==(i=r[n.value])?void 0:i.find(t=>t.ID===e);o&&(o.subCategories||(o.subCategories=[]),o.subCategories.push(t))},removeCategory:function(e){if(!r[n.value])return;let t=r[n.value].findIndex(t=>t.ID===e.ID);~t&&r[n.value].splice(t,1)},removeSubCategory:function(e,t){var i,o;let a=null==(i=r[n.value])?void 0:i.find(t=>t.ID===e);if(!a||!a.subCategories)return;let l=a.subCategories.findIndex(e=>e.ID===t.ID);~l&&(null==(o=a.subCategories)||o.splice(l,1))},categories:(0,s.EW)(()=>r[n.value]),create:m,get:async function(e){var t;let a=null==(t=r[n.value])?void 0:t.find(t=>t.ID===e);if(a)return a;let l=await (0,o.Jy)({parentCategoryID:e});return new i.z(l[0])},MAX_TITLE_LENGTH:32,search:y}})},36982(e,t,r){r.d(t,{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),a=r(73132),l=r(62906),s=r(53169),u=r(58193),c=r(11095),d=r(69627);class p extends a._{constructor(e,t,r){super(),this.community=e,this.column=t,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(e){var t,r;let a=(0,i.q)(),p=(0,l.d)(),m=(0,s.A)();if(!e.type)throw(0,u.mT)((0,c.Ay)("block-type-error"));if(!e.contentType)throw(0,u.mT)({message:(0,c.Ay)("empty-block-content-type-error"),track:!1});let y=await (0,n.Xp)({communityID:this.community.ID,showcaseType:"community",title:e.title,titleURL:e.titleURL,type:e.type,location:o._.showcase,locationColumn:this.column,contentType:e.contentType,seeder:e.seeder||"manual",config:(0,d.ux)(e.config),visibility:this.visibility}),v=a.fromPlainList(y.blocks);await (null==(t=v[0].getMetaData())||null==(r=t.getData)?void 0:r.call(t)),v.forEach(e=>{var t;null==(t=e.blockTabs)||t.forEach(t=>{t.contents.forEach(t=>{var r;let n=null==(r=y.showcaseContents)?void 0:r.find(e=>e.entityID===t.entityID);n&&p.addPlainToMap(n,e.contentType)})})}),m.map.addPlainMany(y.usersSummary),this.blocks.push(v[0])}async getBlocksList(e=!1){let t=(0,i.q)(),r=(0,l.d)(),a=(0,s.A)();if(!this.community.ID)throw Error("community.ID not provided!");let u=await (0,n.gj)({location:o._.showcase,showcaseType:this.showcaseType(),visibility:this.visibility}),c=t.fromPlainList(u[`${this.column}Blocks`]);for(let e=0;e<c.length;e++){var d,p;let t=c[e];await (null==(d=t.getMetaData())||null==(p=d.getData)?void 0:p.call(d))}
1c.forEach(e=>{var t;null==(t=e.blockTabs)||t.forEach(t=>{t.contents.forEach(t=>{var n;let i=null==(n=u.showcaseContents)?void 0:n.find(e=>e.entityID===t.entityID);i&&r.addPlainToMap(i,e.contentType)})})}),a.map.addPlainMany(u.usersSummary),this.blocks=c}canSetAutoBlock(){return!1}showcaseType(){return"community"}canSetAutoBlockSource(){return!0}}},20369(e){e.exports='<svg fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M4 8.42 5.414 7l7.043 7.05L19.5 7l1.414 1.42-8.457 8.45z"/></svg>'},827(e){e.exports='<svg fill="none" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M5.33 7.7a.682.682 0 0 0-.964.964l5.304 5.303a.68.68 0 0 0 .964 0l5.303-5.303a.682.682 0 1 0-.964-.964l-4.821 4.82z" clip-rule="evenodd"/></svg>'}}]);
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.