diff --git a/cmd/evening_detective/main.go b/cmd/evening_detective/main.go index 0feba4d..c66be71 100644 --- a/cmd/evening_detective/main.go +++ b/cmd/evening_detective/main.go @@ -125,7 +125,7 @@ func main() { // Server gRPC-Gateway gwServer := &http.Server{ Addr: config.GrpcGatewayPort, - Handler: csp(cors(gwmux)), + Handler: cors(gwmux), } log.Printf("Serving %s for gRPC-Gateway\n", grpcGatewayHost) go func() { @@ -163,8 +163,12 @@ func main() { muxAdmin.Handle("/", fileServerAdmin) // Server admin web + adminWebServer := &http.Server{ + Addr: config.AdminClientPort, + Handler: muxAdmin, + } log.Printf("Serving %s for admin web \n", adminClientHost) - log.Fatalln(http.ListenAndServe(config.AdminClientPort, muxAdmin)) + log.Fatalln(adminWebServer.ListenAndServe()) } func cors(h http.Handler) http.Handler { @@ -179,20 +183,6 @@ func cors(h http.Handler) http.Handler { }) } -func csp(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set( - "Content-Security-Policy", - "default-src 'self'; "+ - "connect-src 'self' https://evening-detective-api.crabs-games.art; "+ - "script-src 'self'; "+ - "style-src 'self'; "+ - "img-src 'self' data:;", - ) - h.ServeHTTP(w, r) - }) -} - func loggingMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { start := time.Now() diff --git a/cmd/evening_detective/static/user/assets/index-DG2FkfFw.js b/cmd/evening_detective/static/user/assets/index-DyzSWsJq.js similarity index 92% rename from cmd/evening_detective/static/user/assets/index-DG2FkfFw.js rename to cmd/evening_detective/static/user/assets/index-DyzSWsJq.js index 6b63c15..e8ee6ef 100644 --- a/cmd/evening_detective/static/user/assets/index-DG2FkfFw.js +++ b/cmd/evening_detective/static/user/assets/index-DyzSWsJq.js @@ -22,7 +22,7 @@ * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Dt=typeof document<"u";function cl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Yu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&cl(e.default)}const re=Object.assign;function ar(e,t){const n={};for(const r in t){const s=t[r];n[r]=$e(s)?s.map(e):e(s)}return n}const cn=()=>{},$e=Array.isArray,ul=/#/g,Qu=/&/g,Xu=/\//g,Zu=/=/g,ea=/\?/g,al=/\+/g,ta=/%5B/g,na=/%5D/g,fl=/%5E/g,ra=/%60/g,dl=/%7B/g,sa=/%7C/g,hl=/%7D/g,oa=/%20/g;function bs(e){return encodeURI(""+e).replace(sa,"|").replace(ta,"[").replace(na,"]")}function ia(e){return bs(e).replace(dl,"{").replace(hl,"}").replace(fl,"^")}function Qr(e){return bs(e).replace(al,"%2B").replace(oa,"+").replace(ul,"%23").replace(Qu,"%26").replace(ra,"`").replace(dl,"{").replace(hl,"}").replace(fl,"^")}function la(e){return Qr(e).replace(Zu,"%3D")}function ca(e){return bs(e).replace(ul,"%23").replace(ea,"%3F")}function ua(e){return e==null?"":ca(e).replace(Xu,"%2F")}function mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const aa=/\/$/,fa=e=>e.replace(aa,"");function fr(e,t,n="/"){let r,s={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),s=e(o)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=ga(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:mn(i)}}function da(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ro(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ha(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Kt(t.matched[r],n.matched[s])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!pa(e[n],t[n]))return!1;return!0}function pa(e,t){return $e(e)?so(e,t):$e(t)?so(t,e):e===t}function so(e,t){return $e(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ga(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _n;(function(e){e.pop="pop",e.push="push"})(_n||(_n={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={}));function ma(e){if(!e)if(Dt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fa(e)}const _a=/^[^#]+#/;function ya(e,t){return e.replace(_a,"#")+t}function va(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qn=()=>({left:window.scrollX,top:window.scrollY});function ba(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=va(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oo(e,t){return(history.state?history.state.position-t:-1)+e}const Xr=new Map;function wa(e,t){Xr.set(e,t)}function Ea(e){const t=Xr.get(e);return Xr.delete(e),t}let Sa=()=>location.protocol+"//"+location.host;function gl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let c=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(c);return l[0]!=="/"&&(l="/"+l),ro(l,"")}return ro(n,e)+r+s}function Ca(e,t,n,r){let s=[],o=[],i=null;const c=({state:g})=>{const p=gl(e,location),b=n.value,w=t.value;let B=0;if(g){if(n.value=p,t.value=g,i&&i===b){i=null;return}B=w?g.position-w.position:0}else r(p);s.forEach(S=>{S(n.value,b,{delta:B,type:_n.pop,direction:B?B>0?un.forward:un.back:un.unknown})})};function l(){i=n.value}function a(g){s.push(g);const p=()=>{const b=s.indexOf(g);b>-1&&s.splice(b,1)};return o.push(p),p}function u(){const{history:g}=window;g.state&&g.replaceState(re({},g.state,{scroll:Qn()}),"")}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:a,destroy:f}}function io(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qn():null}}function Ra(e){const{history:t,location:n}=window,r={value:gl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Sa()+e+l;try{t[u?"replaceState":"pushState"](a,"",g),s.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(l,a){const u=re({},t.state,io(s.value.back,l,s.value.forward,!0),a,{position:s.value.position});o(l,u,!0),r.value=l}function c(l,a){const u=re({},s.value,t.state,{forward:l,scroll:Qn()});o(u.current,u,!0);const f=re({},io(r.value,l,null),{position:u.position+1},a);o(l,f,!1),r.value=l}return{location:r,state:s,push:c,replace:i}}function Pa(e){e=ma(e);const t=Ra(e),n=Ca(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=re({location:"",base:e,go:r,createHref:ya.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Aa(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}const _l=Symbol("");var lo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lo||(lo={}));function zt(e,t){return re(new Error,{type:e,[_l]:!0},t)}function rt(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const co="[^/]+?",Ta={sensitive:!1,strict:!1,start:!0,end:!0},xa=/[.+*?^${}()[\]/\\]/g;function Ia(e,t){const n=re({},Ta,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function yl(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Ba={type:0,value:""},Na=/[a-zA-Z0-9_]/;function Oa(e){if(!e)return[[]];if(e==="/")return[[Ba]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let c=0,l,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=l}for(;c{i(P)}:cn}function i(f){if(ml(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function c(){return n}function l(f){const g=Ua(f,n);n.splice(g,0,f),f.record.name&&!ho(f)&&r.set(f.record.name,f)}function a(f,g){let p,b={},w,B;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw zt(1,{location:f});B=p.record.name,b=re(ao(g.params,p.keys.filter(P=>!P.optional).concat(p.parent?p.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),f.params&&ao(f.params,p.keys.map(P=>P.name))),w=p.stringify(b)}else if(f.path!=null)w=f.path,p=n.find(P=>P.re.test(w)),p&&(b=p.parse(w),B=p.record.name);else{if(p=g.name?r.get(g.name):n.find(P=>P.re.test(g.path)),!p)throw zt(1,{location:f,currentLocation:g});B=p.record.name,b=re({},g.params,f.params),w=p.stringify(b)}const S=[];let R=p;for(;R;)S.unshift(R.record),R=R.parent;return{name:B,path:w,params:b,matched:S,meta:ka(S)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:s}}function ao(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Fa(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Fa(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ho(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ka(e){return e.reduce((t,n)=>re(t,n.meta),{})}function po(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ua(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;yl(e,t[o])<0?r=o:n=o+1}const s=Ha(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Ha(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Va(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qr(o)):[r&&Qr(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function ja(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=$e(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const qa=Symbol(""),mo=Symbol(""),Xn=Symbol(""),ws=Symbol(""),Zr=Symbol("");function Qt(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function mt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,l)=>{const a=g=>{g===!1?l(zt(4,{from:n,to:t})):g instanceof Error?l(g):Aa(g)?l(zt(2,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),c())},u=o(()=>e.call(r&&r.instances[s],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>l(g))})}function dr(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(cl(l)){const u=(l.__vccOpts||l)[t];u&&o.push(mt(u,n,r,i,c,s))}else{let a=l();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const f=Yu(u)?u.default:u;i.mods[c]=u,i.components[c]=f;const p=(f.__vccOpts||f)[t];return p&&mt(p,n,r,i,c,s)()}))}}return o}function _o(e){const t=qe(Xn),n=qe(ws),r=Ve(()=>{const l=_t(e.to);return t.resolve(l)}),s=Ve(()=>{const{matched:l}=r.value,{length:a}=l,u=l[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(Kt.bind(null,u));if(g>-1)return g;const p=yo(l[a-2]);return a>1&&yo(u)===p&&f[f.length-1].path!==p?f.findIndex(Kt.bind(null,l[a-2])):g}),o=Ve(()=>s.value>-1&&Wa(n.params,r.value.params)),i=Ve(()=>s.value>-1&&s.value===n.matched.length-1&&pl(n.params,r.value.params));function c(l={}){if(Ga(l)){const a=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:r,href:Ve(()=>r.value.href),isActive:o,isExactActive:i,navigate:c}}function $a(e){return e.length===1?e[0]:e}const Ka=Me({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"},viewTransition:Boolean},useLink:_o,setup(e,{slots:t}){const n=Kn(_o(e)),{options:r}=qe(Xn),s=Ve(()=>({[vo(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[vo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&$a(t.default(n));return e.custom?o:vs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),za=Ka;function Ga(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 Wa(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!$e(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function yo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vo=(e,t,n)=>e??t??n,Ja=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qe(Zr),s=Ve(()=>e.route||r.value),o=qe(mo,0),i=Ve(()=>{let a=_t(o);const{matched:u}=s.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),c=Ve(()=>s.value.matched[i.value]);Pn(mo,Ve(()=>i.value+1)),Pn(qa,c),Pn(Zr,s);const l=me();return on(()=>[l.value,c.value,e.name],([a,u,f],[g,p,b])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!Kt(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(w=>w(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,f=c.value,g=f&&f.components[u];if(!g)return bo(n.default,{Component:g,route:a});const p=f.props[u],b=p?p===!0?a.params:typeof p=="function"?p(a):p:null,B=vs(g,re({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bo(n.default,{Component:B,route:a})||B}}});function bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bl=Ja;function Ya(e){const t=Da(e.routes,e),n=e.parseQuery||Va,r=e.stringifyQuery||go,s=e.history,o=Qt(),i=Qt(),c=Qt(),l=lc(dt);let a=dt;Dt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ar.bind(null,y=>""+y),f=ar.bind(null,ua),g=ar.bind(null,mn);function p(y,M){let x,k;return ml(y)?(x=t.getRecordMatcher(y),k=M):k=y,t.addRoute(k,x)}function b(y){const M=t.getRecordMatcher(y);M&&t.removeRoute(M)}function w(){return t.getRoutes().map(y=>y.record)}function B(y){return!!t.getRecordMatcher(y)}function S(y,M){if(M=re({},M||l.value),typeof y=="string"){const m=fr(n,y,M.path),v=t.resolve({path:m.path},M),C=s.createHref(m.fullPath);return re(m,v,{params:g(v.params),hash:mn(m.hash),redirectedFrom:void 0,href:C})}let x;if(y.path!=null)x=re({},y,{path:fr(n,y.path,M.path).path});else{const m=re({},y.params);for(const v in m)m[v]==null&&delete m[v];x=re({},y,{params:f(m)}),M.params=f(M.params)}const k=t.resolve(x,M),ce=y.hash||"";k.params=u(g(k.params));const d=da(r,re({},y,{hash:ia(ce),path:k.path})),h=s.createHref(d);return re({fullPath:d,hash:ce,query:r===go?ja(y.query):y.query||{}},k,{redirectedFrom:void 0,href:h})}function R(y){return typeof y=="string"?fr(n,y,l.value.path):re({},y)}function P(y,M){if(a!==y)return zt(8,{from:M,to:y})}function _(y){return L(y)}function G(y){return _(re(R(y),{replace:!0}))}function N(y){const M=y.matched[y.matched.length-1];if(M&&M.redirect){const{redirect:x}=M;let k=typeof x=="function"?x(y):x;return typeof k=="string"&&(k=k.includes("?")||k.includes("#")?k=R(k):{path:k},k.params={}),re({query:y.query,hash:y.hash,params:k.path!=null?{}:y.params},k)}}function L(y,M){const x=a=S(y),k=l.value,ce=y.state,d=y.force,h=y.replace===!0,m=N(x);if(m)return L(re(R(m),{state:typeof m=="object"?re({},ce,m.state):ce,force:d,replace:h}),M||x);const v=x;v.redirectedFrom=M;let C;return!d&&ha(r,k,x)&&(C=zt(16,{to:v,from:k}),Re(k,k,!0,!1)),(C?Promise.resolve(C):j(v,k)).catch(E=>rt(E)?rt(E,2)?E:Fe(E):Z(E,v,k)).then(E=>{if(E){if(rt(E,2))return L(re({replace:h},R(E.to),{state:typeof E.to=="object"?re({},ce,E.to.state):ce,force:d}),M||v)}else E=q(v,k,!0,h,ce);return V(v,k,E),E})}function H(y,M){const x=P(y,M);return x?Promise.reject(x):Promise.resolve()}function F(y){const M=at.values().next().value;return M&&typeof M.runWithContext=="function"?M.runWithContext(y):y()}function j(y,M){let x;const[k,ce,d]=Qa(y,M);x=dr(k.reverse(),"beforeRouteLeave",y,M);for(const m of k)m.leaveGuards.forEach(v=>{x.push(mt(v,y,M))});const h=H.bind(null,y,M);return x.push(h),Pe(x).then(()=>{x=[];for(const m of o.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).then(()=>{x=dr(ce,"beforeRouteUpdate",y,M);for(const m of ce)m.updateGuards.forEach(v=>{x.push(mt(v,y,M))});return x.push(h),Pe(x)}).then(()=>{x=[];for(const m of d)if(m.beforeEnter)if($e(m.beforeEnter))for(const v of m.beforeEnter)x.push(mt(v,y,M));else x.push(mt(m.beforeEnter,y,M));return x.push(h),Pe(x)}).then(()=>(y.matched.forEach(m=>m.enterCallbacks={}),x=dr(d,"beforeRouteEnter",y,M,F),x.push(h),Pe(x))).then(()=>{x=[];for(const m of i.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).catch(m=>rt(m,8)?m:Promise.reject(m))}function V(y,M,x){c.list().forEach(k=>F(()=>k(y,M,x)))}function q(y,M,x,k,ce){const d=P(y,M);if(d)return d;const h=M===dt,m=Dt?history.state:{};x&&(k||h?s.replace(y.fullPath,re({scroll:h&&m&&m.scroll},ce)):s.push(y.fullPath,ce)),l.value=y,Re(y,M,x,h),Fe()}let U;function J(){U||(U=s.listen((y,M,x)=>{if(!ft.listening)return;const k=S(y),ce=N(k);if(ce){L(re(ce,{replace:!0,force:!0}),k).catch(cn);return}a=k;const d=l.value;Dt&&wa(oo(d.fullPath,x.delta),Qn()),j(k,d).catch(h=>rt(h,12)?h:rt(h,2)?(L(re(R(h.to),{force:!0}),k).then(m=>{rt(m,20)&&!x.delta&&x.type===_n.pop&&s.go(-1,!1)}).catch(cn),Promise.reject()):(x.delta&&s.go(-x.delta,!1),Z(h,k,d))).then(h=>{h=h||q(k,d,!1),h&&(x.delta&&!rt(h,8)?s.go(-x.delta,!1):x.type===_n.pop&&rt(h,20)&&s.go(-1,!1)),V(k,d,h)}).catch(cn)}))}let Ce=Qt(),de=Qt(),ne;function Z(y,M,x){Fe(y);const k=de.list();return k.length?k.forEach(ce=>ce(y,M,x)):console.error(y),Promise.reject(y)}function He(){return ne&&l.value!==dt?Promise.resolve():new Promise((y,M)=>{Ce.add([y,M])})}function Fe(y){return ne||(ne=!y,J(),Ce.list().forEach(([M,x])=>y?x(y):M()),Ce.reset()),y}function Re(y,M,x,k){const{scrollBehavior:ce}=e;if(!Dt||!ce)return Promise.resolve();const d=!x&&Ea(oo(y.fullPath,0))||(k||!x)&&history.state&&history.state.scroll||null;return ds().then(()=>ce(y,M,d)).then(h=>h&&ba(h)).catch(h=>Z(h,y,M))}const ge=y=>s.go(y);let Ke;const at=new Set,ft={currentRoute:l,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:w,resolve:S,options:e,push:_,replace:G,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:de.add,isReady:He,install(y){const M=this;y.component("RouterLink",za),y.component("RouterView",bl),y.config.globalProperties.$router=M,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(l)}),Dt&&!Ke&&l.value===dt&&(Ke=!0,_(s.location).catch(ce=>{}));const x={};for(const ce in dt)Object.defineProperty(x,ce,{get:()=>l.value[ce],enumerable:!0});y.provide(Xn,M),y.provide(ws,bi(x)),y.provide(Zr,l);const k=y.unmount;at.add(y),y.unmount=function(){at.delete(y),at.size<1&&(a=dt,U&&U(),U=null,l.value=dt,Ke=!1,ne=!1),k()}}};function Pe(y){return y.reduce((M,x)=>M.then(()=>F(x)),Promise.resolve())}return ft}function Qa(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iKt(a,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(a=>Kt(a,l))||s.push(l))}return[n,r,s]}function wl(){return qe(Xn)}function Xa(e){return qe(ws)}const Za=Me({__name:"App",setup(e){return(t,n)=>(ee(),Tt(_t(bl)))}}),Ue=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ef=Ue(Za,[["__scopeId","data-v-913ef6b1"]]),tf="/assets/logo_belt-DPdjjAgZ.png",nf={},rf={class:"belt-block"};function sf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow"},null,-1)),K("div",rf,[vn(e.$slots,"default",{},void 0)])])}const of=Ue(nf,[["render",sf],["__scopeId","data-v-5ed18f32"]]),lf={},cf={class:"belt-block"};function uf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow shadow-top"},null,-1)),t[1]||(t[1]=K("div",{class:"shadow shadow-bottom"},null,-1)),K("div",cf,[vn(e.$slots,"default",{},void 0)])])}const El=Ue(lf,[["render",uf],["__scopeId","data-v-0effe39e"]]),af={class:"text-with-font"},ff=Me({__name:"HeaderText",setup(e){return(t,n)=>(ee(),fe("span",af,[vn(t.$slots,"default",{},void 0)]))}}),Sl=Ue(ff,[["__scopeId","data-v-33b571eb"]]),df={},hf={class:"plate-block"},pf={class:"metal-plate-block"};function gf(e,t){return ee(),fe("div",hf,[K("div",pf,[vn(e.$slots,"default",{},void 0)]),t[0]||(t[0]=K("div",{class:"pin pin-top-left"},null,-1)),t[1]||(t[1]=K("div",{class:"pin pin-top-right"},null,-1)),t[2]||(t[2]=K("div",{class:"pin pin-bottom-right"},null,-1)),t[3]||(t[3]=K("div",{class:"pin pin-bottom-left"},null,-1))])}const kn=Ue(df,[["render",gf],["__scopeId","data-v-34e952c0"]]),mf={class:"game-header"},_f={class:"center"},yf={class:"position-right-center-block"},vf=Me({__name:"GameHeader",setup(e){return(t,n)=>(ee(),fe("div",mf,[K("div",_f,[ie(kn,{class:"controller-metal controller-metal-left"}),ie(kn,{class:"controller-metal controller-metal-right"}),n[1]||(n[1]=K("img",{alt:"Вечерний детектив",class:"logo",src:tf},null,-1)),ie(of,{class:"belt-mini"}),ie(El,{class:"belt"},{default:yt(()=>[K("div",yf,[ie(Sl,null,{default:yt(()=>n[0]||(n[0]=[qt("Вечерний детектив")])),_:1})])]),_:1})])]))}}),bf=Ue(vf,[["__scopeId","data-v-b87f05d7"]]);class xt extends Error{constructor(t="Пользователь не авторизован (401)"){super(t),this.name="UnauthorizedError",Object.setPrototypeOf(this,xt.prototype)}}const Cl=async(e,t)=>{try{const n=await fetch(Es("/team"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetTeam] error:",n),n}},Rl=async(e,t,n)=>{try{const r=await fetch(Es("/team/actions"),{method:"POST",headers:{"X-Id":Ss(e),"X-Password":t},body:JSON.stringify({place:n})});if(r.status===401)throw new xt("Ошибка авторизации");if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiLetsgo] error:",r),r}},wf=async(e,t)=>{try{const n=await fetch(Es("/game"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetGame] error:",n),n}};function Es(e){return"http://"+window.location.host.split(":")[0]+":8090"+e}function Ss(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16))))}var Nt={},hr,wo;function Ef(){return wo||(wo=1,hr=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),hr}var pr={},ht={},Eo;function It(){if(Eo)return ht;Eo=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ht.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ht.getSymbolTotalCodewords=function(r){return t[r]},ht.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ht.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},ht.isKanjiModeEnabled=function(){return typeof e<"u"},ht.toSJIS=function(r){return e(r)},ht}var gr={},So;function Cs(){return So||(So=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}}(gr)),gr}var mr,Co;function Sf(){if(Co)return mr;Co=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},mr=e,mr}var _r,Ro;function Cf(){if(Ro)return _r;Ro=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,s){const o=t*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},_r=e,_r}var yr={},Po;function Rf(){return Po||(Po=1,function(e){const t=It().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*s-2))*2,c=[o-7];for(let l=1;l=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const o=s.size;let i=0,c=0,l=0,a=null,u=null;for(let f=0;f=5&&(i+=t.N1+(c-5)),a=p,c=1),p=s.get(g,f),p===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=p,l=1)}c>=5&&(i+=t.N1+(c-5)),l>=5&&(i+=t.N1+(l-5))}return i},e.getPenaltyN2=function(s){const o=s.size;let i=0;for(let c=0;c=10&&(c===1488||c===93)&&i++,l=l<<1&2047|s.get(u,a),u>=10&&(l===1488||l===93)&&i++}return i*t.N3},e.getPenaltyN4=function(s){let o=0;const i=s.data.length;for(let l=0;l=0;){const i=o[0];for(let l=0;l0){const c=new Uint8Array(this.degree);return c.set(o,i),c}return o},Er=t,Er}var Sr={},Cr={},Rr={},No;function Al(){return No||(No=1,Rr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Rr}var Ye={},Oo;function Tl(){if(Oo)return Ye;Oo=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r + */const Dt=typeof document<"u";function cl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Yu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&cl(e.default)}const re=Object.assign;function ar(e,t){const n={};for(const r in t){const s=t[r];n[r]=$e(s)?s.map(e):e(s)}return n}const cn=()=>{},$e=Array.isArray,ul=/#/g,Qu=/&/g,Xu=/\//g,Zu=/=/g,ea=/\?/g,al=/\+/g,ta=/%5B/g,na=/%5D/g,fl=/%5E/g,ra=/%60/g,dl=/%7B/g,sa=/%7C/g,hl=/%7D/g,oa=/%20/g;function bs(e){return encodeURI(""+e).replace(sa,"|").replace(ta,"[").replace(na,"]")}function ia(e){return bs(e).replace(dl,"{").replace(hl,"}").replace(fl,"^")}function Qr(e){return bs(e).replace(al,"%2B").replace(oa,"+").replace(ul,"%23").replace(Qu,"%26").replace(ra,"`").replace(dl,"{").replace(hl,"}").replace(fl,"^")}function la(e){return Qr(e).replace(Zu,"%3D")}function ca(e){return bs(e).replace(ul,"%23").replace(ea,"%3F")}function ua(e){return e==null?"":ca(e).replace(Xu,"%2F")}function mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const aa=/\/$/,fa=e=>e.replace(aa,"");function fr(e,t,n="/"){let r,s={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),s=e(o)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=ga(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:mn(i)}}function da(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ro(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ha(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Kt(t.matched[r],n.matched[s])&&pl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!pa(e[n],t[n]))return!1;return!0}function pa(e,t){return $e(e)?so(e,t):$e(t)?so(t,e):e===t}function so(e,t){return $e(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function ga(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const dt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var _n;(function(e){e.pop="pop",e.push="push"})(_n||(_n={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={}));function ma(e){if(!e)if(Dt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fa(e)}const _a=/^[^#]+#/;function ya(e,t){return e.replace(_a,"#")+t}function va(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qn=()=>({left:window.scrollX,top:window.scrollY});function ba(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=va(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oo(e,t){return(history.state?history.state.position-t:-1)+e}const Xr=new Map;function wa(e,t){Xr.set(e,t)}function Ea(e){const t=Xr.get(e);return Xr.delete(e),t}let Sa=()=>location.protocol+"//"+location.host;function gl(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let c=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(c);return l[0]!=="/"&&(l="/"+l),ro(l,"")}return ro(n,e)+r+s}function Ca(e,t,n,r){let s=[],o=[],i=null;const c=({state:g})=>{const p=gl(e,location),b=n.value,w=t.value;let B=0;if(g){if(n.value=p,t.value=g,i&&i===b){i=null;return}B=w?g.position-w.position:0}else r(p);s.forEach(S=>{S(n.value,b,{delta:B,type:_n.pop,direction:B?B>0?un.forward:un.back:un.unknown})})};function l(){i=n.value}function a(g){s.push(g);const p=()=>{const b=s.indexOf(g);b>-1&&s.splice(b,1)};return o.push(p),p}function u(){const{history:g}=window;g.state&&g.replaceState(re({},g.state,{scroll:Qn()}),"")}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:a,destroy:f}}function io(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Qn():null}}function Ra(e){const{history:t,location:n}=window,r={value:gl(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,a,u){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Sa()+e+l;try{t[u?"replaceState":"pushState"](a,"",g),s.value=a}catch(p){console.error(p),n[u?"replace":"assign"](g)}}function i(l,a){const u=re({},t.state,io(s.value.back,l,s.value.forward,!0),a,{position:s.value.position});o(l,u,!0),r.value=l}function c(l,a){const u=re({},s.value,t.state,{forward:l,scroll:Qn()});o(u.current,u,!0);const f=re({},io(r.value,l,null),{position:u.position+1},a);o(l,f,!1),r.value=l}return{location:r,state:s,push:c,replace:i}}function Pa(e){e=ma(e);const t=Ra(e),n=Ca(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=re({location:"",base:e,go:r,createHref:ya.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Aa(e){return typeof e=="string"||e&&typeof e=="object"}function ml(e){return typeof e=="string"||typeof e=="symbol"}const _l=Symbol("");var lo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(lo||(lo={}));function zt(e,t){return re(new Error,{type:e,[_l]:!0},t)}function rt(e,t){return e instanceof Error&&_l in e&&(t==null||!!(e.type&t))}const co="[^/]+?",Ta={sensitive:!1,strict:!1,start:!0,end:!0},xa=/[.+*?^${}()[\]/\\]/g;function Ia(e,t){const n=re({},Ta,t),r=[];let s=n.start?"^":"";const o=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function yl(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const Ba={type:0,value:""},Na=/[a-zA-Z0-9_]/;function Oa(e){if(!e)return[[]];if(e==="/")return[[Ba]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let c=0,l,a="",u="";function f(){a&&(n===0?o.push({type:0,value:a}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:a,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=l}for(;c{i(P)}:cn}function i(f){if(ml(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function c(){return n}function l(f){const g=Ua(f,n);n.splice(g,0,f),f.record.name&&!ho(f)&&r.set(f.record.name,f)}function a(f,g){let p,b={},w,B;if("name"in f&&f.name){if(p=r.get(f.name),!p)throw zt(1,{location:f});B=p.record.name,b=re(ao(g.params,p.keys.filter(P=>!P.optional).concat(p.parent?p.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),f.params&&ao(f.params,p.keys.map(P=>P.name))),w=p.stringify(b)}else if(f.path!=null)w=f.path,p=n.find(P=>P.re.test(w)),p&&(b=p.parse(w),B=p.record.name);else{if(p=g.name?r.get(g.name):n.find(P=>P.re.test(g.path)),!p)throw zt(1,{location:f,currentLocation:g});B=p.record.name,b=re({},g.params,f.params),w=p.stringify(b)}const S=[];let R=p;for(;R;)S.unshift(R.record),R=R.parent;return{name:B,path:w,params:b,matched:S,meta:ka(S)}}e.forEach(f=>o(f));function u(){n.length=0,r.clear()}return{addRoute:o,resolve:a,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:s}}function ao(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function fo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Fa(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Fa(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ho(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ka(e){return e.reduce((t,n)=>re(t,n.meta),{})}function po(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ua(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;yl(e,t[o])<0?r=o:n=o+1}const s=Ha(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function Ha(e){let t=e;for(;t=t.parent;)if(vl(t)&&yl(e,t)===0)return t}function vl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Va(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qr(o)):[r&&Qr(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function ja(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=$e(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const qa=Symbol(""),mo=Symbol(""),Xn=Symbol(""),ws=Symbol(""),Zr=Symbol("");function Qt(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function mt(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((c,l)=>{const a=g=>{g===!1?l(zt(4,{from:n,to:t})):g instanceof Error?l(g):Aa(g)?l(zt(2,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),c())},u=o(()=>e.call(r&&r.instances[s],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(g=>l(g))})}function dr(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(cl(l)){const u=(l.__vccOpts||l)[t];u&&o.push(mt(u,n,r,i,c,s))}else{let a=l();o.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const f=Yu(u)?u.default:u;i.mods[c]=u,i.components[c]=f;const p=(f.__vccOpts||f)[t];return p&&mt(p,n,r,i,c,s)()}))}}return o}function _o(e){const t=qe(Xn),n=qe(ws),r=Ve(()=>{const l=_t(e.to);return t.resolve(l)}),s=Ve(()=>{const{matched:l}=r.value,{length:a}=l,u=l[a-1],f=n.matched;if(!u||!f.length)return-1;const g=f.findIndex(Kt.bind(null,u));if(g>-1)return g;const p=yo(l[a-2]);return a>1&&yo(u)===p&&f[f.length-1].path!==p?f.findIndex(Kt.bind(null,l[a-2])):g}),o=Ve(()=>s.value>-1&&Wa(n.params,r.value.params)),i=Ve(()=>s.value>-1&&s.value===n.matched.length-1&&pl(n.params,r.value.params));function c(l={}){if(Ga(l)){const a=t[_t(e.replace)?"replace":"push"](_t(e.to)).catch(cn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:r,href:Ve(()=>r.value.href),isActive:o,isExactActive:i,navigate:c}}function $a(e){return e.length===1?e[0]:e}const Ka=Me({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"},viewTransition:Boolean},useLink:_o,setup(e,{slots:t}){const n=Kn(_o(e)),{options:r}=qe(Xn),s=Ve(()=>({[vo(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[vo(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&$a(t.default(n));return e.custom?o:vs("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),za=Ka;function Ga(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 Wa(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!$e(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function yo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const vo=(e,t,n)=>e??t??n,Ja=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qe(Zr),s=Ve(()=>e.route||r.value),o=qe(mo,0),i=Ve(()=>{let a=_t(o);const{matched:u}=s.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),c=Ve(()=>s.value.matched[i.value]);Pn(mo,Ve(()=>i.value+1)),Pn(qa,c),Pn(Zr,s);const l=me();return on(()=>[l.value,c.value,e.name],([a,u,f],[g,p,b])=>{u&&(u.instances[f]=a,p&&p!==u&&a&&a===g&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),a&&u&&(!p||!Kt(u,p)||!g)&&(u.enterCallbacks[f]||[]).forEach(w=>w(a))},{flush:"post"}),()=>{const a=s.value,u=e.name,f=c.value,g=f&&f.components[u];if(!g)return bo(n.default,{Component:g,route:a});const p=f.props[u],b=p?p===!0?a.params:typeof p=="function"?p(a):p:null,B=vs(g,re({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return bo(n.default,{Component:B,route:a})||B}}});function bo(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const bl=Ja;function Ya(e){const t=Da(e.routes,e),n=e.parseQuery||Va,r=e.stringifyQuery||go,s=e.history,o=Qt(),i=Qt(),c=Qt(),l=lc(dt);let a=dt;Dt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ar.bind(null,y=>""+y),f=ar.bind(null,ua),g=ar.bind(null,mn);function p(y,M){let x,k;return ml(y)?(x=t.getRecordMatcher(y),k=M):k=y,t.addRoute(k,x)}function b(y){const M=t.getRecordMatcher(y);M&&t.removeRoute(M)}function w(){return t.getRoutes().map(y=>y.record)}function B(y){return!!t.getRecordMatcher(y)}function S(y,M){if(M=re({},M||l.value),typeof y=="string"){const m=fr(n,y,M.path),v=t.resolve({path:m.path},M),C=s.createHref(m.fullPath);return re(m,v,{params:g(v.params),hash:mn(m.hash),redirectedFrom:void 0,href:C})}let x;if(y.path!=null)x=re({},y,{path:fr(n,y.path,M.path).path});else{const m=re({},y.params);for(const v in m)m[v]==null&&delete m[v];x=re({},y,{params:f(m)}),M.params=f(M.params)}const k=t.resolve(x,M),ce=y.hash||"";k.params=u(g(k.params));const d=da(r,re({},y,{hash:ia(ce),path:k.path})),h=s.createHref(d);return re({fullPath:d,hash:ce,query:r===go?ja(y.query):y.query||{}},k,{redirectedFrom:void 0,href:h})}function R(y){return typeof y=="string"?fr(n,y,l.value.path):re({},y)}function P(y,M){if(a!==y)return zt(8,{from:M,to:y})}function _(y){return L(y)}function G(y){return _(re(R(y),{replace:!0}))}function N(y){const M=y.matched[y.matched.length-1];if(M&&M.redirect){const{redirect:x}=M;let k=typeof x=="function"?x(y):x;return typeof k=="string"&&(k=k.includes("?")||k.includes("#")?k=R(k):{path:k},k.params={}),re({query:y.query,hash:y.hash,params:k.path!=null?{}:y.params},k)}}function L(y,M){const x=a=S(y),k=l.value,ce=y.state,d=y.force,h=y.replace===!0,m=N(x);if(m)return L(re(R(m),{state:typeof m=="object"?re({},ce,m.state):ce,force:d,replace:h}),M||x);const v=x;v.redirectedFrom=M;let C;return!d&&ha(r,k,x)&&(C=zt(16,{to:v,from:k}),Re(k,k,!0,!1)),(C?Promise.resolve(C):j(v,k)).catch(E=>rt(E)?rt(E,2)?E:Fe(E):Z(E,v,k)).then(E=>{if(E){if(rt(E,2))return L(re({replace:h},R(E.to),{state:typeof E.to=="object"?re({},ce,E.to.state):ce,force:d}),M||v)}else E=q(v,k,!0,h,ce);return V(v,k,E),E})}function H(y,M){const x=P(y,M);return x?Promise.reject(x):Promise.resolve()}function F(y){const M=at.values().next().value;return M&&typeof M.runWithContext=="function"?M.runWithContext(y):y()}function j(y,M){let x;const[k,ce,d]=Qa(y,M);x=dr(k.reverse(),"beforeRouteLeave",y,M);for(const m of k)m.leaveGuards.forEach(v=>{x.push(mt(v,y,M))});const h=H.bind(null,y,M);return x.push(h),Pe(x).then(()=>{x=[];for(const m of o.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).then(()=>{x=dr(ce,"beforeRouteUpdate",y,M);for(const m of ce)m.updateGuards.forEach(v=>{x.push(mt(v,y,M))});return x.push(h),Pe(x)}).then(()=>{x=[];for(const m of d)if(m.beforeEnter)if($e(m.beforeEnter))for(const v of m.beforeEnter)x.push(mt(v,y,M));else x.push(mt(m.beforeEnter,y,M));return x.push(h),Pe(x)}).then(()=>(y.matched.forEach(m=>m.enterCallbacks={}),x=dr(d,"beforeRouteEnter",y,M,F),x.push(h),Pe(x))).then(()=>{x=[];for(const m of i.list())x.push(mt(m,y,M));return x.push(h),Pe(x)}).catch(m=>rt(m,8)?m:Promise.reject(m))}function V(y,M,x){c.list().forEach(k=>F(()=>k(y,M,x)))}function q(y,M,x,k,ce){const d=P(y,M);if(d)return d;const h=M===dt,m=Dt?history.state:{};x&&(k||h?s.replace(y.fullPath,re({scroll:h&&m&&m.scroll},ce)):s.push(y.fullPath,ce)),l.value=y,Re(y,M,x,h),Fe()}let U;function J(){U||(U=s.listen((y,M,x)=>{if(!ft.listening)return;const k=S(y),ce=N(k);if(ce){L(re(ce,{replace:!0,force:!0}),k).catch(cn);return}a=k;const d=l.value;Dt&&wa(oo(d.fullPath,x.delta),Qn()),j(k,d).catch(h=>rt(h,12)?h:rt(h,2)?(L(re(R(h.to),{force:!0}),k).then(m=>{rt(m,20)&&!x.delta&&x.type===_n.pop&&s.go(-1,!1)}).catch(cn),Promise.reject()):(x.delta&&s.go(-x.delta,!1),Z(h,k,d))).then(h=>{h=h||q(k,d,!1),h&&(x.delta&&!rt(h,8)?s.go(-x.delta,!1):x.type===_n.pop&&rt(h,20)&&s.go(-1,!1)),V(k,d,h)}).catch(cn)}))}let Ce=Qt(),de=Qt(),ne;function Z(y,M,x){Fe(y);const k=de.list();return k.length?k.forEach(ce=>ce(y,M,x)):console.error(y),Promise.reject(y)}function He(){return ne&&l.value!==dt?Promise.resolve():new Promise((y,M)=>{Ce.add([y,M])})}function Fe(y){return ne||(ne=!y,J(),Ce.list().forEach(([M,x])=>y?x(y):M()),Ce.reset()),y}function Re(y,M,x,k){const{scrollBehavior:ce}=e;if(!Dt||!ce)return Promise.resolve();const d=!x&&Ea(oo(y.fullPath,0))||(k||!x)&&history.state&&history.state.scroll||null;return ds().then(()=>ce(y,M,d)).then(h=>h&&ba(h)).catch(h=>Z(h,y,M))}const ge=y=>s.go(y);let Ke;const at=new Set,ft={currentRoute:l,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:w,resolve:S,options:e,push:_,replace:G,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:de.add,isReady:He,install(y){const M=this;y.component("RouterLink",za),y.component("RouterView",bl),y.config.globalProperties.$router=M,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>_t(l)}),Dt&&!Ke&&l.value===dt&&(Ke=!0,_(s.location).catch(ce=>{}));const x={};for(const ce in dt)Object.defineProperty(x,ce,{get:()=>l.value[ce],enumerable:!0});y.provide(Xn,M),y.provide(ws,bi(x)),y.provide(Zr,l);const k=y.unmount;at.add(y),y.unmount=function(){at.delete(y),at.size<1&&(a=dt,U&&U(),U=null,l.value=dt,Ke=!1,ne=!1),k()}}};function Pe(y){return y.reduce((M,x)=>M.then(()=>F(x)),Promise.resolve())}return ft}function Qa(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iKt(a,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(a=>Kt(a,l))||s.push(l))}return[n,r,s]}function wl(){return qe(Xn)}function Xa(e){return qe(ws)}const Za=Me({__name:"App",setup(e){return(t,n)=>(ee(),Tt(_t(bl)))}}),Ue=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},ef=Ue(Za,[["__scopeId","data-v-913ef6b1"]]),tf="/assets/logo_belt-DPdjjAgZ.png",nf={},rf={class:"belt-block"};function sf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow"},null,-1)),K("div",rf,[vn(e.$slots,"default",{},void 0)])])}const of=Ue(nf,[["render",sf],["__scopeId","data-v-5ed18f32"]]),lf={},cf={class:"belt-block"};function uf(e,t){return ee(),fe("div",null,[t[0]||(t[0]=K("div",{class:"shadow shadow-top"},null,-1)),t[1]||(t[1]=K("div",{class:"shadow shadow-bottom"},null,-1)),K("div",cf,[vn(e.$slots,"default",{},void 0)])])}const El=Ue(lf,[["render",uf],["__scopeId","data-v-0effe39e"]]),af={class:"text-with-font"},ff=Me({__name:"HeaderText",setup(e){return(t,n)=>(ee(),fe("span",af,[vn(t.$slots,"default",{},void 0)]))}}),Sl=Ue(ff,[["__scopeId","data-v-33b571eb"]]),df={},hf={class:"plate-block"},pf={class:"metal-plate-block"};function gf(e,t){return ee(),fe("div",hf,[K("div",pf,[vn(e.$slots,"default",{},void 0)]),t[0]||(t[0]=K("div",{class:"pin pin-top-left"},null,-1)),t[1]||(t[1]=K("div",{class:"pin pin-top-right"},null,-1)),t[2]||(t[2]=K("div",{class:"pin pin-bottom-right"},null,-1)),t[3]||(t[3]=K("div",{class:"pin pin-bottom-left"},null,-1))])}const kn=Ue(df,[["render",gf],["__scopeId","data-v-34e952c0"]]),mf={class:"game-header"},_f={class:"center"},yf={class:"position-right-center-block"},vf=Me({__name:"GameHeader",setup(e){return(t,n)=>(ee(),fe("div",mf,[K("div",_f,[ie(kn,{class:"controller-metal controller-metal-left"}),ie(kn,{class:"controller-metal controller-metal-right"}),n[1]||(n[1]=K("img",{alt:"Вечерний детектив",class:"logo",src:tf},null,-1)),ie(of,{class:"belt-mini"}),ie(El,{class:"belt"},{default:yt(()=>[K("div",yf,[ie(Sl,null,{default:yt(()=>n[0]||(n[0]=[qt("Вечерний детектив")])),_:1})])]),_:1})])]))}}),bf=Ue(vf,[["__scopeId","data-v-b87f05d7"]]);class xt extends Error{constructor(t="Пользователь не авторизован (401)"){super(t),this.name="UnauthorizedError",Object.setPrototypeOf(this,xt.prototype)}}const Cl=async(e,t)=>{try{const n=await fetch(Es("/team"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetTeam] error:",n),n}},Rl=async(e,t,n)=>{try{const r=await fetch(Es("/team/actions"),{method:"POST",headers:{"X-Id":Ss(e),"X-Password":t},body:JSON.stringify({place:n})});if(r.status===401)throw new xt("Ошибка авторизации");if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiLetsgo] error:",r),r}},wf=async(e,t)=>{try{const n=await fetch(Es("/game"),{method:"GET",headers:{"X-Id":Ss(e),"X-Password":t}});if(n.status===401)throw new xt("Ошибка авторизации");if(!n.ok)throw new Error(`http error status: ${n.status}`);return await n.json()}catch(n){throw console.error("[apiGetGame] error:",n),n}};function Es(e){return"https://evening-detective-api.crabs-games.art"+e}function Ss(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16))))}var Nt={},hr,wo;function Ef(){return wo||(wo=1,hr=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),hr}var pr={},ht={},Eo;function It(){if(Eo)return ht;Eo=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ht.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},ht.getSymbolTotalCodewords=function(r){return t[r]},ht.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},ht.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},ht.isKanjiModeEnabled=function(){return typeof e<"u"},ht.toSJIS=function(r){return e(r)},ht}var gr={},So;function Cs(){return So||(So=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}}(gr)),gr}var mr,Co;function Sf(){if(Co)return mr;Co=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},mr=e,mr}var _r,Ro;function Cf(){if(Ro)return _r;Ro=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,s){const o=t*this.size+n;this.data[o]=r,s&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},_r=e,_r}var yr={},Po;function Rf(){return Po||(Po=1,function(e){const t=It().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*s-2))*2,c=[o-7];for(let l=1;l=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const o=s.size;let i=0,c=0,l=0,a=null,u=null;for(let f=0;f=5&&(i+=t.N1+(c-5)),a=p,c=1),p=s.get(g,f),p===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=p,l=1)}c>=5&&(i+=t.N1+(c-5)),l>=5&&(i+=t.N1+(l-5))}return i},e.getPenaltyN2=function(s){const o=s.size;let i=0;for(let c=0;c=10&&(c===1488||c===93)&&i++,l=l<<1&2047|s.get(u,a),u>=10&&(l===1488||l===93)&&i++}return i*t.N3},e.getPenaltyN4=function(s){let o=0;const i=s.data.length;for(let l=0;l=0;){const i=o[0];for(let l=0;l0){const c=new Uint8Array(this.degree);return c.set(o,i),c}return o},Er=t,Er}var Sr={},Cr={},Rr={},No;function Al(){return No||(No=1,Rr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Rr}var Ye={},Oo;function Tl(){if(Oo)return Ye;Oo=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r ]))+`;Ye.KANJI=new RegExp(n,"g"),Ye.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ye.BYTE=new RegExp(r,"g"),Ye.NUMERIC=new RegExp(e,"g"),Ye.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ye.testKanji=function(l){return s.test(l)},Ye.testNumeric=function(l){return o.test(l)},Ye.testAlphanumeric=function(l){return i.test(l)},Ye}var Lo;function Mt(){return Lo||(Lo=1,function(e){const t=Al(),n=Tl();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(o,i){if(e.isValid(o))return o;try{return r(o)}catch{return i}}}(Cr)),Cr}var Do;function Mf(){return Do||(Do=1,function(e){const t=It(),n=Pl(),r=Cs(),s=Mt(),o=Al(),i=7973,c=t.getBCHDigit(i);function l(g,p,b){for(let w=1;w<=40;w++)if(p<=e.getCapacity(w,b,g))return w}function a(g,p){return s.getCharCountIndicator(g,p)+4}function u(g,p){let b=0;return g.forEach(function(w){const B=a(w.mode,p);b+=B+w.getBitsLength()}),b}function f(g,p){for(let b=1;b<=40;b++)if(u(g,b)<=e.getCapacity(b,p,s.MIXED))return b}e.from=function(p,b){return o.isValid(p)?parseInt(p,10):b},e.getCapacity=function(p,b,w){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=s.BYTE);const B=t.getSymbolTotalCodewords(p),S=n.getTotalCodewordsCount(p,b),R=(B-S)*8;if(w===s.MIXED)return R;const P=R-a(w,p);switch(w){case s.NUMERIC:return Math.floor(P/10*3);case s.ALPHANUMERIC:return Math.floor(P/11*2);case s.KANJI:return Math.floor(P/13);case s.BYTE:default:return Math.floor(P/8)}},e.getBestVersionForData=function(p,b){let w;const B=r.from(b,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,B);if(p.length===0)return 1;w=p[0]}else w=p;return l(w.mode,w.getLength(),B)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let b=p<<12;for(;t.getBCHDigit(b)-c>=0;)b^=i<=0;)l^=t<0&&(o=this.data.substr(s),i=parseInt(o,10),r.put(i,c*3+1))},Tr=t,Tr}var xr,Uo;function Of(){if(Uo)return xr;Uo=1;const e=Mt(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let o;for(o=0;o+2<=this.data.length;o+=2){let i=t.indexOf(this.data[o])*45;i+=t.indexOf(this.data[o+1]),s.put(i,11)}this.data.length%2&&s.put(t.indexOf(this.data[o]),6)},xr=n,xr}var Ir,Ho;function Lf(){if(Ho)return Ir;Ho=1;const e=Mt();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,s=this.data.length;r=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+` Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Mr=n,Mr}var Br={exports:{}},jo;function Ff(){return jo||(jo=1,function(e){var t={single_source_shortest_paths:function(n,r,s){var o={},i={};i[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var l,a,u,f,g,p,b,w,B;!c.empty();){l=c.pop(),a=l.value,f=l.cost,g=n[a]||{};for(u in g)g.hasOwnProperty(u)&&(p=g[u],b=f+p,w=i[u],B=typeof i[u]>"u",(B||w>b)&&(i[u]=b,c.push(u,b),o[u]=a))}if(typeof s<"u"&&typeof i[s]>"u"){var S=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(S)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],o=r;o;)s.push(o),n[o],o=n[o];return s.reverse(),s},find_path:function(n,r,s){var o=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(o,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(s[o]=r[o]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t}(Br)),Br.exports}var qo;function kf(){return qo||(qo=1,function(e){const t=Mt(),n=Nf(),r=Of(),s=Lf(),o=Df(),i=Tl(),c=It(),l=Ff();function a(S){return unescape(encodeURIComponent(S)).length}function u(S,R,P){const _=[];let G;for(;(G=S.exec(P))!==null;)_.push({data:G[0],index:G.index,mode:R,length:G[0].length});return _}function f(S){const R=u(i.NUMERIC,t.NUMERIC,S),P=u(i.ALPHANUMERIC,t.ALPHANUMERIC,S);let _,G;return c.isKanjiModeEnabled()?(_=u(i.BYTE,t.BYTE,S),G=u(i.KANJI,t.KANJI,S)):(_=u(i.BYTE_KANJI,t.BYTE,S),G=[]),R.concat(P,_,G).sort(function(L,H){return L.index-H.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function g(S,R){switch(R){case t.NUMERIC:return n.getBitsLength(S);case t.ALPHANUMERIC:return r.getBitsLength(S);case t.KANJI:return o.getBitsLength(S);case t.BYTE:return s.getBitsLength(S)}}function p(S){return S.reduce(function(R,P){const _=R.length-1>=0?R[R.length-1]:null;return _&&_.mode===P.mode?(R[R.length-1].data+=P.data,R):(R.push(P),R)},[])}function b(S){const R=[];for(let P=0;P=0&&U<=6&&(J===0||J===6)||J>=0&&J<=6&&(U===0||U===6)||U>=2&&U<=4&&J>=2&&J<=4?N.set(V+U,q+J,!0,!0):N.set(V+U,q+J,!1,!0))}}function b(N){const L=N.size;for(let H=8;H>U&1)===1,N.set(j,V,q,!0),N.set(V,j,q,!0)}function S(N,L,H){const F=N.size,j=u.getEncodedBits(L,H);let V,q;for(V=0;V<15;V++)q=(j>>V&1)===1,V<6?N.set(V,8,q,!0):V<8?N.set(V+1,8,q,!0):N.set(F-15+V,8,q,!0),V<8?N.set(8,F-V-1,q,!0):V<9?N.set(8,15-V-1+1,q,!0):N.set(8,15-V-1,q,!0);N.set(F-8,8,1,!0)}function R(N,L){const H=N.size;let F=-1,j=H-1,V=7,q=0;for(let U=H-1;U>0;U-=2)for(U===6&&U--;;){for(let J=0;J<2;J++)if(!N.isReserved(j,U-J)){let Ce=!1;q>>V&1)===1),N.set(j,U-J,Ce),V--,V===-1&&(q++,V=7)}if(j+=F,j<0||H<=j){j-=F,F=-F;break}}}function P(N,L,H){const F=new n;H.forEach(function(J){F.put(J.mode.bit,4),F.put(J.getLength(),f.getCharCountIndicator(J.mode,N)),J.write(F)});const j=e.getSymbolTotalCodewords(N),V=c.getTotalCodewordsCount(N,L),q=(j-V)*8;for(F.getLengthInBits()+4<=q&&F.put(0,4);F.getLengthInBits()%8!==0;)F.putBit(0);const U=(q-F.getLengthInBits())/8;for(let J=0;J