PageSourceSearch

http://02308.net/assets/user-B1q31E4s.js

js 02308.net collected 2026-10-09 04:32:40 UTC 7,251 bytes, 1 lines download raw bytes

1import{$ as e,N as t,O as n,at as r,ct as i,dt as a,h as o,ht as s,i as c,it as l,k as u,lt as d,mt as f,ot as p,rt as m,st as h,t as g}from"./http-CCe67rJJ.js";var _=typeof window<`u`,v,y=e=>v=e,b=Symbol();function x(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var S;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(S||={});var C=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function w(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function T(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){A(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function E(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function D(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var O=typeof navigator==`object`?navigator:{userAgent:``},k=/Macintosh/.test(O.userAgent)&&/AppleWebKit/.test(O.userAgent)&&!/Safari/.test(O.userAgent),A=_?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!k?j:`msSaveOrOpenBlob`in O?M:N:()=>{};function j(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?D(r):E(r.href)?T(e,t,n):(r.target=`_blank`,D(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){D(r)},0))}function M(e,t=`download`,n){if(typeof e==`string`)if(E(e))T(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){D(t)})}else navigator.msSaveOrOpenBlob(w(e,n),t)}function N(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return T(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(C.HTMLElement))||`safari`in C,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||k)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:P}=Object;function F(){let e=m(!0),t=e.run(()=>a({})),n=[],r=[],i=h({install(e){y(i),i._a=e,e.provide(b,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var I=()=>{};function L(e,t,n,r=I){e.add(t);let a=()=>{e.delete(t)&&r()};return!n&&l()&&i(a),a}function R(e,...t){e.forEach(e=>{e(...t)})}var z=e=>e(),B=Symbol(),V=Symbol();function H(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let i=t[n],a=e[n];x(a)&&x(i)&&e.hasOwnProperty(n)&&!p(i)&&!r(i)?e[n]=H(a,i):e[n]=i}return e}var U=Symbol();function W(e){return!x(e)||!Object.prototype.hasOwnProperty.call(e,U)}var{assign:G}=Object;function K(e){return!!(p(e)&&e.effect)}function q(e,t,n,r){let{state:i,actions:a,getters:c}=t,l=n.state.value[e],u;function d(){return l||(n.state.value[e]=i?i():{}),G(s(n.state.value[e]),a,Object.keys(c||{}).reduce((t,r)=>(t[r]=h(o(()=>{y(n);let t=n._s.get(e);return c[r].call(t,t)})),t),{}))}return u=J(e,d,t,n,r,!0),u}function J(n,i,o={},s,c,l){let u,h=G({actions:{}},o),g={deep:!0},_,v,b=new Set,x=new Set,C=s.state.value[n];!l&&!C&&(s.state.value[n]={}),a({});let w;function T(e){let r;_=v=!1,typeof e==`function`?(e(s.state.value[n]),r={type:S.patchFunction,storeId:n,events:void 0}):(H(s.state.value[n],e),r={type:S.patchObject,payload:e,storeId:n,events:void 0});let i=w=Symbol();t().then(()=>{w===i&&(_=!0)}),v=!0,R(b,r,s.state.value[n])}let E=l?function(){let{state:e}=o,t=e?e():{};this.$patch(e=>{G(e,t)})}:I;function D(){u.stop(),b.clear(),x.clear(),s._s.delete(n)}let O=(e,t=``)=>{if(B in e)return e[V]=t,e;let r=function(){y(s);let t=Array.from(arguments),i=new Set,a=new Set;function o(e){i.add(e)}function c(e){a.add(e)}R(x,{args:t,name:r[V],store:k,after:o,onError:c});let l;try{l=e.apply(this&&this.$id===n?this:k,t)}catch(e){throw R(a,e),e}return l instanceof Promise?l.then(e=>(R(i,e),e)).catch(e=>(R(a,e),Promise.reject(e))):(R(i,l),l)};return r[B]=!0,r[V]=t,r},k=d({_p:s,$id:n,$onAction:L.bind(null,x),$patch:T,$reset:E,$subscribe(t,r={}){let i=L(b,t,r.detached,()=>a()),a=u.run(()=>e(()=>s.state.value[n],e=>{(r.flush===`sync`?v:_)&&t({storeId:n,type:S.direct,events:void 0},e)},G({},g,r)));return i},$dispose:D});s._s.set(n,k);let A=(s._a&&s._a.runWithContext||z)(()=>s._e.run(()=>(u=m()).run(()=>i({action:O}))));for(let e in A){let t=A[e];p(t)&&!K(t)||r(t)?l||(C&&W(t)&&(p(t)?t.value=C[e]:H(t,C[e])),s.state.value[n][e]=t):typeof t==`function`&&(A[e]=O(t,e),h.actions[e]=t)}return G(k,A),G(f(k),A),Object.defineProperty(k,`$state`,{get:()=>s.state.value[n],set:e=>{T(t=>{G(t,e)})}}
1),s._p.forEach(e=>{G(k,u.run(()=>e({store:k,app:s._a,pinia:s,options:h})))}),C&&l&&o.hydrate&&o.hydrate(k.$state,C),_=!0,v=!0,k}function Y(e,t,r){let i,a=typeof t==`function`;i=a?r:t;function o(r,o){let s=n();return r||=s?u(b,null):null,r&&y(r),r=v,r._s.has(e)||(a?J(e,t,i,r):q(e,i,r)),r._s.get(e)}return o.$id=e,o}function X(){return g.get(`${c.menus}/`)}var Z=Y(`user`,()=>{let e=a(``),t=a(``),n=a(null),r=a([]),i=o(()=>!!e.value),s=o(()=>r.value.filter(e=>e.platform===`mobile`||e.platform===`both`)),l=o(()=>r.value.filter(e=>e.platform===`desktop`||e.platform===`both`));function u(n,r){e.value=n,t.value=r}function d(){e.value=``,t.value=``,n.value=null,r.value=[]}let f=null;async function p(){return t.value?f||(f=(async()=>{try{let e=await g.post(`${c.auth}/refresh/`,{refresh:t.value});return u(e.data?.access||e.access,e.data?.refresh||e.refresh),!0}catch(e){return console.error(`Token刷新失败`,e),d(),!1}finally{f=null}})(),f):!1}function m(e){n.value=e}async function h(){try{let e=await g.get(`${c.users}/me/`);n.value=e.data||e}catch(e){console.error(`获取用户信息失败`,e)}}async function _(){try{let e=await X();r.value=e.data||e}catch(e){console.error(`获取菜单失败`,e)}}return{accessToken:e,refreshToken:t,userInfo:n,menus:r,isLoggedIn:i,mobileMenus:s,desktopMenus:l,setTokens:u,clearTokens:d,refreshAccessToken:p,setUserInfo:m,fetchCurrentUser:h,fetchMenus:_}},{persist:{key:`user`,storage:localStorage,serializer:{deserialize:e=>JSON.parse(e),serialize:e=>JSON.stringify(e)},pick:[`accessToken`,`refreshToken`,`userInfo`]}});export{F as n,Y as r,Z as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.