var e=`fleet-rlm:access-token`,t=[`fleet_access_token`];function n(){if(!(typeof sessionStorage>`u`))return sessionStorage}function r(){if(!(typeof localStorage>`u`))return localStorage}function i(e,t){if(!e)return null;try{let n=e.getItem(t);return n&&n.trim().length>0?n:null}catch{return null}}function a(e,t){if(e)try{e.removeItem(t)}catch{}}function o(e,t,n){if(e)try{e.setItem(t,n)}catch{}}function s(){let s=n(),c=r(),l=i(s,e);if(l)return l;let u=i(c,e);if(u){o(s,e,u),a(c,e);for(let e of t)a(c,e);return u}for(let n of t){let t=i(c,n);if(t)return o(s,e,t),a(c,n),t}return null}var c=s();function l(i){let s=i&&i.trim().length>0?i:null;c=s;let l=n(),u=r();s?(o(l,e,s),a(u,e)):(a(l,e),a(u,e));for(let e of t)a(u,e)}function u(){return c||(c=s(),c)}function d(){l(null)}export{u as n,l as r,d as t};