PageSourceSearch

https://cybershoke.net/assets/CreateLobby-Bn_WkXfk.js

js cybershoke.net collected 2026-10-04 05:22:46 UTC 12,516 bytes, 238 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Match-DY1Zsk9L.js","assets/vendor-react-BGN68_Lp.js","assets/vendor-styled-pkIKgjgv.js","assets/vendor-redux-D8sX5Eqv.js","assets/index-uear5Vpj.js","assets/vendor-socket-DSYo_sTV.js","assets/vendor-i18n-BWleq_Sd.js","assets/vendor-router-CYD8mbvC.js","assets/index-BO7KhNsz.css","assets/SettingsList-r1rTfTV2.js","assets/lobby-settings-BrXp16HJ.js","assets/premiumGroups-B_5uzJUp.js","assets/MatchIcons-CVn1p0ME.js","assets/Switch-DOGNbJxj.js","assets/Range-CAfNV48s.js","assets/maps-BaCKFVv9.js","assets/Curtain-JIs9jbRB.js","assets/PlayerActionMenu.styles-B06VDehf.js","assets/LobbySettingsIndicators-C9uIMwnr.js","assets/index-CGTDlQVZ.js","assets/lobbyEvents-BcVEWkzw.js","assets/world-CNkByLyC.js","assets/Matches.styles-Cuk1N_Op.js"])))=>i.map(i=>d[i]);
2import{u as B,bh as M,x as S,g as A,m as O,b as _,t as j}from"./index-uear5Vpj.js";import{r as l,j as n}from"./vendor-react-BGN68_Lp.js";import{a as R}from"./vendor-redux-D8sX5Eqv.js";import{g as c}from"./vendor-styled-pkIKgjgv.js";import{W as I}from"./world-CNkByLyC.js";import{L as z}from"./locker-D8MYdao_.js";import{T as D}from"./Templates-BbRzAw0Z.js";import{u as N}from"./vendor-i18n-BWleq_Sd.js";import"./vendor-socket-DSYo_sTV.js";import"./vendor-router-CYD8mbvC.js";import"./index-CGTDlQVZ.js";import"./MatchIcons-CVn1p0ME.js";import"./maps-BaCKFVv9.js";import"./LobbySettingsIndicators-C9uIMwnr.js";const w=378,L=-18,Y=c.div`
3    max-width: 90%;
4`,F=c.div`
5    --p: 0;
6    transform: translateX(calc(var(--p) * ${(w+L)/-2}px));
7`,W=c.div`
8    position: absolute;
9    top: 0;
10    bottom: 0;
11    left: 100%;
12    width: ${w}px;
13    z-index: 1;
14    transform: translateX(calc(-100% + var(--p) * (100% + ${L}px)));
15
16    @media (max-width: 900px) {
17        display: none;
18    }
19`,X=c.div`
20    height: 100%;
21    display: flex;
22    flex-direction: column;
23    overflow: hidden;
24    padding: 24px 8px 0 36px;
25    border-radius: 0 18px 18px 0;
26    background: #141823;
27`,V=c.button`
28    position: absolute;
29    left: calc(100% - 54px);
30    top: calc(50% - 47px);
31    z-index: -1;
32    width: 110px;
33    height: 96px;
34    border-radius: 24px 24px 32px 24px;
35    background: #21283b;
36    transform-origin: 0 0;
37    rotate: -15deg;
38    touch-action: none;
39    transition: translate 160ms cubic-bezier(0.23, 1, 0.32, 1);
40
41    svg {
42        position: absolute;
43        left: 66px;
44        top: 30px;
45        width: 15px;
46        height: 15px;
47        overflow: visible;
48        transform: rotate(calc(15deg + var(--p) * 45deg));
49    }
50
51    path {
52        stroke: #9ba9c0;
53        transition: stroke 120ms ease-out;
54    }
55
56    span {
57        position: absolute;
58        right: 9px;
59        top: 55px;
60        color: #7f8eaa;
61        font-size: 10px;
62        font-weight: 700;
63        line-height: 12px;
64        letter-spacing: 0.04em;
65        text-transform: uppercase;
66        white-space: nowrap;
67        opacity: calc(1 - var(--p));
68        transition: color 120ms ease-out;
69    }
70
71    i {
72        position: absolute;
73        left: 79px;
74        top: 25px;
75        width: 7px;
76        height: 7px;
77        border-radius: 50%;
78        background: #6080ff;
79        box-shadow: 0 0 0 2px #21283b;
80        opacity: 0;
81        transform: scale(0.6);
82        transition:
83            opacity 160ms cubic-bezier(0.23, 1, 0.32, 1),
84            transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
85
86        &.visible {
87            opacity: calc(1 - var(--p));
88            transform: scale(1);
89        }
90    }
91
92    @media (hover: hover) and (pointer: fine) {
93        &:hover {
94            filter: none !important;
95            translate: 5px -1px;
96
97            path {
98                stroke: #d3ddeb;
99            }
100
101            span {
102                color: #9ba9c0;
103            }
104        }
105    }
106
107    &:active,
108    &.dragging {
109        translate: 3px 0;
110    }
111
112    &:focus-visible {
113        outline: 2px solid #6080ff;
114        outline-offset: 2px;
115    }
116
117    @media (prefers-reduced-motion: reduce) {
118        &,
119        &:hover,
120        &:active {
121            translate: none;
122            transition: none;
123        }
124    }
125`,Z=.4,T=Math.pow(2*Math.PI/Z,2),$=2*Math.sqrt(T),E=a=>.12*(1-1/(a*3+1)),P=(w+L)/2,H=a=>{const s=l.useRef({p:0,v:0,target:0,raf:0,last:0,drag:null}),[C,p]=l.useState(!1),x=()=>a.current?.style.setProperty("--p",s.current.p.toFixed(4)),f=e=>{const t=s.current,o=Math.min(.032,(e-t.last)/1e3||.016);if(t.last=e,t.v+=(-T*(t.p-t.target)-$*t.v)*o,t.p+=t.v*o,Math.abs(t.p-t.target)<
1255e-4&&Math.abs(t.v)<.01)return t.p=t.target,t.v=0,t.raf=0,x();x(),t.raf=requestAnimationFrame(f)},u=(e,t)=>{const o=s.current;if(o.target=e,p(e===1),t!==void 0&&(o.v=t),window.matchMedia("(prefers-reduced-motion: reduce)").matches)return o.p=e,o.v=0,x();o.raf||(o.last=performance.now(),o.raf=requestAnimationFrame(f))},h=()=>u(s.current.target===1?0:1),y=e=>{if(e.button!==0)return;const t=s.current;e.currentTarget.setPointerCapture(e.pointerId),cancelAnimationFrame(t.raf),t.raf=0,t.drag={x0:e.clientX,p0:t.p,moved:!1,hist:[[e.timeStamp,e.clientX]]}},m=e=>{const t=s.current,o=t.drag;if(!o)return;const d=e.clientX-o.x0;if(!o.moved&&Math.abs(d)<4)return;o.moved=!0,e.currentTarget.classList.add("dragging");let i=o.p0+d/P;i<0&&(i=-E(-i)),i>1&&(i=1+E(i-1)),t.p=i,t.v=0,x(),o.hist.push([e.timeStamp,e.clientX]),o.hist.length>6&&o.hist.shift()},b=e=>{const t=s.current,o=t.drag;if(!o)return;if(e.currentTarget.classList.remove("dragging"),t.drag=null,!o.moved)return h();const[d,i]=o.hist[0],[v,r]=o.hist[o.hist.length-1],g=v>d?(r-i)/((v-d)/1e3):0,k=Math.abs(g)>150?g>0?1:0:t.p>.5?1:0;u(k,g/P)};return l.useEffect(()=>{const e=t=>{t.key!=="Escape"||s.current.target!==1||(t.stopPropagation(),u(0))};return window.addEventListener("keyup",e,!0),()=>{window.removeEventListener("keyup",e,!0),cancelAnimationFrame(s.current.raf)}},[]),{open:C,handlers:{onPointerDown:y,onPointerMove:m,onPointerUp:b,onPointerCancel:b,onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),h())}}}},q=c.div`
126    z-index: 2;
127    border-radius: 18px;
128    background: #171c2a;
129    padding: 40px;
130    width: 440px;
131    max-width: 100%;
132    display: flex;
133    flex-direction: column;
134    gap: 28px;
135
136    & > button {
137        text-transform: none;
138        height: 56px;
139
140        &[disabled] {
141            opacity: 0.5;
142            pointer-events: none;
143        }
144    }
145
146    @media (max-width: 650px) {
147        padding: 32px 24px;
148    }
149`,U=c.h2`
150    margin-bottom: 10px;
151    color: #d3ddeb;
152    text-align: center;
153    font-size: 24px;
154    font-weight: 700;
155    line-height: 120%;
156`,G=c.p`
157    color: #7f8eaa;
158    text-align: center;
159    font-size: 14px;
160    line-height: 140%;
161`,K=c.div`
162    display: flex;
163    flex-direction: column;
164    gap: 6px;
165
166    & > div {
167        padding: 18px;
168        transition: all 0.2s ease;
169        cursor: pointer;
170
171        path {
172            fill: #576390;
173        }
174
175        &.active {
176            border-radius: 10px;
177            background: #212a48;
178
179            path {
180                fill: #798ddf;
181            }
182        }
183    }
184
185    svg {
186        min-width: 32px;
187    }
188
189    h3 {
190        color: #d3ddeb;
191        font-size: 14px;
192        font-weight: 500;
193        margin-bottom: 8px;
194        text-transform: none;
195        text-align: left;
196    }
197
198    p {
199        color: #9ba9c0;
200        font-size: 13px;
201        line-height: 140%;
202        text-align: left;
203    }
204`,J=c.div`
205    display: flex;
206    gap: 14px;
207`,Q=c.div`
208    height: 48px;
209    padding-left: 16px;
210    border-radius: 6px;
211    background: #1b2131;
212    margin-top: 18px;
213    display: flex;
214
215    button {
216        display: flex;
217        align-items: center;
218        background: transparent;
219        height: 100%;
220        width: 68px;
221        justify-content: center;
222    }
223
224    input {
225        background: transparent;
226        height: 100%;
227        width: 100%;
228        font-size: 14px;
229
230        &::placeholder {
231            color: #66728a;
232        }
233    }
234
235    img {
236        width: 18px;
237    }
238`,ht=()=>{const{t:a}=N(),s=R(),C=B(),[p,x]=l.useState(0),[f,u]=l.useState(!1),[h,y]=l.useState(""),[m,b]=l.useState(!0),[e,t]=l.useState(null),o=l.useRef(null),d=H(o),i=()=>s(_(null)),v=()=>{u(!0),O.createLobby({type_lobby:p,lobby_password:p===0?void 0:h,id_preset:e??void 0}).then(r=>{i(),u(!1),r&&r.result==="success"&&(C(`/match/${r.data.id_lobby}`),j("matches_create_modal_submit",{privacy:p===0?"open":p===1?"closed":"private"}))})};return l.useEffect(()=>{j("matches_create_modal_open"),M(()=>import("./Match-DY1Zsk9L.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]))},[]),n.jsx(Y,{children:n.jsxs(F,{ref:o,children:[n.jsxs(q,{children:[n.jsx(S,{}),n.jsxs("div",{children:[n.jsx(U,{children:a("LOBBY-CREATE-1")}),n.jsx(G,{children:a("M-C-LOBBY-INFO")})]}),n.jsx("div",{children:n.jsx(K,{children:[{type:0,title:"LOBBY-OPEN-1",text:"LOBBY-OPEN-1-D",icon:n.jsx(I,{})}
238,{type:1,title:"LOBBY-CLOSED-1",text:"LOBBY-CLOSED-1-D",icon:n.jsx(z,{})},{type:2,title:"LOBBY-PRIVATE",text:"LOBBY-PRIVATE-D",icon:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.2071 28.2071C28.5976 27.8166 28.5976 27.1834 28.2071 26.7929L5.20711 3.79289C4.81658 3.40237 4.18342 3.40237 3.79289 3.79289C3.40237 4.18342 3.40237 4.81658 3.79289 5.20711L26.7929 28.2071C27.1834 28.5976 27.8166 28.5976 28.2071 28.2071Z",fill:"currentColor"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.3628 23.9842C22.0396 25.6555 19.1861 26.9999 16.0001 26.9999C12.3561 26.9999 9.14706 25.2412 6.6689 23.2462C4.18104 21.2433 2.32859 18.9216 1.37718 17.6103C0.675056 16.6426 0.675056 15.3573 1.37718 14.3896C2.32859 13.0783 4.18104 10.7566 6.6689 8.75377C7.11685 8.39315 7.58869 8.04025 8.08266 7.70406L9.52495 9.14635C8.96973 9.50735 8.43489 9.89963 7.92307 10.3117C5.62696 12.1601 3.89368 14.3269 2.99598 15.5641C2.80212 15.8313 2.80212 16.1686 2.99598 16.4358C3.89368 17.6731 5.62696 19.8398 7.92307 21.6883C10.2289 23.5445 13.002 24.9999 16.0001 24.9999C18.5154 24.9999 20.8724 23.9755 22.928 22.5494L24.3628 23.9842ZM20.4278 20.0492C19.3308 21.2481 17.7533 21.9999 16.0001 21.9999C12.6864 21.9999 10.0002 19.3137 10.0002 16C10.0002 14.2468 10.752 12.6693 11.9509 11.5723L13.3672 12.9886C12.5293 13.7218 12.0002 14.7991 12.0002 16C12.0002 18.2091 13.791 19.9999 16.0001 19.9999C17.201 19.9999 18.2783 19.4708 19.0115 18.6329L20.4278 20.0492ZM19.9428 15.3216L21.87 17.2487C21.9553 16.8459 22.0001 16.4282 22.0001 16C22.0001 12.6862 19.3139 9.99997 16.0001 9.99997C15.5719 9.99997 15.1542 10.0448 14.7514 10.1301L16.6785 12.0573C18.3441 12.3418 19.6583 13.656 19.9428 15.3216ZM12.3259 7.7047C13.4979 7.2617 14.7288 7 16.0001 7C18.9982 7 21.7713 8.4554 24.0771 10.3117C26.3733 12.1601 28.1065 14.3269 29.0042 15.5641C29.1981 15.8313 29.1981 16.1686 29.0042 16.4358C28.2701 17.4476 26.9773 19.0809 25.2748 20.6535L26.69 22.0687C28.4962 20.3904 29.854 18.6703 30.623 17.6103C31.3252 16.6426 31.3252 15.3573 30.623 14.3896C29.6716 13.0783 27.8192 10.7566 25.3313 8.75377C22.8532 6.75875 19.6441 5 16.0001 5C14.1385 5 12.3904 5.45901 10.7953 6.17404L12.3259 7.7047Z",fill:"currentColor"})]})}].map(r=>n.jsxs("div",{className:p===r.type?"active":"",onClick:()=>!f&&x(r.type),children:[n.jsxs(J,{children:[r.icon,n.jsxs("div",{children:[n.jsx("h3",{children:a(r.title)}),n.jsx("p",{children:a(r.text)})]})]}),p>0&&p===r.type&&n.jsxs(Q,{children:[n.jsx("input",{type:"text",style:m?{WebkitTextSecurity:"disc"}:void 0,autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"off","aria-autocomplete":"none",placeholder:a("CREATE-PASSWORD"),value:h,onChange:g=>y(g.target.value)}),n.jsx("button",{onClick:()=>b(!m),children:n.jsx("img",{loading:"lazy",src:A(`/pages/matches/icons/${m?"eye":"hidden"}.svg`),alt:""})})]})]},r.type))})}),n.jsx("button",{className:"modal-button",onClick:v,disabled:f||p>0&&!h,children:a(e?"CREATE-LOBBY-BY-TEMPLATE":"CREATE-LOBBY")})]}),n.jsxs(W,{id:"create-lobby-templates",children:[n.jsx(X,{children:n.jsx(D,{isOwner:!0,compact:!0,selected:e,onSelect:t})}),n.jsxs(V,{type:"button","aria-expanded":d.open,"aria-controls":"create-lobby-templates","aria-label":a("Templates"),...d.handlers,children:[n.jsx("svg",{viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M7.5 0V15M0 7.5H15",strokeWidth:"2",strokeLinecap:"round"})}),n.jsx("i",{className:e?"visible":void 0}),n.jsx("span",{children:a("Templates")})]})]})]})})};export{ht as default};

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