Files
ogame-vue-ts/docs/assets/vendor-pinia-L_8CmDWM.js
谦君 59dd7bfd05 feat: 重构战报弹窗与模拟器视图,优化UI与逻辑
重构BattleReportDialog和BattleSimulatorView相关静态资源,替换旧版JS/CSS文件,提升界面一致性和交互体验。新增和优化空状态、滚动区域等通用UI组件,移除部分冗余composable,完善多语言内容。引入导弹逻辑,补充版本检测工具,提升整体代码结构和可维护性。
2025-12-15 20:04:40 +08:00

1 line
8.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{$n as e,Fn as t,Gn as n,Hn as r,Kn as i,Sn as a,Un as o,Vn as s,Wn as c,Yn as l,_n as u,on as d,qn as f,tr as p,vn as m}from"./game-logic-BBFCPVtv.js";var h=typeof window<`u`,g,_=e=>g=e,v=Symbol();function y(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var b;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(b||={});var x=(()=>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 S(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 C(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){O(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function w(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function T(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 E=typeof navigator==`object`?navigator:{userAgent:``},D=(()=>/Macintosh/.test(E.userAgent)&&/AppleWebKit/.test(E.userAgent)&&!/Safari/.test(E.userAgent))(),O=h?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!D?k:`msSaveOrOpenBlob`in E?A:j:()=>{};function k(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?T(r):w(r.href)?C(e,t,n):(r.target=`_blank`,T(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){T(r)},0))}function A(e,t=`download`,n){if(typeof e==`string`)if(w(e))C(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){T(t)})}else navigator.msSaveOrOpenBlob(S(e,n),t)}function j(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return C(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(x.HTMLElement))||`safari`in x,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||D)&&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:ee}=Object;function M(){let e=s(!0),t=e.run(()=>l({})),r=[],i=[],a=n({install(e){_(a),a._a=e,e.provide(v,a),e.config.globalProperties.$pinia=a,i.forEach(e=>r.push(e)),i=[]},use(e){return this._a?r.push(e):i.push(e),this},_p:r,_a:null,_e:e,_s:new Map,state:t});return a}var N=()=>{};function P(e,t,n,a=N){e.add(t);let o=()=>{e.delete(t)&&a()};return!n&&r()&&i(o),o}function F(e,...t){e.forEach(e=>{e(...t)})}var I=e=>e(),L=Symbol(),R=Symbol();function z(e,t){for(let n in 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),t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];y(i)&&y(r)&&e.hasOwnProperty(n)&&!c(r)&&!o(r)?e[n]=z(i,r):e[n]=r}return e}var B=Symbol();function V(e){return!y(e)||!Object.prototype.hasOwnProperty.call(e,B)}var{assign:H}=Object;function U(e){return!!(c(e)&&e.effect)}function W(e,t,r,i){let{state:a,actions:o,getters:s}=t,c=r.state.value[e],l;function u(){return c||(r.state.value[e]=a?a():{}),H(p(r.state.value[e]),o,Object.keys(s||{}).reduce((t,i)=>(t[i]=n(d(()=>{_(r);let t=r._s.get(e);return s[i].call(t,t)})),t),{}))}return l=G(e,u,t,r,i,!0),l}function G(n,r,i={},u,d,p){let m,h=H({actions:{}},i),g={deep:!0},v,y,x=new Set,S=new Set,C=u.state.value[n];!p&&!C&&(u.state.value[n]={}),l({});let w;function T(e){let t;v=y=!1,typeof e==`function`?(e(u.state.value[n]),t={type:b.patchFunction,storeId:n,events:void 0}):(z(u.state.value[n],e),t={type:b.patchObject,payload:e,storeId:n,events:void 0});let r=w=Symbol();a().then(()=>{w===r&&(v=!0)}),y=!0,F(x,t,u.state.value[n])}let E=p?function(){let{state:e}=i,t=e?e():{};this.$patch(e=>{H(e,t)})}:N;function D(){m.stop(),x.clear(),S.clear(),u._s.delete(n)}let O=(e,t=``)=>{if(L in e)return e[R]=t,e;let r=function(){_(u);let t=Array.from(arguments),i=new Set,a=new Set;function o(e){i.add(e)}function s(e){a.add(e)}F(S,{args:t,name:r[R],store:k,after:o,onError:s});let c;try{c=e.apply(this&&this.$id===n?this:k,t)}catch(e){throw F(a,e),e}return c instanceof Promise?c.then(e=>(F(i,e),e)).catch(e=>(F(a,e),Promise.reject(e))):(F(i,c),c)};return r[L]=!0,r[R]=t,r},k=f({_p:u,$id:n,$onAction:P.bind(null,S),$patch:T,$reset:E,$subscribe(e,r={}){let i=P(x,e,r.detached,()=>a()),a=m.run(()=>t(()=>u.state.value[n],t=>{(r.flush===`sync`?y:v)&&e({storeId:n,type:b.direct,events:void 0},t)},H({},g,r)));return i},$dispose:D});u._s.set(n,k);let A=(u._a&&u._a.runWithContext||I)(()=>u._e.run(()=>(m=s()).run(()=>r({action:O}))));for(let e in A){let t=A[e];c(t)&&!U(t)||o(t)?p||(C&&V(t)&&(c(t)?t.value=C[e]:z(t,C[e])),u.state.value[n][e]=t):typeof t==`function`&&(A[e]=O(t,e),h.actions[e]=t)}return H(k,A),H(e(k),A),Object.defineProperty(k,`$state`,{get:()=>u.state.value[n],set:e=>{T(t=>{H(t,e)})}}),u._p.forEach(e=>{H(k,m.run(()=>e({store:k,app:u._a,pinia:u,options:h})))}),C&&p&&i.hydrate&&i.hydrate(k.$state,C),v=!0,y=!0,k}function K(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=u();return n||=o?m(v,null):null,n&&_(n),n=g,n._s.has(e)||(i?G(e,t,r,n):W(e,r,n)),n._s.get(e)}return a.$id=e,a}function q(e,t){if(e==null)return;let n=e;for(let e=0;e<t.length;e++){if(n===void 0||n[t[e]]===void 0)return;if(n===null||n[t[e]]===null)return null;n=n[t[e]]}return n}function J(e,t,n){if(n.length===0)return t;let r=n[0];return n.length>1&&(t=J(typeof e!=`object`||!e||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function Y(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);let n={};for(let t in e)n[t]=e[t];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);let n={};for(let t in e)n[t]=e[t];return n}return J(e,Y(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function X(e,t){return t.map(e=>e.split(`.`)).map(t=>[t,q(e,t)]).filter(e=>e[1]!==void 0).reduce((e,t)=>J(e,t[1],t[0]),{})}function Z(e,t){return t.map(e=>e.split(`.`)).reduce((e,t)=>Y(e,t),e)}function Q(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o,beforeHydrate:s,afterHydrate:c},l,u=!0){try{u&&s?.(l);let i=t.getItem(r);if(i){let t=n.deserialize(i),r=a?X(t,a):t,s=o?Z(r,o):r;e.$patch(s)}u&&c?.(l)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function $(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o}){try{let i=a?X(e,a):e,s=o?Z(i,o):i,c=n.serialize(s);t.setItem(r,c)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function te(e,t){return typeof e==`function`?e(t):typeof e==`string`?e:t}function ne(e,t,n){let{pinia:r,store:i,options:{persist:a=n}}=e;if(!a)return;if(!(i.$id in r.state.value)){let e=r._s.get(i.$id.replace(`__hot:`,``));e&&Promise.resolve().then(()=>e.$persist());return}let o=(Array.isArray(a)?a:a===!0?[{}]:[a]).map(t);i.$hydrate=({runHooks:t=!0}={})=>{o.forEach(n=>{Q(i,n,e,t)})},i.$persist=()=>{o.forEach(e=>{$(i.$state,e)})},o.forEach(t=>{Q(i,t,e),i.$subscribe((e,n)=>$(n,t),{detached:!0})})}function re(e={}){return function(t){ne(t,n=>{let r=te(n.key,t.store.$id);return{key:(e.key?e.key:e=>e)(r),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:e=>JSON.stringify(e),deserialize:e=>JSON.parse(e)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate??e.beforeHydrate,afterHydrate:n.afterHydrate??e.afterHydrate,pick:n.pick,omit:n.omit}},e.auto??!1)}}var ie=re();export{M as n,K as r,ie as t};