2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6165],{39398:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(1413),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},c=t(42135),i=function(e,n){return o.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:n,icon:a}))};i.displayName="CaretDownOutlined";var u=o.forwardRef(i)},86548:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(1413),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},c=t(42135),i=function(e,n){return o.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:n,icon:a}))};i.displayName="EditOutlined";var u=o.forwardRef(i)},38545:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(1413),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},c=t(42135),i=function(e,n){return o.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:n,icon:a}))};i.displayName="MessageOutlined";var u=o.forwardRef(i)},87547:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(1413),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},c=t(42135),i=function(e,n){return o.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:n,icon:a}))};i.displayName="UserOutlined";var u=o.forwardRef(i)},46165:function(e,n,t){"use strict";t.r(n),t.d(n,{UserDropdown:function(){return j}});var r=t(85893),o=t(66516),a=t(13013),c=t(71577),i=t(86548),u=t(1413),l=t(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},d=t(42135),f=function(e,n){return l.createElement(d.Z,(0,u.Z)((0,u.Z)({},e),{},{ref:n,icon:s}))};f.displayName="LockOutlined";var v=l.forwardRef(f),h=t(38545),m=t(87547),p=t(39398),y=t(4480),w=t(46977),b=t(5152),g=t.n(b),k=t(77466),C=t(79252),Z=t.n(C);const x=g()((()=>Promise.all([t.e(481),t.e(715),t.e(5402),t.e(1908),t.e(4761)]).then(t.bind(t,14761)).then((e=>e.Modal))),{loadableGenerated:{webpack:()=>[14761]}}),E=g()((()=>Promise.all([t.e(5596),t.e(481),t.e(173),t.e(6386),t.e(8119),t.e(3979)]).then(t.bind(t,59096)).then((e=>e.NameChangeModal))),{loadableGenerated:{webpack:()=>[59096]}}),L=g()((()=>Promise.all([t.e(5596),t.e(481),t.e(173),t.e(6880),t.e(575),t.e(712),t.e(4208)]).then(t.bind(t,44208)).then((e=>e.AuthModal))),{loadableGenerated:{webpack:()=>[44208]}}),j=e=>{let{username:n}=e;const[t,u]=(0,l.useState)(!1),[s,d]=(0,l.useState)(!1),[f,b]=(0,y.FV)(k.ZA),g=(0,y.sJ)(k.Q),C=()=>{b(!f)};(0,w.y1)("c",C,{enableOnContentEditable:!1},[f]);const j=(0,y.sJ)(k.db);if(!j)return null;const{displayName:A}=j,_=n||A,M=(0,r.jsxs)(o.Z,{children:[(0,r.jsx)(o.Z.Item,{icon:(0,r.jsx)(i.Z,{}),onClick:()=>{u(!0)},children:"Change name"},"0"),(0,r.jsx)(o.Z.Item,{icon:(0,r.jsx)(v,{}),onClick:()=>d(!0),children:"Authenticate"},"1"),g.chatAvailable&&(0,r.jsx)(o.Z.Item,{icon:(0,r.jsx)(h.Z,{}),onClick:()=>C(),children:f?"Hide Chat":"Show Chat"},"3")]});return(0,r.jsxs)("div",{id:"user-menu",className:"".concat(Z().root),children:[(0,r.jsx)(a.Z,{overlay:M,trigger:["click"],children:(0,r.jsxs)(c.Z,{type:"primary",icon:(0,r.jsx)(m.Z,{className:Z().userIcon}),children:[(0,r.jsx)("span",{className:Z().username,children:_}),(0,r.jsx)(p.Z,{})]})}),(0,r.jsx)(x,{title:"Change Chat Display Name",open:t,handleCancel:()=>u(!1),children:(0,r.jsx)(E,{})}),(0,r.jsx)(x,{title:"Authenticate",open:s,handleCancel:()=>d(!1),children:(0,r.jsx)(L,{})})]})}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2",userIcon:"UserDropdown_userIcon__A5XgE",username:"UserDropdown_username__nVyPA"}},46977:function(e,n,t){"use strict";t.d(n,{y1:function(){return g}});var r=t(67294);t(85893);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}var a=["shift","alt","meta","mod"],c={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function i(e){return(c[e]||e).trim().toLowerCase().replace("key","").replace("digit","").replace("numpad","").replace("arrow","")}function u(e,n){return void 0===n&&(n=","),"string"===typeof e?e.split(n):e}function l(e,n){void 0===n&&(n="+");var t=e.toLocaleLowerCase().split(n).map((function(e){return i(e)}));return o({},{alt:t.includes("alt"),shift:t.includes("shift"),meta:t.includes("meta"),mod:t.includes("mod")},{keys:t.filter((function(e){return!a.includes(e)}))})}var s=new Set;function d(e,n){return void 0===n&&(n=","),(Array.isArray(e)?e:e.split(n)).every((function(e){return s.has(e.trim().toLowerCase())}))}function f(e){var n=Array.isArray(e)?e:[e];s.has("meta")&&s.forEach((function(e){return!function(e){return a.includes(e)}(e)&&s.delete(e.toLowerCase())})),n.forEach((function(e){return s.add(e.toLowerCase())}))}function v(e){var n=Array.isArray(e)?e:[e];"meta"===e?s.clear():n.forEach((function(e){return s.delete(e.toLowerCase())}))}function h(e,n){var t=e.target;void 0===n&&(n=!1);var r=t&&t.tagName;return n instanceof Array?Boolean(r&&n&&n.some((function(e){return e.toLowerCase()===r.toLowerCase()}))):Boolean(r&&n&&!0===n)}"undefined"!==typeof document&&(document.addEventListener("keydown",(function(e){void 0!==e.key&&f([i(e.key),i(e.code)])})),document.addEventListener("keyup",(function(e){void 0!==e.key&&v([i(e.key),i(e.code)])}))),"undefined"!==typeof window&&window.addEventListener("blur",(function(){s.clear()}));var m=(0,r.createContext)(void 0);function p(e,n){return e&&n&&"object"===typeof e&&"object"===typeof n?Object.keys(e).length===Object.keys(n).length&&Object.keys(e).reduce((function(t,r){return t&&p(e[r],n[r])}),!0):e===n}var y=(0,r.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}});var w=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},b="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function g(e,n,t,o){var a=(0,r.useRef)(null),c=(0,r.useRef)(!1),s=t instanceof Array?o instanceof Array?void 0:o:t,g=t instanceof Array?t:o instanceof Array?o:[],k=(0,r.useCallback)(n,[].concat(g)),C=function(e){var n=(0,r.useRef)(void 0);return p(n.current,e)||(n.current=e),n.current}(s),Z=(0,r.useContext)(y).enabledScopes,x=(0,r.useContext)(m);return b((function(){if(!1!==(null==C?void 0:C.enabled)&&(n=Z,t=null==C?void 0:C.scopes,0===n.length&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),1):!t||n.some((function(e){return t.includes(e)}))||n.includes("*"))){var n,t,r=function(n,t){var r;(void 0===t&&(t=!1),!h(n,["input","textarea","select"])||h(n,null==C?void 0:C.enableOnFormTags))&&(null===a.current||document.activeElement===a.current||a.current.contains(document.activeElement)?(null==(r=n.target)||!r.isContentEditable||null!=C&&C.enableOnContentEditable)&&u(e,null==C?void 0:C.splitKey).forEach((function(e){var r,o=l(e,null==C?void 0:C.combinationKey);if((function(e,n,t){void 0===t&&(t=!1);var r=n.alt,o=n.meta,a=n.mod,c=n.shift,u=n.keys,l=e.key,s=e.code,f=d("alt"),v=d("shift"),h=d("meta"),m=d("ctrl"),p=i(s),y=l.toLowerCase();if(!t){if(f!==r&&"alt"!==y)return!1;if(v!==c&&"shift"!==y)return!1;if(a){if(!h&&!m)return!1}else if(h!==o&&m!==o&&"meta"!==p&&"ctrl"!==p)return!1}return!(!u||1!==u.length||!u.includes(y)&&!u.includes(p))||(u?d(u):!u)}(n,o,null==C?void 0:C.ignoreModifiers)||null!=(r=o.keys)&&r.includes("*"))&&!c.current){if(function(e,n,t){("function"===typeof t&&t(e,n)||!0===t)&&e.preventDefault()}(n,o,null==C?void 0:C.preventDefault),!function(e,n,t){return"function"===typeof t?t(e,n):!0===t||void 0===t}(n,o,null==C?void 0:C.enabled))return void w(n);k(n,o),t||(c.current=!0)}})):w(n))},o=function(e){void 0!==e.key&&(f(i(e.code)),(void 0===(null==C?void 0:C.keydown)&&!0!==(null==C?void 0:C.keyup)||null!=C&&C.keydown)&&r(e))},m=function(e){void 0!==e.key&&(v(i(e.code)),c.current=!1,null!=C&&C.keyup&&r(e,!0))};return(a.current||(null==s?void 0:s.document)||document).addEventListener("keyup",m),(a.current||(null==s?void 0:s.document)||document).addEventListener("keydown",o),x&&u(e,null==C?void 0:C.splitKey).forEach((function(e){return x.addHotkey(l(e,null==C?void 0:C.combinationKey))})),function(){(a.current||(null==s?void 0:s.document)||document).removeEventListener("keyup",m),(a.current||(null==s?void 0:s.document)||document).removeEventListener("keydown",o),x&&u(e,null==C?void 0:C.splitKey).forEach((function(e){return x.removeHotkey(l(e,null==C?void 0:C.combinationKey))}))}}}),[e,k,C,Z]),a}}}]);
|
|
//# sourceMappingURL=6165.a8b4133e6221c1b3.js.map
|