import{S as t,a as e}from"./p-03b520ca.js";import{c as n,a as r}from"./p-814af281.js";var o=n((function(t){t.exports=function(){function t(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}return function e(n,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=t({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=e+"="+n.write(o,e)+c}}return Object.create({set:o,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],r={},o=0;o<e.length;o++){var i=e[o].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(r[u]=n.read(c,u),t===u)break}catch(t){}}return t?r[t]:r}},remove:function(e,n){o(e,"",t({},n,{expires:-1}))},withAttributes:function(n){return e(this.converter,t({},this.attributes,n))},withConverter:function(n){return e(t({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()}));class i{constructor(){this.cookie=o}static getExpires(t=i.COOKIE_EXPIRATION_DAY_COUNT){const e=new Date;return e.setTime(e.getTime()+24*t*60*60*1e3),e}save(t,e){this.cookie.set(t,e,{path:i.COOKIE_PATH,expires:i.getExpires()})}get(t){return this.cookie.get(t)}remove(t){this.cookie.remove(t,{path:i.COOKIE_PATH})}clear(){this.remove(t),this.remove(e)}getAll(){return{jwt:this.get(t),userId:this.get(e)}}}i.COOKIE_PATH="/",i.COOKIE_EXPIRATION_DAY_COUNT=7;export{i as C}