(function(n){var t=!1,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0),typeof exports=="object"&&(module.exports=n(),t=!0),t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})})(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(i){function r(t,u,f){var o,c,l,s,v,e,h;if(typeof document!="undefined"){if(arguments.length>1){f=n({path:"/"},r.defaults,f),typeof f.expires=="number"&&(c=new Date,c.setMilliseconds(c.getMilliseconds()+f.expires*864e5),f.expires=c),f.expires=f.expires?f.expires.toUTCString():"";try{o=JSON.stringify(u),/^[\{\[]/.test(o)&&(u=o)}catch(w){}u=i.write?i.write(u,t):encodeURIComponent(String(u)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),l="";for(s in f)f[s]&&(l+="; "+s,f[s]!==!0)&&(l+="="+f[s]);return document.cookie=t+"="+u+l}t||(o={});for(var y=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,a=0;a<y.length;a++){v=y[a].split("="),e=v.slice(1).join("="),this.json||e.charAt(0)!=='"'||(e=e.slice(1,-1));try{if(h=v[0].replace(p,decodeURIComponent),e=i.read?i.read(e,h):i(e,h)||e.replace(p,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(w){}if(t===h){o=e;break}t||(o[h]=e)}catch(w){}}return o}}return r.set=r,r.get=function(n){return r.call(r,n)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,i){r(t,"",n(i,{expires:-1}))},r.withConverter=t,r}return t(function(){})})