e instanceof zt?e.toJSON():e;function Xn(e,t){t=t||{};const n={};function s(c,u,h){return $.isPlainObject(c)&&$.isPlainObject(u)?$.merge.call({caseless:h},c,u):$.isPlainObject(u)?$.merge({},u):$.isArray(u)?u.slice():u}function r(c,u,h){if($.isUndefined(u)){if(!$.isUndefined(c))return s(void 0,c,h)}else return s(c,u,h)}function i(c,u){if(!$.isUndefined(u))return s(void 0,u)}function o(c,u){if($.isUndefined(u)){if(!$.isUndefined(c))return s(void 0,c)}else return s(void 0,u)}function a(c,u,h){if(h in t)return s(c,u);if(h in e)return s(void 0,c)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u)=>r(Oa(c),Oa(u),!0)};return $.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const h=l[u]||r,p=h(e[u],t[u],u);$.isUndefined(p)&&h!==a||(n[u]=p)}),n}const rf="1.2.1",yo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yo[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Ia={};yo.transitional=function(t,n,s){function r(i,o){return"[Axios v"+rf+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(t===!1)throw new _e(r(o," has been removed"+(n?" in "+n:"")),_e.ERR_DEPRECATED);return n&&!Ia[o]&&(Ia[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};function cg(e,t,n){if(typeof e!="object")throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new _e("option "+i+" must be "+l,_e.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _e("Unknown option "+i,_e.ERR_BAD_OPTION)}}const bi={assertOptions:cg,validators:yo},Qt=bi.validators;class mr{constructor(t){this.defaults=t,this.interceptors={request:new Aa,response:new Aa}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xn(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&bi.assertOptions(s,{silentJSONParsing:Qt.transitional(Qt.boolean),forcedJSONParsing:Qt.transitional(Qt.boolean),clarifyTimeoutError:Qt.transitional(Qt.boolean)},!1),r!==void 0&&bi.assertOptions(r,{encode:Qt.function,serialize:Qt.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&$.merge(i.common,i[n.method]),o&&$.forEach(["delete","get","head","post","put","patch","common"],E=>{delete i[E]}),n.headers=zt.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,h=0,p;if(!l){const E=[Ca.bind(this),void 0];for(E.unshift.apply(E,a),E.push.apply(E,c),p=E.length,u=Promise.resolve(n);h{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,a){s.reason||(s.reason=new Hs(i,o,a),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bo(function(r){t=r}),cancel:t}}}const ug=bo;function fg(e){return function(n){return e.apply(null,n)}}function dg(e){return $.isObject(e)&&e.isAxiosError===!0}function of(e){const t=new ar(e),n=xu(ar.prototype.request,t);return $.extend(n,ar.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return of(Xn(e,r))},n}const qe=of(_o);qe.Axios=ar;qe.CanceledError=Hs;qe.CancelToken=ug;qe.isCancel=nf;qe.VERSION=rf;qe.toFormData=Or;qe.AxiosError=_e;qe.Cancel=qe.CanceledError;qe.all=function(t){return Promise.all(t)};qe.spread=fg;qe.isAxiosError=dg;qe.mergeConfig=Xn;qe.AxiosHeaders=zt;qe.formToJSON=e=>tf($.isHTMLForm(e)?new FormData(e):e);qe.default=qe;const ct=qe;var hg=!1;let af;const Dr=e=>af=e,lf=Symbol();function vi(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var vs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(vs||(vs={}));function pg(){const e=zi(!0),t=e.run(()=>Se({}));let n=[],s=[];const r=Gn({install(i){Dr(r),r._a=i,i.provide(lf,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return!this._a&&!hg?s.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const cf=()=>{};function Ra(e,t,n,s=cf){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&Ad()&&kd(r),r}function Pn(e,...t){e.slice().forEach(n=>{n(...t)})}function Si(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];vi(r)&&vi(s)&&e.hasOwnProperty(n)&&!Pe(s)&&!un(s)?e[n]=Si(r,s):e[n]=s}return e}const mg=Symbol();function gg(e){return!vi(e)||!e.hasOwnProperty(mg)}const{assign:rn}=Object;function _g(e){return!!(Pe(e)&&e.effect)}function yg(e,t,n,s){const{state:r,actions:i,getters:o}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=r?r():{});const u=th(n.state.value[e]);return rn(u,i,Object.keys(o||{}).reduce((h,p)=>(h[p]=Gn(Te(()=>{Dr(n);const b=n._s.get(e);return o[p].call(b,b)})),h),{}))}return l=uf(e,c,t,n,s,!0),l.$reset=function(){const h=r?r():{};this.$patch(p=>{rn(p,h)})},l}function uf(e,t,n={},s,r,i){let o;const a=rn({actions:{}},n),l={deep:!0};let c,u,h=Gn([]),p=Gn([]),b;const E=s.state.value[e];!i&&!E&&(s.state.value[e]={}),Se({});let v;function I(M){let x;c=u=!1,typeof M=="function"?(M(s.state.value[e]),x={type:vs.patchFunction,storeId:e,events:b}):(Si(s.state.value[e],M),x={type:vs.patchObject,payload:M,storeId:e,events:b});const G=v=Symbol();eo().then(()=>{v===G&&(c=!0)}),u=!0,Pn(h,x,s.state.value[e])}const _=cf;function S(){o.stop(),h=[],p=[],s._s.delete(e)}function A(M,x){return function(){Dr(s);const G=Array.from(arguments),Z=[],ne=[];function W(Ne){Z.push(Ne)}function ae(Ne){ne.push(Ne)}Pn(p,{args:G,name:M,store:L,after:W,onError:ae});let we;try{we=x.apply(this&&this.$id===e?this:L,G)}catch(Ne){throw Pn(ne,Ne),Ne}return we instanceof Promise?we.then(Ne=>(Pn(Z,Ne),Ne)).catch(Ne=>(Pn(ne,Ne),Promise.reject(Ne))):(Pn(Z,we),we)}}const w={_p:s,$id:e,$onAction:Ra.bind(null,p),$patch:I,$reset:_,$subscribe(M,x={}){const G=Ra(h,M,x.detached,()=>Z()),Z=o.run(()=>gt(()=>s.state.value[e],ne=>{(x.flush==="sync"?u:c)&&M({storeId:e,type:vs.direct,events:b},ne)},rn({},l,x)));return G},$dispose:S},L=yt(w);s._s.set(e,L);const U=s._e.run(()=>(o=zi(),o.run(()=>t())));for(const M in U){const x=U[M];if(Pe(x)&&!_g(x)||un(x))i||(E&&gg(x)&&(Pe(x)?x.value=E[M]:Si(x,E[M])),s.state.value[e][M]=x);else if(typeof x=="function"){const G=A(M,x);U[M]=G,a.actions[M]=x}}return rn(L,U),rn(ye(L),U),Object.defineProperty(L,"$state",{get:()=>s.state.value[e],set:M=>{I(x=>{rn(x,M)})}}),s._p.forEach(M=>{rn(L,o.run(()=>M({store:L,app:s._a,pinia:s,options:a})))}),E&&i&&n.hydrate&&n.hydrate(L.$state,E),c=!0,u=!0,L}function bg(e,t,n){let s,r;const i=typeof t=="function";typeof e=="string"?(s=e,r=i?n:t):(r=e,s=e.id);function o(a,l){const c=Gt();return a=a||c&&st(lf,null),a&&Dr(a),a=af,a._s.has(s)||(i?uf(s,t,r,a):yg(s,r,a)),a._s.get(s)}return o.$id=s,o}const Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const lr=Object.create(null);Object.keys(Ut).forEach(e=>{lr[Ut[e]]=e});const vg={type:"error",data:"parser error"},Sg=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Eg=typeof ArrayBuffer=="function",wg=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ff=({type:e,data:t},n,s)=>Sg&&t instanceof Blob?n?s(t):Da(t,s):Eg&&(t instanceof ArrayBuffer||wg(t))?n?s(t):Da(new Blob([t]),s):s(Ut[e]+(t||"")),Da=(e,t)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];t("b"+s)},n.readAsDataURL(e)},$a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_s=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<$a.length;e++)_s[$a.charCodeAt(e)]=e;const Tg=e=>{let t=e.length*.75,n=e.length,s,r=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(s=0;s>4,u[r++]=(o&15)<<4|a>>2,u[r++]=(a&3)<<6|l&63;return c},Ag=typeof ArrayBuffer=="function",df=(e,t)=>{if(typeof e!="string")return{type:"message",data:hf(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:kg(e.substring(1),t)}:lr[n]?e.length>1?{type:lr[n],data:e.substring(1)}:{type:lr[n]}:vg},kg=(e,t)=>{if(Ag){const n=Tg(e);return hf(n,t)}else return{base64:!0,data:e}},hf=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},pf=String.fromCharCode(30),Lg=(e,t)=>{const n=e.length,s=new Array(n);let r=0;e.forEach((i,o)=>{ff(i,!1,a=>{s[o]=a,++r===n&&t(s.join(pf))})})},Ng=(e,t)=>{const n=e.split(pf),s=[];for(let r=0;rtypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function gf(e,...t){return t.reduce((n,s)=>(e.hasOwnProperty(s)&&(n[s]=e[s]),n),{})}const Og=setTimeout,Ig=clearTimeout;function $r(e,t){t.useNativeTimers?(e.setTimeoutFn=Og.bind(an),e.clearTimeoutFn=Ig.bind(an)):(e.setTimeoutFn=setTimeout.bind(an),e.clearTimeoutFn=clearTimeout.bind(an))}const Rg=1.33;function Dg(e){return typeof e=="string"?$g(e):Math.ceil((e.byteLength||e.size)*Rg)}function $g(e){let t=0,n=0;for(let s=0,r=e.length;s=57344?n+=3:(s++,n+=4);return n}class Pg extends Error{constructor(t,n,s){super(t),this.description=n,this.context=s,this.type="TransportError"}}class _f extends xe{constructor(t){super(),this.writable=!1,$r(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,s){return super.emitReserved("error",new Pg(t,n,s)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=df(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const yf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ei=64,Fg={};let Pa=0,Xs=0,Fa;function Ma(e){let t="";do t=yf[e%Ei]+t,e=Math.floor(e/Ei);while(e>0);return t}function bf(){const e=Ma(+new Date);return e!==Fa?(Pa=0,Fa=e):e+"."+Ma(Pa++)}for(;Xs{this.readyState="paused",t()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Ng(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Lg(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let s="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=bf()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(s=":"+this.opts.port);const r=vf(t),i=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Mt(this.uri(),t)}doWrite(t,n){const s=this.request({method:"POST",data:t});s.on("success",n),s.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=t}}class Mt extends xe{constructor(t,n){super(),$r(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=gf(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Ef(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this.opts.extraHeaders[s])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(s){this.setTimeoutFn(()=>{this.onError(s)},0);return}typeof document<"u"&&(this.index=Mt.requestsCount++,Mt.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Ug,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Mt.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Mt.requestsCount=0;Mt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ba);else if(typeof addEventListener=="function"){const e="onpagehide"in an?"pagehide":"unload";addEventListener(e,Ba,!1)}}function Ba(){for(let e in Mt.requests)Mt.requests.hasOwnProperty(e)&&Mt.requests[e].abort()}const wf=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Qs=an.WebSocket||an.MozWebSocket,Ua=!0,Hg="arraybuffer",ja=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Vg extends _f{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,s=ja?{}:gf(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=Ua&&!ja?n?new Qs(t,n):new Qs(t):new Qs(t,n,s)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType||Hg,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const o={};try{Ua&&this.ws.send(i)}catch{}r&&wf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let s="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(s=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=bf()),this.supportsBinary||(t.b64=1);const r=vf(t),i=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+s+this.opts.path+(r.length?"?"+r:"")}check(){return!!Qs}}const Wg={websocket:Vg,polling:xg},zg=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Kg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wi(e){const t=e,n=e.indexOf("["),s=e.indexOf("]");n!=-1&&s!=-1&&(e=e.substring(0,n)+e.substring(n,s).replace(/:/g,";")+e.substring(s,e.length));let r=zg.exec(e||""),i={},o=14;for(;o--;)i[Kg[o]]=r[o]||"";return n!=-1&&s!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Yg(i,i.path),i.queryKey=Gg(i,i.query),i}function Yg(e,t){const n=/\/{2,9}/g,s=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Gg(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,i){r&&(n[r]=i)}),n}let Tn=class extends xe{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=wi(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=wi(n.host).host),$r(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Mg(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=mf,n.transport=t,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Wg[t](s)}open(){let t;if(this.opts.rememberUpgrade&&Tn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),s=!1;Tn.priorWebsocketSuccess=!1;const r=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!s)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Tn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){s||(s=!0,u(),n.close(),n=null)}const o=h=>{const p=new Error("probe error: "+h);p.transport=n.name,i(),this.emitReserved("upgradeError",p)};function a(){o("transport closed")}function l(){o("socket closed")}function c(h){n&&h.name!==n.name&&i()}const u=()=>{n.removeListener("open",r),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",r),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",Tn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this.maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}write(t,n,s){return this.sendPacket("message",t,n,s),this}send(t,n,s){return this.sendPacket("message",t,n,s),this}sendPacket(t,n,s,r){if(typeof n=="function"&&(r=n,n=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const i={type:t,data:n,options:s};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}onError(t){Tn.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let s=0;const r=t.length;for(;stypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Tf=Object.prototype.toString,Xg=typeof Blob=="function"||typeof Blob<"u"&&Tf.call(Blob)==="[object BlobConstructor]",Qg=typeof File=="function"||typeof File<"u"&&Tf.call(File)==="[object FileConstructor]";function vo(e){return Jg&&(e instanceof ArrayBuffer||Zg(e))||Xg&&e instanceof Blob||Qg&&e instanceof File}function cr(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,s=e.length;n=0&&e.num0;case pe.ACK:case pe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class r_{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=t_(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const i_=Object.freeze(Object.defineProperty({__proto__:null,protocol:n_,get PacketType(){return pe},Encoder:s_,Decoder:So},Symbol.toStringTag,{value:"Module"}));function St(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const o_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Af extends xe{constructor(t,n,s){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[St(t,"open",this.onopen.bind(this)),St(t,"packet",this.onpacket.bind(this)),St(t,"error",this.onerror.bind(this)),St(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(o_.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const s={type:pe.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),s.id=o}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){const s=this.flags.timeout;if(s===void 0){this.acks[t]=n;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let i=0;i{this.io.clearTimeoutFn(r),n.apply(this,[null,...i])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:pe.CONNECT,data:t})}):this.packet({type:pe.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case pe.CONNECT:if(t.data&&t.data.sid){const r=t.data.sid;this.onconnect(r)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case pe.EVENT:case pe.BINARY_EVENT:this.onevent(t);break;case pe.ACK:case pe.BINARY_ACK:this.onack(t);break;case pe.DISCONNECT:this.ondisconnect();break;case pe.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let s=!1;return function(...r){s||(s=!0,n.packet({type:pe.ACK,id:t,data:r}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:pe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let s=0;s0&&e.jitter<=1?e.jitter:0,this.attempts=0}as.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};as.prototype.reset=function(){this.attempts=0};as.prototype.setMin=function(e){this.ms=e};as.prototype.setMax=function(e){this.max=e};as.prototype.setJitter=function(e){this.jitter=e};class ki extends xe{constructor(t,n){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,$r(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new as({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const r=n.parser||i_;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Tn(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=St(n,"open",function(){s.onopen(),t&&t()}),i=St(n,"error",o=>{s.cleanup(),s._readyState="closed",this.emitReserved("error",o),t?t(o):s.maybeReconnectOnOpen()});if(this._timeout!==!1){const o=this._timeout;o===0&&r();const a=this.setTimeoutFn(()=>{r(),n.close(),n.emit("error",new Error("timeout"))},o);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(r),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(St(t,"ping",this.onping.bind(this)),St(t,"data",this.ondata.bind(this)),St(t,"error",this.onerror.bind(this)),St(t,"close",this.onclose.bind(this)),St(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){wf(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let s=this.nsps[t];return s||(s=new Af(this,t,n),this.nsps[t]=s),s}_destroy(t){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ds={};function ur(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=qg(e,t.path||"/socket.io"),s=n.source,r=n.id,i=n.path,o=ds[r]&&i in ds[r].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new ki(s,t):(ds[r]||(ds[r]=new ki(s,t)),l=ds[r]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(ur,{Manager:ki,Socket:Af,io:ur,connect:ur});const kt={stacjownikAPI:"https://stacjownik-api-b9mrc.ondigitalocean.app",stacjownikAPIDev:"localhost:3000"},a_=e=>`https://rj.td2.info.pl/dist/img/thumbnails/${e.includes("EN")?e+"rb":e}.png`,l_=e=>{if(!e)return"unknown";if(e==-1)return"not-signed";const t=e[2],n=e[3];switch(t){case 0:return n-Date.now()>21e6?"no-limit":"online";case 1:return"brb";case 2:if(n==0)return"ending";break;case 3:return"no-space"}return"unavailable"},c_=e=>{if(!e)return-2;const t=e[2],n=e[3];switch(t){case 0:case 1:case 3:return n;case 2:if(n==0)return 0;break}return-1},u_=e=>e?e==="NO_SPAWN"?[]:e.split(";").map(t=>{const n=t.split(","),s=n[6]?n[6]:n[0],r=parseInt(n[2]);return{spawnName:s,spawnLength:r}}):[],f_=(e,t,n)=>{let s="",r="",i=-1;return e.terminatesHere&&e.confirmed?(s="terminated",r="Skończył bieg",i=5):!e.terminatesHere&&e.confirmed&&t==n?(s="departed",r="Odprawiony",i=2):!e.terminatesHere&&e.confirmed&&t!=n?(s="departed-away",r="Odjechał",i=4):t==n&&!e.stopped?(s="online",r="Na stacji",i=0):t==n&&e.stopped?(s="stopped",r="Postój",i=1):t!=n&&(s="arriving",r="W drodze",i=3),{stopStatus:s,stopLabel:r,stopStatusID:i}};function xa(e,t,n){var b,E;const s=e.timetableData,r=s.followingStops,i=r[t],o=f_(i,e.currentStationName,n);let a="",l="",c=null,u=null;for(let v=t-1;v>=0;v--)if(/strong|podg/g.test(r[v].stopName)){a=r[v].stopNameRAW.replace(/,.*/g,"");break}for(let v=t+1;v=0;v--){const I=r[v];if(I.arrivalLine!=null&&!/-|_|it|sbl/gi.test(I.arrivalLine)){p=I.arrivalLine,c=((E=r[v-1])==null?void 0:E.departureLine)||null;break}}return{trainNo:e.trainNo,trainId:e.trainId,signal:e.signal,connectedTrack:e.connectedTrack,driverName:e.driverName,driverId:e.driverId,currentStationName:e.currentStationName,currentStationHash:e.currentStationHash,category:s.category,beginsAt:s.followingStops[0].stopNameRAW,terminatesAt:s.followingStops[s.followingStops.length-1].stopNameRAW,nextStationName:l,prevStationName:a,stopInfo:i,stopLabel:o.stopLabel,stopStatus:o.stopStatus,stopStatusID:o.stopStatusID,arrivingLine:p,departureLine:h,nextArrivalLine:u,prevDepartureLine:c}}const Nt=bg("store",{state:()=>({apiData:{},stationList:[],trainList:[],sceneryData:[],lastDispatcherStatuses:[],region:{id:"eu",value:"PL1"},trainCount:0,stationCount:0,webSocket:void 0,dispatcherStatsName:"",dispatcherStatsData:void 0,driverStatsName:"",driverStatsData:void 0,driverStatsStatus:X.Initialized,chosenModalTrainId:void 0,dataStatuses:{connection:X.Loading,sceneries:X.Loading,timetables:X.Loading,dispatchers:X.Loading,trains:X.Loading},currentStatsTab:"daily",blockScroll:!1,listenerLaunched:!1}),actions:{setTrainsOnlineData(){const{trains:e}=this.apiData;if(!e)return[];this.trainList=e.filter(t=>t.region===this.region.id&&(t.online||t.timetable||t.lastSeen>Date.now()-18e4)).map(t=>{const n=t.stockString.split(";"),s=n?n[0]:t.stockString,r=t.timetable;return{trainId:t.driverName+t.trainNo.toString(),trainNo:t.trainNo,mass:t.mass,length:t.length,speed:t.speed,region:t.region,distance:t.distance,signal:t.signal,online:t.online,driverId:t.driverId,driverName:t.driverName,currentStationName:t.currentStationName,currentStationHash:t.currentStationHash,connectedTrack:t.connectedTrack,locoType:s,locoURL:a_(s),cars:n.slice(1),lastSeen:t.lastSeen,isTimeout:t.isTimeout,isSupporter:t.driverIsSupporter,timetableData:r?{timetableId:r.timetableId,SKR:r.SKR,TWR:r.TWR,route:r.route,category:r.category,followingStops:r.stopList,routeDistance:r.stopList[r.stopList.length-1].stopDistance,sceneries:r.sceneries}:void 0}})},getDispatcherStatus(e){const{dispatchers:t}=this.apiData,n=this.lastDispatcherStatuses.find(o=>o.hash===e.stationHash),s=t?t.find(o=>o[0]==e.stationHash&&o[1]==this.region.id)||-1:void 0,r=n&&!t?n.statusTimestamp:c_(s),i=n&&!t?n.statusID:l_(s);return{hash:e.stationHash,statusID:i,statusTimestamp:r}},getScheduledTrains(e,t){const n=t.stationName.toLowerCase();return e==null||e.checkpoints.forEach(s=>s.scheduledTrains.length=0),this.trainList.reduce((s,r)=>{if(!r.timetableData)return s;const i=r.timetableData;if(!i.sceneries.includes(t.stationHash))return s;const o=i.followingStops.findIndex(l=>{const c=l.stopNameRAW.toLowerCase();return!!(n===c||c.includes(n)&&!l.stopName.includes("po.")&&!l.stopName.includes("podg.")||n.includes(c)&&!l.stopName.includes("po.")&&!l.stopName.includes("podg.")||c.includes("podg.")&&c.split(", podg.")[0]&&n.includes(c.split(", podg.")[0])||e&&e.checkpoints&&e.checkpoints.length>0&&e.checkpoints.some(u=>u.checkpointName.toLowerCase().includes(l.stopNameRAW.toLowerCase())))});if(o==-1)return s;const a=xa(r,o,t.stationName);if(e!=null&&e.checkpoints)for(const l of e.checkpoints){const c=i.followingStops.findIndex(h=>h.stopNameRAW.toLowerCase()==l.checkpointName.toLowerCase());if(c==-1)continue;const u=xa(r,c,t.stationName);l.scheduledTrains.push(u)}return s.push(a),s},[])},getStationTrains(e){return this.trainList.filter(t=>(t==null?void 0:t.region)===this.region.id&&t.online&&t.currentStationName===e.stationName).map(t=>({driverName:t.driverName,driverId:t.driverId,trainNo:t.trainNo,trainId:t.trainId}))},setStationsOnlineInfo(){var n;const e=[],t=[];(n=this.apiData.stations)==null||n.forEach(s=>{if(s.region!==this.region.id||!s.isOnline)return;const r=this.stationList.find(c=>c.name===s.stationName);e.push(s.stationName);const i=this.getDispatcherStatus(s);t.push(i);const o=this.getStationTrains(s),a=this.getScheduledTrains(r==null?void 0:r.generalInfo,s),l={name:s.stationName,hash:s.stationHash,region:s.region,maxUsers:s.maxUsers,currentUsers:s.currentUsers,spawns:u_(s.spawnString),dispatcherName:s.dispatcherName,dispatcherRate:s.dispatcherRate,dispatcherId:s.dispatcherId,dispatcherExp:s.dispatcherExp,dispatcherIsSupporter:s.dispatcherIsSupporter,stationTrains:o,statusTimestamp:i.statusTimestamp,statusID:i.statusID,scheduledTrains:a};if(!r){this.stationList.push({name:s.stationName,onlineInfo:l});return}r.onlineInfo={...l},this.stationList.filter(c=>!e.includes(c.name)&&c.onlineInfo).forEach(c=>{c.onlineInfo=void 0})}),this.apiData.dispatchers!=null&&(this.lastDispatcherStatuses=t)},async fetchStationsGeneralInfo(){const e=await(await ct.get(`${kt.stacjownikAPI}/api/getSceneries?timestamp=${Math.floor(Date.now()/18e5)}`)).data;if(!e){this.dataStatuses.sceneries=X.Error;return}this.stationList=e.map(t=>{var n,s;return{name:t.name,generalInfo:{...t,authors:(n=t.authors)==null?void 0:n.split(",").map(r=>r.trim()),routes:((s=t.routes)==null?void 0:s.split(";").filter(r=>r).reduce((r,i)=>{const o=i.split("_")[0],a=o.startsWith("!"),l=a?o.replace("!",""):o,c=i.split("_")[1].split(""),u=c[0]=="2",h=c[1]=="E",p=c[2]=="S",b=!!c[3],E=u?h?"twoWayCatenaryRouteNames":"twoWayNoCatenaryRouteNames":h?"oneWayCatenaryRouteNames":"oneWayNoCatenaryRouteNames";return r[u?"twoWay":"oneWay"].push({name:l,SBL:p,TWB:b,catenary:h,isInternal:a,tracks:u?2:1}),a||r[E].push(l),p&&r.sblRouteNames.push(l),r},{oneWay:[],twoWay:[],sblRouteNames:[],oneWayCatenaryRouteNames:[],oneWayNoCatenaryRouteNames:[],twoWayCatenaryRouteNames:[],twoWayNoCatenaryRouteNames:[]}))||{},checkpoints:t.checkpoints?t.checkpoints.split(";").map(r=>({checkpointName:r,scheduledTrains:[]})):[]}}})},connectToWebsocket(){const e=ur(kt.stacjownikAPI,{transports:["websocket","polling"],rememberUpgrade:!0,reconnection:!0,timeout:1e4});e.on("connect_error",t=>{this.dataStatuses.connection=X.Error,this.webSocket=void 0}),e.on("UPDATE",t=>{this.apiData=t,this.dataStatuses.connection=X.Loaded,this.setOnlineData()}),e.emit("FETCH_DATA",{},t=>{this.apiData=t,this.setOnlineData()}),this.webSocket=e},async connectToAPI(){await this.fetchStationsGeneralInfo(),this.connectToWebsocket()},async changeRegion(e){this.region=e,await this.setOnlineData()},async setOnlineData(){if(!this.apiData.stations){this.dataStatuses.sceneries=X.Error,this.dataStatuses.trains=X.Error,this.dataStatuses.dispatchers=X.Error;return}this.dataStatuses.sceneries=X.Loaded,this.dataStatuses.trains=this.apiData.trains?X.Loaded:X.Warning,this.dataStatuses.dispatchers=this.apiData.dispatchers?X.Loaded:X.Warning,this.setTrainsOnlineData(),this.setStationsOnlineInfo()}}}),d_=Ae({data(){return{tooltipActive:!1,indicator:{status:X.Loading,message:"data-status.S3"},greenLight:!1,greenBlinkLight:!1,redTopLight:!1,orangeLight:!1,redBottomLight:!1}},mounted(){this.setSignalStatus(X.Loading)},setup(){return{dataStatus:Nt().dataStatuses}},watch:{dataStatus:{deep:!0,handler(e){const t=e.connection,n=e.sceneries,s=e.trains,r=e.dispatchers;if(t==X.Error){this.setSignalStatus(t),this.indicator.status=t,this.indicator.message="data-status.S1a-connection";return}if(n==X.Error){this.setSignalStatus(n),this.indicator.status=n,this.indicator.message="data-status.S1a-sceneries";return}if(s==X.Warning){this.setSignalStatus(s),this.indicator.status=s,this.indicator.message="data-status.S5-trains";return}if(r==X.Warning){this.setSignalStatus(r),this.indicator.status=r,this.indicator.message="data-status.S5-dispatchers";return}n==X.Loaded&&(this.setSignalStatus(X.Loaded),this.indicator.status=X.Loaded,this.indicator.message="data-status.S2")}}},methods:{setSignalStatus(e){this.greenLight=!1,this.greenBlinkLight=!1,this.redTopLight=!1,this.orangeLight=!1,this.redBottomLight=!1,e==X.Loaded&&(this.greenLight=!0),e==X.Warning&&(this.orangeLight=!0),e==X.Error&&(this.redTopLight=!0,this.redBottomLight=!0),e==X.Loading&&(this.greenBlinkLight=!0)}}});const Dn=e=>(In("data-v-3d31a48c"),e=e(),Rn(),e),h_={class:"status-indicator"},p_={class:"indicator-content"},m_={id:"status-signal-icon"},g_=Ou('',6),__={key:0,filter:"url(#filter0_d_843_28)"},y_=Dn(()=>y("circle",{cx:"15",cy:"17",r:"7",fill:"#00FF0A"},null,-1)),b_=[y_],v_={key:1,filter:"url(#filter0_d_843_28)"},S_=Dn(()=>y("circle",{cx:"15",cy:"17",r:"7",fill:"#00FF0A"},null,-1)),E_=Dn(()=>y("animate",{attributeType:"XML",attributeName:"opacity",values:"1;0;1",dur:"1s",repeatCount:"indefinite"},null,-1)),w_=[S_,E_],T_={key:2,filter:"url(#filter1_d_843_28)"},A_=Dn(()=>y("circle",{cx:"15",cy:"36",r:"7",fill:"#F40000"},null,-1)),k_=[A_],L_={key:3,filter:"url(#filter2_d_843_28)"},N_=Dn(()=>y("circle",{cx:"15",cy:"55",r:"7",fill:"#FFB800"},null,-1)),C_=[N_],O_={key:4,filter:"url(#filter3_d_843_28)"},I_=Dn(()=>y("circle",{cx:"15",cy:"74",r:"7",fill:"#F40000"},null,-1)),R_=Dn(()=>y("animate",{attributeType:"XML",attributeName:"opacity",values:"1;0;1",dur:"1s",repeatCount:"indefinite"},null,-1)),D_=[I_,R_],$_=Ou('',1),P_=["innerHTML"];function F_(e,t,n,s,r,i){return O(),R("div",h_,[y("div",p_,[(O(),R("svg",{width:"31",viewBox:"0 0 31 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"indicator-svg",onMouseenter:t[0]||(t[0]=()=>e.tooltipActive=!0),onMouseleave:t[1]||(t[1]=()=>e.tooltipActive=!1)},[y("g",m_,[g_,e.greenLight?(O(),R("g",__,b_)):Q("",!0),e.greenBlinkLight?(O(),R("g",v_,w_)):Q("",!0),e.redTopLight?(O(),R("g",T_,k_)):Q("",!0),e.orangeLight?(O(),R("g",L_,C_)):Q("",!0),e.redBottomLight?(O(),R("g",O_,D_)):Q("",!0)]),$_],32)),se(is,{name:"tooltip-anim"},{default:je(()=>[e.tooltipActive?(O(),R("div",{key:0,innerHTML:e.$t(e.indicator.message),class:"indicator-tooltip"},null,8,P_)):Q("",!0)]),_:1})])])}const kf=Fe(d_,[["render",F_],["__scopeId","data-v-3d31a48c"]]),Ha="/assets/icon-2way-block-49d93818.svg",Va="/assets/icon-SBL-f943063d.svg",Wa="/assets/icon-SUP-b8f884de.svg",za="/assets/icon-abandoned-011b110f.svg",Ka="/assets/icon-arrow-asc-21e93faf.svg",Ya="/assets/icon-arrow-desc-fb0d9f71.svg",Ga="/assets/icon-back-c17da045.svg",qa="/assets/icon-clock-dafa8bf3.svg",Ja="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAGKklEQVR4nO2afYgVVRTAfz6WRUREtkVsV3ZIQnQz0VjXWFO4lin0wWaGmpiBxDoYfVAgEiUVkWIhFTlaFKWQVn7RB22UTpiI0Zdsi4SYNWYlYrIsyyLL49Ef5759857z5t33Zp67bvODZXl37px7zpn7ee6BhISEhISEhP8ro6ohVNleCmgA+l3HuhRRVh0wFjjnOlYmDv381MQhRNleDTAfWAS0ATMRpfcCD0QUvwNYClxWttcNHAW+BA67jjUQUXY0ByjbuwV4RCtY73t0AdgPHIoiX/M5kAbuBFr03xNAj7K9vcAO17F+qFR4RUNA2d5iYAPy1bP0Ax8B7wNHCrurHhYTEUeNA8YAtfrxgH6/F7gInA94vwZYAKxCHD7a9/go8JLrWJ3l2lKWA5TttQBbgdt8xT3A68AbrmNd1PXqdZ05wAxgKtCEeY9LA2eBX4Eu4DvgaIH8tcCTQJ3vvW+Ap1zH+snUJiMHKNsbC2zWjaZ0cQbYDmx0Heuisr0ZyHi/GzE6FSQrAhnEGZ8BH7uO1aVsbzzwLPAYOedmgG3ABtex+koJLekAZXtTgC+Ayb7i08Bq4CTwMLAGmG5qSUx0A+8A72nddgHNvuengbtcxzoVJsTkK71NvvF7gPuBlcCfyJC42saj29yqdVgDLAN2+p7fiOgeSmgPULbXDhzQPzO6gRpgOTEtoTGSRj7OANIrsx/3PtexDhZ7qagD9Kz9C7lu1YPM3nGP7bjJIKvJeP37JHBzsU1UmDHt5I+p8SXqDxdS5IwHsaE9rHIx1sel0TCgqC2BDlC2dyvQWjV1rj6t2qYrKNYD7CoqM1QE2nTFJKg3F38hW9WRRD/Q6DpWj78wqAcsZeQZD2LT0sLCIAesrL4uQ8aKwoK8IaBsbwLwD9fGclcJGeB617EuZAsKDb03oGwkkUJszCvwc8/V02XIyLNxcAgo26sF/kVCWSOZPuC6bDjN3wPaiMf4D4CFwA3AXCRYUknsbkC/O1fLWqhlR2UsYiuQf6JTEQWngVWuY+3xlf0BHFO2txsJZI4zlNULLHId63iBrK+V7X2KnP2jnEYVEj3K6wHzA6uas6nA+EG0IR1lyOooMN4vaw+wqQL9/AzamoLBgGOUvX8vEjIrila820BWdzFH+tis26yUVm3zYA+YTrTd32GT+BvwSRx1dFuHDWQVYww6ipV1QEsEYSDxNxN+i6lOOW0WowVyDpgVUZjphGRSL05ZYcyC/CEQBdP3b4qpTjlthr6fdUBzSEUT5ivbawiroDdaV5zGAlii64bJaiD6qtUMkNK3r/UlKpeiFthSos7TyI1xKSbpumFsIXetVin1yvbqRinba0WunuLgFeRGJu0vVLa3FngT84NWBljnOtb2Ajk1wMuUdpApc0Yp21sO7I5JIEgYehcySzcgFxZtoW8U5xjwIfA3ctGxiujD1c+KGuTSMk6aka8UB21U7jwTmlJAYxUbGO40ZlNZSpEuXWXYYaJzQwqzFSB7T3+t0IXoXIp6UwdMRya1Z5CAwnClD9HxFGYbpfoU5qeqJcA8YDbwLsNrWKQRnWYjOppsuAB6U8gydcbwhcXAPmQjMg14C7lwGCr6tQ7TtE77EB1NOAMsS7mOdQ7xmslZHWSZ+xG4A7luagTWAceRDUy1yei21iE3PR1al+8x3yN0A/NcxzrnD4qOQzK8il4lB3AEeNx1rBNaxiTkC9yOrN9x7THOIpuiQ0Cn/mgo25sJvEZ554KDwGrXsXoh+G7wUWQjYxogzSCZGS+6jpU38+qLlhnAFCSw2QBMQO7vR5M70qaBy0gSxgVk5/c7Mpl1+S8ytNypyGT3IObb6z5gvetY2/yFgRkiyvaagFeRia+c/XsnktnZGUcWZ4FOtUjv6tD/y9FrP5I+d7bwYakcoRYkuaAd8wDEeWCW61jnDesboWxvIvAzkmxpQhrp7pvDMklN8wSbgIeQFSNsfc0AC13HihKvC9NjAfAV4V+/GzlA7Qz64oWUnSqrbG8ykrI6D0mKnkIubXWj61gvlCuzzPafA57XPy8j88QJ4FskOGu6pAMxpMv7coDrgJPVSGkPaK8ZuERATnFCQkJCQkJCgin/Ab2LpunaQt5yAAAAAElFTkSuQmCC",Za="/assets/icon-dispatcher-94dba826.svg",Xa="/assets/icon-dolar-2ed22951.svg",Qa="/assets/icon-dollar-a64fa067.svg",el="/assets/icon-en-eb636c9f.jpg",tl="/assets/icon-error-4059b271.svg",nl="/assets/icon-exit-775007bd.svg",sl="/assets/icon-filter2-983b991b.svg",rl="/assets/icon-historyczna-50a241b3.svg",il="/assets/icon-kształtowa-c4ec9301.svg",ol="/assets/icon-legend-e5d9657a.svg",al="/assets/icon-length-de026784.svg",ll="/assets/icon-like-6ad5d073.svg",cl="/assets/icon-lock-02753ec3.svg",ul="/assets/icon-mass-49ddddee.svg",fl="/assets/icon-mieszana-ac1c6cc4.svg",dl="/assets/icon-offline-db86369f.svg",hl="/assets/icon-paypal-0f29d722.svg",pl="/assets/icon-dispatcher-94dba826.svg",ml="/assets/icon-pl-80df7d22.svg",gl="/assets/icon-point-1600e4d1.svg",_l="/assets/icon-real-b3b507f3.svg",yl="/assets/icon-route-02b20c34.svg",bl="/assets/icon-scenery-d5858ec4.svg",vl="/assets/icon-schedule-746a6c5a.svg",Sl="/assets/icon-search-0af70534.svg",El="/assets/icon-select-50e2c950.svg",wl="/assets/icon-signal-1a613006.svg",Tl="/assets/icon-sort-f67e54cf.svg",Al="/assets/icon-spawn-afd1a9d3.svg",kl="/assets/icon-speed-9af526de.svg",Ll="/assets/icon-stats-4ced322d.svg",Nl="/assets/icon-td2-307f2ba1.svg",Cl="/assets/icon-timetable-7819413a.svg",Ol="/assets/icon-train-a8fa003d.svg",Il="/assets/icon-unavailable-5ef4034d.svg",Rl="/assets/icon-unknown-805a2650.svg",Dl="/assets/icon-user-bba7ef0f.svg",$l="/assets/icon-view-84b12121.svg",Pl="/assets/icon-warning-04405453.svg",Fl="/assets/icon-historyczna-50a241b3.svg",M_="/assets/signal-status-indicator-54332b72.svg",B_="/assets/stacjownik-header-logo-e3348deb.svg",U_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAlCAYAAAAHgqbCAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAiWSURBVHja7Jx/bBPnGcc/ts92aKNAmjSJQmBbUiVAtpXOSTXRadOGWTttiP1BMiGhStsfRFu1SdNU2UNaq3ZqdaZbu59sidStdEVrm4otg6lSQJXQmgiGUzIYUzYlXgEDFpDYFBIS49j7w88djnESJzjxbN6vZPl8d7nLPe/7eX6dfRaPx0OaalBSuoel63rIWNbStj0KHFcmUrrHZZkNkBDwM1neAHxZ2UrpHtEbwNX0lemAnAO+L8tPKkCWXiMjIxw7doxgMHg7x62poa6ujqamJurq6pSRlkcv6bp+aj5AlJZJwWCQo0ePzgDDDOOhEKFQCL/fT0tLC5s3b1YGy5OsygT5gWP//v0Eg0Hq6+vRdZ1EImG+/H4/RvPE7/fT09NDIpFQhlOAFL+uX7/OgQMHAPB4PIyMjJDeSXS5XOi6jt/vp7y8nKGhIU6cOEE8HlegKECKW729vdy8eZO2tjZ0XZ9zX5fLRWdnJwAnT55kcnKSeDxOPB5XhlSAFJ9u3LjB8PAw5eXl5sQHOHLkCA0NDVgsFlpaWhgYGDC3tbW14Xa7iUQinD17llgspiD5PwCkBXhMmSf3tQeA2+2mvLwcgHA4THt7O4FAAICBgQE6OjruiCQAFy9eJBqNMj09bdYrSjlT1UIAeQHoUzbLrUKh0IwJD9DV1UU4HKa2tpZt27aZkKSqvr4egEgkwtTUFLdu3TIhUcqZNmVaqdq8y6g1a9Zw/PhxvF4v4XAYt9ttwlBbW8vo6CiAGV0MhcPhpDezWpmamkLTNDRNU4CoGqS41NDQwPbt2wHw+Xxs2bKF7u5unE4npaWlnD592qw7UmVAVFpaSjQaNSOI6motvVQEyQMkO3bsIBAIEAwGqayspLq6mr6+PsbHx2d0rgACgQDd3d3Y7XbKysqYnp424VBSgBSlVq9eTVVVFVNTU0xOTnLw4EHGx8dxu90cPnx4xr7t7e0AVFRU4HA4zKihinSVYhWtLBYLFosFm83GpUuXGB0dxeVyzYAjHA6bLd+ysjIaGxtn/K3FYlGGVIAUseGtVjRN48qVK3fUHQMDAyYcq1atYv369djtdjRNw2azYbVaFSQqxSruCGKz2QCIRqPAzM6V1+slEAhQVVXFhg0bTDDsdntGUJQUIEUHCGBO8nQZNw2bm5ux2+0A2O12HA4HDocDu92OzWZTcKgUq7ghsVqtrF27FoCOjg4zbQoEAlRUVLBixQqsVisOh4OSkhJKSkpwOp1omqaihwLk3tbY2BgTExMz4CgpKcHhcChAFCD3js6fPw9AZ2en2brdtWsXiUSCa9eu4XA4cDqdOJ1OEw6VXuUfkB5lmvzLZrOZYKTXHgqQnOtiNkV6C7d/h/5FZbP8A6Jpmtm5slqtKrVaOtV4vd7dALquv2jWih6P5zngGWWf/OjMmTMcOnQoYxG/detWKisrZ0QQTVONx+WUsnae1dzcTCKRYHBwkAsXLgBQXV1Na2srK1euvAMapfwDEgf+A5QBtWnbQkBEltelbRsGHgKGpLZplLyutoDtMyTvq1Kuu5Lk85M+DnwoNnxIbFOzWEiampqIxWJEo1Gi0SixWCz1ayVTiUTinIxNNl/AWreIa0xXI4XTxBlK+Z8/kvEyFADqM4xnTYYaJAasTQfkD9z+cVSvvO8EnpMB+QWwDxgk+aury8BG4JfA54CfyIB8Dfg7MCbHbSwgOJ4HnpVlowb7IfAq0AHsBx4WON6Xzxtlvx8DXwV83MVjWw0YrFYro6Oju3t6ev66c+fOzn379j0JjAMTwE0gmgmSlAc/rANOZ5kdXAZ+DfiBT8p4PS8T6Kw4yULQh8BnZP4+IXPwJdnWCpQCvwPeEmf2DvBZ4D6gU9Z9xXgultfrXWeAYsnwbF7SPOVbwJ/EY5YD/wb+JSfwCESFHCXMOZr2+Y8SFVpkEr0JfA/4uWw/BTwlXgfgFfG4DnEUv8/gkfdlOG9XIpEY3LNnz6uAE1gBlBgTfNOmTQ/29/cPA5MCR2weQB6Qcx2b41q9wG9JPj2zP8UxGA7yCeDdIhhTj0SGTwGXZN3bsu4ZGdOrQKOu68cWWoNczbBuREg0QtcjwG8k/TgoJBaihjOs+ynwtETKtzNsLwO+lPL5nLz/DfjVLPvfIZ/P1yFw2mTyTwLTMjYJ+a6WAUY2PwIZmwcOJOrvAj4mgOwGXkyzx6SAWoi6KlH9I8ls+oC/ZNpR1/U57ZVtkd5L8qHW30gLz69IhPlnAcPxZ+C7Gdb7Sd4PSoXjTUmxjHx2ItuT+Hy+Xo/H45rDCcWBW/IeMyKa3++/LuumF1CDzKcYsFdSwhoBJt1hfELS7Crg6wU2pmXA54H1wH9ngyOrtGKOFMsAqFvytHczpCGGDgPuAjNiP/M/ucUh3vuu5fP5sk3xLCkvBIhEChgZAZlnHO9Ga4F/pBW+haCHpRSIzbL9vtTx1XU9o7ObrUuxU7xZGDghRc5cPcYfzfGPLMSrxTJ01N6Rc/fnyHBR4GWye6xRdBkH1IDAiBaGPVIjRz5+QnhOas/eHIyxoccAl0TgWIZ5cLd6T2rEuY41AUR0XZ+YDY65Uqw35LWQSRcRL6MtYsK2ygXNZ1Qf8C1pICxETwGvLSQlynm1uHQefrn0eMryp6WQf2GB4z0BfDvF2d0/x77fkebIYlOsUuDG3V50rvrcHwAPAnbx9t/McjIGpHNzKtt5Jud5JKUozmZg9+YTjiLUKWCP2PbyAqLQ/cDrWZ5jr4x3thHl2ZTUtDUXcOQSkHS9BnxBwJmty9AFNCzy+INAsxSXwVn26RJge9V8XjK9J6nSB9y+kZoO0uMku2WRRRx/j4zhy9IISteYjLOL5P2bnGspv2ril38ckn1549GO7+fo+DdItmGflmLr0RwfXyk7BVPG+QGS91aGSd5DypV+IO8bJXVCgIks9cX9bwCnB89gKP8RhQAAAABJRU5ErkJggg==",Ct=Ae({methods:{getIcon(e,t="svg"){return new URL(Object.assign({"../assets/icon-2way-block.svg":Ha,"../assets/icon-SBL.svg":Va,"../assets/icon-SUP.svg":Wa,"../assets/icon-abandoned.svg":za,"../assets/icon-arrow-asc.svg":Ka,"../assets/icon-arrow-desc.svg":Ya,"../assets/icon-back.svg":Ga,"../assets/icon-clock.svg":qa,"../assets/icon-discord.png":Ja,"../assets/icon-dispatcher.svg":Za,"../assets/icon-dolar.svg":Xa,"../assets/icon-dollar.svg":Qa,"../assets/icon-en.jpg":el,"../assets/icon-error.svg":tl,"../assets/icon-exit.svg":nl,"../assets/icon-filter2.svg":sl,"../assets/icon-historyczna.svg":rl,"../assets/icon-kształtowa.svg":il,"../assets/icon-legend.svg":ol,"../assets/icon-length.svg":al,"../assets/icon-like.svg":ll,"../assets/icon-lock.svg":cl,"../assets/icon-mass.svg":ul,"../assets/icon-mieszana.svg":fl,"../assets/icon-offline.svg":dl,"../assets/icon-paypal.svg":hl,"../assets/icon-person.svg":pl,"../assets/icon-pl.svg":ml,"../assets/icon-point.svg":gl,"../assets/icon-real.svg":_l,"../assets/icon-route.svg":yl,"../assets/icon-scenery.svg":bl,"../assets/icon-schedule.svg":vl,"../assets/icon-search.svg":Sl,"../assets/icon-select.svg":El,"../assets/icon-signal.svg":wl,"../assets/icon-sort.svg":Tl,"../assets/icon-spawn.svg":Al,"../assets/icon-speed.svg":kl,"../assets/icon-stats.svg":Ll,"../assets/icon-td2.svg":Nl,"../assets/icon-timetable.svg":Cl,"../assets/icon-train.svg":Ol,"../assets/icon-unavailable.svg":Il,"../assets/icon-unknown.svg":Rl,"../assets/icon-user.svg":Dl,"../assets/icon-view.svg":$l,"../assets/icon-warning.svg":Pl,"../assets/icon-współczesna.svg":Fl})[`../assets/icon-${e}.${t}`],self.location).href},getImage(e){return new URL(Object.assign({"../assets/icon-2way-block.svg":Ha,"../assets/icon-SBL.svg":Va,"../assets/icon-SUP.svg":Wa,"../assets/icon-abandoned.svg":za,"../assets/icon-arrow-asc.svg":Ka,"../assets/icon-arrow-desc.svg":Ya,"../assets/icon-back.svg":Ga,"../assets/icon-clock.svg":qa,"../assets/icon-discord.png":Ja,"../assets/icon-dispatcher.svg":Za,"../assets/icon-dolar.svg":Xa,"../assets/icon-dollar.svg":Qa,"../assets/icon-en.jpg":el,"../assets/icon-error.svg":tl,"../assets/icon-exit.svg":nl,"../assets/icon-filter2.svg":sl,"../assets/icon-historyczna.svg":rl,"../assets/icon-kształtowa.svg":il,"../assets/icon-legend.svg":ol,"../assets/icon-length.svg":al,"../assets/icon-like.svg":ll,"../assets/icon-lock.svg":cl,"../assets/icon-mass.svg":ul,"../assets/icon-mieszana.svg":fl,"../assets/icon-offline.svg":dl,"../assets/icon-paypal.svg":hl,"../assets/icon-person.svg":pl,"../assets/icon-pl.svg":ml,"../assets/icon-point.svg":gl,"../assets/icon-real.svg":_l,"../assets/icon-route.svg":yl,"../assets/icon-scenery.svg":bl,"../assets/icon-schedule.svg":vl,"../assets/icon-search.svg":Sl,"../assets/icon-select.svg":El,"../assets/icon-signal.svg":wl,"../assets/icon-sort.svg":Tl,"../assets/icon-spawn.svg":Al,"../assets/icon-speed.svg":kl,"../assets/icon-stats.svg":Ll,"../assets/icon-td2.svg":Nl,"../assets/icon-timetable.svg":Cl,"../assets/icon-train.svg":Ol,"../assets/icon-unavailable.svg":Il,"../assets/icon-unknown.svg":Rl,"../assets/icon-user.svg":Dl,"../assets/icon-view.svg":$l,"../assets/icon-warning.svg":Pl,"../assets/icon-współczesna.svg":Fl,"../assets/signal-status-indicator.svg":M_,"../assets/stacjownik-header-logo.svg":B_,"../assets/unknown.png":U_})[`../assets/${e}`],self.location).href}}}),j_=Ae({emits:["selected"],mixins:[Ct],props:{itemList:{type:Array,required:!0},defaultItemIndex:{type:Number,default:0},prefix:{type:String,default:""}},setup(e){let t=Se(null),n=Se(null),s=Se(document.activeElement),r=Se(!1),i=Se(e.itemList[e.defaultItemIndex]);return{computedSelectedItem:Te(()=>e.itemList.find(a=>a.id===i.value.id)||e.itemList[e.defaultItemIndex]),listOpen:r,selectedItem:i,listRef:t,buttonRef:n,activeEl:s}},methods:{selectOption(e){this.selectedItem=e,this.listOpen=!1,this.$emit("selected",e)},toggleBox(e){this.listOpen=!this.listOpen,this.listOpen||e.target.blur()},clickedOutside(){var e;this.listOpen=!1,(e=this.buttonRef)==null||e.blur()}}});const x_={class:"select-box"},H_={class:"select-box_content"},V_=["for"],W_=["id","onClick"],z_=["innerHTML"],K_={class:"arrow"},Y_=["src"];function G_(e,t,n,s,r,i){return O(),R("div",x_,[y("div",H_,[y("button",{class:"selected",onClick:t[0]||(t[0]=(...o)=>e.toggleBox&&e.toggleBox(...o))},[y("span",null,N(e.computedSelectedItem.selectedValue||e.computedSelectedItem.value),1)]),y("ul",{class:"options",ref:o=>e.listRef=o},[(O(!0),R(Le,null,nt(e.itemList,(o,a)=>(O(),R("li",{class:"option",key:o.id},[se(is,{name:"unfold",style:zn(`
- --delay-in: ${a*55}ms;
- --delay-out: ${(e.itemList.length-1-a)*55}ms`)},{default:je(()=>[e.listOpen?(O(),R("label",{key:0,for:o.id},[y("input",{type:"button",id:o.id,name:"select-box",onClick:l=>e.selectOption(o)},null,8,W_),y("span",{style:zn(e.computedSelectedItem.id==o.id?"color: gold;":""),innerHTML:o.value},null,12,z_)],8,V_)):Q("",!0)]),_:2},1032,["style"])]))),128))],512)]),y("div",K_,[y("img",{src:e.listOpen?e.getIcon("arrow-asc"):e.getIcon("arrow-desc"),alt:"arrow-icon"},null,8,Y_)])])}const Eo=Fe(j_,[["render",G_],["__scopeId","data-v-0aaa9c28"]]),wo=Ae({data(){return{store:Nt()}},computed:{chosenTrain(){return this.store.trainList.find(e=>e.trainId==this.store.chosenModalTrainId)}},methods:{selectModalTrain(e){this.store.chosenModalTrainId=e,document.body.classList.add("no-scroll")},closeModal(){this.store.chosenModalTrainId=void 0,setTimeout(()=>{document.body.classList.remove("no-scroll")},150)}}}),Lf=Ae({mixins:[Ct],data:()=>({STATS:{main:[{name:"speed",unit:"km/h"},{name:"length",unit:"m"},{name:"mass",unit:"t",multiplier:.001}],position:[{name:"scenery",prop:"currentStationName"},{name:"route",prop:"connectedTrack"},{name:"signal",prop:"signal"},{name:"distance",prop:"distance",unit:"m"}]}}),methods:{lastSeenMessage(e){const t=Date.now()-e,n=Math.floor(t/6e4);return n<1?this.$t("trains.last-seen-now"):n<2?this.$t("trains.last-seen-min"):this.$t("trains.last-seen-ago",{minutes:n})},displayTrainPosition(e){let t="";return t+=this.$t("trains.current-scenery")+" ",e.currentStationHash?t+=e.currentStationName+" ":t+=e.currentStationName.replace(/.[a-zA-Z0-9]+.sc/,"")+" (offline) ",e.signal&&(t+=this.$t("trains.current-signal")+" "+e.signal+" "),e.connectedTrack&&(t+=this.$t("trains.current-track")+" "+e.connectedTrack+" "),e.distance&&(t+=`(${this.displayDistance(e.distance)})`),t.charAt(0).toUpperCase()+t.slice(1)},displayStopList(e){return e?e.reduce((t,n,s)=>(n.stopType.includes("ph")&&!n.stopNameRAW.includes("po.")?t.push(`${n.stopName}`):s>0&&s${n.stopName}`),t),[]).join(" > "):""},currentDistance(e){var t;return((t=e.filter(n=>n.confirmed).slice(-1)[0])==null?void 0:t.stopDistance)||0},confirmedPercentage(e){return Number((e.filter(t=>t.confirmed).length/e.length*100).toFixed(0))},currentDelay(e){var n;const t=((n=e.find((s,r)=>r==0&&!s.confirmed||r>0&&e[r-1].confirmed&&!s.confirmed))==null?void 0:n.departureDelay)||0;return t>0?`${this.$t("trains.delayed")} ${t} min`:t<0?`${this.$t("trains.preponed")} ${t} min`:this.$t("trains.on-time")},displayLocoInfo(e){return e.includes("EN")?`${this.$t("trains.EZT")}`:e.includes("SN")?`${this.$t("trains.SZT")}`:e.startsWith("E")?`${this.$t("trains.loco-electric")}`:e.startsWith("S")?`${this.$t("trains.loco-diesel")}`:""},getSceneriesWithComments(e){const t=(e==null?void 0:e.followingStops.reduce((s,r,i)=>(r.comments&&s.push(r.stopNameRAW),s),[]))||[],n=t.length-10;return t.slice(0,10).join(", ")+(n>0?`... (+${n})`:"")},displayDistance(e){return e<1e3?`${e}m`:`${(e/1e3).toPrecision(2)}km`},onImageError(e){const t=e.target;t.src=this.getImage("unknown.png")}}}),q_=Ae({props:{train:{type:Object,required:!0},extended:{type:Boolean,default:!0}},mixins:[Lf,Ct]});const Nf=e=>(In("data-v-92a6c2b3"),e=e(),Rn(),e),J_={class:"train-info",tabindex:"0"},Z_={class:"train-route"},X_={class:"train_general"},Q_={key:0,class:"timetable-id"},ey={class:"timetable_warnings"},ty={key:0,class:"train-badge twr"},ny={key:1,class:"train-badge skr"},sy={key:1,class:"timetable-category"},ry={class:"train-number"},iy=["title"],oy={key:0,class:"timetable_route"},ay=["src","title"],ly=Nf(()=>y("hr",{style:{margin:"0.25em 0"}},null,-1)),cy={key:1,class:"timetable_stops"},uy={key:0},fy=["innerHTML"],dy={key:2,class:"timetable_progress",style:{"margin-top":"0.5em"}},hy={class:"timetable_progress-bar"},py=Nf(()=>y("span",{class:"bar-bg"},null,-1)),my={class:"timetable_progress-distance"},gy={class:"text--primary"},_y=["innerHTML"],yy={class:"train-status-badges"},by={key:0,class:"train-badge offline"},vy={key:1,class:"train-badge offline"},Sy={class:"driver_position text--grayed",style:{"margin-top":"0.25em"}},Ey={class:"train-stats"},wy=["src"],Ty={class:"text--grayed"},Ay={key:0},ky={class:"count"},Ly={key:0};function Ny(e,t,n,s,r,i){var o,a;return O(),R("div",J_,[y("section",Z_,[y("div",X_,[y("span",null,[e.train.timetableData?(O(),R("span",Q_,"#"+N(e.train.timetableData.timetableId),1)):Q("",!0),y("span",ey,[(o=e.train.timetableData)!=null&&o.TWR?(O(),R("span",ty,"TWR")):Q("",!0),(a=e.train.timetableData)!=null&&a.SKR?(O(),R("span",ny,"SKR")):Q("",!0)]),e.train.timetableData?(O(),R("strong",sy,N(e.train.timetableData.category),1)):Q("",!0),y("strong",ry," "+N(e.train.trainNo),1),me(" | "),y("span",{class:it(["train-driver",{supporter:e.train.isSupporter}])},N(e.train.driverName),3),e.train.isTimeout?(O(),R("b",{key:2,class:"warning-timeout",title:e.$t("trains.timeout")},"?",8,iy)):Q("",!0)])]),e.train.timetableData?(O(),R("div",oy,[y("strong",null,N(e.train.timetableData.route.replace("|"," - ")),1),e.getSceneriesWithComments(e.train.timetableData).length>0?(O(),R("img",{key:0,class:"image-warning",src:e.getIcon("warning"),title:`${e.$t("trains.timetable-comments")} (${e.getSceneriesWithComments(e.train.timetableData)})`},null,8,ay)):Q("",!0)])):Q("",!0),ly,e.train.timetableData?(O(),R("div",cy,[e.train.timetableData.followingStops.length>2?(O(),R("span",uy,[me(N(e.$t("trains.via-title"))+" ",1),y("span",{innerHTML:e.displayStopList(e.train.timetableData.followingStops)},null,8,fy)])):Q("",!0)])):Q("",!0),e.train.timetableData?(O(),R("div",dy,[y("span",hy,[py,y("span",{class:"bar-fg",style:zn({width:`${Math.floor(e.confirmedPercentage(e.train.timetableData.followingStops))}%`})},null,4)]),y("span",my,[me(" "+N(e.currentDistance(e.train.timetableData.followingStops))+" km / ",1),y("span",gy,N(e.train.timetableData.routeDistance)+" km ",1),me(" | "),y("span",{innerHTML:e.currentDelay(e.train.timetableData.followingStops)},null,8,_y)]),y("div",yy,[e.train.currentStationHash?Q("",!0):(O(),R("div",by,N(e.$t("trains.scenery-offline")),1)),e.train.online?Q("",!0):(O(),R("div",vy,"Offline "+N(e.lastSeenMessage(e.train.lastSeen)),1))])])):Q("",!0),y("div",Sy,N(e.displayTrainPosition(e.train)),1)]),y("section",Ey,[y("div",null,[y("img",{src:e.train.locoURL,loading:"lazy",alt:"Loco image not found",onError:t[0]||(t[0]=(...l)=>e.onImageError&&e.onImageError(...l))},null,40,wy)]),y("div",Ty,[me(N(e.train.locoType)+" ",1),e.train.cars.length>0?(O(),R("span",Ay,[me(" • "+N(e.$t("trains.cars"))+": ",1),y("span",ky,N(e.train.cars.length),1)])):Q("",!0)]),y("div",null,[(O(!0),R(Le,null,nt(e.STATS.main,(l,c)=>(O(),R("span",{key:l.name},[c>0?(O(),R("span",Ly," • ")):Q("",!0),y("span",null,N(`${~~(e.train[l.name]*(l.multiplier||1))}${l.unit}`),1)]))),128))])])])}const Cy=Fe(q_,[["render",Ny],["__scopeId","data-v-92a6c2b3"]]),Vs=Ae({methods:{localeDate(e,t){return new Date(e).toLocaleDateString(t=="pl"?"pl-PL":"en-GB",{weekday:"long",day:"numeric",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},localeDay(e,t){return new Date(e).toLocaleDateString(t=="pl"?"pl-PL":"en-GB",{day:"numeric",month:"2-digit",year:"numeric"})},localeTime(e,t){return new Date(e).toLocaleTimeString(t=="pl"?"pl-PL":"en-GB",{hour:"2-digit",minute:"2-digit"})},timestampToString(e){return e?new Date(e).toLocaleTimeString("pl-PL",{hour:"2-digit",minute:"2-digit"}):""},calculateDuration(e){const t=Math.round(e/6e4),n=Math.floor(t/60),s=t%60;return t>60?this.$t("journal.hours",{hours:n,minutes:s}):this.$t("journal.minutes",{minutes:t})}}}),Oy=Ae({mixins:[Vs],props:{stop:{type:Object,required:!0}},setup(){return{}}});const Iy={class:"stop-date"},Ry={key:0},Dy={key:1},$y={key:0},Py={key:1};function Fy(e,t,n,s,r,i){return O(),R("span",Iy,[e.stop.beginsHere?Q("",!0):(O(),R("span",{key:0,class:it(["date arrival",{delayed:e.stop.arrivalDelay>0&&e.stop.confirmed,preponed:e.stop.arrivalDelay<0&&e.stop.confirmed,"on-time":e.stop.arrivalDelay==0&&e.stop.confirmed}])},[e.stop.arrivalDelay!=0&&e.stop.confirmed?(O(),R("span",Ry,[y("s",null,N(e.timestampToString(e.stop.arrivalTimestamp)),1),me(" "+N(e.timestampToString(e.stop.arrivalRealTimestamp))+" ("+N(e.stop.arrivalDelay>0?"+":"")+N(e.stop.arrivalDelay)+") ",1)])):(O(),R("span",Dy,N(e.timestampToString(e.stop.arrivalTimestamp)),1))],2)),e.stop.stopTime?(O(),R("span",{key:1,class:it(["date stop",e.stop.stopType.replace(", ","-")])},N(e.stop.stopTime)+" "+N(e.stop.stopType==""?"pt":e.stop.stopType),3)):Q("",!0),!e.stop.terminatesHere&&e.stop.stopTime!=0?(O(),R("span",{key:2,class:it(["date departure",{delayed:e.stop.departureDelay>0&&e.stop.confirmed,preponed:e.stop.departureDelay<0&&e.stop.confirmed}])},[e.stop.departureDelay!=0&&e.stop.confirmed?(O(),R("span",$y,[y("s",null,N(e.timestampToString(e.stop.departureTimestamp)),1),me(" "+N(e.timestampToString(e.stop.departureRealTimestamp))+" ("+N(e.stop.departureDelay>0?"+":"")+N(e.stop.departureDelay)+") ",1)])):(O(),R("span",Py,N(e.timestampToString(e.stop.departureTimestamp)),1))],2)):Q("",!0)])}const My=Fe(Oy,[["render",Fy],["__scopeId","data-v-5c6de354"]]),By=Ae({components:{StopDate:My},props:{train:{type:Object,required:!0}},mixins:[Vs,Ct],emits:["click"],setup(e){return{lastConfirmed:Te(()=>e.train.timetableData.followingStops.findIndex((t,n,s)=>{var r,i;return t.confirmed&&!((r=s[n+1])!=null&&r.confirmed)&&!((i=s[n+1])!=null&&i.stopped)})),activeMinorStops:Te(()=>{const t=e.train.timetableData.followingStops.findIndex((s,r,i)=>{var o;return s.confirmed&&!((o=i[r+1])!=null&&o.confirmed)}),n=[];if(t+1>=e.train.timetableData.followingStops.length)return n;for(let s=t+1;s0,sbl:/sbl/gi.test(e.stopName),[e.stopType.replaceAll(", ","-")]:e.stopType.match(new RegExp("ph|pm|pt"))&&!e.confirmed&&!e.beginsHere,"minor-stop-active":this.activeMinorStops.includes(t),"last-confirmed":t==this.lastConfirmed&&!e.terminatesHere}},onImageError(e){const t=e.target;t.src=this.getImage("unknown.png")}}});const Pr=e=>(In("data-v-d8665452"),e=e(),Rn(),e),Uy={class:"train-stock"},jy={class:"stock-list"},xy=["src"],Hy={key:0},Vy=["src"],Wy={key:1},zy=["src"],Ky={key:2},Yy=["src"],Gy=["src"],qy={key:0,class:"schedule-wrapper"},Jy={class:"stop_list"},Zy={class:"stop_info"},Xy=Pr(()=>y("div",{class:"indicator"},null,-1)),Qy=Pr(()=>y("div",{class:"progress-bar"},null,-1)),eb=Pr(()=>y("div",{class:"stop-bar"},null,-1)),tb={key:0,class:"distance"},nb=["innerHTML"],sb={key:0,class:"stop_line"},rb=Pr(()=>y("div",{class:"progress-bar"},null,-1)),ib={key:0,style:{color:"salmon"}},ob=["innerHTML"],ab={key:1},lb={key:2},cb={key:1,class:"stop_line"},ub={key:0,style:{color:"salmon"}},fb=["innerHTML"];function db(e,t,n,s,r,i){const o=De("StopDate");return O(),R("div",{class:"train-schedule",onClick:t[5]||(t[5]=(...a)=>e.toggleShowState&&e.toggleShowState(...a))},[y("div",Uy,[y("ul",jy,[y("li",null,[y("img",{class:"train-image",src:e.train.locoURL,alt:"loco",onError:t[0]||(t[0]=(...a)=>e.onImageError&&e.onImageError(...a))},null,40,xy),y("div",null,N(e.train.locoType),1)]),e.train.locoType.startsWith("EN")?(O(),R("li",Hy,[y("img",{src:e.train.locoURL.replace("rb","s"),onError:t[1]||(t[1]=(...a)=>e.onImageError&&e.onImageError(...a)),alt:""},null,40,Vy),y("div",null,N(e.train.locoType)+"S",1)])):Q("",!0),e.train.locoType.startsWith("EN71")?(O(),R("li",Wy,[y("img",{src:e.train.locoURL.replace("rb","s"),onError:t[2]||(t[2]=(...a)=>e.onImageError&&e.onImageError(...a)),alt:""},null,40,zy),y("div",null,N(e.train.locoType)+"S",1)])):Q("",!0),e.train.locoType.startsWith("EN")?(O(),R("li",Ky,[y("img",{src:e.train.locoURL.replace("rb","ra"),onError:t[3]||(t[3]=(...a)=>e.onImageError&&e.onImageError(...a)),alt:""},null,40,Yy),y("div",null,N(e.train.locoType)+"RA",1)])):Q("",!0),(O(!0),R(Le,null,nt(e.train.cars,(a,l)=>(O(),R("li",{key:l},[y("img",{src:`https://rj.td2.info.pl/dist/img/thumbnails/${a.split(":")[0]}.png`,onError:t[4]||(t[4]=(...c)=>e.onImageError&&e.onImageError(...c)),alt:"car"},null,40,Gy),y("div",null,N(a.replace(/_/g," ").split(":")[0]),1)]))),128))])]),e.train.timetableData?(O(),R("div",qy,[y("ul",Jy,[(O(!0),R(Le,null,nt(e.train.timetableData.followingStops,(a,l)=>(O(),R("li",{key:l,class:it(["stop",e.addClasses(a,l)])},[y("span",Zy,[Xy,Qy,eb,a.stopDistance?(O(),R("span",tb,N(Math.floor(a.stopDistance)),1)):Q("",!0),y("span",{class:"stop-name",innerHTML:a.stopName},null,8,nb),se(o,{stop:a},null,8,["stop"])]),l{e.focus()})},methods:{handleContentScroll(e){const t=this.$refs.trainInfo.$el.getBoundingClientRect().height,n=e.target.scrollTop;this.isTopBarVisible=n>t}}});const mb={class:"modal_content",ref:"content",tabindex:"0"},gb=["src"];function _b(e,t,n,s,r,i){const o=De("TrainInfo"),a=De("TrainSchedule");return e.chosenTrain?(O(),R("div",{key:0,class:"train-modal",onKeydown:t[2]||(t[2]=$s((...l)=>e.closeModal&&e.closeModal(...l),["esc"]))},[y("div",{class:"modal_background",onClick:t[0]||(t[0]=(...l)=>e.closeModal&&e.closeModal(...l))}),y("div",mb,[y("button",{class:"btn exit",onClick:t[1]||(t[1]=(...l)=>e.closeModal&&e.closeModal(...l))},[y("img",{src:e.getIcon("exit"),alt:"close card"},null,8,gb)]),se(o,{train:e.chosenTrain,extended:!1,ref:"trainInfo"},null,8,["train"]),se(a,{train:e.chosenTrain,tabindex:"0"},null,8,["train"])],512)],32)):Q("",!0)}const yb=Fe(pb,[["render",_b],["__scopeId","data-v-deaf34a4"]]);class Ml{static registerStorage(t){window.localStorage.setItem(t,"1")}static unregisterStorage(t){window.localStorage.removeItem(t)}static isRegistered(t){return!!window.localStorage.getItem(t)}static setBooleanValue(t,n){window.localStorage.setItem(t,n.toString())}static setNumericValue(t,n){window.localStorage.setItem(t,n.toString())}static setStringValue(t,n){window.localStorage.setItem(t,n)}static setValue(t,n){typeof n=="boolean"?this.setBooleanValue(t,n):typeof n=="number"?this.setNumericValue(t,n):typeof n=="string"?this.setStringValue(t,n):this.setStringValue(t,n)}static removeValue(t){window.localStorage.removeItem(t)}static getBooleanValue(t){return window.localStorage.getItem(t)==="true"}static getStringValue(t){return window.localStorage.getItem(t)||""}static getNumericValue(t){const n=window.localStorage.getItem(t);return n?parseInt(n):0}}const bb=[{id:"default",name:"default",iconName:"td2",section:"access",value:!0,defaultValue:!0},{id:"not-default",name:"notDefault",iconName:"",section:"access",value:!0,defaultValue:!0},{id:"real",name:"real",iconName:"lock",section:"access",value:!0,defaultValue:!0},{id:"fictional",name:"fictional",iconName:"user",section:"access",value:!0,defaultValue:!0},{id:"non-public",name:"nonPublic",iconName:"user",section:"access",value:!0,defaultValue:!0},{id:"unavailable",name:"unavailable",iconName:"user",section:"access",value:!1,defaultValue:!1},{id:"abandoned",name:"abandoned",iconName:"user",section:"access",value:!1,defaultValue:!1},{id:"SPK",name:"SPK",iconName:"SPK",section:"control",value:!0,defaultValue:!0},{id:"SCS",name:"SCS",iconName:"SCS",section:"control",value:!0,defaultValue:!0},{id:"SPE",name:"SPE",iconName:"SPE",section:"control",value:!0,defaultValue:!0},{id:"manual",name:"ręczne",iconName:"ręczne",section:"control",value:!0,defaultValue:!0},{id:"mechanical",name:"mechaniczne",iconName:"mechaniczne",section:"control",value:!0,defaultValue:!0},{id:"SUP",name:"SUP",iconName:"SUP",section:"control",value:!0,defaultValue:!0},{id:"SBL",name:"SBL",iconName:"SBL",section:"routes",value:!0,defaultValue:!0},{id:"modern",name:"współczesna",iconName:"współczesna",section:"signals",value:!0,defaultValue:!0},{id:"semaphores",name:"kształtowa",iconName:"kształtowa",section:"signals",value:!0,defaultValue:!0},{id:"mixed",name:"mieszana",iconName:"mieszana",section:"signals",value:!0,defaultValue:!0},{id:"historical",name:"historyczna",iconName:"historyczna",section:"signals",value:!0,defaultValue:!0},{id:"free",name:"free",iconName:"",section:"status",value:!1,defaultValue:!1},{id:"occupied",name:"occupied",iconName:"",section:"status",value:!0,defaultValue:!0},{id:"endingStatus",name:"endingStatus",iconName:"",section:"status",value:!0,defaultValue:!0},{id:"afkStatus",name:"afkStatus",iconName:"",section:"status",value:!0,defaultValue:!0},{id:"noSpaceStatus",name:"noSpaceStatus",iconName:"",section:"status",value:!0,defaultValue:!0},{id:"unavailableStatus",name:"unavailableStatus",iconName:"",section:"status",value:!0,defaultValue:!0}],vb=[{id:"min-lvl",name:"minLevel",minRange:0,maxRange:20,value:0,defaultValue:0},{id:"max-lvl",name:"maxLevel",minRange:0,maxRange:20,value:20,defaultValue:20},{id:"routes-1t-cat",name:"minOneWayCatenary",minRange:0,maxRange:5,value:0,defaultValue:0},{id:"routes-1t-other",name:"minOneWay",minRange:0,maxRange:5,value:0,defaultValue:0},{id:"routes-2t-cat",name:"minTwoWayCatenary",minRange:0,maxRange:5,value:0,defaultValue:0},{id:"routes-2t-other",name:"minTwoWay",minRange:0,maxRange:5,value:0,defaultValue:0}],Sb=[{id:"include-selected",name:"include-selected",iconName:"",section:"mode",value:!0,defaultValue:!0},{id:"save",name:"save",iconName:"",section:"mode",value:!0,defaultValue:!0}],Eb=[{id:"eu",value:"PL1"},{id:"cae",value:"PL2"},{id:"usw",value:"DE"},{id:"us",value:"CZE"},{id:"ru",value:"ENG"}],wb={options:bb,sliders:vb,modes:Sb,regions:Eb},Tb=Ae({emits:["changeLang"],mixins:[Ct],props:{currentLang:{type:String,required:!0}},setup(){return{store:Nt()}},methods:{changeRegion(e){this.store.changeRegion(e)},changeLang(e){this.$emit("changeLang",e)}},computed:{onlineTrainsCount(){return this.store.trainList.filter(e=>e.online).length},onlineDispatchersCount(){return this.store.stationList.filter(e=>e.onlineInfo&&e.onlineInfo.region==this.store.region.id).length},computedRegions(){return wb.regions.map(e=>{var s,r;const t=((s=this.store.apiData.stations)==null?void 0:s.filter(i=>i.region==e.id&&i.isOnline).length)||0,n=((r=this.store.apiData.trains)==null?void 0:r.filter(i=>i.region==e.id&&i.online).length)||0;return{id:e.id,value:`${e.value} ${t} / ${n}
`,selectedValue:e.value}})}},components:{SelectBox:Eo,StatusIndicator:kf,Clock:ju}});const Ab=e=>(In("data-v-a6eab42d"),e=e(),Rn(),e),kb={class:"app_header"},Lb={class:"header_container"},Nb={class:"header_icons"},Cb={class:"icons-top"},Ob=["src"],Ib=["src"],Rb={class:"icons-bottom"},Db={href:"https://www.paypal.com/paypalme/spythere",target:"_blank"},$b=["src"],Pb={href:"https://discord.gg/x2mpNN3svk",target:"_blank"},Fb=["src"],Mb={class:"header_body"},Bb={class:"header_brand"},Ub=["src"],jb={class:"header_info"},xb={class:"info_counter"},Hb=["src"],Vb={class:"text--primary"},Wb=Ab(()=>y("span",{class:"text--grayed"}," / ",-1)),zb={class:"text--primary"},Kb=["src"],Yb={class:"info_region"},Gb={class:"header_links"};function qb(e,t,n,s,r,i){const o=De("StatusIndicator"),a=De("Clock"),l=De("SelectBox"),c=De("router-link");return O(),R("header",kb,[y("div",Lb,[y("div",Nb,[y("span",Cb,[e.currentLang=="pl"?(O(),R("img",{key:0,src:e.getIcon("pl"),alt:"icon-pl",onClick:t[0]||(t[0]=u=>e.changeLang("en"))},null,8,Ob)):(O(),R("img",{key:1,src:e.getIcon("en","jpg"),alt:"icon-en",onClick:t[1]||(t[1]=u=>e.changeLang("pl"))},null,8,Ib))]),y("span",Rb,[y("a",Db,[y("img",{src:e.getIcon("dollar"),alt:"icon paypal"},null,8,$b)]),y("a",Pb,[y("img",{src:e.getIcon("discord","png"),alt:"icon discord"},null,8,Fb)])])]),y("div",Mb,[se(o),y("span",Bb,[y("img",{src:e.getImage("stacjownik-header-logo.svg"),alt:"Stacjownik"},null,8,Ub)]),y("span",jb,[se(a),y("div",xb,[y("img",{src:e.getIcon("dispatcher"),alt:"icon dispatcher"},null,8,Hb),y("span",Vb,N(e.onlineDispatchersCount),1),Wb,y("span",zb,N(e.onlineTrainsCount),1),y("img",{src:e.getIcon("train"),alt:"icon train"},null,8,Kb)]),y("span",Yb,[se(l,{itemList:e.computedRegions,defaultItemIndex:0,onSelected:e.changeRegion},null,8,["itemList","onSelected"])])]),y("span",Gb,[se(c,{class:"route","active-class":"route-active",to:"/",exact:""},{default:je(()=>[me(N(e.$t("app.sceneries")),1)]),_:1}),me(" / "),se(c,{class:"route","active-class":"route-active",to:"/trains"},{default:je(()=>[me(N(e.$t("app.trains")),1)]),_:1}),me(" / "),se(c,{class:"route","active-class":"route-active",to:"/journal/timetables"},{default:je(()=>[me(N(e.$t("app.journal")),1)]),_:1})])])])])}const Jb=Fe(Tb,[["render",qb],["__scopeId","data-v-a6eab42d"]]),Zb=Ae({components:{Clock:ju,StatusIndicator:kf,SelectBox:Eo,TrainModal:yb,AppHeader:Jb},mixins:[Ct],setup(){const e=Nt();e.connectToAPI();const t=Se(!1);return At("isFilterCardVisible",t),{store:e,isFilterCardVisible:t,onlineDispatchers:Te(()=>e.stationList.filter(n=>n.onlineInfo&&n.onlineInfo.region==e.region.id)),dispatcherDataStatus:e.dataStatuses.dispatchers}},data:()=>({VERSION:em.version,currentLang:"pl",releaseURL:""}),created(){this.loadLang()},async mounted(){this.setReleaseURL(),gt(()=>this.store.blockScroll,e=>{if(e){document.body.classList.add("no-scroll");return}document.body.classList.remove("no-scroll")})},methods:{changeLang(e){this.$i18n.locale=e,this.currentLang=e,Ml.setStringValue("lang",e)},async setReleaseURL(){try{const e=await(await ct.get("https://api.github.com/repos/Spythere/stacjownik/releases/latest")).data;if(!e)return;this.releaseURL=e.html_url}catch(e){console.error(`Wystąpił błąd podczas pobierania danych z API GitHuba: ${e}`);return}},loadLang(){const e=Ml.getStringValue("lang");if(e){this.changeLang(e);return}if(!window.navigator.language)return;if(window.navigator.language.toString().includes("en")){this.changeLang("en");return}}}});const Xb={class:"app_container"},Qb={class:"app_main"},ev={class:"app_footer"},tv=y("a",{href:"https://td2.info.pl/profile/?u=20777",target:"_blank"},"Spythere",-1),nv=["href"],sv=y("div",{style:{display:"none"}},"∫ ukryta taktyczna całka do programowania w HTMLu",-1);function rv(e,t,n,s,r,i){const o=De("TrainModal"),a=De("AppHeader"),l=De("router-view");return O(),R("div",Xb,[se(is,{name:"modal-anim"},{default:je(()=>[(O(),pt(li,null,[e.store.chosenModalTrainId?(O(),pt(o,{key:0})):Q("",!0)],1024))]),_:1}),se(a,{"current-lang":e.currentLang,onChangeLang:e.changeLang},null,8,["current-lang","onChangeLang"]),y("main",Qb,[se(l,null,{default:je(({Component:c})=>[(O(),pt(li,{exclude:"JournalView"},[(O(),pt(Lh(c),{key:e.$route.name}))],1024))]),_:1})]),y("footer",ev,[me(" © "),tv,me(" "+N(new Date().getUTCFullYear())+" | ",1),y("a",{href:e.releaseURL,target:"_blank"},"v"+N(e.VERSION),9,nv),sv])])}const iv=Fe(Zb,[["render",rv]]),ov="modulepreload",av=function(e){return"/"+e},Bl={},Xr=function(t,n,s){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=av(i),i in Bl)return;Bl[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!s)for(let u=r.length-1;u>=0;u--){const h=r[u];if(h.href===i&&(!o||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":ov,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((u,h)=>{c.addEventListener("load",u),c.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())};const Mn=typeof window<"u";function lv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ke=Object.assign;function Qr(e,t){const n={};for(const s in t){const r=t[s];n[s]=Lt(r)?r.map(e):e(r)}return n}const Ss=()=>{},Lt=Array.isArray,cv=/\/$/,uv=e=>e.replace(cv,"");function ei(e,t,n="/"){let s,r={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(s=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),r=e(i)),a>-1&&(s=s||t.slice(0,a),o=t.slice(a,t.length)),s=pv(s??t,n),{fullPath:s+(i&&"?")+i+o,path:s,query:r,hash:o}}function fv(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Ul(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function dv(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Qn(t.matched[s],n.matched[r])&&Cf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Qn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Cf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!hv(e[n],t[n]))return!1;return!0}function hv(e,t){return Lt(e)?jl(e,t):Lt(t)?jl(t,e):e===t}function jl(e,t){return Lt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function pv(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/");let r=n.length-1,i,o;for(i=0;i1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var Fs;(function(e){e.pop="pop",e.push="push"})(Fs||(Fs={}));var Es;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Es||(Es={}));function mv(e){if(!e)if(Mn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uv(e)}const gv=/^[^#]+#/;function _v(e,t){return e.replace(gv,"#")+t}function yv(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Fr=()=>({left:window.pageXOffset,top:window.pageYOffset});function bv(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=yv(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function xl(e,t){return(history.state?history.state.position-t:-1)+e}const Li=new Map;function vv(e,t){Li.set(e,t)}function Sv(e){const t=Li.get(e);return Li.delete(e),t}let Ev=()=>location.protocol+"//"+location.host;function Of(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let a=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Ul(l,"")}return Ul(n,e)+s+r}function wv(e,t,n,s){let r=[],i=[],o=null;const a=({state:p})=>{const b=Of(e,location),E=n.value,v=t.value;let I=0;if(p){if(n.value=b,t.value=p,o&&o===E){o=null;return}I=v?p.position-v.position:0}else s(b);r.forEach(_=>{_(n.value,E,{delta:I,type:Fs.pop,direction:I?I>0?Es.forward:Es.back:Es.unknown})})};function l(){o=n.value}function c(p){r.push(p);const b=()=>{const E=r.indexOf(p);E>-1&&r.splice(E,1)};return i.push(b),b}function u(){const{history:p}=window;p.state&&p.replaceState(ke({},p.state,{scroll:Fr()}),"")}function h(){for(const p of i)p();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u),{pauseListeners:l,listen:c,destroy:h}}function Hl(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Fr():null}}function Tv(e){const{history:t,location:n}=window,s={value:Of(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+l:Ev()+e+l;try{t[u?"replaceState":"pushState"](c,"",p),r.value=c}catch(b){console.error(b),n[u?"replace":"assign"](p)}}function o(l,c){const u=ke({},t.state,Hl(r.value.back,l,r.value.forward,!0),c,{position:r.value.position});i(l,u,!0),s.value=l}function a(l,c){const u=ke({},r.value,t.state,{forward:l,scroll:Fr()});i(u.current,u,!0);const h=ke({},Hl(s.value,l,null),{position:u.position+1},c);i(l,h,!1),s.value=l}return{location:s,state:r,push:a,replace:o}}function Av(e){e=mv(e);const t=Tv(e),n=wv(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=ke({location:"",base:e,go:s,createHref:_v.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function kv(e){return typeof e=="string"||e&&typeof e=="object"}function If(e){return typeof e=="string"||typeof e=="symbol"}const en={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Rf=Symbol("");var Vl;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Vl||(Vl={}));function es(e,t){return ke(new Error,{type:e,[Rf]:!0},t)}function jt(e,t){return e instanceof Error&&Rf in e&&(t==null||!!(e.type&t))}const Wl="[^/]+?",Lv={sensitive:!1,strict:!1,start:!0,end:!0},Nv=/[.+*?^${}()[\]/\\]/g;function Cv(e,t){const n=ke({},Lv,t),s=[];let r=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let h=0;ht.length?t.length===1&&t[0]===40+40?1:-1:0}function Iv(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Rv={type:0,value:""},Dv=/[a-zA-Z0-9_]/;function $v(e){if(!e)return[[]];if(e==="/")return[[Rv]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${c}": ${b}`)}let n=0,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let a=0,l,c="",u="";function h(){c&&(n===0?i.push({type:0,value:c}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=l}for(;a{o(S)}:Ss}function o(u){if(If(u)){const h=s.get(u);h&&(s.delete(u),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(u);h>-1&&(n.splice(h,1),u.record.name&&s.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function a(){return n}function l(u){let h=0;for(;h=0&&(u.record.path!==n[h].record.path||!Df(u,n[h]));)h++;n.splice(h,0,u),u.record.name&&!Yl(u)&&s.set(u.record.name,u)}function c(u,h){let p,b={},E,v;if("name"in u&&u.name){if(p=s.get(u.name),!p)throw es(1,{location:u});v=p.record.name,b=ke(Kl(h.params,p.keys.filter(S=>!S.optional).map(S=>S.name)),u.params&&Kl(u.params,p.keys.map(S=>S.name))),E=p.stringify(b)}else if("path"in u)E=u.path,p=n.find(S=>S.re.test(E)),p&&(b=p.parse(E),v=p.record.name);else{if(p=h.name?s.get(h.name):n.find(S=>S.re.test(h.path)),!p)throw es(1,{location:u,currentLocation:h});v=p.record.name,b=ke({},h.params,u.params),E=p.stringify(b)}const I=[];let _=p;for(;_;)I.unshift(_.record),_=_.parent;return{name:v,path:E,params:b,matched:I,meta:Uv(I)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:o,getRoutes:a,getRecordMatcher:r}}function Kl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Mv(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Bv(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Bv(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="boolean"?n:n[s];return t}function Yl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Uv(e){return e.reduce((t,n)=>ke(t,n.meta),{})}function Gl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function Df(e,t){return t.children.some(n=>n===e||Df(e,n))}const $f=/#/g,jv=/&/g,xv=/\//g,Hv=/=/g,Vv=/\?/g,Pf=/\+/g,Wv=/%5B/g,zv=/%5D/g,Ff=/%5E/g,Kv=/%60/g,Mf=/%7B/g,Yv=/%7C/g,Bf=/%7D/g,Gv=/%20/g;function To(e){return encodeURI(""+e).replace(Yv,"|").replace(Wv,"[").replace(zv,"]")}function qv(e){return To(e).replace(Mf,"{").replace(Bf,"}").replace(Ff,"^")}function Ni(e){return To(e).replace(Pf,"%2B").replace(Gv,"+").replace($f,"%23").replace(jv,"%26").replace(Kv,"`").replace(Mf,"{").replace(Bf,"}").replace(Ff,"^")}function Jv(e){return Ni(e).replace(Hv,"%3D")}function Zv(e){return To(e).replace($f,"%23").replace(Vv,"%3F")}function Xv(e){return e==null?"":Zv(e).replace(xv,"%2F")}function gr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Qv(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&Ni(i)):[s&&Ni(s)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function eS(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Lt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const tS=Symbol(""),Jl=Symbol(""),Ao=Symbol(""),ko=Symbol(""),Ci=Symbol("");function hs(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function on(e,t,n,s,r){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((o,a)=>{const l=h=>{h===!1?a(es(4,{from:n,to:t})):h instanceof Error?a(h):kv(h)?a(es(2,{from:t,to:h})):(i&&s.enterCallbacks[r]===i&&typeof h=="function"&&i.push(h),o())},c=e.call(s&&s.instances[r],t,n,l);let u=Promise.resolve(c);e.length<3&&(u=u.then(l)),u.catch(h=>a(h))})}function ti(e,t,n,s){const r=[];for(const i of e)for(const o in i.components){let a=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(nS(a)){const c=(a.__vccOpts||a)[t];c&&r.push(on(c,n,s,i,o))}else{let l=a();r.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const u=lv(c)?c.default:c;i.components[o]=u;const p=(u.__vccOpts||u)[t];return p&&on(p,n,s,i,o)()}))}}return r}function nS(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Zl(e){const t=st(Ao),n=st(ko),s=Te(()=>t.resolve(Pt(e.to))),r=Te(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],h=n.matched;if(!u||!h.length)return-1;const p=h.findIndex(Qn.bind(null,u));if(p>-1)return p;const b=Xl(l[c-2]);return c>1&&Xl(u)===b&&h[h.length-1].path!==b?h.findIndex(Qn.bind(null,l[c-2])):p}),i=Te(()=>r.value>-1&&oS(n.params,s.value.params)),o=Te(()=>r.value>-1&&r.value===n.matched.length-1&&Cf(n.params,s.value.params));function a(l={}){return iS(l)?t[Pt(e.replace)?"replace":"push"](Pt(e.to)).catch(Ss):Promise.resolve()}return{route:s,href:Te(()=>s.value.href),isActive:i,isExactActive:o,navigate:a}}const sS=Ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Zl,setup(e,{slots:t}){const n=yt(Zl(e)),{options:s}=st(Ao),r=Te(()=>({[Ql(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Ql(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:js("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),rS=sS;function iS(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function oS(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Lt(r)||r.length!==s.length||s.some((i,o)=>i!==r[o]))return!1}return!0}function Xl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ql=(e,t,n)=>e??t??n,aS=Ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=st(Ci),r=Te(()=>e.route||s.value),i=st(Jl,0),o=Te(()=>{let c=Pt(i);const{matched:u}=r.value;let h;for(;(h=u[c])&&!h.components;)c++;return c}),a=Te(()=>r.value.matched[o.value]);At(Jl,Te(()=>o.value+1)),At(tS,a),At(Ci,r);const l=Se();return gt(()=>[l.value,a.value,e.name],([c,u,h],[p,b,E])=>{u&&(u.instances[h]=c,b&&b!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=b.leaveGuards),u.updateGuards.size||(u.updateGuards=b.updateGuards))),c&&u&&(!b||!Qn(u,b)||!p)&&(u.enterCallbacks[h]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,h=a.value,p=h&&h.components[u];if(!p)return ec(n.default,{Component:p,route:c});const b=h.props[u],E=b?b===!0?c.params:typeof b=="function"?b(c):b:null,I=js(p,ke({},E,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(h.instances[u]=null)},ref:l}));return ec(n.default,{Component:I,route:c})||I}}});function ec(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const lS=aS;function cS(e){const t=Fv(e.routes,e),n=e.parseQuery||Qv,s=e.stringifyQuery||ql,r=e.history,i=hs(),o=hs(),a=hs(),l=Qc(en);let c=en;Mn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Qr.bind(null,F=>""+F),h=Qr.bind(null,Xv),p=Qr.bind(null,gr);function b(F,z){let V,q;return If(F)?(V=t.getRecordMatcher(F),q=z):q=F,t.addRoute(q,V)}function E(F){const z=t.getRecordMatcher(F);z&&t.removeRoute(z)}function v(){return t.getRoutes().map(F=>F.record)}function I(F){return!!t.getRecordMatcher(F)}function _(F,z){if(z=ke({},z||l.value),typeof F=="string"){const m=ei(n,F,z.path),f=t.resolve({path:m.path},z),d=r.createHref(m.fullPath);return ke(m,f,{params:p(f.params),hash:gr(m.hash),redirectedFrom:void 0,href:d})}let V;if("path"in F)V=ke({},F,{path:ei(n,F.path,z.path).path});else{const m=ke({},F.params);for(const f in m)m[f]==null&&delete m[f];V=ke({},F,{params:h(F.params)}),z.params=h(z.params)}const q=t.resolve(V,z),ie=F.hash||"";q.params=u(p(q.params));const be=fv(s,ke({},F,{hash:qv(ie),path:q.path})),te=r.createHref(be);return ke({fullPath:be,hash:ie,query:s===ql?eS(F.query):F.query||{}},q,{redirectedFrom:void 0,href:te})}function S(F){return typeof F=="string"?ei(n,F,l.value.path):ke({},F)}function A(F,z){if(c!==F)return es(8,{from:z,to:F})}function w(F){return M(F)}function L(F){return w(ke(S(F),{replace:!0}))}function U(F){const z=F.matched[F.matched.length-1];if(z&&z.redirect){const{redirect:V}=z;let q=typeof V=="function"?V(F):V;return typeof q=="string"&&(q=q.includes("?")||q.includes("#")?q=S(q):{path:q},q.params={}),ke({query:F.query,hash:F.hash,params:"path"in q?{}:F.params},q)}}function M(F,z){const V=c=_(F),q=l.value,ie=F.state,be=F.force,te=F.replace===!0,m=U(V);if(m)return M(ke(S(m),{state:typeof m=="object"?ke({},ie,m.state):ie,force:be,replace:te}),z||V);const f=V;f.redirectedFrom=z;let d;return!be&&dv(s,q,V)&&(d=es(16,{to:f,from:q}),ot(q,q,!0,!1)),(d?Promise.resolve(d):G(f,q)).catch(g=>jt(g)?jt(g,2)?g:ze(g):ce(g,f,q)).then(g=>{if(g){if(jt(g,2))return M(ke({replace:te},S(g.to),{state:typeof g.to=="object"?ke({},ie,g.to.state):ie,force:be}),z||f)}else g=ne(f,q,!0,te,ie);return Z(f,q,g),g})}function x(F,z){const V=A(F,z);return V?Promise.reject(V):Promise.resolve()}function G(F,z){let V;const[q,ie,be]=uS(F,z);V=ti(q.reverse(),"beforeRouteLeave",F,z);for(const m of q)m.leaveGuards.forEach(f=>{V.push(on(f,F,z))});const te=x.bind(null,F,z);return V.push(te),Fn(V).then(()=>{V=[];for(const m of i.list())V.push(on(m,F,z));return V.push(te),Fn(V)}).then(()=>{V=ti(ie,"beforeRouteUpdate",F,z);for(const m of ie)m.updateGuards.forEach(f=>{V.push(on(f,F,z))});return V.push(te),Fn(V)}).then(()=>{V=[];for(const m of F.matched)if(m.beforeEnter&&!z.matched.includes(m))if(Lt(m.beforeEnter))for(const f of m.beforeEnter)V.push(on(f,F,z));else V.push(on(m.beforeEnter,F,z));return V.push(te),Fn(V)}).then(()=>(F.matched.forEach(m=>m.enterCallbacks={}),V=ti(be,"beforeRouteEnter",F,z),V.push(te),Fn(V))).then(()=>{V=[];for(const m of o.list())V.push(on(m,F,z));return V.push(te),Fn(V)}).catch(m=>jt(m,8)?m:Promise.reject(m))}function Z(F,z,V){for(const q of a.list())q(F,z,V)}function ne(F,z,V,q,ie){const be=A(F,z);if(be)return be;const te=z===en,m=Mn?history.state:{};V&&(q||te?r.replace(F.fullPath,ke({scroll:te&&m&&m.scroll},ie)):r.push(F.fullPath,ie)),l.value=F,ot(F,z,V,te),ze()}let W;function ae(){W||(W=r.listen((F,z,V)=>{if(!vt.listening)return;const q=_(F),ie=U(q);if(ie){M(ke(ie,{replace:!0}),q).catch(Ss);return}c=q;const be=l.value;Mn&&vv(xl(be.fullPath,V.delta),Fr()),G(q,be).catch(te=>jt(te,12)?te:jt(te,2)?(M(te.to,q).then(m=>{jt(m,20)&&!V.delta&&V.type===Fs.pop&&r.go(-1,!1)}).catch(Ss),Promise.reject()):(V.delta&&r.go(-V.delta,!1),ce(te,q,be))).then(te=>{te=te||ne(q,be,!1),te&&(V.delta&&!jt(te,8)?r.go(-V.delta,!1):V.type===Fs.pop&&jt(te,20)&&r.go(-1,!1)),Z(q,be,te)}).catch(Ss)}))}let we=hs(),Ne=hs(),he;function ce(F,z,V){ze(F);const q=Ne.list();return q.length?q.forEach(ie=>ie(F,z,V)):console.error(F),Promise.reject(F)}function ue(){return he&&l.value!==en?Promise.resolve():new Promise((F,z)=>{we.add([F,z])})}function ze(F){return he||(he=!F,ae(),we.list().forEach(([z,V])=>F?V(F):z()),we.reset()),F}function ot(F,z,V,q){const{scrollBehavior:ie}=e;if(!Mn||!ie)return Promise.resolve();const be=!V&&Sv(xl(F.fullPath,0))||(q||!V)&&history.state&&history.state.scroll||null;return eo().then(()=>ie(F,z,be)).then(te=>te&&bv(te)).catch(te=>ce(te,F,z))}const Je=F=>r.go(F);let Ue;const bt=new Set,vt={currentRoute:l,listening:!0,addRoute:b,removeRoute:E,hasRoute:I,getRoutes:v,resolve:_,options:e,push:w,replace:L,go:Je,back:()=>Je(-1),forward:()=>Je(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:Ne.add,isReady:ue,install(F){const z=this;F.component("RouterLink",rS),F.component("RouterView",lS),F.config.globalProperties.$router=z,Object.defineProperty(F.config.globalProperties,"$route",{enumerable:!0,get:()=>Pt(l)}),Mn&&!Ue&&l.value===en&&(Ue=!0,w(r.location).catch(ie=>{}));const V={};for(const ie in en)V[ie]=Te(()=>l.value[ie]);F.provide(Ao,z),F.provide(ko,yt(V)),F.provide(Ci,l);const q=F.unmount;bt.add(F),F.unmount=function(){bt.delete(F),bt.size<1&&(c=en,W&&W(),W=null,l.value=en,Ue=!1,he=!1),q()}}};return vt}function Fn(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function uS(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oQn(c,a))?s.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(c=>Qn(c,l))||r.push(l))}return[n,s,r]}function TT(){return st(ko)}const fS=Ae({});const dS={class:"action-btn btn--filled"},hS={class:"button_content"};function pS(e,t,n,s,r,i){return O(),R("button",dS,[y("div",hS,[Ch(e.$slots,"default")])])}const Uf=Fe(fS,[["render",pS]]),mS=Ae({data(){return{preventKeyDown:!1}},activated(){window.addEventListener("keydown",this.handleKeyDown)},deactivated(){window.removeEventListener("keydown",this.handleKeyDown)},methods:{onKeyDownFunction(){},handleKeyDown(e){e.key&&e.key.toLowerCase()=="f"&&!this.preventKeyDown&&!e.ctrlKey&&!e.altKey&&this.onKeyDownFunction()}}}),gS=Ae({components:{SelectBox:Eo,ActionButton:Uf},emits:["onSearchConfirm","onOptionsReset"],mixins:[Ct,mS],props:{sorterOptionIds:{type:Array,required:!0},filters:{type:Array,default:[]},dataStatus:{type:Number,default:X.Initialized}},data(){return{showOptions:!1,driverSuggestions:[],dispatcherSuggestions:[],searchTimeout:0,store:Nt(),DataStatus:X}},setup(){return{searchersValues:st("searchersValues"),sorterActive:st("sorterActive"),journalFilterActive:st("journalFilterActive")}},computed:{driverStatsName(){return this.store.driverStatsName},translatedSorterOptions(){return this.$props.sorterOptionIds.map(e=>({id:e,value:this.$t(`options.sort-${e}`)}))}},watch:{async driverStatsName(e){await this.fetchDriverStats(),this.store.currentStatsTab=e?"driver":"daily"},async"searchersValues.search-driver"(e){clearTimeout(this.searchTimeout),!(!e||e=="")&&(e.length<3||(this.searchTimeout=setTimeout(async()=>{try{const t=await(await ct.get(`${kt.stacjownikAPI}/api/getDriverSuggestions?name=${e}`)).data;this.driverSuggestions=t}catch{this.driverSuggestions=[]}},1500)))},async"searchersValues.search-dispatcher"(e){clearTimeout(this.searchTimeout),!(!e||e=="")&&(e.length<3||(this.searchTimeout=setTimeout(async()=>{try{const t=await(await ct.get(`${kt.stacjownikAPI}/api/getDispatcherSuggestions?name=${e}`)).data;this.dispatcherSuggestions=t}catch{this.dispatcherSuggestions=[]}},1500)))}},methods:{async fetchDriverStats(){if(this.store.driverStatsData=void 0,!this.store.driverStatsName){this.store.driverStatsStatus=X.Initialized;return}try{this.store.driverStatsStatus=X.Loading;const e=await(await ct.get(`${kt.stacjownikAPI}/api/getDriverInfo?name=${this.store.driverStatsName}`)).data;this.store.driverStatsData=e,this.store.driverStatsStatus=X.Loaded}catch{this.store.driverStatsStatus=X.Error,console.error("Ups! Wystąpił błąd przy próbie pobrania statystyk maszynisty! :/")}},onKeyDownFunction(){this.showOptions=!this.showOptions,this.$nextTick(()=>{var e;this.showOptions&&((e=this.$refs.button)==null||e.focus())})},focusEnd(){console.log("focus end")},onSorterChange(e){this.sorterActive.id=e.id,this.sorterActive.dir=-1,this.$emit("onSearchConfirm")},onFilterChange(e){this.journalFilterActive=e,this.$emit("onSearchConfirm")},onInputClear(e){this.searchersValues[e]="",this.$emit("onSearchConfirm")},onSearchConfirm(){this.$emit("onSearchConfirm")},onSearchButtonConfirm(){this.showOptions=!1,this.$emit("onSearchConfirm")},onResetButtonClick(){this.$emit("onOptionsReset")}}});const _S=["src"],yS={id:"search-driver"},bS=["value"],vS={id:"search-dispatcher"},SS=["value"],ES={key:0,class:"options_wrapper"},wS={class:"options_content"},TS={class:"option-title"},AS={class:"search_content"},kS={key:0,for:"date"},LS={class:"search-box"},NS=["onUpdate:modelValue","placeholder","type","min","list"],CS={class:"search-exit"},OS=["src","onClick"],IS={class:"search_actions"},RS={class:"option-title"},DS={class:"options_sorters"},$S=["data-selected","onClick"],PS={key:0,class:"option-title"},FS={class:"options_filters"},MS=["id","onClick"];function BS(e,t,n,s,r,i){return O(),R("div",{class:"filters-options",onKeydown:t[7]||(t[7]=$s(o=>e.showOptions=!1,["esc"]))},[e.showOptions?(O(),R("div",{key:0,class:"bg",onClick:t[0]||(t[0]=o=>e.showOptions=!1)})):Q("",!0),y("button",{class:"btn--filled btn--image",onClick:t[1]||(t[1]=o=>e.showOptions=!e.showOptions),ref:"button"},[y("img",{src:e.getIcon("filter2"),alt:"Open filters"},null,8,_S),me(" "+N(e.$t("options.filters"))+" [F] ",1)],512),y("datalist",yS,[(O(!0),R(Le,null,nt(e.driverSuggestions,o=>(O(),R("option",{value:o},null,8,bS))),256))]),y("datalist",vS,[(O(!0),R(Le,null,nt(e.dispatcherSuggestions,o=>(O(),R("option",{value:o},null,8,SS))),256))]),se(is,{name:"options-anim"},{default:je(()=>[e.showOptions?(O(),R("div",ES,[y("div",wS,[y("h1",TS,N(e.$t("options.search-title")),1),y("div",AS,[(O(!0),R(Le,null,nt(e.searchersValues,(o,a)=>(O(),R("div",{class:"search",key:a},[a=="search-date"?(O(),R("label",kS,N(e.$t("options.search-date")),1)):Q("",!0),y("div",LS,[oo(y("input",{class:"search-input","onUpdate:modelValue":l=>e.searchersValues[a]=l,onKeydown:t[2]||(t[2]=$s((...l)=>e.onSearchConfirm&&e.onSearchConfirm(...l),["enter"])),onFocus:t[3]||(t[3]=l=>e.preventKeyDown=!0),onBlur:t[4]||(t[4]=l=>e.preventKeyDown=!1),placeholder:e.$t(`options.${a}`),type:a=="search-date"?"date":"text",min:a=="search-date"?"2022-02-01":void 0,list:a.toString()},null,40,NS),[[Fp,e.searchersValues[a]]]),y("button",CS,[y("img",{src:e.getIcon("exit"),alt:"exit-icon",onClick:l=>e.onInputClear(a)},null,8,OS)])])]))),128)),y("div",IS,[y("button",{class:"btn--action",onClick:t[5]||(t[5]=(...o)=>e.onResetButtonClick&&e.onResetButtonClick(...o))},N(e.$t("options.reset-button")),1),y("button",{class:"btn--action",onClick:t[6]||(t[6]=(...o)=>e.onSearchButtonConfirm&&e.onSearchButtonConfirm(...o))},N(e.$t("options.search-button")),1)])]),y("h1",RS,N(e.$t("options.sort-title")),1),y("div",DS,[(O(!0),R(Le,null,nt(e.translatedSorterOptions,o=>(O(),R("div",null,[y("button",{class:"sort-option btn--option","data-selected":o.id==e.sorterActive.id,onClick:a=>e.onSorterChange(o)},N(o.value.toUpperCase()),9,$S)]))),256))]),e.filters.length!=0?(O(),R("h1",PS,N(e.$t("options.filter-title")),1)):Q("",!0),y("div",FS,[(O(!0),R(Le,null,nt(e.filters,o=>(O(),R("button",{class:it(["filter-option btn--option",{checked:e.journalFilterActive.id===o.id}]),id:o.id,onClick:a=>e.onFilterChange(o)},N(e.$t(`options.filter-${o.id}`)),11,MS))),256))])])])):Q("",!0)]),_:1})],32)}const jf=Fe(gS,[["render",BS],["__scopeId","data-v-e186669b"]]),US=Ae({setup(){return{}}});const Lo=e=>(In("data-v-c1cfc32f"),e=e(),Rn(),e),jS={class:"loading"},xS=Lo(()=>y("span",{class:"loading-circle"},null,-1)),HS=Lo(()=>y("span",{class:"loading-circle"},null,-1)),VS=Lo(()=>y("span",{class:"loading-circle"},null,-1)),WS=[xS,HS,VS];function zS(e,t,n,s,r,i){return O(),R("div",jS,WS)}const No=Fe(US,[["render",zS],["__scopeId","data-v-c1cfc32f"]]),KS=Ae({components:{Loading:No},setup(){const e=Nt(),t=Te(async()=>await(await ct.get(`${kt.stacjownikAPI}/api/getDispatcherInfo?name=${e.dispatcherStatsName}`)).data);return{store:e,statsData2:t}},data(){return{cardVisible:!1,lastDispatcherName:"",timetables:[]}},methods:{toggleCard(){this.store.dispatcherStatsName&&(this.cardVisible=!this.cardVisible,this.cardVisible&&this.fetchDispatcherStats())},async fetchDispatcherStats(){this.lastDispatcherName!=this.store.dispatcherStatsName&&(this.store.dispatcherStatsData=void 0);const e=await(await ct.get(`${kt.stacjownikAPI}/api/getDispatcherInfo?name=${this.store.dispatcherStatsName}`)).data,t=await(await ct.get(`${kt.stacjownikAPI}/api/getTimetables?authorName=${this.store.dispatcherStatsName}`)).data;this.timetables=t,this.store.dispatcherStatsData=e,this.lastDispatcherName=this.store.dispatcherStatsName}}});const ls=e=>(In("data-v-18012bbe"),e=e(),Rn(),e),YS={class:"stats_container"},GS={key:0,class:"stats_card"},qS={key:1,class:"loading"},JS={key:2},ZS=ls(()=>y("h3",null,"STATYSTYKI WYSTAWIONYCH ROZKŁADÓW",-1)),XS={key:0,class:"info-stats"},QS={class:"stat-badge"},eE=ls(()=>y("span",null,"LICZBA",-1)),tE={class:"stat-badge"},nE=ls(()=>y("span",null,"SUMA (KM)",-1)),sE={class:"stat-badge"},rE=ls(()=>y("span",null,"NAJDŁUŻSZY",-1)),iE={class:"stat-badge"},oE=ls(()=>y("span",null,"ŚREDNIO",-1)),aE=ls(()=>y("h3",null,"OSTATNIE WYSTAWIONE ROZKŁADY",-1)),lE={class:"last-timetables"},cE={class:"timetable-row"};function uE(e,t,n,s,r,i){const o=De("Loading"),a=Nh("click-outside");return oo((O(),R("div",YS,[y("button",{class:"stats_button",onClick:t[0]||(t[0]=(...l)=>e.toggleCard&&e.toggleCard(...l))}," Statystyki dyżurnego "+N(e.store.dispatcherStatsName),1),e.store.dispatcherStatsName&&e.cardVisible?(O(),R("div",GS,[y("div",null,[e.store.dispatcherStatsData?e.store.dispatcherStatsData._count._all?(O(),R("div",JS,[ZS,e.store.dispatcherStatsData._count._all?(O(),R("div",XS,[y("span",QS,[eE,y("span",null,N(e.store.dispatcherStatsData._count._all),1)]),y("span",tE,[nE,y("span",null,N(e.store.dispatcherStatsData._sum.routeDistance.toFixed(2))+"km",1)]),y("span",sE,[rE,y("span",null,N(e.store.dispatcherStatsData._max.routeDistance.toFixed(2))+"km",1)]),y("span",iE,[oE,y("span",null,N(e.store.dispatcherStatsData._avg.routeDistance.toFixed(2))+"km",1)])])):Q("",!0),aE,y("div",lE,[(O(!0),R(Le,null,nt(e.timetables,l=>(O(),R("div",cE,[me(" #"+N(l.timetableId)+" | ",1),y("b",null,N(l.trainCategoryCode)+" "+N(l.trainNo),1),me(" | "+N(l.driverName)+" ("+N(l.routeDistance)+"km) ",1),y("div",null,N(l.route.replace("|"," > ")),1)]))),256))])])):(O(),R("div",qS," Ten dyżurny nie ma jeszcze szczegółowych statystyk! ")):(O(),pt(o,{key:0}))])])):Q("",!0)])),[[a,()=>e.cardVisible=!1]])}const fE=Fe(KS,[["render",uE],["__scopeId","data-v-18012bbe"]]),dE=Ae({mixins:[Ct],emits:["update:searchedValue","clearValue"],props:{searchedValue:{type:String,required:!0},updateOnInput:{type:Boolean,default:!0},titleToTranslate:{type:String,required:!0},clearValue:{type:Function}},setup(e,{emit:t}){const n=Se(e.searchedValue);return e.updateOnInput&>(()=>n.value,i=>{t("update:searchedValue",i)}),{compSearchedValue:n,updateValue:i=>{!e.updateOnInput&&i.keyCode==13&&t("update:searchedValue",n.value)},clearValue:()=>{n.value="",t("clearValue")}}}});const hE={class:"search-box"},pE=["placeholder"],mE=["src"];function gE(e,t,n,s,r,i){return O(),R("div",hE,[oo(y("input",{class:"search-input",placeholder:e.$t(e.titleToTranslate),"onUpdate:modelValue":t[0]||(t[0]=o=>e.compSearchedValue=o),onKeypress:t[1]||(t[1]=(...o)=>e.updateValue&&e.updateValue(...o))},null,40,pE),[[gi,e.compSearchedValue]]),y("img",{class:"search-exit",src:e.getIcon("exit"),alt:"exit-icon",onClick:t[2]||(t[2]=(...o)=>e.clearValue&&e.clearValue(...o))},null,8,mE)])}const _E=Fe(dE,[["render",gE],["__scopeId","data-v-ed43cef4"]]),yE=Ae({props:{dispatcherHistory:{type:Array,required:!0}},mixins:[Vs],computed:{computedDispatcherHistory(){return this.dispatcherHistory.reduce((e,t,n)=>(this.isAnotherDay(n-1,n)&&e.push(new Date(t.timestampFrom).toLocaleDateString("pl-PL")),e.push(t),e),[])}},methods:{navigateToScenery(e,t){t&&this.$router.push(`/scenery?station=${e.trim().replace(/ /g,"_")}`)},isAnotherDay(e,t){return t==0?!0:new Date(this.dispatcherHistory[e].timestampFrom).getDate()!=new Date(this.dispatcherHistory[t].timestampFrom).getDate()}}});const bE={class:"journal-list"},vE={key:0,class:"journal_day"},SE=["onClick","onKeydown"],EE={class:"text--primary"},wE={class:"text--grayed"},TE=["data-status"],AE={key:0},kE={key:1};function LE(e,t,n,s,r,i){return O(),R("ul",bE,[(O(!0),R(Le,null,nt(e.computedDispatcherHistory,o=>(O(),R("li",{class:it({sticky:typeof o=="string"})},[typeof o=="string"?(O(),R("div",vE,N(o),1)):(O(),R("div",{key:1,class:it(["journal_item",{online:o.isOnline}]),onClick:a=>e.navigateToScenery(o.stationName,o.isOnline),onKeydown:$s(a=>e.navigateToScenery(o.stationName,o.isOnline),["enter"]),tabindex:"0"},[y("span",null,[y("b",EE,N(o.dispatcherName),1),me(" • "),y("b",null,N(o.stationName),1),y("span",wE," #"+N(o.stationHash)+" ",1),y("span",{class:it(["region-badge",o.region])},"PL1",2)]),y("span",null,[y("span",{"data-status":o.isOnline},N(o.isOnline?e.$t("journal.online-since"):"OFFLINE")+" ",9,TE),y("span",null,N(new Date(o.timestampFrom).toLocaleTimeString("pl-PL",{timeStyle:"short"})),1),o.currentDuration&&o.isOnline?(O(),R("span",AE," ("+N(e.calculateDuration(o.currentDuration))+") ",1)):Q("",!0),o.timestampTo?(O(),R("span",kE," > "+N(new Date(o.timestampTo).toLocaleTimeString("pl-PL",{timeStyle:"short"}))+" ("+N(e.$t("journal.duty-lasted"))+" "+N(e.calculateDuration(o.currentDuration))+") ",1)):Q("",!0)])],42,SE))],2))),256))])}const NE=Fe(yE,[["render",LE],["__scopeId","data-v-87911a70"]]),CE=Ae({});const OE={class:"journal-header"},IE={class:"journal-type-options"};function RE(e,t,n,s,r,i){const o=De("router-link");return O(),R("section",OE,[y("div",IE,[se(o,{class:"router-link","active-class":"route-active",to:"/journal/timetables",exact:""},{default:je(()=>[me(N(e.$t("journal.section-timetables")),1)]),_:1}),me(" • "),se(o,{class:"router-link","active-class":"route-active",to:"/journal/dispatchers"},{default:je(()=>[me(N(e.$t("journal.section-dispatchers")),1)]),_:1})])])}const xf=Fe(CE,[["render",RE],["__scopeId","data-v-619c2652"]]),tc=`${kt.stacjownikAPI}/api/getDispatchers`,DE=Ae({components:{SearchBox:_E,ActionButton:Uf,JournalOptions:jf,DispatcherStats:fE,Loading:No,JournalDispatchersList:NE,JournalHeader:xf},name:"JournalDispatchers",props:{sceneryName:{type:String,required:!1},dispatcherName:{type:String,required:!1}},data:()=>({currentQuery:"",scrollDataLoaded:!0,scrollNoMoreData:!1,showReturnButton:!1,statsCardOpen:!1,dataStatus:X.Initialized,DataStatus:X,historyList:[]}),setup(){const e=yt({id:"timestampFrom",dir:-1}),t=Se({}),n=yt({"search-dispatcher":"","search-station":"","search-date":""}),s=Se(0),r=15;At("sorterActive",e),At("journalFilterActive",t),At("searchersValues",n);const i=Se(null);return{store:Nt(),sorterActive:e,searchersValues:n,countFromIndex:s,countLimit:r,scrollElement:i,maxCount:Se(15)}},computed:{computedHistoryList(){return this.historyList.filter(e=>e.isOnline||e.currentDuration&&e.currentDuration>10*6e4)}},activated(){var e,t;(this.sceneryName||this.dispatcherName)&&(this.searchersValues["search-station"]=((e=this.sceneryName)==null?void 0:e.toString())||"",this.searchersValues["search-dispatcher"]=((t=this.dispatcherName)==null?void 0:t.toString())||"",this.searchHistory())},mounted(){!this.sceneryName&&!this.dispatcherName&&this.searchHistory()},methods:{handleScroll(e){const t=e.target,n=t.scrollTop,s=t.scrollHeight-t.offsetHeight;!this.scrollDataLoaded||this.scrollNoMoreData||this.dataStatus!=X.Loaded||n>s*.85&&this.addHistoryData()},resetOptions(){this.searchersValues["search-station"]="",this.searchersValues["search-dispatcher"]="",this.sorterActive.id="timestampFrom",this.searchHistory()},searchHistory(){this.fetchHistoryData({searchers:this.searchersValues}),this.scrollNoMoreData=!1,this.scrollDataLoaded=!0},async addHistoryData(){this.scrollDataLoaded=!1;const e=this.historyList.length,t=await(await ct.get(`${tc}?${this.currentQuery}&countFrom=${e}`)).data;if(t){if(t.length==0){this.scrollNoMoreData=!0;return}this.historyList.push(...t),this.scrollDataLoaded=!0}},async fetchHistoryData(e={}){var a,l,c;this.dataStatus=X.Loading;const t=[],n=(a=e.searchers)==null?void 0:a["search-dispatcher"].trim(),s=(l=e.searchers)==null?void 0:l["search-station"].trim(),r=(c=e.searchers)==null?void 0:c["search-date"].trim(),i=r?Date.parse(new Date(r).toISOString())-120*60*1e3:void 0,o=i?i+864e5:void 0;n&&t.push(`dispatcherName=${n}`),s&&t.push(`stationName=${s}`),i&&o&&t.push(`timestampFrom=${i}`,`timestampTo=${o}`),this.sorterActive.id=="timestampFrom"?t.push("sortBy=timestampFrom"):this.sorterActive.id=="duration"?t.push("sortBy=currentDuration"):t.push("sortBy=timestampFrom"),t.push("countLimit=30"),this.currentQuery=t.join("&");try{const u=await(await ct.get(`${tc}?${this.currentQuery}`)).data;if(!u){this.dataStatus=X.Error;return}if(!u)return;this.historyList=u,this.store.dispatcherStatsName=this.historyList.length>0&&this.searchersValues["search-dispatcher"].trim()?this.historyList[0].dispatcherName:"",this.dataStatus=X.Loaded}catch{this.dataStatus=X.Error}}}});const $E={class:"journal-timetables"},PE={class:"journal_wrapper"},FE={key:1,class:"journal_warning error"},ME={key:2,class:"journal_warning"},BE={key:3},UE={key:4,class:"journal_warning"},jE={key:5,class:"journal_warning"};function xE(e,t,n,s,r,i){const o=De("JournalHeader"),a=De("JournalOptions"),l=De("Loading"),c=De("JournalDispatchersList");return O(),R("section",$E,[se(o),y("div",PE,[se(a,{onOnSearchConfirm:e.searchHistory,onOnOptionsReset:e.resetOptions,"sorter-option-ids":["timestampFrom","duration"],"data-status":e.dataStatus},null,8,["onOnSearchConfirm","onOnOptionsReset","data-status"]),y("div",{class:"list_wrapper",onScroll:t[1]||(t[1]=(...u)=>e.handleScroll&&e.handleScroll(...u))},[e.dataStatus==e.DataStatus.Initialized||e.dataStatus==e.DataStatus.Loading?(O(),pt(l,{key:0})):e.dataStatus==e.DataStatus.Error?(O(),R("div",FE,N(e.$t("app.error")),1)):e.historyList.length==0?(O(),R("div",ME,N(e.$t("app.no-result")),1)):(O(),R("div",BE,[se(c,{dispatcherHistory:e.computedHistoryList},null,8,["dispatcherHistory"]),!e.scrollNoMoreData&&e.scrollDataLoaded&&e.computedHistoryList.length>15?(O(),R("button",{key:0,class:"btn btn--option btn--load-data",onClick:t[0]||(t[0]=(...u)=>e.addHistoryData&&e.addHistoryData(...u))},N(e.$t("journal.load-data")),1)):Q("",!0)])),e.scrollNoMoreData?(O(),R("div",UE,N(e.$t("journal.no-further-data")),1)):e.scrollDataLoaded?Q("",!0):(O(),R("div",jE,N(e.$t("journal.loading-further-data")),1))],32)])])}const HE=Fe(DE,[["render",xE],["__scopeId","data-v-f5438d40"]]),VE=Ae({data(){return{store:Nt(),DataStatus:X}}});const WE={class:"journal-stats"},zE={key:0},KE={class:"text--primary"},YE={class:"info-stats"},GE={class:"stat-badge"},qE={class:"stat-badge"},JE={class:"stat-badge"},ZE={class:"stat-badge"},XE={class:"stat-badge"},QE={key:1},e1={key:2},t1={key:3};function n1(e,t,n,s,r,i){return O(),R("div",WE,[e.store.driverStatsData?(O(),R("span",zE,[y("h3",null,[me(N(e.$t("journal.stats-title"))+" ",1),y("span",KE,N(e.store.driverStatsName.toUpperCase()),1)]),y("div",YE,[y("span",GE,[y("span",null,N(e.$t("journal.stats-timetables")),1),y("span",null,N(e.store.driverStatsData._count.fulfilled)+" / "+N(e.store.driverStatsData._count._all),1)]),y("span",qE,[y("span",null,N(e.$t("journal.stats-longest-timetable")),1),y("span",null,N(e.store.driverStatsData._max.routeDistance.toFixed(2))+"km ",1)]),y("span",JE,[y("span",null,N(e.$t("journal.stats-avg-timetable")),1),y("span",null,N(e.store.driverStatsData._avg.routeDistance.toFixed(2))+"km ",1)]),y("span",ZE,[y("span",null,N(e.$t("journal.stats-distance")),1),y("span",null,N(e.store.driverStatsData._sum.currentDistance.toFixed(2))+" / "+N(e.store.driverStatsData._sum.routeDistance.toFixed(2))+"km ",1)]),y("span",XE,[y("span",null,N(e.$t("journal.stats-stations")),1),y("span",null,N(e.store.driverStatsData._sum.confirmedStopsCount)+" / "+N(e.store.driverStatsData._sum.allStopsCount),1)])])])):e.store.driverStatsStatus==e.DataStatus.Loading?(O(),R("b",QE,N(e.$t("journal.stats-loading")),1)):e.store.driverStatsStatus==e.DataStatus.Error?(O(),R("b",e1,N(e.$t("journal.stats-error ")),1)):(O(),R("b",t1,N(e.$t("journal.driver-stats-info")),1))])}const Hf=Fe(VE,[["render",n1],["__scopeId","data-v-96579c40"]]),s1=Ae({methods:{navigateTo(e,t){this.$router.push({path:e,query:t})}}});var ln=(e=>(e.active="active",e.fulfilled="fulfilled",e.abandoned="abandoned",e.all="all",e))(ln||{});const r1=Ae({props:{timetableHistory:{type:Array,required:!0}},mixins:[Vs,Ct,wo],computed:{computedTimetableHistory(){return this.timetableHistory.map(e=>({timetable:e,sceneryList:this.getSceneryList(e),showStock:Se(!1)}))}},methods:{getSceneryList(e){return e.sceneriesString.split("%").map((t,n)=>{const s=" (o. "+(e.beginDate!=e.scheduledBeginDate?`${this.localeTime(e.beginDate,this.$i18n.locale)} `:"")+`${this.localeTime(e.scheduledBeginDate,this.$i18n.locale)})`,r=" (p. "+(e.endDate!=e.scheduledEndDate&&e.fulfilled?`${this.localeTime(e.fulfilled?e.endDate:e.scheduledEndDate,this.$i18n.locale)} `:"")+`${this.localeTime(e.fulfilled||e.terminated&&!e.fulfilled?e.scheduledEndDate:e.endDate,this.$i18n.locale)})`,i=` (porz. ${this.localeTime(e.fulfilled?e.scheduledEndDate:e.endDate,this.$i18n.locale)})`;return{name:t,confirmed:n(In("data-v-1cbf1d98"),e=e(),Rn(),e),i1={class:"journal-list"},o1={class:"journal_item-info"},a1={class:"info-top"},l1=["onClick","onKeydown"],c1={class:"text--primary"},u1={class:"text--grayed"},f1={class:"info-date"},d1={class:"info-route"},h1=Vf(()=>y("hr",null,null,-1)),p1={class:"scenery-list"},m1={key:0},g1=["innerHTML"],_1=["innerHTML"],y1={style:{margin:"0.5em 0"}},b1={key:0,class:"text--grayed"},v1={key:0},S1={class:"text--grayed"},E1=["onClick"],w1=["src"],T1={key:2,class:"info-extended"},A1=Vf(()=>y("hr",null,null,-1)),k1={class:"badge info-badge"},L1={class:"badge info-badge"},N1={class:"badge info-badge"},C1={class:"stock-list"},O1=["src","alt"];function I1(e,t,n,s,r,i){const o=De("router-link");return O(),R("ul",i1,[(O(!0),R(Le,null,nt(e.computedTimetableHistory,({timetable:a,sceneryList:l,...c})=>(O(),R("li",{class:"journal_item",key:a.timetableId},[y("div",o1,[y("div",a1,[y("span",{tabindex:"0",onClick:u=>e.showTimetable(a),onKeydown:$s(u=>e.showTimetable(a),["enter"]),style:{cursor:"pointer"}},[y("b",c1,N(a.trainCategoryCode)+" ",1),y("b",null,N(a.trainNo),1),me(" | "),y("span",null,N(a.driverName),1),me(" | "),y("span",u1,"#"+N(a.timetableId),1)],40,l1),y("span",null,[y("b",f1,N(e.localeDay(a.beginDate,e.$i18n.locale)),1),y("b",{class:it(["info-status",{fulfilled:a.fulfilled||a.currentDistance>=a.routeDistance*.9,terminated:a.terminated&&!a.fulfilled,active:!a.terminated}])},N(a.terminated?a.fulfilled||a.currentDistance>=a.routeDistance*.9?e.$t("journal.timetable-fulfilled"):`${e.$t("journal.timetable-abandoned")} ${e.localeTime(a.endDate,e.$i18n.locale)}`:e.$t("journal.timetable-active")),3)])]),y("div",d1,[y("b",null,N(a.route.replace("|"," - ")),1)]),h1,y("div",p1,[(O(!0),R(Le,null,nt(l,(u,h)=>(O(),R("span",{key:u.name,class:it({confirmed:u.confirmed})},[h>0?(O(),R("span",m1," >")):Q("",!0),me(" "+N(u.name)+" ",1),h==0?(O(),R("span",{key:1,innerHTML:u.beginDateHTML},null,8,g1)):Q("",!0),h==l.length-1?(O(),R("span",{key:2,innerHTML:u.endDateHTML},null,8,_1)):Q("",!0)],2))),128))]),y("div",y1,[y("span",null,[y("b",null,N(e.$t("journal.route-length")),1),me(" "+N(a.fulfilled?"":a.currentDistance+" /")+" "+N(a.routeDistance)+" km ",1)]),me(" • "),y("span",null,[y("b",null,N(e.$t("journal.station-count")),1),me(" "+N(a.confirmedStopsCount)+" / "+N(a.allStopsCount),1)]),!a.fulfilled&&a.currentSceneryName?(O(),R("span",b1,[me(" • "),y("b",null,N(e.$t(`journal.${a.terminated?"last-seen-at":"currently-at"}`))+" "+N(a.currentSceneryName.replace(/.[a-zA-Z0-9]+.sc/,"")),1)])):Q("",!0)]),a.authorName?(O(),R("div",v1,[y("b",S1,N(e.$t("journal.dispatcher-name"))+" ",1),se(o,{class:"dispatcher-link",to:`/journal/dispatchers?dispatcherName=${a.authorName}`},{default:je(()=>[y("b",null,N(a.authorName),1)]),_:2},1032,["to"])])):Q("",!0),a.stockString?(O(),R("button",{key:1,class:"btn--option btn--show",onClick:u=>c.showStock.value=!c.showStock.value},[me(N(e.$t("journal.stock-info"))+" ",1),y("img",{src:e.getIcon(`arrow-${c.showStock.value?"asc":"desc"}`),alt:"Arrow"},null,8,w1)],8,E1)):Q("",!0),a.stockString&&c.showStock.value?(O(),R("div",T1,[A1,y("div",null,[y("span",k1,[y("span",null,N(e.$t("journal.stock-max-speed")),1),y("span",null,N(a.maxSpeed)+"km/h",1)]),y("span",L1,[y("span",null,N(e.$t("journal.stock-length")),1),y("span",null,N(a.stockLength)+"m",1)]),y("span",N1,[y("span",null,N(e.$t("journal.stock-mass")),1),y("span",null,N(Math.floor(a.stockMass/1e3))+"t",1)])]),y("ul",C1,[(O(!0),R(Le,null,nt(a.stockString.split(";"),(u,h)=>(O(),R("li",{key:h},[y("img",{onError:t[0]||(t[0]=(...p)=>e.onImageError&&e.onImageError(...p)),src:`https://rj.td2.info.pl/dist/img/thumbnails/${u.split(":")[0]}.png`,alt:u},null,40,O1),y("div",null,N(u.replace(/_/g," ").split(":")[0]),1)]))),128))])])):Q("",!0)])]))),128))])}const R1=Fe(r1,[["render",I1],["__scopeId","data-v-1cbf1d98"]]),nc=[{id:ln.all,filterSection:"timetable-status",isActive:!0},{id:ln.active,filterSection:"timetable-status",isActive:!1},{id:ln.fulfilled,filterSection:"timetable-status",isActive:!1},{id:ln.abandoned,filterSection:"timetable-status",isActive:!1}],D1={class:"daily-stats"},$1=["data-active"],P1={key:0},F1={key:1},M1={class:"text--primary"},B1={class:"text--primary"},U1={class:"text--primary"},j1={class:"text--primary"},x1=Ae({__name:"DailyStats",setup(e,{expose:t}){const n=Se(-1),s=yt({statsStatus:X.Loading,stats:{totalTimetables:0,distanceSum:0,distanceAvg:0,timetableAuthor:"",timetableDriver:"",timetableId:0,timetableRouteDistance:0,dispatcherName:"",dispatcherTimetablesCount:0}});async function r(){try{const{distanceAvg:a,distanceSum:l,maxTimetable:c,totalTimetables:u,mostActiveDispatcher:h}=await(await ct.get(`${kt.stacjownikAPI}/api/getDailyTimetableStats`)).data;s.stats={totalTimetables:u,distanceSum:l,distanceAvg:a,timetableAuthor:(c==null?void 0:c.authorName)||"",timetableDriver:(c==null?void 0:c.driverName)||"",timetableId:(c==null?void 0:c.timetableId)||0,timetableRouteDistance:(c==null?void 0:c.routeDistance)||0,dispatcherName:(h==null?void 0:h.name)||"",dispatcherTimetablesCount:(h==null?void 0:h.count)||0},s.statsStatus=X.Loaded}catch{console.error("Ups! Wystąpił błąd podczas pobierania statystyk rozkładów jazdy..."),s.statsStatus=X.Error}}function i(){r(),n.value=setInterval(r,6e4)}function o(){clearInterval(n.value)}return t({startFetchingDailyStats:i,stopFetchingDailyStats:o}),(a,l)=>{const c=De("i18n-t");return O(),R("section",D1,[y("span",{"data-active":s.statsStatus},[s.stats.distanceSum==null?(O(),R("b",P1,N(a.$t("journal.daily-stats-info")),1)):(O(),R("span",F1,[se(c,{keypath:"journal.timetable-stats-total",tag:"p"},{count:je(()=>[y("b",M1,N(s.stats.totalTimetables)+" "+N(a.$t("journal.timetable-count",s.stats.dispatcherTimetablesCount)),1)]),distance:je(()=>[y("b",B1,N(s.stats.distanceSum)+" km ",1)]),_:1}),se(c,{keypath:"journal.timetable-stats-longest",tag:"p"},{id:je(()=>[y("b",null,N(s.stats.timetableId),1)]),author:je(()=>[y("b",null,N(s.stats.timetableAuthor),1)]),driver:je(()=>[y("b",null,N(s.stats.timetableDriver),1)]),distance:je(()=>[y("b",U1,N(s.stats.timetableRouteDistance)+" km",1)]),_:1}),se(c,{keypath:"journal.timetable-stats-most-active",tag:"p"},{dispatcher:je(()=>[y("b",null,N(s.stats.dispatcherName),1)]),count:je(()=>[y("b",j1,N(s.stats.dispatcherTimetablesCount)+" "+N(a.$t("journal.timetable-count",s.stats.dispatcherTimetablesCount)),1)]),_:1})]))],8,$1)])}}});const H1=Fe(x1,[["__scopeId","data-v-aab1e1c1"]]),V1={class:"journal-stats"},W1={class:"tabs"},z1=["data-selected","data-inactive","onClick"],K1={class:"stats-tab"},Y1=Ae({__name:"JournalStats",setup(e){const t=Nt(),n=Se(null);let s=yt({tabs:[{name:"daily",titlePath:"journal.daily-stats-title"},{name:"driver",titlePath:"journal.driver-stats-title",inactive:!0}]});function r(i){t.currentStatsTab=i}return pu(()=>{var i;(i=n.value)==null||i.startFetchingDailyStats()}),mu(()=>{var i;(i=n.value)==null||i.stopFetchingDailyStats()}),gt(Te(()=>t.driverStatsData),i=>{console.log(i),s.tabs[1].inactive=!i}),(i,o)=>(O(),R("div",V1,[y("div",W1,[(O(!0),R(Le,null,nt(Pt(s).tabs,a=>(O(),R("button",{class:"btn--filled","data-selected":a.name==Pt(t).currentStatsTab,"data-inactive":a.inactive,onClick:l=>r(a.name)},N(i.$t(a.titlePath)),9,z1))),256))]),y("div",K1,[(O(),pt(li,null,[Pt(t).currentStatsTab=="daily"?(O(),pt(H1,{key:0,ref_key:"dailyStatsComp",ref:n},null,512)):Pt(t).currentStatsTab=="driver"?(O(),pt(Hf,{key:1})):Q("",!0)],1024))])]))}});const G1=Fe(Y1,[["__scopeId","data-v-855fd946"]]),sc=`${kt.stacjownikAPI}/api/getTimetables`,q1=Ae({components:{DriverStats:Hf,Loading:No,JournalOptions:jf,JournalTimetablesList:R1,JournalStats:G1,JournalHeader:xf},mixins:[Vs,s1,wo,Ct],name:"JournalTimetables",props:{timetableId:{type:String}},data:()=>({currentQuery:"",scrollDataLoaded:!0,scrollNoMoreData:!1,showReturnButton:!1,statsCardOpen:!1,timetableHistory:[],journalTimetableFilters:nc,dataStatus:X.Initialized,dataErrorMessage:"",DataStatus:X}),setup(){const e=yt({id:"timetableId",dir:1}),t=Se(nc[0]),n=yt({"search-train":"","search-driver":"","search-dispatcher":"","search-date":""}),s=Se(0),r=15;At("searchersValues",n),At("sorterActive",e),At("journalFilterActive",t);const i=Se(null);return{sorterActive:e,journalFilterActive:t,searchersValues:n,countFromIndex:s,countLimit:r,scrollElement:i,store:Nt()}},activated(){this.timetableId&&(this.searchersValues["search-train"]=`#${this.timetableId}`,this.searchHistory())},mounted(){console.log("mounted"),this.timetableId||this.searchHistory()},methods:{handleScroll(e){const t=e.target,n=t.scrollTop,s=t.scrollHeight-t.offsetHeight;!this.scrollDataLoaded||this.scrollNoMoreData||this.dataStatus!=X.Loaded||n>s*.85&&this.addHistoryData()},resetOptions(){this.searchersValues["search-date"]="",this.searchersValues["search-driver"]="",this.searchersValues["search-train"]="",this.searchersValues["search-dispatcher"]="",this.journalFilterActive=this.journalTimetableFilters[0],this.sorterActive.id="timetableId",this.searchHistory()},searchHistory(){this.fetchHistoryData({searchers:this.searchersValues,filter:this.journalFilterActive}),this.scrollNoMoreData=!1,this.scrollDataLoaded=!0},async addHistoryData(){this.scrollDataLoaded=!1;const e=this.timetableHistory.length,t=await(await ct.get(`${sc}?${this.currentQuery}&countFrom=${e}`)).data;if(t){if(t.length==0){this.scrollNoMoreData=!0;return}this.timetableHistory.push(...t),this.scrollDataLoaded=!0}},async fetchHistoryData(e={}){var l,c,u,h,p;this.dataStatus=X.Loading;const t=[],n=(l=e.searchers)==null?void 0:l["search-driver"].trim(),s=(c=e.searchers)==null?void 0:c["search-train"].trim(),r=(u=e.searchers)==null?void 0:u["search-dispatcher"].trim(),i=(h=e.searchers)==null?void 0:h["search-date"].trim(),o=i?Date.parse(new Date(i).toISOString())-120*60*1e3:void 0,a=o?o+864e5:void 0;switch(n&&t.push(`driverName=${n}`),s&&t.push(s.startsWith("#")?`timetableId=${s.replace("#","")}`:`trainNo=${s}`),r&&t.push(`authorName=${r}`),o&&a&&t.push(`timestampFrom=${o}`,`timestampTo=${a}`),this.sorterActive.id=="distance"?t.push("sortBy=routeDistance"):this.sorterActive.id=="total-stops"?t.push("sortBy=allStopsCount"):this.sorterActive.id=="beginDate"?t.push("sortBy=beginDate"):t.push("sortBy=timetableId"),t.push("countLimit=15"),(p=e.filter)==null?void 0:p.id){case ln.abandoned:t.push("fulfilled=0","terminated=1");break;case ln.active:t.push("terminated=0");break;case ln.fulfilled:t.push("fulfilled=1");break}this.currentQuery=t.join("&");try{const b=await(await ct.get(`${sc}?${this.currentQuery}`)).data;if(!b){this.dataStatus=X.Error,this.dataErrorMessage="Brak danych!";return}if(!b)return;this.timetableHistory=b,this.store.driverStatsName=this.timetableHistory.length>0&&this.searchersValues["search-driver"].trim()?this.timetableHistory[0].driverName:"",this.dataStatus=X.Loaded}catch{this.dataStatus=X.Error,this.dataErrorMessage="Ups! Coś poszło nie tak!"}}}});const J1={class:"journal-timetables"},Z1={class:"journal_wrapper"},X1={key:1,class:"journal_warning error"},Q1={key:2,class:"journal_warning"},ew={key:3},tw={key:4,class:"journal_warning"},nw={key:5,class:"journal_warning"};function sw(e,t,n,s,r,i){const o=De("JournalHeader"),a=De("JournalStats"),l=De("JournalOptions"),c=De("Loading"),u=De("JournalTimetablesList");return O(),R("section",J1,[se(o),y("div",Z1,[se(a),se(l,{onOnSearchConfirm:e.searchHistory,onOnOptionsReset:e.resetOptions,"sorter-option-ids":["timetableId","beginDate","distance","total-stops"],filters:e.journalTimetableFilters,"data-status":e.dataStatus},null,8,["onOnSearchConfirm","onOnOptionsReset","filters","data-status"]),y("div",{class:"list_wrapper",onScroll:t[1]||(t[1]=(...h)=>e.handleScroll&&e.handleScroll(...h))},[e.dataStatus==e.DataStatus.Initialized||e.dataStatus==e.DataStatus.Loading?(O(),pt(c,{key:0})):e.dataStatus==e.DataStatus.Error?(O(),R("div",X1,N(e.$t("app.error")),1)):e.timetableHistory.length==0?(O(),R("div",Q1,N(e.$t("app.no-result")),1)):(O(),R("div",ew,[se(u,{timetableHistory:e.timetableHistory},null,8,["timetableHistory"]),!e.scrollNoMoreData&&e.scrollDataLoaded&&e.timetableHistory.length>=15?(O(),R("button",{key:0,class:"btn btn--option btn--load-data",onClick:t[0]||(t[0]=(...h)=>e.addHistoryData&&e.addHistoryData(...h))},N(e.$t("journal.load-data")),1)):Q("",!0)])),e.scrollNoMoreData?(O(),R("div",tw,N(e.$t("journal.no-further-data")),1)):e.scrollDataLoaded?Q("",!0):(O(),R("div",nw,N(e.$t("journal.loading-further-data")),1))],32)])])}const rw=Fe(q1,[["render",sw],["__scopeId","data-v-54f4461d"]]),iw=[{path:"/",name:"StationsView",component:()=>Xr(()=>import("./StationsView-a5a80075.js"),["assets/StationsView-a5a80075.js","assets/returnBtnMixin-ddf8068c.js","assets/styleMixin-6b80ecca.js","assets/StationsView-efbbd8ee.css"])},{path:"/trains",name:"TrainsView",component:()=>Xr(()=>import("./TrainsView-6e19131c.js"),["assets/TrainsView-6e19131c.js","assets/returnBtnMixin-ddf8068c.js","assets/TrainsView-9a810e32.css"]),props:e=>({train:e.query.train,driver:e.query.driver,trainId:e.query.trainId})},{path:"/scenery",name:"SceneryView",component:()=>Xr(()=>import("./SceneryView-81fa6c97.js"),["assets/SceneryView-81fa6c97.js","assets/styleMixin-6b80ecca.js","assets/SceneryView-20e96b3c.css"])},{path:"/journal/timetables",name:"JournalTimetables",component:rw,props:e=>({trainNo:e.query.trainNo,driverName:e.query.driverName,timetableId:e.query.timetableId})},{path:"/journal/dispatchers",name:"JournalDispatchers",component:HE,props:e=>({sceneryName:e.query.sceneryName,dispatcherName:e.query.dispatcherName})},{path:"/:catchAll(.*)",redirect:"/"}],ow=cS({scrollBehavior(e,t){if(e.name=="SceneryView"&&t.name)return{el:".app_main"}},history:Av(),routes:iw}),aw={sceneries:"SCENERIES",trains:"TRAINS",journal:"JOURNAL",loading:"Loading data...",support:"Support the project",error:"An error occured while loading data!","no-result":"No results for current search!","migration-warning":"Stacjownik services will be unavailable 2/06/2022 between 1-3am (CEST time) due to the migration of API hostings!","migration-confirm":"Roger that!"},lw={title:"New Stacjownik version is available!",paragraph1:"Enjoy the application and may the green signal be with you!","release-link":"Click here to browse version changelog (GitHub)","confirm-button":"Understood!"},cw={"control-type":"Control type: ","signals-type":"Signals type: ",SBL:"This scenery has automatic line blockade system on following routes: ",SUP:"Requires the SUP application (level crossing remote control simulator)","TWB-all":"This scenery has two-way route blockade on all routes","TWB-routes":"This scenery has two-way route blockade on following routes: ",default:"This scenery is available by default","non-public":"This scenery is not public",unknown:"This scenery isn't recognizable right now",unavailable:"This scenery is unavailable",abandoned:"This scenery is no longer supported by its creators",real:"Scenery with real lines: "},uw={title:"Signal type",współczesna:"modern",mieszana:"mixed",kształtowa:"mechanical",historyczna:"historical"},fw={title:"Control type",SPK:"SPK",SCS:"SCS","SCS-SPK":"SCS/SPK",SPE:"SPE",ręczne:"manual","ręczne+SPK":"manual + SPK","ręczne+SCS":"manual + SCS",mechaniczne:"levers (mechanical)","mechaniczne+SPK":"levers + SPK","mechaniczne+SCS":"levers + SCS"},dw={online:"UNTIL ",free:"FREE",ending:"ENDS SOON","not-signed":"NOT SIGNED IN","no-limit":"NO LIMIT",unavailable:"UNAVAILABLE",brb:"AFK","no-space":"NO SPACE",unknown:"UNKNOWN"},hw={filters:"FILTERS",donate:"DONATE","search-button":"Search","reset-button":"Reset","sort-title":"SORT BY:","filter-title":"FILTER BY:","search-title":"SEARCH:","search-train-no":"Train no. / #","search-train":"Train no.","search-driver":"Driver name","search-dispatcher":"Dispatcher name","search-station":"Scenery name","search-author":"Timetable author name","search-date":"Timetable date (CEST / GMT+2)","sort-mass":"mass","sort-speed":"speed","sort-length":"length","sort-distance":"distance","sort-timetable":"train no.","sort-progress":"route progress","sort-delay":"current delay","sort-total-stops":"total stops","sort-beginDate":"date","sort-timetableId":"timetable ID","sort-timestampFrom":"date","sort-duration":"duration","filter-comments":"COMMENTS","filter-twr":"TWR","filter-skr":"SKR","filter-passenger":"PASSENGER","filter-freight":"FREIGHT","filter-other":"OTHER","filter-noTimetable":"NO TIMETABLE","filter-reset":"RESET FILTERS","filter-clear":"CLEAR FILTERS","filter-all":"ALL ENTRIES","filter-abandoned":"ABANDONED","filter-fulfilled":"FULFILLED","filter-active":"ACTIVE"},pw={endingStatus:"ENDS SOON",afkStatus:"AFK",noSpaceStatus:"NO SPACE",unavailableStatus:"UNAVAILABLE",title:"STATION FILTER",default:"DEFAULT","not-default":"OTHER",real:"REAL",fictional:"FICTIONAL",unavailable:"UNSUPPORTED","non-public":"NON-PUBLIC",abandoned:"ABANDONED",SPK:"SPK",SCS:"SCS",SPE:"SPE",manual:"MANUAL",mechanical:"MECHANICAL",SUP:"SUP",SBL:"SBL",modern:"MODERN",semaphores:"SEMAPHORES",mixed:"MIXED",historical:"HISTORICAL",free:"FREE",occupied:"OCCUPIED",sliders:{"min-lvl":"MIN. REQUIRED DISPATCHER LEVEL","max-lvl":"MAX. REQUIRED DISPATCHER LEVEL","routes-1t-cat":"MIN. CATENARY SINGLE TRACK ROUTES","routes-1t-other":"MIN. OTHER SINGLE TRACK ROUTES","routes-2t-cat":"MIN. CATENARY DOUBLE TRACK ROUTES","routes-2t-other":"MIN. OTHER DOUBLE TRACK ROUTES"},"authors-search":"Search by author (other filters apply)","minimum-hours-title":"SHOW ONLY SCENERIES UNTIL:",now:"NOW",hour:"h","no-limit":"NO LIMIT","include-selected":"INCLUDE SELECTED",save:"SAVE FILTERS",reset:"RESET FILTERS",close:"CLOSE FILTERS"},mw={station:"Station","min-lvl":`Min. dispatcher
-level`,status:"Status",dispatcher:"Dispatcher","dispatcher-lvl":`Dispatcher
-level`,routes:`Routes
-double / single`,general:"General info",users:"Drivers online",spawns:"Spawns online",timetables:"Active timetables","no-stations":"No stations to show here!","scenery-search":"Search for scenery..."},gw={"no-trains":"No trains to show here!",loading:"Loading train data...",offline:"Offline ride",stats:"TRAFFIC STATISTICS","stats-speed":"TRAINS SPEED (MIN, AVG, MAX) [km/h]","stats-length":"TIMETABLES LENGTH (MIN, AVG, MAX) [km]","stats-categories":"TIMETABLE CATEGORIES","stats-special-twr":"HIGH RISK","stats-special-skr":"EXCEEDED STRUCT. GAUGE","stats-locos":"MOST COMMON UNITS","current-scenery":"on scenery","current-signal":"at signal","current-track":"on track",delayed:"Delayed: ",preponed:"Ahead of schedule: ","on-time":"On time","route-progress":"Progress: ","detailed-timetable":"Detailed timetable for train no. ","via-title":"Via: ","no-timetable":"no current timetable","distance-exceeded":"Attention! Due to an internal error, timetables with route distance greater than 200km might be incorrect!",cars:"Car count",EZT:"EMU",SZT:"DMU","loco-electric":"Electric locomotive","loco-diesel":"Diesel locomotive","timetable-comments":"Exploitation comments available for this train",comment:"Exploitation comments for: ","table-limit":"For performance reasons there's a limit of 10 trains shown at the same time.","last-seen-now":"since now","last-seen-min":"since one minute","last-seen-ago":"since {minutes} minutes","scenery-offline":"Offline ride",timeout:"An error occured while trying to refresh SWDR timetable data!"},_w={title:"DISPATCHER HISTORY",loading:"Loading dispatcher history data...","no-history":"No dispatcher history found!","section-timetables":"TIMETABLES","section-dispatchers":"DISPATCHERS","no-further-data":"No further data for current parameters","loading-further-data":"Loading...","route-length":"Route length:","station-count":"Stations:","dispatcher-name":"Created by","timetable-day":"Timetable created at","timetable-active":"ACTIVE","timetable-fulfilled":"FULFILLED","timetable-abandoned":"ABANDONED","online-since":"ONLINE SINCE","duty-lasted":"The duty lasted",minutes:"{minutes} mins",hours:"{hours}h {minutes} mins","stock-info":"STOCK INFO","stock-length":"Length","stock-mass":"Mass","stock-max-speed":"Maximum registered speed","load-data":"Load further data...","last-seen-at":"Last seen at","currently-at":"Currently at","stats-title":"DRIVING STATISTICS OF","stats-timetables":"TIMETABLES","stats-longest-timetable":"LONGEST TIMETABLE","stats-avg-timetable":"AVERAGE TIMETABLE LENGTH","stats-distance":"DISTANCE","stats-stations":"STATIONS","timetable-stats-total":"Today, dispatchers made so far {count} with total distance of {distance}","timetable-stats-longest":"Today's the longest timetable is #{id} made by {author} for {driver} - {distance}","timetable-stats-most-active":"The most active dispatcher is {dispatcher} who created {count}","timetable-count":"timetable | timetables","daily-stats-title":"DAILY STATS","daily-stats-info":"Today's statistics are unavailable yet!","driver-stats-title":"DRIVER STATS","driver-stats-info":"Enter a proper nickname into filters [F] to see user's driving statistics!","stats-loading":"Fetching statistics...","stats-error":"Oops! An unexpected error occurred while trying to fetch statistics! :/"},yw={users:"PLAYERS ONLINE",spawns:"OPEN SPAWNS",timetables:"ACTIVE TIMETABLES","no-timetables":"No active timetables!",offline:"Scenery is offline","no-users":"NO ACTIVE PLAYERS","no-spawns":"NO OPEN SPAWNS","no-scenery":"Oops! This scenery doesn't exist!","return-btn":"Return to main site","history-btn":"View the dispatcher history","info-btn":"Return to the scenery view","authors-title":"Scenery author | Scenery authors","lines-title":"Real lines","project-title":"Project name","one-way-routes":"One way routes","two-way-routes":"Two way routes","option-active-timetables":"Active timetables","option-timetables-history":"Scenery timetables history","option-dispatchers-history":"Scenery dispatchers history","timetable-author-title":"Issued by","timetable-author-unknown":"Author unknown","req-level":"all dispatcher levels | dispatcher level {lvl} required | dispatcher level {lvl} required","history-list-empty":"No recorded scenery history!","forum-topic":"Official {name} forum topic"},bw={title:"Availability",default:"in-game",nonDefault:"additional",unavailable:"unavailable",nonPublic:"private",abandoned:"abandoned"},vw={"timetable-only":"Switch to timetable-only view",end:"Timetable terminates here",terminated:"Timetable terminated",begins:"BEGINS HERE",terminates:`TERMINATES
-HERE`},Sw={title:"TIMETABLE JOURNAL","search-train":"Train no.","search-driver":"Driver name"},Ew={app:aw,update:lw,"data-status":{"S1a-connection":"S1a signal
Cannot connect with Stacjownik API service!","S1a-sceneries":"S1a signal
Cannot load online stations data!",S2:"S2 signal
All data loaded successfully!",S3:"S3 signal
Loading data...","S5-timetables":"S5 signal
Timetables might be incorrect or missing!","S5-dispatchers":"S5 signal
Cannot load dispatchers status data!","S5-trains":"S5 signal
Cannot load online trains data!"},desc:cw,signals:uw,controls:fw,status:dw,options:hw,filters:pw,sceneries:mw,trains:gw,journal:_w,scenery:yw,availability:bw,timetables:vw,history:Sw},ww={sceneries:"SCENERIE",trains:"POCIĄGI",journal:"DZIENNIK",loading:"Pobieranie danych...",support:"Wspomóż projekt",error:"Wystąpił problem z załadowaniem danych!","no-result":"Brak wyników o podanych kryteriach!","migration-warning":"Usługi Stacjownika będą niedostępne w godzinach 1:00-3:00 2 czerwca 2022r. z powodu migracji hostingów API!","migration-confirm":"Przyjąłem!"},Tw={title:"Nowa wersja Stacjownika jest dostępna!",paragraph1:"Miłego korzystania z aplikacji i niech S2 będzie z wami!","release-link":"Kliknij, aby przejrzeć listę zmian (GitHub)","confirm-button":"Przyjąłem!"},Aw={"control-type":"Sterowanie: ","signals-type":"Sygnalizacja: ",SBL:"Sceneria posiada SBL na szlakach: ",SUP:"Wymaga programu SUP do kontroli systemu RASP-UZK","TWB-all":"Sceneria posiada blokadę dwukierunkową na wszystkich szlakach","TWB-routes":"Sceneria posiada blokadę dwukierunkową na szlakach: ",default:"Sceneria dostępna domyślnie w paczce z grą","non-public":"Sceneria niepubliczna",unavailable:"Sceneria niedostępna",unknown:"Nieznana sceneria",real:"Sceneria z realnymi liniami kolejowymi: ",abandoned:"Sceneria wycofana z rozgrywki"},kw={title:"Sygnalizacja",współczesna:"współczesna",mieszana:"mieszana",kształtowa:"kształtowa",historyczna:"historyczna"},Lw={title:"Sterowanie",SPK:"SPK",SCS:"SCS","SCS-SPK":"SCS/SPK",SPE:"SPE",ręczne:"ręczne","ręczne+SPK":"ręczne z SPK","ręczne+SCS":"ręczne z SCS",mechaniczne:"mechaniczne","mechaniczne+SPK":"mechaniczne z SPK","mechaniczne+SCS":"mechaniczne z SCS"},Nw={online:"DO ",free:"WOLNA",ending:"KOŃCZY","not-signed":"NIEZALOGOWANY","no-limit":"BEZ LIMITU",unavailable:"NIEDOSTĘPNY",brb:"Z/W","no-space":"BRAK MIEJSCA",unknown:"NIEZNANY"},Cw={filters:"FILTRY",donate:"WESPRZYJ","search-button":"Szukaj","reset-button":"Zresetuj","sort-title":"SORTUJ WG:","filter-title":"FILTRUJ WG:","search-title":"SZUKAJ:","search-train-no":"Nr pociągu","search-train":"Nr pociągu / #","search-driver":"Nick maszynisty","search-dispatcher":"Nick dyżurnego","search-station":"Nazwa scenerii","search-author":"Nick autora rozkładu jazdy","search-date":"Data rozkładu jazdy (czas polski)","sort-distance":"kilometraż","sort-total-stops":"stacje","sort-beginDate":"data","sort-timetableId":"ID rozkładu","sort-timestampFrom":"data","sort-duration":"czas dyżuru","sort-mass":"masa","sort-speed":"prędkość","sort-length":"długość","sort-timetable":"nr pociągu","sort-progress":"przebyta trasa","sort-delay":"opóźnienie","sort-comments":"uwagi ekspl.","filter-comments":"UWAGI EKSPLOATACYJNE","filter-twr":"TWR","filter-skr":"PRZEKR. SKRAJNIA","filter-passenger":"PASAŻERSKIE","filter-freight":"TOWAROWE","filter-other":"INNE","filter-noTimetable":"BEZ RJ","filter-reset":"ZRESETUJ FILTRY","filter-clear":"WYŁĄCZ FILTRY","filter-all":"WSZYSTKIE","filter-abandoned":"PORZUCONE","filter-fulfilled":"WYPEŁNIONE","filter-active":"AKTYWNE"},Ow={endingStatus:"KOŃCZY",afkStatus:"Z/W",noSpaceStatus:"BRAK MIEJSCA",unavailableStatus:"NIEDOSTĘPNY",title:"FILTRUJ STACJE",default:"DOMYŚLNA","not-default":"POZA PACZKĄ",real:"REALNA",fictional:"FIKCYJNA",unavailable:"NIEDOSTĘPNA","non-public":"NIEPUBLICZNA",abandoned:"WYCOFANA",SPK:"SPK",SCS:"SCS",SPE:"SPE",manual:"RĘCZNE",SUP:"SUP",SBL:"SBL",mechanical:"MECHANICZNE",modern:"WSPÓŁCZESNA",semaphores:"KSZTAŁTOWA",mixed:"MIESZANA",historical:"HISTORYCZNA",free:"WOLNA",occupied:"ZAJĘTA",sliders:{"min-lvl":"MIN. WYMAGANY POZIOM DYŻURNEGO","max-lvl":"MAKS. WYMAGANY POZIOM DYŻURNEGO","routes-1t-cat":"SZLAKI JEDNOTOROWE ZELEKTR. (MINIMUM)","routes-1t-other":"SZLAKI JEDNOTOROWE NIEZELEKTR. (MINIMUM)","routes-2t-cat":"SZLAKI DWUTOROWE ZELEKTR. (MINIMUM)","routes-2t-other":"SZLAKI DWUTOROWE NIEZELEKTR. (MINIMUM)"},"authors-search":"Szukaj autora (uwzględnia inne filtry)","minimum-hours-title":"POKAŻ TYLKO SCENERIE DOSTĘPNE MINIMUM DO:",now:"TERAZ",hour:" godz.","no-limit":"BEZ LIMITU","include-selected":"POKAŻ ZAZNACZONE",save:"ZAPISZ FILTRY",reset:"RESETUJ FILTRY",close:"ZAMKNIJ FILTRY"},Iw={station:"Stacja","min-lvl":`Min. poziom
-dyżurnego`,status:"Status",dispatcher:"Dyżurny","dispatcher-lvl":`Poziom
-dyżurnego`,routes:`Szlaki
-2tor / 1tor`,general:`Informacje
-ogólne`,users:"Maszyniści online",spawns:"Otwarte spawny",timetables:"Aktywne rozkłady jazdy","no-stations":"Brak stacji do wyświetlenia!","scenery-search":"Wyszukaj scenerię..."},Rw={"no-trains":"Brak pociągów do wyświetlenia!",loading:"Pobieranie danych o pociągach...",offline:"Przejazd offline",stats:"STATYSTYKI RUCHU","stats-speed":"PRĘDKOŚCI POCIĄGÓW (MIN, ŚR, MAX) [km/h]","stats-length":"DŁUGOŚCI ROZKŁADÓW (MIN, ŚR, MAX) [km]","stats-categories":"KATEGORIE RJ","stats-special-twr":"WYSOKIEGO RYZYKA","stats-special-skr":"PRZEKROCZONA SKRAJNIA","stats-locos":"NAJCZĘSTSZE JEDNOSTKI","current-scenery":"na scenerii","current-signal":"przy semaforze","current-track":"na szlaku",delayed:"Opóźniony: ",preponed:"Przed czasem: ","on-time":"Planowo","route-progress":"Postęp: ","detailed-timetable":"Szczegółowy rozkład jazdy pociągu ","via-title":"Przez: ","no-timetable":"brak rozkładu jazdy","distance-exceeded":"Uwaga! Z powodu wewnętrznego błędu serwera TD2, rozkłady jazdy o kilometrażu powyżej 200km mogą być niepoprawne!",cars:"Wagony",EZT:"EZT",SZT:"SZT","loco-electric":"Elektrowóz","loco-diesel":"Spalinowóz","timetable-comments":"Pociąg z uwagami eksploatacyjnymi",comment:"Uwagi eksploatacyjne dla: ","table-limit":"Dla płynności działania strony pokazanych jest tylko 10 pociągów zgodnie z wybranymi filtrami.","last-seen-now":"od niedawna","last-seen-min":"od minuty","last-seen-ago":"od {minutes} minut","scenery-offline":"Przejazd offline",timeout:"Wystąpił problem z aktualizacją rozkładów jazdy z SWDR"},Dw={title:"HISTORIA DYŻURÓW",loading:"Ładowanie historii dyżurów...","no-history":"Brak historii dyżurów dla tej scenerii!","section-timetables":"ROZKŁADY JAZDY","section-dispatchers":"DYŻURNI","no-further-data":"Brak dalszych wyników dla podanych parametrów","loading-further-data":"Ładowanie...","online-since":"ONLINE OD","duty-lasted":"Dyżur trwał",minutes:"{minutes} min.",hours:"{hours} godz. {minutes} min.","route-length":"Kilometraż:","station-count":"Stacje:","dispatcher-name":"Wystawiony przez dyżurnego","timetable-day":"Rozkład z dnia","timetable-active":"AKTYWNY","timetable-fulfilled":"WYPEŁNIONY","timetable-abandoned":"PORZUCONY","stock-info":"INFORMACJE O SKŁADZIE","stock-length":"Długość","stock-mass":"Masa","stock-max-speed":"Maks. zarejestrowana prędkość","load-data":"Pobierz dalszą historię...","stats-title":"STATYSTYKI MASZYNISTY","last-seen-at":"Ostatnio widziany na: ","currently-at":"Obecnie na scenerii: ","stats-timetables":"ROZKŁADY JAZDY","stats-longest-timetable":"NAJDŁUŻSZY RJ","stats-avg-timetable":"ŚREDNIA DŁUGOŚĆ RJ","stats-distance":"DYSTANS","stats-stations":"STACJE","timetable-stats-total":"Dyżurni stworzyli dziś {count} o łącznym dystansie {distance}","timetable-stats-longest":"Najdłuższym rozkładem jazdy jest dzisiaj #{id} stworzony przez dyżurnego {author} dla maszynisty {driver} - {distance}","timetable-stats-most-active":"Dzisiejszym najaktywniejszym dyżurnym jest {dispatcher}, który stworzył {count}","timetable-count":"rozkład jazdy | rozkładów jazdy","daily-stats-title":"STATYSTYKI DNIA","daily-stats-info":"Dzisiejsze statystyki nie są jeszcze dostępne!","driver-stats-title":"STATYSTYKI GRACZA","driver-stats-info":"Wpisz nazwę użytkownika w filtrach [F], aby zobaczyć jego statystyki maszynisty!","stats-loading":"Pobieranie statystyk...","stats-error":"Ups! Wystąpił błąd podczas próby pobrania statystyk! :/"},$w={users:"GRACZE ONLINE",spawns:"OTWARTE SPAWNY",timetables:"AKTYWNE ROZKŁADY JAZDY","no-timetables":"Brak aktywnych rozkładów!",offline:"Sceneria jest offline","no-users":"BRAK AKTYWNYCH GRACZY","no-spawns":"BRAK OTWARTYCH SPAWNÓW","no-scenery":"Ups! Ta sceneria nie istnieje!","return-btn":"Wróć na stronę główną","history-btn":"Przejdź do widoku historii dyżurnych ruchu","info-btn":"Wróc do widoku scenerii","authors-title":"Autor scenerii | Autorzy scenerii","lines-title":"Rzeczywiste linie","project-title":"Projekt","one-way-routes":"Szlaki jednotorowe","two-way-routes":"Szlaki dwutorowe","option-active-timetables":"Aktywne rozkłady jazdy","option-timetables-history":"Historia rozkładów scenerii","option-dispatchers-history":"Historia dyżurów scenerii","timetable-author-title":"Wydany przez","timetable-author-unknown":"Autor nieznany","req-level":"ogólnodostępna | minimum {lvl} poziom dyżurnego | minimum {lvl} poziom dyżurnego","history-list-empty":"Brak historii dla tej scenerii!","forum-topic":"Oficjalny wątek scenerii {name}"},Pw={title:"Dostępność",default:"w paczce",nonDefault:"poza paczką",unavailable:"niedostępna",nonPublic:"niepubliczna",abandoned:"wycofana"},Fw={"timetable-only":"Wyodrębnij rozkłady jazdy",end:"Koniec rozkładu jazdy",terminated:"Rozkład jazdy zakończony",begins:`ROZPOCZYNA
-BIEG`,terminates:"KOŃCZY BIEG"},Mw={title:"DZIENNIK ROZKŁADÓW JAZDY"},Bw={app:ww,update:Tw,"data-status":{"S1a-connection":"Sygnał S1a
Błąd podczas próby połączenia się z API Stacjownika!","S1a-sceneries":"Sygnał S1a
Błąd podczas pobierania danych o sceneriach online!",S2:"Sygnał S2
Pomyślnie załadowano dane!",S3:"Sygnał S3
Pobieranie danych...","S5-timetables":"Sygnał S5
Rozkłady jazdy mogą być niekompletne!","S5-dispatchers":"Sygnał S5
Błąd podczas pobierania danych o statusach dyżurnych ruchu!","S5-trains":"Sygnał S5
Błąd podczas pobierania danych o pociągach online!"},desc:Aw,signals:kw,controls:Lw,status:Nw,options:Cw,filters:Ow,sceneries:Iw,trains:Rw,journal:Dw,scenery:$w,availability:Pw,timetables:Fw,history:Mw};const Oi=typeof window<"u",Uw=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",mn=e=>Uw?Symbol(e):e,jw=(e,t,n)=>xw({l:e,k:t,s:n}),xw=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ve=e=>typeof e=="number"&&isFinite(e),Hw=e=>Oo(e)==="[object Date]",pn=e=>Oo(e)==="[object RegExp]",Mr=e=>re(e)&&Object.keys(e).length===0;function Vw(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const Ye=Object.assign;let rc;const ws=()=>rc||(rc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ic(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const Ww=Object.prototype.hasOwnProperty;function Co(e,t){return Ww.call(e,t)}const Oe=Array.isArray,Me=e=>typeof e=="function",K=e=>typeof e=="string",de=e=>typeof e=="boolean",Ie=e=>e!==null&&typeof e=="object",Wf=Object.prototype.toString,Oo=e=>Wf.call(e),re=e=>Oo(e)==="[object Object]",zw=e=>e==null?"":Oe(e)||re(e)&&e.toString===Wf?JSON.stringify(e,null,2):String(e);const ve={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function Br(e,t,n={}){const{domain:s,messages:r,args:i}=n,o=e,a=new SyntaxError(String(o));return a.code=e,t&&(a.location=t),a.domain=s,a}function Kw(e){throw e}function Yw(e,t,n){return{line:e,column:t,offset:n}}function Ii(e,t,n){const s={start:e,end:t};return n!=null&&(s.source=n),s}const xt=" ",Gw="\r",tt=`
-`,qw=String.fromCharCode(8232),Jw=String.fromCharCode(8233);function Zw(e){const t=e;let n=0,s=1,r=1,i=0;const o=M=>t[M]===Gw&&t[M+1]===tt,a=M=>t[M]===tt,l=M=>t[M]===Jw,c=M=>t[M]===qw,u=M=>o(M)||a(M)||l(M)||c(M),h=()=>n,p=()=>s,b=()=>r,E=()=>i,v=M=>o(M)||l(M)||c(M)?tt:t[M],I=()=>v(n),_=()=>v(n+i);function S(){return i=0,u(n)&&(s++,r=0),o(n)&&n++,n++,r++,t[n]}function A(){return o(n+i)&&i++,i++,t[n+i]}function w(){n=0,s=1,r=1,i=0}function L(M=0){i=M}function U(){const M=n+i;for(;M!==n;)S();i=0}return{index:h,line:p,column:b,peekOffset:E,charAt:v,currentChar:I,currentPeek:_,next:S,peek:A,reset:w,resetPeek:L,skipToPeek:U}}const tn=void 0,oc="'",Xw="tokenizer";function Qw(e,t={}){const n=t.location!==!1,s=Zw(e),r=()=>s.index(),i=()=>Yw(s.line(),s.column(),s.index()),o=i(),a=r(),l={currentType:14,offset:a,startLoc:o,endLoc:o,lastType:14,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=t;function h(f,d,g,...T){const D=c();if(d.column+=g,d.offset+=g,u){const B=Ii(D.startLoc,d),j=Br(f,B,{domain:Xw,args:T});u(j)}}function p(f,d,g){f.endLoc=i(),f.currentType=d;const T={type:d};return n&&(T.loc=Ii(f.startLoc,f.endLoc)),g!=null&&(T.value=g),T}const b=f=>p(f,14);function E(f,d){return f.currentChar()===d?(f.next(),d):(h(ve.EXPECTED_TOKEN,i(),0,d),"")}function v(f){let d="";for(;f.currentPeek()===xt||f.currentPeek()===tt;)d+=f.currentPeek(),f.peek();return d}function I(f){const d=v(f);return f.skipToPeek(),d}function _(f){if(f===tn)return!1;const d=f.charCodeAt(0);return d>=97&&d<=122||d>=65&&d<=90||d===95}function S(f){if(f===tn)return!1;const d=f.charCodeAt(0);return d>=48&&d<=57}function A(f,d){const{currentType:g}=d;if(g!==2)return!1;v(f);const T=_(f.currentPeek());return f.resetPeek(),T}function w(f,d){const{currentType:g}=d;if(g!==2)return!1;v(f);const T=f.currentPeek()==="-"?f.peek():f.currentPeek(),D=S(T);return f.resetPeek(),D}function L(f,d){const{currentType:g}=d;if(g!==2)return!1;v(f);const T=f.currentPeek()===oc;return f.resetPeek(),T}function U(f,d){const{currentType:g}=d;if(g!==8)return!1;v(f);const T=f.currentPeek()===".";return f.resetPeek(),T}function M(f,d){const{currentType:g}=d;if(g!==9)return!1;v(f);const T=_(f.currentPeek());return f.resetPeek(),T}function x(f,d){const{currentType:g}=d;if(!(g===8||g===12))return!1;v(f);const T=f.currentPeek()===":";return f.resetPeek(),T}function G(f,d){const{currentType:g}=d;if(g!==10)return!1;const T=()=>{const B=f.currentPeek();return B==="{"?_(f.peek()):B==="@"||B==="%"||B==="|"||B===":"||B==="."||B===xt||!B?!1:B===tt?(f.peek(),T()):_(B)},D=T();return f.resetPeek(),D}function Z(f){v(f);const d=f.currentPeek()==="|";return f.resetPeek(),d}function ne(f){const d=v(f),g=f.currentPeek()==="%"&&f.peek()==="{";return f.resetPeek(),{isModulo:g,hasSpace:d.length>0}}function W(f,d=!0){const g=(D=!1,B="",j=!1)=>{const H=f.currentPeek();return H==="{"?B==="%"?!1:D:H==="@"||!H?B==="%"?!0:D:H==="%"?(f.peek(),g(D,"%",!0)):H==="|"?B==="%"||j?!0:!(B===xt||B===tt):H===xt?(f.peek(),g(!0,xt,j)):H===tt?(f.peek(),g(!0,tt,j)):!0},T=g();return d&&f.resetPeek(),T}function ae(f,d){const g=f.currentChar();return g===tn?tn:d(g)?(f.next(),g):null}function we(f){return ae(f,g=>{const T=g.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36})}function Ne(f){return ae(f,g=>{const T=g.charCodeAt(0);return T>=48&&T<=57})}function he(f){return ae(f,g=>{const T=g.charCodeAt(0);return T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102})}function ce(f){let d="",g="";for(;d=Ne(f);)g+=d;return g}function ue(f){I(f);const d=f.currentChar();return d!=="%"&&h(ve.EXPECTED_TOKEN,i(),0,d),f.next(),"%"}function ze(f){let d="";for(;;){const g=f.currentChar();if(g==="{"||g==="}"||g==="@"||g==="|"||!g)break;if(g==="%")if(W(f))d+=g,f.next();else break;else if(g===xt||g===tt)if(W(f))d+=g,f.next();else{if(Z(f))break;d+=g,f.next()}else d+=g,f.next()}return d}function ot(f){I(f);let d="",g="";for(;d=we(f);)g+=d;return f.currentChar()===tn&&h(ve.UNTERMINATED_CLOSING_BRACE,i(),0),g}function Je(f){I(f);let d="";return f.currentChar()==="-"?(f.next(),d+=`-${ce(f)}`):d+=ce(f),f.currentChar()===tn&&h(ve.UNTERMINATED_CLOSING_BRACE,i(),0),d}function Ue(f){I(f),E(f,"'");let d="",g="";const T=B=>B!==oc&&B!==tt;for(;d=ae(f,T);)d==="\\"?g+=bt(f):g+=d;const D=f.currentChar();return D===tt||D===tn?(h(ve.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),D===tt&&(f.next(),E(f,"'")),g):(E(f,"'"),g)}function bt(f){const d=f.currentChar();switch(d){case"\\":case"'":return f.next(),`\\${d}`;case"u":return vt(f,d,4);case"U":return vt(f,d,6);default:return h(ve.UNKNOWN_ESCAPE_SEQUENCE,i(),0,d),""}}function vt(f,d,g){E(f,d);let T="";for(let D=0;DD!=="{"&&D!=="}"&&D!==xt&&D!==tt;for(;d=ae(f,T);)g+=d;return g}function z(f){let d="",g="";for(;d=we(f);)g+=d;return g}function V(f){const d=(g=!1,T)=>{const D=f.currentChar();return D==="{"||D==="%"||D==="@"||D==="|"||!D||D===xt?T:D===tt?(T+=D,f.next(),d(g,T)):(T+=D,f.next(),d(!0,T))};return d(!1,"")}function q(f){I(f);const d=E(f,"|");return I(f),d}function ie(f,d){let g=null;switch(f.currentChar()){case"{":return d.braceNest>=1&&h(ve.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),f.next(),g=p(d,2,"{"),I(f),d.braceNest++,g;case"}":return d.braceNest>0&&d.currentType===2&&h(ve.EMPTY_PLACEHOLDER,i(),0),f.next(),g=p(d,3,"}"),d.braceNest--,d.braceNest>0&&I(f),d.inLinked&&d.braceNest===0&&(d.inLinked=!1),g;case"@":return d.braceNest>0&&h(ve.UNTERMINATED_CLOSING_BRACE,i(),0),g=be(f,d)||b(d),d.braceNest=0,g;default:let D=!0,B=!0,j=!0;if(Z(f))return d.braceNest>0&&h(ve.UNTERMINATED_CLOSING_BRACE,i(),0),g=p(d,1,q(f)),d.braceNest=0,d.inLinked=!1,g;if(d.braceNest>0&&(d.currentType===5||d.currentType===6||d.currentType===7))return h(ve.UNTERMINATED_CLOSING_BRACE,i(),0),d.braceNest=0,te(f,d);if(D=A(f,d))return g=p(d,5,ot(f)),I(f),g;if(B=w(f,d))return g=p(d,6,Je(f)),I(f),g;if(j=L(f,d))return g=p(d,7,Ue(f)),I(f),g;if(!D&&!B&&!j)return g=p(d,13,F(f)),h(ve.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,g.value),I(f),g;break}return g}function be(f,d){const{currentType:g}=d;let T=null;const D=f.currentChar();switch((g===8||g===9||g===12||g===10)&&(D===tt||D===xt)&&h(ve.INVALID_LINKED_FORMAT,i(),0),D){case"@":return f.next(),T=p(d,8,"@"),d.inLinked=!0,T;case".":return I(f),f.next(),p(d,9,".");case":":return I(f),f.next(),p(d,10,":");default:return Z(f)?(T=p(d,1,q(f)),d.braceNest=0,d.inLinked=!1,T):U(f,d)||x(f,d)?(I(f),be(f,d)):M(f,d)?(I(f),p(d,12,z(f))):G(f,d)?(I(f),D==="{"?ie(f,d)||T:p(d,11,V(f))):(g===8&&h(ve.INVALID_LINKED_FORMAT,i(),0),d.braceNest=0,d.inLinked=!1,te(f,d))}}function te(f,d){let g={type:14};if(d.braceNest>0)return ie(f,d)||b(d);if(d.inLinked)return be(f,d)||b(d);switch(f.currentChar()){case"{":return ie(f,d)||b(d);case"}":return h(ve.UNBALANCED_CLOSING_BRACE,i(),0),f.next(),p(d,3,"}");case"@":return be(f,d)||b(d);default:if(Z(f))return g=p(d,1,q(f)),d.braceNest=0,d.inLinked=!1,g;const{isModulo:D,hasSpace:B}=ne(f);if(D)return B?p(d,0,ze(f)):p(d,4,ue(f));if(W(f))return p(d,0,ze(f));break}return g}function m(){const{currentType:f,offset:d,startLoc:g,endLoc:T}=l;return l.lastType=f,l.lastOffset=d,l.lastStartLoc=g,l.lastEndLoc=T,l.offset=r(),l.startLoc=i(),s.currentChar()===tn?p(l,14):te(s,l)}return{nextToken:m,currentOffset:r,currentPosition:i,context:c}}const e0="parser",t0=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function n0(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const s=parseInt(t||n,16);return s<=55295||s>=57344?String.fromCodePoint(s):"�"}}}function s0(e={}){const t=e.location!==!1,{onError:n}=e;function s(_,S,A,w,...L){const U=_.currentPosition();if(U.offset+=w,U.column+=w,n){const M=Ii(A,U),x=Br(S,M,{domain:e0,args:L});n(x)}}function r(_,S,A){const w={type:_,start:S,end:S};return t&&(w.loc={start:A,end:A}),w}function i(_,S,A,w){_.end=S,w&&(_.type=w),t&&_.loc&&(_.loc.end=A)}function o(_,S){const A=_.context(),w=r(3,A.offset,A.startLoc);return w.value=S,i(w,_.currentOffset(),_.currentPosition()),w}function a(_,S){const A=_.context(),{lastOffset:w,lastStartLoc:L}=A,U=r(5,w,L);return U.index=parseInt(S,10),_.nextToken(),i(U,_.currentOffset(),_.currentPosition()),U}function l(_,S){const A=_.context(),{lastOffset:w,lastStartLoc:L}=A,U=r(4,w,L);return U.key=S,_.nextToken(),i(U,_.currentOffset(),_.currentPosition()),U}function c(_,S){const A=_.context(),{lastOffset:w,lastStartLoc:L}=A,U=r(9,w,L);return U.value=S.replace(t0,n0),_.nextToken(),i(U,_.currentOffset(),_.currentPosition()),U}function u(_){const S=_.nextToken(),A=_.context(),{lastOffset:w,lastStartLoc:L}=A,U=r(8,w,L);return S.type!==12?(s(_,ve.UNEXPECTED_EMPTY_LINKED_MODIFIER,A.lastStartLoc,0),U.value="",i(U,w,L),{nextConsumeToken:S,node:U}):(S.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,It(S)),U.value=S.value||"",i(U,_.currentOffset(),_.currentPosition()),{node:U})}function h(_,S){const A=_.context(),w=r(7,A.offset,A.startLoc);return w.value=S,i(w,_.currentOffset(),_.currentPosition()),w}function p(_){const S=_.context(),A=r(6,S.offset,S.startLoc);let w=_.nextToken();if(w.type===9){const L=u(_);A.modifier=L.node,w=L.nextConsumeToken||_.nextToken()}switch(w.type!==10&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(w)),w=_.nextToken(),w.type===2&&(w=_.nextToken()),w.type){case 11:w.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(w)),A.key=h(_,w.value||"");break;case 5:w.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(w)),A.key=l(_,w.value||"");break;case 6:w.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(w)),A.key=a(_,w.value||"");break;case 7:w.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(w)),A.key=c(_,w.value||"");break;default:s(_,ve.UNEXPECTED_EMPTY_LINKED_KEY,S.lastStartLoc,0);const L=_.context(),U=r(7,L.offset,L.startLoc);return U.value="",i(U,L.offset,L.startLoc),A.key=U,i(A,L.offset,L.startLoc),{nextConsumeToken:w,node:A}}return i(A,_.currentOffset(),_.currentPosition()),{node:A}}function b(_){const S=_.context(),A=S.currentType===1?_.currentOffset():S.offset,w=S.currentType===1?S.endLoc:S.startLoc,L=r(2,A,w);L.items=[];let U=null;do{const G=U||_.nextToken();switch(U=null,G.type){case 0:G.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(G)),L.items.push(o(_,G.value||""));break;case 6:G.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(G)),L.items.push(a(_,G.value||""));break;case 5:G.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(G)),L.items.push(l(_,G.value||""));break;case 7:G.value==null&&s(_,ve.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,It(G)),L.items.push(c(_,G.value||""));break;case 8:const Z=p(_);L.items.push(Z.node),U=Z.nextConsumeToken||null;break}}while(S.currentType!==14&&S.currentType!==1);const M=S.currentType===1?S.lastOffset:_.currentOffset(),x=S.currentType===1?S.lastEndLoc:_.currentPosition();return i(L,M,x),L}function E(_,S,A,w){const L=_.context();let U=w.items.length===0;const M=r(1,S,A);M.cases=[],M.cases.push(w);do{const x=b(_);U||(U=x.items.length===0),M.cases.push(x)}while(L.currentType!==14);return U&&s(_,ve.MUST_HAVE_MESSAGES_IN_PLURAL,A,0),i(M,_.currentOffset(),_.currentPosition()),M}function v(_){const S=_.context(),{offset:A,startLoc:w}=S,L=b(_);return S.currentType===14?L:E(_,A,w,L)}function I(_){const S=Qw(_,Ye({},e)),A=S.context(),w=r(0,A.offset,A.startLoc);return t&&w.loc&&(w.loc.source=_),w.body=v(S),A.currentType!==14&&s(S,ve.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,_[A.offset]||""),i(w,S.currentOffset(),S.currentPosition()),w}return{parse:I}}function It(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function r0(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function ac(e,t){for(let n=0;no;function l(v,I){o.code+=v}function c(v,I=!0){const _=I?r:"";l(i?_+" ".repeat(v):_)}function u(v=!0){const I=++o.indentLevel;v&&c(I)}function h(v=!0){const I=--o.indentLevel;v&&c(I)}function p(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:h,newline:p,helper:v=>`_${v}`,needIndent:()=>o.needIndent}}function a0(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),ts(e,t.key),t.modifier?(e.push(", "),ts(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function l0(e,t){const{helper:n,needIndent:s}=e;e.push(`${n("normalize")}([`),e.indent(s());const r=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(s());const r=t.cases.length;for(let i=0;i{const n=K(t.mode)?t.mode:"normal",s=K(t.filename)?t.filename:"message.intl",r=!!t.sourceMap,i=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
-`,o=t.needIndent?t.needIndent:n!=="arrow",a=e.helpers||[],l=o0(e,{mode:n,filename:s,sourceMap:r,breakLineCode:i,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),a.length>0&&(l.push(`const { ${a.map(h=>`${h}: _${h}`).join(", ")} } = ctx`),l.newline()),l.push("return "),ts(l,e),l.deindent(o),l.push("}");const{code:c,map:u}=l.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function d0(e,t={}){const n=Ye({},t),r=s0(n).parse(e);return i0(r,n),f0(r,n)}const zf={I18nInit:"i18n:init",FunctionTranslate:"function:translate"};const gn=[];gn[0]={w:[0],i:[3,0],["["]:[4],o:[7]};gn[1]={w:[1],["."]:[2],["["]:[4],o:[7]};gn[2]={w:[2],i:[3,0],[0]:[3,0]};gn[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};gn[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};gn[5]={["'"]:[4,0],o:8,l:[5,0]};gn[6]={['"']:[4,0],o:8,l:[6,0]};const h0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function p0(e){return h0.test(e)}function m0(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function g0(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function _0(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:p0(t)?m0(t):"*"+t}function y0(e){const t=[];let n=-1,s=0,r=0,i,o,a,l,c,u,h;const p=[];p[0]=()=>{o===void 0?o=a:o+=a},p[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},p[2]=()=>{p[0](),r++},p[3]=()=>{if(r>0)r--,s=4,p[0]();else{if(r=0,o===void 0||(o=_0(o),o===!1))return!1;p[1]()}};function b(){const E=e[n+1];if(s===5&&E==="'"||s===6&&E==='"')return n++,a="\\"+E,p[0](),!0}for(;s!==null;)if(n++,i=e[n],!(i==="\\"&&b())){if(l=g0(i),h=gn[s],c=h[l]||h.l||8,c===8||(s=c[0],c[1]!==void 0&&(u=p[c[1]],u&&(a=i,u()===!1))))return;if(s===7)return t}}const lc=new Map;function b0(e,t){return Ie(e)?e[t]:null}function v0(e,t){if(!Ie(e))return null;let n=lc.get(t);if(n||(n=y0(t),n&&lc.set(t,n)),!n)return null;const s=n.length;let r=e,i=0;for(;ie,E0=e=>"",w0="text",T0=e=>e.length===0?"":e.join(""),A0=zw;function cc(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function k0(e){const t=Ve(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Ve(e.named.count)||Ve(e.named.n))?Ve(e.named.count)?e.named.count:Ve(e.named.n)?e.named.n:t:t}function L0(e,t){t.count||(t.count=e),t.n||(t.n=e)}function N0(e={}){const t=e.locale,n=k0(e),s=Ie(e.pluralRules)&&K(t)&&Me(e.pluralRules[t])?e.pluralRules[t]:cc,r=Ie(e.pluralRules)&&K(t)&&Me(e.pluralRules[t])?cc:void 0,i=_=>_[s(n,_.length,r)],o=e.list||[],a=_=>o[_],l=e.named||{};Ve(e.pluralIndex)&&L0(n,l);const c=_=>l[_];function u(_){const S=Me(e.messages)?e.messages(_):Ie(e.messages)?e.messages[_]:!1;return S||(e.parent?e.parent.message(_):E0)}const h=_=>e.modifiers?e.modifiers[_]:S0,p=re(e.processor)&&Me(e.processor.normalize)?e.processor.normalize:T0,b=re(e.processor)&&Me(e.processor.interpolate)?e.processor.interpolate:A0,E=re(e.processor)&&K(e.processor.type)?e.processor.type:w0,I={list:a,named:c,plural:i,linked:(_,...S)=>{const[A,w]=S;let L="text",U="";S.length===1?Ie(A)?(U=A.modifier||U,L=A.type||L):K(A)&&(U=A||U):S.length===2&&(K(A)&&(U=A||U),K(w)&&(L=w||L));let M=u(_)(I);return L==="vnode"&&Oe(M)&&U&&(M=M[0]),U?h(U)(M,L):M},message:u,type:E,interpolate:b,normalize:p};return I}let Ms=null;function C0(e){Ms=e}function O0(e,t,n){Ms&&Ms.emit(zf.I18nInit,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const I0=R0(zf.FunctionTranslate);function R0(e){return t=>Ms&&Ms.emit(e,t)}const D0={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7};function $0(e,t,n){return[...new Set([n,...Oe(t)?t:Ie(t)?Object.keys(t):K(t)?[t]:[n]])]}function Kf(e,t,n){const s=K(n)?n:Ws,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let i=r.__localeChainCache.get(s);if(!i){i=[];let o=[n];for(;Oe(o);)o=uc(i,o,t);const a=Oe(t)||!re(t)?t:t.default?t.default:null;o=K(a)?[a]:a,Oe(o)&&uc(i,o,!1),r.__localeChainCache.set(s,i)}return i}function uc(e,t,n){let s=!0;for(let r=0;r`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function B0(){return{upper:(e,t)=>t==="text"&&K(e)?e.toUpperCase():t==="vnode"&&Ie(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&K(e)?e.toLowerCase():t==="vnode"&&Ie(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&K(e)?dc(e):t==="vnode"&&Ie(e)&&"__v_isVNode"in e?dc(e.children):e}}let Yf;function U0(e){Yf=e}let Gf;function j0(e){Gf=e}let qf;function x0(e){qf=e}let Jf=null;const hc=e=>{Jf=e},H0=()=>Jf;let Zf=null;const pc=e=>{Zf=e},V0=()=>Zf;let mc=0;function W0(e={}){const t=K(e.version)?e.version:M0,n=K(e.locale)?e.locale:Ws,s=Oe(e.fallbackLocale)||re(e.fallbackLocale)||K(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,r=re(e.messages)?e.messages:{[n]:{}},i=re(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},o=re(e.numberFormats)?e.numberFormats:{[n]:{}},a=Ye({},e.modifiers||{},B0()),l=e.pluralRules||{},c=Me(e.missing)?e.missing:null,u=de(e.missingWarn)||pn(e.missingWarn)?e.missingWarn:!0,h=de(e.fallbackWarn)||pn(e.fallbackWarn)?e.fallbackWarn:!0,p=!!e.fallbackFormat,b=!!e.unresolving,E=Me(e.postTranslation)?e.postTranslation:null,v=re(e.processor)?e.processor:null,I=de(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter,S=Me(e.messageCompiler)?e.messageCompiler:Yf,A=Me(e.messageResolver)?e.messageResolver:Gf||b0,w=Me(e.localeFallbacker)?e.localeFallbacker:qf||$0,L=Ie(e.fallbackContext)?e.fallbackContext:void 0,U=Me(e.onWarn)?e.onWarn:Vw,M=e,x=Ie(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,G=Ie(M.__numberFormatters)?M.__numberFormatters:new Map,Z=Ie(M.__meta)?M.__meta:{};mc++;const ne={version:t,cid:mc,locale:n,fallbackLocale:s,messages:r,modifiers:a,pluralRules:l,missing:c,missingWarn:u,fallbackWarn:h,fallbackFormat:p,unresolving:b,postTranslation:E,processor:v,warnHtmlMessage:I,escapeParameter:_,messageCompiler:S,messageResolver:A,localeFallbacker:w,fallbackContext:L,onWarn:U,__meta:Z};return ne.datetimeFormats=i,ne.numberFormats=o,ne.__datetimeFormatters=x,ne.__numberFormatters=G,__INTLIFY_PROD_DEVTOOLS__&&O0(ne,t,Z),ne}function Ro(e,t,n,s,r){const{missing:i,onWarn:o}=e;if(i!==null){const a=i(e,n,t,r);return K(a)?a:t}else return t}function ps(e,t,n){const s=e;s.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const z0=e=>e;let gc=Object.create(null);function K0(e,t={}){{const s=(t.onCacheKey||z0)(e),r=gc[s];if(r)return r;let i=!1;const o=t.onError||Kw;t.onError=c=>{i=!0,o(c)};const{code:a}=d0(e,t),l=new Function(`return ${a}`)();return i?l:gc[s]=l}}let Xf=ve.__EXTEND_POINT__;const ni=()=>++Xf,Bn={INVALID_ARGUMENT:Xf,INVALID_DATE_ARGUMENT:ni(),INVALID_ISO_DATE_ARGUMENT:ni(),__EXTEND_POINT__:ni()};function Un(e){return Br(e,null,void 0)}const _c=()=>"",Dt=e=>Me(e);function yc(e,...t){const{fallbackFormat:n,postTranslation:s,unresolving:r,messageCompiler:i,fallbackLocale:o,messages:a}=e,[l,c]=Ri(...t),u=de(c.missingWarn)?c.missingWarn:e.missingWarn,h=de(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,p=de(c.escapeParameter)?c.escapeParameter:e.escapeParameter,b=!!c.resolvedMessage,E=K(c.default)||de(c.default)?de(c.default)?i?l:()=>l:c.default:n?i?l:()=>l:"",v=n||E!=="",I=K(c.locale)?c.locale:e.locale;p&&Y0(c);let[_,S,A]=b?[l,I,a[I]||{}]:Qf(e,l,I,o,h,u),w=_,L=l;if(!b&&!(K(w)||Dt(w))&&v&&(w=E,L=w),!b&&(!(K(w)||Dt(w))||!K(S)))return r?Ur:l;let U=!1;const M=()=>{U=!0},x=Dt(w)?w:ed(e,l,S,w,L,M);if(U)return w;const G=J0(e,S,A,c),Z=N0(G),ne=G0(e,x,Z),W=s?s(ne,l):ne;if(__INTLIFY_PROD_DEVTOOLS__){const ae={timestamp:Date.now(),key:K(l)?l:Dt(w)?w.key:"",locale:S||(Dt(w)?w.locale:""),format:K(w)?w:Dt(w)?w.source:"",message:W};ae.meta=Ye({},e.__meta,H0()||{}),I0(ae)}return W}function Y0(e){Oe(e.list)?e.list=e.list.map(t=>K(t)?ic(t):t):Ie(e.named)&&Object.keys(e.named).forEach(t=>{K(e.named[t])&&(e.named[t]=ic(e.named[t]))})}function Qf(e,t,n,s,r,i){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=e,u=c(e,s,n);let h={},p,b=null;const E="translate";for(let v=0;vs;return c.locale=n,c.key=t,c}const l=o(s,q0(e,n,r,s,a,i));return l.locale=n,l.key=t,l.source=s,l}function G0(e,t,n){return t(n)}function Ri(...e){const[t,n,s]=e,r={};if(!K(t)&&!Ve(t)&&!Dt(t))throw Un(Bn.INVALID_ARGUMENT);const i=Ve(t)?String(t):(Dt(t),t);return Ve(n)?r.plural=n:K(n)?r.default=n:re(n)&&!Mr(n)?r.named=n:Oe(n)&&(r.list=n),Ve(s)?r.plural=s:K(s)?r.default=s:re(s)&&Ye(r,s),[i,r]}function q0(e,t,n,s,r,i){return{warnHtmlMessage:r,onError:o=>{throw i&&i(o),o},onCacheKey:o=>jw(t,n,o)}}function J0(e,t,n,s){const{modifiers:r,pluralRules:i,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=e,p={locale:t,modifiers:r,pluralRules:i,messages:b=>{let E=o(n,b);if(E==null&&u){const[,,v]=Qf(u,b,t,a,l,c);E=o(v,b)}if(K(E)){let v=!1;const _=ed(e,b,t,E,b,()=>{v=!0});return v?_c:_}else return Dt(E)?E:_c}};return e.processor&&(p.processor=e.processor),s.list&&(p.list=s.list),s.named&&(p.named=s.named),Ve(s.plural)&&(p.pluralIndex=s.plural),p}function bc(e,...t){const{datetimeFormats:n,unresolving:s,fallbackLocale:r,onWarn:i,localeFallbacker:o}=e,{__datetimeFormatters:a}=e,[l,c,u,h]=Di(...t),p=de(u.missingWarn)?u.missingWarn:e.missingWarn;de(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const b=!!u.part,E=K(u.locale)?u.locale:e.locale,v=o(e,r,E);if(!K(l)||l==="")return new Intl.DateTimeFormat(E,h).format(c);let I={},_,S=null;const A="datetime format";for(let U=0;U{td.includes(l)?o[l]=n[l]:i[l]=n[l]}),K(s)?i.locale=s:re(s)&&(o=s),re(r)&&(o=r),[i.key||"",a,i,o]}function vc(e,t,n){const s=e;for(const r in n){const i=`${t}__${r}`;s.__datetimeFormatters.has(i)&&s.__datetimeFormatters.delete(i)}}function Sc(e,...t){const{numberFormats:n,unresolving:s,fallbackLocale:r,onWarn:i,localeFallbacker:o}=e,{__numberFormatters:a}=e,[l,c,u,h]=$i(...t),p=de(u.missingWarn)?u.missingWarn:e.missingWarn;de(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const b=!!u.part,E=K(u.locale)?u.locale:e.locale,v=o(e,r,E);if(!K(l)||l==="")return new Intl.NumberFormat(E,h).format(c);let I={},_,S=null;const A="number format";for(let U=0;U{nd.includes(l)?o[l]=n[l]:i[l]=n[l]}),K(s)?i.locale=s:re(s)&&(o=s),re(r)&&(o=r),[i.key||"",a,i,o]}function Ec(e,t,n){const s=e;for(const r in n){const i=`${t}__${r}`;s.__numberFormatters.has(i)&&s.__numberFormatters.delete(i)}}typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ws().__INTLIFY_PROD_DEVTOOLS__=!1);const Z0="9.2.2";function X0(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ws().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ws().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ws().__INTLIFY_PROD_DEVTOOLS__=!1)}D0.__EXTEND_POINT__;let sd=ve.__EXTEND_POINT__;const rt=()=>++sd,He={UNEXPECTED_RETURN_TYPE:sd,INVALID_ARGUMENT:rt(),MUST_BE_CALL_SETUP_TOP:rt(),NOT_INSLALLED:rt(),NOT_AVAILABLE_IN_LEGACY_MODE:rt(),REQUIRED_VALUE:rt(),INVALID_VALUE:rt(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:rt(),NOT_INSLALLED_WITH_PROVIDE:rt(),UNEXPECTED_ERROR:rt(),NOT_COMPATIBLE_LEGACY_VUE_I18N:rt(),BRIDGE_SUPPORT_VUE_2_ONLY:rt(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:rt(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:rt(),__EXTEND_POINT__:rt()};function We(e,...t){return Br(e,null,void 0)}const Pi=mn("__transrateVNode"),Fi=mn("__datetimeParts"),Mi=mn("__numberParts"),rd=mn("__setPluralRules");mn("__intlifyMeta");const id=mn("__injectWithOption");function Bi(e){if(!Ie(e))return e;for(const t in e)if(Co(e,t))if(!t.includes("."))Ie(e[t])&&Bi(e[t]);else{const n=t.split("."),s=n.length-1;let r=e;for(let i=0;i{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||{},Ts(c,o[l])):Ts(c,o)}else K(a)&&Ts(JSON.parse(a),o)}),r==null&&i)for(const a in o)Co(o,a)&&Bi(o[a]);return o}const er=e=>!Ie(e)||Oe(e);function Ts(e,t){if(er(e)||er(t))throw We(He.INVALID_VALUE);for(const n in e)Co(e,n)&&(er(e[n])||er(t[n])?t[n]=e[n]:Ts(e[n],t[n]))}function od(e){return e.type}function ad(e,t,n){let s=Ie(t.messages)?t.messages:{};"__i18nGlobal"in n&&(s=jr(e.locale.value,{messages:s,__i18n:n.__i18nGlobal}));const r=Object.keys(s);r.length&&r.forEach(i=>{e.mergeLocaleMessage(i,s[i])});{if(Ie(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])})}if(Ie(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(o=>{e.mergeNumberFormat(o,t.numberFormats[o])})}}}function wc(e){return se(Us,null,e,0)}const Tc="__INTLIFY_META__";let Ac=0;function kc(e){return(t,n,s,r)=>e(n,s,Gt()||void 0,r)}const Q0=()=>{const e=Gt();let t=null;return e&&(t=od(e)[Tc])?{[Tc]:t}:null};function Do(e={},t){const{__root:n}=e,s=n===void 0;let r=de(e.inheritLocale)?e.inheritLocale:!0;const i=Se(n&&r?n.locale.value:K(e.locale)?e.locale:Ws),o=Se(n&&r?n.fallbackLocale.value:K(e.fallbackLocale)||Oe(e.fallbackLocale)||re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),a=Se(jr(i.value,e)),l=Se(re(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),c=Se(re(e.numberFormats)?e.numberFormats:{[i.value]:{}});let u=n?n.missingWarn:de(e.missingWarn)||pn(e.missingWarn)?e.missingWarn:!0,h=n?n.fallbackWarn:de(e.fallbackWarn)||pn(e.fallbackWarn)?e.fallbackWarn:!0,p=n?n.fallbackRoot:de(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,E=Me(e.missing)?e.missing:null,v=Me(e.missing)?kc(e.missing):null,I=Me(e.postTranslation)?e.postTranslation:null,_=n?n.warnHtmlMessage:de(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const A=n?n.modifiers:re(e.modifiers)?e.modifiers:{};let w=e.pluralRules||n&&n.pluralRules,L;L=(()=>{s&&pc(null);const k={version:Z0,locale:i.value,fallbackLocale:o.value,messages:a.value,modifiers:A,pluralRules:w,missing:v===null?void 0:v,missingWarn:u,fallbackWarn:h,fallbackFormat:b,unresolving:!0,postTranslation:I===null?void 0:I,warnHtmlMessage:_,escapeParameter:S,messageResolver:e.messageResolver,__meta:{framework:"vue"}};k.datetimeFormats=l.value,k.numberFormats=c.value,k.__datetimeFormatters=re(L)?L.__datetimeFormatters:void 0,k.__numberFormatters=re(L)?L.__numberFormatters:void 0;const C=W0(k);return s&&pc(C),C})(),ps(L,i.value,o.value);function M(){return[i.value,o.value,a.value,l.value,c.value]}const x=Te({get:()=>i.value,set:k=>{i.value=k,L.locale=i.value}}),G=Te({get:()=>o.value,set:k=>{o.value=k,L.fallbackLocale=o.value,ps(L,i.value,k)}}),Z=Te(()=>a.value),ne=Te(()=>l.value),W=Te(()=>c.value);function ae(){return Me(I)?I:null}function we(k){I=k,L.postTranslation=k}function Ne(){return E}function he(k){k!==null&&(v=kc(k)),E=k,L.missing=v}const ce=(k,C,Y,J,le,Ee)=>{M();let fe;if(__INTLIFY_PROD_DEVTOOLS__)try{hc(Q0()),s||(L.fallbackContext=n?V0():void 0),fe=k(L)}finally{hc(null),s||(L.fallbackContext=void 0)}else fe=k(L);if(Ve(fe)&&fe===Ur){const[$e,ft]=C();return n&&p?J(n):le($e)}else{if(Ee(fe))return fe;throw We(He.UNEXPECTED_RETURN_TYPE)}};function ue(...k){return ce(C=>Reflect.apply(yc,null,[C,...k]),()=>Ri(...k),"translate",C=>Reflect.apply(C.t,C,[...k]),C=>C,C=>K(C))}function ze(...k){const[C,Y,J]=k;if(J&&!Ie(J))throw We(He.INVALID_ARGUMENT);return ue(C,Y,Ye({resolvedMessage:!0},J||{}))}function ot(...k){return ce(C=>Reflect.apply(bc,null,[C,...k]),()=>Di(...k),"datetime format",C=>Reflect.apply(C.d,C,[...k]),()=>fc,C=>K(C))}function Je(...k){return ce(C=>Reflect.apply(Sc,null,[C,...k]),()=>$i(...k),"number format",C=>Reflect.apply(C.n,C,[...k]),()=>fc,C=>K(C))}function Ue(k){return k.map(C=>K(C)||Ve(C)||de(C)?wc(String(C)):C)}const vt={normalize:Ue,interpolate:k=>k,type:"vnode"};function F(...k){return ce(C=>{let Y;const J=C;try{J.processor=vt,Y=Reflect.apply(yc,null,[J,...k])}finally{J.processor=null}return Y},()=>Ri(...k),"translate",C=>C[Pi](...k),C=>[wc(C)],C=>Oe(C))}function z(...k){return ce(C=>Reflect.apply(Sc,null,[C,...k]),()=>$i(...k),"number format",C=>C[Mi](...k),()=>[],C=>K(C)||Oe(C))}function V(...k){return ce(C=>Reflect.apply(bc,null,[C,...k]),()=>Di(...k),"datetime format",C=>C[Fi](...k),()=>[],C=>K(C)||Oe(C))}function q(k){w=k,L.pluralRules=w}function ie(k,C){const Y=K(C)?C:i.value,J=m(Y);return L.messageResolver(J,k)!==null}function be(k){let C=null;const Y=Kf(L,o.value,i.value);for(let J=0;J{r&&(i.value=k,L.locale=k,ps(L,i.value,o.value))}),gt(n.fallbackLocale,k=>{r&&(o.value=k,L.fallbackLocale=k,ps(L,i.value,o.value))}));const P={id:Ac,locale:x,fallbackLocale:G,get inheritLocale(){return r},set inheritLocale(k){r=k,k&&n&&(i.value=n.locale.value,o.value=n.fallbackLocale.value,ps(L,i.value,o.value))},get availableLocales(){return Object.keys(a.value).sort()},messages:Z,get modifiers(){return A},get pluralRules(){return w||{}},get isGlobal(){return s},get missingWarn(){return u},set missingWarn(k){u=k,L.missingWarn=u},get fallbackWarn(){return h},set fallbackWarn(k){h=k,L.fallbackWarn=h},get fallbackRoot(){return p},set fallbackRoot(k){p=k},get fallbackFormat(){return b},set fallbackFormat(k){b=k,L.fallbackFormat=b},get warnHtmlMessage(){return _},set warnHtmlMessage(k){_=k,L.warnHtmlMessage=k},get escapeParameter(){return S},set escapeParameter(k){S=k,L.escapeParameter=k},t:ue,getLocaleMessage:m,setLocaleMessage:f,mergeLocaleMessage:d,getPostTranslationHandler:ae,setPostTranslationHandler:we,getMissingHandler:Ne,setMissingHandler:he,[rd]:q};return P.datetimeFormats=ne,P.numberFormats=W,P.rt=ze,P.te=ie,P.tm=te,P.d=ot,P.n=Je,P.getDateTimeFormat=g,P.setDateTimeFormat=T,P.mergeDateTimeFormat=D,P.getNumberFormat=B,P.setNumberFormat=j,P.mergeNumberFormat=H,P[id]=e.__injectWithOption,P[Pi]=F,P[Fi]=V,P[Mi]=z,P}function eT(e){const t=K(e.locale)?e.locale:Ws,n=K(e.fallbackLocale)||Oe(e.fallbackLocale)||re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,s=Me(e.missing)?e.missing:void 0,r=de(e.silentTranslationWarn)||pn(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=de(e.silentFallbackWarn)||pn(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=de(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=re(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Me(e.postTranslation)?e.postTranslation:void 0,h=K(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,b=de(e.sync)?e.sync:!0;let E=e.messages;if(re(e.sharedMessages)){const L=e.sharedMessages;E=Object.keys(L).reduce((M,x)=>{const G=M[x]||(M[x]={});return Ye(G,L[x]),M},E||{})}const{__i18n:v,__root:I,__injectWithOption:_}=e,S=e.datetimeFormats,A=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:n,messages:E,flatJson:w,datetimeFormats:S,numberFormats:A,missing:s,missingWarn:r,fallbackWarn:i,fallbackRoot:o,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:h,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:b,__i18n:v,__root:I,__injectWithOption:_}}function Ui(e={},t){{const n=Do(eT(e)),s={id:n.id,get locale(){return n.locale.value},set locale(r){n.locale.value=r},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(r){n.fallbackLocale.value=r},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(r){},get missing(){return n.getMissingHandler()},set missing(r){n.setMissingHandler(r)},get silentTranslationWarn(){return de(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(r){n.missingWarn=de(r)?!r:r},get silentFallbackWarn(){return de(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(r){n.fallbackWarn=de(r)?!r:r},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(r){n.fallbackFormat=r},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(r){n.setPostTranslationHandler(r)},get sync(){return n.inheritLocale},set sync(r){n.inheritLocale=r},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){n.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(r){n.escapeParameter=r},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(r){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...r){const[i,o,a]=r,l={};let c=null,u=null;if(!K(i))throw We(He.INVALID_ARGUMENT);const h=i;return K(o)?l.locale=o:Oe(o)?c=o:re(o)&&(u=o),Oe(a)?c=a:re(a)&&(u=a),Reflect.apply(n.t,n,[h,c||u||{},l])},rt(...r){return Reflect.apply(n.rt,n,[...r])},tc(...r){const[i,o,a]=r,l={plural:1};let c=null,u=null;if(!K(i))throw We(He.INVALID_ARGUMENT);const h=i;return K(o)?l.locale=o:Ve(o)?l.plural=o:Oe(o)?c=o:re(o)&&(u=o),K(a)?l.locale=a:Oe(a)?c=a:re(a)&&(u=a),Reflect.apply(n.t,n,[h,c||u||{},l])},te(r,i){return n.te(r,i)},tm(r){return n.tm(r)},getLocaleMessage(r){return n.getLocaleMessage(r)},setLocaleMessage(r,i){n.setLocaleMessage(r,i)},mergeLocaleMessage(r,i){n.mergeLocaleMessage(r,i)},d(...r){return Reflect.apply(n.d,n,[...r])},getDateTimeFormat(r){return n.getDateTimeFormat(r)},setDateTimeFormat(r,i){n.setDateTimeFormat(r,i)},mergeDateTimeFormat(r,i){n.mergeDateTimeFormat(r,i)},n(...r){return Reflect.apply(n.n,n,[...r])},getNumberFormat(r){return n.getNumberFormat(r)},setNumberFormat(r,i){n.setNumberFormat(r,i)},mergeNumberFormat(r,i){n.mergeNumberFormat(r,i)},getChoiceIndex(r,i){return-1},__onComponentInstanceCreated(r){const{componentInstanceCreatedListener:i}=e;i&&i(r,s)}};return s}}const $o={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function tT({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,r)=>s=[...s,...Oe(r.children)?r.children:[r]],[]):t.reduce((n,s)=>{const r=e[s];return r&&(n[s]=r()),n},{})}function ld(e){return Le}const Lc={name:"i18n-t",props:Ye({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ve(e)||!isNaN(e)}},$o),setup(e,t){const{slots:n,attrs:s}=t,r=e.i18n||Po({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(h=>h!=="_"),o={};e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=K(e.plural)?+e.plural:e.plural);const a=tT(t,i),l=r[Pi](e.keypath,a,o),c=Ye({},s),u=K(e.tag)||Ie(e.tag)?e.tag:ld();return js(u,c,l)}}};function nT(e){return Oe(e)&&!K(e[0])}function cd(e,t,n,s){const{slots:r,attrs:i}=t;return()=>{const o={part:!0};let a={};e.locale&&(o.locale=e.locale),K(e.format)?o.key=e.format:Ie(e.format)&&(K(e.format.key)&&(o.key=e.format.key),a=Object.keys(e.format).reduce((p,b)=>n.includes(b)?Ye({},p,{[b]:e.format[b]}):p,{}));const l=s(e.value,o,a);let c=[o.key];Oe(l)?c=l.map((p,b)=>{const E=r[p.type],v=E?E({[p.type]:p.value,index:b,parts:l}):[p.value];return nT(v)&&(v[0].key=`${p.type}-${b}`),v}):K(l)&&(c=[l]);const u=Ye({},i),h=K(e.tag)||Ie(e.tag)?e.tag:ld();return js(h,u,c)}}const Nc={name:"i18n-n",props:Ye({value:{type:Number,required:!0},format:{type:[String,Object]}},$o),setup(e,t){const n=e.i18n||Po({useScope:"parent",__useComponent:!0});return cd(e,t,nd,(...s)=>n[Mi](...s))}},Cc={name:"i18n-d",props:Ye({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},$o),setup(e,t){const n=e.i18n||Po({useScope:"parent",__useComponent:!0});return cd(e,t,td,(...s)=>n[Fi](...s))}};function sT(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const s=n.__getInstance(t);return s!=null?s.__composer:e.global.__composer}}function rT(e){const t=o=>{const{instance:a,modifiers:l,value:c}=o;if(!a||!a.$)throw We(He.UNEXPECTED_ERROR);const u=sT(e,a.$),h=Oc(c);return[Reflect.apply(u.t,u,[...Ic(h)]),u]};return{created:(o,a)=>{const[l,c]=t(a);Oi&&e.global===c&&(o.__i18nWatcher=gt(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{Oi&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=Oc(a);o.textContent=Reflect.apply(l.t,l,[...Ic(c)])}},getSSRProps:o=>{const[a]=t(o);return{textContent:a}}}}function Oc(e){if(K(e))return{path:e};if(re(e)){if(!("path"in e))throw We(He.REQUIRED_VALUE,"path");return e}else throw We(He.INVALID_VALUE)}function Ic(e){const{path:t,locale:n,args:s,choice:r,plural:i}=e,o={},a=s||{};return K(n)&&(o.locale=n),Ve(r)&&(o.plural=r),Ve(i)&&(o.plural=i),[t,a,o]}function iT(e,t,...n){const s=re(n[0])?n[0]:{},r=!!s.useI18nComponentName;(de(s.globalInstall)?s.globalInstall:!0)&&(e.component(r?"i18n":Lc.name,Lc),e.component(Nc.name,Nc),e.component(Cc.name,Cc)),e.directive("t",rT(t))}function oT(e,t,n){return{beforeCreate(){const s=Gt();if(!s)throw We(He.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const i=r.i18n;r.__i18n&&(i.__i18n=r.__i18n),i.__root=t,this===this.$root?this.$i18n=Rc(e,i):(i.__injectWithOption=!0,this.$i18n=Ui(i))}else r.__i18n?this===this.$root?this.$i18n=Rc(e,r):this.$i18n=Ui({__i18n:r.__i18n,__injectWithOption:!0,__root:t}):this.$i18n=e;r.__i18nGlobal&&ad(t,r,r),e.__onComponentInstanceCreated(this.$i18n),n.__setInstance(s,this.$i18n),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,o)=>this.$i18n.te(i,o),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i)},mounted(){},unmounted(){const s=Gt();if(!s)throw We(He.UNEXPECTED_ERROR);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__deleteInstance(s),delete this.$i18n}}}function Rc(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[rd](t.pluralizationRules||e.pluralizationRules);const n=jr(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(s=>e.mergeLocaleMessage(s,n[s])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(s=>e.mergeDateTimeFormat(s,t.datetimeFormats[s])),t.numberFormats&&Object.keys(t.numberFormats).forEach(s=>e.mergeNumberFormat(s,t.numberFormats[s])),e}const aT=mn("global-vue-i18n");function lT(e={},t){const n=__VUE_I18N_LEGACY_API__&&de(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,s=de(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,i=new Map,[o,a]=cT(e,n),l=mn("");function c(p){return i.get(p)||null}function u(p,b){i.set(p,b)}function h(p){i.delete(p)}{const p={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return r},async install(b,...E){b.__VUE_I18N_SYMBOL__=l,b.provide(b.__VUE_I18N_SYMBOL__,p),!n&&s&&yT(b,p.global),__VUE_I18N_FULL_INSTALL__&&iT(b,p,...E),__VUE_I18N_LEGACY_API__&&n&&b.mixin(oT(a,a.__composer,p));const v=b.unmount;b.unmount=()=>{p.dispose(),v()}},get global(){return a},dispose(){o.stop()},__instances:i,__getInstance:c,__setInstance:u,__deleteInstance:h};return p}}function Po(e={}){const t=Gt();if(t==null)throw We(He.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw We(He.NOT_INSLALLED);const n=uT(t),s=dT(n),r=od(t),i=fT(e,r);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw We(He.NOT_AVAILABLE_IN_LEGACY_MODE);return mT(t,i,s,e)}if(i==="global")return ad(s,e,r),s;if(i==="parent"){let l=hT(n,t,e.__useComponent);return l==null&&(l=s),l}const o=n;let a=o.__getInstance(t);if(a==null){const l=Ye({},e);"__i18n"in r&&(l.__i18n=r.__i18n),s&&(l.__root=s),a=Do(l),pT(o,t),o.__setInstance(t,a)}return a}function cT(e,t,n){const s=zi();{const r=__VUE_I18N_LEGACY_API__&&t?s.run(()=>Ui(e)):s.run(()=>Do(e));if(r==null)throw We(He.UNEXPECTED_ERROR);return[s,r]}}function uT(e){{const t=st(e.isCE?aT:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw We(e.isCE?He.NOT_INSLALLED_WITH_PROVIDE:He.UNEXPECTED_ERROR);return t}}function fT(e,t){return Mr(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function dT(e){return e.mode==="composition"?e.global:e.global.__composer}function hT(e,t,n=!1){let s=null;const r=t.root;let i=t.parent;for(;i!=null;){const o=e;if(e.mode==="composition")s=o.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(i);a!=null&&(s=a.__composer,n&&s&&!s[id]&&(s=null))}if(s!=null||r===i)break;i=i.parent}return s}function pT(e,t,n){kr(()=>{},t),io(()=>{e.__deleteInstance(t)},t)}function mT(e,t,n,s={}){const r=t==="local",i=Qc(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw We(He.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=de(s.inheritLocale)?s.inheritLocale:!0,a=Se(r&&o?n.locale.value:K(s.locale)?s.locale:Ws),l=Se(r&&o?n.fallbackLocale.value:K(s.fallbackLocale)||Oe(s.fallbackLocale)||re(s.fallbackLocale)||s.fallbackLocale===!1?s.fallbackLocale:a.value),c=Se(jr(a.value,s)),u=Se(re(s.datetimeFormats)?s.datetimeFormats:{[a.value]:{}}),h=Se(re(s.numberFormats)?s.numberFormats:{[a.value]:{}}),p=r?n.missingWarn:de(s.missingWarn)||pn(s.missingWarn)?s.missingWarn:!0,b=r?n.fallbackWarn:de(s.fallbackWarn)||pn(s.fallbackWarn)?s.fallbackWarn:!0,E=r?n.fallbackRoot:de(s.fallbackRoot)?s.fallbackRoot:!0,v=!!s.fallbackFormat,I=Me(s.missing)?s.missing:null,_=Me(s.postTranslation)?s.postTranslation:null,S=r?n.warnHtmlMessage:de(s.warnHtmlMessage)?s.warnHtmlMessage:!0,A=!!s.escapeParameter,w=r?n.modifiers:re(s.modifiers)?s.modifiers:{},L=s.pluralRules||r&&n.pluralRules;function U(){return[a.value,l.value,c.value,u.value,h.value]}const M=Te({get:()=>i.value?i.value.locale.value:a.value,set:d=>{i.value&&(i.value.locale.value=d),a.value=d}}),x=Te({get:()=>i.value?i.value.fallbackLocale.value:l.value,set:d=>{i.value&&(i.value.fallbackLocale.value=d),l.value=d}}),G=Te(()=>i.value?i.value.messages.value:c.value),Z=Te(()=>u.value),ne=Te(()=>h.value);function W(){return i.value?i.value.getPostTranslationHandler():_}function ae(d){i.value&&i.value.setPostTranslationHandler(d)}function we(){return i.value?i.value.getMissingHandler():I}function Ne(d){i.value&&i.value.setMissingHandler(d)}function he(d){return U(),d()}function ce(...d){return i.value?he(()=>Reflect.apply(i.value.t,null,[...d])):he(()=>"")}function ue(...d){return i.value?Reflect.apply(i.value.rt,null,[...d]):""}function ze(...d){return i.value?he(()=>Reflect.apply(i.value.d,null,[...d])):he(()=>"")}function ot(...d){return i.value?he(()=>Reflect.apply(i.value.n,null,[...d])):he(()=>"")}function Je(d){return i.value?i.value.tm(d):{}}function Ue(d,g){return i.value?i.value.te(d,g):!1}function bt(d){return i.value?i.value.getLocaleMessage(d):{}}function vt(d,g){i.value&&(i.value.setLocaleMessage(d,g),c.value[d]=g)}function F(d,g){i.value&&i.value.mergeLocaleMessage(d,g)}function z(d){return i.value?i.value.getDateTimeFormat(d):{}}function V(d,g){i.value&&(i.value.setDateTimeFormat(d,g),u.value[d]=g)}function q(d,g){i.value&&i.value.mergeDateTimeFormat(d,g)}function ie(d){return i.value?i.value.getNumberFormat(d):{}}function be(d,g){i.value&&(i.value.setNumberFormat(d,g),h.value[d]=g)}function te(d,g){i.value&&i.value.mergeNumberFormat(d,g)}const m={get id(){return i.value?i.value.id:-1},locale:M,fallbackLocale:x,messages:G,datetimeFormats:Z,numberFormats:ne,get inheritLocale(){return i.value?i.value.inheritLocale:o},set inheritLocale(d){i.value&&(i.value.inheritLocale=d)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(c.value)},get modifiers(){return i.value?i.value.modifiers:w},get pluralRules(){return i.value?i.value.pluralRules:L},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:p},set missingWarn(d){i.value&&(i.value.missingWarn=d)},get fallbackWarn(){return i.value?i.value.fallbackWarn:b},set fallbackWarn(d){i.value&&(i.value.missingWarn=d)},get fallbackRoot(){return i.value?i.value.fallbackRoot:E},set fallbackRoot(d){i.value&&(i.value.fallbackRoot=d)},get fallbackFormat(){return i.value?i.value.fallbackFormat:v},set fallbackFormat(d){i.value&&(i.value.fallbackFormat=d)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:S},set warnHtmlMessage(d){i.value&&(i.value.warnHtmlMessage=d)},get escapeParameter(){return i.value?i.value.escapeParameter:A},set escapeParameter(d){i.value&&(i.value.escapeParameter=d)},t:ce,getPostTranslationHandler:W,setPostTranslationHandler:ae,getMissingHandler:we,setMissingHandler:Ne,rt:ue,d:ze,n:ot,tm:Je,te:Ue,getLocaleMessage:bt,setLocaleMessage:vt,mergeLocaleMessage:F,getDateTimeFormat:z,setDateTimeFormat:V,mergeDateTimeFormat:q,getNumberFormat:ie,setNumberFormat:be,mergeNumberFormat:te};function f(d){d.locale.value=a.value,d.fallbackLocale.value=l.value,Object.keys(c.value).forEach(g=>{d.mergeLocaleMessage(g,c.value[g])}),Object.keys(u.value).forEach(g=>{d.mergeDateTimeFormat(g,u.value[g])}),Object.keys(h.value).forEach(g=>{d.mergeNumberFormat(g,h.value[g])}),d.escapeParameter=A,d.fallbackFormat=v,d.fallbackRoot=E,d.fallbackWarn=b,d.missingWarn=p,d.warnHtmlMessage=S}return _u(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw We(He.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const d=i.value=e.proxy.$i18n.__composer;t==="global"?(a.value=d.locale.value,l.value=d.fallbackLocale.value,c.value=d.messages.value,u.value=d.datetimeFormats.value,h.value=d.numberFormats.value):r&&f(d)}),m}const gT=["locale","fallbackLocale","availableLocales"],_T=["t","rt","d","n","tm"];function yT(e,t){const n=Object.create(null);gT.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r)throw We(He.UNEXPECTED_ERROR);const i=Pe(r.value)?{get(){return r.value.value},set(o){r.value.value=o}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,i)}),e.config.globalProperties.$i18n=n,_T.forEach(s=>{const r=Object.getOwnPropertyDescriptor(t,s);if(!r||!r.value)throw We(He.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,r)})}U0(K0);j0(v0);x0(Kf);X0();if(__INTLIFY_PROD_DEVTOOLS__){const e=ws();e.__INTLIFY__=!0,C0(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const bT=lT({locale:"pl",legacy:!1,fallbackLocale:"pl",messages:{en:Ew,pl:Bw},enableLegacy:!1}),vT={mounted(e,t){e.clickOutsideEvent=n=>{e==n.target||e.contains(n.target)||t.value()},document.addEventListener("click",e.clickOutsideEvent)}};Vp(iv).provide("isFilterCardVisible",Se(!1)).use(pg()).use(ow).use(bT).directive("click-outside",vT).mount("#app");export{Uf as A,gi as B,se as C,X as D,je as E,Le as F,Nh as G,Eo as H,Cy as I,wo as J,Se as K,No as L,yt as M,At as N,yb as O,TT as P,ST as Q,ct as R,Ml as S,is as T,kt as U,Lh as V,li as W,Fe as _,Ae as a,Vs as b,Ct as c,bg as d,Te as e,R as f,y as g,Q as h,wb as i,pt as j,De as k,$s as l,me as m,it as n,O as o,zn as p,In as q,nt as r,Rn as s,N as t,Nt as u,mS as v,ET as w,s1 as x,st as y,oo as z};
diff --git a/dist/assets/returnBtnMixin-ddf8068c.js b/dist/assets/returnBtnMixin-ddf8068c.js
deleted file mode 100644
index 986b006..0000000
--- a/dist/assets/returnBtnMixin-ddf8068c.js
+++ /dev/null
@@ -1 +0,0 @@
-import{a as e,c as o}from"./index-a65056c2.js";const t=e({mixins:[o],data(){return{icons:{arrow:this.getIcon("arrow-asc")},showReturnButton:!1}},methods:{scrollToTop(){window.scrollTo({top:0})},handleScroll(){this.showReturnButton=window.scrollY>window.innerHeight*.35}},activated(){window.addEventListener("wheel",this.handleScroll)},deactivated(){window.removeEventListener("wheel",this.handleScroll)}});export{t as r};
diff --git a/dist/assets/signal-status-indicator-54332b72.svg b/dist/assets/signal-status-indicator-54332b72.svg
deleted file mode 100644
index 2417d66..0000000
--- a/dist/assets/signal-status-indicator-54332b72.svg
+++ /dev/null
@@ -1,87 +0,0 @@
-
diff --git a/dist/assets/stacjownik-header-logo-e3348deb.svg b/dist/assets/stacjownik-header-logo-e3348deb.svg
deleted file mode 100644
index b4c0e57..0000000
--- a/dist/assets/stacjownik-header-logo-e3348deb.svg
+++ /dev/null
@@ -1,60 +0,0 @@
-
diff --git a/dist/assets/styleMixin-6b80ecca.js b/dist/assets/styleMixin-6b80ecca.js
deleted file mode 100644
index 7bdc7eb..0000000
--- a/dist/assets/styleMixin-6b80ecca.js
+++ /dev/null
@@ -1 +0,0 @@
-import{a as n}from"./index-a65056c2.js";const o=n({methods:{getControlTypeAbbrev(e){switch(e){case"mechaniczne":return"M";case"SCS-SPK":return"S/S";case"ręczne":return"R";case"mechaniczne+SPK":return"M";case"ręczne+SPK":return"R";case"mechaniczne+SCS":return"M";default:return e}}}}),i=n({methods:{calculateExpStyle(e,a=!1){const s=e>-1?e<2?"#26B0D9":`hsl(${-e*5+100}, 85%, 50%)`:"#666",r=e>14||e==-1?"white":"black",c=a?`box-shadow: 0 0 10px 2px ${s};`:"";return`background-color: ${s}; color: ${r}; ${c}`},statusClasses(e){let a="";switch(e){case"WOLNA":a="free";break;case"KOŃCZY":a="ending";break;case"NIEZALOGOWANY":a="not-signed";break;case"BEZ LIMITU":a="no-limit";break;case"NIEDOSTĘPNY":a="unavailable";break;case"Z/W":a="brb";break;case"BRAK MIEJSCA":a="no-space";break}return a}}});export{o as a,i as s};
diff --git a/dist/browserconfig.xml b/dist/browserconfig.xml
deleted file mode 100644
index b3930d0..0000000
--- a/dist/browserconfig.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
- #da532c
-
-
-
diff --git a/dist/favicon-16.png b/dist/favicon-16.png
deleted file mode 100644
index 2ba6a68..0000000
Binary files a/dist/favicon-16.png and /dev/null differ
diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png
deleted file mode 100644
index 2ba6a68..0000000
Binary files a/dist/favicon-16x16.png and /dev/null differ
diff --git a/dist/favicon-32x32.png b/dist/favicon-32x32.png
deleted file mode 100644
index 8de581c..0000000
Binary files a/dist/favicon-32x32.png and /dev/null differ
diff --git a/dist/favicon.ico b/dist/favicon.ico
deleted file mode 100644
index 64974c0..0000000
Binary files a/dist/favicon.ico and /dev/null differ
diff --git a/dist/img/icons/android-chrome-192x192.png b/dist/img/icons/android-chrome-192x192.png
deleted file mode 100644
index b02aa64..0000000
Binary files a/dist/img/icons/android-chrome-192x192.png and /dev/null differ
diff --git a/dist/img/icons/android-chrome-512x512.png b/dist/img/icons/android-chrome-512x512.png
deleted file mode 100644
index 06088b0..0000000
Binary files a/dist/img/icons/android-chrome-512x512.png and /dev/null differ
diff --git a/dist/img/icons/android-chrome-maskable-192x192.png b/dist/img/icons/android-chrome-maskable-192x192.png
deleted file mode 100644
index 791e9c8..0000000
Binary files a/dist/img/icons/android-chrome-maskable-192x192.png and /dev/null differ
diff --git a/dist/img/icons/android-chrome-maskable-512x512.png b/dist/img/icons/android-chrome-maskable-512x512.png
deleted file mode 100644
index 5f2098e..0000000
Binary files a/dist/img/icons/android-chrome-maskable-512x512.png and /dev/null differ
diff --git a/dist/img/icons/apple-touch-icon-120x120.png b/dist/img/icons/apple-touch-icon-120x120.png
deleted file mode 100644
index 1427cf6..0000000
Binary files a/dist/img/icons/apple-touch-icon-120x120.png and /dev/null differ
diff --git a/dist/img/icons/apple-touch-icon-152x152.png b/dist/img/icons/apple-touch-icon-152x152.png
deleted file mode 100644
index f24d454..0000000
Binary files a/dist/img/icons/apple-touch-icon-152x152.png and /dev/null differ
diff --git a/dist/img/icons/apple-touch-icon-180x180.png b/dist/img/icons/apple-touch-icon-180x180.png
deleted file mode 100644
index 404e192..0000000
Binary files a/dist/img/icons/apple-touch-icon-180x180.png and /dev/null differ
diff --git a/dist/img/icons/apple-touch-icon-60x60.png b/dist/img/icons/apple-touch-icon-60x60.png
deleted file mode 100644
index cf10a56..0000000
Binary files a/dist/img/icons/apple-touch-icon-60x60.png and /dev/null differ
diff --git a/dist/img/icons/apple-touch-icon-76x76.png b/dist/img/icons/apple-touch-icon-76x76.png
deleted file mode 100644
index c500769..0000000
Binary files a/dist/img/icons/apple-touch-icon-76x76.png and /dev/null differ
diff --git a/dist/img/icons/apple-touch-icon.png b/dist/img/icons/apple-touch-icon.png
deleted file mode 100644
index 03c0c5d..0000000
Binary files a/dist/img/icons/apple-touch-icon.png and /dev/null differ
diff --git a/dist/img/icons/favicon-16x16.png b/dist/img/icons/favicon-16x16.png
deleted file mode 100644
index 42af009..0000000
Binary files a/dist/img/icons/favicon-16x16.png and /dev/null differ
diff --git a/dist/img/icons/favicon-32x32.png b/dist/img/icons/favicon-32x32.png
deleted file mode 100644
index 46ca04d..0000000
Binary files a/dist/img/icons/favicon-32x32.png and /dev/null differ
diff --git a/dist/img/icons/msapplication-icon-144x144.png b/dist/img/icons/msapplication-icon-144x144.png
deleted file mode 100644
index 7808237..0000000
Binary files a/dist/img/icons/msapplication-icon-144x144.png and /dev/null differ
diff --git a/dist/img/icons/mstile-150x150.png b/dist/img/icons/mstile-150x150.png
deleted file mode 100644
index 3b37a43..0000000
Binary files a/dist/img/icons/mstile-150x150.png and /dev/null differ
diff --git a/dist/img/icons/safari-pinned-tab.svg b/dist/img/icons/safari-pinned-tab.svg
deleted file mode 100644
index e44c0d5..0000000
--- a/dist/img/icons/safari-pinned-tab.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/dist/index.html b/dist/index.html
deleted file mode 100644
index bdc238f..0000000
--- a/dist/index.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Stacjownik
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dist/mstile-150x150.png b/dist/mstile-150x150.png
deleted file mode 100644
index 1dc8716..0000000
Binary files a/dist/mstile-150x150.png and /dev/null differ
diff --git a/dist/robots.txt b/dist/robots.txt
deleted file mode 100644
index eb05362..0000000
--- a/dist/robots.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-User-agent: *
-Disallow:
diff --git a/dist/safari-pinned-tab.svg b/dist/safari-pinned-tab.svg
deleted file mode 100644
index dd3a15f..0000000
--- a/dist/safari-pinned-tab.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
diff --git a/dist/site.webmanifest b/dist/site.webmanifest
deleted file mode 100644
index 98b71b8..0000000
--- a/dist/site.webmanifest
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "Stacjownik TD2",
- "short_name": "Stacjownik",
- "icons": [
- {
- "src": "/android-chrome-192x192.png",
- "sizes": "192x192",
- "type": "image/png"
- },
- {
- "src": "/android-chrome-512x512.png",
- "sizes": "512x512",
- "type": "image/png"
- }
- ],
- "theme_color": "#ffc014",
- "background_color": "#4d4d4d",
- "display": "standalone",
- "start_url": "."
-}