@ozdao/prometheus-framework 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/CardOrganization-26714a5e.mjs +297 -0
- package/dist/CardOrganization-88c6d479.js +1 -0
- package/dist/Chips-0e5bdd54.js +1 -0
- package/dist/Chips-5e32c8cb.mjs +200 -0
- package/dist/Feed-275a14d8.mjs +371 -0
- package/dist/Feed-505b3fa8.mjs +383 -0
- package/dist/Feed-d0da2943.js +1 -0
- package/dist/Feed-ee36f80b.js +1 -0
- package/dist/IconEdit-1b7b5874.js +1 -0
- package/dist/IconEdit-680dc269.mjs +339 -0
- package/dist/Image-2d2e606a.js +9 -0
- package/dist/Image-95c0fb07.mjs +480 -0
- package/dist/Product-6aa1c9ee.mjs +844 -0
- package/dist/Product-6ca8d04d.js +7 -0
- package/dist/ProductEdit-2e309add.js +1 -0
- package/dist/ProductEdit-6abcc97b.mjs +306 -0
- package/dist/ProfileBlogposts-62d5e809.mjs +70 -0
- package/dist/ProfileBlogposts-c31917ec.js +1 -0
- package/dist/ProfileEvents-89471c05.js +1 -0
- package/dist/ProfileEvents-e070d9d4.mjs +62 -0
- package/dist/ProfileOrganizations-bee6a3ae.js +1 -0
- package/dist/ProfileOrganizations-db313b5e.mjs +219 -0
- package/dist/Publics-24f055eb.js +1 -0
- package/dist/Publics-b1cbfd97.mjs +45 -0
- package/dist/Socials-9b2d27a6.js +1 -0
- package/dist/Socials-becde7dc.mjs +275 -0
- package/dist/auth.client.cjs +7 -7
- package/dist/auth.client.js +165 -162
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +7 -7
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +5 -5
- package/dist/events.server.js +9 -1
- package/dist/events.server.mjs +9 -1
- package/dist/organizations.client-6a69b54a.js +3 -0
- package/dist/organizations.client-c288ff44.mjs +3072 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +8 -8
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +5 -5
- package/package.json +1 -1
- package/src/modules/auth/router/auth.js +1 -1
- package/src/modules/events/controllers/events.controller.js +12 -2
- package/src/modules/reports/components/sections/FormReport.vue +3 -1
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),I=require("./Select-3ca5ab39.js"),d=require("./Feed-e55bc6fa.js"),_=require("./auth-acbe3ae1.js"),x=require("./Image-c90ee624.js"),z=require("./IconEdit-e4d0cc6e.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-505c3ca5.js"),$=require("./Button-2ca405bd.js"),D=require("./organizations-a241b21d.js"),F=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),O=require("./Publics-50c0ff6c.js"),L=require("vue-i18n");require("./globals-928eb13c.js");const j=require("./Chips-8d0a1d2c.js");require("./index-b41aac19.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./reports-270f69df.js");require("./click-outside-0b0727d1.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./CardOrganization-7d679e75.js");require("./ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-0ea8fbf8.js");const U={class:"min-h-100vh pd-thin"},A={class:"mn-thin flex-v-center t-left flex-nowrap flex"},H={class:"flex-v-center flex-nowrap flex t-left"},R=e.createElementVNode("span",{class:""},"Topics for ",-1),J={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},G={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const u=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",A,[e.createElementVNode("h2",H,[R,e.createVNode(I.Select,{options:["today","week","month","year"],select:d.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>d.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",J,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),_.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",G,[e.createVNode(u,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},Q={class:"pd-thin"},W={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},K={class:"w-full h-full"},X={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},Y={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},Z=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),ee=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),te={key:0,class:"mn-thin"},oe={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const u=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await d.read({user:_.state.user._id,url:r.params.url});t.value=i.pop()}else d.clean(),t.value=d.state.current;t.value.owner||(t.value.owner={target:_.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:_.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await D.actions.read({user:_.state.user._id,postable:_.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!u.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){u.value.length>0&&u.value.map(l=>l.text),t.value.status="draft",r.params.url?d.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):d.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?d.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):d.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&d.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,i)=>(e.openBlock(),e.createElementBlock("article",Q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",W,[e.createElementVNode("div",K,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=g=>e.unref(t).content=g)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",X,[e.createElementVNode("div",Y,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=g=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=g=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=g=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(z._sfc_main$1,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[Z,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=g=>e.unref(t).tags=g),tags:e.unref(t).tags},null,8,["tags"]),ee,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=g=>o.value=g),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",te,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=g=>e.unref(t).creator.hidden=g),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),ne={},ae={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},re=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),se=[re];function le(c,r){return e.openBlock(),e.createElementBlock("svg",ae,se)}const ie=P._export_sfc(ne,[["render",le]]),ce={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await d.read({user:_.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$3};function u(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",ce,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(ie,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(F._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(d._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:_.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},u(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode(O._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:_.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ue=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"week"};d.state.filter=a}}),e.watch(()=>d.state.filter,(t,a)=>{const u={...r.query};Object.keys(a).forEach(m=>{u[m]&&delete u[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(u,o),n.replace({query:u})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(d._sfc_main,{category:e.unref(r).params.category,user:_.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},de=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),me={class:"w-100 cols-4 t-left flex-nowrap flex"},pe={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ge=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),fe={class:"t-semi uppercase"},_e=e.createElementVNode("br",null,null,-1),he={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),be={class:"t-semi uppercase"},ye=e.createElementVNode("br",null,null,-1),we={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ke=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),xe={class:"t-semi uppercase"},Be=e.createElementVNode("br",null,null,-1),Ne={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",me,[c.likes?(e.openBlock(),e.createElementBlock("div",pe,[ge,e.createElementVNode("span",fe,[e.createTextVNode(e.toDisplayString(c.likes),1),_e,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",he,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(c.comments),1),ye,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),Be,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Ve={class:"pd-thin radius-extra flex-nowrap flex"},Ee=["innerHTML"],Ce={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(c,{emit:r}){const n=c,{t,locale:a}=L.useI18n();let u=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){u.value=(u.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function g(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][u.value],f=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f++),f>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,f)},333),f===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][u.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,f)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode($.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:g,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:c.action},null,8,Ee)):e.createCommentVNode("",!0)]))}};const $e={class:"pd-thin"},Pe={class:"o-hidden t-black bg-main pd-big radius-big"},Te=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Se={class:"z-index-1 mn-big w-100 flex-nowrap flex"},qe=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Me={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",$e,[e.createElementVNode("div",Pe,[Te,e.createElementVNode("div",Se,[e.createVNode(Ce,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),qe])]))}};const Ie={class:"container container-joinus"},ze={class:"content"},De={class:"h0 mn-big"},Fe=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),Oe=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Le={__name:"JoinUs",setup(c){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{u(),t()});const u=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",ze,[e.createElementVNode("span",De,e.toDisplayString(r.value.toLocaleString()),1),Fe,Oe])]))}};const je=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Ue={class:"community-feed"},Ae=je(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),He={class:"grid-container"},Re={__name:"HotPosts",async setup(c){let r,n;const t=e.ref([]),a=async()=>{const o=await d.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const u=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Ue,[Ae,e.createElementVNode("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(d._sfc_main$1,{blogpost:s,owner:_.state.user._id,key:p,class:e.normalizeClass(u(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Je=P._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>de)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ue)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=d._sfc_main$1;exports.Feed=d._sfc_main;exports.FooterBlogpost=d._sfc_main$2;exports.blogpostsStore=d.blogposts;exports.Comments=x._sfc_main$2;exports.reactionsStore=j.reactions;exports.Activity=Ne;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=Je;exports.JoinUs=Le;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),I=require("./Select-3ca5ab39.js"),d=require("./Feed-d0da2943.js"),_=require("./auth-acbe3ae1.js"),x=require("./Image-2d2e606a.js"),z=require("./IconEdit-1b7b5874.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-505c3ca5.js"),$=require("./Button-2ca405bd.js"),D=require("./organizations-a241b21d.js"),F=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),O=require("./Publics-24f055eb.js"),L=require("vue-i18n");require("./globals-928eb13c.js");const j=require("./Chips-0e5bdd54.js");require("./index-b41aac19.js");require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./reports-270f69df.js");require("./click-outside-0b0727d1.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./CardOrganization-88c6d479.js");require("./ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-0ea8fbf8.js");const U={class:"min-h-100vh pd-thin"},A={class:"mn-thin flex-v-center t-left flex-nowrap flex"},H={class:"flex-v-center flex-nowrap flex t-left"},R=e.createElementVNode("span",{class:""},"Topics for ",-1),J={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},G={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const u=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",A,[e.createElementVNode("h2",H,[R,e.createVNode(I.Select,{options:["today","week","month","year"],select:d.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>d.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",J,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),_.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",G,[e.createVNode(u,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},Q={class:"pd-thin"},W={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},K={class:"w-full h-full"},X={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},Y={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},Z=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),ee=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),te={key:0,class:"mn-thin"},oe={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const u=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await d.read({user:_.state.user._id,url:r.params.url});t.value=i.pop()}else d.clean(),t.value=d.state.current;t.value.owner||(t.value.owner={target:_.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:_.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await D.actions.read({user:_.state.user._id,postable:_.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!u.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){u.value.length>0&&u.value.map(l=>l.text),t.value.status="draft",r.params.url?d.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):d.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?d.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):d.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&d.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,i)=>(e.openBlock(),e.createElementBlock("article",Q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",W,[e.createElementVNode("div",K,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=g=>e.unref(t).content=g)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",X,[e.createElementVNode("div",Y,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=g=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=g=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=g=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(z._sfc_main$1,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[Z,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=g=>e.unref(t).tags=g),tags:e.unref(t).tags},null,8,["tags"]),ee,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=g=>o.value=g),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",te,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=g=>e.unref(t).creator.hidden=g),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),ne={},ae={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},re=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),se=[re];function le(c,r){return e.openBlock(),e.createElementBlock("svg",ae,se)}const ie=P._export_sfc(ne,[["render",le]]),ce={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await d.read({user:_.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$3};function u(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",ce,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(ie,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(F._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(d._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:_.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},u(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode(O._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:_.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ue=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"week"};d.state.filter=a}}),e.watch(()=>d.state.filter,(t,a)=>{const u={...r.query};Object.keys(a).forEach(m=>{u[m]&&delete u[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(u,o),n.replace({query:u})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(d._sfc_main,{category:e.unref(r).params.category,user:_.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},de=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),me={class:"w-100 cols-4 t-left flex-nowrap flex"},pe={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ge=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),fe={class:"t-semi uppercase"},_e=e.createElementVNode("br",null,null,-1),he={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ve=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),be={class:"t-semi uppercase"},ye=e.createElementVNode("br",null,null,-1),we={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ke=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),xe={class:"t-semi uppercase"},Be=e.createElementVNode("br",null,null,-1),Ne={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",me,[c.likes?(e.openBlock(),e.createElementBlock("div",pe,[ge,e.createElementVNode("span",fe,[e.createTextVNode(e.toDisplayString(c.likes),1),_e,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",he,[ve,e.createElementVNode("span",be,[e.createTextVNode(e.toDisplayString(c.comments),1),ye,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",we,[ke,e.createElementVNode("span",xe,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),Be,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Ve={class:"pd-thin radius-extra flex-nowrap flex"},Ee=["innerHTML"],Ce={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(c,{emit:r}){const n=c,{t,locale:a}=L.useI18n();let u=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){u.value=(u.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function g(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][u.value],f=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f++),f>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,f)},333),f===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][u.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,f)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode($.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:g,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:c.action},null,8,Ee)):e.createCommentVNode("",!0)]))}};const $e={class:"pd-thin"},Pe={class:"o-hidden t-black bg-main pd-big radius-big"},Te=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Se={class:"z-index-1 mn-big w-100 flex-nowrap flex"},qe=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Me={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",$e,[e.createElementVNode("div",Pe,[Te,e.createElementVNode("div",Se,[e.createVNode(Ce,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),qe])]))}};const Ie={class:"container container-joinus"},ze={class:"content"},De={class:"h0 mn-big"},Fe=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),Oe=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Le={__name:"JoinUs",setup(c){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{u(),t()});const u=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",ze,[e.createElementVNode("span",De,e.toDisplayString(r.value.toLocaleString()),1),Fe,Oe])]))}};const je=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Ue={class:"community-feed"},Ae=je(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),He={class:"grid-container"},Re={__name:"HotPosts",async setup(c){let r,n;const t=e.ref([]),a=async()=>{const o=await d.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const u=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Ue,[Ae,e.createElementVNode("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(d._sfc_main$1,{blogpost:s,owner:_.state.user._id,key:p,class:e.normalizeClass(u(p))},null,8,["blogpost","owner","class"]))),128))])]))}},Je=P._export_sfc(Re,[["__scopeId","data-v-18db0d1b"]]),Ge=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>de)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ue)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=d._sfc_main$1;exports.Feed=d._sfc_main;exports.FooterBlogpost=d._sfc_main$2;exports.blogpostsStore=d.blogposts;exports.Comments=x._sfc_main$2;exports.reactionsStore=j.reactions;exports.Activity=Ne;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=Je;exports.JoinUs=Le;exports.SubscribeNewsletter=Me;exports.blogpostsRoutes=Ge;
|
package/dist/community.client.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
import { resolveComponent as Y, openBlock as i, createElementBlock as p, createElementVNode as o, createVNode as h, normalizeClass as B, unref as c, createCommentVNode as v, withCtx as k, Transition as G, createBlock as I, resolveDynamicComponent as Q, ref as g, onMounted as F, computed as V, createTextVNode as T, createStaticVNode as Z, TransitionGroup as H, Fragment as D, renderList as U, mergeProps as ee, watch as te, toDisplayString as N, watchEffect as se, isRef as W, withAsyncContext as ae, pushScopeId as oe, popScopeId as ne } from "vue";
|
2
2
|
import { useRoute as z, useRouter as A } from "vue-router";
|
3
3
|
import { S as le } from "./Select-11ddabf5.mjs";
|
4
|
-
import { s as M, r as L, c as re, u as q, a as R, b as ie, d as K, _ as ue } from "./Feed-
|
5
|
-
import { e as os, f as ns } from "./Feed-
|
4
|
+
import { s as M, r as L, c as re, u as q, a as R, b as ie, d as K, _ as ue } from "./Feed-505b3fa8.mjs";
|
5
|
+
import { e as os, f as ns } from "./Feed-505b3fa8.mjs";
|
6
6
|
import { s as w } from "./auth-98fe3efb.mjs";
|
7
|
-
import { _ as ce, a as pe, b as de, c as me } from "./Image-
|
8
|
-
import { b as ge } from "./IconEdit-
|
7
|
+
import { _ as ce, a as pe, b as de, c as me } from "./Image-95c0fb07.mjs";
|
8
|
+
import { b as ge } from "./IconEdit-680dc269.mjs";
|
9
9
|
import { _ as _e, S as he, C as fe } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-b1873cb7.mjs";
|
10
10
|
import { _ as ve, F as be } from "./Button-c59d387c.mjs";
|
11
11
|
import { a as ye } from "./organizations-ea9de495.mjs";
|
12
12
|
import { _ as we } from "./EmptyState-34d85f10.mjs";
|
13
13
|
import { _ as X } from "./_plugin-vue_export-helper-dad06003.mjs";
|
14
|
-
import { _ as xe } from "./Publics-
|
14
|
+
import { _ as xe } from "./Publics-b1cbfd97.mjs";
|
15
15
|
import { useI18n as $e } from "vue-i18n";
|
16
16
|
import "./globals-96ba60e4.mjs";
|
17
|
-
import { r as rs } from "./Chips-
|
17
|
+
import { r as rs } from "./Chips-5e32c8cb.mjs";
|
18
18
|
import "./index-a661083c.mjs";
|
19
19
|
import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
20
20
|
import "./reports-79cd9459.mjs";
|
21
21
|
import "./click-outside-6101836c.mjs";
|
22
22
|
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
23
|
-
import "./CardOrganization-
|
23
|
+
import "./CardOrganization-26714a5e.mjs";
|
24
24
|
import "./ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-4ed993c7.mjs";
|
25
25
|
const ke = { class: "min-h-100vh pd-thin" }, Pe = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, Ce = { class: "flex-v-center flex-nowrap flex t-left" }, Te = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), Se = { class: "w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex" }, Be = { class: "" }, Ie = {
|
26
26
|
__name: "Community",
|