@ozdao/prometheus-framework 0.0.78 → 0.0.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-451d2614.mjs +80 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-5ea8b4fa.js +1 -0
  3. package/dist/ButtonFollow-0d83a04a.mjs +130 -0
  4. package/dist/ButtonFollow-f9c5dc7a.js +1 -0
  5. package/dist/CardHeader-2d7e5d49.mjs +76 -0
  6. package/dist/CardHeader-dff9c71a.js +1 -0
  7. package/dist/Comments-b6e32958.js +1 -0
  8. package/dist/Comments-d2a8fd0f.mjs +76 -0
  9. package/dist/EditProductImages-1d4b44a9.mjs +236 -0
  10. package/dist/EditProductImages-d9228ad0.js +1 -0
  11. package/dist/EmptyState-34d85f10.mjs +36 -0
  12. package/dist/EmptyState-7658d7d6.js +1 -0
  13. package/dist/Feed-932d976d.js +1 -0
  14. package/dist/Feed-962e009b.js +1 -0
  15. package/dist/Feed-c93012c7.mjs +346 -0
  16. package/dist/Feed-d8e33aed.mjs +397 -0
  17. package/dist/PlaceholderUserpic-1a6cf257.mjs +28 -0
  18. package/dist/PlaceholderUserpic-3bf126ee.js +1 -0
  19. package/dist/Popup.vue_vue_type_style_index_0_lang-8981c189.mjs +280 -0
  20. package/dist/Popup.vue_vue_type_style_index_0_lang-931f265a.js +1 -0
  21. package/dist/Product-3c64a352.mjs +904 -0
  22. package/dist/Product-67efba5c.js +7 -0
  23. package/dist/ProductEdit-04760699.js +1 -0
  24. package/dist/ProductEdit-39adf62f.mjs +113 -0
  25. package/dist/ProfileBlogposts-00424109.js +1 -0
  26. package/dist/ProfileBlogposts-65a7a5e0.mjs +56 -0
  27. package/dist/ProfileComments-5884d09f.mjs +43 -0
  28. package/dist/ProfileComments-677731b3.js +1 -0
  29. package/dist/ProfileEvents-85a88674.mjs +55 -0
  30. package/dist/ProfileEvents-b5431cd6.js +1 -0
  31. package/dist/ProfileLikes-4a57f637.mjs +43 -0
  32. package/dist/ProfileLikes-8ccf6815.js +1 -0
  33. package/dist/ProfileOrganizations-5d681498.mjs +202 -0
  34. package/dist/ProfileOrganizations-c7688210.js +1 -0
  35. package/dist/Publics-889c25fc.js +1 -0
  36. package/dist/Publics-8bea4201.mjs +44 -0
  37. package/dist/UploadImage-34bc4a3f.mjs +99 -0
  38. package/dist/UploadImage-75b1a18a.js +1 -0
  39. package/dist/auth-18f80fef.mjs +1501 -0
  40. package/dist/auth-78fd9408.js +8 -0
  41. package/dist/auth.client.cjs +5 -5
  42. package/dist/auth.client.js +5 -5
  43. package/dist/auth.validation-6bccabd6.mjs +20 -0
  44. package/dist/auth.validation-a18510e8.js +1 -0
  45. package/dist/community.client.cjs +8 -9
  46. package/dist/community.client.js +568 -552
  47. package/dist/community.server.js +3 -2
  48. package/dist/community.server.mjs +3 -2
  49. package/dist/events.client.cjs +1 -1
  50. package/dist/events.client.js +10 -10
  51. package/dist/files.client.cjs +1 -0
  52. package/dist/files.client.js +1 -0
  53. package/dist/files.server.js +5 -2
  54. package/dist/files.server.mjs +5 -2
  55. package/dist/main.css +1 -1
  56. package/dist/organizations-0e9ff7ca.mjs +319 -0
  57. package/dist/organizations-c77ea9d0.js +1 -0
  58. package/dist/organizations.client.cjs +2 -2
  59. package/dist/organizations.client.js +26 -26
  60. package/dist/prometheus-framework.cjs.js +3 -3
  61. package/dist/prometheus-framework.es.js +8 -8
  62. package/dist/style.css +1 -1
  63. package/dist/users.client.cjs +1 -1
  64. package/dist/users.client.js +10 -10
  65. package/package.json +3 -3
  66. package/src/modules/community/components/elements/ImageUpload.vue +7 -5
  67. package/src/modules/community/components/pages/BlogPost.vue +12 -15
  68. package/src/modules/community/components/pages/CreateBlogPost.vue +14 -1
  69. package/src/modules/community/controllers/blog.controller.js +2 -1
  70. package/src/modules/files/controllers/files.controller.js +5 -1
  71. package/src/modules/files/routes/files.routes.js +3 -1
@@ -0,0 +1,8 @@
1
+ "use strict";const o=require("vue"),A=require("./globals-d7a54bb4.js");const Qe=(e,t)=>{const r=e.__vccOpts||e;for(const[s,n]of t)r[s]=n;return r},bt={key:0,class:"t-transp mn-r-small"},gt={class:"w-100"},Rt=["type","value","placeholder"],Ct=["value","placeholder"],Ot={key:0,class:"mn-t-thin mn-thin mn-b-thin invalid-feedback"},xt={__name:"Field",props:{label:null,type:"text",placeholder:"Enter something here",field:null,validation:!1},emits:["update:field","focus","blur"],setup(e,{emit:t}){const r=e,s=o.ref(r.field);return(n,a)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:o.normalizeClass([[n.$attrs.class,{"bg-fourth-nano":e.validation}],"flex-center flex-nowrap flex"])},[e.label?(o.openBlock(),o.createElementBlock("div",bt,[o.createElementVNode("span",null,o.toDisplayString(e.label),1)])):o.createCommentVNode("",!0),o.createElementVNode("div",gt,[e.type!=="textarea"?(o.openBlock(),o.createElementBlock("input",{key:0,onInput:a[0]||(a[0]=i=>s.value=t("update:field",i.target.value)),onFocus:a[1]||(a[1]=i=>t("focus",i)),onBlur:a[2]||(a[2]=i=>t("blur",i)),type:e.type,class:"w-100",value:e.field,placeholder:e.placeholder},null,40,Rt)):(o.openBlock(),o.createElementBlock("textarea",{key:1,onInput:a[3]||(a[3]=i=>s.value=t("update:field",i.target.value)),onFocus:a[4]||(a[4]=i=>t("focus",i)),onBlur:a[5]||(a[5]=i=>t("blur",i)),class:"w-100",value:e.field,placeholder:e.placeholder},null,40,Ct))])],2),o.createVNode(o.Transition,{name:"fade"},{default:o.withCtx(()=>[e.validation?(o.openBlock(),o.createElementBlock("div",Ot," * "+o.toDisplayString(e.validation.message),1)):o.createCommentVNode("",!0)]),_:1})],64))}},_t=Qe(xt,[["__scopeId","data-v-484b1828"]]);const Nt=["onClick","disabled"],St={key:0},At={key:0,class:"loading"},Tt=o.createElementVNode("span",null,[o.createElementVNode("svg",{class:"i-small",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[o.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[o.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),o.createTextVNode(),o.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),o.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[o.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),o.createTextVNode(),o.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),o.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[o.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),o.createTextVNode(),o.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),o.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[o.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),o.createTextVNode(),o.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),o.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[o.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),o.createTextVNode(),o.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])])],-1),Pt=[Tt],Bt={key:0,class:"h4 loading"},kt=o.createElementVNode("span",{class:"p-small t-white"},"✔",-1),Dt=[kt],Ut={key:0,class:"error"},Lt={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},validation:{type:Boolean,default:!1}},setup(e){const t=e,r=o.ref(null),s=o.ref(null),n=o.ref(!1),a=o.ref(!1);async function i(){r.value.style["pointer-events"]="none",s.value=null,n.value=!0;try{await t.submit(),r.value.classList.replace("bg-main","bg-light-main"),n.value=!1,a.value=!0,setTimeout(()=>{r.value&&(r.value.classList.replace("bg-light-main","bg-main"),r.value.style.pointerEvents="auto",n.value=!1,a.value=!1,s.value=null)},500),t.callback&&setTimeout(()=>t.callback(),t.callbackDelay)}catch{r.value.classList.replace("bg-main","bg-fourth-nano"),s.value="❌",setTimeout(()=>{r.value.classList.replace("bg-fourth-nano","bg-main"),r.value.style.pointerEvents="auto",n.value=!1,a.value=!1,s.value=null},1330)}}return(u,c)=>(o.openBlock(),o.createElementBlock("button",{onClick:o.withModifiers(i,["stop"]),disabled:e.validation,ref_key:"button",ref:r,class:"w-100 bg-main button"},[o.createVNode(o.Transition,{mode:"out-in",name:"fadeIn"},{default:o.withCtx(()=>[!n.value&&!s.value&&!a.value?(o.openBlock(),o.createElementBlock("span",St,[o.renderSlot(u.$slots,"default")])):o.createCommentVNode("",!0)]),_:3}),o.createVNode(o.Transition,{mode:"out-in",name:"fadeIn"},{default:o.withCtx(()=>[n.value&&!s.value?(o.openBlock(),o.createElementBlock("div",At,Pt)):o.createCommentVNode("",!0)]),_:1}),o.createVNode(o.Transition,{mode:"out-in",name:"fadeIn"},{default:o.withCtx(()=>[a.value?(o.openBlock(),o.createElementBlock("div",Bt,Dt)):o.createCommentVNode("",!0)]),_:1}),o.createVNode(o.Transition,{mode:"out-in",name:"fadeIn"},{default:o.withCtx(()=>[s.value?(o.openBlock(),o.createElementBlock("div",Ut,[o.createElementVNode("span",null,o.toDisplayString(s.value),1)])):o.createCommentVNode("",!0)]),_:1})],8,Nt))}};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var me={exports:{}},Ge=function(t,r){return function(){for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];return t.apply(r,n)}},jt=Ge,ve=Object.prototype.toString,Ee=function(e){return function(t){var r=ve.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function T(e){return e=e.toLowerCase(),function(r){return Ee(r)===e}}function ye(e){return Array.isArray(e)}function H(e){return typeof e>"u"}function qt(e){return e!==null&&!H(e)&&e.constructor!==null&&!H(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var Ze=T("ArrayBuffer");function Vt(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ze(e.buffer),t}function Ft(e){return typeof e=="string"}function It(e){return typeof e=="number"}function et(e){return e!==null&&typeof e=="object"}function $(e){if(Ee(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var $t=T("Date"),Mt=T("File"),Ht=T("Blob"),Jt=T("FileList");function we(e){return ve.call(e)==="[object Function]"}function Wt(e){return et(e)&&we(e.pipe)}function zt(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||ve.call(e)===t||we(e.toString)&&e.toString()===t)}var Xt=T("URLSearchParams");function Kt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Qt(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function be(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),ye(e))for(var r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}function he(){var e={};function t(n,a){$(e[a])&&$(n)?e[a]=he(e[a],n):$(n)?e[a]=he({},n):ye(n)?e[a]=n.slice():e[a]=n}for(var r=0,s=arguments.length;r<s;r++)be(arguments[r],t);return e}function Yt(e,t,r){return be(t,function(n,a){r&&typeof n=="function"?e[a]=jt(n,r):e[a]=n}),e}function Gt(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Zt(e,t,r,s){e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)}function er(e,t,r){var s,n,a,i={};t=t||{};do{for(s=Object.getOwnPropertyNames(e),n=s.length;n-- >0;)a=s[n],i[a]||(t[a]=e[a],i[a]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t}function tr(e,t,r){e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;var s=e.indexOf(t,r);return s!==-1&&s===r}function rr(e){if(!e)return null;var t=e.length;if(H(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r}var nr=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),y={isArray:ye,isArrayBuffer:Ze,isBuffer:qt,isFormData:zt,isArrayBufferView:Vt,isString:Ft,isNumber:It,isObject:et,isPlainObject:$,isUndefined:H,isDate:$t,isFile:Mt,isBlob:Ht,isFunction:we,isStream:Wt,isURLSearchParams:Xt,isStandardBrowserEnv:Qt,forEach:be,merge:he,extend:Yt,trim:Kt,stripBOM:Gt,inherits:Zt,toFlatObject:er,kindOf:Ee,kindOfTest:T,endsWith:tr,toArray:rr,isTypedArray:nr,isFileList:Jt},k=y;function Ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var tt=function(t,r,s){if(!r)return t;var n;if(s)n=s(r);else if(k.isURLSearchParams(r))n=r.toString();else{var a=[];k.forEach(r,function(c,f){c===null||typeof c>"u"||(k.isArray(c)?f=f+"[]":c=[c],k.forEach(c,function(p){k.isDate(p)?p=p.toISOString():k.isObject(p)&&(p=JSON.stringify(p)),a.push(Ne(f)+"="+Ne(p))}))}),n=a.join("&")}if(n){var i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+n}return t},ar=y;function J(){this.handlers=[]}J.prototype.use=function(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1};J.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};J.prototype.forEach=function(t){ar.forEach(this.handlers,function(s){s!==null&&t(s)})};var sr=J,ir=y,or=function(t,r){ir.forEach(t,function(n,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(t[r]=n,delete t[a])})},rt=y;function U(e,t,r,s,n){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n)}rt.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var nt=U.prototype,at={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){at[e]={value:e}});Object.defineProperties(U,at);Object.defineProperty(nt,"isAxiosError",{value:!0});U.from=function(e,t,r,s,n,a){var i=Object.create(nt);return rt.toFlatObject(e,i,function(c){return c!==Error.prototype}),U.call(i,e.message,t,r,s,n),i.name=e.name,a&&Object.assign(i,a),i};var q=U,st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},C=y;function ur(e,t){t=t||new FormData;var r=[];function s(a){return a===null?"":C.isDate(a)?a.toISOString():C.isArrayBuffer(a)||C.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function n(a,i){if(C.isPlainObject(a)||C.isArray(a)){if(r.indexOf(a)!==-1)throw Error("Circular reference detected in "+i);r.push(a),C.forEach(a,function(c,f){if(!C.isUndefined(c)){var d=i?i+"."+f:f,p;if(c&&!i&&typeof c=="object"){if(C.endsWith(f,"{}"))c=JSON.stringify(c);else if(C.endsWith(f,"[]")&&(p=C.toArray(c))){p.forEach(function(l){!C.isUndefined(l)&&t.append(d,s(l))});return}}n(c,d)}}),r.pop()}else t.append(i,s(a))}return n(e),t}var it=ur,G,Se;function lr(){if(Se)return G;Se=1;var e=q;return G=function(r,s,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?r(n):s(new e("Request failed with status code "+n.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))},G}var Z,Ae;function cr(){if(Ae)return Z;Ae=1;var e=y;return Z=e.isStandardBrowserEnv()?function(){return{write:function(s,n,a,i,u,c){var f=[];f.push(s+"="+encodeURIComponent(n)),e.isNumber(a)&&f.push("expires="+new Date(a).toGMTString()),e.isString(i)&&f.push("path="+i),e.isString(u)&&f.push("domain="+u),c===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(s){var n=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Z}var dr=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},fr=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t},pr=dr,hr=fr,ot=function(t,r){return t&&!pr(r)?hr(t,r):r},ee,Te;function mr(){if(Te)return ee;Te=1;var e=y,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return ee=function(s){var n={},a,i,u;return s&&e.forEach(s.split(`
2
+ `),function(f){if(u=f.indexOf(":"),a=e.trim(f.substr(0,u)).toLowerCase(),i=e.trim(f.substr(u+1)),a){if(n[a]&&t.indexOf(a)>=0)return;a==="set-cookie"?n[a]=(n[a]?n[a]:[]).concat([i]):n[a]=n[a]?n[a]+", "+i:i}}),n},ee}var te,Pe;function vr(){if(Pe)return te;Pe=1;var e=y;return te=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),n;function a(i){var u=i;return r&&(s.setAttribute("href",u),u=s.href),s.setAttribute("href",u),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return n=a(window.location.href),function(u){var c=e.isString(u)?a(u):u;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),te}var re,Be;function W(){if(Be)return re;Be=1;var e=q,t=y;function r(s){e.call(this,s??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(r,e,{__CANCEL__:!0}),re=r,re}var ne,ke;function Er(){return ke||(ke=1,ne=function(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}),ne}var ae,De;function Ue(){if(De)return ae;De=1;var e=y,t=lr(),r=cr(),s=tt,n=ot,a=mr(),i=vr(),u=st,c=q,f=W(),d=Er();return ae=function(l){return new Promise(function(O,E){var x=l.data,N=l.headers,V=l.responseType,P;function Oe(){l.cancelToken&&l.cancelToken.unsubscribe(P),l.signal&&l.signal.removeEventListener("abort",P)}e.isFormData(x)&&e.isStandardBrowserEnv()&&delete N["Content-Type"];var h=new XMLHttpRequest;if(l.auth){var Et=l.auth.username||"",yt=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";N.Authorization="Basic "+btoa(Et+":"+yt)}var K=n(l.baseURL,l.url);h.open(l.method.toUpperCase(),s(K,l.params,l.paramsSerializer),!0),h.timeout=l.timeout;function xe(){if(h){var R="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,B=!V||V==="text"||V==="json"?h.responseText:h.response,S={data:B,status:h.status,statusText:h.statusText,headers:R,config:l,request:h};t(function(Y){O(Y),Oe()},function(Y){E(Y),Oe()},S),h=null}}if("onloadend"in h?h.onloadend=xe:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(xe)},h.onabort=function(){h&&(E(new c("Request aborted",c.ECONNABORTED,l,h)),h=null)},h.onerror=function(){E(new c("Network Error",c.ERR_NETWORK,l,h,h)),h=null},h.ontimeout=function(){var B=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",S=l.transitional||u;l.timeoutErrorMessage&&(B=l.timeoutErrorMessage),E(new c(B,S.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,l,h)),h=null},e.isStandardBrowserEnv()){var _e=(l.withCredentials||i(K))&&l.xsrfCookieName?r.read(l.xsrfCookieName):void 0;_e&&(N[l.xsrfHeaderName]=_e)}"setRequestHeader"in h&&e.forEach(N,function(B,S){typeof x>"u"&&S.toLowerCase()==="content-type"?delete N[S]:h.setRequestHeader(S,B)}),e.isUndefined(l.withCredentials)||(h.withCredentials=!!l.withCredentials),V&&V!=="json"&&(h.responseType=l.responseType),typeof l.onDownloadProgress=="function"&&h.addEventListener("progress",l.onDownloadProgress),typeof l.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(P=function(R){h&&(E(!R||R&&R.type?new f:R),h.abort(),h=null)},l.cancelToken&&l.cancelToken.subscribe(P),l.signal&&(l.signal.aborted?P():l.signal.addEventListener("abort",P))),x||(x=null);var Q=d(K);if(Q&&["http","https","file"].indexOf(Q)===-1){E(new c("Unsupported protocol "+Q+":",c.ERR_BAD_REQUEST,l));return}h.send(x)})},ae}var se,Le;function yr(){return Le||(Le=1,se=null),se}var v=y,je=or,qe=q,wr=st,br=it,gr={"Content-Type":"application/x-www-form-urlencoded"};function Ve(e,t){!v.isUndefined(e)&&v.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function Rr(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Ue()),e}function Cr(e,t,r){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}var z={transitional:wr,adapter:Rr(),transformRequest:[function(t,r){if(je(r,"Accept"),je(r,"Content-Type"),v.isFormData(t)||v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return Ve(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var s=v.isObject(t),n=r&&r["Content-Type"],a;if((a=v.isFileList(t))||s&&n==="multipart/form-data"){var i=this.env&&this.env.FormData;return br(a?{"files[]":t}:t,i&&new i)}else if(s||n==="application/json")return Ve(r,"application/json"),Cr(t);return t}],transformResponse:[function(t){var r=this.transitional||z.transitional,s=r&&r.silentJSONParsing,n=r&&r.forcedJSONParsing,a=!s&&this.responseType==="json";if(a||n&&v.isString(t)&&t.length)try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?qe.from(i,qe.ERR_BAD_RESPONSE,this,null,this.response):i}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yr()},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};v.forEach(["delete","get","head"],function(t){z.headers[t]={}});v.forEach(["post","put","patch"],function(t){z.headers[t]=v.merge(gr)});var ge=z,Or=y,xr=ge,_r=function(t,r,s){var n=this||xr;return Or.forEach(s,function(i){t=i.call(n,t,r)}),t},ie,Fe;function ut(){return Fe||(Fe=1,ie=function(t){return!!(t&&t.__CANCEL__)}),ie}var Ie=y,oe=_r,Nr=ut(),Sr=ge,Ar=W();function ue(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ar}var Tr=function(t){ue(t),t.headers=t.headers||{},t.data=oe.call(t,t.data,t.headers,t.transformRequest),t.headers=Ie.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Ie.forEach(["delete","get","head","post","put","patch","common"],function(n){delete t.headers[n]});var r=t.adapter||Sr.adapter;return r(t).then(function(n){return ue(t),n.data=oe.call(t,n.data,n.headers,t.transformResponse),n},function(n){return Nr(n)||(ue(t),n&&n.response&&(n.response.data=oe.call(t,n.response.data,n.response.headers,t.transformResponse))),Promise.reject(n)})},g=y,lt=function(t,r){r=r||{};var s={};function n(d,p){return g.isPlainObject(d)&&g.isPlainObject(p)?g.merge(d,p):g.isPlainObject(p)?g.merge({},p):g.isArray(p)?p.slice():p}function a(d){if(g.isUndefined(r[d])){if(!g.isUndefined(t[d]))return n(void 0,t[d])}else return n(t[d],r[d])}function i(d){if(!g.isUndefined(r[d]))return n(void 0,r[d])}function u(d){if(g.isUndefined(r[d])){if(!g.isUndefined(t[d]))return n(void 0,t[d])}else return n(void 0,r[d])}function c(d){if(d in r)return n(t[d],r[d]);if(d in t)return n(void 0,t[d])}var f={url:i,method:i,data:i,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return g.forEach(Object.keys(t).concat(Object.keys(r)),function(p){var l=f[p]||a,m=l(p);g.isUndefined(m)&&l!==c||(s[p]=m)}),s},le,$e;function ct(){return $e||($e=1,le={version:"0.27.2"}),le}var Pr=ct().version,_=q,Re={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Re[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});var Me={};Re.transitional=function(t,r,s){function n(a,i){return"[Axios v"+Pr+"] Transitional option '"+a+"'"+i+(s?". "+s:"")}return function(a,i,u){if(t===!1)throw new _(n(i," has been removed"+(r?" in "+r:"")),_.ERR_DEPRECATED);return r&&!Me[i]&&(Me[i]=!0,console.warn(n(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,u):!0}};function Br(e,t,r){if(typeof e!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);for(var s=Object.keys(e),n=s.length;n-- >0;){var a=s[n],i=t[a];if(i){var u=e[a],c=u===void 0||i(u,a,e);if(c!==!0)throw new _("option "+a+" must be "+c,_.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new _("Unknown option "+a,_.ERR_BAD_OPTION)}}var kr={assertOptions:Br,validators:Re},dt=y,Dr=tt,He=sr,Je=Tr,X=lt,Ur=ot,ft=kr,D=ft.validators;function L(e){this.defaults=e,this.interceptors={request:new He,response:new He}}L.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=X(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var s=r.transitional;s!==void 0&&ft.assertOptions(s,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean)},!1);var n=[],a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(a=a&&m.synchronous,n.unshift(m.fulfilled,m.rejected))});var i=[];this.interceptors.response.forEach(function(m){i.push(m.fulfilled,m.rejected)});var u;if(!a){var c=[Je,void 0];for(Array.prototype.unshift.apply(c,n),c=c.concat(i),u=Promise.resolve(r);c.length;)u=u.then(c.shift(),c.shift());return u}for(var f=r;n.length;){var d=n.shift(),p=n.shift();try{f=d(f)}catch(l){p(l);break}}try{u=Je(f)}catch(l){return Promise.reject(l)}for(;i.length;)u=u.then(i.shift(),i.shift());return u};L.prototype.getUri=function(t){t=X(this.defaults,t);var r=Ur(t.baseURL,t.url);return Dr(r,t.params,t.paramsSerializer)};dt.forEach(["delete","get","head","options"],function(t){L.prototype[t]=function(r,s){return this.request(X(s||{},{method:t,url:r,data:(s||{}).data}))}});dt.forEach(["post","put","patch"],function(t){function r(s){return function(a,i,u){return this.request(X(u||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}L.prototype[t]=r(),L.prototype[t+"Form"]=r(!0)});var Lr=L,ce,We;function jr(){if(We)return ce;We=1;var e=W();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var s;this.promise=new Promise(function(i){s=i});var n=this;this.promise.then(function(a){if(n._listeners){var i,u=n._listeners.length;for(i=0;i<u;i++)n._listeners[i](a);n._listeners=null}}),this.promise.then=function(a){var i,u=new Promise(function(c){n.subscribe(c),i=c}).then(a);return u.cancel=function(){n.unsubscribe(i)},u},r(function(i){n.reason||(n.reason=new e(i),s(n.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]},t.prototype.unsubscribe=function(s){if(this._listeners){var n=this._listeners.indexOf(s);n!==-1&&this._listeners.splice(n,1)}},t.source=function(){var s,n=new t(function(i){s=i});return{token:n,cancel:s}},ce=t,ce}var de,ze;function qr(){return ze||(ze=1,de=function(t){return function(s){return t.apply(null,s)}}),de}var fe,Xe;function Vr(){if(Xe)return fe;Xe=1;var e=y;return fe=function(r){return e.isObject(r)&&r.isAxiosError===!0},fe}var Ke=y,Fr=Ge,M=Lr,Ir=lt,$r=ge;function pt(e){var t=new M(e),r=Fr(M.prototype.request,t);return Ke.extend(r,M.prototype,t),Ke.extend(r,t),r.create=function(n){return pt(Ir(e,n))},r}var b=pt($r);b.Axios=M;b.CanceledError=W();b.CancelToken=jr();b.isCancel=ut();b.VERSION=ct().version;b.toFormData=it;b.AxiosError=q;b.Cancel=b.CanceledError;b.all=function(t){return Promise.all(t)};b.spread=qr();b.isAxiosError=Vr();me.exports=b;me.exports.default=b;var Mr=me.exports,Hr=Mr;const Ce=Ye(Hr);var ht={exports:{}};/*!
3
+ * JavaScript Cookie v2.2.1
4
+ * https://github.com/js-cookie/js-cookie
5
+ *
6
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
+ * Released under the MIT license
8
+ */(function(e,t){(function(r){var s;if(e.exports=r(),s=!0,!s){var n=window.Cookies,a=window.Cookies=r();a.noConflict=function(){return window.Cookies=n,a}}})(function(){function r(){for(var a=0,i={};a<arguments.length;a++){var u=arguments[a];for(var c in u)i[c]=u[c]}return i}function s(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function n(a){function i(){}function u(f,d,p){if(!(typeof document>"u")){p=r({path:"/"},i.defaults,p),typeof p.expires=="number"&&(p.expires=new Date(new Date*1+p.expires*864e5)),p.expires=p.expires?p.expires.toUTCString():"";try{var l=JSON.stringify(d);/^[\{\[]/.test(l)&&(d=l)}catch{}d=a.write?a.write(d,f):encodeURIComponent(String(d)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),f=encodeURIComponent(String(f)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var m="";for(var O in p)p[O]&&(m+="; "+O,p[O]!==!0&&(m+="="+p[O].split(";")[0]));return document.cookie=f+"="+d+m}}function c(f,d){if(!(typeof document>"u")){for(var p={},l=document.cookie?document.cookie.split("; "):[],m=0;m<l.length;m++){var O=l[m].split("="),E=O.slice(1).join("=");!d&&E.charAt(0)==='"'&&(E=E.slice(1,-1));try{var x=s(O[0]);if(E=(a.read||a)(E,x)||s(E),d)try{E=JSON.parse(E)}catch{}if(p[x]=E,f===x)break}catch{}}return f?p[f]:p}}return i.set=u,i.get=function(f){return c(f,!1)},i.getJSON=function(f){return c(f,!0)},i.remove=function(f,d){u(f,"",r(d,{expires:-1}))},i.defaults={},i.withConverter=n,i}return n(function(){})})})(ht);var Jr=ht.exports;const I=Ye(Jr),Wr=Ce.create({baseURL:process.env.API_URL,withCredentials:!0}),j=o.reactive({code:{value:"",type:"",method:"",isSended:!1,isValid:!1}});async function mt(e,t,r){return await Wr.post("/api/twofa/sendcode",{phone:e.phone.number,email:e.email,method:t,type:r}).then(s=>(j.code=s.data,j.code.isSended=!0,Promise.resolve(s.data)),s=>(console.log(s),A.setError(s),Promise.reject(s)))}o.watch(j,(e,t)=>{});const zr=Object.freeze(Object.defineProperty({__proto__:null,sendCode:mt,state:j},Symbol.toStringTag,{value:"Module"})),F=Ce.create({baseURL:process.env.API_URL,withCredentials:!0}),w=o.reactive({user:{_id:"",username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});if(I.get("user")){const{_id:e,email:t,phone:r,roles:s,accessToken:n}=JSON.parse(I.get("user"));Object.assign(w.user,{_id:e,email:t,phone:r}),Object.assign(w.access,{token:n,roles:s,status:!!n}),F.interceptors.request.use(a=>(n&&(a.headers["x-access-token"]=n),a),a=>Promise.reject(a))}const vt={async login(e,t){try{console.log(e.phone.number);const r=await F.post("/api/auth/signin",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:"",type:t});return pe("user",r.data),console.log(r.data),Object.assign(w.user,{...r.data}),Object.assign(w.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){return Object.assign(w.access,{token:null,status:!1}),A.setError(r),Promise.reject(r)}},async signup(e,t,r){const{password:s,passwordRepeat:n}=w.user;if(s!==n){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw A.setError(a),new Error(a.response.status)}try{e.phone=e.phone.number;const a=await F.post("/api/auth/signup",{...e,type:t,inviteCode:r});return a.data.accessToken&&pe("user",a.data),Object.assign(w.user,{...a.data}),Object.assign(w.access,{token:a.data.accessToken,status:!0,roles:a.data.roles}),a.data}catch(a){throw A.setError(a),console.log("Sign up falied"),a}},logout(){Kr("user"),Object.assign(w.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(w.access,{token:null,status:!1})},async resetPassword(e,t){try{const r=await F.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(j.code,{...r.data,isSended:!0}),r.data}catch(r){return A.setError(r),Promise.reject(r)}},async updatePassword(e,t){const{password:r,passwordRepeat:s}=w.user;if(r!==s){const n={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw A.setError(n),new Error(n.response.status)}try{const n=await F.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return n.data.accessToken&&pe("user",n.data),Object.assign(w.user,{...n.data}),Object.assign(w.access,{token:n.data.accessToken,status:!0}),n.data}catch(n){return A.setError(n),Promise.reject(n)}}},Xr={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function pe(e,t,r=process.env.NODE_ENV){I.set(e,JSON.stringify(t),Xr[r])}function Kr(e,t=process.env.NODE_ENV){const r=t==="production"?{domain:process.env.API_URL}:{};I.remove(e,r)}o.watch(w,(e,t)=>{});const Qr=Object.freeze(Object.defineProperty({__proto__:null,actions:vt,state:w},Symbol.toStringTag,{value:"Module"}));exports.Cookies=I;exports.Field=_t;exports._export_sfc=Qe;exports._sfc_main=Lt;exports.actions=vt;exports.auth=Qr;exports.axios=Ce;exports.sendCode=mt;exports.state=w;exports.state$1=j;exports.twofa=zr;