(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([[18623,27051,11860,27860,10523],{688694:(e,t,n)=>{e.exports=n.p+"c60c2d02df983392206e39c00de395ca.png"},312915:(e,t,n)=>{e.exports=n.p+"4e93f2a1547c408ca7d45d92ea092bdb.svg"},960362:(e,t,n)=>{e.exports=n.p+"8d7de3921c1f76da6c999507e7a306c4.svg"},123451:(e,t,n)=>{e.exports=n.p+"9f65387c814dd4cb5aff4e4e1e7e0446.svg"},16697:(e,t,n)=>{e.exports=n.p+"ed2007aab2da31a5436e70a28b4d59f9.svg"},105045:(e,t,n)=>{e.exports=n.p+"7ad95b56788fc31c3e5eec667129ba68.svg"},128112:(e,t,n)=>{e.exports=n.p+"9ae90b4dd4d7e4ddd9c8935dae4e87c4.svg"},876406:(e,t,n)=>{e.exports=n.p+"a92681efceabc4ee91964a7cef2571cf.svg"},576884:(e,t,n)=>{e.exports=n.p+"bee123bfad40a3fb4bb42f8d318dd867.svg"},937849:(e,t,n)=>{e.exports=n.p+"96ad9c7f6f636a7fb2028e2a07847776.svg"},772144:(e,t,n)=>{e.exports=n.p+"ef3a1ed683cfcf029971b12a26462072.svg"},976693:(e,t,n)=>{e.exports=n.p+"0e33fc3f60b69ba9b0247df60d589439.svg"},40028:(e,t,n)=>{ e.exports=n.p+"60ea1d16163c13845ccf31e70fd6528b.svg"},470914:(e,t,n)=>{e.exports=n.p+"45372ebbfad1c491747d6f5b7117fd88.svg"},399298:(e,t,n)=>{e.exports=n.p+"8fb4edd1e9b3578340fcc70e2b5e42ca.svg"},20616:(e,t,n)=>{e.exports=n.p+"c332227601f0bacc9e5b60cdb1566b0a.svg"},556306:(e,t,n)=>{e.exports=n.p+"e1f780a67d11d805caf661d4a0f38efb.svg"},72801:(e,t,n)=>{e.exports=n.p+"b7f3703c0dfe7dbf2bee1d8dd98b6861.svg"},956634:(e,t,n)=>{e.exports=n.p+"054d478080ee1ae6fd48b34cf3425509.svg"},772766:(e,t,n)=>{e.exports=n.p+"2a6caeb4c8b092945c4e5295ef4ee01a.svg"},482773:(e,t,n)=>{e.exports=n.p+"56211d7a52c875d24eb87248b915991b.png"},32028:(e,t,n)=>{e.exports=n.p+"5a6c298c68b5963581a107d420352d07.svg"},712218:(e,t,n)=>{e.exports=n.p+"140061ea7dd78e612606683c15a4bcaf.svg"},978193:(e,t,n)=>{e.exports=n.p+"62ed968b7724ad7527920bd109b0ca93.png"},755645:(e,t,n)=>{e.exports=n.p+"6f35b2fc488e26dc1d56b253d01c7b75.svg"},928793:(e,t,n)=>{e.exports=n.p+"99c599a00313a16fa4babba64d461f34.svg"},324752:(e,t,n)=>{ e.exports=n.p+"c173765c2ab447a8ec7ba0e3e8aa3c09.svg"},655916:(e,t,n)=>{e.exports=n.p+"c998fecc59ff94fe8e8e7f3557586c07.svg"},315879:(e,t,n)=>{e.exports=n.p+"255b326a18a4f8a078c90e6c35f6013b.svg"},467314:(e,t,n)=>{e.exports=n.p+"aabf08a5612d80aee6444c21176ea11a.svg"},932568:(e,t,n)=>{e.exports=n.p+"112667acf24cbb3d067ccbc54e3638de.svg"},930519:(e,t,n)=>{e.exports=n.p+"be71475205180432aaa6a89bd8ee306c.svg"},157862:(e,t,n)=>{e.exports=n.p+"40aa3feae87e9745dd56756762029544.svg"},747048:(e,t,n)=>{e.exports=n.p+"364cec2cc5dfb64873e3a33626a56ba1.svg"},558504:(e,t,n)=>{e.exports=n.p+"fa167a933d3bee952bc4a587a08c94ee.png"},417454:(e,t,n)=>{e.exports=n.p+"19d207c2cb99790d16ec686a16e77222.svg"},32358:(e,t,n)=>{e.exports=n.p+"8109cbeeed8e4358aac09a05deddb625.svg"},232353:(e,t,n)=>{e.exports=n.p+"acb954ff414b98380056308d56efcbfd.svg"},529753:(e,t,n)=>{e.exports=n.p+"b2609efe7eaf6066ccf83c63b831b9f5.png"},166682:(e,t,n)=>{e.exports=n.p+"156b50b1934142012e13cddb292be82f.png"},532958:(e,t,n)=>{ e.exports=n.p+"37168b17cb52c41180fc7dc3464416e3.png"},94672:(e,t,n)=>{e.exports=n.p+"8f1371330b0fbaa2cd14397ea198a15a.png"},800193:(e,t,n)=>{e.exports=n.p+"2fa100868d36281cf16e9b488d6783e6.png"},537687:(e,t,n)=>{e.exports=n.p+"343d87c6185c5a798189dbe0454338d2.png"},138e3:(e,t,n)=>{e.exports=n.p+"d848be8a53ceaaf74385fa2240c277fe.png"},806956:(e,t,n)=>{e.exports=n.p+"5eab8ab3c3d86af84e525961596fc710.png"},492137:(e,t,n)=>{e.exports=n.p+"a088a8a4d03c76f5b198a8c38e820823.svg"},419552:(e,t,n)=>{e.exports=n.p+"5e8ddaef72797b0ddec742ea3ffe6b4c.svg"},185204:(e,t,n)=>{e.exports=n.p+"3093c4e6a3ee8ef9d6ee62ffea283603.svg"},73316:(e,t,n)=>{e.exports=n.p+"02e604928e685344a86abbd473841a3d.svg"},385488:(e,t,n)=>{e.exports=n.p+"dbdc2f57ed1a7f2f01a342ab2e6fb032.svg"},5064:(e,t,n)=>{e.exports=n.p+"a375de187c8d70afb21e426ffa95453d.svg"},949191:(e,t,n)=>{e.exports=n.p+"850d4b3febb2dd085c8821beb85cd46c.jpg"},305257:(e,t,n)=>{e.exports=n.p+"db81e4b4d2c579be53e7faafa720fa5b.jpg"},222917:(e,t,n)=>{ e.exports=n.p+"ec499e7dcc451566caeda997fa9265db.svg"},153996:(e,t,n)=>{e.exports=n.p+"e3da44ce48e0ff29426d0cfb99c2580c.svg"},77015:(e,t,n)=>{e.exports=n.p+"7c437e103eb9348c4688a03705d30d4b.mp4"},846334:(e,t,n)=>{"use strict";n.d(t,{h7:()=>o,rh:()=>i,GG:()=>a,R2:()=>l});var r=n(744564);function o(e,t){return new Promise((function(n){setTimeout((function(){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_OPEN",activity:e,isPrivate:t,resolve:n})}),0)}))}function i(e){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_QUERY",query:e})}function a(e){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_SEND",channelId:e})}function l(e){r.Z.dispatch({type:"ACTIVITY_INVITE_MODAL_SEND",userId:e})}},106750:(e,t,n)=>{"use strict";n.d(t,{Ue:()=>x,bR:()=>P,G7:()=>N,K5:()=>A,$z:()=>Z,gk:()=>R,AQ:()=>D,uY:()=>k});var r=n(478465),o=n(224955),i=n.n(o),a=n(817673),l=n(281110),u=n(744564),c=n(784426),s=n(340974),f=n(575136),d=n(2590),p=n(594697);function h(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] 0",approximate_member_count:"> 0"};function w(e){ var t=e.query,n=e.preferredLocale,r=e.offset,o=e.limit,i=e.categoryId,l=e.tag,u=(0,c.s1)(),s=a.stringify({query:t,offset:r,limit:o,preferredLocale:n,categoryId:i,tag:l}),f=u.location.search;if(!(null!=f&&f.length>0&&f.startsWith("?"))||f.startsWith("?")&&f.split("?")[1]!==s){var p={search:s};(0,c.uL)(d.Z5c.GUILD_DISCOVERY,p)}}function x(){if(null!=S){var e=i()("NKTZZ4AIZU",S,{responsesCache:(0,r.A)()}).initIndex(I);u.Z.wait((function(){return u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_INIT",index:e})}))}}function P(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.categoryId,o=void 0===r?p.Hk:r,i=t.preferredLocale,a=t.offset,c=t.length,f=t.tag,h=s.ZP.getSearchIndex();if(null!=h){n&&w({query:e,preferredLocale:i,offset:a,limit:c,categoryId:o,tag:f});u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_FETCH_START",section:d.Lcj.SEARCH,query:e,categoryId:o});var y=Object.assign({},_,t.filters),b=Object.keys(y),v=b.map((function(e){return"".concat(e).concat(y[e])})) ;o!==p.Hk&&v.push("(primary_category_id=".concat(o," OR categories.id=").concat(o,")"));var C=v.join(" AND "),j=["preferred_locale: ".concat(i)],S=["name","description","keywords","categories.name","categories.name_localizations.".concat(i),"primary_category.name","primary_category.name_localizations.".concat(i),"vanity_url_code"];try{var I=h.search(e,{filters:C,optionalFilters:j,length:c,offset:a,restrictSearchableAttributes:S}),x=l.Z.get({url:d.ANM.GUILD_DISCOVERY_VALID_TERM,query:{term:e},oldFormErrors:!0});Promise.all([I,x]).then((function(t){var n=O(t,2),r=n[0],i=r.hits,l=r.nbHits,s=n[1].body.valid;u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_FETCH_SUCCESS",section:d.Lcj.SEARCH,query:e,categoryId:o,guilds:s?E(i.map((function(e){return g(m({},e),{id:e.objectID})}))):[],offset:a,limit:c,total:s?Math.min(l,p.lA):0})})).catch((function(r){r.body.retry_after>0&&h===s.ZP.getSearchIndex()?setTimeout((function(){P(e,t,n)}),1e3*r.body.retry_after):u.Z.dispatch({ type:"GUILD_DISCOVERY_SEARCH_FETCH_FAILURE",section:d.Lcj.SEARCH,categoryId:o,query:e})}))}catch(t){u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_FETCH_FAILURE",section:d.Lcj.SEARCH,categoryId:o,query:e})}}}function N(e,t){var n=s.ZP.getSearchIndex();if(null!=n){var r=Object.assign({},_,t),o=Object.keys(r).map((function(e){return"".concat(e).concat(r[e])}));try{var i=n.search(e,{filters:o.join(" AND "),facets:["categories.id"]}),a=l.Z.get({url:d.ANM.GUILD_DISCOVERY_VALID_TERM,query:{term:e},oldFormErrors:!0});Promise.all([i,a]).then((function(t){var n=O(t,2),r=n[0],o=r.nbHits,i=r.facets,a=n[1].body.valid;u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_UPDATE_COUNTS",query:e,nbHits:a?o:0,facets:a?i:void 0})}))}catch(t){u.Z.dispatch({type:"GUILD_DISCOVERY_SEARCH_COUNTS_FAIL",query:e})}}}function A(e){return T.apply(this,arguments)}function T(){return(T=b((function(e){var t,n;return j(this,(function(r){switch(r.label){case 0:u.Z.dispatch({type:"GUILD_DISCOVERY_POPULAR_FETCH_START",categoryId:e}) ;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,l.Z.get({url:d.ANM.GUILD_DISCOVERY,query:a.stringify({categories:[e]}),oldFormErrors:!0})];case 2:t=r.sent();n=t.body.guilds;u.Z.dispatch({type:"GUILD_DISCOVERY_POPULAR_FETCH_SUCCESS",categoryId:e,guilds:n});return[3,4];case 3:r.sent();u.Z.dispatch({type:"GUILD_DISCOVERY_POPULAR_FETCH_FAILURE",categoryId:e});return[3,4];case 4:return[2]}}))}))).apply(this,arguments)}function Z(e,t){return M.apply(this,arguments)}function M(){return(M=b((function(e,t){return j(this,(function(n){switch(n.label){case 0:u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_START",section:d.Lcj.FEATURED});n.label=1;case 1:n.trys.push([1,3,,4]);return[4,l.Z.get({url:d.ANM.GUILD_DISCOVERY,query:a.stringify({offset:e,limit:t}),oldFormErrors:!0})];case 2:U(n.sent().body,d.Lcj.FEATURED);return[3,4];case 3:n.sent();u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_FAILURE",section:d.Lcj.FEATURED});return[3,4];case 4:return[2]}}))}))).apply(this,arguments)}function R(){ return L.apply(this,arguments)}function L(){return(L=b((function(){var e,t;return j(this,(function(n){switch(n.label){case 0:e=f.Z.applicationStatistics;t=Object.keys(e);u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_START",section:d.Lcj.GAMES_YOU_PLAY});n.label=1;case 1:n.trys.push([1,3,,4]);return[4,l.Z.get({url:d.ANM.GUILD_DISCOVERY,query:a.stringify({application_ids:t}),oldFormErrors:!0})];case 2:U(n.sent().body,d.Lcj.GAMES_YOU_PLAY);return[3,4];case 3:n.sent();u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_FAILURE",section:d.Lcj.GAMES_YOU_PLAY});return[3,4];case 4:return[2]}}))}))).apply(this,arguments)}function D(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(0,c.uL)(d.Z5c.GUILD_DISCOVERY);u.Z.dispatch({type:"GUILD_DISCOVERY_CLEAR_SEARCH"})}function k(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u.Z.dispatch({type:"GUILD_DISCOVERY_SELECT_CATEGORY",categoryId:e,isHomepage:t})}function U(e,t){var n=e.offset,r=e.limit,o=e.guilds,i=e.total ;u.Z.dispatch({type:"GUILD_DISCOVERY_FETCH_SUCCESS",section:t,guilds:o,offset:n,limit:r,total:i})}},832763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(281110),o=n(744564),i=n(2590);const a={fetchRegions:function(e){r.Z.get({url:i.ANM.REGIONS(e),retries:1,oldFormErrors:!0}).then((function(t){return o.Z.dispatch({type:"LOAD_REGIONS",regions:t.body,guildId:e})}),(function(){return o.Z.dispatch({type:"LOAD_REGIONS",regions:[],guildId:e})}))},changeCallRegion:function(e,t){r.Z.patch({url:i.ANM.CALL(e),body:{region:t},oldFormErrors:!0})}}},217458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(281110),o=n(744564),i=n(2590);const a={show:function(e,t){o.Z.wait((function(){return o.Z.dispatch({type:"TUTORIAL_INDICATOR_SHOW",tutorialId:e,renderData:t})}))},hide:function(e){o.Z.wait((function(){return o.Z.dispatch({type:"TUTORIAL_INDICATOR_HIDE",tutorialId:e})}))},dismiss:function(e){o.Z.wait((function(){return o.Z.dispatch({type:"TUTORIAL_INDICATOR_DISMISS",tutorialId:e})}));r.Z.put({ url:i.ANM.TUTORIAL_INDICATOR(e),oldFormErrors:!0})},suppressAll:function(){o.Z.dispatch({type:"TUTORIAL_INDICATOR_SUPPRESS_ALL"});r.Z.post({url:i.ANM.TUTORIAL_INDICATORS_SUPPRESS,oldFormErrors:!0})}}},268319:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(707961),o=n(744564),i=n(943469),a=n(665472),l=n(567867),u=n(444663),c=n(769915),s=n(598143),f=n(474717),d=n(460471),p=n(571690),h=n(201891),y=n(649536),b=n(358624),v=n(396043),m=n(2590);function g(e){var t,n,r,o=null!=e.fileItems?e.fileItems.map((function(e){return null!==(t=e.mimeType)&&void 0!==t?t:"unknown"})):[],i=null!==(n=e.errorMessage)&&void 0!==n?n:void 0,a=null!==(r=e.failureCode)&&void 0!==r?r:void 0;(0,v.yw)(m.rMx.SEND_MESSAGE_FAILURE,{failure_code:a,error_message:i,attachment_mimetypes:o})}var O=n(28862),E=n(798808),C=n(331055),j=n(284610),S=n(255592),I=n(661123),_=n(473708);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>ku});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(496486),s=n.n(c),f=n(751615),d=n(202351),p=n(707961),h=n(971402),y=n(672380),b=n(679724),v=n(151650),m=n(609145),g=n(566706),O=n(922189),E=n(773011),C=n(281808),j=n(91174),S=n(792800),I=n(744564),_=n(496916),w=n(172028),x=n(717091),P=n(652591),N=n(937119),A=n(921603),T=n(878033),Z=n(876186),M=n(34183),R=n(672886),L=n(2590),D=n(473708),k=n(8429),U=n.n(k);function B(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return} l.done?t(u):Promise.resolve(u).then(r,o)}function F(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,l,"next",e)}function l(e){B(i,r,o,a,l,"throw",e)}a(void 0)}))}}function G(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function H(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var V=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n) ;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var me=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys, o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?D.Z.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})]})})]})}));const Ze=function(e){var t=e.channel,n=e.directoryEntries,o=e.handleCreateOrAddGuild,i=e.searchQuery,a=e.setSearchQuery,l=e.handleClearSearch,u=e.handleSearchKeyPress,c=e.currentCategoryId,s=e.handleSelectCategory,f=e.categoryCounts,d=e.allEntriesCount,h=e.isLoading;return(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsxs)(p.yWw,{className:Se().scroller,children:[(0,r.jsx)(Te,{searchQuery:i,setSearchQuery:a,handleClearSearch:l,handleSearchKeyPress:u}),(0,r.jsx)(p.h21,{orientation:"horizontal",children:(0,r.jsxs)(p.njP,{className:_e().tabBar,type:"top",look:"brand",selectedItem:c,onItemSelect:function(e){s(e)},children:[(0,r.jsx)(p.njP.Item,{className:_e().tabBarItem,id:Ce.AR.ALL,children:"".concat(D.Z.Messages.DIRECTORY_CATEGORY_ALL," (").concat(d,")")},Ce.AR.ALL),(0,Ce.b7)(t.id).map((function(e){var t=e.value,n=e.label;return(0,r.jsx)(p.njP.Item,{className:_e().tabBarItem,id:t, children:"".concat(n," ").concat(null!=f[t]?"(".concat(f[t],")"):"")},t)}))]})}),h&&null==n?(0,r.jsx)(p.$jN,{className:Se().spinner}):null==n?void 0:n.map((function(e){return(0,r.jsxs)(r.Fragment,{children:[void 0!==e.header?(0,r.jsx)(p.xvT,{variant:"text-md/semibold",className:_e().sectionHeader,children:e.header}):null,(0,r.jsxs)("div",{className:Se().cardsContainer,children:[e.entries.map((function(e){return(0,r.jsx)(Ee,{entry:e},e.guildId)})),e.appendEndCard&&null!=o?(0,r.jsx)(ge,{onClick:o}):null]})]})}))]})})};var Me=n(549331);var Re=n(873308),Le=n(495910),De=n.n(Le),ke=n(123451),Ue=n.n(ke);const Be=function(e){var t,n=e.searchQuery,o=e.setSearchQuery,i=e.mostRecentQuery,a=e.handleClearSearch,l=e.handleSearchKeyPress,u=e.handleCreateOrAddGuild,c=e.searchResults;if(e.searchFetching)t=(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsx)(p.$jN,{className:Se().spinner})});else if(0===c.length){var s=null!=u?D.Z.Messages.DIRECTORY_SEARCH_NO_RESULTS_SUBTITLE.format({ addServerHook:function(e,t){return(0,r.jsx)(p.eee,{onClick:u,children:e},t)}}):D.Z.Messages.DIRECTORY_SEARCH_NO_RESULTS_NO_ADD;t=(0,r.jsxs)("div",{className:De().emptySearchWrapper,children:[(0,r.jsx)("img",{className:De().emptySearchImage,alt:"",src:Ue()}),(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",color:"header-primary",className:De().emptySearchTitle,children:D.Z.Messages.DIRECTORY_SEARCH_NO_RESULTS_TITLE}),(0,r.jsx)(p.xvT,{variant:"text-md/normal",color:"header-secondary",className:De().emptySearchSubtitle,children:s})]})}else t=(0,r.jsx)("div",{className:Se().cardsContainer,children:c.map((function(e){return(0,r.jsx)(Ee,{entry:e},e.guildId)}))});return(0,r.jsx)("div",{className:Se().pageContainer,children:(0,r.jsxs)(p.w0Z,{className:Se().scroller,children:[(0,r.jsxs)("div",{className:De().searchHeader,children:[(0,r.jsxs)("div",{className:De().headerTitleWrapper,children:[(0,r.jsx)(p.P3F,{onClick:a,className:De().arrow,children:(0,r.jsx)(Re.Z,{direction:Re.Z.Directions.LEFT}) }),(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",className:De().searchPageTitle,children:D.Z.Messages.DIRECTORY_SEARCH_RESULTS_HEADER.format({numResults:c.length,query:i})})]}),(0,r.jsx)(z.Z,{searchTerm:n,className:De().searchPageBox,inputClassName:De().searchPageInput,label:D.Z.Messages.DIRECTORY_SEARCH_PLACEHOLDER,placeholder:D.Z.Messages.DIRECTORY_SEARCH_PLACEHOLDER,onChange:o,onClear:a,onKeyPress:l,cta:null!=n&&n.length>0?D.Z.Messages.GUILD_DISCOVERY_SEARCH_ENTER_CTA:null})]}),t]})})};function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&n.push({header:D.Z.Messages.SEARCH_NEWEST,entries:r,appendEndCard:!1});var i=e.filter((function(e){return!o.has(e.guildId)}));(i=(0,Me.Th)(i)).length>0&&n.push({header:D.Z.Messages.ALL_SERVERS,entries:i,appendEndCard:!0});return n}(Object.values(u),l):null}),[u,l]),b=(0,d.cj)([T.Z],(function(){var e=T.Z.getSearchState(t.id),n=e.mostRecentQuery;return{mostRecentQuery:n,searchFetching:e.fetching,searchResults:T.Z.getSearchResults(t.id,n)}})),v=b.mostRecentQuery,m=b.searchFetching,g=b.searchResults,O=ze(o.useState(v),2),E=O[0],C=O[1],j=""!==v,S=w.Z.useExperiment({guildId:null!==(h=i.id)&&void 0!==h?h:""}).showHubEventsList;o.useEffect((function(){A.c$(t.id);A.YZ(t.id);S&&N.c(t.id);C(v) }),[t.id]);o.useEffect((function(){P.default.track(L.rMx.GUILD_DIRECTORY_CHANNEL_VIEWED,{directory_channel_id:t.id,directory_guild_id:i.id,primary_category_id:l})}),[t.id,i.id,l]);var R=(0,M.G)(t)?function(){(0,p.ZDy)(He((function(){var e,o;return Ye(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(95599),n.e(47035)]).then(n.bind(n,647035))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,We(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]3&&void 0!==arguments[3]?arguments[3]:{}).isPreviewingRoles ;if(!(void 0!==r&&r||e.published))return!1;var o=n.permissionOverwrites[e.role_id];if((0,mt.TG)(n,o))return!0;var i=t.getRole(t.id),a=null!=i&&!bt.Z.has(i.permissions,L.Plq.VIEW_CHANNEL),l=(0,mt.wB)(n,n.permissionOverwrites[t.id]),u=t.getRole(e.role_id);return a&&!l&&null!=u&&(0,mt.MT)(u)&&!(0,mt.wB)(n,o)}(t,o,e,{isPreviewingRoles:i})})):[]}),[t,n,r])}var Ot=n(805537),Et=n(383163),Ct=n(340562),jt=n(795974),St=n.n(jt);function It(e){var t=e.guildId,n=e.channelId,i=gt({guildId:t,channelId:n}),a=(0,yt.GG)(t),l=(0,yt.YB)(t),u=(0,d.e7)([X.Z],(function(){return X.Z.getGuild(t)}),[t]),c=null==u?void 0:u.name,s=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(n)})),f=o.useMemo((function(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=a[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value,u=!0,c=!1,s=void 0;try{for(var f,d=l.subscription_listings_ids[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){e[f.value]=l.id}}catch(e){c=!0;s=e}finally{try{u||null==d.return||d.return()}finally{ if(c)throw s}}}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}),[a]);(0,Ot.Z)({guildId:t,location:L.Sbl.ROLE_SUBSCRIPTION_GATED_CHANNEL,relevantSubscriptionListingIds:i.map((function(e){return e.id}))});return null==u?(0,r.jsx)("div",{className:St().spinnerContainer,children:(0,r.jsx)(p.$jN,{className:St().spinner})}):(0,r.jsxs)(p.w0Z,{className:St().pageContainer,children:[(0,r.jsx)(p.X6q,{variant:"heading-xl/semibold",className:St().joinCtaTitle,children:D.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_UPSELL_PAGE_CTA.format({serverName:c,channelName:null==s?void 0:s.name})}),(0,r.jsx)(p.xvT,{className:St().joinCtaSubtitle,variant:"text-md/normal",color:"header-secondary",children:null==l?void 0:l.description}),(0,r.jsx)(Et.Z,{guildId:t,children:i.filter((function(e){return null!=f[e.id]})).map((function(e){return(0,r.jsx)(Ct.Z,{guildId:t,listingId:e.id,groupListingId:f[e.id],analyticsLocation:L.Sbl.ROLE_SUBSCRIPTION_GATED_CHANNEL},e.id)})) })]})}var _t=n(865050),wt=n(7602),xt=n(361610),Pt=n(396043),Nt=n(804185),At=n(464187),Tt=n(363582);function Zt(e){var t=e.channelId,n=(0,d.e7)([Nt.ZP],(function(){return Nt.ZP.getSection(t)})),o=(0,d.e7)([At.Z],(function(){return At.Z.getGuildId()})),i=n===L.ULH.MEMBERS;return(0,r.jsx)(nt.JO,{tooltip:i?D.Z.Messages.MEMBER_LIST_SHOWN:D.Z.Messages.MEMBER_LIST_HIDDEN,icon:Tt.Z,onClick:function(){Pt.ZP.trackWithMetadata(L.rMx.MEMBER_LIST_TOGGLED,{channel_id:t,guild_id:o,member_list_open:!i});xt.Z.toggleMembersSection()},selected:i})}var Mt=n(25410),Rt=n(933818),Lt=n(592981),Dt=n(473903),kt=n(813357),Ut=n(913928),Bt=[];function Ft(e){var t=e.channel,i=e.onJump,a=(0,d.cj)([Lt.Z],(function(){var e=Lt.Z.getPinnedMessages(t.id),n=null!=e?e.messages:Bt;return{messages:n,loading:null==n||null!=e&&e.loading}})),l=a.messages,u=a.loading,c=(0,d.e7)([x.ZP],(function(){return x.ZP.hasUnreadPins(t.id)})),s=(0,d.e7)([Dt.default],(function(){if(!t.isPrivate())return null ;var e=Dt.default.getUser(t.getRecipientId());return null!=e?e.username:null}));o.useEffect((function(){c&&Rt.Z.ackPins(t.id)}),[c,t.id]);return(0,r.jsx)(p.VqE,{"aria-label":D.Z.Messages.PINNED_MESSAGES,children:(0,r.jsx)(kt.ZP,{onFetch:function(){Rt.Z.ackPins(t.id);Rt.Z.fetchPins(t.id)},channel:t,messages:l,loading:u,analyticsName:"Channel Pins",onCloseMessage:function(e,n){null!=e&&(n.shiftKey?Rt.Z.unpinMessage(t,e.id):Ut.Z.confirmUnpin(t,e))},onJump:i,getProTip:function(){return t.isPrivate()?t.type===L.d4z.DM?D.Z.Messages.PINNED_MESSAGES_PRO_TIP_BODY_DM.format({other:s}):D.Z.Messages.PINNED_MESSAGES_PRO_TIP_BODY_GROUP_DM:D.Z.Messages.PINNED_MESSAGES_PRO_TIP_BODY_CHANNEL},renderHeader:function(){return(0,r.jsx)(kt.h4,{title:D.Z.Messages.PINNED_MESSAGES})},renderEmptyState:function(e){var o=D.Z.Messages.NO_PINS_IN_CHANNEL;t.isPrivate()&&(o=D.Z.Messages.NO_PINS_IN_DM);var i=e===L.BRd.LIGHT?n(937849):n(772144);return(0,r.jsx)(kt.nH,{msg:o,image:i},"emptystate")},listName:"pins"})})} var Gt=n(26468),Ht=n(747126),Vt=n(715173),Wt=n(930948);function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?null:null!==(n=e.message)&&void 0!==n?n:null;var n}var Yr=n(161283),Kr=n(323483),qr=n(367406),Qr=n(593005),Xr=n(59439),Jr=n.n(Xr),$r=n(500360),eo=n.n($r);function to(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?(0,r.jsx)(p.xvT,{variant:"text-md/normal",color:"interactive-normal",className:Oo().count,children:l>=100?"99+":l}):null}))}})}var _o=n(426012),wo=n(281873),xo=n(576668),Po=n(874710),No=n(703654),Ao=n(103314),To=n(313031),Zo=n(954814),Mo=n(839463),Ro=n(579583),Lo=n(112897);function Do(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,G=!m.bot&&null!=M&&M>0,H=(0,Ko.ZP)();o.useEffect((function(){b.current=Date.now()}),[]);o.useEffect((function(){l&&(0,ni.Z)(m.id,m.getAvatarURL(void 0,80),{withMutualGuilds:!m.bot,withMutualFriendsCount:!m.bot})}),[m,l]);o.useEffect((function(){null!=E&&C&&(0,Hn.U)({displayProfile:E,isMobile:w,loadDurationMs:Date.now()-b.current,activity:S,customStatusActivity:I,status:x})}),[E,w,S,I,x,C]);var V,W=null==k?void 0:k.map((function(e){return(0,r.jsx)(Ri,{connection:e,user:m,theme:H},e.guild.id)})),z=null==R?void 0:R.map((function(e){return(0,r.jsx)(xi,{connection:e},e.key)})),Y=o.useCallback((function(){m.bot||B||null!=z||(0,Yo.Sr)(m.id)}),[B,z,m.id,m.bot]),K=o.useCallback((function(){return y(!0) }),[]),q=o.useCallback((function(){return y(!1)}),[]);return C?(0,r.jsx)("aside",{className:Yi().profilePanel,onMouseEnter:K,onMouseLeave:q,children:(0,r.jsx)(ri.Z,{user:m,profileType:Bi.y0.PANEL,useDefaultClientTheme:!0,pendingThemeColors:c?void 0:[null,null],children:(0,r.jsxs)(p.u2D,{children:[(0,r.jsx)(Wi,{user:m,displayProfile:E,channel:t,animateAssets:h,forceShowPremiumBadge:h}),(0,r.jsxs)(ri.Z.Inner,{children:[(0,r.jsx)(fi.Z,{user:m,nickname:A}),(0,r.jsx)(li.Z,{customStatusActivity:I,animate:h}),(0,r.jsx)(oi.Z,{}),(0,r.jsx)(si.Z,{currentPronouns:null!==(V=null==E?void 0:E.pronouns)&&void 0!==V?V:"",hidePersonalInformation:T}),(0,r.jsx)(ai.Z,{bio:null==E?void 0:E.bio,hidePersonalInformation:T,animateOnHover:!0,isHovering:h}),(0,r.jsx)(ui.Z,{userId:s}),(0,r.jsx)(oi.Z,{}),(0,r.jsx)(ci.Z,{user:m,setNote:!1,hideNote:!1})]}),N?(0,r.jsx)(ri.Z.Inner,{children:(0,r.jsx)(ii.Z,{activity:S,user:m,channelId:t.id})}):null,(0,r.jsxs)(ri.Z.Inner,{className:Yi().profilePanelConnections, children:[F?(0,r.jsx)(Ei,{className:Yi().mutualGuildsList,header:D.Z.Messages.MUTUAL_GUILDS_COUNT.format({count:null==k?void 0:k.length}),isLoadingHeader:U,children:W}):null,G?(0,r.jsx)(Ei,{className:a()(Yi().mutualFriendsList,qi({},Yi().mutualFriendsDivider,F)),header:D.Z.Messages.MUTUAL_FRIENDS_COUNT.format({count:M}),isLoadingHeader:U,isLoadingContents:B,loadingContentsCount:M,onFocus:Y,onHover:Y,isMutualFriendsList:!0,children:z}):null]})]})})}):null};var Ji=n(980617),$i=n(135750),ea=n(102909),ta=n(549511),na=n(382060),ra=n(715107);var oa=n(837067),ia=n(733300),aa=n(977005),la=n(72580),ua=n(463473),ca=n(973553),sa=n(798159),fa=n(457217),da=n(289283),pa=n(199731),ha=n(623934),ya=n(80317),ba=n(833667),va=n(837162),ma=n(736543),ga=n(183640),Oa=n(381186),Ea=n(788169),Ca=n(202237),ja=n(380652),Sa=n(310126),Ia=n(742224),_a=n(735551),wa=n.n(_a);function xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t) ;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ua(e,t){return!t||"object"!==Ga(t)&&"function"!=typeof t?Pa(e):t}function Ba(e,t){Ba=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ba(e,t)}function Fa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n) ;if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xa(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ga=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ha(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ma(e);if(t){var o=Ma(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ua(this,n)}}var Va=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]");Wt.S.dispatchToLastSubscribed(L.CkL.INSERT_TEXT,{plainText:o,rawText:i});Er.Z.startTyping(r.id)};e.openGuildSubscriptionModal=function(t){var n=e.props.guildId;if(null!=n){t.stopPropagation();(0,ba.f)({guildId:n,location:{section:L.jXE.MEMBER_LIST,object:L.qAy.BOOST_GEM_ICON}})}};e.renderUserPopout=function(t){ return(0,r.jsx)(ga.Z,Da(La({},t),{userId:e.props.user.id,guildId:e.props.guildId,channelId:e.props.channel.id}))};return e}var i=o.prototype;i.shouldComponentUpdate=function(e){return!(0,pa.Z)(this.props,e,["channelId"])};i.render=function(){var e=this,t=this.props,n=t.colorString,o=t.colorRoleName,i=t.isOwner,a=t.nick,l=t.user,u=t.currentUser,c=t.activities,s=t.applicationStream,f=t.status,d=t.channel,h=t.guildId,y=t.isTyping,b=t.isMobileOnline,v=t.premiumSince,m=ka(t,["colorString","colorRoleName","isOwner","nick","user","currentUser","activities","applicationStream","status","channel","guildId","isTyping","isMobileOnline","premiumSince"]),g=null!=v?new Date(v):null;return(0,r.jsx)(p.yRy,{preload:function(){return(0,ni.Z)(l.id,l.getAvatarURL(h,80),{guildId:h,channelId:d.id})},renderPopout:this.renderUserPopout,position:da.tq?"window_center":"left",spacing:16,onShiftClick:this.handleShiftClick,children:function(t,p){var v=p.isShown;return(0,r.jsx)(Ia.Z,La({className:wa().member, onContextMenu:e.renderUserContextMenu,shouldAnimateStatus:Wa,user:l,currentUser:u,nick:a,status:f,activities:c,applicationStream:s,isOwner:i,premiumSince:g,colorString:n,colorRoleName:o,isTyping:y,channel:d,guildId:h,isMobile:b,onClickPremiumGuildIcon:e.openGuildSubscriptionModal,selected:v,itemProps:m},t))}})};return o}(o.Component),Ka=o.memo((function(e){var t=e.colorRoleId,n=ka(e,["colorRoleId"]),o=e.channel,i=e.user,a=e.index,l=(0,fa.JA)("".concat(a)),u=(0,d.e7)([Ea.Z],(function(){return Ea.Z.isTyping(o.id,i.id)})),c=(0,d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),s=(0,d.e7)([X.Z],(function(){var e,n;return null!=t?null===(n=null===(e=X.Z.getGuild(o.guild_id))||void 0===e?void 0:e.getRole(t))||void 0===n?void 0:n.name:void 0}),[o,t]);return(0,r.jsx)(Ya,Da(La({},n,l),{isTyping:u,currentUser:c,colorRoleName:s}))})),qa=o.memo((function(e){var t=e.id,n=e.title,o=e.count,i=e.guildId,a=(0,va.p9)({roleId:t,guildId:i,size:16});return t===L.Skl.UNKNOWN?(0, r.jsx)("div",{className:wa().membersGroup,children:(0,r.jsx)("div",{className:wa().memberGroupsPlaceholder})}):(0,r.jsxs)(Ca.Z,{className:wa().membersGroup,children:[(0,r.jsx)(p.nn4,{children:D.Z.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:n,count:o})}),(0,r.jsxs)("span",{"aria-hidden":!0,children:[null!=a?(0,r.jsx)(ja.Z,La({className:wa().roleIcon},a)):null,n," — ",o]})]})}));function Qa(e){var t=e.index,n=(0,fa.JA)("".concat(t));return(0,r.jsx)(Ia.Z,{itemProps:n})}var Xa=function(e){Ra(n,e);var t=Ha(n);function n(){Ta(this,n);var e;(e=t.apply(this,arguments))._list=null;e.setList=function(t){e._list=t;e.props.listRef.current=t};e.getRowHeight=function(){return e.props.canUseAvatarDecorations?44+Ia.x:44};e.renderSection=function(t){var n=t.section,i=e.props,a=i.groups,l=i.channel,u=a[n];return 0===n?(0,r.jsx)(ma.Z,{tutorialId:"whos-online",position:"left",inlineSpecs:za,children:(0,r.jsx)(qa,Da(La({},u),{guildId:l.guild_id}))},"section-".concat(n)):(0, o.createElement)(qa,Da(La({},u),{key:"section-".concat(n),guildId:l.guild_id}))};e.getRowProps=function(t){var n=e.props,r=n.groups,o=n.rows,i=r[t.section];if(null==i)return null;var a=i.index;return null==a||"row"!==t.type?null:o[a+1+t.row]};e.renderRow=function(t){var n=t.section,o=t.row,i=t.rowIndex,a=e.props.channel,l=e.getRowProps(t);if(null!=l&&l.type===Oa.so.MEMBER&&"user"in l){var u=l.colorString,c=l.colorRoleId,s=l.user,f=l.status,d=l.isOwner,p=l.isMobileOnline,h=l.nick,y=l.activities,b=l.applicationStream,v=l.premiumSince;return(0,r.jsx)(Ka,{colorString:u,colorRoleId:c,user:s,status:f,isOwner:d,nick:h,activities:y,applicationStream:b,channel:a,guildId:a.guild_id,premiumSince:v,isMobileOnline:p,index:i},"member-".concat(l.user.id))}return(0,r.jsx)(Qa,{index:i},"placeholder-".concat(n,":").concat(o))};e.handleScroll=function(){e.updateSubscription()};e.updateSubscription=s().debounce((function(){if(null!=e._list){ var t=e.props.channel,n=e.getDimensions(),r=n.rowHeight,o=n.y,i=n.height;(0,ha.TV)({guildId:t.guild_id,channelId:t.id,y:o,height:i,rowHeight:r})}}),50);e.trackMemberListViewed=function(){var t;if(e.lastReportedAnalyticsChannel!==e.props.channel.id){var n=null===(t=e._list)||void 0===t?void 0:t.getItems(),r=e.getDimensions().rowsVisible;if(void 0!==r&&0!==r&&null!=n){var o=n.map((function(t){return e.getRowProps(t)})).slice(0,r+1).filter(la.lm);if(0!==o.length){var i=o.reduce((function(t,n){if(n.type!==Oa.so.MEMBER)return t;t.num_users_visible++;n.isMobileOnline&&t.num_users_visible_with_mobile_indicator++;if(null!=n.activities&&n.activities.length>0){t.num_users_visible_with_activity++;n.activities.some((function(e){return e.type===L.IIU.PLAYING}))&&t.num_users_visible_with_game_activity++}e.props.canUseAvatarDecorations&&null!=n.user.avatarDecoration&&t.num_users_visible_with_avatar_decoration++;return t}),{num_users_visible:0,num_users_visible_with_mobile_indicator:0, num_users_visible_with_game_activity:0,num_users_visible_with_activity:0,num_users_visible_with_avatar_decoration:0});e.lastReportedAnalyticsChannel=e.props.channel.id;Pt.ZP.trackWithMetadata(L.rMx.MEMBER_LIST_VIEWED,La({},i))}}}};return e}var i=n.prototype;i.shouldComponentUpdate=function(e){return e.channel.id!==this.props.channel.id||e.version!==this.props.version||e.groups.length!==this.props.groups.length};i.componentDidMount=function(){this.updateSubscription();this.trackMemberListViewed()};i.componentDidUpdate=function(e){e.channel.id!==this.props.channel.id&&this.updateSubscription();this.trackMemberListViewed()};i.getDimensions=function(){var e=this._list;if(null==e)return{y:0,height:0,rowHeight:0};var t=e.getScrollerState(),n=t.offsetHeight,r=t.scrollTop,o=Math.floor(n/this.getRowHeight());return{height:n,rowHeight:this.getRowHeight(),rowsVisible:o,y:r}};i.render=function(){var e=this,t=this.props,n=t.groups,o=t.listId,i=t.channel;return(0,r.jsx)(p.Wdt,{children:function(t){ return(0,r.jsx)(Lr.FG,{children:function(l){return(0,r.jsx)("aside",{className:a()(wa().membersWrap,wa().hiddenMembers),"aria-labelledby":l,children:(0,r.jsx)(p.y5t,{component:(0,r.jsx)(p.nn4,{children:(0,r.jsx)(p.H,{id:l,children:D.Z.Messages.MEMBERS_LIST_LANDMARK_LABEL.format({channel:i.name})})}),children:(0,r.jsx)(fa.SJ,{children:function(i){var l=i.ref,u=i.role,c=ka(i,["ref","role"]);return(0,r.jsx)(p.aVo,La({innerRole:u,innerAriaLabel:D.Z.Messages.MEMBERS,ref:function(t){e._list=t;e.props.listRef.current=t;var n;l.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null},className:a()(wa().members,Za({},wa().fullWidth,da.tq)),paddingTop:0,sectionHeight:40,rowHeight:e.getRowHeight,renderSection:e.renderSection,renderRow:e.renderRow,sections:n.map((function(e){return e.count})),onScroll:e.handleScroll,fade:!0,customTheme:!0},c,t),o)}})})})}})}})};return n}(o.Component);function Ja(e){var t=e.channel,n=e.className,i=(0,d.e7)([jr.Z],(function(){ return jr.Z.keyboardModeEnabled})),l=(0,d.cj)([Oa.ZP],(function(){return Oa.ZP.getProps(t.guild_id,t.id)})),u=l.rows,c=l.groups,s=o.useRef(null),f=o.useCallback((function(e,t){var n=s.current;if(null!=n){var r=parseInt(t,10),o=Fa(n.getSectionRowFromIndex(r),2),i=o[0],a=o[1],l=0===i&&0===a?44:0;n.scrollToIndex({section:i,row:a,padding:l,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}}),[]),p=o.useCallback((function(){return new Promise((function(e){var t=s.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),h=o.useCallback((function(){return new Promise((function(e){var t=s.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]),y=(0,sa.ZP)({id:"members-".concat(t.id),setFocus:f,isEnabled:i,scrollToStart:p, scrollToEnd:h}),b=(0,ya.U)().canUseAvatarDecorations;return(0,r.jsx)("div",{className:a()(wa().container,n),children:(0,r.jsx)(fa.bG,{navigator:y,children:(0,r.jsx)(Xa,Da(La({},e,l),{groups:c,rows:u,listRef:s,canUseAvatarDecorations:b}))})})}function $a(e){var t=e.channel,n=e.className,i=o.useDeferredValue(t);return o.useMemo((function(){return(0,r.jsx)(Ja,{channel:i,className:n})}),[i,n])}var el=n(730381),tl=n.n(el),nl=n(665472),rl=n(828439),ol=n(634698),il=n(258985),al=n(399098),ll=n(60744),ul=n(79308),cl=n(921122),sl=n(70145),fl=n(102921),dl=n(365804),pl=n.n(dl);function hl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function yl(e){var t,n=e.channel,i=e.summary,l=e.index,u=e.trailingMargin,c=void 0===u||u,s=(0,d.Wu)([Dt.default],(function(){var e;return i.people.map((function(t){return null!==(e=Dt.default.getUser(t))&&void 0!==e?e:null})).filter(la.lm)}),[i.people]),f=o.useCallback((function(){ P.default.track(L.rMx.SUMMARIES_TOPIC_CLICKED,{source:"sidebar",message_id:i.startId});nl.Z.jumpToMessage({channelId:n.id,messageId:i.startId,jumpType:rl.S.INSTANT,flash:!0});setTimeout((function(){(0,ll.ac)(n.id,l)}),500)}),[n.id,i.startId,l]),h=(0,d.e7)([ul.Z],(function(){return ul.Z.visibleSummaryIndex()})),y=fl.Z.extractTimestamp(i.startId),b=tl()().diff(y,"s")<2592e3?(0,vo.Ye)(y):(0,sl.vc)(tl()(y),"L");return(0,r.jsxs)(p.P3F,{className:a()(pl().topicBox,(t={},hl(t,pl().topicBoxSelected,h===l),hl(t,pl().topicBoxLast,c),t)),onClick:f,children:[(0,r.jsxs)("div",{className:pl().infoRow,children:[(0,r.jsx)(p.xvT,{className:pl().timeAgo,color:"header-secondary",variant:"text-sm/normal",children:b}),(0,r.jsx)(il.Z,{height:4,width:4,"aria-hidden":"true",className:pl().dotSpacer}),(0,r.jsx)(cl.Z,{height:9,width:9,className:pl().chatBubbleIcon}),(0,r.jsx)(p.xvT,{className:pl().messageCount,color:"header-secondary",variant:"text-sm/normal",children:i.count}),(0,r.jsx)(il.Z,{height:4,width:4, "aria-hidden":"true",className:pl().dotSpacer}),(0,r.jsx)(al.Z,{partySize:{knownSize:s.length,unknownSize:0,totalSize:s.length},maxAvatarsShown:3,members:s})]}),(0,r.jsx)(p.xvT,{color:"header-primary",variant:"text-sm/semibold",className:pl().topicTitle,children:i.topic}),(0,r.jsx)(p.xvT,{color:"header-secondary",variant:"text-sm/normal",children:i.summShort})]})}function bl(e){var t,n,i=e.channel,a=(0,v.t)(i.guild_id),l=(0,d.Wu)([ul.Z],(function(){return null!==(t=ul.Z.summaries(i.id))&&void 0!==t?t:[]})),u=(0,d.cj)([ul.Z],(function(){return null!==(n=ul.Z.status(i.id))&&void 0!==n?n:{}}),[i]),c=u.fetching,f=u.lastReceivedAt,h=(0,ol.Z)(l);o.useEffect((function(){s().isEqual(h,l)||P.default.track(L.rMx.SUMMARIES_SIDEBAR_VIEWED,{num_summaries:l.length,message_counts:l.map((function(e){return e.count})),start_message_ids:l.map((function(e){return e.startId})),end_message_ids:l.map((function(e){return e.endId})),num_participants:l.map((function(e){return e.people.length}))})}),[l,h]);(0, ll.zB)(i.id);return a?(0,r.jsx)(p.h21,{className:pl().container,children:function(e){return null!=e&&e.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.xvT,{color:"interactive-normal",variant:"text-sm/semibold",className:pl().title,children:D.Z.Messages.TOPICS}),e.filter((function(e){return null!=e.people})).map((function(t,n){return(0,r.jsxs)("div",{children:[(0,r.jsx)(yl,{summary:t,channel:i,index:n,trailingMargin:n===e.length-1}),n===e.length-1?null:(0,r.jsx)("div",{className:pl().divider})]},n)}))]}):c&&null==f?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.xvT,{color:"interactive-normal",variant:"text-sm/semibold",className:pl().title,children:D.Z.Messages.TOPICS}),(0,r.jsx)(p.$jN,{})]}):(0,r.jsxs)("div",{className:pl().emptyTopicBox,children:[(0,r.jsx)("div",{role:"img","aria-label":D.Z.Messages.SUMMARY_NO_TOPICS_ALT_TEXT,className:pl().emptyTopicImage}),(0,r.jsx)(p.xvT,{color:"header-primary",variant:"text-sm/semibold",className:pl().emptyTopicTitle, children:D.Z.Messages.SUMMARY_NO_TOPICS}),(0,r.jsx)(p.xvT,{color:"header-secondary",variant:"text-sm/normal",children:D.Z.Messages.SUMMARY_EMPTY_TOPICS})]})}(l)}):null}var vl,ml=n(436622),gl=n(996229),Ol=n.n(gl),El=n(192941),Cl=n.n(El),jl=n(232353),Sl=n.n(jl);function Il(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var _l=(Il(vl={},L.BRd.DARK,Cl()),Il(vl,L.BRd.LIGHT,Sl()),vl);const wl=function(){var e=(0,Ko.ZP)();o.useEffect((function(){Pt.ZP.trackWithMetadata(L.rMx.GUILD_OUTAGE_VIEWED,{})}),[]);return(0,r.jsxs)("div",{className:Ol().container,children:[(0,r.jsxs)(ln.Z,{toolbar:(0,r.jsx)(o.Fragment,{}),children:[(0,r.jsx)(ln.Z.Icon,{icon:ml.Z,"aria-hidden":!0}),(0,r.jsx)(ln.Z.Title,{children:D.Z.Messages.GUILD_UNAVAILABLE_HEADER})]}),(0,r.jsxs)("div",{className:Ol().content,children:[(0,r.jsx)("img",{alt:"",className:Ol().splashImage,src:_l[e]}),(0,r.jsx)(p.X6q,{className:Ol().splashHeader,variant:"heading-lg/medium", children:D.Z.Messages.GUILD_UNAVAILABLE_TITLE}),(0,r.jsx)(p.xvT,{className:Ol().splashText,variant:"text-md/normal",children:D.Z.Messages.GUILD_UNAVAILABLE_BODY})]})]})};var xl=n(591821),Pl=n(281110),Nl=n(877778);var Al=n(609853),Tl=n(651034);var Zl=n(580987),Ml=n.n(Zl);function Rl(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ll(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Rl(i,r,o,a,l,"next",e)}function l(e){Rl(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Dl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function kl(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]");Wt.S.dispatchToLastSubscribed(L.CkL.INSERT_TEXT,{plainText:e,rawText:n});Er.Z.startTyping(o.id)},children:function(e){return(0,r.jsx)(Ia.Z,kl({user:t,currentUser:c, isOwner:t.id===o.ownerId,ownerTooltipText:D.Z.Messages.GROUP_OWNER,shouldAnimateStatus:Fl,isTyping:u,status:a,activities:l,channel:o,onContextMenu:y,isMobile:s,nick:f},e),t.id)}})}function Hl(e){var t,n=e.integration,i=o.useCallback((function(e){(0,h.vq)(e,(function(e){var t=e.onSelect;return(0,r.jsx)(p.v2r,{"aria-label":D.Z.Messages.MANAGE_INTEGRATION,navId:"manage-integration",onClose:h.Zy,onSelect:t,children:(0,r.jsx)(p.sNh,{id:"remove-integration",label:D.Z.Messages.INTEGRATIONS_APPLICATION_REMOVE,action:function(){e=n.channel_id,r=n.application.id,Pl.Z.delete(L.ANM.CHANNEL_INTEGRATION(e,r));var e,r;null!=t&&t()},color:"danger"})})}))}),[n]);return(0,r.jsx)(Tl.Z,{onContextMenu:i,className:Ml().member,name:(0,r.jsx)("span",{className:Ml().username,children:n.application.name}),avatar:(0,r.jsx)(p.qEK,{size:p.EFr.SIZE_32,src:oe.ZP.getApplicationIconURL({id:n.application.id,icon:n.application.icon,bot:null===(t=n.application)||void 0===t?void 0:t.bot,botIconFirst:!0}), "aria-label":n.application.name,statusTooltip:!0}),decorators:(0,r.jsx)(Al.Z,{className:Ml().botTag}),id:n.application.id,focusProps:{offset:{top:4,bottom:4,left:4,right:4}}})}function Vl(e){var t=e.channel,n=Dt.default.getCurrentUser(),i=null==n?void 0:n.isStaff(),a=(0,d.Wu)([Dt.default],(function(){return function(e,t){return s()(e).map(t.getUser).unshift(t.getCurrentUser()).filter(la.lm).sortBy((function(e){return e.username.toLowerCase()})).value()}(t.recipients,Dt.default)}),[t.recipients]),l=(0,d.Wu)([Nl.Z],(function(){return Nl.Z.getIntegrations(t.id)}));o.useEffect((function(){if(i){var e=!0,t=!1,n=void 0;try{for(var r,o=a[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var l=r.value;(0,ni.Z)(l.id,l.getAvatarURL(void 0,80),{dispatchWait:!0})}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}}),[i,a]);var u=i&&a.every((function(e){return e.isStaff()}));return(0,r.jsx)("div",{className:wa().membersWrap,children:(0,r.jsxs)(p.Ttm,{ className:wa().members,fade:!0,children:[(0,r.jsxs)(Ca.Z,{className:wa().membersGroup,children:["".concat(D.Z.Messages.MEMBERS,"—").concat(a.length," "),u?(0,r.jsx)(Al.Z,{className:wa().decorator,type:Al.Z.Types.STAFF_ONLY_DM}):null]}),a.map((function(e){return(0,r.jsx)(Gl,{user:e,channel:t},e.id)})),l.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ca.Z,{className:wa().membersGroup,children:"".concat(D.Z.Messages.APPS,"—").concat(l.length)}),l.map((function(e){return(0,r.jsx)(Hl,{integration:e},e.application.id)}))]})]})})}var Wl=n(29975),zl=[];var Yl=n(436154),Kl=n(465637),ql=n(349491),Ql=n(563135),Xl=n(100542),Jl=n.n(Xl);function $l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]");Wt.S.dispatchToLastSubscribed(L.CkL.INSERT_TEXT,{plainText:e,rawText:n});Er.Z.startTyping(t.id)}}),[f,t]),_=o.useCallback((function(e){e.stopPropagation();(0,ba.f)({guildId:t.guild_id,location:{section:L.jXE.THREAD_MEMBER_LIST,object:L.qAy.BOOST_GEM_ICON}})}),[t.guild_id]);if(null==f)return null;var w=null==c?void 0:c.premiumSince;return(0,r.jsx)(p.yRy,{preload:function(){return(0,ni.Z)(f.id,f.getAvatarURL(t.guild_id,80),{guildId:t.guild_id, channelId:t.id})},renderPopout:function(e){return(0,r.jsx)(ga.Z,ou(ru({},e),{userId:f.id,guildId:t.guild_id,channelId:t.id}))},position:da.tq?"window_center":"left",spacing:16,onShiftClick:I,children:function(e,n){var o=n.isShown;return(0,r.jsx)(Ia.Z,ru({onContextMenu:S,shouldAnimateStatus:lu,user:f,currentUser:y,nick:null==c?void 0:c.nick,status:v,activities:g,colorString:null==c?void 0:c.colorString,colorRoleName:s,isTyping:u,channel:t,guildId:t.guild_id,isMobile:m,selected:o,applicationStream:O,premiumSince:null==w?null:new Date(w),onClickPremiumGuildIcon:_,itemProps:E,lostPermissionTooltipText:C?void 0:D.Z.Messages.THREAD_MEMBER_WITHOUT_ACCESS,isOwner:j},e))}})}function cu(e){var t=e.id,n=e.label,o=e.count,i=e.guildId,a=(0,va.p9)({roleId:t,guildId:i,size:16});return t===L.Skl.UNKNOWN?(0,r.jsx)("div",{className:wa().membersGroup,children:(0,r.jsx)("div",{className:wa().memberGroupsPlaceholder})}):(0,r.jsxs)(Ca.Z,{className:wa().membersGroup, "aria-label":D.Z.Messages.CHANNEL_MEMBERS_A11Y_LABEL.format({title:n,count:o}),children:[null!=a?(0,r.jsx)(ja.Z,ru({className:wa().roleIcon},a)):null,(0,r.jsxs)("span",{"aria-hidden":!0,children:[n," — ",o]})]})}function su(e){return e.channel.type===L.d4z.PRIVATE_THREAD?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:Jl().divider}),(0,r.jsxs)(p.xvT,{variant:"text-xs/bold",color:"header-secondary",className:Jl().private,children:[(0,r.jsx)(ql.Z,{width:12,height:12})," ",D.Z.Messages.THREAD_BROWSER_PRIVATE]}),(0,r.jsx)(p.xvT,{variant:"text-sm/normal",color:"header-secondary",className:Jl().instructions,children:D.Z.Messages.MEMBER_LIST_PRIVATE_THREAD_INSTRUCTIONS})]}):null}var fu=o.memo(uu),du=o.memo(cu),pu=o.memo(su);function hu(e){var t=e.channel,n=e.guild,i="members-".concat(t.id),l=function(e,t){var n=(0,d.cj)([Wl.Z],(function(){return{version:Wl.Z.getMemberListVersion(e),members:Wl.Z.getMemberListSections(e)}})),r=n.version,i=n.members,a=o.useMemo((function(){ if(null==t)return zl;var e=s()(t.roles).values().filter((function(e){return e.hoist})).sortBy((function(e){return e.position})).reverse().map((function(e){return e.id})).value();e.push("online","offline");return e.map((function(e){var n,r,o=t.roles[e];return{label:"online"===e?D.Z.Messages.STATUS_ONLINE:"offline"===e?D.Z.Messages.STATUS_OFFLINE:o.name,userIds:null!==(r=null==i||null===(n=i[e])||void 0===n?void 0:n.userIds)&&void 0!==r?r:[],id:e,roleId:e}}))}),[null==t?void 0:t.roles,i,r]);return null!=i?a:zl}(t.id,n),u=l.filter((function(e){return e.userIds.length>0})).reverse()[0],c=(0,ya.U)().canUseAvatarDecorations?44+Ia.x:44,f=function(e,t){var n=(0,d.e7)([jr.Z],(function(){return jr.Z.keyboardModeEnabled})),r=o.useRef(null),i=o.useCallback((function(e,n){var o=r.current;if(null!=o){var i=parseInt(n,10),a=iu(o.getSectionRowFromIndex(i),2),l=a[0],u=a[1],c=0===l&&0===u?t:0;o.scrollToIndex({section:l,row:u,padding:c,callback:function(){requestAnimationFrame((function(){var t ;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}}),[t]),a=o.useCallback((function(){return new Promise((function(e){var t=r.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),l=o.useCallback((function(){return new Promise((function(e){var t=r.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]);return{navigator:(0,sa.ZP)({id:e,setFocus:i,isEnabled:n,scrollToStart:a,scrollToEnd:l}),listRef:r}}(i,c),h=f.navigator,y=f.listRef;if(0===l.length||l.every((function(e){return 0===e.userIds.length})))return(0,r.jsx)(yu,{channel:t});var b=s().omit(h.containerProps,["ref"]),v=Ql.ZP.getGuildVisualOwnerId(n);return(0,r.jsx)(fa.bG,{navigator:h,children:(0,r.jsx)(p.Wdt,{children:function(e){return(0,r.jsx)("div",{className:a()(wa().membersWrap,wa().hiddenMembers),children:(0, r.jsx)(p.aVo,ru({ref:y,className:wa().members,paddingTop:0,sectionHeight:40,renderSection:function(e){var t=e.section,o=l[t];return(0,r.jsx)(du,{id:o.id,label:o.label,count:o.userIds.length,guildId:n.id},o.id)},rowHeight:c,renderRow:function(e){var n=e.section,o=e.row,i=l[n],a=i.userIds,u=i.id;return(0,r.jsx)(fu,{channel:t,sectionId:u,userId:a[o],guildOwnerId:v},a[o])},footerHeight:function(e){return l[e]===u&&t.type===L.d4z.PRIVATE_THREAD?80:0},renderFooter:function(e){return l[e.section]===u?(0,r.jsx)(pu,{channel:t},"footer"):null},innerAriaLabel:D.Z.Messages.MEMBERS,innerTag:"ul",sections:l.map((function(e){return e.userIds.length})),fade:!0},b,e),i)})}})})}function yu(e){var t=e.channel;return(0,r.jsxs)("div",{className:a()(wa().membersWrap,wa().hiddenMembers,wa().members,Jl().emptyState),children:[(0,r.jsx)(p.xvT,{className:Jl().emptyStateHeader,variant:"text-xs/bold",color:"interactive-normal",children:D.Z.Messages.MEMBERS}),(0,r.jsxs)("div",{ className:Jl().emptyStateIconContainer,children:[(0,r.jsx)("div",{className:Jl().emptyStateIcon,children:(0,r.jsx)(Tt.Z,{width:32,height:32})}),(0,r.jsx)(Kl.Z,{className:Jl().emptyStateStars})]}),(0,r.jsx)(p.X6q,{variant:"heading-md/semibold",children:t.isForumPost()?D.Z.Messages.FORUM_POST_MEMBER_LIST_EMPTY_STATE_HEADER:D.Z.Messages.THREAD_MEMBER_LIST_EMPTY_STATE_HEADER}),(0,r.jsx)(p.xvT,{className:Jl().emptyStateSubtext,variant:"text-sm/normal",color:"header-secondary",children:D.Z.Messages.THREAD_MEMBER_LIST_EMPTY_STATE_SUBTEXT})]})}var bu=n(704271),vu=n(358500),mu=n(79462),gu=n(258875),Ou=n.n(gu);function Eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0}),[l]),I=(0,d.e7)([En.Z],(function(){return null!=c&&c.isVocalThread()&&!s().isEmpty(En.Z.getVoiceStatesForChannel(c.id))}),[c]),_=(0,Ji.Vy)(null==c?void 0:c.guild_id),w=(null==c?void 0:c.isGuildVocal())||S||I,x=(0,f.TH)().welcomeModalChannelId,P=(0,d.e7)([hr.Z],(function(){return null!=c&&hr.Z.isLurking(c.guild_id)}),[c]),N=(0,d.e7)([ea.Z],(function(){return ea.Z.hasSeen(null==c?void 0:c.guild_id,P)}),[c,P]),A=(0,d.e7)([g.Z],(function(){return null!=l?g.Z.getLayout(l):L.AEg.NORMAL}),[l]),T=(0,d.e7)([g.Z],(function(){return null!=c?g.Z.getSelectedParticipant(c.id):null})),Z=(0,d.e7)([Dt.default],(function(){return Dt.default.getCurrentUser()})),M=fr(C),R=function(e,t){var n=(0,d.e7)([X.Z],(function(){ return X.Z.getGuild(t)})),r=(0,d.e7)([et.Z],(function(){return et.Z.getChannel(e)})),o=(0,d.e7)([ra.Z],(function(){return ra.Z.getChannelId(t)})),i=ta.Z.useExperiment({}).showOnboardingHome;return e===o&&null!=r&&null!=n&&r.getGuildId()===n.id&&(0,na.zi)(r.type)&&n.hasFeature(L.oNc.WELCOME_SCREEN_ENABLED)&&n.hasFeature(L.oNc.COMMUNITY)&&(!i||!n.hasFeature(L.oNc.GUILD_SERVER_GUIDE))}(x,null==C?void 0:C.id),D=(0,d.cj)([Nt.ZP],(function(){return{section:Nt.ZP.getSection(l),threadSidebarState:Nt.ZP.getSidebarState(l)}})),k=D.section,U=D.threadSidebarState,B=(0,E.ZP)(c),F=(0,E.ZP)(c,!0),G=null!=c&&u===c.id,H=null!=c&&c.isGuildStageVoice();o.useEffect((function(){var e,t=(0,Je.s1)();if((null==t||null===(e=t.location)||void 0===e?void 0:e.state)===mu.Df){var n,r,o=(null!==(r=(0,pr.Qj)(null==t||null===(n=t.location)||void 0===n?void 0:n.pathname))&&void 0!==r?r:{}).channelId;null!=o&&a(o)}}),[]);o.useEffect((function(){if(null!=i&&null!=c&&H&&c.id===i&&!G){(0,mr.Cq)(c);a(null)}}),[i,H]) ;var V=(0,v.L)(null!==(t=null==C?void 0:C.id)&&void 0!==t?t:"");o.useEffect((function(){null!=c&&c.isPrivate()&&m.tF.trackExposure({})}),[c]);var W,z=b._.useExperiment({}),Y=z.enabled,K=z.left,q=(0,wt.Z)(null==c?void 0:c.guild_id,!Y),Q=null!=q&&null!=c?q[c.name.toLowerCase()]:void 0,J=null!=Q?[Q,null!==(W=_t.Z[Q])&&void 0!==W?W:"#607D8B"]:void 0;return(0,r.jsx)(Du,xu(wu({guildId:null==c?void 0:c.guild_id,channelId:l,channel:c,channelName:B,formattedChannelName:F,parentChannel:O,voiceChannel:h,layout:A,needSubscriptionToAccess:j,isLurking:P,hasModalOpen:(0,p.$sL)(),section:k,threadSidebarState:U,guild:C,searchId:(0,d.e7)([ia.Z],(function(){return ia.Z.getCurrentSearchId()})),showCall:!j&&w,nsfwAgree:(0,d.e7)([Ht.Z],(function(){return Ht.Z.didAgree(null==c?void 0:c.guild_id)})),isMobile:(0,d.e7)([Xo.Z],(function(){return(null==c?void 0:c.type)===L.d4z.DM&&Xo.Z.isMobileOnline(c.getRecipientId())}),[c]),isUnavailable:(0,d.e7)([oa.Z],(function(){ return null!=(null==c?void 0:c.guild_id)&&oa.Z.isUnavailable(c.guild_id)}),[c]),showRealNameModal:M,showWelcomeModal:!N&&R,showFollowButton:(null==c?void 0:c.type)===L.d4z.GUILD_ANNOUNCEMENT&&(null==C?void 0:C.hasFeature(L.oNc.NEWS))||!1},(0,d.cj)([En.Z],(function(){return{hasVideo:null!=c&&En.Z.hasVideo(c.id)}}),[c])),{inCall:G,selectedParticipant:T,nsfwAllowed:!0===(null==Z?void 0:Z.nsfwAllowed),textInStageEnabled:_,showChannelSummaries:V,emojiAndColor:J,channelEmojiLeftOfIcon:K}))}))},764079:(e,t,n)=>{"use strict";n.d(t,{Z:()=>wn});var r=n(785893),o=n(667294),i=n(441143),a=n.n(i),l=n(289283),u=n(210595),c=n(842227),s=n(202351),f=n(707961),d=n(943469),p=n(665472),h=n(224134),y=n(567867),b=n(268319),v=(0,n(260561).B)({kind:"user",id:"2022-09_inboxes_v2_frontend",label:"Safety Integrity Platform Inboxes V2",defaultConfig:{enabled:!1,forceConfirmationOnAccept:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0,forceConfirmationOnAccept:!1}}]}) ;var m=n(770272),g=n(316878),O=n(396043),E=n(49621),C=n(385231),j=n(623313),S=n(272200),I=n(698847),_=n(428107),w=n(281808),x=n(855483),P=n(294184),N=n.n(P),A=n(242922),T=n(97040),Z=n.n(T);function M(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function R(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function L(e){var t,n=e.className,o=e.channel,i=e.section,a=null!=i?(0,A.ky)(i):null;return(0,r.jsx)("div",{className:N()(n,Z().wrapper),children:(0,r.jsx)("div",{className:Z().icon,children:null!=a?(0,r.jsx)(f.ua7,{ text:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"",position:"top",children:function(e){return(0,r.jsx)(a,R(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n0)}));var e=setTimeout((function(){c(!1);null!=a&&(0,st.ew)(a)}),2e3);return function(){return clearTimeout(e)}}}),[a]);var d=null!=a?"100%":"200%",p=(0,pt.useSpring)({opacity:u?1:0,translateY:u?"0":d,pointerEvents:"none",width:n,config:i?pt.config.stiff:pt.config.slow});return(0,r.jsx)(r.Fragment,{children:null!=a&&(0,r.jsx)(pt.animated.div,{className:Et().messageComboScore,style:p,children:(0,r.jsx)(f.xvT,{className:Et().comboScore,variant:"text-sm/bold",children:(0,mt.Eo)(a.combo)})})})})),It=o.memo((function(e){var t=e.value,n=e.multiplier,i=o.useMemo((function(){return(0,mt.yz)(n)}),[n]),a=i.color,l=i.square,u=i.flair,c=(0,ht.Lq)(a);return(0,r.jsxs)(r.Fragment,{children:[(0, r.jsx)(f.xvT,{className:Et().comboValue,variant:"text-sm/bold",children:t}),(0,r.jsxs)("div",{className:Et().comboNameplate,style:{color:c},children:[(0,r.jsx)(f.xvT,{className:Et().comboMultiplier,style:{color:c},variant:"text-sm/bold",children:de.Z.Messages.POGGERMODE_COMBO.format({multiplier:n})}),l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:N()(Et().comboSquare,Et().left),style:{backgroundColor:c}}),(0,r.jsx)("div",{className:N()(Et().comboSquare,Et().right),style:{backgroundColor:c}})]}),u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:N()(Et().confettiIcon,Et().left),children:(0,r.jsx)(vt.Z,{width:24,height:24})}),(0,r.jsx)("div",{className:N()(Et().confettiIcon,Et().right),children:(0,r.jsx)(vt.Z,{width:24,height:24})})]}),1===n&&(0,r.jsx)(f.xvT,{className:Et().tip,variant:"text-sm/bold",children:de.Z.Messages.POGGERMODE_COMBO_TIP})]})]})}));const _t=o.memo((function(e){var t=e.channelId,n=(0,s.e7)([Ze.default],(function(){ return Ze.default.getId()})),i=(0,s.e7)([yt.Z],(function(){return yt.Z.isTyping(t,n)}),[t,n]),a=(0,s.e7)([ft.Z],(function(){return ft.Z.isEnabled()})),l=(0,s.e7)([dt.ZP],(function(){return dt.ZP.isComboing(n,t)}),[t,n]),u=o.useRef(null),c=(0,bt.Z)(u,!0,[i]),f=(0,s.e7)([g.Z],(function(){return g.Z.useReducedMotion})),d=jt(o.useState(!1),2),p=d[0],h=d[1],y=(0,gt.Z)(t),b=a&&l&&i;o.useEffect((function(){b&&h(!0);var e=setTimeout((function(){return h(b)}),1e3);return function(){return clearTimeout(e)}}),[b]);var v=(0,pt.useSpring)({opacity:p?1:0,transform:p?"translateY(0)":"translateY(100%)",pointerEvents:"none",config:pt.config.stiff,immediate:f}),m=o.useMemo((function(){return null!=y?y:{value:0,multiplier:1}}),[y]),O=o.useRef(m);o.useEffect((function(){(m.multiplier>1||m.value>0)&&(O.current=m)}),[m]);var E,C=o.useMemo((function(){return{value:b?m.value:O.current.value,multiplier:b?m.multiplier:O.current.multiplier}}),[b,m,O]),j=C.multiplier,S=C.value;return(0,r.jsxs)(r.Fragment,{ children:[(0,r.jsx)(St,{channelId:t,width:null!==(E=null==c?void 0:c.width)&&void 0!==E?E:0}),(0,r.jsx)(pt.animated.div,{ref:u,className:Et().combo,style:v,children:(0,r.jsx)(It,{value:S,multiplier:j})})]})}));var wt=n(996739),xt=n(69540);var Pt=n(715919);const Nt=function(e,t){var n=(0,Pt.$)(t),r=(0,s.e7)([F.Z],(function(){return F.Z.getMessages(t.id).length>0}),[t]);return null!=e&&(e.hasFlag($.xW$.QUARANTINED)&&n&&!r)};var At=n(811276),Tt=n(513157);const Zt=function(){return(0,r.jsx)(se,{bannerIcon:Tt,bannerHeader:de.Z.Messages.LIMITED_ACCESS_INFO_MODAL_HEADING,bannerSubtext:de.Z.Messages.LIMITED_ACCESS_DM_BAR_SUBTEXT.format({appealLink:At.Z})})};var Mt=n(28862),Rt=n(798808),Lt=n(840598),Dt=n(736543),kt=n(284610),Ut=n(481056),Bt=n(682776),Ft=n(715107),Gt=n(255592),Ht=n(841804),Vt=n(194212),Wt=n(930948),zt=n(476770),Yt=n(202181),Kt=n(15084),qt=n(99181),Qt=n(771145),Xt=n(301011),Jt=n(405808),$t=n(531304),en=n(213276),tn=n(37707),nn=n(258875),rn=n.n(nn);function on(e,t){ (null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function bn(e,t){return!t||"object"!==gn(t)&&"function"!=typeof t?an(e):t}function vn(e,t){vn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return vn(e,t)}function mn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return ;if("string"==typeof e)return on(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return on(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var gn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=fn(e);if(t){var o=fn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bn(this,n)}} var En=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&void 0!==arguments[0]?arguments[0]:e.props,n=e.state.textValue,r=kt.Z.getDraft(t.channel.id,kt.d.ChannelMessage);n===r||""!==r&&""!==n||e.setState((0,x.eK)(r),(function(){if(n!==r){var t=e.props.onFocus;null==t||t()}}))};e.handleKeyDown=function(t){var n=e.props,r=n.keyboardModeEnabled,o=n.onKeyDown,i=n.channel,a=t.shiftKey||t.altKey||t.ctrlKey||t.metaKey,l=0!==e.state.textValue.length;switch(t.which){ case $.yXg.DELETE:case $.yXg.BACKSPACE:e.handleIncrementCombo("",1);return;case $.yXg.ARROW_UP:if(a)return;if(l)return;t.preventDefault();if(r)Gt.Z.getUploadCount(i.id,kt.d.ChannelMessage)>0?Wt.S.dispatchToLastSubscribed($.CkL.FOCUS_ATTACHMENT_AREA):Wt.S.dispatchToLastSubscribed($.CkL.FOCUS_MESSAGES,{atEnd:!0});else{var u=e.props.channel,s=F.Z.getLastCommandMessage(u.id),f=F.Z.getLastEditableMessage(u.id);null!=s&&null!=f?c.default.compare(f.id,s.id)>0?e.handleEditLastMessage(f):e.handleRecallLastCommand(s):null!=s?e.handleRecallLastCommand(s):null!=f&&e.handleEditLastMessage(f)}return;case $.yXg.ESCAPE:if(a)return;if(t.target!==t.currentTarget)return;t.preventDefault();if(r){(0,m.rf)();return}if(Gt.Z.getUploadCount(i.id,kt.d.ChannelMessage)>0){y.Z.clearAll(i.id,kt.d.ChannelMessage);return}}null==o||o(t,l)};e.handleIncrementCombo=function(t,n){if(e.props.poggermodeEnabled){ var r,o=e.props.channel.id,i=Ze.default.getId(),a=dt.ZP.getUserCombo(i,o),l=(null!==(r=null==a?void 0:a.value)&&void 0!==r?r:0)+1;(0,st.SE)({channelId:o,userId:i,value:null!=t?t.length:l,multiplier:n})}};e.handleTextareaChange=function(t,n,r){var o=e.props,i=o.keyboardModeEnabled,a=o.channel.id;d.Z.changeDraft(a,n,kt.d.ChannelMessage);var l=""!==n&&r!==e.state.richValue,u=l&&!jn.test(n)&&!n.startsWith("/")&&(!e.isFirstChange||n!==e.state.textValue);e.isFirstChange=!1;u&&e.state.textValue.length0){var g=(0,qt.KZ)(n);if((0,qt.Bf)(g,null==c?void 0:c.id)){(0,Kt.G)(s,g);return{shouldClear:!1,shouldRefocus:!1}}b.Z.uploadFiles({channelId:s.id,uploads:n,draftType:kt.d.ChannelMessage,parsedMessage:v,options:hn(pn({},m),{stickerIds:r})});y.Z.clearAll(s.id,kt.d.ChannelMessage)}else null!=r&&r.length>0?""!==t?p.Z.sendMessage(s.id,v,void 0,hn(pn({},m),{stickerIds:r})):p.Z.sendStickers(s.id,r,t,m,v.tts):p.Z.sendMessage(s.id,v,void 0,m);i.setState((0,x.H2)());(0,Mt.A6)(s.id);(0,Lt.qB)(s.id,d.drafts.type);return{shouldClear:!0,shouldRefocus:!0}}))]}}))})),function(e){return o.apply(this,arguments)});e.handleSetValue=function(t){var n,r,o=null===(n=e.editorRef)||void 0===n?void 0:n.getSlateEditor();if(null!=o){B.Q.select(o,[]);o.insertText(t) ;null===(r=e.editorRef)||void 0===r||r.focus()}};e.renderAttachButton=function(t,n){return(0,r.jsx)(k.Z,{className:n,channel:e.props.channel,draftType:kt.d.ChannelMessage,editorTextContent:e.state.textValue,setValue:e.handleSetValue,canShowPremiumTutorial:t})};e.renderApplicationCommandIcon=function(t,n,o){return(0,r.jsx)(D,{className:o,command:t,section:n,channel:e.props.channel})};return e}var o=n.prototype;o.componentDidMount=function(){kt.Z.addChangeListener(this.draftDidChange)};o.componentWillUnmount=function(){kt.Z.removeChangeListener(this.draftDidChange)};o.componentDidUpdate=function(e,t){var n=this.props.channel,r=this.state.textValue;if(e.channel.id===n.id){if(e.hasModalOpen&&!this.props.hasModalOpen){var o=kt.Z.getDraft(n.id,kt.d.ChannelMessage);o!==r&&this.setState((0,x.eK)(o))}t.textValue.length<$.J6R&&r.length>=$.J6R&&fe.default.track($.rMx.MESSAGE_LENGTH_LIMIT_REACHED,{})}else this.draftDidChange(this.props)};o.handleEditLastMessage=function(e){var t=this.props.channel ;p.Z.startEditMessage(t.id,e.id,e.content);O.ZP.trackWithMetadata($.rMx.MESSAGE_EDIT_UP_ARROW)};o.handleRecallLastCommand=function(e){var t=this.props.channel,n=j.Z.getCommandFromInteractionData(e.interactionData),r=j.Z.getApplication(null==n?void 0:n.applicationId);if(null!=n){var o,i,a=null!=r?{type:S.Qi.APPLICATION,id:r.id,icon:null!==(i=null==r||null===(o=r.bot)||void 0===o?void 0:o.username)&&void 0!==i?i:r.icon,name:r.name,application:r}:null,l=(0,C.Fi)(n,e.interactionData);E.Po(t.id,n,a,S.Vh.RECALL,l)}};o.render=function(){var e=this,t=this.props,n=t.channel,o=t.focused,i=t.onResize,l=t.onBlur,u=t.onFocus,c=t.highlighted,s=t.pendingReply,d=t.chatInputType,p=t.placeholder,h=t.accessibilityLabel,y=t.shakeIntensity,b=t.poggermodeEnabled,v=this.state.contentWarningProps,m=(0,r.jsx)(U.Z,{textValue:this.state.textValue,richValue:this.state.richValue,focused:o,className:rn().channelTextArea,channel:n,placeholder:p,accessibilityLabel:h,pendingReply:s,type:d, onChange:this.handleTextareaChange,onSubmit:this.handleSendMessage,onResize:i,onFocus:u,onBlur:l,onKeyDown:this.handleKeyDown,renderAttachButton:this.renderAttachButton,renderApplicationCommandIcon:this.renderApplicationCommandIcon,promptToUpload:Kt.d,highlighted:c,setEditorRef:function(t){return e.editorRef=t}});return(0,r.jsx)(f.yRy,{position:"top",onRequestClose:function(){var t;null==v||null===(t=v.onCancel)||void 0===t||t.call(v);e.setState({contentWarningProps:null})},shouldShow:null!=v,renderPopout:function(e){var t=e.closePopout;a()(null!=v,"ChannelTextAreaForm > Popout > renderPopout: contentWarningProps cannot be null");return(0,r.jsx)(tn.Z,pn({onClose:t},v))},children:function(){return b?(0,r.jsx)(f.UkV,{isShaking:y>0,intensity:y,children:m}):m}})};return n}(o.PureComponent),_n=function(e){dn(n,e);var t=On(n);function n(){cn(this,n);var e;(e=t.apply(this,arguments)).inputFormRef=o.createRef();e.state={textAreaFocused:!1,textAreaHighlighted:!1, currentChannelId:e.props.channel.id};e.dispatchGroupRef=o.createRef();e.handleRequestFocus=function(t){t.channelId===e.props.channel.id&&e.setState({textAreaFocused:!0})};e.getAnalyticsPage=function(){var t=e.props.channel;if(null==t)return null;switch(t.type){case $.d4z.GUILD_ANNOUNCEMENT:case $.d4z.GUILD_TEXT:case $.d4z.GUILD_FORUM:return en.Z.Pages.GUILD_CHANNEL;case $.d4z.GROUP_DM:case $.d4z.DM:return en.Z.Pages.DM_CHANNEL;default:return null}};e.handleInputFocus=function(t){var n;null===(n=e.dispatchGroupRef.current)||void 0===n||n.bumpDispatchPriority();(0,Yt.rB)()||(null!=(null==t?void 0:t.highlight)?e.setState({textAreaFocused:!0,textAreaHighlighted:null==t?void 0:t.highlight}):e.setState({textAreaFocused:!0}))};e.handleInputBlur=function(){(document.hasFocus()||e.props.hasModalOpen)&&e.setState({textAreaFocused:!1,textAreaHighlighted:!1})};e.handleInputKeyDown=function(t,n){e.state.textAreaHighlighted&&e.setState({textAreaHighlighted:!1});n||e._handleMoveToPane(t)} ;e.handleKeyDown=function(t){var n;(null===(n=e.inputFormRef.current)||void 0===n?void 0:n.contains(t.target))||e._handleMoveToPane(t)};e._handleMoveToPane=function(t){var n=e.props,r=n.keyboardModeEnabled,o=n.chatInputType,i=n.channel;if(r)switch(t.which){case $.yXg.ARROW_LEFT:o===w.I.SIDEBAR&&Wt.S.dispatch($.CkL.FOCUS_CHANNEL_TEXT_AREA,{channelId:Ft.Z.getChannelId()});return;case $.yXg.ARROW_RIGHT:o===w.I.NORMAL&&Wt.S.dispatch($.CkL.FOCUS_CHANNEL_TEXT_AREA,{channelId:et.ZP.getCurrentSidebarChannelId(i.id)})}};e.handleOpenExpressionPicker=function(t){var n=t.activeView;(0,Ce.PG)(n,e.props.chatInputType)};e.handleChatInteract=function(){var t;null===(t=e.dispatchGroupRef.current)||void 0===t||t.bumpDispatchPriority()};e.renderMessageBanner=function(e){var t=e.channel,n=e.showSpamBanner,o=e.showQuarantinedUserBanner,i=e.showMessageRequestBanner,a=e.guild,l=e.communicationDisabledUntil,u=e.hasAutomodQuarantinedProfile;if(t.type===$.d4z.DM){if(n)return(0,r.jsx)(Ee,{channel:t}) ;if(o)return(0,r.jsx)(Zt,{});if(i)return(0,r.jsx)(at,{channelId:t.id})}return null!=l&&(0,Ae.J)(l)&&null!=a&&!Bt.Z.can($.Plq.ADMINISTRATOR,a)?(0,r.jsx)(Ke,{guild:a,disabledUntil:l}):u?(0,r.jsx)(Ne,{guild:a}):null};return e}var i=n.prototype;i.componentDidMount=function(){Wt.S.subscribe($.CkL.FOCUS_CHANNEL_TEXT_AREA,this.handleRequestFocus)};i.componentDidUpdate=function(e){this.props.isEditing===e.isEditing&&this.props.hasModalOpen===e.hasModalOpen||(this.props.isEditing||this.props.hasModalOpen?this.handleInputBlur():this.handleInputFocus())};i.componentWillUnmount=function(){Wt.S.unsubscribe($.CkL.FOCUS_CHANNEL_TEXT_AREA,this.handleRequestFocus)};i.render=function(){ var e,t=this.props,n=t.channel,o=t.guild,i=t.keyboardModeEnabled,a=t.hasModalOpen,l=t.pendingReply,c=t.chatInputType,s=t.placeholder,d=t.accessibilityLabel,p=t.showQuarantinedUserBanner,h=t.filterAfterTimestamp,y=t.showSpamBanner,b=t.showMessageRequestBanner,v=t.communicationDisabledUntil,m=t.hasAutomodQuarantinedProfile,g=t.shakeIntensity,O=t.poggermodeEnabled,E=this.state,C=E.textAreaFocused,j=E.textAreaHighlighted,S=c===w.I.SIDEBAR;e=S&&n.type===$.d4z.GUILD_VOICE?de.Z.Messages.TEXT_IN_VOICE_A11Y_LABEL:S&&n.type===$.d4z.GUILD_STAGE_VOICE?de.Z.Messages.TEXT_IN_STAGE_A11Y_LABEL:u.T.THREADS.has(n.type)?de.Z.Messages.THREAD_A11Y_LABEL:de.Z.Messages.CHANNEL_A11Y_LABEL;var I,_=(0,r.jsx)(Dt.Z,{tutorialId:"writing-messages",position:"left",offsetX:75,children:(0,r.jsx)(In,{focused:C,highlighted:j,channel:n,guild:o,keyboardModeEnabled:i,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,hasModalOpen:a,pendingReply:l,chatInputType:c,placeholder:s, accessibilityLabel:d,shakeIntensity:g,poggermodeEnabled:O})});return(0,r.jsx)(en.Z,{page:this.getAnalyticsPage(),children:(0,r.jsx)(Ht.sW,{children:(0,r.jsxs)(Vt.I3,{ref:this.dispatchGroupRef,children:[(0,r.jsx)(Vt.d9,{event:$.CkL.TEXTAREA_FOCUS,handler:this.handleInputFocus}),(0,r.jsx)(Vt.d9,{event:$.CkL.TEXTAREA_BLUR,handler:this.handleInputBlur}),(0,r.jsx)(Vt.d9,{event:$.CkL.OPEN_EXPRESSION_PICKER,handler:this.handleOpenExpressionPicker}),(0,r.jsxs)(Sn,{isSidebar:S,className:rn().chatContent,"aria-label":e.format({channelName:n.name}),onMouseDown:this.handleChatInteract,onKeyDown:this.handleKeyDown,onFocus:this.handleChatInteract,children:[(0,r.jsx)(Qt.Z,{channel:n,guild:o,narrow:S}),(0,r.jsxs)(f.y5t,{component:(0,r.jsx)(f.nn4,{children:(0,r.jsx)(f.H,{children:de.Z.Messages.CHANNEL_CHAT_HEADING.format({channelName:n.name})})}),children:[(0,r.jsx)(ct.Z,{channel:n,filterAfterTimestamp:h,showingSpamBanner:y,showingQuarantineBanner:p}),null!=n.guild_id?(0,r.jsx)(qe.Z,{ guildId:n.guild_id,channel:n}):null,null!==(I=this.renderMessageBanner({channel:n,showSpamBanner:y,showQuarantinedUserBanner:p,showMessageRequestBanner:b,guild:o,communicationDisabledUntil:v,hasAutomodQuarantinedProfile:m}))&&void 0!==I?I:(0,r.jsxs)("form",{ref:this.inputFormRef,onSubmit:Cn,className:rn().form,children:[O&&(0,r.jsx)(_t,{channelId:n.id}),n.isPrivate()?(0,r.jsx)(Xt.Z,{channel:n,children:_}):(0,r.jsx)(Jt.Z,{channel:n,children:_}),(0,r.jsx)($t.Z,{channel:n,poggermodeEnabled:O})]}),(0,r.jsx)(Ht.kw,{})]})]})]})})},"messages-".concat(n.id))};n.getDerivedStateFromProps=function(e,t){var n=e.channel,r=t.currentChannelId;return n.id!==r?{textAreaFocused:null!=n&&(!l.tq&&Bt.Z.can($.Plq.SEND_MESSAGES,n)),currentChannelId:n.id}:null};return n}(o.PureComponent);const wn=o.memo((function(e){var t=e.channel,n=e.guild,o=e.chatInputType,i=e.filterAfterTimestamp,a=v.useExperiment({},{autoTrackExposure:!0}).enabled,l=(0,_.Z)(t),u=l.placeholder,c=l.accessibilityLabel,d=function(e){ var t=e.isDM()&&!e.isSystemDM()&&!e.rawRecipients.some((function(e){return e.bot})),n=e.isPrivate()?e.getRecipientId():null,r=(0,s.e7)([G.default],(function(){var e;return!0===(null===(e=G.default.getUser(n))||void 0===e?void 0:e.hasFlag($.xW$.SPAMMER))}),[n]),o=e.hasFlag(ee.zZ.IS_SPAM),i=ne((0,s.Wu)([F.Z],(function(){var t=F.Z.getMessages(e.id);return[t.length>0,t.toArray().some((function(e){return e.author.id===n}))]}),[e]),2),a=i[0],l=i[1],u=(0,s.e7)([J],(function(){return null!=n&&J.hasAllowedSpamUser(n)}),[n]);return t&&(r&&a||o&&l)&&!u}(t)&&!a,p=Nt(G.default.getCurrentUser(),t),h=mn((0,Te.AB)(null==n?void 0:n.id),1)[0],y=(0,je.Ux)(null==n?void 0:n.id),b=Xe(t.id)&&!a,m=(0,s.e7)([ft.Z],(function(){return ft.Z.isEnabled()})),O=function(e){var t=(0,wt.Z)(xt.oZ.CHAT_INPUT),n=(0,s.e7)([ft.Z],(function(){return ft.Z.isEnabled({shakeLocation:xt.oZ.CHAT_INPUT})}));return(0,s.e7)([yt.Z,dt.ZP,Ze.default],(function(){ return n&&yt.Z.isTyping(e,Ze.default.getId())?dt.ZP.getUserComboShakeIntensity(Ze.default.getId(),e,t):0}))}(t.id);return(0,r.jsx)(_n,{channel:t,isEditing:null!=(0,s.e7)([Ut.Z],(function(){return Ut.Z.getEditingMessageId(t.id)})),hasModalOpen:(0,f.s9z)(f.JQI),guild:n,keyboardModeEnabled:(0,s.e7)([g.Z],(function(){return g.Z.keyboardModeEnabled})),pendingReply:(0,s.e7)([Rt.Z],(function(){return Rt.Z.getPendingReply(t.id)})),chatInputType:o,placeholder:u,accessibilityLabel:c,filterAfterTimestamp:i,showSpamBanner:d,showQuarantinedUserBanner:p,communicationDisabledUntil:h,hasAutomodQuarantinedProfile:y,showMessageRequestBanner:b,shakeIntensity:O,poggermodeEnabled:m})}))},973553:(e,t,n)=>{"use strict";n.d(t,{y:()=>v,Z:()=>O});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(944010),c=n(913549),s=n(379991),f=n(421281),d=n(385045),p=n.n(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>H});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(348592),c=n(2590),s=n(473708),f=n(237741),d=n.n(f);function p(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function h(e){ var t=e.narrow,n=u.Z.getArticleURL(c.BhN.CLYDE_AI);return(0,r.jsx)("div",{className:a()(d().chatHeaderBar,p({},d().narrow,t)),children:(0,r.jsx)(l.xvT,{className:d().chatHeaderBarText,variant:"text-sm/normal",color:"header-secondary",children:s.Z.Messages.CLYDE_NOTICE.format({learnMoreUrl:n})})})}var y=n(337710),b=n(517285),v=n(656793),m=n(396043),g=n(652591),O=n(671293),E=n(225386),C=n(580335),j=n.n(C);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=n(667294),i=n(289283),a=n(202351),l=n(707961),u=n(804185),c=n(489881),s=n(776009),f=n(304562),d=n.n(f);const p=o.memo((function(e){var t=e.message,n=e.subtitle,f=e.countdown,p=e.buttonText,h=e.buttonColor,y=e.buttonSubmitting,b=e.onButtonClick,v=e.imageSrc,m=e.animationSrc,g=e.secondaryButtonText,O=e.onSecondaryButtonClick,E=e.children,C=e.useReducedMotion,j=void 0!==C&&C,S=(0,a.e7)([u.ZP],(function(){return u.ZP.getState().isMembersOpen}));if(i.tq&&S)return null;if(null==t)return(0,r.jsx)(r.Fragment,{children:o.Children.only(E)});var I=null;null!=v?I=(0,r.jsx)("img",{alt:"",src:v,className:d().image}):null!=m&&(I=(0,r.jsx)(s.Z,{importData:m,shouldAnimate:!j,className:d().animation}));return(0,r.jsxs)("div",{className:d().wrapper,children:[(0,r.jsxs)("div",{className:d().content,children:[I,(0,r.jsxs)("div",{className:d().text,children:[(0,r.jsx)(l.X6q,{variant:"heading-md/semibold", className:d().title,children:t}),null!=n&&(0,r.jsx)(l.xvT,{color:"text-muted",variant:"text-xs/normal",children:n})]})]}),(0,r.jsxs)("div",{className:d().buttonContainer,children:[null!=g&&(0,r.jsx)(l.zxk,{className:d().button,size:l.zxk.Sizes.SMALL,onClick:O,look:l.zxk.Looks.LINK,color:l.zxk.Colors.PRIMARY,submitting:y,children:g}),null!=p&&(0,r.jsx)(l.zxk,{className:d().button,size:l.zxk.Sizes.SMALL,onClick:b,submitting:y,color:null!=h?h:l.zxk.Colors.PRIMARY,children:p})]}),null!=f&&(0,r.jsx)(c.Z,{className:d().countdown,deadline:f})]})}))},301011:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(202351)),i=n(864928),a=n(840922),l=n(348592),u=n(251684),c=n(2590),s=n(473708);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e) ;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e){var t=e.channel,p=e.children,h=(0,o.e7)([a.Z],(function(){return a.Z.isBlocked(t.getRecipientId())})),y=t.isSystemDM(),b=h&&!y&&!t.isMultiUserDM(),v={};if(y){v.message=s.Z.Messages.SYSTEM_DM_CHANNEL_DESCRIPTION;v.subtitle=s.Z.Messages.SYSTEM_DM_CHANNEL_DESCRIPTION_SUBTEXT;v.buttonText=s.Z.Messages.LEARN_MORE;v.onButtonClick=function(){return open(l.Z.getArticleURL(c.BhN.SYSTEM_DMS))};v.imageSrc=n(32028)}else if(b){v.message=s.Z.Messages.DM_VERIFICATION_TEXT_BLOCKED;v.buttonText=s.Z.Messages.UNBLOCK;v.onButtonClick=function(){i.Z.unblockUser(t.getRecipientId())}}return(0,r.jsx)(u.Z,d(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(289283),a=n(202351),l=n(707961),u=n(708489),c=n(64234),s=n(464187),f=n(327860),d=n(373438),p=n(2590),h=n(473708),y=n(973746),b=n.n(y);function v(e){var t=e.channelId;o.useEffect((function(){u.Z.loadThread(t)}));var y,v=(0,a.e7)([s.Z],(function(){return s.Z.getGuildId()}))===p.I_8,m=(0,a.e7)([c.Z],(function(){return c.Z.theme}));y=v?(0,r.jsx)(f.OZ,{note:h.Z.Messages.FAVORITES_EMPTY_BODY,children:h.Z.Messages.FAVORITES_EMPTY_TITLE}):null!=t?(0,r.jsx)(l.$jN,{type:l.$jN.Type.SPINNING_CIRCLE}):(0,r.jsx)(f.OZ,{note:h.Z.Messages.CHANNELS_UNAVAILABLE_BODY,children:h.Z.Messages.CHANNELS_UNAVAILABLE_TITLE});return(0, r.jsxs)("div",{className:b().noChannel,children:[i.tq&&(0,r.jsx)(d.ZP,{children:(0,r.jsx)(o.Fragment,{})}),(0,r.jsxs)(f.ZP,{theme:m,children:[(0,r.jsx)(f.ox,{darkSrc:n(v?128112:16697),lightSrc:n(v?876406:105045),width:272,height:222}),y]})]})}},405808:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Pe});var r=n(785893),o=n(667294),i=n(441143),a=n.n(i),l=n(202351),u=n(707961),c=n(84441),s=n(486826),f=n(327499),d=n(316878),p=n(852626),h=n(153771),y=n(497082),b=n(276985),v=n(886391),m=n(201615),g=n(776009),O=n(443812),E=n(473708),C=n(970795),j=n.n(C);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)} return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var _=function(){return n.e(37761).then(n.t.bind(n,299145,19)).then((function(e){return e.default}))};const w=function(e){var t=(0,O.Dt)();return(0,r.jsxs)(u.Y0X,I(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=1e3){var H=1e3*Math.floor(_/1e3);U.subtitle=E.Z.Messages.FOLLOW_NEWS_CHAT_INPUT_SUBTITLE.format({count:H.toLocaleString()})}U.buttonText=E.Z.Messages.FOLLOW;U.onButtonClick=this.handleFollowAnnouncement;U.imageSrc=n(40028);if(p){U.onSecondaryButtonClick=this.handleJoinServer;U.secondaryButtonText=E.Z.Messages.LURKER_MODE_CHAT_INPUT_BUTTON}}else if(h){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_NOT_CLAIMED;U.buttonText=E.Z.Messages.CLAIM_ACCOUNT ;U.onButtonClick=N?this.handleShowMemberVerification:this.handleClaimAccount;U.imageSrc=n(976693)}else if(N)switch(null==Z?void 0:Z.applicationStatus){case v.wB.SUBMITTED:U.message=E.Z.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_TITLE;U.subtitle=E.Z.Messages.MEMBER_VERIFICATION_APPLICATION_CONFIRMATION_SUBTITLE;U.buttonText=E.Z.Messages.MEMBER_VERIFICATION_CANCEL_APPLICATION;U.onButtonClick=this.handleCancelApplication;U.imageSrc=n(312915);break;case v.wB.REJECTED:U.message=E.Z.Messages.MEMBER_VERIFICATION_REJECTED_TITLE;U.buttonText=E.Z.Messages.MEMBER_VERIFICATION_LEARN_MORE;U.onButtonClick=this.handleViewApplicationRejection;U.imageSrc=n(960362);break;default:U.message=E.Z.Messages.MEMBER_VERIFICATION_CHAT_BLOCKER_TEXT;U.buttonText=E.Z.Messages.MEMBER_VERIFICATION_NOTICE_CTA;U.buttonColor=u.Ttl.BRAND;U.onButtonClick=this.handleShowMemberVerification;U.animationSrc=function(){return n.e(61029).then(n.t.bind(n,640002,19)).then((function(e){return e.default}))} }else if(y&&!T){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_NOT_PHONE_VERIFIED;U.buttonText=E.Z.Messages.VERIFY_PHONE;U.onButtonClick=this.handleVerifyPhone;U.imageSrc=n(470914)}else if(b){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_NOT_VERIFIED;U.buttonText=E.Z.Messages.RESEND_VERIFICATION_EMAIL;U.onButtonClick=this.handleResendVerification;U.imageSrc=n(976693)}else if(m){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_MEMBER_AGE.format({min:ue.fDV.MEMBER_AGE});U.countdown=g}else if(O){U.message=E.Z.Messages.GUILD_VERIFICATION_TEXT_ACCOUNT_AGE.format({min:ue.fDV.ACCOUNT_AGE});U.countdown=C}return(0,r.jsx)(u.yRy,{position:"top",align:"left",shouldShow:k,onRequestClose:function(){return l.setState({shouldShowLurkerModeSuccessPopout:!1})},renderPopout:this.renderSuccessPopout,children:function(e){return(0,r.jsx)(le.Z,Ee(Oe({},U),{children:(0,r.jsxs)(o.Fragment,{children:[l.renderMemberVerificationSuccessModal(),w?(0,r.jsx)(u.yRy,{renderPopout:l.renderLurkerModeUpsellPopout, shouldShow:D,position:"top",children:function(e){return(0,r.jsx)(u.P3F,Ee(Oe({},e),{className:de().clickableChannelTextArea,onClick:l.handleTextAreaClick,children:S}))}}):S]})}))}})};return i}(o.PureComponent);function Pe(e){var t,n,o,i=e.channel,a=e.children,u=i.getGuildId(),c=(0,l.e7)([te.Z],(function(){return te.Z.getGuild(u)})),s=(0,l.e7)([ne.Z],(function(){return ne.Z.getCheck(u)})),f=i.type===ue.d4z.GUILD_ANNOUNCEMENT&&null!=c&&c.hasFeature(ue.oNc.NEWS),p=(0,l.e7)([J.Z],(function(){return f?J.Z.getFollowerStatsForChannel(i.id):null})),h=(0,l.e7)([T.Z],(function(){return T.Z.isLurking(u)})),y=(0,l.e7)([ie.default],(function(){return ie.default.getCurrentUser()})),b=null!==(t=null==y?void 0:y.isStaff())&&void 0!==t&&t,g=(0,l.e7)([ee.ZP],(function(){var e;return null!=y&&(null!==(n=null===(e=ee.ZP.getMember(u,y.id))||void 0===e?void 0:e.isPending)&&void 0!==n&&n)})),O=!!(null==c?void 0:c.hasVerificationGate()),E=(g||s.notClaimed)&&O,C=(0,l.e7)([H],(function(){ return H.shouldShowPopout(u)})),j=(0,l.e7)([re.Z],(function(){return re.Z.can(ue.Plq.SEND_MESSAGES,i)})),S=(0,l.e7)([m.Z],(function(){return m.Z.getRequest(u)})),I=(0,N.Z)(i.id),_=(0,l.e7)([oe.Z,$.ZP],(function(){return $.ZP.getCurrentSidebarChannelId(oe.Z.getChannelId())===i.id})),w=Ee(Oe({},s),{guild:c,isLurking:h,isFollowable:f,shouldShowLurkerModeSuccessPopout:C,showLurkerModeUpsellPopout:h&&null!=c&&ae.ZP.canEveryoneRole(ue.Plq.SEND_MESSAGES,i),theme:X.Z.theme,canSendMessages:j,channelFollowingUsersSeen:null!=p?p.usersSeenEver:null,hasVerificationGate:O,showMemberVerificationModal:E,guildJoinRequestStatus:null!==(o=null==S?void 0:S.applicationStatus)&&void 0!==o?o:v.wB.STARTED,guildJoinRequest:S,useReducedMotion:d.Z.useReducedMotion,isStaff:b,isSelectedResourceChannel:I,isInSidebar:_});return(0,r.jsx)(xe,Ee(Oe({},w),{channel:i,children:a}))}},976010:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(64234),s=n(563367),f=n(633878);function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function p(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function y(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=h(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",p(function(e){for(var t=1;t{"use strict";n.d(t,{RE:()=>ge,PZ:()=>Oe,Qj:()=>ve});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(473727),s=n(457217),f=n(289283),d=n(202351),p=n(707961),h=n(761953),y=n(971402),b=n(503370),v=n(80317),m=n(995141),g=n(959468),O=n(621647),E=n(773011),C=n(419051),j=n(289903),S=n(177570),I=n(491260),_=n(717091),w=n(788169),x=n(9430),P=n(473903),N=n(609853),A=n(971611),T=n(860917),Z=n.n(T);function M(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function R(e){ var t,n=e.selected,o=e.muted,i=void 0!==o&&o,l=e.highlighted,u=void 0!==l&&l,c=e.wrapContent,s=void 0!==c&&c,f=e.avatar,d=e.decorators,p=e.name,h=e.subText,y=e.avatarClassName,b=e.innerClassName;return(0,r.jsxs)("div",{className:a()(b,Z().layout,(t={},M(t,Z().muted,!n&&i),M(t,Z().highlighted,u),M(t,Z().wrappedLayout,s),t)),children:[(0,r.jsx)("div",{className:a()(Z().avatar,y),children:f}),(0,r.jsxs)("div",{className:Z().content,children:[(0,r.jsxs)("div",{className:Z().nameAndDecorators,children:[(0,r.jsx)("div",{className:a()(Z().name,M({},Z().wrappedName,s)),children:p}),d]}),null!=h?(0,r.jsx)("div",{className:Z().subText,children:h}):null]})]})}var L=n(29476),D=n.n(L);function k(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function U(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}const G=o.forwardRef((function(e,t){var n=e.className,o=e.focusProps,i=F(e,["className","focusProps"]);return(0,r.jsx)(p.tEY,B(U({},o),{children:(0,r.jsx)("li",B(U({className:a()(n,D().container)},i),{ref:t}))}))}));var H=n(189865),V=n(82677),W=n(775173),z=n(310126),Y=n(106555),K=n(272362),q=n(2590),Q=n(473708),X=n(406985),J=n.n(X);function $(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function ee(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$(i,r,o,a,l,"next",e)}function l(e){$(i,r,o,a,l,"throw",e)}a(void 0)}))}}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function re(e){ re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return re(e)}function oe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ce(e,t)}function ie(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ue(e,t){return!t||"object"!==se(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ce(e,t){ce=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ce(e,t)}var se=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1 ;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=re(e);if(t){var o=re(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ue(this,n)}}var de=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue ;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1&&void 0!==arguments[1]&&arguments[1];if(null!=t){t.preventDefault();t.stopPropagation()}var r=e.props.channel;h.Z.closePrivateChannel(r.id,e.props.selected,n)};e.handleContextMenu=function(t){var o=e.props,i=o.channel,a=o.selected,l=o.user;i.isMultiUserDM()?(0,y.jW)(t,ee((function(){var e,t;return de(this,(function(o){switch(o.label){case 0:return[4,n.e(13035).then(n.bind(n,413035))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ae(ie({},e),{channel:i,selected:a}))}]}}))})),{noBlurEvent:!0}):(0,y.jW)(t,ee((function(){var e,t;return de(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(49244),n.e(50865)]).then(n.bind(n,550865))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,ae(ie({},e),{user:l,channel:i,channelSelected:a}))}]}}))})))} ;e.handleLeaveGroup=function(t){t.preventDefault();t.stopPropagation();var n=e.props,o=n.channel,i=n.channelName,a=Q.Z.Messages.LEAVE_GROUP_DM_TITLE.format({name:i}),l=Q.Z.Messages.LEAVE_GROUP_DM_BODY.format({name:i});if(o.isManaged()){a=Q.Z.Messages.LEAVE_GROUP_DM_MANAGED_TITLE.format({name:i});l=Q.Z.Messages.LEAVE_GROUP_DM_MANAGED_BODY.format({name:i})}(0,p.h7j)((function(t){return(0,r.jsx)(K.Z,ie({header:a,body:l,onSubmit:e.handleClose},t))}))};e.handleMouseDown=function(){h.Z.preload(q.ME,e.props.channel.id)};e.handleCloseButtonMouseDown=function(e){e.stopPropagation()};e.onContainerClick=function(t){if(t.target===t.currentTarget){var n;null===(n=e._linkRef.current)||void 0===n||n.click()}};return e}var l=i.prototype;l.renderSubtitle=function(){var e=this.props,t=e.channel,n=e.activities,o=e.applicationStream,i={className:J().activity,textClassName:J().activityText,emojiClassName:J().activityEmoji};return t.isSystemDM()?(0,r.jsx)("div",{className:J().subtext, children:Q.Z.Messages.SYSTEM_DM_ACTIVITY_TEXT}):t.isMultiUserDM()?(0,r.jsx)("div",{className:J().subtext,children:Q.Z.Messages.MEMBERS_HEADER.format({members:t.recipients.length+1})}):null!=n?(0,r.jsx)(Y.Z,ae(ie({},i),{activities:n,applicationStream:o,animate:this.state.hovered,hideTooltip:!0})):null};l.renderAvatar=function(){var e=this.props,t=e.channel,n=e.user,o=e.status,i=e.activities,a=e.isTyping,l=e.isMobile,c=e.canUseAvatarDecorations,s=void 0!==c&&c;if(t.isMultiUserDM())return(0,r.jsx)(pe,{src:(0,O.x)(t),"aria-hidden":!0,className:J().avatar,size:p.EFr.SIZE_32});u()(null!=n,"PrivateChannel.renderAvatar: Invalid prop configuration - no user or channel");var f=null;n.isSystemUser()||(f=(0,b.Z)(i)?q.Skl.STREAMING:o);var d=s?(0,W.NZ)({userId:n.id,avatarDecoration:n.avatarDecoration,size:(0,m.y)(p.EFr.SIZE_32)}):null;return(0,r.jsx)(pe,{size:p.EFr.SIZE_32,src:n.getAvatarURL(void 0,32),avatarDecoration:d,status:f,isMobile:l,isTyping:a,className:J().avatar,"aria-label":n.username, statusTooltip:!0})};l.render=function(){var e=this,t=this.props,n=t.channel,o=t.channelName,i=t.selected,l=t.muted,u=t.hasUnreadMessages,f=t.isFavorite,d=n.isMultiUserDM(),h=n.isSystemDM(),y=(0,j.Q)();return(0,r.jsx)(s.mh,{id:n.id,children:function(t){var s,b=t.role,v=le(t,["role"]);return(0,r.jsx)(G,{className:J().channel,role:b,focusProps:ae(ie({},he),{focusTarget:e._linkRef,ringTarget:e._listItemRef}),ref:e._listItemRef,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,onMouseDown:e.handleMouseDown,onContextMenu:e.handleContextMenu,"aria-setsize":e.props["aria-setsize"],"aria-posinset":e.props["aria-posinset"],children:(0,r.jsxs)(p.vjx,{className:a()(J().interactive,(s={},ne(s,J().interactiveSystemDM,y&&h),ne(s,J().interactiveSelected,i),s)),as:"div",onClick:e.onContainerClick,muted:l,selected:i,children:[(0,r.jsx)(c.rU,ae(ie({innerRef:e._linkRef,to:q.Z5c.CHANNEL(q.ME,n.id),className:J().link,"aria-label":(0,g.Z)({channel:n,unread:u})},v),{children:(0,r.jsx)(R,{ avatar:e.renderAvatar(),selected:i,highlighted:u,muted:null!=l&&l,subText:e.renderSubtitle(),name:(0,r.jsx)(A.Z,{children:o}),decorators:n.isSystemDM()?(0,r.jsx)(N.Z,{className:J().decorator,type:N.Z.Types.SYSTEM_DM,verified:!0}):null})})),f?(0,r.jsx)(be,{}):null,!h&&(0,r.jsx)(ye,{"aria-label":d?Q.Z.Messages.LEAVE_GROUP_DM:Q.Z.Messages.CLOSE_DM,onClick:d?e.handleLeaveGroup:e.handleClose,onMouseDown:e.handleCloseButtonMouseDown})]})})}})};return i}(o.PureComponent);me.defaultProps={selected:!1};var ge=function(e){var t=e.channel,n=e.selected,o=le(e,["channel","selected"]),i=(0,d.e7)([P.default],(function(){return P.default.getUser(t.getRecipientId())})),a=(0,d.cj)([I.Z,S.Z],(function(){return{status:null!=i?I.Z.getStatus(i.id):null,activities:null!=i?I.Z.getActivities(i.id):null,applicationStream:null!=i?S.Z.getAnyStreamForUser(i.id):null,isMobile:null!=i&&I.Z.isMobileOnline(i.id)}}),[null==i?void 0:i.id]),l=(0,d.e7)([w.Z],(function(){ return null!=i?w.Z.isTyping(t.id,t.getRecipientId()):void 0})),u=(0,d.e7)([x.Z],(function(){return x.Z.isChannelMuted(t.getGuildId(),t.id)})),c=(0,d.e7)([_.ZP],(function(){return _.ZP.getMentionCount(t.id)>0})),s=(0,E.ZP)(t),f=(0,v.U)().canUseAvatarDecorations,p=(0,d.e7)([C.Z],(function(){return C.Z.isFavorite(t.id)}));return(0,r.jsx)(me,ie({channel:t,channelName:s,selected:n,user:i,isTyping:l,muted:u,hasUnreadMessages:c,canUseAvatarDecorations:f,isFavorite:p},o,a))},Oe=function(e){var t=e.channel,n=e.selected,o=le(e,["channel","selected"]),i=(0,d.e7)([x.Z],(function(){return x.Z.isChannelMuted(t.getGuildId(),t.id)})),a=(0,d.e7)([_.ZP],(function(){return _.ZP.getMentionCount(t.id)>0})),l=(0,E.ZP)(t),u=(0,d.e7)([C.Z],(function(){return C.Z.isFavorite(t.id)}));return(0,r.jsx)(me,ie({channel:t,channelName:l,selected:n,muted:i,hasUnreadMessages:a,isFavorite:u},o))}},272362:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(785893),o=n(667294),i=n(707961),a=n(473708),l=n(168891),u=n.n(l) ;function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){ var t=e.header,n=e.body,l=e.onSubmit,c=d(e,["header","body","onSubmit"]),h=p(o.useState(!1),2),y=h[0],b=h[1];return(0,r.jsxs)(i.sm4,f(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>W}) ;var r=n(785893),o=n(667294),i=n(823493),a=n.n(i),l=n(457217),u=n(798159),c=n(202351),s=n(199731),f=n(707961),d=n(216151),p=n(316878),h=n(396043),y=n(76107),b=n(996344),v=n(442658),m=n(48315),g=n(64234),O=n(61209),E=n(491260),C=n(796909),j=n(443812),S=n(795909),I=n(202237),_=n(879639),w=n(2590),x=n(473708),P=n(582095),N=n.n(P);function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Z(e){Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Z(e)}function M(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function D(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){ if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e,t){k=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return k(e,t)}var U=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Z(e);if(t){var o=Z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D(this,n)}}var F,G=44;!function(e){e[e.PAGES=0]="PAGES";e[e.DMS=1]="DMS"}(F||(F={}));var H=o.memo((function(){return(0,r.jsxs)("svg",{width:"184",height:"428",viewBox:"0 0 184 428",className:N().empty,children:[(0,r.jsx)("rect",{x:40,y:6,width:144,height:20,rx:10}),(0, r.jsx)("circle",{cx:16,cy:16,r:16}),(0,r.jsx)("rect",{x:40,y:50,width:144,height:20,rx:10,opacity:.9}),(0,r.jsx)("circle",{cx:16,cy:60,r:16,opacity:.9}),(0,r.jsx)("rect",{x:40,y:94,width:144,height:20,rx:10,opacity:.8}),(0,r.jsx)("circle",{cx:16,cy:104,r:16,opacity:.8}),(0,r.jsx)("rect",{x:40,y:138,width:144,height:20,rx:10,opacity:.7}),(0,r.jsx)("circle",{cx:16,cy:148,r:16,opacity:.7}),(0,r.jsx)("rect",{x:40,y:182,width:144,height:20,rx:10,opacity:.6}),(0,r.jsx)("circle",{cx:16,cy:192,r:16,opacity:.6}),(0,r.jsx)("rect",{x:40,y:226,width:144,height:20,rx:10,opacity:.5}),(0,r.jsx)("circle",{cx:16,cy:236,r:16,opacity:.5}),(0,r.jsx)("rect",{x:40,y:270,width:144,height:20,rx:10,opacity:.4}),(0,r.jsx)("circle",{cx:16,cy:280,r:16,opacity:.4}),(0,r.jsx)("rect",{x:40,y:314,width:144,height:20,rx:10,opacity:.3}),(0,r.jsx)("circle",{cx:16,cy:324,r:16,opacity:.3}),(0,r.jsx)("rect",{x:40,y:358,width:144,height:20,rx:10,opacity:.2}),(0,r.jsx)("circle",{cx:16,cy:368,r:16,opacity:.2}),(0, r.jsx)("rect",{x:40,y:402,width:144,height:20,rx:10,opacity:.1}),(0,r.jsx)("circle",{cx:16,cy:412,r:16,opacity:.1})]})})),V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&k(e,t)}(n,e);var t=B(n);function n(){A(this,n);var e;(e=t.apply(this,arguments)).state={initialized:!1,preRenderedChildren:0,totalRowCount:0,nonNullChildren:[]};e._list=null;e.hasReportedAnalytics=!1;e.reportAnalytics=function(){var t;if(!e.hasReportedAnalytics){var n=null===(t=e._list)||void 0===t?void 0:t.getScrollerState();if(null!=n){var r=e.props,i=r.privateChannelIds,a=r.channels;if(0!==i.length){var l=o.Children.count(e.props.children),u=G*l;if(null!=n){var c=Math.round((n.offsetHeight-u)/G),s=c>i.length?i.slice(0,c+1):i,f=s.map((function(e){return null!=a[e]?a[e].getRecipientId():null})),d={num_users_visible:s.length, num_users_visible_with_mobile_indicator:f.filter((function(e){return null!=e&&E.Z.isMobileOnline(e)})).length};e.hasReportedAnalytics=!0;h.ZP.trackWithMetadata(w.rMx.DM_LIST_VIEWED,M({},d))}}}}};e.getSectionHeight=function(t){var n=e.props.showDMHeader;return t===F.PAGES?0:n?40:0};e.handleScroll=a()((function(){if(null!=e._list){var t=e._list.getScrollerNode();null!=t&&d.Z.updateChannelListScroll(w.ME,t.scrollTop)}}),100);e.renderDM=function(t,n){var o=e.props,i=o.privateChannelIds,a=o.channels,l=o.selectedChannelId,u=e.state,c=u.totalRowCount,s=u.preRenderedChildren,f=a[i[n]];if(null==f)return null;var d=f.isMultiUserDM()?_.PZ:_.RE;return(0,r.jsx)(d,{channel:f,selected:f.id===l,"aria-posinset":s+n+1,"aria-setsize":c},f.id)};e.renderChild=function(t){var n=e.state,r=n.nonNullChildren,i=n.totalRowCount,a=r[t];return o.isValidElement(a)?o.cloneElement(a,{"aria-setsize":i,"aria-posinset":t+1}):a};e.renderRow=function(t){var n=t.section,o=t.row,i=e.props.privateChannelIds ;return n===F.PAGES?e.renderChild(o):0===o&&0===i.length?(0,r.jsx)(H,{},"no-private-channels"):e.renderDM(n,o)};e.renderSection=function(t){var n=t.section,o=e.props.showDMHeader;return n!==F.PAGES&&o?(0,r.jsxs)(I.Z,{className:N().privateChannelsHeaderContainer,children:[(0,r.jsx)("span",{className:N().headerText,children:x.Z.Messages.DIRECT_MESSAGES}),(0,r.jsx)(y.Z,{tooltip:x.Z.Messages.CREATE_DM,tooltipPosition:"top",popoutAlign:"left",iconClassName:N().privateChannelRecipientsInviteButtonIcon,icon:S.Z,subscribeToGlobalHotkey:!0})]},n):null};e.getRowHeight=function(t,n){var r=e.props.privateChannelIds;return t===F.DMS&&0===n&&0===r.length?428:G};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.props,t=e.selectedChannelId,n=e.homeLink;null!=t&&null!=n&&n.indexOf(t)>=0&&this.scrollToChannel(t);this.reportAnalytics()};i.shouldComponentUpdate=function(e){return!(0,s.Z)(this.props,e,["children"])};i.componentDidUpdate=function(e){ var t=this.props,n=t.selectedChannelId,r=t.homeLink;null!=n&&n!==e.selectedChannelId?this.scrollToChannel(n):null==n&&r!==e.homeLink&&this.scrollToChannel(null);this.reportAnalytics()};i.scrollToChannel=function(e){if(null!=this._list){var t=this.props.padding,n=this.state.preRenderedChildren,r=null!=e?this.props.privateChannelIds.indexOf(e):-1,o=0;if(r<0||null==e)this._list.scrollTo({to:o});else{o+=G*(r+n)+t;this._list.scrollIntoViewRect({start:Math.max(o-8,0),end:o+G+8})}}};i.render=function(){var e=this,t=this.props,n=t.privateChannelIds,o=t.padding,i=this.state.preRenderedChildren;return(0,r.jsx)(l.SJ,{children:function(t){var a=t.ref,l=t.role,u=L(t,["ref","role"]);return(0,r.jsx)(f.Wdt,{children:function(t){return(0,r.jsx)(f.aVo,M({fade:!0,innerRole:l,innerAriaLabel:x.Z.Messages.DIRECT_MESSAGES,innerTag:"ul",ref:function(t){e._list=t;e.props.listRef.current=t;var n;a.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null},onScroll:e.handleScroll, className:N().scroller,sectionHeight:e.getSectionHeight,paddingTop:o,paddingBottom:8,rowHeight:e.getRowHeight,renderSection:e.renderSection,renderRow:e.renderRow,sections:[i,Math.max(n.length,1)]},u,t))}})}})};n.getDerivedStateFromProps=function(e){var t=e.children,n=e.privateChannelIds;if(null==t)return{preRenderedChildren:0,nonNullChildren:[],totalRowCount:n.length};var r=t.filter((function(e){return null!=e})),o=r.length;return{preRenderedChildren:o,nonNullChildren:r,totalRowCount:o+n.length}};return n}(o.Component);V.defaultProps={padding:8};const W=function(e){var t=e.version,n=e.theme,i=e.children,a=e.showDMHeader,s=o.Children.count(i),f=O.Z.getMutablePrivateChannels(),d=(0,v.k1)(f),h=(0,c.Wu)([C.Z,b.Z,m.Z],(function(){var e=C.Z.getPrivateChannelIds();return(0,v.tU)(e,[b.Z,m.Z])}),[]),y=(0,c.cj)([p.Z,g.Z,O.Z],(function(){return{theme:g.Z.darkSidebar?w.BRd.DARK:n,keyboardModeEnabled:p.Z.keyboardModeEnabled, version:null!=t?"".concat(t,":").concat(O.Z.getPrivateChannelsVersion()):O.Z.getPrivateChannelsVersion()}})),E=o.useRef(null),S=o.useCallback((function(e){var t=E.current,n=document.querySelector(e);null!=t&&null!=n&&t.scrollIntoViewNode({node:n,callback:function(){requestAnimationFrame((function(){var t;return null===(t=document.querySelector(e))||void 0===t?void 0:t.focus({preventScroll:!0})}))}})}),[]),I=o.useCallback((function(){return new Promise((function(e){var t=E.current;if(null==t)return e();t.scrollToTop({callback:function(){return requestAnimationFrame((function(){return e()}))}})}))}),[]),_=o.useCallback((function(){return new Promise((function(e){var t=E.current;if(null==t)return e();t.scrollToBottom({callback:function(){requestAnimationFrame((function(){return setTimeout(e,100)}))}})}))}),[]),x=s+(a?1:0),P=(0,j.Dt)(),N=(0,u.ZP)({id:"private-channels-".concat(P),isEnabled:y.keyboardModeEnabled,scrollToStart:I,scrollToEnd:_,defaultFocused:x.toString(),setFocus:S}) ;return(0,r.jsx)(l.bG,{navigator:N,children:(0,r.jsx)(V,M(R(M({channels:d,privateChannelIds:h,listRef:E,theme:n,version:t},e),{children:i}),y))})}},181152:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(539519),u=n(707961),c=n(797364),s=n(928733),f=n(769321),d=n(736097),p=n(188084),h=n(824456),y=n(652591),b=n(691797),v=n(348592),m=n(2255),g=n(2590),O=n(36256),E=n(473708),C=n(388209),j=n.n(C);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var I=function(){d.Z.getMediaEngine().once(l.aB.ConnectionStats,(function(e){var t=Object.values(O.Yn).map((function(t){var n=e.filter((function(e){return e.connection.context===t})).map((function(e,n){var r=e.stats;r.context=t;r.index=n;return r})),r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u,c=a.value ;null!=(null==c||null===(u=c.transport)||void 0===u?void 0:u.localAddress)&&(c.transport.localAddress="(redacted)")}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n})).filter((function(e){return e.length>0}));(0,b.JG)(JSON.stringify(t,null,2));(0,u.CFj)((0,u.Yz2)(E.Z.Messages.COPIED,u.pCN.SUCCESS))}))};const _=function(e){(0,o.useEffect)((function(){y.default.track(g.rMx.OPEN_POPOUT,{type:"RTC Connection"})}),[]);var t,n=(0,o.useCallback)((function(){var t=e.closePopout;null!=t&&t();c.bA()}),[e]),i=(0,o.useCallback)((function(){var t=e.hostname,n=e.averagePing,i=e.lastPing,l=e.outboundLossRate,u=f.Sb.getSetting();return(0,r.jsxs)(o.Fragment,{children:[u&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:j().graphContainer,children:(0,r.jsx)(s.Z,{dataPoints:e.pings,width:258,height:80})}),(0,r.jsx)("div",{className:j().popoutText,children:(0,r.jsx)("strong",{children:m.Z.getShortHostname(t)})})]}),(0,r.jsx)("div",{className:j().popoutText, children:E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_AVERAGE_PING.format({averagePing:n.toFixed(0)})}),null!=i?(0,r.jsx)("div",{className:j().popoutText,children:E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_LAST_PING.format({lastPing:i.toFixed(0)})}):null,null!=l?(0,r.jsx)("div",{className:j().popoutText,children:E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_LOSS_VALUE.format({outboundLossRate:l.toFixed(1)})}):null,(0,r.jsxs)("div",{className:a()(j().popoutText,j().popoutTextDetails),children:[null==l?E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_DETAILS.format({badPing:250}):null,null!=l?E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTED_DETAILS_WITH_LOSS.format({badPing:250,badLossRate:10}):null]})]})}),[e]),l=e.connectionState,b=f.Sb.getSetting(),C=(t={},S(t,g.hes.AWAITING_ENDPOINT,E.Z.Messages.RTC_CONNECTION_STATE_AWAITING_ENDPOINT.format({url:g.yXt.STATUS})),S(t,g.hes.CONNECTING,E.Z.Messages.RTC_CONNECTION_STATE_CONNECTING), S(t,g.hes.AUTHENTICATING,E.Z.Messages.RTC_CONNECTION_STATE_AUTHENTICATING),S(t,g.hes.DISCONNECTED,E.Z.Messages.RTC_CONNECTION_STATE_DISCONNECTED),S(t,g.hes.RTC_CONNECTING,E.Z.Messages.RTC_CONNECTION_STATE_RTC_CONNECTING),S(t,g.hes.ICE_CHECKING,E.Z.Messages.RTC_CONNECTION_STATE_ICE_CHECKING.format({url:v.Z.getArticleURL(g.BhN.VOICE_CONNECTION_ERRORS)})),S(t,g.hes.DTLS_CONNECTING,E.Z.Messages.RTC_CONNECTION_STATE_ICE_CHECKING.format({url:v.Z.getArticleURL(g.BhN.VOICE_CONNECTION_ERRORS)})),S(t,g.hes.RTC_CONNECTED,i),S(t,g.hes.NO_ROUTE,E.Z.Messages.RTC_CONNECTION_STATE_NO_ROUTE.format({url:v.Z.getArticleURL(g.BhN.VOICE_CONNECTION_ERRORS)})),S(t,g.hes.RTC_DISCONNECTED,E.Z.Messages.RTC_CONNECTION_STATE_DISCONNECTED),t)[l];return(0,r.jsx)("div",{className:j().container,children:(0,r.jsxs)("section",{className:j().section,children:["function"==typeof C?C():(0,r.jsx)("p",{className:a()(j().popoutText,j().popoutTextDetails),children:C}),(0,r.jsx)("hr",{className:j().separator}),(0, r.jsxs)("div",{className:j().popoutBottom,children:[(0,r.jsx)("span",{className:j().secured,children:E.Z.Messages.SECURE_CONNECTION}),b&&d.Z.supports(O.AN.DIAGNOSTICS)&&!__OVERLAY__&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.eee,{className:j().debugButton,onClick:n,children:[E.Z.Messages.DEBUG,(0,r.jsx)(h.Z,{className:j().launchIcon,width:12,height:12})]}),(0,r.jsxs)(u.eee,{className:j().copyStatsButton,onClick:I,title:"Copy to clipboard",children:[E.Z.Messages.COPY_STATS,(0,r.jsx)(p.Z,{className:j().copyIcon,width:12,height:12})]})]}),!b&&!__OVERLAY__&&(0,r.jsx)(u.eee,{className:j().debugButton,href:v.Z.getArticleURL(g.BhN.VOICE_VIDEO_TROUBLESHOOTING),children:E.Z.Messages.LEARN_MORE})]})]})})}},963429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(667294),o=n(513328);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ns;)l++;if(l===e.length)break;if(null!=f){ u.push(c-f.bytes);c=f.bytes}}for(;a{"use strict";n.d(t,{E:()=>H,Z:()=>V});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(853158),u=n(202351),c=n(336194),s=n(443660),f=n(707961),d=n(784426),p=n(959207),h=n(713094),y=n(454708),b=n(686910),v=n(301041),m=n(898652),g=n(954419),O=n(963429),E=n(2590),C=n(473708),j=n(459874),S=n.n(j);function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} function w(e){w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return w(e)}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Z(e,t)}function P(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function T(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e,t){Z=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Z(e,t)}var M=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function R(e){var t=function(){ if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}var L,D,k,U,B=(_(U={},E.vxO.INSTALLING,(_(L={},b.J6.NONE,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING.format({name:e})})),_(L,b.J6.SECONDS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_SECONDS.format({name:e,timeRemaining:t})})),_(L,b.J6.MINUTES,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_MINUTES.format({name:e,timeRemaining:t})})),_(L,b.J6.HOURS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_HOURS.format({name:e,timeRemaining:t})})),L)), _(U,E.vxO.UPDATING,(_(D={},b.J6.NONE,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING.format({name:e})})),_(D,b.J6.SECONDS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_SECONDS.format({name:e,timeRemaining:t})})),_(D,b.J6.MINUTES,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_MINUTES.format({name:e,timeRemaining:t})})),_(D,b.J6.HOURS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_UPDATING_HOURS.format({name:e,timeRemaining:t})})),D)),_(U,E.vxO.REPAIRING,(_(k={},b.J6.NONE,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING.format({name:e})})),_(k,b.J6.SECONDS,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_SECONDS.format({name:e,timeRemaining:t})})),_(k,b.J6.MINUTES,(function(e,t){return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_MINUTES.format({name:e,timeRemaining:t})})),_(k,b.J6.HOURS,(function(e,t){ return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_INSTALLING_HOURS.format({name:e,timeRemaining:t})})),k)),U),F=function(e){x(n,e);var t=R(n);function n(){I(this,n);var e;(e=t.apply(this,arguments)).renderProgressBody=function(t,n){var r=e.props,o=r.state,i=r.application,a=o.stage,l=o.progress,u=o.total,c=o.type;if(null==l||null==u||null==a)return null;var s=t[t.length-1]/n*1e3,f=u-l,d=0!==s?Math.max(1,f/s):null,p=null!=d?d/60:null,h=B[c],y=null!=h?Object.keys(h):[],v=(0,b.CI)(p,y),m=v.unit,g=v.time;if(null!=h&&null!=m){var O=h[m];return null!=O?O(i.name,g):null}return null};return e}var o=n.prototype;o.renderText=function(){var e=this.props,t=e.state,n=e.isPaused;if(t.type===E.vxO.UPDATING||t.type===E.vxO.REPAIRING||t.type===E.vxO.INSTALLING){if(n)return C.Z.Messages.APPLICATION_PROGRESS_INDICATOR_PAUSED;if(t.stage===E.f07.PATCHING||t.stage===E.f07.REPAIRING)return(0,r.jsx)(O.Z,{getHistoricalTotalBytes:h.Z.getHistoricalTotalBytesWritten,updateInterval:5e3, children:this.renderProgressBody})}return null};o.render=function(){var e=this.renderText();return null!=e?e:C.Z.Messages.LIBRARY};return n}(o.PureComponent),G=function(e){x(n,e);var t=R(n);function n(){I(this,n);var e;(e=t.apply(this,arguments)).state={animationScale:new l.Z.Value(0)};e.handleOnClick=function(t){var n=e.props.onClick;t.preventDefault();t.stopPropagation();null!=n&&n(t);(0,d.uL)(E.Z5c.APPLICATION_LIBRARY)};return e}var o=n.prototype;o.componentWillAppear=function(e){this.state.animationScale.setValue(1);e()};o.componentWillEnter=function(e){l.Z.spring(this.state.animationScale,{toValue:1,duration:200}).start(e)};o.componentWillLeave=function(e){l.Z.spring(this.state.animationScale,{toValue:0,duration:200}).start(e)};o.getTooltipText=function(){var e=this.props,t=e.firstApplication,n=e.firstState,o=e.isPaused;return null==t||null==n?C.Z.Messages.LIBRARY:(0,r.jsx)(F,{application:t,state:n,isPaused:o})};o.render=function(){ var e=this.props,t=e.percent,n=e.isPaused,o=e.className;return(0,r.jsx)(l.Z.div,{style:{transform:[{scale:this.state.animationScale}]},className:a()(o,S().progressContainer),onClick:this.handleOnClick,children:(0,r.jsx)(f.ua7,{text:this.getTooltipText(),position:"right","aria-label":!1,children:function(e){return(0,r.jsx)("div",N(P({},e),{children:(0,r.jsx)(v.Z,{percent:t,colorOverride:n?c.Z.unsafe_rawColors.PRIMARY_500.css:null,children:(0,r.jsx)(m.Z,{className:S().downloadIcon})})}))}})})};return n}(o.PureComponent);G.defaultProps={strokeSize:v.Z.StrokeSizes.MEDIUM};function H(e,t){return e.reduce((function(e,n){var r=n.applicationId,o=n.branchId,i=t.getState(r,o);null!=i&&e.push(i);return e}),[])}const V=u.ZP.connectStores([y.Z,p.Z,h.Z],(function(){var e=y.Z.activeItems,t=H(e,h.Z),n=g.lK(t),r=n.total,o=n.progress;return{percent:g.xI(o,r),isPaused:y.Z.paused,firstApplication:e.length>0?p.Z.getGame(e[0].applicationId):null,firstState:t.length>0?t[0]:null}}))((function(e){ var t=e.determineOwnVisibility,n=void 0===t||t,i=A(e,["determineOwnVisibility"]);return n?(0,r.jsx)(s.Z,{component:o.Fragment,children:i.percent>0&&i.percent<100?(0,r.jsx)(G,P({},i)):null}):(0,r.jsx)(G,P({},i))}))},910878:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>d});var r=n(785893),o=(n(667294),n(707961)),i=n(773011),a=n(473708),l=n(407945),u=n.n(l);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function s(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){ if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e){var t=e.channel,n=e.category,l=f(e,["channel","category"]),d=(0,i.ZP)(t,!0),p=(0,i.ZP)(n);return(0,r.jsx)(o.sm4,s(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>Me});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(202351),s=n(336194),f=n(707961),d=n(846334),p=n(429041),h=n(658689),y=n(316878),b=n(582762),v=n(258104),m=n(545580),g=n(874593),O=n(468235),E=n(228667),C=n(335072),j=n(99827),S=n(293078);function I(){return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_1378_82282)",children:[(0,r.jsx)("path",{ d:"M8.00009 15.4171C12.0001 15.4171 14.8572 14 14.8572 10.8457C14.8572 7.41711 12.9286 5.21429 9.5 3.5L11.0629 1.67997C11.1315 1.56599 11.1686 1.43593 11.1707 1.30296C11.1727 1.16999 11.1396 1.03885 11.0746 0.922821C11.0096 0.806793 10.9151 0.710005 10.8007 0.642268C10.6862 0.57453 10.5559 0.538252 10.4229 0.537109H5.57723C5.44425 0.538252 5.31394 0.57453 5.1995 0.642268C5.08506 0.710005 4.99057 0.806793 4.92559 0.922821C4.86062 1.03885 4.82747 1.16999 4.82951 1.30296C4.83156 1.43593 4.86872 1.56599 4.93723 1.67997L6.5 3.5C3.07143 5.22571 1.14294 7.43997 1.14294 10.8685C1.14294 14 4.00009 15.4171 8.00009 15.4171Z",fill:"#B9BBBE",stroke:"#B9BBBE",strokeWidth:"1.14286",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsxs)("g",{clipPath:"url(#clip1_1378_82282)",children:[(0,r.jsx)("mask",{id:"path-2-inside-1_1378_82282",fill:"white",children:(0,r.jsx)("path",{ d:"M11.9667 7.3558L9.45706 7.13802L8.47706 4.83062C8.30077 4.41063 7.69929 4.41063 7.52299 4.83062L6.543 7.1432L4.03857 7.3558C3.58227 7.39209 3.39561 7.96246 3.74301 8.2632L5.64597 9.91208L5.0756 12.3595C4.9719 12.8054 5.45412 13.158 5.84819 12.9195L8.00003 11.6232L10.1519 12.9247C10.5459 13.1632 11.0282 12.8106 10.9245 12.3647L10.3541 9.91208L12.257 8.2632C12.6045 7.96246 12.423 7.39209 11.9667 7.3558ZM8.00003 10.6536L6.05041 11.8306L6.56892 9.61134L4.84745 8.11801L7.11855 7.92098L8.00003 5.83136L8.88669 7.92616L11.1578 8.1232L9.43632 9.61653L9.95483 11.8358L8.00003 10.6536Z"})}),(0,r.jsx)("path",{ d:"M11.9667 7.3558L9.45706 7.13802L8.47706 4.83062C8.30077 4.41063 7.69929 4.41063 7.52299 4.83062L6.543 7.1432L4.03857 7.3558C3.58227 7.39209 3.39561 7.96246 3.74301 8.2632L5.64597 9.91208L5.0756 12.3595C4.9719 12.8054 5.45412 13.158 5.84819 12.9195L8.00003 11.6232L10.1519 12.9247C10.5459 13.1632 11.0282 12.8106 10.9245 12.3647L10.3541 9.91208L12.257 8.2632C12.6045 7.96246 12.423 7.39209 11.9667 7.3558ZM8.00003 10.6536L6.05041 11.8306L6.56892 9.61134L4.84745 8.11801L7.11855 7.92098L8.00003 5.83136L8.88669 7.92616L11.1578 8.1232L9.43632 9.61653L9.95483 11.8358L8.00003 10.6536Z",fill:"#292B2F"}),(0,r.jsx)("path",{ d:"M9.45706 7.13802L7.61621 7.91986L8.08626 9.02658L9.28416 9.13053L9.45706 7.13802ZM8.47706 4.83062L6.63292 5.60471L6.63622 5.61247L8.47706 4.83062ZM7.52299 4.83062L9.36448 5.61099L9.36712 5.6047L7.52299 4.83062ZM6.543 7.1432L6.71216 9.13604L7.9139 9.03403L8.38448 7.92356L6.543 7.1432ZM4.03857 7.3558L4.19716 9.34953L4.20773 9.34863L4.03857 7.3558ZM3.74301 8.2632L5.05272 6.75168L5.05201 6.75108L3.74301 8.2632ZM5.64597 9.91208L7.59377 10.366L7.86766 9.19079L6.95567 8.40057L5.64597 9.91208ZM5.0756 12.3595L3.1278 11.9055L3.12758 11.9064L5.0756 12.3595ZM5.84819 12.9195L4.81616 11.2063L4.81258 11.2085L5.84819 12.9195ZM8.00003 11.6232L9.03508 9.91185L8.00209 9.28708L6.968 9.91002L8.00003 11.6232ZM10.1519 12.9247L11.1875 11.2137L11.1869 11.2133L10.1519 12.9247ZM10.9245 12.3647L8.97644 12.8177H8.97644L10.9245 12.3647ZM10.3541 9.91208L9.04439 8.40057L8.13288 9.19037L8.40608 10.3651L10.3541 9.91208ZM12.257 8.2632L10.948 6.75108L10.9473 6.75169L12.257 8.2632ZM8.00003 10.6536L9.03502 8.94219L8.00093 8.31679L6.96635 8.94139L8.00003 10.6536ZM6.05041 11.8306L4.10286 11.3756L3.02377 15.9941L7.08408 13.5428L6.05041 11.8306ZM6.56892 9.61134L8.51647 10.0664L8.79102 8.8913L7.87948 8.10056L6.56892 9.61134ZM4.84745 8.11801L4.67459 6.1255L-0.0310004 6.53375L3.5369 9.62879L4.84745 8.11801ZM7.11855 7.92098L7.29142 9.91349L8.49266 9.80928L8.96131 8.69832L7.11855 7.92098ZM8.00003 5.83136L9.84184 5.05178L7.99691 0.693003L6.15728 5.05402L8.00003 5.83136ZM8.88669 7.92616L7.04488 8.70574L7.51423 9.8146L8.71382 9.91868L8.88669 7.92616ZM11.1578 8.1232L12.4683 9.63398L16.0362 6.53893L11.3307 6.13068L11.1578 8.1232ZM9.43632 9.61653L8.12576 8.10575L7.21422 8.89648L7.48877 10.0716L9.43632 9.61653ZM9.95483 11.8358L8.91984 13.5471L12.9826 16.0042L11.9024 11.3807L9.95483 11.8358ZM12.1396 5.36328L9.62996 5.14551L9.28416 9.13053L11.7938 9.34831L12.1396 5.36328ZM11.2979 6.35618L10.3179 4.04878L6.63622 5.61247L7.61621 7.91986L11.2979 6.35618ZM10.3212 4.05655C9.45878 2.00198 6.54128 2.00198 5.67887 4.05655L9.36712 5.6047C8.8573 6.81927 7.14275 6.81927 6.63294 5.6047L10.3212 4.05655ZM5.68152 4.05027L4.70152 6.36285L8.38448 7.92356L9.36447 5.61098L5.68152 4.05027ZM6.37384 5.15037L3.8694 5.36296L4.20773 9.34863L6.71216 9.13604L6.37384 5.15037ZM3.87998 5.36209C1.64333 5.54001 0.753531 8.32058 2.43401 9.77532L5.05201 6.75108C6.03768 7.60434 5.52122 9.24418 4.19716 9.3495L3.87998 5.36209ZM2.43331 9.77471L4.33626 11.4236L6.95567 8.40057L5.05272 6.75168L2.43331 9.77471ZM3.69816 9.45814L3.1278 11.9055L7.0234 12.8134L7.59377 10.366L3.69816 9.45814ZM3.12758 11.9064C2.62503 14.0674 4.9682 15.7899 6.88379 14.6305L4.81258 11.2085C5.94003 10.5261 7.31876 11.5434 7.02362 12.8125L3.12758 11.9064ZM6.88021 14.6326L9.03205 13.3363L6.968 9.91002L4.81616 11.2063L6.88021 14.6326ZM6.96498 13.3345L9.11682 14.636L11.1869 11.2133L9.03508 9.91185L6.96498 13.3345ZM9.11626 14.6357C11.0319 15.7951 13.375 14.0726 12.8725 11.9116L8.97644 12.8177C8.6813 11.5486 10.06 10.5313 11.1875 11.2137L9.11626 14.6357ZM12.8725 11.9116L12.3021 9.45905L8.40608 10.3651L8.97644 12.8177L12.8725 11.9116ZM11.6638 11.4236L13.5667 9.77471L10.9473 6.75169L9.04439 8.40057L11.6638 11.4236ZM13.566 9.77532C15.2133 8.34936 14.4056 5.54348 12.1253 5.36209L11.8081 9.3495C10.4404 9.2407 9.99563 7.57556 10.948 6.75108L13.566 9.77532ZM6.96635 8.94139L5.01673 10.1184L7.08408 13.5428L9.0337 12.3657L6.96635 8.94139ZM7.99796 12.2856L8.51647 10.0664L4.62138 9.15631L4.10286 11.3756L7.99796 12.2856ZM7.87948 8.10056L6.15801 6.60724L3.5369 9.62879L5.25837 11.1221L7.87948 8.10056ZM5.02032 10.1105L7.29142 9.91349L6.94569 5.92846L4.67459 6.1255L5.02032 10.1105ZM8.96131 8.69832L9.84278 6.6087L6.15728 5.05402L5.2758 7.14364L8.96131 8.69832ZM6.15822 6.61094L7.04488 8.70574L10.7285 7.14659L9.84184 5.05178L6.15822 6.61094ZM8.71382 9.91868L10.9849 10.1157L11.3307 6.13068L9.05956 5.93365L8.71382 9.91868ZM9.84724 6.61242L8.12576 8.10575L10.7469 11.1273L12.4683 9.63398L9.84724 6.61242ZM7.48877 10.0716L8.00729 12.2908L11.9024 11.3807L11.3839 9.16149L7.48877 10.0716ZM10.9898 10.1244L9.03502 8.94219L6.96504 12.3649L8.91984 13.5471L10.9898 10.1244Z", fill:"#292B2F",mask:"url(#path-2-inside-1_1378_82282)"}),(0,r.jsx)("mask",{id:"path-4-inside-2_1378_82282",fill:"white",children:(0,r.jsx)("path",{d:"M10.6811 7.81008L8.98505 7.6629L8.32275 6.10351C8.2036 5.81966 7.79711 5.81966 7.67796 6.10351L7.01566 7.66641L5.3231 7.81008C4.62661 7.81008 4.49996 8 5.12336 8.42333L6.40942 9.53768L6.02395 11.1917C6.00007 12 5.86977 12.1684 6.54609 11.5701L8.00036 10.6941L9.45462 11.5737C9.72094 11.7348 10.5001 12.5 9.97675 11.1952L9.59129 9.53768L10.8773 8.42333C11.5001 8.19204 11.7365 7.81008 10.6811 7.81008ZM8.00036 10.0388L6.68275 10.8343L7.03318 9.33443L5.86977 8.32521L7.40463 8.19204L8.00036 6.77983L8.59958 8.19555L10.1344 8.32871L8.97103 9.33794L9.32146 10.8378L8.00036 10.0388Z"})}),(0,r.jsx)("path",{ d:"M10.6811 7.81008L8.98505 7.6629L8.32275 6.10351C8.2036 5.81966 7.79711 5.81966 7.67796 6.10351L7.01566 7.66641L5.3231 7.81008C4.62661 7.81008 4.49996 8 5.12336 8.42333L6.40942 9.53768L6.02395 11.1917C6.00007 12 5.86977 12.1684 6.54609 11.5701L8.00036 10.6941L9.45462 11.5737C9.72094 11.7348 10.5001 12.5 9.97675 11.1952L9.59129 9.53768L10.8773 8.42333C11.5001 8.19204 11.7365 7.81008 10.6811 7.81008ZM8.00036 10.0388L6.68275 10.8343L7.03318 9.33443L5.86977 8.32521L7.40463 8.19204L8.00036 6.77983L8.59958 8.19555L10.1344 8.32871L8.97103 9.33794L9.32146 10.8378L8.00036 10.0388Z",fill:"#292B2F"}),(0,r.jsx)("path",{ d:"M10.6811 7.81008L10.5643 9.15667L10.6226 9.16173H10.6811V7.81008ZM8.98505 7.6629L7.74096 8.19129L8.05863 8.93924L8.8682 9.00949L8.98505 7.6629ZM8.32275 6.10351L7.07643 6.62665L7.07866 6.6319L8.32275 6.10351ZM7.67796 6.10351L8.92249 6.6309L8.92427 6.62665L7.67796 6.10351ZM7.01566 7.66641L7.12998 9.01321L7.94215 8.94427L8.26017 8.19379L7.01566 7.66641ZM5.3231 7.81008V9.16173H5.38037L5.43743 9.15689L5.3231 7.81008ZM5.12336 8.42333L6.00849 7.40181L5.94843 7.34977L5.88269 7.30512L5.12336 8.42333ZM6.40942 9.53768L7.7258 9.84446L7.9109 9.05021L7.29455 8.51616L6.40942 9.53768ZM6.02395 11.1917L4.70758 10.8849L4.67689 11.0166L4.6729 11.1518L6.02395 11.1917ZM6.54609 11.5701L5.84862 10.4124L5.74296 10.476L5.65056 10.5577L6.54609 11.5701ZM8.00036 10.6941L8.69987 9.53752L8.00175 9.11529L7.30289 9.53629L8.00036 10.6941ZM9.45462 11.5737L10.1545 10.4173L10.1541 10.4171L9.45462 11.5737ZM9.97675 11.1952L8.66024 11.5014L8.68369 11.6022L8.72224 11.6983L9.97675 11.1952ZM9.59129 9.53768L8.70616 8.51616L8.09014 9.04993L8.27477 9.84385L9.59129 9.53768ZM10.8773 8.42333L10.4067 7.15625L10.1772 7.24149L9.99222 7.40181L10.8773 8.42333ZM8.00036 10.0388L8.69983 8.8822L8.00096 8.45955L7.30177 8.88166L8.00036 10.0388ZM6.68275 10.8343L5.36655 10.5267L4.63728 13.648L7.38134 11.9914L6.68275 10.8343ZM7.03318 9.33443L8.34938 9.64196L8.53493 8.84781L7.91888 8.31341L7.03318 9.33443ZM5.86977 8.32521L5.75294 6.97862L2.57279 7.25452L4.98406 9.34623L5.86977 8.32521ZM7.40463 8.19204L7.52146 9.53863L8.33329 9.4682L8.65001 8.71739L7.40463 8.19204ZM8.00036 6.77983L9.24509 6.25297L7.99825 3.3072L6.75498 6.25448L8.00036 6.77983ZM8.59958 8.19555L7.35484 8.72241L7.67204 9.4718L8.48276 9.54214L8.59958 8.19555ZM10.1344 8.32871L11.0201 9.34973L13.4314 7.25802L10.2513 6.98212L10.1344 8.32871ZM8.97103 9.33794L8.08533 8.31692L7.46929 8.85132L7.65483 9.64546L8.97103 9.33794ZM9.32146 10.8378L8.62198 11.9943L11.3677 13.6549L10.6377 10.5302L9.32146 10.8378ZM10.798 6.46349L9.1019 6.31631L8.8682 9.00949L10.5643 9.15667L10.798 6.46349ZM10.2291 7.13451L9.56684 5.57512L7.07866 6.6319L7.74096 8.19129L10.2291 7.13451ZM9.56905 5.58037C8.98622 4.19185 7.01449 4.19185 6.43166 5.58037L8.92427 6.62665C8.57972 7.44748 7.42099 7.44748 7.07644 6.62665L9.56905 5.58037ZM6.43345 5.57612L5.77114 7.13902L8.26017 8.19379L8.92248 6.63089L6.43345 5.57612ZM6.90133 6.3196L5.20878 6.46328L5.43743 9.15689L7.12998 9.01321L6.90133 6.3196ZM5.3231 6.45843C5.10802 6.45843 4.84452 6.47114 4.58999 6.53325C4.44279 6.56917 3.76471 6.73882 3.47608 7.44908C3.15174 8.24719 3.63364 8.86933 3.75832 9.01788C3.9431 9.23802 4.17343 9.4121 4.36403 9.54153L5.88269 7.30512C5.76159 7.22289 5.77398 7.21448 5.82894 7.27996C5.85758 7.31408 5.94673 7.4254 6.00911 7.60946C6.07876 7.81499 6.1177 8.12916 5.98047 8.46683C5.84997 8.78797 5.62675 8.9651 5.49284 9.04671C5.36321 9.12571 5.25893 9.15263 5.23081 9.15949C5.17642 9.17276 5.18995 9.16173 5.3231 9.16173V6.45843ZM4.23823 9.44484L5.52429 10.5592L7.29455 8.51616L6.00849 7.40181L4.23823 9.44484ZM5.09305 9.2309L4.70758 10.8849L7.34033 11.4985L7.7258 9.84446L5.09305 9.2309ZM4.6729 11.1518C4.66635 11.3734 4.65876 11.4066 4.64988 11.6197C4.64705 11.6874 4.64296 11.806 4.65294 11.9315C4.65839 12 4.68026 12.3558 4.92373 12.6956C5.07395 12.9053 5.30495 13.104 5.61868 13.2083C5.91447 13.3067 6.17762 13.2858 6.3497 13.2504C6.64872 13.1889 6.86511 13.0426 6.93214 12.9973C7.10307 12.8819 7.29288 12.7141 7.44162 12.5826L5.65056 10.5577C5.46114 10.7253 5.41361 10.7608 5.41951 10.7568C5.42905 10.7504 5.462 10.7285 5.51307 10.7028C5.55951 10.6794 5.66173 10.632 5.80505 10.6025C5.95216 10.5722 6.19396 10.5508 6.47159 10.6431C6.76716 10.7414 6.98318 10.9285 7.12116 11.1211C7.24527 11.2943 7.29575 11.4554 7.31684 11.5372C7.33927 11.6243 7.34562 11.6907 7.34773 11.7172C7.35154 11.7651 7.34865 11.7846 7.35083 11.7323C7.35196 11.7051 7.36962 11.4141 7.37501 11.2316L4.6729 11.1518ZM7.24356 12.7279L8.69782 11.8519L7.30289 9.53629L5.84862 10.4124L7.24356 12.7279ZM7.30084 11.8506L8.75511 12.7302L10.1541 10.4171L8.69987 9.53752L7.30084 11.8506ZM8.75473 12.73C8.72817 12.7139 8.72345 12.7086 8.77203 12.7445C8.79887 12.7643 8.87336 12.8202 8.92995 12.8612C9.00019 12.912 9.28841 13.1293 9.62677 13.2298C9.78218 13.276 10.3131 13.4107 10.8463 13.0654C11.4232 12.692 11.4968 12.0983 11.5043 11.8721C11.5127 11.6184 11.4612 11.3899 11.4195 11.2371C11.3729 11.066 11.3079 10.8831 11.2313 10.692L8.72224 11.6983C8.77644 11.8335 8.80159 11.9121 8.81145 11.9483C8.82631 12.0027 8.79771 11.9273 8.80249 11.7828C8.80635 11.6658 8.84988 11.1376 9.37713 10.7962C9.86087 10.483 10.3227 10.6165 10.3968 10.6385C10.466 10.6591 10.514 10.6811 10.5353 10.6914C10.5586 10.7027 10.5715 10.7105 10.5719 10.7107C10.573 10.7114 10.5685 10.7087 10.5574 10.7012C10.5465 10.6938 10.5325 10.684 10.5144 10.6709C10.4686 10.6378 10.4426 10.6177 10.3779 10.5699C10.335 10.5382 10.2476 10.4737 10.1545 10.4173L8.75473 12.73ZM11.2933 10.889L10.9078 9.23151L8.27477 9.84385L8.66024 11.5014L11.2933 10.889ZM10.4764 10.5592L11.7625 9.44484L9.99222 7.40181L8.70616 8.51616L10.4764 10.5592ZM11.3479 9.69041C11.5779 9.60499 11.8316 9.48518 12.0568 9.32017C12.1687 9.23817 12.3127 9.11663 12.4415 8.94784C12.5647 8.78658 12.7427 8.4909 12.7591 8.08449C12.8006 7.05456 11.9118 6.67221 11.6778 6.59303C11.3522 6.48286 10.9945 6.45843 10.6811 6.45843V9.16173C10.8955 9.16173 10.904 9.18505 10.8114 9.15373C10.7647 9.13794 10.5948 9.07633 10.4206 8.90404C10.2138 8.69948 10.0419 8.37256 10.058 7.97545C10.0719 7.63125 10.2211 7.40138 10.2928 7.30747C10.3703 7.20603 10.4402 7.15336 10.4588 7.1397C10.4975 7.11136 10.4881 7.12602 10.4067 7.15625L11.3479 9.69041ZM7.30177 8.88166L5.98417 9.67713L7.38134 11.9914L8.69894 11.1959L7.30177 8.88166ZM7.99895 11.1418L8.34938 9.64196L5.71698 9.02691L5.36655 10.5267L7.99895 11.1418ZM7.91888 8.31341L6.75547 7.30419L4.98406 9.34623L6.14748 10.3555L7.91888 8.31341ZM5.98659 9.6718L7.52146 9.53863L7.2878 6.84546L5.75294 6.97862L5.98659 9.6718ZM8.65001 8.71739L9.24573 7.30518L6.75498 6.25448L6.15925 7.6667L8.65001 8.71739ZM6.75562 7.30669L7.35484 8.72241L9.84432 7.66869L9.24509 6.25297L6.75562 7.30669ZM8.48276 9.54214L10.0176 9.6753L10.2513 6.98212L8.71641 6.84896L8.48276 9.54214ZM9.24874 7.30769L8.08533 8.31692L9.85674 10.359L11.0201 9.34973L9.24874 7.30769ZM7.65483 9.64546L8.00526 11.1453L10.6377 10.5302L10.2872 9.03041L7.65483 9.64546ZM10.0209 9.68117L8.69983 8.8822L7.30088 11.1954L8.62198 11.9943L10.0209 9.68117Z", fill:"#292B2F",mask:"url(#path-4-inside-2_1378_82282)"})]})]}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:"clip0_1378_82282",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white"})}),(0,r.jsx)("clipPath",{id:"clip1_1378_82282",children:(0,r.jsx)("rect",{width:"12.4444",height:"12.4444",fill:"white",transform:"translate(1.77783 2.66602)"})})]})]})}var _=n(734691),w=n(736818),x=n(189865),P=n(652591),N=n(516659),A=n(483255),T=n(2590),Z=n(473708),M=n(170487),R=n.n(M);function L(e){var t=e.streamLengthRequirement,n=e.viewerCountRequirement,o=(0,c.e7)([j.Z],(function(){return j.Z.currentDropQuestStreamProgress})),i=Math.floor(o/100*t).toString();return(0,r.jsxs)("div",{children:[(0,r.jsx)(f.xvT,{variant:"text-sm/bold",className:R().progressBarCount,children:Z.Z.Messages.DROPS_STREAM_PROGRESS_INDICATOR.format({minutesStreamed:i,streamLengthRequirement:t})}),(0,r.jsx)("div",{className:R().progressBarContainer,children:(0,r.jsx)("div",{className:R().progressBarOuter, children:(0,r.jsx)("div",{className:R().progressBarInner,style:{width:"".concat(o,"%")}})})}),(0,r.jsxs)(f.xvT,{variant:"text-xs/medium",className:R().viewerCount,children:["*",Z.Z.Messages.DROPS_REQUIRE_NUM_VIEWERS.format({numViewers:n}),"*"]})]})}function D(e){var t=e.onClose,n=e.tooltipAction,o=e.partnerGame,i=(0,N.au)(o);(0,N.op)(o);var a=(0,c.e7)([w.default],(function(){return w.default.getId()}));if(null==i)return null;var l=i.config,u=l.streamLengthRequirement,s=l.viewerCountRequirement,d=i.drop,p=function(e,t,n){var r=t.assets.tooltipSrc;switch(e){case A._e.STREAM_CTA:return{header:Z.Z.Messages.DROP_ENROLLMENT_CTA_TOOLTIP_HEADER.format({gameName:t.title}),body:t.messages.enrollmentTooltip(n),imgSrc:r,imgStyle:R().dropImgPreStreamNotice};case A._e.TRACK_PROGRESS:return{header:Z.Z.Messages.DROP_ENROLLMENT_CTA_TOOLTIP_HEADER.format({gameName:t.title}),body:"",imgSrc:r,imgStyle:R().dropImgProgressTracker};case A._e.QUEST_COMPLETION:return{ header:Z.Z.Messages.DROPS_QUEST_COMPLETION_TOOLTIP_HEADER,body:t.messages.completionTooltip(n),imgSrc:r,imgStyle:R().dropImgQuestCompletion};case A._e.LOADING_INITIAL_PROGRESS:return{header:"",body:"",imgSrc:r,imgStyle:R().dropImgPreStreamNotice}}}(n,d,u),h=p.header,y=p.body,b=p.imgSrc,v=p.imgStyle,m=function(){P.default.track(T.rMx.DROPS_ACTIVITY_PANEL_POPOVER_CTA_CLICK,{user_id:a,drops_quest_id:d.dropsQuestId,game_id:d.dropsGameId,game_name:d.title.toLowerCase(),tooltip_action:n})},g=function(){t()};return(0,r.jsxs)("div",{className:R().container,children:[(0,r.jsx)("img",{src:b,alt:"",className:v}),(0,r.jsx)(f.P3F,{className:R().buttonClose,"aria-label":Z.Z.Messages.CLOSE,onClick:g,children:(0,r.jsx)(x.Z,{width:16,height:16,className:R().closeIcon})}),n===A._e.LOADING_INITIAL_PROGRESS?(0,r.jsx)(f.$jN,{className:R().spinner}):(0,r.jsx)(f.X6q,{className:R().title,variant:"heading-md/extrabold",children:h}),n===A._e.TRACK_PROGRESS?(0,r.jsx)(L,{streamLengthRequirement:u, viewerCountRequirement:s}):(0,r.jsx)(f.xvT,{variant:"text-sm/medium",className:R().subTitle,children:y}),n===A._e.QUEST_COMPLETION?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.zxk,{look:f.zxk.Looks.INVERTED,fullWidth:!0,onClick:function(){t();_.Z.open(T.oAB.INVENTORY);m()},children:Z.Z.Messages.REDEEM}),(0,r.jsx)(f.zxk,{className:R().linkButtonContainer,innerClassName:R().linkButton,onClick:g,look:f.zxk.Looks.LINK,fullWidth:!0,color:f.zxk.Colors.WHITE,children:Z.Z.Messages.NOT_NOW})]}):(0,r.jsx)(f.zxk,{look:f.zxk.Looks.INVERTED,fullWidth:!0,onClick:function(){t();_.Z.open(T.oAB.INVENTORY);m()},children:Z.Z.Messages.LEARN_MORE}),(0,r.jsx)("div",{className:R().pointer})]})} var k=n(924066),U=n(866926),B=n(974760),F=n(216299),G=n(944514),H=n(371607),V=n(177570),W=n(61209),z=n(959207),Y=n(5544),K=n(567403),q=n(736097),Q=n(682776),X=n(491260),J=n(671723),$=n(715107),ee=n(375759),te=n(641277),ne=n(776009),re=n(542231),oe=n(634193),ie=n(633531),ae=n(226919),le=n(203742),ue=n(81308),ce=n(168775),se=n(630781),fe=n(984479),de=n(531441),pe=n(977005),he=n(120415),ye=n(714614),be=n.n(ye);function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function _e(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function we(e,t){we=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return we(e,t)}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return() }finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ve(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Pe=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var o=Ce(this).constructor;n=Reflect.construct(r,arguments,o) }else n=r.apply(this,arguments);return _e(this,n)}}var Ae=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0}var r=null;null!=s&&null!=s.id?r=z.Z.getGame(s.id):null!=i?r=z.Z.getGameByGameData(i):null!=n&&(r=z.Z.getGame(n.application_id));return[e,n,r]})),3),h=p[0],b=p[1],m=p[2],g=(0,c.e7)([v.ZP],(function(){return null!=m&&v.ZP.isLastEligibleHost(o,m.id)})),O=(0,c.e7)([q.Z],(function(){return(0,U.Z)(q.Z)&&(0,he.ED)()})),S=(0,c.e7)([X.Z],(function(){return null!=o?X.Z.findActivity(o,(function(e){return e.type===T.IIU.PLAYING})):null})),I=(0,E.G)(),_=(0,c.e7)([C.Z],(function(){return C.Z.getSettings().clipsEnabled})),x=null!=u&&u.ownerId===o&&u.state!==T.jm8.ENDED;return(0,r.jsx)(Ze,Se(je({},n),{guildId:t,canGoLive:O,activity:S,embeddedActivity:b,showDropsSparkles:!1,dropsPartnerGame:null,dropsActivityPanelExperienceBlocked:!1,userId:o, runningGame:i,application:m,useReducedMotion:f,isStreaming:x,voiceChannel:a,canStream:h,dropsTooltipAction:d,stream:u,streamMetadata:s,isLastEligibleEmbeddedActivityHost:g,clipsEnabled:I&&_}))}))},37707:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(336194),a=n(707961),l=n(396043),u=n(64234),c=n(6171),s=n(652591),f=n(2590),d=n(473708),p=n(482196),h=n.n(p),y=n(913198),b=n.n(y);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=n(667294),i=n(202351),a=n(423427),l=n(773011),u=n(284610),c=n(747126),s=n(746477),f=n(50433),d=n(682776),p=n(840922),h=n(473903),y=n(930948),b=n(15084),v=n(665328),m=n(949995),g=n(2590),O=n(473708);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>I});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(159895),c=n(799066),s=n(793008),f=n(444663),d=n(473708),p=n(36627),h=n.n(p),y=n(587161),b=n.n(y);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return g(e)}function O(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t){E=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e} ;return E(e,t)}var C=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function S(){return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:a()(b().sparkleWhite,h().sparkleOne)}),(0,r.jsx)("div",{className:a()(b().sparkleWhite,h().sparkleTwo)}),(0,r.jsx)("div",{className:a()(b().lightWhite,h().lightOne)}),(0,r.jsx)("div",{className:a()(b().lightWhite,h().lightTwo)}),(0,r.jsx)("div",{className:a()(b().crossWhite,h().crossOne)}),(0,r.jsx)("div",{className:a()(b().crossWhite,h().crossTwo)}),(0,r.jsx)("div",{ className:a()(b().popWhite,h().popOne)})]})}const I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&E(e,t)}(n,e);var t=j(n);function n(){v(this,n);var e;(e=t.apply(this,arguments)).state={isDragging:!1,isOverZone:!1};e.dragOverTimeout=null;e.elementDOMRef=o.createRef();e.isAllDropFiles=function(e){for(var t=0;t1&&void 0!==arguments[1]&&arguments[1],r=t.dataTransfer;if(null==r)return!0;var o=Array.isArray(r.types)&&-1!==r.types.indexOf("text/uri-list")&&-1===r.types.indexOf("application/json"),i=null!=r.items&&!e.isAllDropFiles(r.items);if(o||i){t.stopPropagation();t.preventDefault();r.effectAllowed="none" ;r.dropEffect="none";if(n){e.setState({isDragging:!1});(0,f.openUploadError)({title:d.Z.Messages.UPLOAD_AREA_INVALID_FILE_TYPE_TITLE,help:d.Z.Messages.UPLOAD_AREA_INVALID_FILE_TYPE_HELP,icons:e.props.icons})}return!1}return!0};e.handleDragOver=function(t){var n,r;if(!e.preventUnwantedDrop(t))return!1;var o=t.dataTransfer;if(null!=o){o.dropEffect="copy";(0,l.nfh)(f.UPLOAD_ERROR_MODAL_KEY)&&(0,l.Mr3)(f.UPLOAD_ERROR_MODAL_KEY);t.stopPropagation();t.preventDefault();null===(r=(n=e.props).onDragOver)||void 0===r||r.call(n,t);if(!e.state.isDragging){var i;(0,u.I6)(c.Z);var a=null===(i=e.elementDOMRef.current)||void 0===i?void 0:i.ownerDocument.defaultView;(null!=a&&o.types instanceof a.DOMStringList&&o.types.contains("application/x-moz-file")||-1!==o.types.indexOf("Files"))&&e.setState((function(e){return e.isDragging?{}:{isDragging:!0}}))}clearTimeout(e.dragOverTimeout);e.dragOverTimeout=setTimeout((function(){var t,n;e.setState({isDragging:!1}) ;null===(n=(t=e.props).onDragClear)||void 0===n||n.call(t)}),1e3)}};e.handleDragOverZone=function(){e.setState({isOverZone:!0})};e.handleDragLeaveZone=function(){e.setState({isOverZone:!1})};e.handleDragLeave=function(t){if(e.state.isDragging){t.stopPropagation();t.preventDefault();e.clearDragging()}};e.clearDragging=function(){var t,n;e.setState({isDragging:!1,isOverZone:!1});null===(n=(t=e.props).onDragClear)||void 0===n||n.call(t)};e.handleDrop=function(t){if(!e.preventUnwantedDrop(t,!0))return!1;var n=t.dataTransfer;if(null==n)return!0;if(e.state.isDragging){t.preventDefault();t.stopPropagation();e.props.onDrop(n.files);e.clearDragging()}};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.elementDOMRef.current;if(null!=e){e.ownerDocument.body.addEventListener("dragover",this.handleDragOver,!1);e.ownerDocument.body.addEventListener("drop",this.handleDragLeave,!1);e.addEventListener("dragover",this.handleDragOverZone,!1) ;e.addEventListener("dragleave",this.handleDragLeaveZone,!1);e.addEventListener("drop",this.handleDrop,!1)}};i.componentWillUnmount=function(){var e=this.elementDOMRef.current;if(null!=e){e.ownerDocument.body.removeEventListener("dragover",this.handleDragOver,!1);e.ownerDocument.body.removeEventListener("drop",this.handleDragLeave,!1);e.removeEventListener("dragover",this.handleDragOverZone,!1);e.removeEventListener("dragleave",this.handleDragLeaveZone,!1);e.removeEventListener("drop",this.handleDrop,!1)}clearTimeout(this.dragOverTimeout)};i.render=function(){var e,t=this.props,n=t.title,o=t.description,i=t.icons,l=t.style,u=t.className;return(0,r.jsx)("div",{ref:this.elementDOMRef,className:a()(u,h().uploadArea,(e={},m(e,h().droppable,this.state.isDragging),m(e,h().uploadModalIn,this.state.isOverZone),e)),style:l,children:(0,r.jsxs)("div",{className:h().uploadDropModal,children:[this.state.isDragging&&(0,r.jsx)(S,{}),(0,r.jsx)("div",{className:h().bgScale}),(0,r.jsxs)("div",{ className:h().inner,children:[(0,r.jsx)(s.Z,{icons:i}),(0,r.jsx)("div",{className:h().title,children:n}),(0,r.jsx)("div",{className:h().instructions,children:(0,r.jsx)("pre",{children:o})})]})]})})};return n}(o.Component)},704271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(327499),s=n(473903),f=n(554904),d=n(348592),p=n(2590),h=n(473708),y=n(991320),b=n.n(y);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e){m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return m(e)}function g(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t){O=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return O(e,t)}var E=function(e){ return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&O(e,t)}(n,e);var t=C(n);function n(){v(this,n);var e;(e=t.apply(this,arguments)).scroller=o.createRef();e.handleDisagree=function(){var t=e.props.guild;null!=t&&c.Z.nsfwReturnToSafety(t.id)};e.handleAgree=function(){var t=e.props.guild ;null!=t&&c.Z.nsfwAgree(t.id)};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.scroller.current;null==e||e.scrollToBottom()};i.render=function(){var e=this.props.nsfwDisallowed,t=h.Z.Messages.NSFW_DESCRIPTION;t=e?h.Z.Messages.AGE_GATE_NSFW_UNDERAGE_BODY.format({helpURL:d.Z.getArticleURL(p.BhN.NSFW_AGE_GATING)}):h.Z.Messages.AGE_GATE_NSFW_DESCRIPTION;var n=e?(0,r.jsx)(f.Z,{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:h.Z.Messages.AGE_GATE_NSFW_UNDERAGE_HEADER,description:t,agreement:null,disagreement:h.Z.Messages.BACK,imageClassName:b().ageGatedImage}):(0,r.jsx)(f.Z,{onAgree:this.handleAgree,onDisagree:this.handleDisagree,title:h.Z.Messages.NSFW_TITLE,description:t,agreement:h.Z.Messages.NSFW_ACCEPT,disagreement:h.Z.Messages.NSFW_DECLINE});return(0,r.jsx)(u.Den,{ref:this.scroller,className:b().scroller,children:(0,r.jsx)("div",{className:a()(this.props.className,b().wrapper),children:n})})};return n}(o.PureComponent) ;const S=l.ZP.connectStores([s.default],(function(){var e;return{nsfwDisallowed:!1===(null===(e=s.default.getCurrentUser())||void 0===e?void 0:e.nsfwAllowed)}}))(j)},387927:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d,$:()=>p});var r=n(791216),o=n(660177),i=n(327499),a=n(567403),l=n(682776),u=n(407561),c=n(602397),s=n(2590),f="DRAGGABLE_USER";function d(e){return(0,r.G)(f,{canDrop:function(e){var t,n,r=e.channel,o=r.getGuildId(),i=null!==(n=null===(t=a.Z.getGuild(o))||void 0===t?void 0:t.maxVideoChannelUsers)&&void 0!==n?n:-1,f=c.ZP.countVoiceStatesForChannel(r.id),d=null!=o&&u.Z.hasVideo(r.id)&&i>0&&f>=i+1;return l.Z.can(s.Plq.MOVE_MEMBERS,r)&&l.Z.can(s.Plq.CONNECT,r)&&!d},drop:function(e,t){var n=e.channel,r=u.Z.getVoiceStateForUser(t.getItem().user.id);(null==r?void 0:r.channelId)!==n.id&&i.Z.setChannel(n.getGuildId(),t.getItem().user.id,n.id)}},(function(e,t){return{connectUserDropTarget:e.dropTarget(),isUserOver:t.isOver()&&t.canDrop()}}))(e)}function p(e){return(0,o.E)(f,{ canDrag:function(e){e.user;var t=e.canDrag;return null!=t&&t},beginDrag:function(e){return{user:e.user}}},(function(e){return{connectUserDragSource:e.dragSource()}}))(e)}},251295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(667294),o=n(539381);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{y:()=>l,Z:()=>s});var r=n(667294),o=n(496486);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Sr:()=>_,Xq:()=>w,Zg:()=>x});var r,o=n(400394),i=n(941248),a=n(484524),l=n(847294),u=n(512566),c=n(196444),s=n(956485),f={binds:["mod+k","mod+t"],comboKeysBindGlobal:!0,action:function(){(0,s.$Z)("KEYBIND","");return!1}},d=n(153080),p=n(469471),h=n(678483),y=n(520522),b=n(877944),v=n(735892),m=n(436703),g=n(886076),O=n(452006),E=n(805181),C=n(2590),j=n(473708);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{u:()=>f});var r=n(809784),o=n(26468),i=n(419289),a=n(881532),l=n(930948),u=n(288457),c=n(2590);function s(e,t,n){ t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var f=function(e){for(var t=1;t{"use strict";n.d(t,{m:()=>r,o:()=>h}) ;var r,o=n(495414),i=n(242715),a=n(736818),l=n(61209),u=n(584690),c=n(563367),s=n(407561),f=n(652591),d=n(2590);!function(e){e.SELF_VIDEO="self_video";e.SELF_STREAM="self_stream";e.REMOTE_VIDEO="remote_video";e.REMOTE_STREAM="remote_stream";e.CHANGE_VIDEO_BACKGROUND="change_video_background";e.VIDEO_PLAYER="video_player";e.REPLAY_VIDEO_STREAM="replay_video_stream"}(r||(r={}));var p=new Map;var h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.spinnerVisibleStart=null;this.logger=new o.Z(t)}var t=e.prototype;t.onSpinnerStarted=function(){null==this.spinnerVisibleStart&&(this.spinnerVisibleStart=(0,i.zO)())};t.trackSpinnerDuration=function(e,t,n){if(null!=this.spinnerVisibleStart){var r=function(e){var t,n=(null!==(t=p.get(e))&&void 0!==t?t:0)+1;p.set(e,n);return n}(n),o=(0,i.zO)()-this.spinnerVisibleStart;this.spinnerVisibleStart=null ;if(o<0||o>2e4)this.logger.warn("spinner duration not in [0, ".concat(2e4,"]: ").concat(o," ms\n [").concat(e,", count for stream: ").concat(r,"]"));else{this.logger.info("spinner visible for ".concat(o," ms\n [").concat(e,", count for stream: ").concat(r,"]"));var h=c.Z.getGuildId(),y=s.Z.getUserVoiceChannelId(h,a.default.getId()),b=function(e){if(null!=e){if(e.isGuildVoice())return"guild_voice";if(e.isGuildStageVoice())return"is_stage_channel";if(e.isDM())return"dm";if(e.isGroupDM())return"group_dm"}return null}(l.Z.getChannel(y));f.default.track(d.rMx.VIDEO_SPINNER_SHOWN_V2,{video_spinner_context:e,duration_video_spinner_visible_ms:o,rtc_connection_id:c.Z.getRTCConnectionId(),media_session_id:c.Z.getMediaSessionId(),event_count_for_stream:r,guild_id:h,channel_id:y,channel_type:b,spinning_user_id:t,connection_type:u.Z.getType(),effective_connection_speed:u.Z.getEffectiveConnectionSpeed(),service_provider:u.Z.getServiceProvider()})}}};return e}()},460471:(e,t,n)=>{ "use strict";n.d(t,{Z:()=>E});var r=n(281110),o=n(101566),i=n(474717),a=n(124453),l=n(473708);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t,n){d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}};return d(e,t,n||e)}function p(e){p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){ return e.__proto__||Object.getPrototypeOf(e)};return p(e)}function h(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>Q});var r=n(785893),o=n(667294),i=n(707961),a=n(744564),l=n(301928),u=n(294184),c=n.n(u),s=n(318715),f=n(308739),d=n(153686),p=n(19585),h=n(607739),y=n(288634),b=n(549069),v=n(451936),m=n(473903),g=n(107364),O=n(366007),E=n(443812),C=n(558820),j=n(95891),S=n(652591),I=n(775173),_=n(120415),w=n(310126),x=n(224813),P=n(308921);const N={acceptInvite:function(e){var t=this,n=x.Z.getInviteContext("Desktop Invite Modal",e);x.Z.acceptInvite({inviteKey:e.code,context:n, callback:function(e){null==e||null==e.guild||null==e.channel||__OVERLAY__||x.Z.transitionToInvite(e)}}).then((function(){return t.close()}),(function(e){a.Z.dispatch({type:"INVITE_MODAL_ERROR",message:(0,P.O)(e.code)})}))},close:function(){a.Z.dispatch({type:"INVITE_MODAL_CLOSE"})}};var A=n(353049),T=n(2590),Z=n(203600),M=n(473708),R=n(343695),L=n.n(R),D=n(518280),k=n.n(D);function U(){var e=(0,p.Z)(d.Z.PREMIUM_UPSELL_TOOLTIP),t=e.analyticsLocations,n=e.sourceAnalyticsLocations;o.useEffect((function(){S.default.track(T.rMx.PREMIUM_UPSELL_VIEWED,{type:Z.cd.GUILD_CAP_INLINE_INVITE_MODAL,location:{page:T.ZY5.NATIVE_INVITE_MODAL},location_stack:n})}),[n]);return(0,r.jsxs)(i.P3F,{onClick:function(){return(0,b.Z)({analyticsSource:{page:T.Sbl.EXTERNAL_INVITE_LINK_MODAL},analyticsLocation:{page:T.Sbl.EXTERNAL_INVITE_LINK_MODAL,section:T.jXE.GUILD_CAP_UPSELL_MODAL},analyticsLocations:t})},className:L().experimentUpsellError,children:[(0,r.jsx)(j.Z,{width:24,height:24, className:L().experimentUpsellIcon,color:O.JX.PREMIUM_TIER_2}),(0,r.jsx)("span",{className:L().experimentUpsellText,children:M.Z.Messages.GUILD_CAP_UPSELL_TOOLTIP}),(0,r.jsx)("span",{className:L().experimentGetNitro,children:M.Z.Messages.GUILD_CAP_UPSELL_GET_NITRO})]})}function B(e){var t=e.transitionState,n=function(){null!=l&&N.acceptInvite(l)};(0,s.ZP)([m.default],(function(){var e;return null===(e=m.default.getCurrentUser())||void 0===e?void 0:e.premiumType}));var a=(0,s.cj)([A.Z],(function(){return A.Z.getProps()})),l=a.invite,u=a.error,b=a.submitting;o.useEffect((function(){if(!__OVERLAY__){(0,_.ED)()?w.default.minimize():w.default.restore();w.default.focus()}}),[]);var O=(0,E.Dt)(),j=(0,p.Z)(d.Z.INVITE_MODAL).AnalyticsLocationProvider;if(null==l||null==l.channel)return null;var S,x,P=l.guild,T=l.channel,Z=l.inviter,R=l.target_application,D=null!=P,B=null!=l.stage_instance,F=null==l.guild&&null==l.channel&&null!=l.inviter;if(null!=R){S=null==P?void 0:P.name ;x=v.Z.createFromServer(R).getCoverImageURL(1024)}else if(null!=P){S=P.name;x=I.ZP.getGuildSplashURL({id:P.id,splash:P.splash})}else{null!=(S=T.name)&&""!==S||null==Z||(S=Z.username);if(null==S)throw new Error("no name for group DM invite")}var G=(0,y.yU)(),H=B?M.Z.Messages.INSTANT_INVITE_ACCEPT_STAGE:M.Z.Messages.INVITE_MODAL_BUTTON.format({guildName:S});F&&(H=M.Z.Messages.ACCEPT_INVITE_MODAL_BUTTON);return(0,r.jsx)(j,{children:(0,r.jsxs)(i.Y0X,{size:i.CgR.DYNAMIC,"aria-labelledby":O,transitionState:t,className:L().container,children:[(0,r.jsx)("div",{className:L().contentWrapper,children:(0,r.jsx)(i.Ttm,{className:L().scroller,children:(0,r.jsxs)(g.Z,{className:L().inviteContent,direction:g.Z.Direction.VERTICAL,justify:g.Z.Justify.BETWEEN,children:[(0,r.jsx)("div",{id:O,className:k().marginBottom20,children:(0,r.jsx)(f.Z,{invite:l,disableUser:D,error:u})}),B&&null!=P?(0,r.jsx)("div",{className:c()(k().marginBottom20,L().stage),children:(0,r.jsx)(h.Z,{isCard:!0, stageInstance:l.stage_instance,guild:P})}):null,(0,r.jsxs)("div",{children:[G?(0,r.jsx)(U,{}):null,null==R?(0,r.jsx)(i.ua7,{text:G?M.Z.Messages.TOO_MANY_USER_GUILDS_DESCRIPTION:null,position:"bottom",children:function(e){var t=e.onMouseEnter,o=e.onMouseLeave;return(0,r.jsx)(C.zx,{size:C.zx.Sizes.LARGE,onClick:n,submitting:b,disabled:G,color:B?C.zx.Colors.GREEN:C.zx.Colors.BRAND,onMouseEnter:t,onMouseLeave:o,children:G?M.Z.Messages.GUILD_CAP_INVITE_MODAL_BUTTON:H})}}):(0,r.jsxs)("div",{className:L().buttonGroup,children:[(0,r.jsx)(C.zx,{size:C.zx.Sizes.LARGE,onClick:n,submitting:b,children:M.Z.Messages.PLAY}),(0,r.jsx)(C.zx,{color:C.zx.Colors.PRIMARY,size:C.zx.Sizes.LARGE,onClick:n,submitting:b,children:M.Z.Messages.SPECTATE})]}),(0,r.jsx)(g.Z,{justify:g.Z.Justify.CENTER,className:k().marginTop8,children:(0,r.jsx)(C.zx,{look:C.zx.Looks.LINK,className:L().noThanksButton,onClick:function(){N.close()},color:C.zx.Colors.TRANSPARENT,children:M.Z.Messages.INIVTE_MODAL_NO_THANKS})})]})]})}) }),null!=x&&(0,r.jsx)("div",{className:L().inviteSplash,style:{backgroundImage:"url(".concat(x,")")}})]})})}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function H(e){H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return H(e)}function V(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function W(e,t){W=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return W(e,t)}var z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0 ;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=H(e);if(t){var o=H(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}var K="INVITE_MODAL_KEY",q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&W(e,t)}(n,e);var t=Y(n);function n(){F(this,n);return t.apply(this,arguments)}var o=n.prototype;o._initialize=function(){a.Z.subscribe("INVITE_MODAL_OPEN",this.handleOpenModal);a.Z.subscribe("INVITE_MODAL_CLOSE",this.handleCloseModal)};o._terminate=function(){(0,i.Mr3)(K);a.Z.subscribe("INVITE_MODAL_OPEN",this.handleOpenModal);a.Z.subscribe("INVITE_MODAL_CLOSE",this.handleCloseModal)};o.handleOpenModal=function(){A.Z.isOpen()&&!(0,i.nfh)(K)&&(0,i.h7j)((function(e){return(0, r.jsx)(B,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>M});var r=n(202351),o=n(744564),i=n(665278),a=n(784426),l=n(382060),u=n(848285),c=n(61209),s=n(567403),f=n(757753),d=n(682776),p=n(473903),h=n(310126),y=n(2590),b=n(897196);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?A[0][0]:null,error:null!=w&&""!==w?w:null,submitting:N}} ;r.__getLocalVars=function(){return{context:x,connected:P,error:w,submitting:N,invites:A}};return n}(r.ZP.Store);Z.displayName="InviteModalStore";const M=new Z(o.Z,{OVERLAY_INITIALIZE:T,CONNECTION_OPEN:T,CONNECTION_CLOSED:function(){P=!1},INVITE_MODAL_OPEN:function(e){var t=e.invite;if(null==t)return!1;var n=t.channel,r=t.guild;if(null==n)return!1;if((0,l.bc)(n.type)){if(null!=c.Z.getChannel(n.id)){(0,a.XU)(y.ME,n.id);h.default.focus();return!1}}else{if(null==r)return!1;if(null!=s.Z.getGuild(r.id)&&!(0,i.TY)(t)){var o=function(e){if((0,i.W6)(e))return b.oC.ROLE_SUBSCRIPTIONS;var t=e.channel;if(null!=t){var n=c.Z.getChannel(t.id);if(d.Z.can(y.Plq.VIEW_CHANNEL,n))return t.id}return null}(t);(0,a.XU)(r.id,o);h.default.focus();return!1}}if(A.some((function(e){return S(e,1)[0].code===v})))return!1;var f=t.approximate_member_count,p=t.approximate_presence_count,v=t.code,m=t.target_type,g=t.target_user,O=t.target_application,C=t.stage_instance,j=t.type;x=e.context;N=!1;var I={code:v, approximate_member_count:f,approximate_presence_count:p,target_type:m,target_user:g,target_application:O,channel:E({},n),stage_instance:C,type:j};null!=r&&(I.guild=new u.Z(r));null!=t.inviter&&(I.inviter=E({},t.inviter));A.push([I,e.resolve])},INVITE_MODAL_CLOSE:function(){w=null;N=!1;if(A.length>0){var e=S(A.shift(),2)[1];null!=e&&e()}},INVITE_ACCEPT:function(){N=!0},INVITE_MODAL_ERROR:function(e){var t=e.message;w=t;N=!1}})},52330:(e,t,n)=>{"use strict";n.d(t,{T:()=>b,E:()=>v});var r=n(667294),o=n(202351),i=n(28661),a=n(473903),l=n(325213),u=n(72580),c=n(120415),s=n(144153),f=n(258104),d=n(515209),p=n(838733);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&E[0].id===v?[{ activity:E[0].embeddedActivityConfig,application:E[0]}]:[],j=(0,o.e7)([f.ZP],(function(){var e;return null!==(e=f.ZP.getState().freePeriodActivities)&&void 0!==e?e:[]})),S=r.useMemo((function(){return b.map((function(e){var t=E.find((function(t){return t.id===e.application_id}));return null==t?null:{activity:e,application:t}})).filter(u.lm)}),[b,E]);return(m?y(C).concat(y(S)):(0,d.ZP)(h,E,j)).filter((function(e){var n=e.activity;return(null!==(t=n.supported_platforms)&&void 0!==t?t:[]).includes((0,p.Z)((0,c.Ij)()))})).filter((function(e){return!e.activity.requires_age_gate||!0===(null==n?void 0:n.nsfwAllowed)||null==(null==n?void 0:n.nsfwAllowed)}))}},417290:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(202351),o=n(560213),i=n(667294),a=n(73904),l=n(88067);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{ZP:()=>c,QN:()=>s});var r=n(667294),o=n(202351),i=n(28661),a=n(473903),l=n(72580),u=n(258104);function c(e,t){return f((0,o.Wu)([u.ZP],(function(){return null!=e&&null!=e.id&&""!==e.id?u.ZP.getEmbeddedActivitiesForChannel(e.id):u.i6})),t)}function s(e){var t=f((0,o.e7)([u.ZP],(function(){return null!=e?u.ZP.getEmbeddedActivitiesForGuild(e):u.i6})));return r.useMemo((function(){var e=new Map;t.forEach((function(t){var n,r=t.embeddedActivity.channelId,o=null!==(n=e.get(r))&&void 0!==n?n:[];o.push(t);e.set(r,o)}));return e}),[t])}function f(e,t){var n=e.map((function(e){return e.application_id})),u=(0,i.Z)(n),c=new Set([]),s=!0,f=!1,d=void 0;try{for(var p,h=e[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var y=p.value,b=!0,v=!1,m=void 0;try{for(var g,O=y.connections.keys()[Symbol.iterator]();!(b=(g=O.next()).done);b=!0){var E=g.value;c.add(E)}}catch(e){v=!0;m=e}finally{try{b||null==O.return||O.return()}finally{if(v)throw m}}}}catch(e){f=!0;d=e }finally{try{s||null==h.return||h.return()}finally{if(f)throw d}}var C=(0,o.Wu)([a.default],(function(){var e=[],t=!0,n=!1,r=void 0;try{for(var o,i=c[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value;e.push(a.default.getUser(l))}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}),[c]),j=r.useMemo((function(){var n=new Map;C.forEach((function(e){null!=e&&n.set(e.id,e)}));var r=e.map((function(e,r){var o=u[r],i=[];if(null!=i){var a=!0,l=!1,c=void 0;try{for(var s,f=e.connections.keys()[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value,p=n.get(d);if(null!=p&&null!=t){var h=t(p);null!=h&&i.push(h)}}}catch(e){l=!0;c=e}finally{try{a||null==f.return||f.return()}finally{if(l)throw c}}}return null==o?null:{embeddedActivity:e,application:o,userParticipantAvatarUrls:i}})).filter(l.lm);return r}),[e,u,C,t]);return j}},555086:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p}) ;var r=n(667294),o=n(202351),i=n(325213),a=n(72580),l=n(240697),u=n(560213),c=n(582762),s=n(258104),f=n(120819),d=n(436771);function p(e,t){var n=(0,o.e7)([i.Z],(function(){return i.Z.testModeEmbeddedApplicationId})),p=(0,o.cj)([u.Z],(function(){return{isDeveloperActivityShelfEnabled:u.Z.getIsEnabled(),developerActivityShelfFetchState:u.Z.getFetchState()}}),[]),h=p.isDeveloperActivityShelfEnabled,y=p.developerActivityShelfFetchState,b=(0,o.Wu)([u.Z],(function(){return u.Z.getDeveloperShelfItems()}),[]),v=l.s8.useExperiment({}).enableNitroActivities,m=(0,f.z)(),g=(0,o.e7)([s.ZP],(function(){return s.ZP.getBundleItems(e).length})),O=(0,d.Z)(t),E=function(e){return null!=e&&""!==e}(e)||O;r.useEffect((function(){E&&m&&(0,c.w1)(e)}),[e,m,E]);r.useEffect((function(){m&&h&&null==y&&(0,c.$h)()}),[m,h,y]);return E&&m&&(v||(0,a.lm)(n)||g>0||h&&b.length>0)}},22664:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var r=n(202351),o=n(473903),i=n(850841),a=n(258104),l=function(e){var t=e.appId,n=(0, r.e7)([o.default],(function(){return o.default.getCurrentUser()})),l=i.ZP.canUsePremiumActivities(n);return(0,r.e7)([a.ZP],(function(){return a.ZP.getState().shouldShowNewActivityIndicator||!l&&a.ZP.shouldShowIndicatorForActivity(t)}))}},9018:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2590);function o(e,t){var n=window.GLOBAL_ENV.CDN_HOST,o=window.GLOBAL_ENV.API_ENDPOINT;return null!=n?"".concat(location.protocol,"//").concat(n,"/app-assets/").concat(e,"/store/").concat(t,".mp4"):"".concat(location.protocol).concat(o).concat(r.ANM.STORE_ASSET(e,t,"mp4"))}},565957:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,Z:()=>E});var r,o=n(202351),i=n(73904),a=n(19585),l=n(473903),u=n(120415),c=n(850841),s=n(582762),f=n(258104),d=n(61040),p=n(718482),h=n(933954),y=n(838733),b=n(9018),v=n(312242),m=n(483535),g=n(92585),O=n(39732);!function(e){e.START="START";e.JOIN="JOIN";e.LEAVE="LEAVE"}(r||(r={}));function E(e){ var t,n=e.activityItem,E=e.channel,C=e.guildId,j=e.locationObject,S=e.onActivityItemSelected,I=e.embeddedActivitiesManager,_=e.assetNames,w=(0,a.Z)().analyticsLocations,x=n.application,P=n.activity,N=P.client_platform_config[(0,y.Z)((0,u.Ij)())],A=N.label_type===i.ww.NEW&&null!=N.label_until&&Date.now(){"use strict";n.d(t,{Z:()=>u});var r=n(667294),o=n(3564);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>h});var r=n(785893),o=n(667294),i=n(633878);function a(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){ return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?24:t,o=e.height,c=void 0===o?24:o,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=u(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",l(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=(n(667294),n(707961)),i=n(744564),a=n(895303),l=n(301928),u=n(473708);function c(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,l,"next",e)}function l(e){c(i,r,o,a,l,"throw",e)}a(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function p(e){p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return p(e)}function h(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Y:()=>N});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(202351),c=n(336194),s=n(707961),f=n(473903),d=n(349491),p=n(95891),h=n(850841),y=n(463473),b=n(599055),v=n(565957),m=n(650875),g=n(391186),O=n(2590),E=n(473708),C=n(824695),j=n.n(C);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{T:()=>r,A:()=>s});var r,o=n(785893),i=(n(667294),n(294184)),a=n.n(i),l=n(459023),u=n.n(l);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} !function(e){e[e.POPOUT=0]="POPOUT";e[e.SECONDARY=1]="SECONDARY";e[e.BLACK=2]="BLACK"}(r||(r={}));var s=function(e){var t,n=e.left,i=void 0===n?void 0:n,l=e.top,s=void 0===l?0:l,f=e.right,d=void 0===f?0:f,p=e.bottom,h=void 0===p?void 0:p,y=e.size,b=void 0===y?8:y,v=e.alert,m=void 0!==v&&v,g=e.maskColor,O=void 0===g?r.SECONDARY:g;return(0,o.jsx)("span",{className:a()(u().dot,(t={},c(t,u().alert,m),c(t,u().maskPopout,O===r.POPOUT),c(t,u().maskSecondary,O===r.SECONDARY),c(t,u().maskBlack,O===r.BLACK),t)),style:{height:b,width:b,left:i,top:s,right:d,bottom:h}})}},283133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});function r(e,t){return"activityembed:".concat(e,":").concat(t)}},260211:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(260561).B)({kind:"user",id:"2021-05_application_command_suggestions",label:"Application Command Suggestion experiment",defaultConfig:{showApplicationCommandSuggestions:!1},treatments:[{id:1,label:"Show suggestions",config:{showApplicationCommandSuggestions:!0}}] })},836296:(e,t,n)=>{"use strict";n.d(t,{f:()=>O});var r,o=n(73904),i=n(284610),a=n(255592),l=n(385231),u=n(99885),c=n(384411),s=n(849172),f=n(248046),d=n(127624),p=n(473708);function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var y=(h(r={},o.jw.SUB_COMMAND,(function(){return{success:!1}})),h(r,o.jw.SUB_COMMAND_GROUP,(function(){return{success:!1}})),h(r,o.jw.STRING,(function(e,t){var n,r=null===(n=function(e){switch(e.type){case"emoji":return e.surrogate;case"text":return e.text}}(e))||void 0===n?void 0:n.trim();return null==t.choices||null!=r&&t.choices.map((function(e){return e.displayName})).includes(r)?t.type!==o.jw.STRING||void 0===t.minLength&&void 0===t.maxLength?{success:!0}:void 0!==r?function(e,t,n){if(void 0!==t.minLength&&e.lengtht.maxLength){if(void 0!==t.maxLength&&void 0!==t.minLength&&t.minLength===t.maxLength)return{success:!1, error:n.exactRangeErrorMessage.format({value:m(t.minLength)})};if(void 0!==t.maxLength&&void 0!==t.minLength)return{success:!1,error:n.rangeErrorMessage.format({minimum:m(t.minLength),maximum:m(t.maxLength)})};if(void 0!==t.minLength)return{success:!1,error:n.minErrorMessage.format({minimum:m(t.minLength)})};if(void 0!==t.maxLength)return{success:!1,error:n.maxErrorMessage.format({maximum:m(t.maxLength)})}}return{success:!0}}(r,t,{exactRangeErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_EXACT_RANGE_ERROR,rangeErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_RANGE_ERROR,minErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_MINIMUM_ERROR,maxErrorMessage:p.Z.Messages.COMMAND_VALIDATION_STRING_MAXIMUM_ERROR}):{success:!0}:{success:!1}})),h(r,o.jw.BOOLEAN,(function(e){if("text"!==e.type)return{success:!1};var t=e.text.trim();return{success:d.ak.map((function(e){return e.displayName.toLowerCase()})).includes(t.toLowerCase())}})),h(r,o.jw.INTEGER,(function(e,t,n){ if("text"!==e.type||t.type!==o.jw.INTEGER)return{success:!1};var r=e.text.trim();if(0===r.length)return{success:!1};if(null!=t.choices)return t.choices.map((function(e){return e.displayName})).includes(r)?{success:!0}:{success:!1};var i=s.Z.getAutocompleteLastChoices(n,t.name);if(null!=i&&i.map((function(e){return e.displayName})).includes(r))return{success:!0};var a=Number(l.AS(c.default.locale,r));return!isNaN(a)&&Number.isInteger(a)&&Number.isSafeInteger(a)?v(a,t,p.Z.Messages.COMMAND_VALIDATION_NUMBER_RANGE_ERROR,p.Z.Messages.COMMAND_VALIDATION_NUMBER_MINIMUM_ERROR,p.Z.Messages.COMMAND_VALIDATION_NUMBER_MAXIMUM_ERROR):{success:!1}})),h(r,o.jw.NUMBER,(function(e,t,n){if("text"!==e.type||t.type!==o.jw.NUMBER)return{success:!1};var r=e.text.trim();if(0===r.length)return{success:!1};if(null!=t.choices)return t.choices.map((function(e){return e.displayName})).includes(r)?{success:!0}:{success:!1};var i=s.Z.getAutocompleteLastChoices(n,t.name);if(null!=i&&i.map((function(e){ return e.displayName})).includes(r))return{success:!0};var a=Number(l.AS(c.default.locale,r));return isNaN(a)||a>Number.MAX_SAFE_INTEGER||at.maxValue){if(null!=t.maxValue&&null!=t.minValue)return{success:!1,error:n.format({minimum:m(t.minValue),maximum:m(t.maxValue)})};if(null!=t.minValue)return{success:!1,error:r.format({minimum:m(t.minValue)})};if(null!=t.maxValue)return{success:!1,error:o.format({maximum:m(t.maxValue)})}}return{success:!0}}function m(e){return e.toLocaleString(p.Z.getLocale(),{useGrouping:!1})}const g=y;function O(e,t,n,r,u){ if(e.type===o.jw.ATTACHMENT){var c=a.Z.getUpload(r,e.name,i.d.ChannelMessage);return e.required&&null==c&&!u?{success:!1,error:p.Z.Messages.COMMAND_VALIDATION_REQUIRED_ERROR}:{success:!0}}var s=null!=t?(0,l.KF)({content:t},"content").trim():"";if(e.required&&""===s&&!u)return{success:!1,error:p.Z.Messages.COMMAND_VALIDATION_REQUIRED_ERROR};if(null==t)return{success:!0};if(""===s)return u?{success:!0}:{success:!1,error:(0,d.al)(e)};var f=t.length>1?{type:"text",text:s}:t[0],h=g[e.type](f,e,r,n);h.success||null!=h.error||(h.error=(0,d.al)(e));return h}},470856:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var r;!function(e){e[e.STREAM=0]="STREAM";e[e.VIDEO=1]="VIDEO"}(r||(r={}))},180306:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(473708);function o(e,t,n,o){return o?r.Z.Messages.CONSOLE_CONNECTING_DISABLED:n?r.Z.Messages.SUPPRESSED:t?r.Z.Messages.SERVER_MUTED_DIALOG_TITLE:e?r.Z.Messages.UNMUTE:r.Z.Messages.MUTE}},400572:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l}) ;var r=n(9134),o=n(255088),i=n(182306),a=n(229400);function l(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o.ZP.useExperiment({guildId:e.guild_id}).allowSoundboard,l=(0,a.f)(),u=(0,i.Z)(e),c=r.Z.useExperiment({guildId:e.guild_id},{autoTrackExposure:t}).isSharedCanvasEnabled;return n&&l&&u||c}},666305:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>m});var r=n(785893),o=(n(667294),n(707961)),i=n(213276),a=n(46106),l=n(761065),u=n(755380),c=n(202351),s=n(656645),f=n(736097);var d=n(734691),p=n(466317),h=n(2590),y=n(473708);var b=n(681192),v=n.n(b);function m(e){var t,n,b,m,g=e.onClose,O=e.renderOutputDevices,E=void 0!==O&&O,C=e.renderInputDevices,j=void 0!==C&&C,S=e.renderInputModes,I=void 0!==S&&S,_=e.renderInputVolume,w=void 0!==_&&_,x=e.renderOutputVolume,P=void 0!==x&&x,N=e.onSelect,A=(0,r.jsx)(o.sNh,{id:"voice-settings",label:y.Z.Messages.VOICE_SETTINGS,action:function(){return d.Z.open(h.oAB.VOICE)},icon:p.Z}),T=(t=(0,c.e7)([f.Z],(function(){ return Object.values(f.Z.getInputDevices())})),n=(0,c.e7)([f.Z],(function(){return f.Z.getInputDeviceId()})),t.map((function(e){var t=e.id,i=e.disabled,a=e.name;return(0,r.jsx)(o.k5B,{id:"input-".concat(t),group:"input-devices",disabled:i,label:a,checked:t===n,action:function(){return s.Z.setInputDevice(t)}},"input-".concat(t))}))),Z=(b=(0,c.e7)([f.Z],(function(){return Object.values(f.Z.getOutputDevices())})),m=(0,c.e7)([f.Z],(function(){return f.Z.getOutputDeviceId()})),b.map((function(e){var t=e.id,n=e.disabled,i=e.name;return(0,r.jsx)(o.k5B,{group:"output-devices",id:"output-".concat(t),disabled:n,label:i,checked:t===m,action:function(){return s.Z.setOutputDevice(t)}},"output-".concat(t))}))),M=(0,a.Z)(),R=(0,l.Z)(),L=(0,u.Z)();return(0,r.jsx)(i.Z,{object:h.qAy.CONTEXT_MENU,children:(0,r.jsxs)(o.v2r,{onSelect:N,className:v().menu,onClose:g,navId:"audio-device-context","aria-label":y.Z.Messages.AUDIO_DEVICE_ACTIONS,children:[j?(0,r.jsx)(o.kSQ,{label:y.Z.Messages.INPUT_DEVICE, children:T}):null,E?(0,r.jsx)(o.kSQ,{label:y.Z.Messages.OUTPUT_DEVICE,children:Z}):null,I?(0,r.jsx)(o.kSQ,{label:y.Z.Messages.FORM_LABEL_INPUT_MODE,children:M}):null,(0,r.jsxs)(o.kSQ,{children:[w?R:null,P?L:null,A]})]})})}},922189:(e,t,n)=>{"use strict";n.d(t,{Z:()=>$u});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(202351),s=n(418705),f=n(513328),d=n(707961),p=n(744564),h=n(247250),y=n(971402),b=n(842629),v=n(481008),m=n(944010),g=n(832763),O=n(269839),E=n(107364),C=n(26708);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return I(e)}function _(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){ var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e){var t=e.onView;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)("div",{className:Ce().popout,children:(0,r.jsxs)(d.xvT,{variant:"text-sm/medium",children:[Z.Z.Messages.CLIPS_CALL_TOOLTIP_TITLE,(0,r.jsx)("div",{children:(0,r.jsx)(ve.Z,{onClick:t,children:Z.Z.Messages.CLIPS_CALL_TOOLTIP_LINK_CTA}) })]})})})}function Ne(e){e.participant;var t=we(e,["participant"]),n=xe(o.useState(null),2),i=n[0],a=n[1],l=o.useRef(new f.V7),u=(0,c.e7)([he.Z],(function(){return he.Z.getClips().length})),s=(0,Q.Z)(u);o.useEffect((function(){if(null!=s&&u>s){a("recent");l.current.start(5e3,(function(){return a(null)}))}}),[u,s]);var p=function(){l.current.stop();a("gallery")};return(0,r.jsx)(d.yRy,{positionKey:"".concat(i,"-popout"),position:"top",renderPopout:function(e){if("recent"===i)return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(Pe,{onView:p})});if("gallery"===i)return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(Oe.Z,Ie({},e))});throw new Error("Invalid popout type!")},shouldShow:null!=i,onRequestClose:function(){return a(null)},children:function(e){var n=e.onClick,o=we(e,["onClick"]);return(0,r.jsx)(be.Z,Ie(_e(Ie({},o),{onClick:function(e){(0,ge.C1)();n(e)},label:Z.Z.Messages.CLIPS_SAVE,iconComponent:me.Z}),t))}})} var Ae=n(188344),Te=n(409125),Ze=n(122590),Me=n(566706),Re=n(627342),Le=n(50433),De=n(679450),ke=n(774209),Ue=n(496486),Be=n.n(Ue),Fe=n(620597),Ge=n(175293),He=n.n(Ge),Ve=n(417454),We=n.n(Ve),ze=n(32358),Ye=n.n(ze),Ke=null;function qe(e){var t=e.onDismiss,n=e.onAccept,o=e.popoutPosition,i=e.gameConsoleAccounts;u()(i.length>0,"Rendering ConsoleNUXTooltip without a game console account");null!=Ke&&null!=i.find((function(e){return e.type===Ke}))||(Ke=Be().shuffle(i)[0].type);var a=null,l=null;switch(Ke){case oe.ABu.XBOX:a=Z.Z.Messages.CONSOLE_NUX_TOOLTIP_BODY_XBOX;l=Ye();break;case oe.ABu.PLAYSTATION:case oe.ABu.PLAYSTATION_STAGING:a=Z.Z.Messages.CONSOLE_NUX_TOOLTIP_BODY_PS5;l=We()}return(0,r.jsx)(Fe.ZP,{header:Z.Z.Messages.CONSOLE_NUX_TOOLTIP_HEADER,content:a,asset:(0,r.jsx)("img",{src:l,alt:"",className:He().art}),onClick:n,onSecondaryClick:t,markAsDismissed:t,buttonCTA:Z.Z.Messages.CONSOLE_NUX_TOOLTIP_ACCEPT,secondaryButtonCTA:Z.Z.Messages.CONSOLE_NUX_TOOLTIP_DISMISS, caretPosition:"top"===o?Fe.DF.BOTTOM_LEFT:Fe.DF.TOP_LEFT})}var Qe=n(292571),Xe=n(302123),Je=n(550677),$e=n(860),et=n.n($e);function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t) ;var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lt(e){var t=e.onClose,n=e.channel,o=(0,Xe.Z)(n);return(0,r.jsx)(d.v2r,{onClose:t,onSelect:function(){return null},navId:"transfer-menu","aria-label":Z.Z.Messages.TRANSFER,children:o})}function ut(e){return null!=e?e===Je.YE.XBOX?Z.Z.Messages.XBOX_REMOTE_CONNECTED_RAW:Z.Z.Messages.PLAYSTATION_REMOTE_CONNECTED_RAW:Z.Z.Messages.CONSOLE_TRANSFER}function ct(e){var t,n=e.channel,i=e.showLeftDivider,a=void 0!==i&&i,l=it(e,["channel","showLeftDivider"]),u=(0,Ze.Z)(),f=(0,c.e7)([De.Z],(function(){var e ;return null===(e=De.Z.getSessionById(null!==(t=null==u?void 0:u.sessionId)&&void 0!==t?t:""))||void 0===e?void 0:e.clientInfo.os})),p=(0,c.e7)([Le.Z],(function(){return Le.Z.hasLayers()})),h=at((0,c.Wu)([Me.Z],(function(){return[Me.Z.getMode(n.id),Me.Z.getLayout(n.id)]})),2),y=h[0],b=h[1],v=(0,d.s9z)(d.JQI),m=(0,ke.Z)(),g=m.filter((function(e){return e.twoWayLink})),O=at(o.useState(!1),2),E=O[0],C=O[1];if(null==u&&0===m.length)return null;var j=oe.WtW.VOICE!==y&&[oe.AEg.NO_CHAT,oe.AEg.FULL_SCREEN].includes(b)?"top":"bottom",S=[];g.length>0&&S.push(s.z$.DONUT_DESKTOP_NUX);return(0,r.jsx)(Re.Z,{contentTypes:S,children:function(e){var t=e.visibleContent,o=e.markAsDismissed,i=t===s.z$.DONUT_DESKTOP_NUX,u=!p&&!v;return(0,r.jsx)(d.yRy,{position:j,spacing:i?16:void 0,positionKey:"".concat(y,":").concat(b),onRequestClose:function(){return C(!1)},shouldShow:(i||E)&&u,renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(ye.Z,{children:i?(0,r.jsx)(qe,{popoutPosition:j,onDismiss:o, onAccept:function(){o();C(!0)},gameConsoleAccounts:g}):(0,r.jsx)(lt,{onClose:function(){t()},channel:n})})},children:function(e){return(0,r.jsxs)(r.Fragment,{children:[a?(0,r.jsx)("div",{className:et().leftDivider}):null,(0,r.jsx)(be.Z,ot(rt({},e,l),{onClick:function(){return C(!0)},label:ut(f),iconComponent:(0,Qe.Z)(f)}))]})}})}})}var st=n(306263),ft=n(924066),dt=n(15338),pt=n(979197),ht=n(784426),yt=n(379991),bt=n(270662),vt=n(672380),mt=n(853158),gt=n(443660),Ot=n(74535),Et=n(901654),Ct=n(661782),jt=n(358500),St=n(155549),It=n.n(St),_t=n(913957),wt=n.n(_t),xt=n(587161),Pt=n.n(xt);function Nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Tt(e){Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Tt(e)}function Zt(e,t){ return!t||"object"!==Rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mt(e,t){Mt=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Mt(e,t)}var Rt=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Tt(e);if(t){var o=Tt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zt(this,n)}}var Dt=23,kt=17,Ut=26,Bt={SCALE_MIN:.7,SCALE_MAX:1,DURATION_IN:300,DURATION_OUT:170,EASING_IN:mt.Z.Easing.inOut(mt.Z.Easing.back()),EASING_OUT:mt.Z.Easing.quad},Ft=200,Gt=125,Ht=function(e){ !function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Mt(e,t)}(n,e);var t=Lt(n);function n(){Nt(this,n);var e;(e=t.apply(this,arguments)).scaleAnimation=new mt.Z.Value(0);e.spriteAnimation=new mt.Z.Value(0);e.spriteOpacity=new mt.Z.Value(0);e.widthAnimation=new mt.Z.Value(0);return e}var o=n.prototype;o.componentDidMount=function(){this.componentDidAppear()};o.componentDidAppear=function(){var e=this.scaleAnimation,t=this.widthAnimation;e.setValue(1);t.setValue(1)};o.componentWillEnter=function(e){var t=this.scaleAnimation,n=this.widthAnimation;t.setValue(0);n.setValue(0);mt.Z.parallel([mt.Z.timing(t,{toValue:1,duration:Bt.DURATION_IN,easing:Bt.EASING_IN}),mt.Z.timing(n,{toValue:1,duration:Ft})]).start(e)};o.componentWillLeave=function(e){ var t=this,n=t.scaleAnimation,r=t.spriteAnimation,o=t.spriteOpacity,i=t.widthAnimation;o.setValue(1);r.setValue(0);for(var a=[],l=0;le?d.EFr.SIZE_40:d.EFr.SIZE_80}(l,t.length),p=(0,c.e7)([Et.Z],(function(){return Et.Z.isFocused()})),h=t.map((function(e){if(e.type!==jt.fO.USER)return null;var t,o,a=e.user,l=e.voiceState,c=e.speaking,h=e.ringing;return(0,r.jsx)(Ht,{className:It().participant,width:(0,d.pxk)(f),theme:s,children:(0,r.jsx)(Ct.Z,{src:a.getAvatarURL(u,(0,d.pxk)(f),c&&p),size:f,muted:null!==(t=null==l?void 0:l.isVoiceMuted())&&void 0!==t&&t,deafen:null!==(o=null==l?void 0:l.isVoiceDeafened())&&void 0!==o&&o, speaking:c,ringing:h,onClick:function(t){return null==i?void 0:i(e,t)},onContextMenu:function(t){return null==n?void 0:n(e,t)}},e.id)},a.id)}));return(0,r.jsx)(gt.Z,{component:"div",className:a()(It().root,o),children:h})}var Wt=n(736818),zt=n(276985),Yt=n(716371),Kt=n(791271),qt=n(730380),Qt=n(788671),Xt=n.n(Qt);function Jt(e,t){return 0===t.length?Z.Z.Messages.CURRENTLY_IN_VOICE_EMPTY:1===t.length?Z.Z.Messages.CURRENTLY_IN_VOICE_1.format({a:(0,Kt.Z)(e,t[0])}):2===t.length?Z.Z.Messages.CURRENTLY_IN_VOICE_2.format({a:(0,Kt.Z)(e,t[0]),b:(0,Kt.Z)(e,t[1])}):t.length>2?Z.Z.Messages.CURRENTLY_IN_VOICE_2_N.format({a:(0,Kt.Z)(e,t[0]),b:(0,Kt.Z)(e,t[1]),n:t.length-2}):void 0}const $t=function(e){var t=e.participants,n=e.channel,i=e.hasConnectPermission,a=t.filter(jt.Io),l=(0,Yt.J)(n.guild_id),u=o.useCallback((function(){l?(0,zt.hk)(n.guild_id,(function(){return b.default.selectVoiceChannel(n.id)})):b.default.selectVoiceChannel(n.id)}),[n.id,n.guild_id,l]),c=4===a.length?2:3;return(0, r.jsxs)("div",{className:Xt().container,children:[(0,r.jsx)("div",{className:Xt().tiles,style:{maxWidth:168*c},children:a.slice(0,5).map((function(e){return(0,r.jsx)(qt.ZP,{participant:e,channel:n,className:Xt().tile,paused:!0,inCall:!0,noVideoRender:!0,inPopout:!1,width:48},e.id)}))}),(0,r.jsx)(d.X6q,{className:Xt().channelName,variant:"heading-xxl/semibold",children:n.name}),(0,r.jsx)("div",{className:Xt().participantsRow,children:(0,r.jsx)(d.xvT,{color:"header-secondary",variant:"text-sm/normal",children:Jt(n,a)})}),(0,r.jsx)(d.zxk,{disabled:!i,className:Xt().joinButton,color:i?d.zxk.Colors.GREEN:d.zxk.Colors.PRIMARY,onClick:u,size:d.zxk.Sizes.MEDIUM,children:i?Z.Z.Messages.JOIN_VOICE:Z.Z.Messages.CHANNEL_LOCKED_SHORT})]})};var en=n(316878),tn=n(520436),nn=n(776009),rn=n(622094),on=n.n(rn);function an(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ln(e){var t=e.height,o=(0,c.e7)([en.Z],(function(){ return en.Z.useReducedMotion}));return(0,r.jsxs)("div",{className:on().root,children:[(0,r.jsx)(nn.Z,{importData:function(){return n.e(8197).then(n.t.bind(n,573581,19)).then((function(e){return e.default}))},shouldAnimate:!o,className:a()(on().art,an({},on().hidden,t<=280))}),(0,r.jsx)(d.X6q,{className:on().header,variant:"heading-md/bold",children:Z.Z.Messages.PLAYSTATION_TRANSFERRING}),(0,r.jsx)(d.xvT,{variant:"text-md/normal",color:"header-secondary",children:Z.Z.Messages.CONSOLE_TRANSFERRING_SUBTITLE.format({onCancel:tn.s6})})]})}var un,cn=n(999357),sn=n(260561),fn=(0,sn.B)({kind:"user",id:"2023-03_pax_vc_tile_activities",label:"PAX VC Tile Activities",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enable PAX VC Tile Activities",config:{enabled:!0}}]});!function(e){e.CONTROL="CONTROL";e.ONE_OR_TWO_USERS="ONE_OR_TWO_USERS";e.ANY_NUMBER_OF_USERS="ANY_NUMBER_OF_USERS"}(un||(un={}));var dn=(0,sn.B)({kind:"user",id:"2023-01_vc_tile_activities_entry_point", label:"VC Tile Activities Entry Point",defaultConfig:{vcTileActivityExperimentType:un.CONTROL},treatments:[{id:1,label:"Enable one or two users VC Tile Activities Entry Point",config:{vcTileActivityExperimentType:un.ONE_OR_TWO_USERS}},{id:2,label:"Enable any number of users VC Tile Activities Entry Point",config:{vcTileActivityExperimentType:un.ANY_NUMBER_OF_USERS}}]}),pn=n(59732),hn=n(674748),yn=n(590070),bn=n(15970),vn=n(567403),mn=n(682776),gn=n(993137),On=n(483902),En=n(918176),Cn=n.n(En);function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;){var o=e,i=Math.floor(r/2);if(n(o+=i)){e=o+1;r-=i+1}else r=i}return e}function Pn(e,t,n){var r,o=Math.floor(t/25),i=t;if(e>25)r=xn(o,i,(function(e){var r=wn(e,t),o=function(e,t){var n=e/_n;return Math.ceil((t-n)/(8+n))+1}(e,n);return r*o>25}));else{r=xn(o,i,(function(r){ var o=wn(r,t),i=function(e,t){var n=e/_n;return Math.floor((t-n)/(8+n))+1}(r,n);return o*i>=e}));r-=1}var a=wn(r,t),l=function(e,t){return Math.ceil(t/e)}(a,e);return{tileWidth:r,columns:Math.max(1,a),rows:l}}function Nn(e){var t,n=e.className,i=e.children,l=e.keyExtractor,u=e.paddingTop,c=void 0===u?0:u,s=e.paddingBottom,f=void 0===s?0:s,d=In(o.useState({width:0,height:0}),2),p=d[0],h=d[1],y=p.width,b=p.height,v=null!==(t=null==i?void 0:i.length)&&void 0!==t?t:0,m=y-16,g=b-(c+f),O=o.useMemo((function(){return function(e,t,n){var r=Pn(e,t,n),o=r.rows,i=r.columns,a=r.tileWidth;return{tileStyle:{width:a},tileWidth:a,rows:o,columns:i}}(v,m,g)}),[v,m,g]),E=O.tileStyle,C=O.tileWidth,j=O.rows,S=O.columns,I=S+1,_=I*C+8*(I-1)<=y,w=Math.floor(C/_n)+8,x=Math.max(0,g-w*j)/2;return(0,r.jsx)(On.Z,{fade:!0,className:n,listPadding:[c+x,0,f+x-8,8],renderRow:function(e){var t,n=e*S;return(0,r.jsx)("div",{className:Cn().row, children:null===(t=null==i?void 0:i.slice(n,n+S))||void 0===t?void 0:t.map((function(e,t){var o,i,u=n+t;return(0,r.jsx)("div",{style:E,className:a()(Cn().tile,(i={},Sn(i,Cn().padColumn,_),Sn(i,Cn().noVerticalMargin,u>=(j-1)*S),Sn(i,Cn().noHorizontalMargin,(u+1)%S==0||u===v-1),i)),children:(0,r.jsx)(gn.Z,{className:Cn().tileSizer,aspectRatio:_n,children:e(C)})},null!==(o=null==l?void 0:l(u))&&void 0!==o?o:u)}))},e)},rowCount:j,rowCountBySection:[j],rowHeight:w,onResize:h})}var An=n(336194),Tn=n(579581),Zn=n(417290);function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Qn(e){ var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=qn(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",Kn(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var fr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop() ;a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||u?(0,r.jsx)(br,{channel:t,guild:n,width:o,inPopout:i,handleClose:a,userParticipantCount:l}):(0,r.jsx)(hr,{channel:t,guild:n,width:o,inPopout:i})}function pr(e){var t=e.channel,n=e.inPopout,o=e.handleClose,i=(0,de.Z)(se.Z.VC_TILE_ACTIVITY_SHELF_BUTTON),l=i.analyticsLocations,u=i.AnalyticsLocationProvider,c=(0,Tn.O)(),s=(0, d.dQu)(An.Z.colors.INTERACTIVE_NORMAL).hex();return(0,r.jsx)(u,{children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.ua7,{text:Z.Z.Messages.EMBEDDED_ACTIVITIES_START_AN_ACTIVITY,children:function(e){var o=e.onClick,i=sr(e,["onClick"]);return(0,r.jsx)(d.P3F,cr(ur({},i),{className:nr().clickableTile,onClick:function(){null==o||o();(0,Un.Z)({channel:t,guildId:t.guild_id,locationObject:c.location,openInPopout:n,analyticsLocations:l})},children:(0,r.jsx)($n.Z,{className:nr().root,children:(0,r.jsx)("div",{className:nr().iconContainer,children:(0,r.jsx)(Qn,{width:40,height:40})})})}))}}),(0,r.jsx)(d.P3F,{onClick:o,className:a()((0,Jn.Q)(oe.BRd.DARK),nr().shelfButtonCloseButton),children:(0,r.jsx)(Hn.Z,{width:24,height:24,className:nr().closeButtonIcon,backgroundColor:s})})]})})}function hr(e){var t=e.channel,i=e.guild,a=e.inPopout,l=e.width;o.useEffect((function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_VIEWED,{tile_type:"activity invite",n_participants:1})}),[]);var u=(0, Tn.O)(),c=(0,de.Z)(se.Z.VC_TILE_ACTIVITY_INVITE),s=c.analyticsLocations,f=c.AnalyticsLocationProvider;return(0,r.jsx)(f,{children:(0,r.jsxs)($n.Z,{className:nr().root,children:[l>400?(0,r.jsx)("img",{src:or(),className:nr().art,alt:Z.Z.Messages.EMBEDDED_ACTIVITIES_SHELF_CHARACTERS_ALT_TEXT}):null,(0,r.jsx)(d.xvT,{className:nr().heading,variant:"text-md/semibold",children:Z.Z.Messages.EMBEDDED_ACTIVITIES_VC_TILE_ENTRY_POINT_INVITE}),(0,r.jsxs)("div",{className:nr().buttonContainer,children:[(0,r.jsxs)(d.zxk,{size:d.zxk.Sizes.LARGE,color:d.zxk.Colors.PRIMARY,className:nr().button,innerClassName:nr().buttonContents,onClick:function(){(0,d.ZDy)(ar((function(){var e,o;return fr(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,cr(ur({},e),{guild:i,channel:t,source:oe.t4x.ACTIVITY_ENTRY_POINT_TILE}))}]}}))})),{contextKey:a?d.u1M:d.z1l})}, children:[(0,r.jsx)(Vn.Z,{width:16,height:16}),(0,r.jsx)(d.xvT,{variant:"text-sm/medium",children:Z.Z.Messages.INVITE_FRIENDS})]}),(0,r.jsxs)(d.zxk,{size:d.zxk.Sizes.LARGE,className:nr().button,innerClassName:nr().buttonContents,onClick:function(){(0,Un.Z)({channel:t,guildId:t.guild_id,locationObject:u.location,openInPopout:a,analyticsLocations:s})},children:[(0,r.jsx)(Wn.Z,{width:16,height:16}),(0,r.jsx)(d.xvT,{variant:"text-sm/medium",children:Z.Z.Messages.EMBEDDED_ACTIVITIES_ACTIVITY_ENTRY_POINT_TILE_CHOOSE_AN_ACTIVITY})]})]})]})})}var yr=function(e){var t=e.userParticipantCount,n=e.guildId,r=fn.useExperiment({}).enabled,i=function(e){var t=(0,Zn.Z)(e);return o.useMemo((function(){var e=[];t.forEach((function(t){var n,r=Rn(t,2)[1];(n=e).push.apply(n,Ln(r))}));var n=new Set;return e.filter((function(e){if(n.has(e.application.id))return!1;n.add(e.application.id);return!0}))}),[t])}(n);return r?i.filter((function(e){return[er.f9,er.PD,er.js].includes(e.application.id) })):2===t?i.filter((function(e){return[er.jT,er.f9,er.fE].includes(e.application.id)})):i.slice(0,3)};function br(e){var t=e.channel,n=e.guild,i=e.handleClose,l=e.width,u=e.userParticipantCount;o.useEffect((function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_VIEWED,{tile_type:"activity suggestion",n_participants:u})}),[]);var c=yr({userParticipantCount:u,guildId:n.id}),f=(0,de.Z)(se.Z.VC_TILE_ACTIVITY_SUGGESTION).AnalyticsLocationProvider;return(0,r.jsx)(f,{children:(0,r.jsxs)($n.Z,{className:nr().root,children:[l>480?(0,r.jsx)("img",{className:nr().art,src:or(),alt:Z.Z.Messages.EMBEDDED_ACTIVITIES_SHELF_CHARACTERS_ALT_TEXT}):null,l>300?(0,r.jsx)(d.xvT,{className:nr().heading,variant:l>550?"text-md/semibold":"text-sm/semibold",children:Z.Z.Messages.EMBEDDED_ACTIVITIES_VC_TILE_ENTRY_POINT_TITLE}):null,(0,r.jsx)("div",{className:a()(nr().activitiesContainer,lr({},nr().activitiesContainerSmol,l<=300)),children:c.map((function(e){return(0,r.jsx)(kn.Y,{channel:t, activityItem:e,aspectRatio:kn.Y.AspectRatio.SIXTEEN_BY_NINE,animatedDivClass:nr().activitySuggestion},e.application.id)}))}),(0,r.jsxs)(d.P3F,{className:nr().checkboxContainer,onClick:function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_CLOSED,{tile_type:"activity suggestion",close_type:"permanent",n_participants:u});(0,Bn.EW)(s.z$.VC_TILE_ACTIVITIES_ENTRY_POINT)},children:[(0,r.jsx)(Fn.Z,{}),(0,r.jsx)(d.xvT,{variant:"text-sm/medium",children:Z.Z.Messages.DONT_SHOW_AGAIN})]}),(0,r.jsx)(d.P3F,{className:nr().closeButtonContainer,onClick:function(){Xn.default.track(oe.rMx.VC_TILE_ACTIVITIES_ENTRY_POINT_CLOSED,{tile_type:"activity suggestion",close_type:"temporary",n_participants:u});i()},children:(0,r.jsx)(Gn.Z,{className:nr().closeButton})})]})})}var vr=(0,n(38736).Z)((function(){return{dismissedActivityEntryPointTileChannel:null}})),mr=n(988533),gr=n(129112),Or=n.n(gr),Er=n(222917),Cr=n.n(Er);function jr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return} l.done?t(u):Promise.resolve(u).then(r,o)}function Sr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){jr(i,r,o,a,l,"next",e)}function l(e){jr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ir(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _r(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var wr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1,j=dn.useExperiment({}).vcTileActivityExperimentType;l.isGuildVoice()&&dn.trackExposure({});var S=(0,c.e7)([ee.ZP],(function(){return ee.ZP.getEmbeddedActivitiesForChannel(l.id).length<=0})),I=(0, yn.N)(s.z$.VC_TILE_ACTIVITIES_ENTRY_POINT),_=(0,pn.KF)(l.id)!==pn.jy.CAN_LAUNCH,w=null!=v&&v===l.id,x=fn.useExperiment({}).enabled,P=t.map((function(e){return function(t){return(0,r.jsx)(qt.ZP,{participant:e,channel:l,className:Nr().tile,paused:h,onClick:n,onDoubleClick:i,onContextMenu:a,inCall:f,width:t,inPopout:y},e.id)}}));(0,hn.Z)({type:cn.nv.VIEW,name:cn.zs.CHANNEL_CALL_VIDEO_GRID_VIEW,properties:{total_participants:d,can_invite:O,is_afk_channel:E,channel_user_limit:l.userLimit}},{trackOnInitialLoad:!0},[]);null==b||E||(x?P.push((function(e){return(0,r.jsx)(dr,{channel:l,guild:b,width:e,inPopout:y,handleClose:g,userParticipantCount:m})})):!(j===un.ONE_OR_TWO_USERS&&2===m||j===un.ANY_NUMBER_OF_USERS&&m>=2)||!S||_||I||w?C&&1===m&&O&&([un.ONE_OR_TWO_USERS,un.ANY_NUMBER_OF_USERS].includes(j)&&S&&!_?P.push((function(e){return(0,r.jsx)(dr,{channel:l,guild:b,width:e,inPopout:y,handleClose:g,userParticipantCount:m})})):P.push((function(e){return(0,r.jsx)(xr,{width:e,channel:l,guild:b, inPopout:y})}))):P.push((function(e){return(0,r.jsx)(dr,{channel:l,guild:b,width:e,inPopout:y,handleClose:g,userParticipantCount:m})})));var N=o.useCallback((function(e){var n,r;return null!==(r=null===(n=t[e])||void 0===n?void 0:n.id)&&void 0!==r?r:"empty-tile"}),[t]);return(0,r.jsx)(Nn,{className:u,keyExtractor:N,paddingTop:64,paddingBottom:64,children:P})}var Tr=n(248088),Zr=n(498246),Mr=n(736097),Rr=n(630631),Lr=n(862762),Dr=n(341160),kr=n.n(Dr);function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:Date.now();switch(e.type){case jt.fO.ACTIVITY:return"\0".concat(e.sortKey);case jt.fO.HIDDEN_STREAM:case jt.fO.STREAM:return"".concat((0,Wr.qz)(e.userNick,e.user));case jt.fO.USER:var n,r="";e.speaking?r="":t-e.lastSpoke0){var m=[],g=!0,O=!1,E=void 0;try{for(var C,j=b[Symbol.iterator]();!(g=(C=j.next()).done);g=!0){var S=C.value,I=a.current[S.id];null!=I&&Ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&I.height>0?I.width/I.height:1.7777777777777777,L=m<=384,D=h&&!L,k=(0,Q.Z)(D),U=0;(Z||D)&&(U+=72);Z&&!D&&(U+=48);D&&(U+=68);var B,F=m-2*U,G=F*R,H=Math.floor(Math.min(v,G)/R),V=m>v/R+72+yo+8;B=!D&&!Z?40+Math.max(0,72-(m-H)/2):D?-16:-8;o.useEffect((function(){var e=setTimeout((function(){P(!1)}),250);return function(){clearTimeout(e)}}),[]);var W=(0,Tr.useSpring)({value:D?1:0,delay:V||!D?0:100,config:po(fo({},Tr.config.stiff),{clamp:!0}),onStart:function(){ return T(!0)},onChange:function(){return re.S.dispatch(oe.CkL.REMEASURE_TARGET)},onRest:function(){T(!1);re.S.dispatch(oe.CkL.REMEASURE_TARGET)}}),z=(0,Tr.useSpring)({value:D?1:0,config:po(fo({},Tr.config.stiff),{clamp:!0})}),Y=(0,Tr.useSpring)({value:G,config:po(fo({},Tr.config.stiff),{clamp:!0}),immediate:k===D&&z.value.idle}),K=(0,Tr.useSpring)({value:B,config:po(fo({},Tr.config.stiff),{clamp:!0})}),q=(0,Tr.useTransition)(d,{keys:function(e){return null==e?void 0:e.id},config:po(fo({},Tr.config.stiff),{clamp:!0}),initial:null,from:{opacity:0},enter:{opacity:1},leave:{opacity:0}}),X=o.useCallback((function(e){_(e);P(!1)}),[]),J=D||b?[]:function(e,t,n){return null==t||t.type===jt.fO.ACTIVITY?[]:[t.type===jt.fO.STREAM?e.find((function(e){return e.type===jt.fO.USER&&e.id===(null==t?void 0:t.user.id)&&e.id!==n&&(0,Vr.Z)(e)})):null,t.type===jt.fO.USER?e.find((function(e){return e.type===jt.fO.STREAM&&e.user.id===(null==t?void 0:t.user.id)&&null!=e.streamId })):null,t.id!==n?e.find((function(e){return e.type===jt.fO.USER&&e.id===n&&(0,Vr.Z)(e)})):null].filter(Hr.lm)}(l,d,j),$=ro(v,u),ee=$.visibleParticipants,te=$.participantTileWidth;return(0,r.jsxs)("div",{className:a()(uo().root,ao().flexCenter,y),children:[(0,r.jsxs)("div",{className:uo().tileWrapper,style:{opacity:M&&x?0:1},children:[(0,r.jsxs)(Tr.animated.div,{className:uo().videoFrame,style:{top:z.value.to((function(e){return-e*yo/2}))},children:[(0,r.jsx)(Tr.animated.div,{style:{width:Y.value},className:uo().videoWrapper,children:(0,r.jsx)(gn.Z,{className:ao().videoSizer,aspectRatio:R,children:q((function(e,o,a){var l=a.key;return null!=o?(0,r.jsx)(Tr.animated.div,{className:ao().videoWrapperAnimated,style:e,children:(0,r.jsx)(qt.ZP,{focused:!0,noBorder:G>=v||F>=m,channel:f,className:ao().focusedVideo,videoComponent:C,paused:b,width:v,participant:o,onClick:t,onDoubleClick:i,onContextMenu:n,onVideoResize:X,inCall:s,inPopout:E})},l):null}))}) }),L||g===oe.AEg.MINIMUM||g===oe.AEg.NORMAL?null:(0,r.jsx)(Tr.animated.div,{className:a()(uo().actionRow,so({},uo().idle,O)),style:{bottom:K.value},children:(0,r.jsx)(Zr.Z,{channelId:f.id,isParticipantsOpen:h,isVertical:!0})})]}),(0,r.jsx)(Tr.animated.div,{className:uo().participantsWrapperAnimated,style:{translateY:W.value.to((function(e){return e*yo/2})),opacity:W.value,visibility:W.value.to((function(e){return 0===e?"hidden":"visible"}))},children:(0,r.jsx)(oo,{channel:f,onClick:t,onContextMenu:n,onDoubleClick:i,participants:ee,participantTileWidth:te,selectedParticipantId:d.id,inCall:s,paused:b||A||!h,popoutWindow:c})})]}),J.length>0?(0,r.jsx)(Gr,{onContextMenuParticipant:n,width:v,height:m,channel:f,participants:J}):null]})}var vo=n(153996);function mo(e){var t=e.width,n=e.className,o=e.channelId,i=e.noArt,a=void 0!==i&&i;return(0,r.jsx)(mr.Z,{artURL:vo,noArt:a,size:(0,mr.L)(t),className:n,callToAction:Z.Z.Messages.STREAM_SHOW_ALL_PARTICIPANTS, header:Z.Z.Messages.STREAM_PARTICIPANTS_HIDDEN.format(),onCTAClick:function(){return h.Z.toggleVoiceParticipantsHidden(o,!1)}})}const go=(0,vt.Z)((function(e){var t=e.participants,n=e.filteredParticipants,i=e.selectedParticipant,l=e.participantsVersion,u=e.layout,c=e.onSelectParticipant,s=e.onContextMenuParticipant,f=e.onFullscreenParticipant,d=e.channel,p=e.hasConnectPermission,h=e.className,y=e.inCall,b=e.showParticipants,v=void 0===b||b,m=e.paused,g=void 0!==m&&m,O=e.width,C=e.height,j=e.idle,S=e.mode,I=e.popoutWindow,_=e.awaitingRemoteSessionInfo;o.useEffect((function(){re.S.dispatch(oe.CkL.REMEASURE_TARGET)}),[O,C]);var w=o.useMemo((function(){return n.filter((function(e){return e.type!==jt.fO.ACTIVITY||!e.participants.has(Wt.default.getId())}))}),[n,l]);if((null==_?void 0:_.channelId)===d.id)return(0,r.jsx)(ln,{height:C});if((null==d?void 0:d.isGuildVocal())&&!y)return(0,r.jsx)($t,{channel:d,participants:t,hasConnectPermission:p});if(S===oe.WtW.VOICE)return(0,r.jsx)(Vt,{ guildId:d.guild_id,width:O,className:ao().voiceCallWrapper,participants:t,onContextMenu:s});n=y?n:t;return null==i?0===n.length?(0,r.jsx)(mo,{className:a()(ao().videoGrid,ao().hiddenParticipants),channelId:d.id,width:O}):(0,r.jsx)(E.Z,{className:ao().videoGridWrapper,justify:E.Z.Justify.CENTER,align:E.Z.Align.CENTER,children:(0,r.jsx)(Ar,{channel:d,className:ao().videoGrid,participants:w,totalNumberOfParticipants:t.length,onClick:c,onDoubleClick:f,onContextMenu:s,paused:g,inCall:y})}):(0,r.jsx)(bo,{onFullscreenParticipant:f,onContextMenuParticipant:s,onSelectParticipant:c,selectedParticipant:i,filteredParticipants:w,participants:t,popoutWindow:I,className:h,idle:j,height:C,width:O,layout:u,inCall:y,channel:d,showParticipants:v})}));var Oo,Eo=n(173388),Co=n(714602),jo=n(636398),So=n(299836),Io=n(729139),_o=n(613665),wo=n(692432),xo=n.n(wo);function Po(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function No(e,t){ if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}!function(e){e[e.UP=0]="UP";e[e.DOWN=1]="DOWN"}(Oo||(Oo={}));function Ao(e){var t=e.direction,n=e.className,o=No(e,["direction","className"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&void 0!==arguments[0]?arguments[0]:1;console.log("[callscope] Issue marker pressed.");p.Z.dispatch({type:"RTC_LOG_MARKER",marker:e})}();(0,d.ZDy)((function(){return Promise.resolve((function(e){return(0,r.jsx)(ua,{onClose:n})})) }),{contextKey:t,modalKey:fa})}),[t,n]);return Qi.shouldShowUI()?(0,r.jsx)(be.Z,{onClick:i,iconComponent:Li.Z,"aria-label":Z.Z.Messages.NOTICE_CALLSCOPE_MARK_ISSUE,className:e.className,label:Z.Z.Messages.NOTICE_CALLSCOPE_MARK_ISSUE}):(0,r.jsx)(r.Fragment,{})}var pa=n(544475),ha=n(607072),ya=n(667286),ba=n(353945);function va(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function ma(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ga(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{} ;var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Oa(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=ga(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",ma(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ja(e){var t=e.channelId,n=Ca(e,["channelId"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Pa(e){var t=e.className,n=e.count;return(0,r.jsxs)("div",{ className:a()(_a().root,_a().comboIcon,t),children:[(0,r.jsx)(Sa.Z,{className:_a().icon}),(0,r.jsx)(d.xvT,{color:"none",className:_a().count,variant:"text-md/normal",children:n})]})}function Na(e){var t=e.count,n=xa(e,["count"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ma(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Za(e,["width","height","color","foreground"]);return(0, r.jsxs)("svg",Ta(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ka(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Da(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",La(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Fa(e){var t=e.channelId,n=e.isHorizontal,o=Ba(e,["channelId","isHorizontal"]);return(0,r.jsx)(be.Z,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Vl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bl(e,t)}(e,t)||function(){ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wl(e){var t=e.renderPopout,n=e.onMouseEnter,i=e.onMouseLeave,a=e.closePopout,l=e.isHovered,u=Hl(e,["renderPopout","onMouseEnter","onMouseLeave","closePopout","isHovered"]);o.useEffect((function(){l||a()}),[a,l]);return(0,r.jsx)("div",{onMouseEnter:n,onMouseLeave:i,children:t(Gl({closePopout:a},u))})}function zl(e){var t=e.renderPopout,n=e.children,i=function(e){"focus"===e.type||s||b()},a=function(){s||v()},l=function(e){m();f(!s);h&&!s||e()},u=(0,J.bp)(),c=Vl(o.useState(!1),2),s=c[0],f=c[1],p=(0,Ll.Z)(200,300),h=p.isHovered,y=p.setIsHovered,b=p.onMouseEnter,v=p.onMouseLeave,m=p.cancelTimers,g=h||s,O=u===oe.IlC.POPOUT;return(0,r.jsx)(d.yRy,{shouldShow:g,animationPosition:"top",position:"top",align:O?"left":"center",spacing:16,onRequestClose:function(){y(!1);f(!1)},renderPopout:function(e){return(0,r.jsx)(Wl,Gl({ isHovered:g,onFocus:function(){return f(!0)},onMouseEnter:b,onMouseLeave:a,renderPopout:t},e))},children:function(e){var t=e.onClick,o=e.onKeyDown;return(0,r.jsx)(r.Fragment,{children:n({onClick:function(e){return l((function(){return t(e)}))},onKeyDown:function(e){return function(e,t){e.key!==Dl.vn.ENTER&&e.key!==Dl.vn.SPACE||l((function(){return t(e)}))}(e,o)},className:Ul().actionBarButton,onMouseEnter:i,onMouseLeave:a,isActive:g})})}})}function Yl(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Kl(){Kl=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tu(e){ var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=eu(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",$l(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function fu(e){var t=e.channel,n=(0,c.e7)([lu.Z],(function(){return lu.Z.effectCooldownEndTime})),i=o.useMemo((function(){return null!=n?(n.getTime()-Date.now())/1e3:0}),[n]),a=(0,iu.Z)(null!=n?n:new Date).seconds,l=a>0;return(0,r.jsx)(zl,{renderPopout:function(e){var n=e.closePopout,o=e.onFocus;return(0,r.jsx)(ye.Z,{children:(0,r.jsx)(uu.Z,{channel:t,closePopout:n,onFocus:o})})},children:function(e){var t=e.onMouseEnter,n=su(e,["onMouseEnter"]);return(0,r.jsx)(au.Z,function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue} if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?(0,r.jsx)(ai.mA,{className:Nu().badge,count:o}):null]}):null,(null==c?void 0:c.type)===jt.fO.STREAM||(null==c?void 0:c.type)===jt.fO.ACTIVITY?(0,r.jsx)(jo.Z,{children:(0, r.jsx)(cl.Z,{className:a()(Nu().leftTrayIcon,Nu().viewersButton),participant:c,maxVisibleUsers:4,guildId:i.getGuildId(),channelId:i.id,disableInteraction:e.inPopout||n===oe.AEg.FULL_SCREEN})}):null,(0,r.jsx)(ct,{themeable:e.viewProperties.useTheme,className:Nu().leftTrayIcon,channel:i})]})};e.renderBottomRight=function(){var t=e.props,n=t.popoutWindow,o=t.popoutWindowAlwaysOnTop,i=t.currentUserId,a=t.selectedParticipant,l=t.clipsEnabled,u=e.viewProperties,c=u.canFullscreen,s=u.canStayOnTop,f=u.canPopout,d=u.useTheme;return(0,r.jsxs)(r.Fragment,{children:[l&&(null==a?void 0:a.type)===jt.fO.STREAM?(0,r.jsx)(Ne,{className:Nu().rightTrayIcon,participant:a}):null,null!=a&&a.type!==jt.fO.ACTIVITY&&a.user.id!==i?(0,r.jsx)(ko.Z,{context:(0,fi.Z)(a.type),userId:a.user.id,currentWindow:e.inPopout?null!=n?n:void 0:window,sliderClassName:Nu().volumeSlider,className:Nu().rightTrayIcon}):null,s?(0,r.jsx)(Do.Z,{className:Nu().rightTrayIcon,popoutWindowAlwaysOnTop:o,onToggleStayOnTop:e.handleStayOnTop }):null,f?(0,r.jsx)(Lo.Z,{themeable:d,popoutOpen:e.popoutOpen,className:Nu().rightTrayIcon,onOpenPopout:e.handleOpenPopout,onClosePopout:e.handleClosePopout}):null,c?(0,r.jsx)(Mo.Z,{themeable:d,node:e.getRootNode(),guestWindow:n,className:Nu().rightTrayIcon,onClick:e.handleFullScreen}):null]})};e.renderChatButton=function(t){var n=t.className,o=t.showingClassName,i=e.props,a=i.channel,l=i.chatOpen,u=i.inCall;return l||e.popoutOpen&&!e.inPopout&&u?null:(0,r.jsx)(Zo.T,{channelId:a.id,className:n,showingClassName:o})};e.renderChatToasts=function(){var t=e.props,n=t.showChatToasts,o=t.chatOpen,i=t.channel,a=t.inCall;return!n||o||e.popoutOpen&&!e.inPopout&&a?null:(0,r.jsx)(pi.ZP,{children:(0,r.jsx)(So.Z,{className:Nu().chatToasts,channelId:i.id})})};e.renderVoiceChannelEffects=function(){var t=e.props.channel;return(0,r.jsx)(Il,{children:(0,r.jsx)(Jo,{channelId:t.id})})};e.renderHeader=function(){ var t=e.props,n=t.renderExternalHeader,o=t.channel,i=t.guild,a=t.appContext,l=t.chatOpen,u=t.inCall,c=e.viewProperties,s=c.useExternalHeader,f=c.canSelectRegion;return c.renderHeader?(0,r.jsxs)(jo.Z,{children:[(0,r.jsx)("div",{className:Nu().headerWrapper,children:s?null==n?void 0:n():(0,r.jsx)(ml,{channel:o,guild:i,appContext:a,inCall:u,isChatOpen:l||e.popoutOpen&&!e.inPopout&&u,exitFullScreen:e.maybeLeaveFullScreen})}),f?e.renderRegionSelect():null]}):null};return e}var l=i.prototype;l.getRootNode=function(){var e,t;return(null!==(t=null===(e=this.props.popoutWindow)||void 0===e?void 0:e.window)&&void 0!==t?t:window).document.getElementById("app-mount")};l.componentDidMount=function(){var e=this.props,t=e.channel,n=e.layout;this.currentDocument.addEventListener(si.NO,this.handleFullScreenChange);Xn.default.track(oe.rMx.VIDEO_LAYOUT_TOGGLED,Uu({video_layout:this.inPopout?"popout":n},(0,fe.AB)(t.id)))};l.componentWillUnmount=function(){this._videoBackgroundTooltipTimeout.stop() ;this.currentDocument.removeEventListener(si.NO,this.handleFullScreenChange);this.inPopout&&(0,ui.id)()||this.maybeLeaveFullScreen()};l.componentDidUpdate=function(e){var t=this,n=this.props,r=n.participantsOpen,o=n.inCall,i=n.mode,a=n.layout,l=this.getRootNode();null!=l&&e.mode===oe.WtW.VIDEO&&i===oe.WtW.VOICE&&(0,si.rB)(l,this.currentDocument)&&(0,si.Pr)(l,this.currentDocument);if(e.participantsOpen!==r||a!==e.layout){var u;null===(u=this._contentRef.current)||void 0===u||u.triggerResize()}e.inCall&&!o&&this.inPopout&&p.Z.wait((function(){return t.handleClosePopout()}))};l.renderContent=function(e){var t=this.props,n=t.selectedParticipant,o=t.inCall,i=t.hasConnectPermission,a=t.mode,l=t.popoutWindow,u=t.participantsOpen,c=t.participants,s=t.filteredParticipants,f=t.participantsVersion,d=t.channel,p=t.guild,h=t.layout,y=t.forceShowControls,b=t.awaitingRemoteSessionInfo,v=h===oe.AEg.MINIMUM,m=v||h===oe.AEg.NORMAL,g=o&&a===oe.WtW.VIDEO;this._lastIdleProps=e;return(0,r.jsx)(Io.Z,Bu(Uu({ renderHeader:this.renderHeader,renderBottomLeft:this.renderBottomLeft,renderBottomCenter:this.renderBottomCenter,renderBottomRight:this.renderBottomRight,renderChatButton:d.isGuildVoice()?this.renderChatButton:void 0,renderChatToasts:d.isGuildVoice()?this.renderChatToasts:void 0,renderVoiceChannelEffects:this.renderVoiceChannelEffects},e),{screenMessage:this.screenMessage,disableGradients:v,idle:!y&&o&&!v&&e.idle,children:o&&this.popoutOpen&&!this.inPopout?null:(0,r.jsx)(go,{ref:this._contentRef,inCall:o,paused:this.paused,channel:d,hasConnectPermission:i,guild:p,participants:c,filteredParticipants:s,participantsVersion:f,selectedParticipant:g?n:null,layout:h,idle:e.idle,mode:a,onSelectParticipant:this.handleSelectParticipant,onContextMenuParticipant:this.handleContextMenu,showParticipants:u&&!m,popoutWindow:this.inPopout?l:null,awaitingRemoteSessionInfo:b})}))};l.render=function(){ var e,t=this,n=this.props,o=n.layout,i=n.channel,l=n.guild,u=n.mode,c=n.chatOpen,s=n.appContext,f=n.maxSidebarWidth,d=n.maxHeight,p=n.inCall,h=this.state.resizedHeight,y=u===oe.WtW.VIDEO,b=o!==oe.AEg.NO_CHAT&&o!==oe.AEg.FULL_SCREEN&&null!=d;return(0,r.jsxs)("div",{className:a()(Nu().wrapper,qu[o],Qu[s],(e={},Du(e,Nu().poppedOut,this.popoutOpen&&!this.inPopout&&o!==oe.AEg.NO_CHAT&&i.isPrivate()),Du(e,Nu().video,y),Du(e,Nu().chatSidebarOpen,c),e)),ref:function(e){t._wrapperRef.current=e;t.props.wrapperRef.current=e},style:b&&null!=h?{minHeight:200,maxHeight:d,height:h}:void 0,children:[(0,r.jsx)("div",{className:a()(Nu().callContainer,Du({},(0,Jn.Q)(oe.BRd.DARK),y)),ref:function(e){t._callContainerRef.current=e;t.props.callContainerRef.current=e},children:(0,r.jsx)(Co.ZP,{timeout:2e3,children:function(e){return t.renderContent(e)}})}),b&&(0,r.jsx)(Xu,{maxHeight:d,resizableNode:this._wrapperRef,onResize:this.handleCallResize,onResizeEnd:this.props.updateStoredCallHeaderHeight}),(0, r.jsx)("div",{className:Nu().channelChatWrapper,ref:function(e){t._channelChatRef.current=e;t.props.channelChatRef.current=e},children:c&&(!p||!this.popoutOpen||this.inPopout)&&(0,r.jsx)(hi.Z,{channel:i,guild:l,maxWidth:f})})]})};!function(e,t,n){t&&Lu(e.prototype,t);n&&Lu(e,n)}(i,[{key:"nativePopoutSupported",get:function(){return ui.FB&&ci.default.supportsFeature(oe.eRX.POPOUT_WINDOWS)}},{key:"popoutSupported",get:function(){return!ui.FB||this.nativePopoutSupported}},{key:"popoutOpen",get:function(){var e=this.props.popoutWindow;return null!=e&&!e.closed}},{key:"currentDocument",get:function(){var e=this.props.popoutWindow;return null!=e&&this.popoutOpen&&this.inPopout?e.document:document}},{key:"screenMessage",get:function(){return this.popoutOpen&&!this.inPopout&&this.props.inCall?{mainText:Z.Z.Messages.POPOUT_PLAYER_OPENED}:null}},{key:"paused",get:function(){return this.popoutOpen&&!this.inPopout}},{key:"inPopout",get:function(){return this.props.appContext===oe.IlC.POPOUT}},{ key:"viewProperties",get:function(){var e=this.props,t=e.layout,n=e.mode,r=e.channel,o=e.inCall,i=n===oe.WtW.VIDEO&&o&&!(this.popoutOpen&&!this.inPopout),a=n===oe.WtW.VIDEO&&o&&this.popoutSupported,l=n!==oe.WtW.VOICE&&r.isPrivate()&&!this.inPopout&&o,u=r.type===oe.d4z.GUILD_VOICE,c=t===oe.AEg.MINIMUM||t===oe.AEg.NORMAL,s=this.inPopout&&this.nativePopoutSupported,f={renderHeader:!0,useTheme:!1,useExternalHeader:c,canInvite:u,canPopout:a,canFullscreen:i,canSelectRegion:r.isPrivate(),canChangeLayout:l,canStayOnTop:s};if(!o)return Bu(Uu({},f),{canFullscreen:i,useTheme:!0});switch(t){case oe.AEg.FULL_SCREEN:return Bu(Uu({},f),{canPopout:!this.inPopout&&this.popoutOpen&&f.canPopout});case oe.AEg.MINIMUM:return Bu(Uu({},f),{canPopout:!1,useTheme:!0});case oe.AEg.NO_CHAT:case oe.AEg.NORMAL:return Uu({},f)}}}]);return i}(o.PureComponent);const $u=function(e){var t,n,i=e.channel,a=e.renderExternalHeader,l=e.maxHeight,u=(0,q.Z)(),f=u.width,p=void 0===f?0:f,h=u.ref,y=(0, q.Z)(),b=y.width,v=void 0===b?0:b,g=y.height,O=void 0===g?0:g,E=y.ref,C=(0,q.Z)().ref,j=(0,J.bp)(),S=(0,Ze.Z)(),I=(0,c.e7)([ri.Z],(function(){return(null!==(t=null==S?void 0:S.channelId)&&void 0!==t?t:ri.Z.getVoiceChannelId())===i.id})),_=(0,c.cj)([Me.Z],(function(){var e=j===oe.IlC.POPOUT,t=Me.Z.getMode(i.id);e&&(t=oe.WtW.VIDEO);var n=t===oe.WtW.VIDEO?Me.Z.getLayout(i.id,j):oe.AEg.MINIMUM;e&&n!==oe.AEg.FULL_SCREEN&&(n=oe.AEg.NO_CHAT);return{mode:t,layout:n,selectedParticipant:t!==oe.WtW.VOICE?Me.Z.getSelectedParticipant(i.id):null,participants:Me.Z.getParticipants(i.id),filteredParticipants:Me.Z.getFilteredParticipants(i.id),participantsOpen:Me.Z.getParticipantsOpen(i.id),chatOpen:Me.Z.getChatOpen(i.id),participantsVersion:Me.Z.getParticipantsVersion(i.id)}}),[i.id,i.type,I]),w=_.participants,x=_.filteredParticipants,P=_.participantsVersion,N=_.mode,A=_.layout,T=_.participantsOpen,M=_.chatOpen,R=_.selectedParticipant,L=(0,c.Wu)([$o.Z],(function(){return $o.Z.getAllActiveStreams() })),D=(0,c.cj)([$o.Z],(function(){return{selectedStream:null!=R?$o.Z.getActiveStreamForStreamKey(R.id):null}}),[R]).selectedStream,k=(0,c.e7)([vn.Z],(function(){return vn.Z.getGuild(i.getGuildId())})),U=(0,c.e7)([ti.Z],(function(){return ti.Z.getCall(i.id)}),[i.id]),B=(0,c.e7)([ni.ZP],(function(){return ni.ZP.getMentionCount(i.id)}),[i.id]),F=(0,c.e7)([Wt.default],(function(){return Wt.default.getId()})),G=(0,c.cj)([pt.Z],(function(){return{popoutWindow:pt.Z.getWindow(oe.KJ3.CHANNEL_CALL_POPOUT),popoutWindowAlwaysOnTop:pt.Z.getIsAlwaysOnTop(oe.KJ3.CHANNEL_CALL_POPOUT)}})),H=G.popoutWindow,V=G.popoutWindowAlwaysOnTop,W=(0,c.e7)([mn.Z],(function(){return mn.Z.can(oe.Plq.CONNECT,i)})),z=(0,c.e7)([ei.Z],(function(){return ei.Z.getToastsEnabled(i.id)})),Y=(0,c.e7)([Te.Z],(function(){return Te.Z.getAwaitingRemoteSessionInfo()})),X=(0,c.e7)([yt.ZP],(function(){return yt.ZP.callHeaderHeight})),ne=o.useCallback((function(e){m.ZP.updatedUnsyncedSettings({callHeaderHeight:e}) }),[]),re=null!==(n=null==k?void 0:k.id)&&void 0!==n?n:null,ie=(0,te.Z)(re,i.id),ae=(0,c.e7)([$.Z],(function(){return $.Z.getFetchState()}),[]),le=(0,Q.Z)(ae);o.useEffect((function(){"errored"===ae&&"errored"!==le&&(0,d.CFj)((0,d.Yz2)(Z.Z.Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR,d.pCN.FAILURE))}),[ae,le]);var ue=(0,c.e7)([ee.ZP],(function(){return null!=ee.ZP.getSelfEmbeddedActivityForChannel(i.id)}),[i]);ce();o.useEffect((function(){var e,t=!1,n=null,r=(e=Mu((function(){return Ku(this,(function(e){switch(e.label){case 0:return I&&N===oe.WtW.VIDEO?[4,ci.default.blockDisplaySleep()]:[3,2];case 1:n=e.sent();t&&null!=n&&ci.default.unblockDisplaySleep(n);e.label=2;case 2:return[2]}}))})),function(){return e.apply(this,arguments)});r();return function(){null!=n?ci.default.unblockDisplaySleep(n):t=!0}}),[I,N]);var fe=(0,di.Z)(i,!0),ye=(0,Ae.bn)(s.z$.CALL_CHAT_BUTTON_TEXT_IN_VOICE_COACH_MARK),be=(0,de.Z)(se.Z.CHANNEL_CALL).AnalyticsLocationProvider,ve=p-550,me=(0, pe.G)(),ge=(0,c.e7)([he.Z],(function(){return he.Z.getSettings().clipsEnabled}));return(0,r.jsx)(be,{children:(0,r.jsx)(K.Z,{page:oe.ZY5.CHANNEL_CALL,children:(0,r.jsx)(pi.B2,{children:(0,r.jsxs)(Sl,{children:[(0,r.jsx)(Ju,{channel:i,guild:k,hasConnectPermission:W,participantsOpen:T,renderExternalHeader:a,appContext:j,call:U,popoutWindow:H,popoutWindowAlwaysOnTop:V,mentionCount:B,selectedStream:D,mode:N,inCall:I,participants:w,filteredParticipants:x,participantsVersion:P,layout:A,chatOpen:M,maxSidebarWidth:ve,shouldUseVoiceEffectsActionBar:fe,currentUserId:F,selectedParticipant:R,allActiveStreams:L,useNewInviteButton:ie,connectedToEmbeddedActivity:ue,showChatToasts:z,storedCallHeaderHeight:X,updateStoredCallHeaderHeight:ne,wrapperRef:h,callContainerDimensions:{width:v,height:O},callContainerRef:E,channelChatRef:C,width:p,maxHeight:l,forceShowControls:ye,awaitingRemoteSessionInfo:Y,clipsEnabled:me&&ge}),!i.isPrivate()&&(0,r.jsx)(jl,{}),(0,r.jsx)(pi.H_,{})]})})})})}},509097:(e,t,n)=>{ "use strict";n.d(t,{H_:()=>l,B2:()=>u,ZP:()=>c});var r=(0,n(707961).Xvx)("ChannelCallChat"),o=r.Layer,i=r.LayerContainer,a=r.LayerProvider,l=i,u=a;const c=o},753705:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=n(667294),i=n(418705),a=n(247250),l=n(764079),u=n(973553),c=n(341305),s=n(281808),f=n(896490),d=n(284610),p=n(921122),h=n(189865),y=n(373438),b=n(930948),v=n(509097),m=n(2590),g=n(458947),O=n(473708),E=n(75627),C=n.n(E);const j=function(e){var t=e.channel,n=e.guild,E=e.maxWidth;o.useEffect((function(){(0,f.EW)(i.z$.CALL_CHAT_BUTTON_TEXT_IN_VOICE_COACH_MARK,{dismissAction:g.L.AUTO})}),[]);var j=o.useCallback((function(){a.Z.updateChatOpen(t.id,!1);b.S.safeDispatch(m.CkL.FOCUS_CHAT_BUTTON)}),[t.id]),S=(0,r.jsx)(y.ZP.Icon,{icon:h.Z,tooltip:O.Z.Messages.CLOSE,onClick:j});return(0,r.jsxs)(u.Z,{sidebarType:u.y.CallChatSidebar,maxWidth:E,floatingLayer:v.ZP,children:[(0,r.jsx)(c.Z,{channel:t,draftType:d.d.ChannelMessage}),(0,r.jsxs)(y.ZP,{toolbar:S, "aria-label":O.Z.Messages.CHANNEL_HEADER_BAR_A11Y_LABEL,children:[(0,r.jsx)(y.ZP.Icon,{icon:p.Z,disabled:!0,"aria-label":O.Z.Messages.VOICE_CHAT_TEXT_CHANNEL}),(0,r.jsx)(y.ZP.Title,{children:t.name})]}),(0,r.jsx)("div",{className:C().chat,children:(0,r.jsx)(l.Z,{channel:t,guild:n,chatInputType:s.I.SIDEBAR},t.id)})]})}},496388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(441143)),i=n.n(o),a=n(202351),l=n(707961),u=n(213276),c=n(473903),s=n(656645),f=n(736097);var d=n(289150),p=n(2590),h=n(473708);function y(e){var t,n,o=e.onClose,y=e.onSelect,b=(0,a.e7)([c.default],(function(){var e=c.default.getCurrentUser();i()(null!=e,"VideoDeviceMenu: currentUser cannot be undefined");return e})),v=(t=(0,a.e7)([f.Z],(function(){return Object.values(f.Z.getVideoDevices())})),n=(0,a.e7)([f.Z],(function(){return f.Z.getVideoDeviceId()})),t.map((function(e){var t=e.id,o=e.disabled,i=e.name;return(0,r.jsx)(l.k5B,{group:"video-devices",id:"video-device-".concat(t),disabled:o, label:i,checked:t===n,action:function(){return s.Z.setVideoDevice(t)}},"video-device-".concat(t))}))),m=(0,d.Z)(b.id);return(0,r.jsx)(u.Z,{object:p.qAy.CONTEXT_MENU,children:(0,r.jsxs)(l.v2r,{onClose:o,navId:"video-device-context","aria-label":h.Z.Messages.FORM_LABEL_VIDEO_DEVICE,onSelect:y,children:[(0,r.jsx)(l.kSQ,{label:h.Z.Messages.FORM_LABEL_VIDEO_DEVICE,children:v}),(0,r.jsx)(l.kSQ,{children:m})]})})}},668269:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(707961)),i=n(656645),a=n(895303),l=n(126976),u=n(473708);function c(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,l,"next",e)}function l(e){c(i,r,o,a,l,"throw",e)}a(void 0)}))}}function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){ for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(944010)),i=n(895303),a=n(470856),l=n(473708);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e) ;for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function s(e){var t=e.type,n=e.onConfirm,s=c(e,["type","onConfirm"]),f=t===a.K.STREAM?l.Z.Messages.HIDE_SELF_STREAM_CONFIRMATION_HEADER:l.Z.Messages.HIDE_SELF_VIDEO_CONFIRMATION_HEADER,d=t===a.K.STREAM?l.Z.Messages.HIDE_SELF_STREAM_CONFIRMATION_BODY:l.Z.Messages.HIDE_SELF_VIDEO_CONFIRMATION_BODY;return(0,r.jsx)(i.default,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(247250),l=n(566706),u=n(473708);function c(e){var t=(0,o.e7)([l.Z],(function(){return l.Z.getVoiceParticipantsHidden(e)}));return(0,r.jsx)(i.S89,{id:"no-video-hide",label:u.Z.Messages.STREAM_SHOW_NON_VIDEO,checked:!t,action:function(){return a.Z.toggleVoiceParticipantsHidden(e,!t)}})}},430510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(379991),l=n(481008),u=n(177570),c=n(736818);var s=n(284278),f=n(470856),d=n(473708);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>O});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(379991),l=n(656645),u=n(736818),c=n(736097),s=n(36256);function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Yn.DEFAULT,n=(0,o.e7)([u.default],(function(){return u.default.getId()})),r=(0,o.e7)([c.Z],(function(){return c.Z.supports(s.AN.DISABLE_VIDEO)&&c.Z.isVideoEnabled()})),i=(0,o.e7)([c.Z],(function(){return c.Z.isLocalVideoDisabled(n,t)}),[n,t]),a=function(e){l.Z.setDisableLocalVideo(n,e,t)},f=null==e||e===n,d=f&&(r||i);return[d,i,a]}var d=n(284278),p=n(470856),h=n(473708);function y(e,t){ (null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:s.Yn.DEFAULT,n=g(f(e,t),3),l=n[0],u=n[1],c=n[2],y=(0, o.e7)([a.ZP],(function(){return a.ZP.disableHideSelfStreamAndVideoConfirmationAlert})),b=function(){if(y||u)return c(!u);(0,i.h7j)((function(e){return(0,r.jsx)(d.Z,m(v({},e),{type:p.K.VIDEO,onConfirm:function(){return c(!u)}}))}))};return l?(0,r.jsx)(i.S89,{id:"self-video-hide",label:h.Z.Messages.SHOW_SELF_VIDEO,checked:!u,action:b}):null}},289150:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(504001),l=n(736818),u=n(736097),c=n(473708),s=n(965126),f=n.n(s);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var b=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1 };case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(980617),l=n(77457),u=n(61209),c=n(744564);const s=function(e,t){c.Z.dispatch({type:"CALL_CHAT_TOASTS_SET_ENABLED",channelId:e,toastsEnabled:t})};var f=n(473708);function d(e){var t=(0,o.e7)([u.Z],(function(){return u.Z.getChannel(e)})),n=(0, a.Vy)(null==t?void 0:t.guild_id),c=(0,o.e7)([l.Z],(function(){return l.Z.getToastsEnabled(e)}));return(null==t?void 0:t.isGuildStageVoice())&&!n?null:(0,r.jsx)(i.S89,{id:"show-call-chat-toasts",label:f.Z.Messages.SHOW_NEW_MESSAGE_PREVIEWS,checked:c,action:function(){return s(e,!c)}})}},959468:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(382060),o=n(840922),i=n(473903),a=n(773011),l=n(2590),u=n(473708);function c(e){var t=e.isSubscriptionGated,n=e.needSubscriptionToAccess;if(t)return n?u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_PREMIUM_LOCKED:u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_PREMIUM_UNLOCKED}function s(e){var t,n=e.channel,s=e.unread,f=void 0!==s&&s,d=e.mentionCount,p=void 0===d?0:d,h=e.userCount,y=e.embeddedActivitiesCount,b=e.isSubscriptionGated,v=e.needSubscriptionToAccess,m=(0,a.F6)(n,i.default,o.Z);switch(n.type){case l.d4z.DM:t=f?u.Z.Messages.DIRECT_MESSAGE_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.DIRECT_MESSAGE_A11Y_LABEL;break;case l.d4z.GROUP_DM: t=f?u.Z.Messages.GROUP_MESSAGE_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GROUP_MESSAGE_A11Y_LABEL;break;case l.d4z.GUILD_STORE:t=u.Z.Messages.GUILD_SIDEBAR_STORE_CHANNEL_A11Y_LABEL;break;case l.d4z.GUILD_DIRECTORY:t=u.Z.Messages.GUILD_SIDEBAR_DIRECTORY_CHANNEL_A11Y_LABEL;break;case l.d4z.GUILD_ANNOUNCEMENT:t=p>0?u.Z.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:f?u.Z.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GUILD_SIDEBAR_ANNOUNCEMENT_CHANNEL_A11Y_LABEL;break;case l.d4z.GUILD_VOICE:var g=[u.Z.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL.format({channelName:n.name})];p>0&&g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_MENTIONS.format({mentionCount:p}));f&&g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_UNREAD);if(null!=h){var O=n.userLimit;null!=O&&O>0?g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_LIMIT.format({userCount:h,limit:O})):g.push(u.Z.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_A11Y_LABEL_USERS.format({ userCount:h}))}null!=y&&y>0&&g.push(u.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_ACTIVITIES.format({activitiesCount:y}));var E=c({isSubscriptionGated:b,needSubscriptionToAccess:v});null!=E&&g.push(E);return g.join(", ");case l.d4z.GUILD_STAGE_VOICE:t=u.Z.Messages.GUILD_SIDEBAR_STAGE_CHANNEL_A11Y_LABEL;break;default:t=r.Ec.has(n.type)?p>0?u.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_MENTIONS:f?u.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL:p>0?u.Z.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_MENTIONS:f?u.Z.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL_WITH_UNREADS:u.Z.Messages.GUILD_SIDEBAR_DEFAULT_CHANNEL_A11Y_LABEL}var C=[t.format({channelName:m,mentionCount:p})],j=c({isSubscriptionGated:b,needSubscriptionToAccess:v});null!=j&&C.push(j);return C.join(", ")}},428107:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(773011),o=n(2590),i=n(473708);function a(e){ var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.ZP)(e,!0),a=(0,r.ZP)(e,!1);return null==e||null==n?{placeholder:"",accessibilityLabel:""}:t?{placeholder:i.Z.Messages.READ_ONLY_CHANNEL,accessibilityLabel:i.Z.Messages.READ_ONLY_CHANNEL}:e.isForumPost()?{placeholder:i.Z.Messages.FORUM_POST_TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_FORUM_POST_A11Y_LABEL.format({channel:a})}:o.TPd.THREADS.has(e.type)?{placeholder:i.Z.Messages.TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_THREAD_A11Y_LABEL.format({channel:a})}:e.type===o.d4z.DM?{placeholder:i.Z.Messages.DM_TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_TEXT_DM_A11Y_LABEL.format({channel:a})}:{placeholder:i.Z.Messages.TEXTAREA_PLACEHOLDER.format({channel:n}),accessibilityLabel:i.Z.Messages.TEXTAREA_TEXT_CHANNEL_A11Y_LABEL.format({channel:a})}}},696978:(e,t,n)=>{"use strict";n.d(t,{A:()=>a}) ;var r=n(74535),o=n(795470),i=n(2590);function a(){var e=(0,r.ZP)();return(0,o.Lq)(e===i.BRd.DARK?i.Ilk.BRAND_330:i.Ilk.BRAND_530)}},438355:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(633878)),i=n(696978);function a(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t) ;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?16:t,c=e.height,s=void 0===c?16:c,f=u(e,["width","height"]),d=(0,i.A)();return(0,r.jsxs)("svg",l(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>_e});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(418705),c=n(707961),s=n(557617),f=n(634698),d=n(545580),p=n(228667),h=n(335072),y=n(541421),b=n(422513),v=n(468235),m=n(473708),g=n(694641),O=n.n(g);function E(e){var t=e.onOpenClips,n=e.lastClipsSession,i=e.closePopout;o.useEffect((function(){return function(){(0,v.eL)()}}),[]);return null==n?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)("div",{className:O().recentClipsPopout,children:[(0,r.jsx)(c.X6q,{className:O().header,color:"header-primary",variant:"heading-md/extrabold",children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_HEADER.format({count:n.numberOfClipsTaken})}),(0,r.jsx)(c.xvT,{color:"text-normal",className:O().content,variant:"text-sm/medium",children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_BODY.format({applicationName:n.applicationName})}),(0,r.jsxs)("div",{className:O().buttonsContainer,children:[(0,r.jsx)(c.zxk,{color:c.zxk.Colors.PRIMARY, look:c.zxk.Looks.LINK,onClick:function(){(0,b.Kw)(b.v6.CLIPS_CHANNEL_ATTACH_REMINDER);i()},children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_SECONDARY_CTA}),(0,r.jsx)(c.zxk,{color:c.zxk.Colors.BRAND,onClick:t,children:m.Z.Messages.CLIPS_SESSION_ENDED_TOOLTIP_PRIMARY_CTA})]})]})}var C=n(896490),j=n(398344),S=n(305082),I=n(645573),_=n(964262),w=n(225386),x=n(769321),P=n(682776),N=n(436154),A=n(366007),T=n(553480),Z=n(940547),M=n(930948),R=n(120415),L=n(15084),D=n(19585),k=n(159895),U=n(799066),B=n(367406),F=n(531441),G=n(652591),H=n(275374),V=n(855483),W=n(773011),z=n(840922),Y=n(473903),K=n(318313),q=n(634193),Q=n(532378),X=n(119141),J=n(713891),$=n(633878);function ee(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function te(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){ var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ne(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function re(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?22:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=ne(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",te(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(0,r.jsx)(F.mA,{className:ce().badge,count:e.badgeVal})]});switch(e.type){case oe.UPLOAD_A_FILE:return(0,r.jsx)(c.sNh,{id:"upload-file",label:n,subtext:(0,r.jsx)("span",{className:ce().tipSubtext,children:m.Z.Messages.UPLOAD_FILE_SUBTEXT.format({icon:function(e,t){return(0,r.jsx)(T.Z,{className:ce().tipIcon},t)}})}),action:i},"upload-file");case oe.UPLOAD_TEXT_AS_FILE:return""===s?null:(0,r.jsx)(c.sNh,{id:"upload-text-as-file",label:n,action:b},"upload-text-as-file");case oe.CLIPS:return(0,r.jsx)(c.sNh,{id:"clips",label:n,action:y},"clips");case oe.INVITE_TO_PLAY_GAME:return(0,r.jsx)(c.sNh,{id:"play",label:n,action:function(){return function(e){G.default.track(le.rMx.OPEN_MODAL,{ type:"Send Join Invite",application_id:e.application_id,location:le.jXE.CHANNEL_TEXT_AREA});ye(e,t,le.mFx.JOIN,v)}(e.activity)}},"play");case oe.INVITE_TO_LISTEN:return(0,r.jsx)(c.sNh,{id:"listen",label:n,action:function(){return function(e){G.default.track(le.rMx.OPEN_MODAL,{type:"Send Listen Invite",location:le.jXE.CHANNEL_TEXT_AREA});ye(e,t,le.mFx.LISTEN,v)}(e.activity)}},"listen");case oe.INVITE_TO_WATCH:return(0,r.jsx)(c.sNh,{id:"watch",label:n,action:function(){return function(e){G.default.track(le.rMx.OPEN_MODAL,{type:"Send Watch Invite",location:le.jXE.CHANNEL_TEXT_AREA});ye(e,t,le.mFx.WATCH,v)}(e.activity)}},"watch");case oe.CREATE_THREAD:return(0,r.jsx)(c.sNh,{id:"THREAD",label:n,action:p},"THREAD");case oe.SLASH_COMMAND:return(0,r.jsx)(c.sNh,{id:"SLASH_COMMAND",label:n,action:h},"SLASH_COMMAND");default:return null}}))})}var me=n(872535),ge=n.n(me);function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>b});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(503528),u=n(394352),c=n(470643),s=n(940581),f=n(686390),d=n.n(f);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>Pv}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(717187),u=n.n(l),c=n(441143),s=n.n(c),f=n(503528),d=n(940060),p=n(202351),h=n(707961),y=n(943469),b=n(316878),v=n(153686),m=n(19585),g=n(423427),O=n(496486),E=n.n(O),C=n(711003),j=n(73904),S=n(396043),I=n(38736),_=Object.freeze({id:null,activeDescendant:null}),w=(0,I.Z)((function(){return _}));function x(e,t,n){(0,o.useEffect)((function(){t?w.setState({id:e,activeDescendant:n}):w.setState({id:null,activeDescendant:null})}),[e,t,n])}var P=n(43566),N=n(604992),A=n(355557),T=n(457217),Z=n(272200),M=n(670327),R=n.n(M),L=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:a()(R().autocompleteRowContent,n),children:t})},D=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:a()(R().autocompleteRowContentPrimary,n),children:t})},k=function(e){var t=e.children,n=e.className;return(0,r.jsx)("div",{className:a()(R().autocompleteRowIcon,n),children:t})},U=function(e){var t=e.children,n=e.className ;return(0,r.jsx)(h.xvT,{className:a()(n,R().autocompleteRowHeading),color:"interactive-active",variant:"text-md/normal",children:t})},B=function(e){var t=e.children,n=e.className;return(0,r.jsx)(h.xvT,{className:a()(n,R().autocompleteRowSubheading),color:"interactive-normal",variant:"text-xs/normal",children:t})},F=function(e){var t=e.children,n=e.className;return(0,r.jsx)(h.xvT,{className:a()(n,R().autocompleteRowContentSecondary),color:"interactive-normal",variant:"text-xs/normal",children:t})},G=n(98265),H=n(560654),V=n.n(H);function W(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function z(e){var t,n=e.name,o=e.className,i=e.state,l=e.isInline,u=e.onClick,c=n+(l?":":""),s=null,f=G.Z.Colors.HEADER_PRIMARY;(null==i?void 0:i.isActive)&&!l?s=V().active:!1===(null==i||null===(t=i.lastValidationResult)||void 0===t?void 0:t.success)?s=V().error:(null==i?void 0:i.hasValue)&&!l&&(s=V().set);var d=(0,r.jsx)(G.Z,{ size:l?G.Z.Sizes.SIZE_16:G.Z.Sizes.SIZE_14,color:f,className:a()(V().option,W({},V().inline,l),s,o),children:c});return null==u?d:(0,r.jsx)(h.P3F,{className:V().clickable,onClick:function(){return u(n)},children:d})}var Y=n(242922),K=n(996051),q=n(473708),Q=n(191117),X=n.n(Q);function J(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function $(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function ee(e,t,n){return(0,r.jsx)(z,{className:X().option,name:e.displayName,state:t,onClick:n},e.name)}function te(e){ var t=e.command,n=e.optionStates,i=e.onOptionClick,a=o.useMemo((function(){var e,r,o,i,a=null!==(o=null===(e=t.options)||void 0===e?void 0:e.filter((function(e){return e.required})))&&void 0!==o?o:[],l=null!==(i=null===(r=t.options)||void 0===r?void 0:r.filter((function(e){return!e.required})))&&void 0!==i?i:[],u=l.filter((function(e){var t;return null==n||null===(t=n[e.name])||void 0===t?void 0:t.hasValue})),c=l.filter((function(e){var t;return!(null==n||null===(t=n[e.name])||void 0===t?void 0:t.hasValue)}));return{requiredOptions:a,setOptionalOptions:u,unsetOptionalOptions:c}}),[t.options,n]),l=a.requiredOptions,u=a.setOptionalOptions,c=a.unsetOptionalOptions,s=(0,r.jsx)("div",{className:X().optionalNames,children:c.map((function(e){return(0,r.jsx)(h.xvT,{variant:"text-sm/normal",children:e.displayName},e.name)}))}),f=l.map((function(e){return ee(e,null==n?void 0:n[e.name],i)})),d=u.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.X6q,{className:X().optionalHeader, variant:"heading-deprecated-12/semibold",children:q.Z.Messages.COMMANDS_OPTIONAL_HEADER}),u.map((function(e){return ee(e,null==n?void 0:n[e.name],i)}))]}):null,p=c.length>0?(0,r.jsx)(h.ua7,{text:s,"aria-label":!1,delay:200,children:function(e){return(0,r.jsx)(G.Z,$(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ne(e,t){return!t||"object"!==Te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ae(e,t){Ae=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ae(e,t)}var Te=function(e){ return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ie(e);if(t){var o=Ie(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ne(this,n)}}function Me(e){return null!=e?"autocomplete-".concat(e):null}function Re(e){return"autocomplete-".concat(e,"-title")}var Le=o.createContext(null),De=function(e){_e(n,e);var t=Ze(n);function n(e){je(this,n);var r;(r=t.call(this,e)).selectable=!0;r.layoutClass=R().autocompleteRowVertical;r.handleMouseEnter=function(){var e=r.props,t=e.onHover,n=e.index,o=e.selected;null!=t&&!o&&"number"==typeof n&&t(n)};r.handleClick=function(e){var t=r.props,n=t.onClick,o=t.index ;null!=n&&"number"==typeof o&&n(o,e)};r.state={hovered:!1};return r}var o=n.prototype;o.isSelectable=function(){return this.selectable};o.renderContent=function(){throw new Error("AutocompleteRow: renderContent must be extended")};o.renderClickable=function(e){var t,n=this,o=this.layoutClass,i=this.props,l=i.className,u=i.index,c=i.selected,s=this.isSelectable();return(0,r.jsx)(h.P3F,xe(we({},e),{className:a()(R().clickable,l,o),id:null!==(t=Me(u))&&void 0!==t?t:void 0,onClick:s?this.handleClick:void 0,onMouseMove:s?function(){n.setState({hovered:!0});n.handleMouseEnter()}:void 0,onMouseLeave:s?function(){return n.setState({hovered:!1})}:void 0,role:"option","aria-disabled":!s,"aria-selected":s&&c,children:(0,r.jsx)("div",{className:R().base,children:this.renderContent()})}))};o.render=function(){var e=this,t=this.props.index;return this.isSelectable()?(0,r.jsx)(T.mh,{id:"".concat(t),children:function(t){return e.renderClickable(t)}}):this.renderClickable()};return n }(o.PureComponent),ke=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props,t=e.text,n=e.description;return(0,r.jsxs)(L,{children:[(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:t})}),null!=n?(0,r.jsx)(F,{children:n}):null]})};return n}(De);var Ue=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).layoutClass=R().dividerContainer;e.selectable=!1;return e}n.prototype.renderContent=function(){var e=this.props.className;return(0,r.jsx)("div",{className:a()(e,R().divider)})};return n}(De),Be=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props,t=e.user,n=e.nick,o=e.status,i=e.hidePersonalInformation,a=e.guildId;return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:(0,r.jsx)(h.qEK,{size:h.EFr.SIZE_24,src:t.getAvatarURL(a,24),"aria-hidden":!0,status:o})}),(0,r.jsx)(D,{children:(0, r.jsx)(U,{children:null!=n?n:Oe.ZP.getName(t)})}),(0,r.jsxs)(F,{children:[(0,r.jsx)("span",{className:R().descriptionUsername,children:Oe.ZP.getUserTag(t,{mode:"username",identifiable:i?"never":"always"})}),i||t.isPomelo()?null:(0,r.jsxs)("span",{className:R().descriptionDiscriminator,children:["#",t.discriminator]})]})]})};return n}(De),Fe=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props,t=e.role,n=e.hideDescription,o=t.colorString,i="dot"===b.Z.roleStyle,a="username"===b.Z.roleStyle&&null!=o?{color:o}:void 0;return(0,r.jsxs)(L,{children:[(0,r.jsx)(D,{children:(0,r.jsxs)(U,{children:[i&&(0,r.jsx)(h.FhE,{className:R().roleDot,color:o,tooltip:!1}),(0,r.jsxs)("span",{style:a,children:["@",t.name]})]})}),n?null:(0,r.jsx)(F,{children:q.Z.Messages.MENTION_USERS_WITH_ROLE})]})};return n}(De),Ge=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)} n.prototype.renderContent=function(){var e=this.props,t=e.channel,n=e.category,o=t.type===se.d4z.GUILD_CATEGORY?Ee.Z:(0,le.KS)(t);return(0,r.jsxs)(L,{children:[null!=o&&(0,r.jsx)(k,{children:(0,r.jsx)(o,{className:R().icon})}),(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:(0,ae.F6)(t,ge.default,me.Z)})}),null!=n?(0,r.jsx)(F,{children:n.name}):null]})};return n}(De),He=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.renderContent=function(){var e=this.props.command;return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:(0,r.jsx)(Ce.Z,{className:R().icon,foreground:R().iconForeground})}),(0,r.jsx)(D,{children:(0,r.jsx)(U,{children:e.name})}),(0,r.jsx)(F,{children:e.description})]})};return n}(De),Ve=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}var o=n.prototype;o.isSelectable=function(){return this.props.command.inputType!==Z.iw.PLACEHOLDER};o.renderContent=function(){ var e=this.props,t=e.command,n=e.channel,o=e.showImage,i=e.section,a=e.selected,l=this.state.hovered,u=this.isSelectable();return t.inputType===Z.iw.PLACEHOLDER?(0,r.jsx)(ie,{}):(0,r.jsx)(ne,{command:t,channel:n,showImage:o,showOptions:l||u&&a,section:i,isSelectable:u})};return n}(De),We=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).layoutClass=a()(R().autocompleteRowVertical,R().autocompleteRowVerticalSmall);return e}n.prototype.renderContent=function(){var e=this.props,t=e.emoji,n=e.sentinel,o=e.guild,i=null!=t.url&&""!==t.url?(0,r.jsx)("img",{alt:"",className:R().emojiImage,src:t.url}):(0,r.jsx)("span",{className:R().emojiRaw,children:t.surrogates}),a=null!=o?(0,r.jsx)(F,{children:o.name}):null;return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:i}),(0,r.jsx)(D,{children:(0,r.jsxs)(U,{children:[n,t.name,n]})}),a]})};return n}(De),ze=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e ;(e=t.apply(this,arguments)).layoutClass=a()(R().autocompleteRowVertical,R().autocompleteRowVerticalSmall);return e}n.prototype.renderContent=function(){var e,t=this.props,n=t.queryMatch,o=t.renderSticker,i=t.selected,a=t.sticker,l=this.state.hovered;if((0,be.jl)(a)){var u;e=null===(u=ye.Z.getStickerPack(a.pack_id))||void 0===u?void 0:u.name}else if((0,be.J8)(a)){var c;e=null===(c=ve.Z.getGuild(a.guild_id))||void 0===c?void 0:c.name}return(0,r.jsxs)(L,{children:[(0,r.jsx)(k,{children:o(a,l||!0===i)}),(0,r.jsxs)(D,{children:[(0,r.jsx)(U,{className:R().stickerName,children:a.name}),null!=n&&(0,r.jsx)(B,{children:q.Z.Messages.AUTOCOMPLETE_STICKERS_QUERY_MATCH.format({queryMatch:n})})]}),null!=e&&(0,r.jsx)(F,{children:e})]})};return n}(De),Ye=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).layoutClass=R().autocompleteRowHorizontal;return e}n.prototype.renderContent=function(){var e=this.props,t=e.width,n=e.height,o=e.src;return(0,r.jsx)("img",{ alt:"",src:o,width:t,height:n})};return n}(De),Ke=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);var e;(e=t.apply(this,arguments)).selectable=!1;return e}n.prototype.renderContent=function(){return(0,r.jsx)(he,{emojis:this.props.emojis})};return n}(De),qe=function(e){_e(n,e);var t=Ze(n);function n(){je(this,n);return t.apply(this,arguments)}n.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=e.innerClassName,l=e.id,u=Pe(e,["children","className","innerClassName","id"]);return o.Children.count(t)>0?(0,r.jsx)(Le.Provider,{value:{id:null!=l?l:""},children:(0,r.jsx)("div",{className:a()(R().autocomplete,n),children:(0,r.jsx)("div",xe(we({className:a()(R().autocompleteInner,i)},u),{children:t}))})}):null};return n}(o.PureComponent);qe.Generic=ke;qe.Loading=function(e){var t=o.useMemo((function(){return E().random(60,120)}),[]);return(0,r.jsx)("div",{className:R().base,"aria-busy":!0,children:(0,r.jsx)(L,{children:(0,r.jsx)(D,{children:(0,r.jsx)(U,{ children:(0,r.jsx)("div",{className:R().autocompletePlaceholder,style:{width:t}})})})})})};qe.Title=function(e){var t=e.title,n=e.className,i=o.useContext(Le);return(0,r.jsx)("div",{className:R().base,children:(0,r.jsx)(h.X6q,{id:Re(i.id),className:a()(R().contentTitle,n),variant:"heading-deprecated-12/semibold",children:t})})};qe.Divider=Ue;qe.User=Be;qe.Role=Fe;qe.Channel=Ge;qe.Command=He;qe.NewCommand=Ve;qe.Emoji=We;qe.GIFIntegration=Ye;qe.Sticker=ze;qe.EmojiUpsell=Ke;const Qe=qe;var Xe=n(483902),Je=n(443812),$e=n(49621),et=n(533404),tt=n(711795),nt=n(83993),rt=n.n(nt);function ot(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function it(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){ return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function at(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var lt=[16,12,8,12];function ut(e){var t=e.className,n=e.channel,i=e.sections,l=e.activeCategoryIndex,u=e.filteredSectionId,c=e.onSectionClick,s=e.applicationCommandListRef,f=o.useRef(null),d=o.useCallback((function(e,t){var n,r=8;(null===(n=i[t+1])||void 0===n?void 0:n.type)===Z.Qi.BUILT_IN&&(r+=8);return 32+r}),[i]),p=o.useCallback((function(e,t){var n ;return t?(null===(n=i[e+1])||void 0===n?void 0:n.type)===Z.Qi.BUILT_IN?0:8:0===e?0:8}),[i]),y=o.useCallback((function(e,t){var o=i[t];if(null!=o){var a=(0,Y.ky)(o),s=o.type===Z.Qi.BUILT_IN?4:0,f=32-2*s,d=(0,r.jsx)(a,{channel:n,section:o,isSelected:null!=u?o.id===u:l===t,padding:s,width:f,height:f,selectable:!0}),p=o.type!==Z.Qi.BUILT_IN&&te.length)&&(t=e.length);for(var n=0,r=new Array(t);n48*t+56*n-512&&M();L(e);mt();u.current=e};o.useEffect((function(){D(u.current)}),[I]);var k=o.useCallback((function(e){return e===g.length-1&&!E?0:16}),[g.length,E]),U=O.map((function(e){return e.data.length}));o.useEffect((function(){null!=d.current&&h&&null!=s&&d.current.scrollRowIntoView(s)}),[h,s]);o.useLayoutEffect((function(){if(null!=T){var e;null===(e=d.current)||void 0===e||e.scrollToSectionTop(0)}}),[I,T]) ;var B=o.useCallback((function(e){if(e.id===T||e.id===ct.bi.FRECENCY){var t;R(null);null===(t=d.current)||void 0===t||t.scrollToSectionTop(0)}else R(e.id)}),[R,T]),F=o.useCallback((function(e,t){$e.Po(n.id,e,t,Z.Vh.DISCOVERY)}),[n.id]);o.useImperativeHandle(t,(function(){return{onTabOrEnter:function(e){if(null==s){if(e)return!1;f(0);return!0}if(null==s)return!1;var t=0,n=0,r=!0,o=!1,i=void 0;try{for(var a,l=O[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;t=n;n+=u.data.length;if(s=n?r=n-1:r<0&&(r=0);f(r);y(!0);return!0}}}),[I.length,O,E,F,s]);var G=o.useCallback((function(e){var t=g[e];if(null==t)return null;var o=(0,Y.ky)(t),i=(0,r.jsx)(o,{channel:n,section:t,width:16,height:16,padding:0});return(0,r.jsx)(A.Z,{className:ft().categoryHeader,icon:i, children:t.name},e)}),[n,g]),H=o.useCallback((function(e,t){var n=e===g.length-1,o=g[e],i=O[e].data;return(0,r.jsxs)("ul",{role:"group","aria-label":o.name,className:a()(ft().categorySection,yt({},ft().categorySectionLast,n)),children:[t,0===i.length&&(0,r.jsx)(C.Z,{message:q.Z.Messages.APPLICATION_COMMAND_NO_PERMISSIONS.format({applicationName:o.name}),noResultsImageURL:pt(),className:ft().noSearchResults})]},e)}),[g,O]),V=o.useCallback((function(e,t){var o,i=O[t.sectionIndex],a=i.data[t.sectionRowIndex],l="".concat(i.section.id,":").concat(null!==(o=null==a?void 0:a.id)&&void 0!==o?o:e);if(null==a||i.section.id!==a.applicationId&&i.section.id!==ct.bi.FRECENCY||a.inputType===Z.iw.PLACEHOLDER)return(0,r.jsx)(ie,{},l);var u=m.find((function(e){return e.id===a.applicationId}));return(0,r.jsx)(Qe.NewCommand,{index:e,command:a,channel:n,className:ft().itemWrapper,selected:s===e,showImage:i.section.id!==a.applicationId,section:u,onClick:function(){return F(a,u)},onHover:function(){f(null) ;y(!1)}},l)}),[n,O,F,m,s]),W=(0,Je.Dt)();x(W,!0,Me(s));o.useEffect((function(){return function(){w.setState((function(){return _}))}}),[]);return(0,r.jsxs)(Qe,{id:W,className:ft().outerWrapper,innerClassName:ft().wrapper,onMouseDown:Ot,children:[(0,r.jsx)(ut,{className:ft().rail,channel:n,sections:m,filteredSectionId:T,activeCategoryIndex:b,onSectionClick:B,applicationCommandListRef:d}),(0,r.jsx)(Xe.Z,{role:"listbox",className:ft().list,listPadding:vt,onScroll:D,renderRow:V,renderSection:H,renderSectionHeader:G,rowCount:g.length,rowCountBySection:U,rowHeight:56,sectionHeaderHeight:32,sectionMarginBottom:k,ref:d,stickyHeaders:!0})]})}));function Ot(e){e.preventDefault()}var Et=n(744564),Ct=n(61209),jt=n(21372),St=n(715107),It=n(127661),_t=n(334359),wt=n.n(_t);function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?t.getRangeAt(0):null;if(null!=o){for(var i=o.startContainer,l=o.startOffset;null!=i;){var u,p,h;if(i.nodeType!==Node.TEXT_NODE||null==i.nodeValue){c(null);return}if(0!==(null===(u=i.nodeValue)||void 0===u?void 0:u.length)){null!=s&&(l>=s.queryText.length?l-=s.queryText.length:l=0);break}l=null!==(h=null==(i=i.previousSibling)||null===(p=i.nodeValue)||void 0===p?void 0:p.length)&&void 0!==h?h:0}if(null!=i){var y=d.document.createRange();y.setStart(i,l);y.setEnd(i,l);var b=y.getBoundingClientRect();0!==(null==b?void 0:b.height)&&c(null!=b?b:null)}} }else c(null);else c(void 0)}),[a,d.document,r,f,s,n]);o.useEffect((function(){d.document.addEventListener("selectionchange",p);return function(){return d.document.removeEventListener("selectionchange",p)}}),[d.document,p]);o.useEffect((function(){p()}),[p,t]);return u}var an,ln=n(283151),un=n(385231),cn=n(281808),sn=n(24230),fn=n(682776),dn=n(793461),pn=n(514351);function hn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function yn(e){for(var t=1;t0?e.format({prefix:o(n)}):t;return(0,r.jsx)(Qe.Title,{className:i,title:a},"autocomplete-title-".concat(a))}function Pn(e){ var t=e.query,n=e.selectedIndex,i=e.autocompletes,a=e.onHover,l=e.onClick,u=e.titleWithQuery,c=e.titleWithoutQuery,s=e.Component,f=e.getProps,d=e.getQuery,p=e.key,h=e.indexOffset,y=void 0===h?0:h,b=e.headerClassName,v=e.footer;if(null==v&&(null==i||0===i.length))return null;var m=null==i?void 0:i.map((function(e,t){var r=t+y,i=f(e,r);return(0,o.createElement)(s,wn(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n");return"<#".concat(e.id,">")}(o));return{type:$t.CHANNEL}}));const Mn=Zn;var Rn=n(169898),Ln=n(871339);function Dn(e){var t=e.query,n=e.onHover,i=e.onClick,a=e.channel,l=e.selectedIndex,u=o.useRef(null),c=(0,et.v1)(a,j.yU.CHAT,t,{}),s=c.commands,f=c.sections,d=c.scrollDown,p=o.useCallback((function(e){if(null==s)return null;var t,o=s[e],u=null!==(t=null==o?void 0:o.id)&&void 0!==t?t:e ;if(null==o||o.inputType===Z.iw.PLACEHOLDER)return(0,r.jsx)(ie,{},u);var c=f.find((function(e){return e.id===o.applicationId}));return(0,r.jsx)(Qe.NewCommand,{index:e,command:o,channel:a,className:ft().itemWrapper,selected:l===e,showImage:!0,section:c,onClick:i,onHover:n},u)}),[a,s,f,i,n,l]);return null==s||0===s.length?null:(0,r.jsxs)(r.Fragment,{children:[xn(q.Z.Messages.COMMANDS_MATCHING,q.Z.Messages.COMMANDS,t,(function(e){return"".concat(K.GI).concat(e)})),(0,r.jsx)(Xe.Z,{ref:u,role:"listbox",className:ft().list,listPadding:[0,8,0,8],onScroll:function(e){if(null!=s){56*s.length-e-u.current.getListDimensions().height<504&&d()}},renderRow:p,rowCount:s.length,rowHeight:56})]})}var kn=n(968696);var Un={results:{commands:[]}};function Bn(){(0,et.nM)();return null}const Fn=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.GI,stores:[g.Z,et.ZP,fn.Z],matches:function(e,t,n,r,o){ return o.commands!==Qt.DISABLED&&null==g.Z.getActiveCommand(e.id)},queryResults:function(e,t,n,r,o){if(0===n.length&&r.commands!==Qt.OLD_BUILT_INS)return Un;var i={channel:e,guild:t};if(r.commands===Qt.OLD_BUILT_INS){var a=(0,Rn.Kh)(j.yU.CHAT,!1,!1),l=new RegExp("^".concat(kn.Z.escape(n)),"i"),u=(0,gn.Dd)(a,l,i,7);return 0===u.length?Un:{results:{commands:u}}}var c=(0,Y.hV)(e,n);o&&$e.YU(i,c.text,7,j.yU.CHAT);var s=et.ZP.getQueryCommands(e.id,j.yU.CHAT,c.text);if(null==s)return Un;if(s.length>0){if(c.hasSpaceTerminator){var f=c.text.trim(),d=f+" ";s=s.filter((function(e){return e.name===f||e.name.startsWith(d)}))}return{results:{commands:s}}}return Un},renderResults:function(e){var t=e.results.commands,n=e.selectedIndex,o=e.channel,i=e.query,a=e.options,l=e.onHover,u=e.onClick,c=(0,Y.hV)(o,i);Ln.Z.trackExposure({});if(a.commands!==Qt.OLD_BUILT_INS&&Ln.Z.getCurrentConfig({}).enabled)return(0,r.jsx)(Dn,{channel:o,query:c.text,selectedIndex:n,onHover:l,onClick:u}) ;var s=et.ZP.getApplicationSections(o.id,j.yU.CHAT);return Pn({query:c.text,selectedIndex:n,autocompletes:t,onHover:l,onClick:u,titleWithQuery:q.Z.Messages.COMMANDS_MATCHING,titleWithoutQuery:q.Z.Messages.COMMANDS,getQuery:function(e){return"".concat(K.GI).concat(e)},Component:a.commands===Qt.OLD_BUILT_INS?Qe.Command:Qe.NewCommand,getProps:function(e){return{key:e.id,command:e,channel:o,guildId:o.guild_id,showImage:!0,section:null==s?void 0:s.find((function(t){return t.id===e.applicationId}))}},key:"commands",footer:(0,r.jsx)(Bn,{})})}},"onSelect",(function(e){var t=e.results.commands,n=e.index,r=e.options,o=e.channel,i=e.location,a=t[n];if(a.inputType===Z.iw.PLACEHOLDER)return null;if(r.commands===Qt.OLD_BUILT_INS)r.insertText(function(e){return"".concat(K.GI).concat(e.name)}(a));else{var l,u,c=null!==(u=null===(l=et.ZP.getApplicationSections(o.id,j.yU.CHAT))||void 0===l?void 0:l.find((function(e){return e.id===a.applicationId})))&&void 0!==u?u:null;$e.Po(o.id,a,c,i)}return{ type:$t.COMMAND}}));var Gn=n(849172),Hn=n(698847),Vn=n(378734),Wn=n.n(Vn);var zn={results:{choices:[]}},Yn={results:{choices:[],isLoading:!0}},Kn=Array.from({length:5},(function(){return{name:"",displayName:"",value:""}})),qn={results:{choices:[],isError:!0}},Qn=E().debounce(Hn.Z,500,{leading:!0,trailing:!0}),Xn=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({stores:[g.Z,Gn.Z],showEmpty:!0,matches:function(e,t,n,r,o){var i=g.Z.getActiveOption(e.id);return o.commands!==Qt.DISABLED&&null!=i&&(i.type===j.jw.BOOLEAN||!!(null==i?void 0:i.autocomplete)||null!=(null==i?void 0:i.choices)&&i.choices.length>0)},queryResults:function(e,t,n,r,o){var i,a=g.Z.getActiveOption(e.id);if(null==a)return zn;if(a.autocomplete){if(o){var l=g.Z.getActiveCommand(e.id),u=r.getCommandOptionValues();Qn(l,u,{channel:e,guild:t,autocomplete:{name:a.name,query:n}})}if(Gn.Z.getLastErrored(e.id))return qn ;var c=Gn.Z.getAutocompleteChoices(e.id,a.name,n);return null==c?Yn:{results:{choices:c}}}return{results:Sn.ZP.queryChoiceResults({query:n,choices:a.type===j.jw.BOOLEAN?ct.ak:null!==(i=a.choices)&&void 0!==i?i:[]})}},renderResults:function(e){var t=e.results,n=t.choices,o=t.isLoading,i=t.isError,a=e.selectedIndex,l=e.query,u=e.onHover,c=e.onClick;return i?(0,r.jsx)(C.Z,{message:q.Z.Messages.APPLICATION_COMMAND_AUTOCOMPLETE_FAILED,noResultsImageURL:pt(),className:Wn().noAutocompleteResults}):0!==n.length||o?Pn({query:l,selectedIndex:a,autocompletes:o?Kn:n,onHover:u,onClick:c,titleWithQuery:q.Z.Messages.OPTIONS_MATCHING,titleWithoutQuery:q.Z.Messages.OPTIONS,Component:o?Qe.Loading:Qe.Generic,getProps:function(e,t){return{key:t.toString(),text:e.displayName}},getQuery:function(e){return e},key:"choice"}):(0,r.jsx)(C.Z,{message:q.Z.Messages.APPLICATION_COMMAND_AUTOCOMPLETE_NO_OPTIONS,noResultsImageURL:pt(),className:Wn().noAutocompleteResults})}},"onSelect",(function(e){ var t=e.results.choices,n=e.index,r=e.options,o=t[n];r.insertText(function(e){return e.displayName}(o));return{type:$t.CHOICE}}));const Jn=Xn;var $n={results:{commandOptions:[]}};const er=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({stores:[g.Z],focusMode:en.AUTO_WHEN_FILTERED,matches:function(e,t,n,r,o){return!(r||null==g.Z.getActiveCommand(e.id)||null!=g.Z.getActiveOption(e.id))},queryResults:function(e,t,n,r,o){var i=g.Z.getActiveCommand(e.id);if(null==(null==i?void 0:i.options))return $n;var a=g.Z.getOptionStates(e.id),l=i.options.filter((function(e){var t;return e.displayName.startsWith(n)&&!(null===(t=a[e.name])||void 0===t?void 0:t.hasValue)}));return 0===l.length?$n:{results:{commandOptions:l}}},renderResults:function(e){var t=e.results.commandOptions,n=e.selectedIndex,o=e.query,i=e.onHover,a=e.onClick,l=[],u=[];t.forEach((function(e){(e.required?l:u).push(e)}));var c=l.length>0?Pn({query:o, selectedIndex:n,autocompletes:l,onHover:i,onClick:a,titleWithQuery:q.Z.Messages.REQUIRED_OPTIONS_MATCHING,titleWithoutQuery:q.Z.Messages.REQUIRED_OPTIONS,Component:Qe.Generic,getProps:function(e,t){return{key:t.toString(),text:e.displayName,description:e.displayDescription}},getQuery:function(e){return e},key:"required-options"}):null,s=u.length>0?Pn({query:o,selectedIndex:n,autocompletes:u,onHover:i,onClick:a,titleWithQuery:q.Z.Messages.OPTIONS_MATCHING,titleWithoutQuery:l.length>0?q.Z.Messages.OTHER_OPTIONS:q.Z.Messages.OPTIONS,Component:Qe.Generic,getProps:function(e,t){return{key:t.toString(),text:e.displayName,description:e.displayDescription}},getQuery:function(e){return e},key:"optional-options",indexOffset:l.length}):null;return(0,r.jsxs)(r.Fragment,{children:[c,s]})}},"onSelect",(function(e){var t=e.results.commandOptions,n=e.index,r=e.options,o=t[n];r.insertText("".concat(o.displayName,":"));return{type:$t.COMMAND_OPTION}}));var tr=n(748755),nr=n(840598),rr=(0,Ht.B)({ kind:"user",id:"2021-03_nitro_emoji_autocomplete_upsell",label:"Emoji Autocomplete Upsell",defaultConfig:{emojiAutocompleteUpsellEnabled:!1},treatments:[{id:1,label:"Show emoji autocomplete upsell",config:{emojiAutocompleteUpsellEnabled:!0}}]});const or=rr;(0,Ht.B)({kind:"user",id:"2021-04_nitro_emoji_autocomplete_upsell_ios",label:"Emoji Autocomplete Upsell iOS",defaultConfig:{emojiAutocompleteUpsellEnabled:!1},treatments:[{id:1,label:"Show emoji autocomplete upsell",config:{emojiAutocompleteUpsellEnabled:!0}}]});var ir=n(481554),ar=n.n(ir);function lr(e,t){return(0,r.jsx)(In.ZP,{sticker:e,isInteracting:t,size:40})}const ur=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.Iv,stores:[ye.Z],matches:function(e,t,n,r,o){return n.length>1},queryResults:function(e,t,n,r,o){var i=or.getCurrentConfig({}).emojiAutocompleteUpsellEnabled,a=Sn.ZP.queryEmojiResults({query:n,channel:e,intention:r.emojiIntention }).emojis,l=a.locked,u=a.unlocked;if("-"===n[0]){var c=function(e){var t;return null===(t=e.names)||void 0===t?void 0:t.includes(n)};l=l.filter(c);u=u.filter(c)}var s=[];if(r.allowStickers){(0,nr.$p)();var f=Sn.ZP.queryStickers([n],!0,[e,function(e,t){return t===tr.eb.SENDABLE}]),d=Math.max(4,8-u.length);s=f.slice(0,d);"-"===n[0]&&(s=f.filter((function(e){return e.sticker.name===n})))}var p=u.slice(0,se.rnv-s.length),h=p.length+s.length0?[{emojis:l}]:[];h.length>0&&or.trackExposure({});return{results:{emojis:p,emojisLocked:i?h:[],stickers:s},metadata:{numEmojiResults:p.length,numStickerResults:s.length}}},renderResults:function(e){var t=e.results,n=t.emojis,o=t.stickers,i=t.emojisLocked,a=e.selectedIndex,l=e.query,u=e.onHover,c=e.onClick;return(0,r.jsxs)(r.Fragment,{children:[Pn({query:l,selectedIndex:a,autocompletes:n,onHover:u,onClick:c,titleWithQuery:q.Z.Messages.EMOJI_MATCHING,titleWithoutQuery:q.Z.Messages.EMOJI,Component:Qe.Emoji,getProps:function(e){return{ emoji:e,key:e.id||e.uniqueName||e.name,sentinel:K.Iv,guild:null!=e.guildId?ve.Z.getGuild(e.guildId):null}},getQuery:function(e){return"".concat(K.Iv).concat(e)},key:"emoji"}),i.length>0?Pn({query:l,selectedIndex:a,autocompletes:i,onHover:u,onClick:c,titleWithQuery:0===n.length?q.Z.Messages.EMOJI_MATCHING:null,titleWithoutQuery:0===n.length?q.Z.Messages.EMOJI:null,Component:Qe.EmojiUpsell,getProps:function(e){return{key:"emoji-upsell",emojis:e.emojis}},getQuery:function(e){return"".concat(K.Iv).concat(e)},key:"emoji-upsell",indexOffset:n.length}):null,(n.length>0||i.length>0)&&o.length>0&&(0,r.jsx)(Qe.Divider,{className:ar().emojiStickersDivider}),Pn({query:l,selectedIndex:a,autocompletes:o,onHover:u,onClick:c,titleWithQuery:q.Z.Messages.STICKERS_MATCHING,titleWithoutQuery:q.Z.Messages.STICKER,Component:Qe.Sticker,getProps:function(e){var t=e.comparator,n=e.sticker;return{renderSticker:lr,queryMatch:t!==n.name.toLocaleLowerCase()?t:void 0,sticker:n,key:n.id}},getQuery:function(e){ return e},key:"stickers",indexOffset:n.length+i.length,headerClassName:n.length>0?ar().stickersHeaderWithEmojiResults:void 0})]})}},"onSelect",(function(e){var t=e.results,n=t.emojis,r=t.emojisLocked,o=t.stickers,i=e.index,a=e.options;if(i")}(l));return{type:$t.EMOJI,metadata:{emojiId:l.id,numEmojiResults:n.length,numStickerResults:o.length,expressionName:l.name,isCustom:null!=l.id,isAnimated:l.animated}}}if((i-=n.length)0&&Or(u,l);var c=gr.getResults(u,l);return null==c?_r:{results:{command:a,integrations:c.results,isLoading:c.loading}}}},"renderResults",(function(e){var t=e.results,n=t.integrations,i=t.isLoading,a=e.selectedIndex,l=e.channel,u=e.query,c=e.options,s=e.onHover,f=e.onClick,d=wr(l,u,c),p=d.command,y=d.query;if(null==p||0===y.length)return null;if(i)return(0,r.jsx)(h.$jN,{ className:jr().spinner,type:h.$jN.Type.SPINNING_CIRCLE});if(null!=n){var b,v,m=!1,O=n.map((function(e,t){if(e.type===se.q9n.GIF){m=!0;var n,o,i;return(0,r.jsx)(Qe.GIFIntegration,{className:jr().horizontalAutocomplete,onClick:f,onHover:s,selected:a===t,index:t,width:null!==(n=e.meta.width)&&void 0!==n?n:0,height:null!==(o=e.meta.height)&&void 0!==o?o:0,src:null!==(i=e.meta.src)&&void 0!==i?i:"",url:e.meta.url},"".concat(e.meta.url).concat(e.meta.src))}})),E=c.commands===Qt.OLD_BUILT_INS?p:null!==(v=null===(b=g.Z.getActiveCommand(l.id))||void 0===b?void 0:b.integrationTitle)&&void 0!==v?v:p,C=y.length>0&&null!=E?q.Z.Messages.CONTENT_MATCHING.format({query:y,command:E}):null!=E?E:p;return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Qe.Title,{title:C}),m?(0,r.jsx)(Er.Z,{className:jr().horizontalAutocompletes,children:O}):O]},"gifs")}})),Sr(Ir,"onSelect",(function(e){var t=e.results,n=t.command,r=t.integrations,o=e.index,i=e.type,a=e.options,l=e.channel;if(null==n)return{type:null};var u=r[o] ;i===Xt.INSERT?a.replaceText(xr(u)):a.sendMessage(xr(u));S.ZP.trackWithMetadata(se.rMx.SEARCH_RESULT_SELECTED,{search_type:se.aib.GIF,index_num:o,source_object:"/".concat(n)});if(a.commands!==Qt.OLD_BUILT_INS){var c=g.Z.getActiveCommand(l.id);(null==c?void 0:c.inputType)===Z.iw.BUILT_IN_INTEGRATION&&S.ZP.trackWithMetadata(se.rMx.APPLICATION_COMMAND_USED,{command_id:c.id,application_id:c.applicationId,command_type:c.type})}return{type:$t.GIF}})),Ir);var Nr=n(260211),Ar=n(769321),Tr=n(773148),Zr=RegExp("^(?:(?:(?:[A-Za-z!$%?;+.=\\-~]{1,2})[@#>]{1,3})|(?:(?:[A-Za-z]{1,2})?(?:~|[!$%?;+.=-]{1,3})))[A-Za-z]","u"),Mr=RegExp("^<@!?(\\d+)>","u");function Rr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Lr(e){for(var t=1;t0},queryResults:function(e,t,n,r,o){var i=kr(n);if(null==i)return Br;var a={channel:e,guild:t},l=(0,Y.hV)(e,i.cleanedQuery);o&&$e.YU(a,l.text,7,j.yU.CHAT,"mention"===i.type?i.user.id:void 0);var u=et.ZP.getQueryCommands(e.id,j.yU.CHAT,l.text);if(null==u)return Br;if(u.length>0&&l.hasSpaceTerminator){var c=l.text.trim(),s=c+" ";u=u.filter((function(e){return e.name===c||e.name.startsWith(s)}))}return 0===(u=u.filter((function(e){return e.inputType===Z.iw.BOT}))).length?Br:Nr.Z.getCurrentConfig({},{autoTrackExposure:!0}).showApplicationCommandSuggestions&&Ar.Xk.getSetting()?{results:{commands:u}}:Br},renderResults:function(e){var t=e.results.commands,n=e.selectedIndex,o=e.guild,i=e.channel,a=e.query,l=e.options,u=e.onHover,c=e.onClick,s=et.ZP.getApplicationSections(i.id,j.yU.CHAT);return Pn({query:a,selectedIndex:n,autocompletes:t,onHover:u,onClick:c, titleWithQuery:q.Z.Messages.COMMANDS_MATCHING,titleWithoutQuery:q.Z.Messages.COMMANDS,Component:l.commands===Qt.OLD_BUILT_INS?Qe.Command:Qe.NewCommand,getProps:function(e){return{key:e.id,command:e,channel:i,guildId:i.guild_id,showImage:!0,section:null==s?void 0:s.find((function(t){return t.id===e.applicationId}))}},getQuery:function(e){var t=kr(e);if("mention"!==t.type)return e;var n=Tr.Z.getName(null==o?void 0:o.id,i.id,t.user);return e.replace(Mr,"@".concat(n))},key:"commands",footer:(0,r.jsx)(Ur,{})})},onSelect:function(e){var t=e.results,n=e.index,r=e.type,o=e.options,i=e.channel,a=Fn.onSelect({results:t,index:n,type:r,options:o,channel:i,location:Z.Vh.SUGGESTION});return null==a?null:Dr(Lr({},a),{type:$t.COMMAND_SUGGESTION})}});const Gr=Fr;const Hr=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.ME,stores:[jt.ZP],matches:function(e,t,n,r,o){ return o.mentions.user!==zt.DENY||o.mentions.role!==Yt.DENY||o.mentions.global!==Wt.DENY},queryResults:function(e,t,n,r,o){var i=r.mentions.global===Wt.ALLOW_EVERYONE||r.mentions.global===Wt.ALLOW_EVERYONE_OR_HERE,a=r.mentions.global===Wt.ALLOW_EVERYONE_OR_HERE,l=r.mentions.user!==zt.DENY,u=r.mentions.role!==Yt.DENY,c=r.mentions.clyde!==qt.DENY,s=r.mentions.user===zt.ALLOW_GUILD,f=r.mentions.role===Yt.ALLOW_ALL;return{results:Sn.ZP.queryMentionResults({query:n,channel:e,canMentionEveryone:i,canMentionHere:a,canMentionUsers:l,canMentionRoles:u,canMentionClyde:c,includeAllGuildUsers:s,includeNonMentionableRoles:f,request:o})}},renderResults:function(e){var t,n,i=e.results,a=i.users,l=i.globals,u=i.roles,c=e.selectedIndex,s=e.channel,f=e.query,d=e.options,p=e.onHover,h=e.onClick,y=a.map((function(e,t){return(0,r.jsx)(Qe.User,{guildId:s.guild_id,onClick:h,onHover:p,selected:c===t,index:t,user:e.user,nick:e.nick,status:e.status,hidePersonalInformation:d.hidePersonalInformation},e.user.id) })),b=l.map((function(e,t){return(0,r.jsx)(Qe.Generic,{onClick:h,onHover:p,selected:c===t+a.length,index:a.length+t,text:e.text,description:d.hideMentionDescription?null:e.description,"aria-label":e.text},e.text)})),v=u.map((function(e,t){return(0,r.jsx)(Qe.Role,{onClick:h,onHover:p,selected:c===t+a.length+l.length,index:a.length+l.length+t,role:e,hideDescription:d.hideMentionDescription},e.id)}));if(d.mentions.user===zt.DENY){t=q.Z.Messages.ROLES_MATCHING;n=q.Z.Messages.ROLES}else{t=q.Z.Messages.MEMBERS_MATCHING;n=q.Z.Messages.MEMBERS}return(0,r.jsxs)(o.Fragment,{children:[xn(t,n,f,(function(e){return"".concat(K.ME).concat(e)})),y,a.length>0&&l.length>0?(0,r.jsx)(Qe.Divider,{}):null,b,a.length>0&&u.length>0||l.length>0&&u.length>0?(0,r.jsx)(Qe.Divider,{}):null,v]},"mentions")}},"onSelect",(function(e){var t=e.results,n=t.users,r=t.globals,o=t.roles,i=e.index,a=e.options,l=n[i],u=r[i-n.length],c=o[i-n.length-r.length];null!=l?a.insertText(function(e,t){ return"".concat(K.ME).concat(Oe.ZP.getUserTag(e,{mode:"username",decoration:"never",identifiable:t?"never":"always"}))}(l.user,a.hidePersonalInformation),function(e){return"<@".concat(e.id,">")}(l.user)):null!=u?a.insertText(function(e){return e.text}(u)):null!=c&&a.insertText(function(e){return"".concat(K.ME).concat(e.name)}(c),function(e){return"<@&".concat(e.id,">")}(c));return{type:$t.MENTION}}));const Vr=function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({sentinel:K.a4,matches:function(e,t,n,r,o){var i,a;return r&&null!==(a=null===(i=o.chatInputType.autocomplete)||void 0===i?void 0:i.addReactionShortcut)&&void 0!==a&&a&&(fn.Z.can(se.Plq.ADD_REACTIONS,e)||e.isPrivate())},queryResults:function(e,t,n,r,o){return{results:{emojis:Sn.ZP.queryEmojiResults({query:n,channel:e,intention:se.HzX.REACTION}).emojis.unlocked}}},renderResults:function(e){var t=e.results.emojis,n=e.selectedIndex;return Pn({query:e.query, selectedIndex:n,autocompletes:t,onHover:e.onHover,onClick:e.onClick,titleWithQuery:q.Z.Messages.REACTIONS_MATCHING,titleWithoutQuery:q.Z.Messages.EMOJI,Component:Qe.Emoji,getProps:function(e){return{emoji:e,key:e.id||e.uniqueName||e.name,sentinel:K.Iv}},getQuery:function(e){return"".concat(K.a4).concat(e)},key:"reactions"})}},"onSelect",(function(e){var t=e.results.emojis,n=e.index,r=e.options,o=t[n];r.sendMessage(function(e){return"".concat(K.a4).concat(e.name).concat(K.jp)}(o));return{type:$t.REACTION}}));function Wr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var zr,Yr=[Jt.CHOICES,Jt.GIFS,Jt.COMMAND_OPTIONS,Jt.EMOJIS_AND_STICKERS,Jt.REACTIONS,Jt.CHANNELS,Jt.MENTIONS,Jt.COMMANDS,Jt.LEGACY_COMMANDS],Kr=(Wr(zr={},Jt.CHANNELS,Mn),Wr(zr,Jt.COMMANDS,Fn),Wr(zr,Jt.COMMAND_OPTIONS,er),Wr(zr,Jt.CHOICES,Jn),Wr(zr,Jt.EMOJIS_AND_STICKERS,ur),Wr(zr,Jt.GIFS,Pr),Wr(zr,Jt.LEGACY_COMMANDS,Gr),Wr(zr,Jt.MENTIONS,Hr), Wr(zr,Jt.REACTIONS,Vr),zr);function qr(e){var t,n=e.activeCommandOption,r=e.canMentionUsers,o=void 0===r||r,i=e.canMentionRoles,a=void 0===i||i,l=e.canMentionChannels,u=void 0===l||l,c=e.canMentionEveryone,s=e.canMentionClyde,f=void 0!==s&&s,d=e.useNewSlashCommands,p=e.canOnlyUseTextCommands,h=e.canSendStickers,y=e.hideMentionDescription,b=e.hidePersonalInformation,v=e.type,m=e.emojiIntention,g=e.editorRef,O=e.onSendMessage,E=e.onSendSticker,C=e.setValue,S={mentions:{channel:Kt.DENY,global:Wt.DENY,role:Yt.DENY,user:zt.DENY,clyde:qt.DENY},commands:Qt.DISABLED,allowStickers:!0===h,forNonStringCommandOption:null!=n&&n.type!==j.jw.STRING,hideMentionDescription:!0===y,hidePersonalInformation:!0===b,chatInputType:v,emojiIntention:m,sendMessage:O,sendSticker:E,insertText:function(e,t){var n;null===(n=g.current)||void 0===n||n.insertAutocomplete(e,null!=t?t:e)},replaceText:function(e,t){C(e,null!=t?t:(0,On.JM)(e))},getCommandOptionValues:function(){var e ;return null===(e=g.current)||void 0===e?void 0:e.getCommandOptionValues()}};if(null!=n){var I=(0,gn.$z)(n);I.canMentionChannels&&(S.mentions.channel=Kt.ALLOW_SELECTABLE);I.canMentionEveryone&&(S.mentions.global=I.canMentionHere?Wt.ALLOW_EVERYONE_OR_HERE:Wt.ALLOW_EVERYONE);I.canMentionRoles&&(S.mentions.role=I.canMentionNonMentionableRoles?Yt.ALLOW_ALL:Yt.ALLOW_MENTIONABLE);I.canMentionUsers&&(S.mentions.user=I.canMentionAnyGuildUser?zt.ALLOW_GUILD:zt.ALLOW_CHANNEL);S.hideMentionDescription=!0}else{u&&(S.mentions.channel=Kt.ALLOW_SELECTABLE);a&&(S.mentions.role=Yt.ALLOW_MENTIONABLE);o&&(S.mentions.user=zt.ALLOW_CHANNEL);c&&(S.mentions.global=Wt.ALLOW_EVERYONE_OR_HERE);f&&(S.mentions.clyde=qt.ALLOW)}(null===(t=v.commands)||void 0===t?void 0:t.enabled)&&(S.commands=d?p?Qt.NEW_TEXT_ONLY:Qt.NEW:Qt.OLD_BUILT_INS);null!=n&&null!=n.channelTypes&&(S.allowedChannelTypes=n.channelTypes);return S}function Qr(e){var t=e.type,n=e.channel,r=e.guild,o=e.query,i=e.isAtStart,a=e.options,l=Kr[t] ;if(null!=l.sentinel){if(!o.startsWith(l.sentinel))return!1;o=o.substring(l.sentinel.length)}return!(null!=l.matches&&!l.matches(n,r,o,i,a))}function Xr(e){var t=e.channel,n=e.guild,r=e.options,o=e.currentWord,i=e.currentWordIsAtStart,a=e.textValue,l=e.optionText,u=null,c=!0,s=!1,f=void 0;try{for(var d,p=Yr[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value,y=Kr[h];if(h===Jt.GIFS||h===Jt.CHOICES){if(r.commands===Qt.OLD_BUILT_INS){if(Qr({type:h,channel:t,guild:n,query:a,isAtStart:!1,options:r})){u={type:h,typeInfo:y,query:a};break}}else if(Qr({type:h,channel:t,guild:n,query:l,isAtStart:!1,options:r})){u={type:h,typeInfo:y,query:l};break}}else if(h===Jt.COMMANDS&&r.commands!==Qt.OLD_BUILT_INS){if(Qr({type:h,channel:t,guild:n,query:a,isAtStart:!0,options:r})){var b,v;u={type:h,typeInfo:y,query:a.substring(null!==(v=null===(b=y.sentinel)||void 0===b?void 0:b.length)&&void 0!==v?v:0)};break}}else if(h===Jt.LEGACY_COMMANDS){if(Qr({type:h,channel:t,guild:n,query:a,isAtStart:i, options:r})){u={type:h,typeInfo:y,query:a};break}}else if(null!=o&&Qr({type:h,channel:t,guild:n,query:o,isAtStart:i,options:r})){var m,g;u={type:h,typeInfo:y,query:o.substring(null!==(g=null===(m=y.sentinel)||void 0===m?void 0:m.length)&&void 0!==g?g:0)};break}}}catch(e){s=!0;f=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw f}}if(null==u)return null;u.query=u.query.toLocaleLowerCase();return u}function Jr(e,t){if(null==t||null==e)return null;var n;if(null!=e.choices||e.autocomplete)n=Jt.CHOICES;else switch(e.type){case j.jw.BOOLEAN:n=Jt.CHOICES;break;case j.jw.CHANNEL:n=Jt.CHANNELS;break;case j.jw.ROLE:case j.jw.USER:case j.jw.MENTIONABLE:n=Jt.MENTIONS;break;default:return null}return{type:n,typeInfo:Kr[n],query:t}}function $r(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function eo(e){eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return eo(e)} function to(e){for(var t=1;t0&&this.props.navigator.focusNextItem();if(null!=this.state.selectedIndex&&(null===(t=this.state.query)||void 0===t?void 0:t.type)===Jt.COMMANDS){var n,r=null===(n=this.state.query.results.commands)||void 0===n?void 0:n[this.state.selectedIndex];null!=r&&$e.Sg(this.props.channel.id,r.id)}return!0};r.onMaybeShowAutocomplete=function(){this.emit("update")};r.onHideAutocomplete=function(){null!=this.state.query&&this.setState({isVisible:!1})};r.onResultHover=function(e){this.props.navigator.setFocus(null);this.setSelectedIndex(null)};r.onResultClick=function(e){this.selectResult(e,!0)};r.clearQuery=function(){this.setState({query:null,isVisible:!1,selectedIndex:null})};r.queryResults=function(){this.updateResults()} ;r.isVisible=function(){return this.state.isVisible};r.updateResults=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=this.props.editorRef.current){var o=qr(this.props),i=Xr({channel:this.props.channel,guild:this.props.guild,options:o,currentWord:this.props.currentWord,currentWordIsAtStart:this.props.currentWordIsAtStart,textValue:this.props.textValue,optionText:this.props.optionText}),a=o.commands!==Qt.DISABLED?Jr(this.props.activeCommandOption,this.props.currentWord):null;if(null==i&&null!=a)i=a;else if(null==i||null!=a&&i.type!==a.type){this.clearQuery();return}var l=i.type,u=i.typeInfo,c=i.query,s=r||n&&((null===(e=this.state.query)||void 0===e?void 0:e.queryText)!==c||(null===(t=this.state.query)||void 0===t?void 0:t.typeInfo)!==u),f=u.queryResults(this.props.channel,this.props.guild,c,o,s),d=f.results,p=f.metadata,h=0,y=!0,b=!1,v=void 0;try{ for(var m,g=Object.values(d)[Symbol.iterator]();!(y=(m=g.next()).done);y=!0){var O=m.value;Array.isArray(O)&&(h+=O.length)}}catch(e){b=!0;v=e}finally{try{y||null==g.return||g.return()}finally{if(b)throw v}}var E=!0===d.isLoading,C=this.shouldShow(h,E,u),j=this.state.selectedIndex;!C||E?j=null:null!=j&&j>=h&&(j=h-1);C&&!this.state.isVisible&&vn(l,this.props.channel,p);this.setState({query:{type:l,typeInfo:u,queryText:c,results:d,resultCount:h,options:o,isLoading:E},isVisible:C,selectedIndex:j})}};r.shouldShow=function(e,t,n){return this.props.focused&&null==this.props.expressionPickerView&&(e>0||t||n.showEmpty)};r.selectResult=function(e,t){var n;if(!this.state.isVisible)return!1;var r=this.state.query,o=r.type,i=r.typeInfo,a=r.results,l=r.resultCount,u=r.options;if(e>=l)return!1;var c=null===(n=i.onSelect)||void 0===n?void 0:n.call(i,{results:a,index:e,type:t?Xt.SEND:Xt.INSERT,options:u,channel:this.props.channel});if(null!=c){var s;!function(e,t,n,r){var o,i,a,l,u ;ce.default.track(se.rMx.CHANNEL_AUTOCOMPLETE_SELECTED,bn(yn({},(0,S.v_)(n),(0,S.hH)(n.guild_id)),{autocomplete_type:e,selection_type:t,emoji_id:null==r?void 0:r.emojiId,sticker_id:null==r?void 0:r.stickerId,num_emoji_results:null!==(o=null==r?void 0:r.numEmojiResults)&&void 0!==o?o:0,num_sticker_results:null!==(i=null==r?void 0:r.numStickerResults)&&void 0!==i?i:0,emoji_name:null!==(a=null==r?void 0:r.expressionName)&&void 0!==a?a:"",is_custom:null!==(l=null==r?void 0:r.isCustom)&&void 0!==l&&l,is_animated:null!==(u=null==r?void 0:r.isAnimated)&&void 0!==u&&u}))}(o,null!==(s=c.type)&&void 0!==s?s:null,this.props.channel,c.metadata)}return!0};r.setState=function(e){for(var t in e)if(e[t]!==this.state[t]){this.state=to({},this.state,e);this.emit("change",this.state);return}};return n}(u()),uo=n(798159),co=n(247346);function so(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var n=l.query.resultCount-1;d.setFocus(n.toString());null==u||u(n)}},d=(0,uo.ZP)({id:i,isEnabled:l.isVisible,orientation:co.hy.VERTICAL,useVirtualFocus:!0,setFocus:function(e,t){ var n=c.document.querySelector(e);if(null!=n){var r;null===(r=a.current)||void 0===r||r.scrollIntoViewNode({node:n})}null==u||u(+t)},onNavigateNextAtEnd:function(){return s(!0)},onNavigatePreviousAtStart:function(){return f(!0)},scrollToStart:function(){s(!1,!1);return Promise.resolve()},scrollToEnd:function(){f(!1);return Promise.resolve()}});o.useEffect((function(){s(!0,!0)}),[null===(t=l.query)||void 0===t?void 0:t.type,null===(n=l.query)||void 0===n?void 0:n.queryText,null===(r=l.query)||void 0===r?void 0:r.isLoading,l.isVisible]);return d}({navId:"channel-autocomplete",scrollerRef:n,state:d,onFocus:function(e){return x.setSelectedIndex(e)}}),_=null===(r=e.editorRef.current)||void 0===r?void 0:r.getCurrentWord(),w=po(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function jo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const So=o.forwardRef((function(e,t){ var n,i,l=e.channel,u=e.type,c=e.editorHeight,s=e.onVisibilityChange,f=(0,Je.Dt)(),d=(0,p.e7)([ve.Z],(function(){return null!==(i=ve.Z.getGuild(l.guild_id))&&void 0!==i?i:null}),[l.guild_id]),y=o.useRef(),b=jo(yo(Eo(Oo({},e),{guild:d}),t,y),3),v=b[0],m=b[1],g=b[2],O=(null===(n=u.autocomplete)||void 0===n?void 0:n.forceChatLayer)?Gt.ZP:Ft.ZP,E=Me(v.selectedIndex);x(f,v.isVisible,E);Vt.trackExposure({});var C,j=Vt.useExperiment({}).usePopoutAutocomplete,S=on({editorHeight:c,type:u,state:v,isInPopoutExperiment:j}),I=o.useMemo((function(){return null==S?"":String(Date.now())}),[null==S?void 0:S.top,null==S?void 0:S.left,null==S?void 0:S.bottom,null==S?void 0:S.right]);o.useEffect((function(){s(v.isVisible)}),[s,v.isVisible]);if(!v.isVisible||null==v.query||void 0===S)return null;var _,w=null!==(C=v.query.typeInfo.renderResults({results:v.query.results,selectedIndex:v.selectedIndex,channel:l,guild:d,query:v.query.queryText,options:v.query.options,onHover:function(e){ return m.onResultHover(e)},onClick:function(e){return m.onResultClick(e)}}))&&void 0!==C?C:null;if(null==w)return null;var P=(go(_={},vo().autocompleteAttached,null==S),go(_,vo().autocompletePopout,null!=S),go(_,vo().bottom,null==S&&"bottom"===e.position),_),N=490;if(null!=S){var A,Z;N=(null===(A=u.autocomplete)||void 0===A?void 0:A.small)?200:(null===(Z=v.query)||void 0===Z?void 0:Z.type)===Jt.EMOJIS_AND_STICKERS?490:245}var M=(0,r.jsx)(Qe,{id:f,className:a()(vo().autocomplete,P),innerClassName:vo().autocompleteInner,onMouseDown:function(e){return e.preventDefault()},children:(0,r.jsx)(T.bG,{navigator:g,children:(0,r.jsx)(T.SJ,{children:function(e){var t=e.ref,n=Co(e,["ref"]);return(0,r.jsx)(h.h21,Eo(Oo({id:f,ref:function(e){var n;t.current=null!==(n=null==e?void 0:e.getScrollerNode())&&void 0!==n?n:null;y.current=e}},n),{className:vo().scroller,style:{maxHeight:N},role:"listbox","aria-labelledby":Re(f),children:w}))}})})});if(null!=S){var R;return(0,r.jsx)(O,{children:(0, r.jsx)(h.jRF,{reference:function(){return S},positionKey:I,position:null!==(R=e.position)&&void 0!==R?R:"top",align:"left",spacing:8,autoInvert:!0,nudgeAlignIntoViewport:!0,children:function(){return M}})})}return M}));function Io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _o(e){_o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return _o(e)}function wo(e,t){return!t||"object"!==Po(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xo(e,t){xo=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return xo(e,t)}var Po=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function No(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0 ;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_o(e);if(t){var o=_o(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wo(this,n)}}var Ao=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&xo(e,t)}(n,e);var t=No(n);function n(){Io(this,n);return t.apply(this,arguments)}var r=n.prototype;r.on=function(){0;return this};r.once=function(){0;return this};r.addListener=function(){0;return this};r.removeListener=function(){0;return this};r.emit=function(){0;return!1};return n}(u()),To=o.createContext(new Ao),Zo=To.Provider;To.Consumer;const Mo=To ;var Ro=n(289283),Lo=n(809784),Do=n(944010),ko=n(213276),Uo=n(913549),Bo=n(77918),Fo=n(293862),Go=n(217544),Ho=n(23279),Vo=n.n(Ho),Wo=n(579581),zo=n(394352),Yo=n(593166),Ko=n(159895),qo=n(799066),Qo=n(421281),Xo=Object.freeze({showPremiumUpsell:!1}),Jo=(0,I.Z)((function(e){return Xo})),$o=function(e){Jo.setState({showPremiumUpsell:e})},ei=Jo,ti=n(798826),ni=n(254631),ri=n(879913),oi=n(761731),ii=n(449401),ai=n(95891),li=n(71236),ui=n(940581),ci=n(931353),si=n.n(ci),fi=n(419302),di=n.n(fi);function pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=7)}),[b]);var m=function(e){var t=e.activeIndex,n=e.stickerPickerCategories,i=e.categoryListRef,l=e.firstStandardStickerCategoryOffsetTop,u=e.setShouldRenderShortcut,c=(0,Wo.O)(),s=(0,zo.Iu)((function(e){return""!==e.searchQuery})),f=o.useCallback((function(e,i,l){var u,f,d=(null===(u=n[0])||void 0===u?void 0:u.type)===pn.Ih.FAVORITE,p=d?1:0,y=(null===(f=n[p])||void 0===f?void 0:f.type)===pn.Ih.RECENT,b=n.length>0,v=n.length;if(0===i&&d){var m ;return(0,r.jsx)("div",{role:"listitem","aria-setsize":v,"aria-posinset":i,children:(0,r.jsx)(h.P3F,{"aria-label":q.Z.Messages.CATEGORY_FAVORITE,className:a()(si().stickerCategory,si().stickerCategoryGeneric,(m={},hi(m,si().stickerCategoryGenericDisabled,b&&!d),hi(m,si().stickerCategoryGenericSelected,!s&&d&&0===t),m)),onClick:l,children:(0,r.jsx)(li.Z,{className:si().stickerCategoryGenericIcon,height:Ei,width:Ei})})},"favorites")}if(i===p&&y){var g;return(0,r.jsx)("div",{role:"listitem","aria-setsize":v,"aria-posinset":i,children:(0,r.jsx)(h.P3F,{"aria-label":q.Z.Messages.STICKER_PICKER_CATEGORIES_RECENT,className:a()(si().stickerCategory,si().stickerCategoryGeneric,(g={},hi(g,si().stickerCategoryGenericDisabled,b&&!y),hi(g,si().stickerCategoryGenericSelected,!s&&y&&t===p),g)),onClick:l,children:(0,r.jsx)(ii.Z,{className:si().stickerCategoryGenericIcon,height:Ei,width:Ei})})},"recent")} var O,E=t===i,C=n[i],j=n[i+1],S=null!=j&&C.type===pn.Ih.GUILD&&j.type!==pn.Ih.GUILD,I=C.type===pn.Ih.PACK,_="",w=null;if(C.type===pn.Ih.GUILD||C.type===pn.Ih.EMPTY_GUILD_UPSELL){var x=ve.Z.getGuild(C.id);if(null!=x){O=x.id;_=x.name;w=(0,r.jsx)(oi.Z,{guild:x,isSelected:E})}}else if(I){var P=ye.Z.getStickerPack(C.id);if(null!=P){_=P.name;w=(0,r.jsx)(In.ZP,{disableAnimation:!E||s,size:gi,sticker:(0,be.Zt)(P)})}}return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(h.ua7,{position:"right",text:_,tooltipContentClassName:si().tooltip,children:function(e){var t;return(0,r.jsx)("div",{role:"listitem","aria-setsize":v,"aria-posinset":i,children:(0,r.jsx)(h.P3F,bi(yi({},e),{"aria-label":_,className:a()(si().stickerCategory,(t={},hi(t,si().premiumCategory,I),hi(t,si().premiumCategorySelected,!s&&E&&I),t)),onClick:function(){C.type===pn.Ih.PACK&&ce.default.track(se.rMx.EXPRESSION_PICKER_CATEGORY_SELECTED,{location:null==c?void 0:c.location,tab:ui.X1.STICKER,sticker_pack_id:C.id,guild_id:O});l()}, children:w}))})}}),S?(0,r.jsx)("hr",{className:si().guildCategorySeparator},"separator"):null]},C.id)}),[t,c,s,n]);return{getScrollOffsetForIndex:o.useCallback((function(e,t){return t?Ii:0}),[]),renderCategoryListItem:f,rowHeight:o.useCallback((function(e,t){var r=n[t],o=n[t+1],i=null!=o&&r.type===pn.Ih.GUILD&&o.type!==pn.Ih.GUILD;return gi+(i?_i:Oi)}),[n]),onScroll:o.useCallback((function(e){var t,n=null===(t=i.current)||void 0===t?void 0:t.getListDimensions();if(null!=n){var r=e+n.height;u(r-Cie.length)&&(t=e.length);for(var n=0,r=new Array(t);npa?Ca:ja,preferAnimation:n<=ha,ownedStickerPacks:v,isDisplayingIndividualStickers:!0,channel:m,currentUser:O },e):null}),[d,a,l,u,c,s,f,C,j,n,v,m,O]),P=o.useCallback((function(e,t){return(0,r.jsx)("div",{children:t},e)}),[]),N=o.useCallback((function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isStickerPack,r=void 0===n||n,o=new Set(t),i=t.has(e);i?o.delete(e):o.add(e);ce.default.track(se.rMx.EXPRESSION_PICKER_CATEGORY_COLLAPSE_TOGGLED,{location:null==g?void 0:g.location,tab:ui.X1.STICKER,collapsed:!i,sticker_pack_id:r?e:null});w(o)}),[g,t,w]);return{renderRow:x,renderSection:P,renderSectionHeader:o.useCallback((function(e){var n=y[e];if(null!=b){var o=b.sendable,i=b.sendableWithPremium;if(0===e&&o.length>0)return null;var a=o.length>0&&i.length>0;return(0,r.jsxs)(r.Fragment,{children:[a?(0,r.jsx)("div",{className:aa().divider,children:(0,r.jsx)(h.$i$,{})}):null,(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKERS_YOU_MIGHT_LIKE_A11Y,children:q.Z.Messages.STICKERS_YOU_MIGHT_LIKE},"stickers-you-might-like-header")]})}switch(n.type){ case pn.Ih.FAVORITE:return(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:n.name}),icon:(0,r.jsx)(li.Z,{height:16,width:16}),isCollapsed:t.has(n.id),onClick:function(){return N(n.id,{isStickerPack:!1})},children:n.name},"header-".concat(n.id));case pn.Ih.RECENT:return(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:n.name}),icon:(0,r.jsx)(ii.Z,{}),isCollapsed:t.has(n.id),onClick:function(){return N(n.id,{isStickerPack:!1})},children:n.name},"header-".concat(n.id));case pn.Ih.GUILD:case pn.Ih.EMPTY_GUILD_UPSELL:var l=ve.Z.getGuild(n.id);return null==l?null:(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:l.name}),icon:(0,r.jsx)(oi.Z,{guild:l,height:16,width:16}),isCollapsed:t.has(l.id),onClick:function(){return N(l.id)},children:l.name},"h".concat(l.id));case pn.Ih.PACK: var u=ye.Z.getStickerPack(n.id);return null==u?null:(0,r.jsx)(A.Z,{className:aa().packHeader,"aria-label":q.Z.Messages.STICKER_CATEGORY_A11Y_LABEL.format({categoryName:u.name}),icon:(0,r.jsx)(In.ZP,{disableAnimation:!0,size:12,sticker:(0,be.Zt)(u)}),isCollapsed:t.has(u.id),onClick:function(){return N(u.id)},children:u.name},"h".concat(u.id))}}),[t,y,N,b]),sectionHeaderHeight:o.useCallback((function(e){if(null!=b){var t=b.sendable,n=b.sendableWithPremium;if(0===e&&t.length>0)return 0;var r=t.length>0&&n.length>0?Oa:0;return Ea+r}return Ea}),[b]),renderSectionFooter:o.useCallback((function(e){var n=y[e],o=t.has(n.id);return n.type!==pn.Ih.EMPTY_GUILD_UPSELL||null!=b||o?null:(0,r.jsx)(Yi,{className:aa().emptyGuildUpsell,guildId:n.id,channel:m,shouldTrackUpsellViewed:!I,setTrackedUpsellViewed:_},"sticker-picker-empty-guild-inline-upsell-".concat(n.id))}),[y,t,b,m,I]),sectionFooterHeight:o.useCallback((function(e){var n=y[e],r=t.has(n.id);return n.type!==pn.Ih.EMPTY_GUILD_UPSELL||r?0:Na }),[y,t])}}({collapsedStickersCategories:n,gridWidth:i,stickersCategories:g,stickersGrid:O,isScrolling:j,isUsingKeyboardNavigation:s,onSelectSticker:d,getStickerItemProps:l,getStickerRowProps:u,gutterWidth:c,inspectedStickerPosition:w,filteredStickers:a,ownedStickerPacks:o.useMemo((function(){return new Set(Z.map((function(e){return e.id})))}),[Z]),channel:E}),R=M.renderRow,L=M.renderSection,D=M.renderSectionFooter,k=M.sectionFooterHeight,U=M.renderSectionHeader,B=M.sectionHeaderHeight,F=(0,N.Qs)({activeCategoryIndex:_,isScrolling:j,listRef:S,onActiveCategoryIndexChange:P.ZN.setActiveCategoryIndex,scrollOffset:20,searchQuery:T});(0,N.Xs)({searchQuery:T,activeCategoryIndex:_,listRef:S});o.useImperativeHandle(t,(function(){var e,t,n;return{scrollTo:function(){for(var e=arguments.length,t=new Array(e),n=0;npa?_a:wa,sectionHeaderHeight:B,sectionFooterHeight:k,stickyHeaders:!0,ref:S }),(0,r.jsx)(na,{stickersGrid:O})]})})}));const Ra=Ma;var La=n(707558),Da=n(650332),ka=n(606714),Ua=n.n(ka);const Ba=o.forwardRef((function(e,t){var n=e.onKeyDown,i=e.stickersListRef,a=e.channel,l=(0,Go.fQ)(a),u=o.useRef(null),c=(0,zo.Iu)((function(e){return{searchQuery:e.searchQuery,searchPlaceholder:e.searchPlaceholder,isSearchSuggestion:e.isSearchSuggestion}}),f.Z),s=c.searchQuery,d=c.searchPlaceholder,p=c.isSearchSuggestion,h=P.ZN.useStore((function(e){return e.inspectedExpressionPosition}),f.Z),y=o.useCallback((function(e){var t;P.ZN.setActiveCategoryIndex(""===e?0:Ri.c);P.ZN.setInspectedExpressionPosition(0,0);(0,zo.$2)(null);(0,zo.ql)(e);null===(t=i.current)||void 0===t||t.scrollTo(0)}),[i]),b=o.useCallback((function(){(0,zo.ql)("")}),[]);o.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.focus()}}}));o.useLayoutEffect((function(){if(p){var e;null===(e=u.current)||void 0===e||e.focus()}}),[p]);return(0, r.jsx)("div",{className:Ua().wrapper,children:(0,r.jsx)(Da.ZP,{autoFocus:l,disabled:!l,query:s,ref:u,size:Da.ZP.Sizes.MEDIUM,placeholder:null!=d?d:l?q.Z.Messages.SEARCH_FOR_STICKERS:q.Z.Messages.NO_STICKERS_TO_SEARCH_THROUGH,onClear:b,onKeyDown:n,onQueryChange:y,className:Ua().searchBar,preventEscapePropagation:!1,useKeyboardNavigation:!1,inputProps:{"aria-haspopup":"grid","aria-controls":Ri.Vr,"aria-expanded":!0,"aria-activedescendant":(0,La.NE)(Ri.Vr,h.columnIndex,h.rowIndex)}})})}));var Fa=n(189865),Ga=n(850841),Ha=n(96194),Va=n.n(Ha),Wa=n(5064),za=n.n(Wa);function Ya(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Ka=function(){return $o(!1)},qa=function(e){var t,n,i=e.onLearnMore,l=(0,m.Z)(v.Z.PREMIUM_UPSELL).analyticsLocations;o.useEffect((function(){ce.default.track(se.rMx.PREMIUM_UPSELL_VIEWED,{location_section:se.jXE.STICKER_PICKER_UPSELL,type:fe.cd.STICKER_PICKER_UPSELL,location_stack:l})}),[l]);var u,c=(0, xi.Np)(),s=(null==c||null===(t=c.subscription_trial)||void 0===t?void 0:t.sku_id)===fe.Si.TIER_0,f=null!=c;return(0,r.jsxs)("div",{className:Va().upsellWrapper,children:[(0,r.jsx)("div",{className:Va().upsellBackground}),(0,r.jsxs)("div",{className:Va().upsellContent,children:[(0,r.jsx)("img",{className:a()(Va().upsellImage,Ya({},Va().upsellImageSmaller,f)),src:za(),alt:q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_ALT}),(0,r.jsx)("div",{className:Va().upsellBody,children:f?(0,r.jsx)(Pi.ZP,{type:Pi.As.STICKERS_CUSTOM,subscriptionTier:null!==(u=null==c||null===(n=c.subscription_trial)||void 0===n?void 0:n.sku_id)&&void 0!==u?u:fe.Si.TIER_2,children:s?q.Z.Messages.STICKER_PICKER_PREMIUM_TIER_UPSELL_DESCRIPTION.format({planName:(0,Ga.aq)(fe.Xh.PREMIUM_MONTH_TIER_0),onClick:i}):q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_DESCRIPTION.format({onClick:i})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.xvT,{className:Va().upsellTitle,color:"header-primary",variant:"text-lg/semibold", children:q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_TITLE}),(0,r.jsx)(h.xvT,{className:Va().upsellDescription,variant:"text-md/normal",children:q.Z.Messages.STICKER_PICKER_PREMIUM_UPSELL_DESCRIPTION.format({onClick:i})})]})}),(0,r.jsx)(Mi,{analyticsSection:se.jXE.EXPRESSION_PICKER,buttonText:f?s?q.Z.Messages.PREMIUM_TRIAL_TIER_0_CTA_BUTTON_VARIANT:q.Z.Messages.PREMIUM_TRIAL_CTA_BUTTON_VARIANT:void 0})]}),(0,r.jsx)(h.P3F,{className:Va().upsellClose,onClick:Ka,children:(0,r.jsx)(Fa.Z,{})})]})},Qa=function(e,t,n){if(""===e)return null;var r=[],o=[];(function(e){return Sn.ZP.queryStickers([e],!0).map((function(e){return e.sticker}))})(e).forEach((function(e){var i=(0,tr.cO)(e,t,n);i===tr.eb.SENDABLE?r.push(e):i===tr.eb.SENDABLE_WITH_PREMIUM&&o.push(e)}));return{sendable:r,sendableWithPremium:o}},Xa=n(526306),Ja=n.n(Xa);function $a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]cl,V=(0,Go.el)({filteredStickers:T,stickersCategories:S,collapsedStickersCategories:x,listWidth:_,listPaddingRight:fl,stickerNodeMargin:H?dl:pl,stickerNodeWidth:H?vl:ml}),W=V.rowCount,z=V.rowCountBySection,Y=V.stickersGrid,K=V.gutterWidth,q=V.columnCounts,Q=o.useCallback((function(e,t){t.location;switch(e.type){case pn.al.CREATE_STICKER:ce.default.track(se.rMx.OPEN_MODAL,{type:se.jXE.CREATE_STICKER_MODAL,location:c});(0,h.ZDy)(tl((function(){var t,o;return ul(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(56729),n.e(11260)]).then(n.bind(n,856729))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,rl({guildId:e.guild_id},t))}]}}))})));break;case pn.al.STICKER:null!=e.sticker&&(0, tr.kl)(e.sticker,A,a)&&G(e)}}),[c,A,a,G]),X=function(e){var t=e.columnCounts,n=e.stickersGrid,r=e.stickersListRef,i=e.store,a=e.gridNavigatorId,l=e.setInspectedStickerPosition,u=e.onGridItemSelect,c=(0,Wo.O)(),s=o.useCallback((function(e){u(e,c)}),[u,c]),f=o.useCallback((function(e,t){l(e,t,ri.u.GRID_NAVIGATOR_EVENT)}),[l]),d=(0,N.VO)({columnCounts:t,gridNavigatorId:a,itemGrid:n,itemList:r,onGridNavigatorItemSelect:s,onGridNavigatorPositionChange:f}),p=d.gridDispatch,h=d.getItemProps,y=d.getRowProps,b=d.gridContainerProps,v=d.handleGridContainerKeyDown,m=d.isUsingKeyboardNavigation;o.useEffect((function(){return i.useStore.subscribe((function(e){if(null!=e){var t=e.columnIndex,n=e.rowIndex;e.source!==ri.u.GRID_NAVIGATOR_EVENT&&p({type:ni.s.SET_FOCUSED_POSITION,x:t,y:n})}}),(function(e){return e.inspectedExpressionPosition}))}),[p,i]);return{getItemProps:h,getRowProps:y,gridContainerProps:b,handleGridContainerKeyDown:v,isUsingKeyboardNavigation:m}}({columnCounts:q,stickersListRef:y, stickersGrid:Y,onGridItemSelect:Q,store:P.ZN,setInspectedStickerPosition:P.ZN.setInspectedExpressionPosition,gridNavigatorId:Ri.Vr}),J=X.getItemProps,$=X.getRowProps,ee=X.gridContainerProps,te=X.handleGridContainerKeyDown,ne=X.isUsingKeyboardNavigation;o.useEffect((function(){return P.ZN.resetStoreState}),[]);var re=function(){var e=a.getGuildId(),t=[];if(null!==e){var n;t=null!==(n=ye.Z.getStickersByGuildId(e))&&void 0!==n?n:[]}var r=0;null!=R&&al(R.values()).forEach((function(e){r+=e.length}));(0,ti.ev)({containerWidth:i,favoriteStickers:Z,frequentlyUsedStickers:M,guildStickers:t,stickersTotal:r})};o.useEffect((function(){""===j.current&&""!==E&&(0,ti.n8)();j.current=E}),[E]);o.useEffect((function(){0===F?gl(E):Ol(E,F,C)}),[E,F,C]);o.useLayoutEffect((function(){var e;null===(e=b.current)||void 0===e||e.focus()}),[]);var oe=o.useCallback((function(){u();ce.default.track(se.rMx.PREMIUM_PROMOTION_OPENED,{location_section:se.jXE.STICKER_PICKER_UPSELL});(0,Yo.z)()}),[u]);return(0, r.jsxs)(s,{children:[(0,r.jsx)("div",{className:Ja().header,children:(0,r.jsx)(Ba,{ref:b,onKeyDown:te,stickersListRef:y,channel:a})}),I?(0,r.jsx)(ki,{className:Ja().emptyState}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",ol(rl({ref:d,className:Ja().listWrapper,id:Ri.Vr},ee),{children:null!=_?(0,r.jsx)(Ra,{ref:y,collapsedStickersCategories:x,filteredStickers:T,getStickerItemProps:J,getStickerRowProps:$,gridWidth:_,gutterWidth:K,isUsingKeyboardNavigation:ne,onSelectSticker:G,rowCount:W,rowCountBySection:z,stickersCategories:S,stickersGrid:Y,channel:a}):null})),(0,r.jsx)(wi,{stickersListRef:y,channel:a})]}),g&&(0,r.jsx)(qa,{onLearnMore:oe})]})})),Cl=function(e,t){(0,Go.fP)();return(0,r.jsx)("div",{className:Ja().wrapper,id:Ri.nZ,"aria-labelledby":Ri.ED,role:"tabpanel",children:e.isLoading?(0,r.jsx)(h.$jN,{className:Ja().loadingIndicator}):(0,r.jsx)(El,ol(rl({},e),{ref:t}))})};const jl=o.forwardRef(Cl);var Sl=n(379991),Il=n(930948),_l=n(763993),wl=n(936957),xl=n(448184),Pl=n.n(xl) ;function Nl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ml(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()} var Rl=ui.Om+wl.Su.MEDIUM,Ll=o.memo((function(e){var t=e.isActive,n=e.className,o=e.viewType,i=e.autoFocus,l=void 0!==i&&i,u=e["aria-controls"],c=Zl(e,["isActive","className","viewType","autoFocus","aria-controls"]);return(0,r.jsx)(h.zxk,Tl(function(e){for(var t=1;t=a?ui._j.MAX:e<=ui.Om?ui._j.MIN:e;null==t&&null!=n.current&&(n.current.style.width="");Do.ZP.updatedUnsyncedSettings({expressionPickerWidth:t});s(t)}),[n,a]),h=(0,Uo.Z)({initialElementDimension:f,maxDimension:a,minDimension:ui.Om,resizableDomNodeRef:n,onElementResize:d,orientation:Uo.y.HORIZONTAL_LEFT});o.useEffect((function(){var e=E().debounce((function(){null!=t.current&&l(t.current.offsetWidth)}),500);window.addEventListener("resize",e) ;return function(){window.removeEventListener("resize",e)}}),[t]);o.useLayoutEffect((function(){null!=t.current&&l(t.current.offsetWidth)}),[t]);return{drawerWidth:f,handleDrawerResizeHandleMouseDown:o.useCallback((function(e){e.stopPropagation();null!=t.current&&l(t.current.offsetWidth);h(e)}),[t,h])}}({positionContainerRef:y,drawerRef:m}),O=g.drawerWidth,C=g.handleDrawerResizeHandleMouseDown,j=(0,zo.Iu)((function(e){return e.activeView})),I=(0,Go.fQ)(f),_=o.useContext(tn.ZP),w=_.renderWindow,x=_.windowDispatch,P=(0,p.e7)([ye.Z],(function(){return!ye.Z.hasLoadedStickerPacks})),N=o.useCallback((function(e){var t;if(!(0,h.$sL)()){var n=e.target;if(!(0,Lo.k)(n)||null==n.closest("."+ui.CT)){for(;(0,Lo.k)(n);){if(n===m.current)return;if("true"===n.getAttribute("data-menu-item"))return;if("true"===n.getAttribute("data-premium-tutorial-expression-picker-tooltip"))return;if("true"===n.getAttribute("data-premium-tutorial-persistent-coachmark-emoji-step"))return;n=n.parentNode}(0,zo._Q)() ;var r=null===(t=(0,_l.uB)(e))||void 0===t?void 0:t.activeElement;null!=r&&"BODY"!==r.tagName||Il.S.dispatchToLastSubscribed(se.CkL.TEXTAREA_FOCUS)}}}),[]),A=o.useCallback((function(){(0,zo._Q)()}),[]);o.useLayoutEffect((function(){var e=function(){j===ui.X1.GIF&&(0,zo._Q)()};w.addEventListener("mousedown",N);w.addEventListener("contextmenu",N);x.subscribe(se.CkL.POPOUT_CLOSE,A);Il.S.subscribe(se.CkL.CLOSE_GIF_PICKER,e);return function(){w.removeEventListener("mousedown",N);w.removeEventListener("contextmenu",N);x.unsubscribe(se.CkL.POPOUT_CLOSE,A);Il.S.unsubscribe(se.CkL.CLOSE_GIF_PICKER,e)}}),[j,A,N,w,x]);(0,h.Tbt)(y);o.useEffect((function(){(0,zo.ql)("")}),[]);o.useEffect((function(){if(null!=m.current&&!b.current)if(j===ui.X1.EMOJI){var e;if(null!=(null==v||null===(e=v.current)||void 0===e?void 0:e.onPickerOpen)){var t;null==v||null===(t=v.current)||void 0===t||t.onPickerOpen();b.current=!0}}else if(j===ui.X1.STICKER){var n ;if(null!=(null==v||null===(n=v.current)||void 0===n?void 0:n.onPickerOpen)&&!P){var r;null==v||null===(r=v.current)||void 0===r||r.onPickerOpen();b.current=!0}}else{S.ZP.trackWithMetadata(se.rMx.EXPRESSION_PICKER_OPENED,{width:m.current.offsetWidth,tab:j,badged:!1});b.current=!0}}));var T=(null===(t=d.gifs)||void 0===t?void 0:t.allowSending)&&!Ro.tq,Z=null===(n=d.stickers)||void 0===n?void 0:n.allowSending,M=!(null===(i=d.expressionPicker)||void 0===i?void 0:i.onlyEmojis)&&(T||Z);return(0,r.jsx)(ko.Z,{section:se.jXE.EXPRESSION_PICKER,children:(0,r.jsx)(Ft.W5,{className:Pl().positionLayer,reference:l,position:"top",align:"right",spacing:8,autoInvert:!0,children:function(e){var t=e.isPositioned;return(0,r.jsx)("section",{className:a()(Pl().positionContainer,Al({},Pl().positionContainerOnlyEmoji,!M)),ref:y,role:"dialog","aria-label":q.Z.Messages.EXPRESSION_PICKER,children:t?(0,r.jsxs)("div",{className:Pl().drawerSizingWrapper,style:{width:null==O?void 0:O},ref:m,children:[(0, r.jsx)("div",{className:Pl().resizeHandle,onMouseDown:C}),(0,r.jsxs)("div",{className:Pl().contentWrapper,children:[M?(0,r.jsx)("nav",{className:Pl().nav,children:(0,r.jsxs)("div",{className:Pl().navList,role:"tablist","aria-label":q.Z.Messages.EXPRESSION_PICKER_CATEGORIES_A11Y_LABEL,children:[T&&(0,r.jsx)(Ll,{id:wl._3,"aria-controls":wl.vO,"aria-selected":j===ui.X1.GIF,isActive:j===ui.X1.GIF,viewType:ui.X1.GIF,children:q.Z.Messages.EXPRESSION_PICKER_GIF}),Z?(0,r.jsx)(Ll,{id:Ri.ED,"aria-controls":Ri.nZ,"aria-selected":j===ui.X1.STICKER,isActive:j===ui.X1.STICKER,autoFocus:!I,viewType:ui.X1.STICKER,children:(0,r.jsx)("div",{className:Pl().stickersNavItem,children:q.Z.Messages.EXPRESSION_PICKER_STICKER})}):null,(0,r.jsx)(Ll,{id:wl.td,"aria-controls":wl.cZ,"aria-selected":j===ui.X1.EMOJI,isActive:j===ui.X1.EMOJI,viewType:ui.X1.EMOJI,children:q.Z.Messages.EXPRESSION_PICKER_EMOJI})]})}):null,j===ui.X1.STICKER&&M?(0,r.jsx)(jl,{isLoading:P,channel:f,containerWidth:O,onSelectSticker:s, closePopout:A,ref:function(e){v.current=e}}):null,j===ui.X1.GIF&&M?(0,r.jsx)(Fo.Z,{onSelectGIF:u,persistSearch:!0}):null,j===ui.X1.EMOJI?(0,r.jsx)(Bo.Z,{hasTabWrapper:!0,persistSearch:!0,channel:f,containerWidth:O,emojiSize:null!=O&&Oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Hl.t7){s.current=!0;d.cancel();r("");return[2]}if(!0===f.current)return[2];if(ye.Z.hasLoadedStickerPacks)return[3,3];f.current=!0;return[4,Kl()];case 2:n.sent();f.current=!1;n.label=3;case 3:d(c.current);n.label=4;case 4:return[2]}}))},function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){Wl(i,r,o,a,l,"next",e)}function l(e){Wl(i,r,o,a,l,"throw",e)}a(void 0)}))}),function(e){return n.apply(this,arguments)});return{handleTextChange:p,debouncedSetTextInputValue:d}},Ql=n(302901),Xl=n.n(Ql);function Jl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ru(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ou,iu=(0, Ul.Mg)(Xl().containerPadding),au=(0,Ul.Mg)(Xl().stickerSuggestionSize),lu=(0,Ul.Mg)(Xl().stickerSuggestionMargin),uu=2*au+lu+2*iu,cu=function(){return Promise.resolve()};!function(e){e[e.STICKER=0]="STICKER"}(ou||(ou={}));function su(e){var t=e.isFocused,n=e.isHidden,o=e.sendability,i=e.listIndex,l=e.sticker,u=e.onMouseOver,c=e.onSelectSticker,s=(0,T.JA)("".concat(i)),f=s.tabIndex,d=nu(s,["tabIndex"]);return(0,r.jsxs)(h.P3F,tu(eu({},d),{tabIndex:n?-1:f,className:a()(Xl().suggestedExpression,$l({},Xl().suggestedExpressionFocused,t)),focusProps:{enabled:!1},onClick:function(){return c(l,o)},onMouseOver:u,children:[(0,r.jsx)(ue.ZP,{mask:ue.ZP.Masks.STICKER_ROUNDED_RECT,width:au+4,height:au+4,className:Xl().mask,children:(0,r.jsx)("div",{className:Xl().maskBackground})}),(0,r.jsx)(In.ZP,{maskAsset:!0,size:au,sticker:l,className:Xl().sticker}),o!==tr.eb.SENDABLE&&(0,r.jsx)(Bl.Z,{size:14})]}))}const fu=o.memo((function(e){ var t,n=e.editorRef,i=e.channel,l=e.isEditorFocused,u=e.onSelectSticker,c=e.stickerIconVisible,s=void 0!==c&&c,f=e.submitButtonVisible,d=void 0!==f&&f,y=o.useContext(Mo),b=ru(o.useState(null),2),g=b[0],O=b[1],E=ru(o.useState(!1),2),C=E[0],j=E[1],S=ru(o.useState(null),2),I=S[0],_=S[1],w=(0,zo.Iu)((function(e){return null!=e.activeView})),x=o.useRef(null),P=ru(o.useState(""),2),N=P[0],A=P[1],Z=ru(o.useState(""),2),M=Z[0],R=Z[1],L=ru(o.useState(!1),2),D=L[0],k=L[1],U=ru(o.useState(!1),2),B=U[0],F=U[1],G=function(e,t,n){var r=(0,Go.fQ)(n),i=(0,p.e7)([ge.default],(function(){return ge.default.getCurrentUser()}));return o.useMemo((function(){var o=(0,Gl.wN)(e);if(t||null==e||""===e||o.length>Hl.t7||!r)return[];var a=[],l=[],u=(0,Gl.kT)(e),c=u===o[0]?o:[u].concat(zl(o));Sn.ZP.queryStickers(c,!1).forEach((function(e){var t=e.sticker,r=(0,tr.cO)(t,i,n),o={sticker:t,sendability:r};r===tr.eb.SENDABLE?a.push(o):r===tr.eb.SENDABLE_WITH_PREMIUM&&l.push(o)}));var s=[];if(a.length>0){ s=a.slice(0,Hl.qm);if(0!==l.length){s.length===Hl.qm&&s.pop();s.push(l[0])}}return s}),[e,n,r,t,i])}(N,C,i),H=(0,m.Z)(v.Z.EXPRESSION_SUGGESTIONS),V=H.analyticsLocations,W=H.AnalyticsLocationProvider,z=ql({setTextInputValue:A,setHasDismissed:j,setHasSelection:F,setFocusedSuggestionType:O}),Y=z.handleTextChange,K=z.debouncedSetTextInputValue;o.useEffect((function(){var e=function(e){k(e)},t=function(e){var t=""!==e&&null!=e;F(t);if(t){var r;O(null);null===(r=n.current)||void 0===r||r.focus()}};y.addListener("text-changed",Y);y.addListener("autocomplete-visibility-change",e);y.addListener("selection-changed",t);return function(){y.removeListener("text-changed",Y);y.removeListener("autocomplete-visibility-change",e);y.removeListener("selection-changed",t)}}),[Y,n,y]);o.useLayoutEffect((function(){null==g&&_(null)}),[g]);var Q=ru(o.useState(!1),2),X=Q[0],J=Q[1];o.useLayoutEffect((function(){requestAnimationFrame((function(){var e=x.current ;J(l||!0===(null==e?void 0:e.contains(null==e?void 0:e.ownerDocument.activeElement)))}))}),[l]);var $=G.length>0,ee=X&&!w&&!D&&!C&&!B&&$,te=function(e){var t=e.editorRef,n=e.hasStickerResults,r=e.shouldRenderSuggestions,i=e.focusedSuggestionType,a=e.setFocusedStickerListItem,l=e.setFocusedSuggestionType,u=e.setHasDismissed,c=e.setTextInputValue,s=o.useCallback((function(e,t){a(t)}),[a]),f=(0,uo.ZP)({id:"expression-suggestions-stickers",isEnabled:!0,scrollToStart:cu,scrollToEnd:cu,orientation:co.hy.HORIZONTAL,setFocus:s,useVirtualFocus:!0});o.useEffect((function(){var e=function(e){if(!(!r||e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){switch(e.key){case"ArrowUp":e.preventDefault();if(null==i&&n){f.focusFirstVisibleItem();l(ou.STICKER)}break;case"ArrowDown":var o;l(null);null===(o=t.current)||void 0===o||o.focus();break;case"Escape":var a;l(null);u(!0);c("");null===(a=t.current)||void 0===a||a.focus()}i===ou.STICKER&&f.containerProps.onKeyDown(e)}};window.addEventListener("keydown",e,{ capture:!0});return function(){return window.removeEventListener("keydown",e,{capture:!0})}}),[f,r,i,l,n,t,u,a,c]);return{stickersNavigator:f}}({editorRef:n,hasStickerResults:$,shouldRenderSuggestions:ee,focusedSuggestionType:g,setFocusedSuggestionType:O,setHasDismissed:j,setFocusedStickerListItem:_,setTextInputValue:A}).stickersNavigator,ne=function(e,t){if(ee){ce.default.track(se.rMx.AUTO_SUGGEST_EXPRESSION_SELECTED,{sticker_id:e.id,suggestion_trigger:M});if(t===tr.eb.SENDABLE){j(!0);u(e,pn.V0.EXPRESSION_SUGGESTIONS);K.cancel();A("")}else if((0,be.jl)(e)){var n=ye.Z.getStickerPack(e.pack_id);null!=n&&(0,oa.Z)({stickerPack:n,analyticsLocations:V})}y.emit("sticker-suggestions-hidden")}},re=o.useRef([]),oe=o.useRef(!1);o.useEffect((function(){ee&&(re.current=G);if(ee!==oe.current){y.emit(ee?"sticker-suggestions-shown":"sticker-suggestions-hidden");if(ee){(0,Gl.Tk)(N);R(N)}}oe.current=ee}),[y,ee,G,N]);var ie,ae=!ee,le=ee?G:re.current;return(0,r.jsx)(W,{children:(0,r.jsxs)(h.P3F,{ tabIndex:ae?-1:0,"aria-hidden":ae,className:a()(Xl().container,(ie={},$l(ie,Xl().hidden,ae),$l(ie,Xl().submitButtonOffset,d),$l(ie,Xl().stickerIconOffset,s),ie)),innerRef:x,style:{minWidth:uu},onClick:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.focus()},children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.bG,{navigator:te,children:(0,r.jsx)(T.SJ,{children:function(e){var t=e.ref,n=e.tabIndex,o=nu(e,["ref","tabIndex"]);return(0,r.jsx)("div",tu(eu({className:Xl().stickerResults,ref:function(e){t.current=e},onMouseLeave:function(){null==g&&_(null)},tabIndex:ae?-1:n},o),{children:le.map((function(e,t){var n=e.sticker,o=e.sendability;return(0,r.jsx)(su,{isFocused:I==="".concat(t),isHidden:ae,sendability:o,listIndex:t,onMouseOver:function(){te.setFocus("".concat(t));_("".concat(t))},onSelectSticker:ne,sticker:n},n.id)}))}))}})}),(0,r.jsxs)("div",{className:Xl().bottomInformationTextContainer,children:[(0,r.jsx)("div",{className:Xl().textDivider}),(0,r.jsxs)("div",{ className:Xl().bottomInformationLayout,children:[(0,r.jsx)(h.xvT,{className:Xl().descriptionText,style:{maxWidth:uu},variant:"text-sm/normal",children:null!=I?q.Z.Messages.EXPRESSION_SUGGESTIONS_STICKER_NAME.format({stickerName:null===(t=G[+I])||void 0===t?void 0:t.sticker.name}):q.Z.Messages.EXPRESSION_SUGGESTIONS_STICKER_SHORT_NAV_PROMPT.format({upHook:function(e,t){return(0,r.jsx)(h.M2$,{shortcut:"up",className:Xl().keybind},t)}})}),(0,r.jsx)(h.P3F,{onClick:function(){ce.default.track(se.rMx.STICKER_SUGGESTIONS_ENABLED_TOGGLED,{enabled:!1,location:{section:se.jXE.EXPRESSION_PICKER}});Ar.up.updateSetting(!1)},children:(0,r.jsx)(h.ua7,{text:q.Z.Messages.EXPRESSION_SUGGESTIONS_STICKER_DISABLE,children:function(e){return(0,r.jsx)(Fa.Z,tu(eu({},e),{className:Xl().closeIcon}))}})})]})]})]}),(0,r.jsx)("div",{className:Xl().containerBackground})]})})}));var du=n(99440),pu=n(944522),hu=n(545758),yu=n(736818),bu=n(44616),vu=n(533293),mu=n(367299),gu=n(991789),Ou=n(69540);function Eu(e,t){ (null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1||!(1===e.length&&"GROUP"===e[0].type&&"unknown"===e[0].id)}function Fu(e,t,n){var r=(0,hu.Z)(),i=ku(o.useState(!1),2),a=i[0],l=i[1],u=o.useMemo((function(){return E().debounce((function(e){(function(e,t,n,r){if(Bu(Lu.ZP.getProps(n,r).groups))return!0;if(e.lengtht)return!1;if(-1===e.indexOf(Uu))return!1;(0,Mu.b8)(n,r,Ru.KV);return!0})(e,r,t,n)&&l(!0)}),200,{maxWait:500})}),[r,t,n]);o.useEffect((function(){var r=Lu.ZP.getProps(t,n).groups;if(null!=t&&!Bu(r)&&!a){e.addListener("text-changed",u);return function(){e.removeListener("text-changed",u);u.cancel()}}}),[a,u,e,t,n])} var Gu=n(326470),Hu=n.n(Gu),Vu=n(608575),Wu=n(567867),zu=n(474717),Yu=n(296602),Ku=n(275374),qu=n(971402),Qu=n(495036);function Xu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ju(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function $u(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ju(i,r,o,a,l,"next",e)}function l(e){Ju(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tc(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nc(e){nc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return nc(e)}function rc(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0;){if(sc.test(t[n-1]))break;n--}return{word:t.slice(n,r),isAtStart:0===n}};i.blur=function(){var e=this._ref;null!=e&&e.blur()};i.submit=function(e){e.preventDefault();return this.props.onSubmit(this.props.value)};i.insertAutocomplete=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.getCurrentWord().word;if(null==r)this.insertText(e,t,n);else{var o=this._ref;if(null==o)return;var i=o.value.slice(0,o.selectionStart-r.length),a=o.value.slice(o.selectionEnd);this._insertText(e,i,a,n)}};i.insertText=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._ref;if(null!=r){ var o=r.value.slice(0,r.selectionStart),i=r.value.slice(r.selectionEnd);this._insertText(e,o,i,n)}};i._insertText=function(e,t,n,r){var o=this;if(null!=this._ref){r&&(e+=" ");var i=t+e+n,a=this.props.onChange;null==a||a(null,i,(0,On.JM)(i));var l=t.length+e.length;this.setState({nextSelection:l},(function(){o.props.maybeShowAutocomplete()}))}};i.hasOpenCodeBlock=function(){var e=this._ref;if(null==e)return!1;var t=this.props.value.slice(0,e.selectionStart).match(/```/g);return null!=t&&t.length>0&&t.length%2!=0};i.render=function(){var e=this.props,t=e.value,n=e.disabled,o=e.placeholder,i=e.onResize,l=e.className,u=e.submitting,c=e.textAreaPaddingClassName,s=e.spellcheckEnabled,f=e["aria-controls"],d=e["aria-expanded"],p=e["aria-activedescendant"];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Au.d9,{event:se.CkL.GLOBAL_CLIPBOARD_PASTE,handler:this.handleGlobalPaste}),(0,r.jsx)(h.lcI,{ref:this.handleSetRef,className:a()(l,c),rows:1,fontWidthEstimate:6,placeholder:o,disabled:n||u, onChange:this.handleOnChange,onResize:i,onKeyPress:this.handleKeyPress,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onPaste:this.handlePaste,onClick:this.handleClick,onContextMenu:this.handleContextMenu,value:n?"":t,tabIndex:0,spellCheck:s,"aria-controls":f,"aria-expanded":d,"aria-activedescendant":p,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-multiline":!0})]})};i.handleTabOrEnterDown=function(e){if(e.which===se.yXg.TAB&&this.props.onTab()){e.preventDefault();e.stopPropagation()}else if(e.which===se.yXg.ENTER&&this.props.onEnter(e)){e.preventDefault();e.stopPropagation()}else if(e.which===se.yXg.ESCAPE){e.preventDefault();e.stopPropagation();this.props.hideAutocomplete()}else if(e.which===se.yXg.TAB&&this.hasOpenCodeBlock()){e.preventDefault();e.stopPropagation();this.insertText("\t",void 0,!1)}};i.insertEmoji=function(e,t){this.insertText("".concat(":").concat(e.name).concat(":"),void 0,t)} ;i.getFirstText=function(){return this.props.value};return o}(o.PureComponent);const dc=fc;var pc=n(893691),hc=n(556635),yc=new WeakMap,bc=new WeakMap,vc={isMerging:function(e){var t;return null===(t=bc.get(e))||void 0===t||t},isSaving:function(e){var t;return null===(t=yc.get(e))||void 0===t||t},withoutMerging:function(e,t){var n=this.isMerging(e);bc.set(e,!1);try{t()}finally{bc.set(e,n)}},withoutSaving:function(e,t){var n=this.isSaving(e);yc.set(e,!1);try{t()}finally{yc.set(e,n)}},withSingleEntry:function(e,t){return mc(e,"other",!1,t)},withMergedEntry:function(e,t){return mc(e,"other",!0,t)},currentEntry:function(e){return e.history.stack.length>0?e.history.stack[e.history.index]:null},insertOrMergeEntry:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=vc.currentEntry(e);vc.isMerging(e)&&(null==r?void 0:r.mergeable)?this.mergeEntry(e,n):this.insertEntry(e,t,n)},insertEntry:function(e,t){ var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;o=null!=o?o:e.selection;r=null!=r?r:hc.bN.richValue(e);var i=e.history,a=vc.currentEntry(e);null!=a&&(a.mergeable=!1);i.stack.length>0&&(i.stack.length=i.index+1);for(;i.stack.length>=250;)i.stack.shift();i.stack.push({type:t,mergeable:n,createdAt:Date.now(),value:r,selection:o});i.index=i.stack.length-1},mergeEntry:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.selection,r=hc.bN.richValue(e),o=vc.currentEntry(e);if(null!=o){o.value=r;o.selection=n;t||(o.mergeable=!1)}}};function mc(e,t,n,r){var o=e.children,i=e.selection,a=vc.isSaving(e);yc.set(e,!1);try{var l=r();a&&(n?vc.mergeEntry(e):e.children!==o?vc.insertEntry(e,t,!1):!vc.isMerging(e)||null==e.selection||null!=i&&hc.M8.equals(e.selection,i)||vc.mergeEntry(e));return l}finally{yc.set(e,a)}}var gc=n(380942),Oc=n(22176),Ec=n(73948);function Cc(e,t,n,r){ for(var o,i=0,a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n"):"@".concat(l)});if(null!=i){var c=a||i.isPomelo()?null:"#".concat(i.discriminator);return(0,r.jsx)(h.ua7,{text:(0,r.jsxs)("div",{className:Uc().userTooltip,children:[(0,r.jsx)(Tc.Z,{user:i,animate:!0,size:h.EFr.SIZE_16,className:Uc().avatar}),Oe.ZP.getUserTag(i,{mode:"username", identifiable:a?"never":"always"}),(0,r.jsx)("span",{className:Uc().discriminator,children:c})]}),delay:750,position:"top","aria-label":Oe.ZP.getUserTag(i,{decoration:"never"}),children:function(e){return(0,r.jsx)(h.P3F,Vc(Hc({tag:"span"},e),{children:u}))}})}return u}function qc(e){var t=e.id,n=e.guildId,o=(0,p.e7)([ve.Z],(function(){var e=ve.Z.getGuild(n);return null==e?null:e.roles[t]})),i=(0,p.e7)([b.Z],(function(){return b.Z.roleStyle}));if(null==o)return(0,r.jsx)("span",{children:"@deleted-role"});var a=null!=o.color&&0!==o.color,l="dot"===i,u="username"===i&&a;return(0,r.jsxs)(Rc.Z,{color:u?o.color:null,children:[l&&(0,r.jsx)(h.FhE,{color:o.colorString,background:!1,tooltip:!1}),"@",o.name]})}function Qc(e){var t=e.id,n=(0,p.e7)([Ct.Z],(function(){return Ct.Z.getChannel(t)})),o=q.Z.Messages.UNKNOWN_CHANNEL,i="text",a=!0;if(null!=n){o=(0,Zc.YO)(n)?n.name:q.Z.Messages.NO_ACCESS;var l;i=(0,Zc.YO)(n)?null!==(l=(0,Lc.wl)(n))&&void 0!==l?l:"text":"locked";a=(0,Mc.B)(n.type)} return a?(0,r.jsx)(Rc.Z,{iconType:i,children:o}):(0,r.jsx)("span",{children:"#"+o})}function Xc(e){var t=e.id,n={home:q.Z.Messages.GUILD_HOME,browse:q.Z.Messages.CHANNEL_BROWSER_TITLE,customize:q.Z.Messages.CUSTOMIZE_COMMUNITY_TITLE};return(0,r.jsx)(Rc.Z,{iconType:t,children:n[t]})}function Jc(e){var t=e.text,n=e.id;return(0,r.jsxs)(Rc.Z,{children:[t,"(",n,")"]})}function $c(e){var t=e.timestamp;return(0,r.jsx)("span",{className:Fc().timestamp,children:t.formatted})}var es=n(114774),ts=n.n(es),ns=n(873641),rs=n.n(ns);function os(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function is(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ws(e,t){return!t||"object"!==Ns(t)&&"function"!=typeof t?gs(e):t}function xs(e,t){xs=Object.setPrototypeOf||function(e,t){ e.__proto__=t;return e};return xs(e,t)}function Ps(e){return function(e){if(Array.isArray(e))return ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ms(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ms(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ns=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function As(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{ Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=js(e);if(t){var o=js(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ws(this,n)}}var Ts=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0 ;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&f.text.length>0){var d=l[s-1],p=l[s+1],h={ anchor:Cc(e,i,u,f.start),focus:Cc(e,i,u,f.start+f.text.length)},y=hc.bN.nodes(e,{at:h,mode:"lowest",voids:!1}),b={},v=!0,m=!1,g=void 0;try{for(var O,E=f.attributes[Symbol.iterator]();!(v=(O=E.next()).done);v=!0){var C=O.value;b[C]=!0;if("syntaxBefore"===C&&null!=p){var j=!0,S=!1,I=void 0;try{for(var _,w=p.attributes[Symbol.iterator]();!(j=(_=w.next()).done);j=!0){var x=_.value;b["before_".concat(x)]=!0}}catch(e){S=!0;I=e}finally{try{j||null==w.return||w.return()}finally{if(S)throw I}}}else if("syntaxAfter"===C&&null!=d){var P=!0,N=!1,A=void 0;try{for(var T,Z=d.attributes[Symbol.iterator]();!(P=(T=Z.next()).done);P=!0){var M=T.value;b["after_".concat(M)]=!0}}catch(e){N=!0;A=e}finally{try{P||null==Z.return||Z.return()}finally{if(N)throw A}}}}}catch(e){m=!0;g=e}finally{try{v||null==E.return||E.return()}finally{if(m)throw g}}var R=!0,L=!1,D=void 0;try{for(var k,U=y[Symbol.iterator]();!(R=(k=U.next()).done);R=!0){var B=xc(k.value,2),F=B[0],G=B[1];if(!hc.bN.isVoid(e,F)){var H={ anchor:hc.bN.start(e,G),focus:hc.bN.end(e,G)};hc.Jz.isBefore(H.anchor,h.anchor)&&(H.anchor=h.anchor);hc.Jz.isAfter(H.focus,h.focus)&&(H.focus=h.focus);c.push(wc({},b,H))}}}catch(e){L=!0;D=e}finally{try{R||null==U.return||U.return()}finally{if(L)throw D}}}}return c}(r,e,o)).concat(Ps(function(e,t){if(hc.bN.areStylesDisabled(e))return[];var n=Sc(t,2),r=n[0],o=n[1],i=[];if(!hc.aj.isType(r,"line")||null==r.codeBlockState)return i;var a=r.codeBlockState,l=a.hljsTypes,u=a.isStyledCodeBlockLine;if(null==l||0===l.length||!u)return[];var c=!0,s=!1,f=void 0;try{for(var d,p=l[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value,y=r.children.map((function(e){return hc.LC.isText(e)?e.text:null}));i.push({hljsTypes:h.types,anchor:Cc(e,o,y,h.start),focus:Cc(e,o,y,h.end)})}}catch(e){s=!0;f=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw f}}return i}(r,e)),Ps(null!==(t=null==i?void 0:i(r,e))&&void 0!==t?t:[]))};l.renderElement=function(e){ var t,n=this.props,o=n.guildId,i=n.channelId,l=n.renderExtraElement,u=e.attributes,c=e.children,s=null!==(t=null==l?void 0:l(e))&&void 0!==t?t:function(e,t,n){var o=e.attributes,i=e.children,l=e.element;switch(l.type){case"line":var u,c=l.children[l.children.length-1],s=hc.LC.isText(c)&&c.text.length>0;return(null===(u=l.codeBlockState)||void 0===u?void 0:u.isInCodeBlock)?(0,r.jsxs)("div",as(is({className:ts().codeLine,spellCheck:null==l.codeBlockState||null==l.codeBlockState.lang},o),{children:[i,s?(0,r.jsx)("br",{}):null]})):(0,r.jsxs)("div",as(is({},o),{children:[i,s?(0,r.jsx)("br",{}):null]}));case"blockQuote":var f=a()(Fc().blockquoteContainer,Fc().slateBlockquoteContainer);return(0,r.jsxs)("div",as(is({},o),{className:f,children:[(0,r.jsx)("span",{contentEditable:!1,className:Fc().blockquoteDivider}),(0,r.jsx)("blockquote",{children:i})]}));case"emoji":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Wc,{emoji:l.emoji}),i]});case"customEmoji":return(0,r.jsxs)(ls,{ attributes:o,children:[(0,r.jsx)(zc,{emoji:l.emoji}),i]});case"textMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Yc,{text:l.name,guildId:t}),i]});case"userMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Kc,{id:l.userId,channelId:n,guildId:t}),i]});case"roleMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(qc,{id:l.roleId,guildId:t}),i]});case"channelMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Qc,{id:l.channelId}),i]});case"staticRouteLink":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Xc,{id:l.channelId}),i]});case"commandMention":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)(Jc,{text:l.commandName,id:l.commandId}),i]});case"timestamp":return(0,r.jsxs)(ls,{attributes:o,children:[(0,r.jsx)($c,{timestamp:l.parsed}),i]});default:return null}}(e,o,i);return null!=s?s:(0,r.jsx)("div",Is(Ss({},u),{children:c}))};l.renderLeaf=function(e){ var t,n=this.props,o=n.editor,i=n.renderExtraLeaf,a=e.attributes,l=e.children,u=null!==(t=null==i?void 0:i(e))&&void 0!==t?t:ys(o,e);return null!=u?u:(0,r.jsx)("span",Is(Ss({},a),{children:l}))};l.handleOnChange=function(e){var t,n,r=this.props.editor,o=hc.bN.isEditorEmpty(r)&&null==r.composition;o!==this.state.showPlaceholder&&this.setState({showPlaceholder:o});null===(n=(t=this.props).onChange)||void 0===n||n.call(t,e)};l.handleKeyDown=function(e){var t,n;if(null==this.props.editor.composition)null===(n=(t=this.props).onKeyDown)||void 0===n||n.call(t,e);else{e.preventDefault();e.stopPropagation()}};l.handleKeyUp=function(e){var t,n;if(null==this.props.editor.composition)null===(n=(t=this.props).onKeyUp)||void 0===n||n.call(t,e);else{e.preventDefault();e.stopPropagation()}};l.handleBeforeInput=function(e){ var t,n=this.props.editor,r=gc.F3.findDocumentOrShadowRoot(n).getSelection(),o=(null!==(t=null==r?void 0:r.rangeCount)&&void 0!==t?t:0)>0?null==r?void 0:r.getRangeAt(0):null,i=null!=o?hc.bN.toSlateRange(n,o,{exactMatch:!0,suppressThrow:!0}):null,a=e.getTargetRanges()[0],l=null!=a?hc.bN.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0}):null;0;if(null==n.composition){if("insertText"===e.inputType&&null!=a&&null==l){var u=hc.bN.toSlatePoint(n,[a.startContainer,a.startOffset],{exactMatch:!0,suppressThrow:!0}),c=hc.bN.toSlatePoint(n,[a.endContainer,a.endOffset],{exactMatch:!0,suppressThrow:!0});if(null!=u&&null==c){var s={anchor:u,focus:c=hc.bN.end(n,u.path)};Ec.Q.select(n,s);hc.M8.isExpanded(s)&&n.deleteFragment();null!=e.data&&n.insertText(e.data)}e.preventDefault()}if(e.inputType.startsWith("deleteContent")&&null!=i&&hc.M8.isExpanded(i)){n.selection=i;n.deleteFragment(e.inputType.endsWith("Backward")?"backward":"forward");e.preventDefault()}}};l.handleCompositionStart=function(){ var e=this.props.editor;0;var t={insertedPrefix:!1,startedInsideInline:!1};this.state.showPlaceholder&&this.setState({showPlaceholder:!1});var n=null!=e.selection&&hc.M8.isCollapsed(e.selection)?hc.bN.leaf(e,e.selection.anchor.path):null;if(null!=n){null!=(null!=e.selection&&hc.M8.isCollapsed(e.selection)?hc.bN.above(e,{at:n[1],match:function(t){return hc.bN.isInline(e,t)},mode:"lowest"}):null)&&(t.startedInsideInline=!0);if(hc.bN.isEditorEmpty(e)){Ec.Q.insertNodes(e,{text:"\ufeff"},{select:!0});t.insertedPrefix=!0;e.composition=t}else{var r,o=gc.F3.findDocumentOrShadowRoot(this.props.editor).getSelection(),i=(null!==(r=null==o?void 0:o.rangeCount)&&void 0!==r?r:0)>0?null==o?void 0:o.getRangeAt(0):null;if(null==(null!=i?hc.bN.toSlateRange(e,i,{exactMatch:!0,suppressThrow:!0}):null)&&null!=i){var a=hc.bN.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!0});e.selection=null;if(null!=a)Ec.Q.select(e,a);else{var l;Ec.Q.select(e,null!==(l=e.selection)&&void 0!==l?l:hc.bN.end(e,[]))}} e.composition=t}}else e.composition=t};l.handleCompositionEnd=function(e){var t=this.props.editor;0;if(null!=t.composition){if(t.composition.insertedPrefix&&null!=t.selection&&hc.M8.isCollapsed(t.selection)){var n=t.selection.anchor.path,r=hc.aj.leaf(t,n);hc.bN.withoutNormalizing(t,(function(){var e=r.text.replace(/^\uFEFF/,"");Ec.Q.delete(t,{unit:"offset",distance:r.text.length,reverse:!0});hc.bN.insertText(t,e)}))}t.composition=null}};l.handleFocusCapture=function(e){var t=this.props.onFocus;null==t||t(e)};l.handleBlurCapture=function(e){var t=this.props,n=t.editor,r=t.onBlur,o=e.relatedTarget,i=gc.F3.findDocumentOrShadowRoot(this.props.editor),a=i.getElementById("textarea-context"),l=i.getElementById("slate-toolbar");if(null!=o&&!Ms(o,a)&&!Ms(o,l)){var u=gc.F3.findDocumentOrShadowRoot(n).getSelection();if(null!=u){for(var c=!1,s=u.rangeCount-1;s>=0;s--){var f=u.getRangeAt(s);if(null!=this.containerRef.current&&Ms(f.commonAncestorContainer,this.containerRef.current)){c=!0;break}} c&&u.removeAllRanges()}}null==r||r(e)};l.handleContextMenu=function(e){var t=this.props.editor,o=e.pageY,i=window.innerHeight,a=null!=o&&null!=i&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?pc.zb(e,l):null,s=(0,Ls.sk)(hc.bN.richValue(e),{mode:"raw",range:{anchor:hc.bN.start(e,[]),focus:null!==(u=null==c||null===(o=c[0])||void 0===o?void 0:o.keyRange.anchor)&&void 0!==u?u:hc.bN.end(e,[])}}),f="",d=s.toLocaleLowerCase();if(Nr.Z.getCurrentConfig({}).showApplicationCommandSuggestions){var p=Zr.exec(d);null!=p&&(d=K.GI+d.substring(p.length))} var h="".concat(K.GI).concat(l.displayName).toLocaleLowerCase(),y="".concat(K.GI).concat(l.name).toLocaleLowerCase();d.startsWith(h)&&d.length>h.length?f=s.substring(h.length).trim():d.startsWith(y)&&d.length>y.length&&(f=s.substring(y.length).trim());var b,v=[],m=null,g=null;if(null!=l.options){var O=new Set;if(null!=c){var E=!0,C=!1,j=void 0;try{for(var S,I=c[Symbol.iterator]();!(E=(S=I.next()).done);E=!0){var _,w=S.value;O.add(w.name);var x=null!==(_=ef(n,t,w.name))&&void 0!==_?_:w.text,P={type:"applicationCommandOption",optionName:w.name,optionDisplayName:w.displayName,optionType:w.type,children:[{text:x}]};v.push(P);0===w.text.length&&null==m&&(m=P)}}catch(e){C=!0;j=e}finally{try{E||null==I.return||I.return()}finally{if(C)throw j}}}var N=!0,A=!1,T=void 0;try{for(var Z,M=l.options[Symbol.iterator]();!(N=(Z=M.next()).done);N=!0){var R=Z.value;if(!O.has(R.name)&&(R.required||null!=a[R.name])){var L=void 0,D=void 0;if(f.length>0&&!zs.has(R.type)){L=f;f="" }else L=null!=(D=ef(n,t,R.name))?D:"";var k={type:"applicationCommandOption",optionName:R.name,optionDisplayName:R.displayName,optionType:R.type,children:[{text:L}]};v.push(k);0===L.length&&null==m&&(m=k);null==D&&(g=k)}}}catch(e){A=!0;T=e}finally{try{N||null==M.return||M.return()}finally{if(A)throw T}}}b=f.length>0?"".concat(K.GI).concat(l.displayName," ").concat(f.replace(/\r|\n/g," ")):0===v.length?"".concat(K.GI).concat(l.displayName," "):"".concat(K.GI).concat(l.displayName);v.unshift({text:b});var U={type:"applicationCommand",children:v,command:{id:l.id,name:l.name,displayName:l.displayName}};hc.bN.withoutNormalizing(e,(function(){Ec.Q.insertNodes(e,[U],{at:Gs.YD});var t=!0,n=!1,r=void 0;try{for(var o,i=hc.bN.blocks(e).reverse()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=Vs(o.value,2)[1];hc.C0.isAfter(a,Gs.YD)&&Ec.Q.removeNodes(e,{at:a,voids:!0})}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}));var B=null;if(null!=m){ Ec.Q.selectCommandOption(e,m.optionName);B=m.optionName}else if(null!=g){Ec.Q.selectCommandOption(e,g.optionName,!1);B=g.optionName}else Ec.Q.resetSelectionToEnd(e);null==g&&Qs(e,l);return B}(t,r,n),h=pc.tM(t,f);Xs({guildId:r.guild_id,channelId:r.id,command:f,activeOption:p,currentOptionValues:h,previousOptionValues:null,validateAll:!0,allowEmpty:!0});return{commandId:f.id,optionValues:h}}if(null!=f&&!a){$e.Po(r.id,null,null);return null}var y=hc.bN.richValue(t)[0],b=y.children[0];if(Ys.has(y.type)&&hc.LC.isText(b)){var v=function(e,t){if(!e.startsWith("/"))return null;var n=(0,Y.hV)(t,e.substring(1));if(!n.hasSpaceTerminator)return null;var r=et.ZP.getQueryCommands(t.id,j.yU.CHAT,n.text);if(null==r)return null;var o=n.text.trim(),i=o+" ";r=r.filter((function(e){return e.inputType!==Z.iw.PLACEHOLDER&&(e.displayName===o||e.displayName.startsWith(i))}));if(1===r.length&&r[0].displayName===o){ var a,l=r[0],u=null===(a=et.ZP.getApplicationSections(t.id,j.yU.CHAT))||void 0===a?void 0:a.find((function(e){return e.id===l.applicationId}));return{command:l,section:u}}return null}(b.text,r);if(null!=v){$e.Po(r.id,v.command,v.section);return null}}}if(null!=f&&null!=c){(function(e,t){if(null==t.options||0===t.options.length)return!1;var n=pc.zb(e,t);if(0===n.length)return!1;hc.bN.withoutNormalizing(e,(function(){for(var t=n.length-1;t>=0;t--){var r=n[t];Ec.Q.textToInline(e,{type:"applicationCommandOption",optionName:r.name,optionDisplayName:r.displayName,optionType:r.type,children:[{text:r.text}]},{anchor:r.keyRange.anchor,focus:r.valueRange.focus})}var o=hc.bN.getFirstText(e);if(null==o)return!1;var i=o.text.trim();o.text!==i&&Ec.Q.textToText(e,i,{anchor:{path:Gs.u9,offset:0},focus:{path:Gs.u9,offset:o.text.length}})}));return!0})(t,f)||Qs(t,f);var m,g=pc.tM(t,f),O=hc.bN.above(t,{match:function(e){return hc.bN.isInline(t,e)&&"applicationCommandOption"===e.type},mode:"lowest" }),E=null!==(m=null==O?void 0:O[0].optionName)&&void 0!==m?m:null;Xs({guildId:r.guild_id,channelId:r.id,command:f,activeOption:E,currentOptionValues:g,previousOptionValues:l,validateAll:!1,allowEmpty:!1});return{commandId:c.id,optionValues:g}}return null}({editor:e,storeCommandState:a,channel:t,canUseCommands:n,canOnlyUseTextCommands:r,commandChanged:(null===(o=a.activeCommand)||void 0===o?void 0:o.id)!==(null==p?void 0:p.id),previousOptionValues:y})}));if(null!=b){var v=vc.currentEntry(e);null!=v&&(v.commandId=b.commandId);y=b.optionValues}else y=null;f=hc.bN.richValue(e);d=e.selection;p=a.activeCommand;h=s}}l()};return e}function qs(e,t,n,r){var o=Vs(hc.bN.blocks(e)[0],1)[0],i=(r?(0,Ls.sg)(o,{mode:"plain"}).trimEnd():"").split("\n").map((function(e){return{type:"line",children:[{text:e}]}})),a=[i.length-1];Ec.Q.insertNodes(e,i,{at:Gs.YD});var l=!0,u=!1,c=void 0;try{for(var s,f=hc.bN.blocks(e).reverse()[Symbol.iterator]();!(l=(s=f.next()).done);l=!0){var d=Vs(s.value,2)[1] ;hc.C0.isAfter(d,a)&&Ec.Q.removeNodes(e,{at:d,voids:!0})}}catch(e){u=!0;c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}null!=n&&$e.Po(t,null,null)}function Qs(e,t){if(null==t.options||1!==t.options.length||!0===t.options[0].required||zs.has(t.options[0].type)||pc.cu(e).length>0)return!1;if(null==pc.cr(e))return!1;var n=hc.bN.getFirstText(e);if(null==n)return!1;var r=t.options[0],o={path:Gs.u9,offset:t.displayName.length+2},i={path:Gs.u9,offset:n.text.length};if(!n.text.startsWith("".concat(K.GI).concat(t.displayName," ").toLocaleLowerCase())||hc.Jz.equals(o,i))return!1;Ec.Q.textToInline(e,{type:"applicationCommandOption",optionName:r.name,optionDisplayName:r.displayName,optionType:r.type,children:[{text:n.text.substring(t.displayName.length+2)}]},{anchor:o,focus:i});return!0}function Xs(e){var t=e.guildId,n=e.channelId,r=e.command,o=e.activeOption,i=e.currentOptionValues,a=e.previousOptionValues,l=e.validateAll,u=e.allowEmpty;if(null==r.options)return!1 ;var c=l?null:g.Z.getActiveOptionName(n),s={},f=g.Z.getOptionStates(n),d=!1,p=!0,h=!1,y=void 0;try{for(var b,v=r.options[Symbol.iterator]();!(p=(b=v.next()).done);p=!0){var m,O,E,C=b.value,j=f[C.name],S=l||C.name===c&&c!==o||!1===(null==j||null===(m=j.lastValidationResult)||void 0===m?void 0:m.success)&&(null==i?void 0:i[C.name])!==(null==a?void 0:a[C.name]),I={hasValue:null!=i&&C.name in i,isActive:C.name===o,lastValidationResult:S?(0,Fs.f)(C,null!==(E=null==i?void 0:i[C.name])&&void 0!==E?E:null,t,n,u):null==j?void 0:j.lastValidationResult};if(null==j||j.hasValue!==I.hasValue||j.isActive!==I.isActive||S&&!1===(null===(O=j.lastValidationResult)||void 0===O?void 0:O.success)){s[C.name]=I;d=!0}}}catch(e){h=!0;y=e}finally{try{p||null==v.return||v.return()}finally{if(h)throw y}}d&&$e.g7(n,s)}function Js(e){var t=pc.cr(e);if(null==t)return{command:null,commandText:null};var n=Vs(t,1)[0],r=n.children[0];return hc.LC.isText(r)?{command:n.command,commandText:r.text}:{command:n.command, commandText:null}}function $s(e,t){var n=pc.cu(e)[0];t();var r=hc.M8.toPoint(e.selection);if(null!=r&&n!==pc.cu(e)[0]){var o=Js(e),i=o.command,a=o.commandText;null!=i&&null!=a&&!a.endsWith(" ")&&hc.Jz.equals(r,{path:Gs.u9,offset:i.displayName.length+1})&&Ec.Q.insertText(e," ")}}function ef(e,t,n){var r,o,i,a,l=null===(r=e.activeCommand)||void 0===r||null===(o=r.options)||void 0===o?void 0:o.find((function(e){return e.name===n})),u=e.initialValues[n];if(null==l||null==u)return null;if(null!=l.choices){var c;return null===(c=l.choices.find((function(e){return e.value===u.value})))||void 0===c?void 0:c.displayName}var s=null===(i=u.value)||void 0===i?void 0:i.toString() ;return l.type===j.jw.CHANNEL||l.type===j.jw.MENTIONABLE&&null!=Ct.Z.getChannel(s)?"<#".concat(s,">\t"):l.type===j.jw.USER||l.type===j.jw.MENTIONABLE&&null!=ge.default.getUser(s)?"<@".concat(s,">"):l.type===j.jw.ROLE||l.type===j.jw.MENTIONABLE&&null!=(null===(a=ve.Z.getGuild(t.guild_id))||void 0===a?void 0:a.getRole(null!=s?s:""))?"<@&".concat(s,">"):s}var tf=n(120637),nf=n(5387),rf=n.n(nf),of=n(455049);function af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var i=t.map((function(e){return(0,Ls.sg)(e.blockEntry[0])})).join("\n"),l=t[0].lang;if(null!=l&&null!=tf.Z.getLanguage(l)){var u=function(e,t){var n="".concat(e,"-").concat(t),r=Rf.get(n);if(null!=r)return r;var o=of.default.highlight(t,e);if(null==o)return null;var i=o.value.split("\n");Rf.set(n,i);return i}(i,l);if(null!=u)for(var c=[],s=0;s").replace(/"/g,'"').replace(/'/g,"'"),d=[],p=void 0,h=0,y=0;null!=(p=Af.exec(f));){ var b=p.index+p[0].length,v=p.index-y;if(p.index>y){c.length>0&&d.push({types:uf(c),start:h,end:h+v});h+=v}""===p[0]?c.pop():c.push(p[1]);y=b}if(c.length>0){var m=f.length-y;d.push({types:uf(c),start:h,end:h+m})}t[s].hljsTypes=d}}t=[]}}n&&t.push(r);r.opensCodeBlock&&(n=!0)},u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)l()}catch(e){o=!0;i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}(t);return t}(e);!function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value,u=lf(l.blockEntry,2),c=u[0],s=u[1],f=Zf(l);(null==c?void 0:c.codeBlockState)!=f&&Ec.Q.setNodes(e,{codeBlockState:f},{at:s})}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(e,t)}(e)}))}));n=hc.bN.richValue(e)}t()};return e}var Af=/(?:)|(?:<\/span>)/g;function Tf(e,t,n,r,o){var i=function(e){var t=lf(e,2),n=t[0],r=t[1];if(!sf.has(n.type))return[] ;for(var o,i=[],a=/\\|```/g,l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n ",{at:s})}}else if("blockQuote"!==u.type&&!hc.bN.areStylesDisabled(e)){var f=u.children[0];if(hc.LC.isText(f)){var d=f.text.match(/^\s*>>> /),p=f.text.match(/^\s*> /);if(null!=p||null!=d||t){Ec.Q.setNodes(e,{type:"blockQuote"},{at:c});if(!t){var h,y,b=null!==(y=null!==(h=null==p?void 0:p[0].length)&&void 0!==h?h:null==d?void 0:d[0].length)&&void 0!==y?y:0,v=hc.C0.child(c,0);Ec.Q.delete(e,{at:{anchor:{path:v,offset:0},focus:{path:v,offset:b}}});t=null!=d}}}}}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(e)}))}));i=t;a=e.previewMarkdown}o()};return e}function Gf(e,t){ var n=function(n){var r=vc.currentEntry(e);null!=r&&(r.mergeable=!1);if(!(n>=e.history.stack.length)){e.history.index=n;var o=vc.currentEntry(e);t({newValue:o.value,newSelection:o.selection})}},r=e.apply,o=e.deleteBackward,i=e.deleteForward,a=e.deleteFragment,l=e.insertData,u=e.insertText,c=e.onChange;e.history={index:0,stack:[]};e.onChange=function(){var t=e.history;if(0===t.stack.length){t.stack=[Hf(e)];t.index=0}null!=e.selection&&(vc.currentEntry(e).selection=e.selection);f=null;c()};e.undo=function(){e.history.index>0&&n(e.history.index-1)};e.redo=function(){e.history.index=4e3)?vc.insertEntry(e,r,l):vc.insertOrMergeEntry(e,r,l);var u,c}(e,t,s);s=t}f=t;d=o}};e.deleteBackward=function(t){vc.withSingleEntry(e,(function(){return o(t)}))};e.deleteForward=function(t){vc.withSingleEntry(e,(function(){return i(t)}))};e.deleteFragment=function(t){vc.withSingleEntry(e,(function(){return a(t)}))};e.insertText=function(t){1===t.length&&"remove_text"===(null==f?void 0:f.type)?vc.withMergedEntry(e,(function(){return u(t)})):null!=e.selection&&hc.M8.isExpanded(e.selection)?vc.withSingleEntry(e,(function(){return u(t)})):u(t)};e.insertData=function(t){ "remove_text"===(null==f?void 0:f.type)?vc.withMergedEntry(e,(function(){return l(t)})):vc.withSingleEntry(e,(function(){return l(t)}))};return e}function Hf(e){return{type:"other",mergeable:!1,createdAt:Date.now(),value:hc.bN.richValue(e),selection:e.selection}}var Vf=n(99885);function Wf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;h--){var y=d.children[h];if(Jf.has(y.type)){var b=[y,hc.C0.child(p,h)];r?td(e,b,!0,null):ed(e,b,t,n)}}}}catch(e){a=!0;l=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}}function ed(e,t,n,r){var o,i="line"===t[0].type&&!0===(null===(o=t[0].codeBlockState)||void 0===o?void 0:o.isInCodeBlock),a=hc.q.markdown(t[0],n);if(td(e,t,i,a)){t=hc.q.updateElement(e,t);a=hc.q.markdown(t[0],n)}if(!i){if(nd(e,t,r,a)){t=hc.q.updateElement(e,t);a=hc.q.markdown(t[0],n)}!function(e,t,n,r,o){for(var i=zf(t,2),a=i[0],l=i[1],u=!1,c=a.children.length-1;c>=0;c--){var s=a.children[c];if(hc.LC.isText(s)){var f=hc.C0.child(l,c),d=[];qf.lastIndex=0 ;for(var p=void 0;null!=(p=qf.exec(s.text));)if(0===p.index||null!=s.text.charAt(p.index-1).match(/(\t|\s)/)){if(!od(e,l,{path:f,offset:p.index},o)){var h=(0,Vf.i)(p[0],n,r);null!=h&&id(r,t[0],h)?d.push({index:p.index,length:p[0].length,node:h}):qf.lastIndex=p.index+1}}else qf.lastIndex=p.index+1;var y=!0,b=!1,v=void 0;try{for(var m,g=d.reverse()[Symbol.iterator]();!(y=(m=g.next()).done);y=!0){var O=m.value;rd(e,[s,hc.C0.child(l,c)],O.index,O.length,O.node);u=!0}}catch(e){b=!0;v=e}finally{try{y||null==g.return||g.return()}finally{if(b)throw v}}}}}(e,t,n,r,a)}}function td(e,t,n,r){for(var o=zf(t,2),i=o[0],a=o[1],l=!1,u=i.children.length-1;u>=0;u--){var c=i.children[u],s=u=0&&u.offset<=a.text.length,"Failed to find valid start position for raw mention replace");s()(c.offset>=0&&c.offset<=a.text.length,"Failed to find valid end position for raw mention replace");Ec.Q.textToVoid(e,o,{anchor:u,focus:c})}function od(e,t,n,r){var o=0,i=!0,a=!1,l=void 0;try{for(var u,c=hc.bN.nodes(e,{at:{anchor:hc.bN.start(e,t),focus:n},mode:"lowest" })[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=zf(u.value,2),f=s[0],d=s[1];hc.LC.isText(f)?hc.C0.equals(d,n.path)?o+=n.offset:o+=f.text.length:o+=1}}catch(e){a=!0;l=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}var p=!0,h=!1,y=void 0;try{for(var b,v=r.entries[Symbol.iterator]();!(p=(b=v.next()).done);p=!0){var m=b.value;if(m.attributes.includes("codeBlockText")||m.attributes.includes("inlineCode")){var g=m.start,O=m.start+m.text.length;if(g<=o&&O>=o)return!0}}}catch(e){h=!0;y=e}finally{try{p||null==v.return||v.return()}finally{if(h)throw y}}return!1}function id(e,t,n){if("applicationCommandOption"!==t.type)return!0;switch(t.optionType){case j.jw.CHANNEL:return"channelMention"===n.type;case j.jw.ROLE:return"roleMention"===n.type||"textMention"===n.type&&"@everyone"===n.name;case j.jw.USER:return"userMention"===n.type;case j.jw.MENTIONABLE:return"roleMention"===n.type||"userMention"===n.type||"textMention"===n.type&&"@everyone"===n.name;case j.jw.STRING: var r=null!=e?g.Z.getOption(e,t.optionName):null;return null==(null==r?void 0:r.choices)&&!0!==(null==r?void 0:r.autocomplete);default:return!1}}function ad(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1&&void 0!==J[1]?J[1]:{};i=(o=null!=t?t:{}).at,a=void 0===i?e.selection:i,l=o.unit,u=void 0===l?"offset":l,c=o.reverse,s=void 0!==c&&c,f=o.voids,d=void 0!==f&&f;if("word"===u)return[3,9];p=!0,h=!1,y=void 0;$.label=1;case 1:$.trys.push([1,6,7,8]);b=pd(e,cd(ud({},t),{voids:d||"block"===u}))[Symbol.iterator]();$.label=2;case 2:return(p=(v=b.next()).done)?[3,5]:[4,v.value];case 3:$.sent();$.label=4;case 4:p=!0;return[3,2];case 5:return[3,8];case 6:X=$.sent();h=!0;y=X;return[3,8];case 7:try{p||null==b.return||b.return()}finally{if(h)throw y}return[7];case 8:return[2];case 9: if(null==a)return[2];m=hc.bN.range(e,a);g=sd(hc.M8.edges(m),2),O=g[0],E=g[1];C=hc.bN.richValue(e);j=s?-1:1;I=null!==(S=null===(n=O.path)||void 0===n?void 0:n[0])&&void 0!==S?S:0;w=null!==(_=null===(r=E.path)||void 0===r?void 0:r[0])&&void 0!==_?_:C.length-1;x=s?I:w;P=s?w:I;$.label=10;case 10:0;T=C[P];M=null!==(Z=P===I?null===(N=O.path)||void 0===N?void 0:N[1]:null)&&void 0!==Z?Z:0;L=null!==(R=P===w?null===(A=E.path)||void 0===A?void 0:A[1]:null)&&void 0!==R?R:T.children.length-1;D=s?M:L;k=s?L:M;$.label=11;case 11:0;U=T.children[k];B=[P,k];F=hc.C0.equals(B,O.path)||hc.C0.isAncestor(B,O.path)?!s&&hc.bN.isEnd(e,O,B)?null:O:hc.bN.start(e,B);G=hc.C0.equals(B,E.path)||hc.C0.isAncestor(B,E.path)?s&&hc.bN.isStart(e,E,B)?null:E:hc.bN.end(e,B);return null==F||null==G?[3,25]:hc.LC.isText(U)&&0===U.text.length?[4,H={path:B,offset:0}]:[3,14];case 12:$.sent();return[4,H];case 13:$.sent();return[3,25];case 14: return hc.bN.isInline(e,U)&&hc.LC.isText(U.children[0])&&0===U.children[0].text.length?[4,V={path:hc.C0.child(B,0),offset:0}]:[3,17];case 15:$.sent();return[4,V];case 16:$.sent();return[3,25];case 17:W={anchor:F,focus:G};z=!0,Y=!1,K=void 0;$.label=18;case 18:$.trys.push([18,23,24,25]);q=pd(e,cd(ud({},t),{at:W}))[Symbol.iterator]();$.label=19;case 19:return(z=(Q=q.next()).done)?[3,22]:[4,Q.value];case 20:$.sent();$.label=21;case 21:z=!0;return[3,19];case 22:return[3,25];case 23:X=$.sent();Y=!0;K=X;return[3,25];case 24:try{z||null==q.return||q.return()}finally{if(Y)throw K}return[7];case 25:if(k===D)return[3,26];k+=j;return[3,11];case 26:if(P===x)return[3,27];P+=j;return[3,10];case 27:return[2]}}))}var yd,bd=["applicationCommand"];!function(e){e[e.None=0]="None";e[e.Character=1]="Character";e[e.Split=2]="Split"}(yd||(yd={}));function vd(e){var t=hc.bN.getCurrentBlock(e);return null==t||bd.includes(t[0].type)?yd.None:yd.Split}function md(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);ne.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n=5)break;null==t||t();try{r()}finally{null==n||n()}}while(i)}finally{o=!1}}};return e}(y=function(e){var t=e.apply,n=e.onChange ;e.apply=function(n){t(n);hc.Ew.isValid(e,e.selection)&&(e.lastGoodSelection=e.selection)};e.onChange=function(){if(!hc.Ew.isValid(e,e.selection)){var t;if(hc.Ew.isValid(e,e.lastGoodSelection))t=e.lastGoodSelection;else{var r=hc.bN.end(e,[]);t={anchor:r,focus:r}}e.selection=t}if(null!=e.selection){for(var o,i,a=gd(hc.M8.edges(e.selection),2),l=a[0],u=a[1],c=!1;null!=l&&null!=(o=hc.bN.getParentVoid(e,l))&&!Gs.On.includes(o[0].type);){l=hc.bN.before(e,l,{unit:"offset"});c=!0}for(;null!=u&&null!=(i=hc.bN.getParentVoid(e,u))&&!Gs.On.includes(i[0].type);){u=hc.bN.after(e,u,{unit:"offset"});c=!0}c&&null!=l&&null!=u&&(hc.M8.isForward(e.selection)?Ec.Q.select(e,{anchor:l,focus:u}):Ec.Q.select(e,{anchor:u,focus:l}))}n()};return e}(y),d,p),(function(e){var t=e.newValue,n=e.newSelection;return h(y,"undo",{value:t,selection:n})}));0}(Cd(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];vc.withSingleEntry(e,(function(){var i=pc.HZ(e),a=null!=i&&wd(t,i[0]);if(null!=r&&a){Ec.Q.removeInlineChildren(e,i);o=!1}xd(e,n,r,o);if(null!=r&&a){var l=pc.cr(e);i=hc.q.updateElement(e,i);if(null!=l){var u=hc.q.markdown(l[0],t.id);nd(e,i,t.id,u)&&(i=hc.q.updateElement(e,i))} pc.xi(e,t.guild_id,t.id,hc.q.updateElement(e,i),!1);Ec.Q.selectNextCommandOption(e)}}))},insertAutocomplete:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this;vc.withSingleEntry(e,(function(){var a=pc.HZ(e),l=null!=a&&wd(t,a[0]);if(l){Ec.Q.removeInlineChildren(e,a);o=!1}else{var u=i.getCurrentWord().word;null!=u&&u.length>0&&Ec.Q.delete(e,{distance:u.length,unit:"character",reverse:!0})}xd(e,n,r,o);l&&Ec.Q.selectNextCommandOption(e)}))},insertEmoji:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];vc.withSingleEntry(e,(function(){var r,o,i=t.animated?"a":"",a=null!==(o=null!==(r=t.originalName)&&void 0!==r?r:t.name)&&void 0!==o?o:"",l=":".concat(t.name,":"),u=null!=t.id?"<".concat(i,":").concat(a.replace(/:/g,""),":").concat(t.id,">"):null;xd(e,l,u,n)}))}}}(t,n,r)}),[t,n,r])}var Nd=n(506907),Ad=n.n(Nd);function Td(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n=0&&Md.has(r.charAt(i));i--)o--;for(var a=t.offset,l=a;l=0&&(e[o]={chars:r,location:n+i})}function Ud(e){ var t=e.result,n=e.text,r=e.startIndex,o=e.syntax,i=e.type1,a=e.type2,l=Bd(n,o);if(l>=0){t[i]={chars:o.substring(0,1),location:l+r};t[a]={chars:o.substring(1),location:l+r+1}}}function Bd(e,t){var n=e.indexOf(t);if(n>=0){var r=t.charAt(0);if(n>0&&e.charAt(n-1)===r)return-1;if(ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var d,p,h=o[0];Ec.Q.selectCommandOption(J,h.name);Il.S.dispatch(se.CkL.SHAKE_APP,{duration:200,intensity:2});ce.default.track(se.rMx.APPLICATION_COMMAND_VALIDATION_FAILED,{application_id:null==t?void 0:t.applicationId,command_id:null==t||null===(d=t.rootCommand)||void 0===d?void 0:d.id,argument_type:j.jw[null!==(p=null==h?void 0:h.type)&&void 0!==p?p:3],is_required:null==h?void 0:h.required});return}}null==I||I((0,Ls.sk)(hc.bN.richValue(J),{mode:"raw",ignoreTrailingEmptyNodes:!0 }),t,e)}),[l.id,J,I,$,N]);Pd(t,J,l,ee);!function(e,t,n){o.useEffect((function(){var r=gc.F3.findDocumentOrShadowRoot(e).defaultView;if(null!=(null==r?void 0:r.ResizeObserver)){var o=hc.bN.toDOMNode(e,e),i=o.offsetHeight,a=new r.ResizeObserver((function(){var r=hc.bN.toDOMNode(e,e).offsetHeight;if(i!==r){null!=t.current&&(t.current.style.height="".concat(r,"px"));i=r;null==n||n(r)}}));a.observe(o);return function(){return a.disconnect()}}}),[t,e,n])}(J,H,b);var te=function(e){var t=e.editor,n=e.channel,r=e.disableEnterToSubmit,i=e.onKeyDown,a=e.onKeyUp,l=e.onTab,u=e.onEnter,c=e.submit,f=e.hideAutocomplete,d=e.moveSelection,p=o.useCallback((function(e){if(e.shiftKey||!(null==u?void 0:u(e))){if(!e.altKey&&!e.shiftKey&&(!r||e.ctrlKey)&&!Df(t)){e.preventDefault();e.stopPropagation();c()}}else{e.preventDefault();e.stopPropagation()}}),[t,r,u,c]),h=o.useCallback((function(e){if(e.shiftKey||!(null==l?void 0:l())){var r;if(null!=(null!==(r=g.Z.getActiveCommand(n.id))&&void 0!==r?r:null)){ e.preventDefault();e.stopPropagation();e.shiftKey?Ec.Q.selectPreviousCommandOption(t):Ec.Q.selectNextCommandOption(t)}if(Df(t)){e.preventDefault();e.stopPropagation();Ec.Q.insertText(t," ")}}else{e.preventDefault();e.stopPropagation()}}),[n,t,l]);return{handleKeyDown:o.useCallback((function(e){var n="MacIntel"===navigator.platform,r=n?e.metaKey:e.ctrlKey;switch(e.which){case se.yXg.ARROW_LEFT:case se.yXg.ARROW_RIGHT:var o,a,l,u=t.children[null!==(l=null===(o=t.selection)||void 0===o||null===(a=o.focus)||void 0===a?void 0:a.path[0])&&void 0!==l?l:0],c="rtl"===Ad()(hc.aj.string(u)),y=e.which===se.yXg.ARROW_LEFT==!c,b=e.shiftKey?"focus":void 0,v="offset";if(n){if(e.altKey)v="word";else if(e.metaKey)return}else e.ctrlKey&&(v="word");e.preventDefault();Ec.Q.keyboardMove(t,{reverse:y,unit:v,edge:b});break;case se.yXg.ARROW_UP:d(-1)&&e.preventDefault();break;case se.yXg.ARROW_DOWN:d(1)&&e.preventDefault();break;case se.yXg.P:e.ctrlKey&&!e.altKey&&d(-1)&&e.preventDefault();break ;case se.yXg.N:e.ctrlKey&&!e.altKey&&d(1)&&e.preventDefault();break;case se.yXg.TAB:h(e);break;case se.yXg.ENTER:p(e);break;case se.yXg.ESCAPE:null==f||f();break;case se.yXg.BACKSPACE:case se.yXg.DELETE:case se.yXg.K:var m=e.which===se.yXg.BACKSPACE;if(!n&&e.ctrlKey&&!e.altKey&&e.shiftKey&&e.which!==se.yXg.K||n&&e.metaKey&&e.which!==se.yXg.K||n&&e.ctrlKey&&!e.altKey&&e.which===se.yXg.K){e.preventDefault();if(null!=t.selection){var g=Hd(hc.M8.edges(t.selection),2),O=g[0],E=g[1],C=Hd(hc.bN.node(t,[m?O.path[0]:E.path[0]]),2),j=C[0],S=C[1];s()(hc.bN.isBlock(t,j),"Top-most node of selection is not a block");(m&&!hc.Jz.isAtStart(O,[j,S])||!m&&!hc.Jz.isAtEnd(E,[j,S]))&&(m?t.deleteBackward("line"):t.deleteForward("line"))}}break;case se.yXg.A:if(n&&e.ctrlKey&&!e.altKey){var I=hc.bN.getCurrentBlock(t);if(null!=I){var _=Hd(I,2)[1],w={path:hc.C0.child(_,0),offset:0};Ec.Q.select(t,{anchor:w,focus:w})}}break;case se.yXg.E:if(n&&e.ctrlKey&&!e.altKey){var x=hc.bN.getCurrentBlock(t);if(null!=x){ var P=Hd(x,2),N=P[0],A=P[1],T=hc.C0.child(A,N.children.length-1),Z={path:T,offset:Hd(hc.bN.node(t,T),1)[0].text.length};Ec.Q.select(t,{anchor:Z,focus:Z})}}break;case se.yXg.B:if(r&&!e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"bold");e.stopPropagation()}break;case se.yXg.I:if(r&&!e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"italics");e.stopPropagation()}break;case se.yXg.U:if(r&&!e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"underline");e.stopPropagation()}break;case se.yXg.S:if(r&&e.shiftKey&&!e.altKey&&!hc.bN.isEditorEmpty(t)){Fd(t,"strikethrough");e.stopPropagation()}}null==i||i(e)}),[t,p,h,f,d,i]),handleKeyUp:o.useCallback((function(e){null==a||a(e)}),[a])}}({editor:J,channel:l,disableEnterToSubmit:Z,onKeyDown:O,onKeyUp:E,onTab:C,onEnter:S,submit:ee,hideAutocomplete:w,moveSelection:x}),ne=te.handleKeyDown,re=te.handleKeyUp,oe=function(e,t,n){var r=o.useCallback((function(e){if(t)return!0;if(!0===e.defaultPrevented)return!1;var r=n(e);if(r){ e.preventDefault();e.stopPropagation()}return r}),[t,n]),i=o.useCallback((function(t){var n=t.event;if(!r(n)){n.preventDefault();n.stopPropagation();if(null!=n.clipboardData){e.insertData(n.clipboardData);hc.bN.focus(e)}}}),[e,r]);return{handlePaste:r,handleGlobalPaste:i}}(J,Y,y),ie=oe.handlePaste,ae=oe.handleGlobalPaste,le=o.useCallback((function(e){null==_||_()}),[_]),ue=o.useCallback((function(e){e!==V.current?z.current&&(null==h||h(null,(0,Ls.sk)(e,{mode:"raw"}),e)):z.current&&_()}),[_,h]);o.useLayoutEffect((function(){if(W.current){V.current=n;K(J,"parent",{value:n})}}),[J,n,K]);o.useEffect((function(){var e=function(){var e,t=null!==(e=g.Z.getActiveCommand(l.id))&&void 0!==e?e:null;null!==t&&null!=t.options&&$(t,!0)};Nu.Z.addChangeListener(e);return function(){return Nu.Z.removeChangeListener(e)}}),[l,J,$]);var fe=o.useCallback((function(e,t){return function(e,t){if(hc.bN.areStylesDisabled(e))return[];var n=ks(t,2),r=n[0],o=n[1],i=[];if(!hc.LC.isText(r))return i ;var a=ks(hc.bN.node(e,hc.C0.parent(o)),1)[0];if(!hc.aj.isType(a,"applicationCommand"))return i;r===a.children[0]&&i.push({anchor:{path:o,offset:0},focus:{path:o,offset:0+a.command.displayName.length+1},commandName:!0});return i}(e,t)}),[]),de=o.useCallback((function(e){return function(e,t,n){var o=t.attributes,i=t.children,a=t.element;switch(a.type){case"applicationCommand":var l=g.Z.getActiveCommand(n),u=0,c=0;if(null!=l&&l.id===a.command.id){var s,f=pc.cu(e),d=!0,p=!1,h=void 0;try{for(var y,b=(null!==(s=l.options)&&void 0!==s?s:[])[Symbol.iterator]();!(d=(y=b.next()).done);d=!0){var v=y.value;f.includes(v.name)?c++:u++}}catch(e){p=!0;h=e}finally{try{d||null==b.return||b.return()}finally{if(p)throw h}}}var m={};if(u>0){var O;O=c>0?q.Z.Messages.COMMANDS_OPTIONAL_COUNT_REMAINING.format({count:u}):q.Z.Messages.COMMANDS_OPTION_COUNT.format({count:u});m["data-trailing-placeholder"]=O}return(0,r.jsx)("div",zd(Wd({className:rs().applicationCommand},o,m),{children:i})) ;case"applicationCommandOption":return(0,r.jsx)(Yd,{attributes:o,channelId:n,element:a,children:i});default:return null}}(J,e,l.id)}),[l.id,J]),pe=o.useCallback((function(e){return Qd(e)}),[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Au.d9,{event:se.CkL.GLOBAL_CLIPBOARD_PASTE,handler:ae}),(0,r.jsx)("div",{ref:H,className:a()(u,Jd().slateContainer),children:(0,r.jsx)(Rs,{editor:J,channelId:l.id,guildId:l.guild_id,className:a()(Jd().slateTextArea,p),placeholder:d,readOnly:Y,spellCheck:P,autoFocus:!T,canFocus:!c,onChange:ue,onFocus:v,onBlur:m,onClick:le,onPaste:ie,onKeyDown:ne,onKeyUp:re,decorateExtra:fe,renderExtraElement:de,renderExtraLeaf:pe,"aria-owns":M,"aria-haspopup":L,"aria-expanded":R,"aria-activedescendant":D,"aria-controls":k,"aria-labelledby":F,"aria-describedby":B,"aria-invalid":U,"aria-autocomplete":G})})]})}));var ep=n(686390),tp=n.n(ep);function np(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0])||arguments[0],t=r.props,n=t.type,o=t.channel;if(n.drafts.autoSave){ e&&r.saveCurrentTextThrottled.cancel();r.handleSaveCurrentText(o.id)}};r.handleBeforeUnload=function(){return r.saveCurrentText()};r.saveCurrentTextThrottled=E().throttle(r.saveCurrentText.bind(rp(r),!1),500);r.handleEnter=function(e){var t,n;return null===(n=(t=r.props).onEnter)||void 0===n?void 0:n.call(t,e)};r.handleTab=function(){var e,t;return null===(t=(e=r.props).onTab)||void 0===t?void 0:t.call(e)};r.handleMoveSelection=function(e){var t,n;return null===(n=(t=r.props).onMoveSelection)||void 0===n?void 0:n.call(t,e)};r.maybeShowAutocomplete=function(){var e,t;return null===(t=(e=r.props).onMaybeShowAutocomplete)||void 0===t?void 0:t.call(e)};r.hideAutocomplete=function(){var e,t;return null===(t=(e=r.props).onHideAutocomplete)||void 0===t?void 0:t.call(e)};r.handleSaveCurrentText=function(e){y.Z.saveDraft(e,r.props.textValue,r.props.type.drafts.type)};r.handleClearText=function(){var e,t;null===(t=(e=r.props).onChange)||void 0===t||t.call(e,null,"",(0,On.JM)(""))} ;r.handleInsertText=function(e){var t=e.plainText,n=e.rawText,o=e.addSpace,i=void 0!==o&&o;r.appendText(t,n,i);r.focus()};r.handleFocus=function(e){var t=r.props.onFocus,n=r.state.focused;null==t||t(e);n||r.setState({focused:!0})};r.handleBlur=function(e){var t=r.props.onBlur,n=r.state.focused;null==t||t(e);n&&r.setState({focused:!1})};r.handlePaste=function(e){var t=r.props,n=t.channel,o=t.canPasteFiles,i=t.uploadPromptCharacterCount,a=t.promptToUpload,l=t.maxCharacterCount,u=t.type;if(null==a||!n.isPrivate()&&!o||n.isPrivate()&&n.isManaged())return!1;var c=null!=i?i:l,s=function(e,t){var n=[],r=[],o=null,i=null,a=!0,l=!1,u=void 0;try{for(var c,s=e.items[Symbol.iterator]();!(a=(c=s.next()).done);a=!0){var f=c.value;if("file"===f.kind){var d=f.getAsFile();if(null==d)continue;null!=d.path&&d.path.length>0?n.push(d):r.push(d)}else"string"===f.kind&&("text/plain"===f.type&&null==o?o=f:"text/html"===f.type&&null==i&&(i=f))}}catch(e){l=!0;u=e}finally{try{a||null==s.return||s.return() }finally{if(l)throw u}}if(n.length>0)return{files:n};if(r.length>0){if(1===r.length&&"image/png"===r[0].type&&null!=i){var p,h=r[0],y=null!==(p=function(e){var t=(new DOMParser).parseFromString(e,"text/html").querySelector("img");if(null!=t){var n;try{var r=Vu.parse(t.src).pathname;null!=r&&r.length>0&&(n=Hu().basename(r).split(".")[0])}catch(e){}if(null!=n&&n.length>0)return"".concat(n,".png")}return}(e.getData(i.type)))&&void 0!==p?p:h.name;return{files:[(0,Ku.dp)(h,y,h.type)]}}return{files:r}}if(null!=o&&null!=t){var b=e.getData(o.type);if(b.length>t){var v=new Blob([b],{type:"text/plain"});return{files:[(0,Ku.dp)(v,"message.txt")],convertedStringToFile:!0}}}return{files:[]}}(e.clipboardData,u.uploadLongMessages?c:null).files;pp("onPaste",sp(e.clipboardData.items).map((function(e){if("file"===e.kind){var t=e.getAsFile();return{kind:e.kind,type:e.type,name:null==t?void 0:t.name,path:null==t?void 0:t.path}}return{kind:e.kind,type:e.type}})));if(0===s.length)return!1;e.preventDefault() ;e.stopPropagation();r.saveCurrentText();!function(e,t){var r,o=g.Z.getActiveCommand(n.id);if(null==o)return a(e,n,u.drafts.type,{requireConfirm:!0,showLargeMessageDialog:t});var i=null===(r=o.options)||void 0===r?void 0:r.find((function(e){return e.type===j.jw.ATTACHMENT&&null==Nu.Z.getUpload(n.id,e.name,u.drafts.type)}));null!=i&&Wu.Z.setFile({channelId:n.id,id:i.name,draftType:u.drafts.type,file:{id:i.name,platform:zu.ow.WEB,file:e[0]}})}(s);r.focus();return!0};r._unsubscribe=w.subscribe((function(e){requestAnimationFrame((function(){r.setState({popup:e})}))}));r.state={focused:!1,submitting:!1,popup:w.getState()};return r}var i=n.prototype;i.componentDidMount=function(){var e=this;this.props.focused&&requestAnimationFrame((function(){return e.focus()}));document.addEventListener("selectionchange",this.handleSelectionChange);window.addEventListener("beforeunload",this.handleBeforeUnload)};i.componentDidUpdate=function(e){this.fixFocus(e);if(this.props.useSlate!==e.useSlate){ var t,n,r;r=this.props.useSlate?this.props.textValue:(0,Ls.sk)(this.props.richValue,{mode:"plain"});null===(n=(t=this.props).onChange)||void 0===n||n.call(t,null,r,(0,On.JM)(r))}else this.props.textValue!==e.textValue&&this.saveCurrentTextThrottled()};i.componentWillUnmount=function(){var e;this.saveCurrentText();null===(e=this._unsubscribe)||void 0===e||e.call(this);window.removeEventListener("beforeunload",this.handleBeforeUnload);document.removeEventListener("selectionchange",this.handleSelectionChange);this._focusBlurQueue=null;this._unsubscribe=null};i.blur=function(){var e=this.ref.current;null!=e&&e.blur()};i.submit=function(e){var t;null===(t=this.ref.current)||void 0===t||t.submit(e)};i.insertEmoji=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.props.textValue,o=this.ref.current;if(null!=e&&null!=o){n&&!r.endsWith(" ")&&o.insertText(" ",void 0,!1);o.insertEmoji(e,t);t&&this.focus()}};i.insertGIF=function(e){ var t=this.props.textValue,n=this.ref.current;if(null!=e&&null!=n){t.endsWith(" ")||n.insertText(" ",void 0,!1);n.insertText(e.url)}};i.handleOuterClick=function(){this.focus()};i.clearValue=function(){var e=this.props,t=e.channel,n=e.type;this.setState({focused:!0,submitting:!1});y.Z.saveDraft(t.id,"",n.drafts.type)};i.getCurrentWord=function(){var e,t=this.ref.current;return null!==(e=null==t?void 0:t.getCurrentWord())&&void 0!==e?e:{word:null,isAtStart:!1}};i.insertAutocomplete=function(e,t,n){var r=this.ref.current;return null==r?void 0:r.insertAutocomplete(e,t,n)};i.getCurrentCommandOption=function(){var e,t,n=this.ref.current;return null!==(t=null==n||null===(e=n.getCurrentCommandOption)||void 0===e?void 0:e.call(n))&&void 0!==t?t:null};i.getCurrentCommandOptionValue=function(){var e,t,n=this.ref.current;return null!==(t=null==n||null===(e=n.getCurrentCommandOptionValue)||void 0===e?void 0:e.call(n))&&void 0!==t?t:[]};i.getCommandOptionValues=function(){var e,t,n=this.ref.current ;return null!==(t=null==n||null===(e=n.getCommandOptionValues)||void 0===e?void 0:e.call(n))&&void 0!==t?t:{}};i.getFirstText=function(){var e,t=this.ref.current;return null!==(e=null==t?void 0:t.getFirstText())&&void 0!==e?e:null};i.getSlateEditor=function(){var e,t,n=this.ref.current;return null!==(t=null==n||null===(e=n.getSlateEditor)||void 0===e?void 0:e.call(n))&&void 0!==t?t:null};i.fixFocus=function(e){e.focused&&!this.props.focused?this.blur():!e.focused&&this.props.focused&&this.focus()};i.appendText=function(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];null===(n=this.ref.current)||void 0===n||n.insertText(e,t,r)};i.getPlaceholder=function(){var e=this.props,t=e.disabled,n=e.placeholder,r=e.isPreviewing;return t&&!r?q.Z.Messages.NO_SEND_MESSAGES_PERMISSION_PLACEHOLDER:n};i.render=function(){ var e,t,n,o,i,l,u,c,s=this.props,f=s.textValue,d=s.richValue,p=s.disabled,h=s.onChange,y=s.onKeyDown,b=s.onResize,v=s.onSubmit,m=s.channel,g=s.type,O=s.fontSize,E=s.useSlate,C=s.spellcheckEnabled,j=s.useNewSlashCommands,S=s.canOnlyUseTextCommands,I=s.className,_=s.maxCharacterCount,w=s["aria-describedby"],x=s["aria-labelledby"],P=s.accessibilityLabel,N=this.state,A=N.submitting,T=N.popup,Z={channel:m,className:a()(I,tp().textArea,(u={},op(u,tp().textAreaSlate,E),op(u,tp().textAreaDisabled,p||A),u)),placeholder:this.getPlaceholder(),accessibilityLabel:P,disabled:p||!1,submitting:A,isEdit:g===cn.I.EDIT,onFocus:this.handleFocus,onBlur:this.handleBlur,onPaste:this.handlePaste,onTab:this.handleTab,onEnter:this.handleEnter,moveSelection:this.handleMoveSelection,maybeShowAutocomplete:this.maybeShowAutocomplete,hideAutocomplete:this.hideAutocomplete,onChange:h,onResize:b,onKeyDown:y,onSubmit:v,textAreaPaddingClassName:a()(hp[O],(c={}, op(c,tp().textAreaWithoutAttachmentButton,g!==cn.I.NORMAL&&g!==cn.I.OVERLAY&&g!==cn.I.THREAD_CREATION&&g!==cn.I.SIDEBAR),op(c,tp().textAreaForPostCreation,g===cn.I.CREATE_FORUM_POST),c)),spellcheckEnabled:C,useNewSlashCommands:j,disableAutoFocus:Ro.tq||null!==(n=g.disableAutoFocus)&&void 0!==n&&n,disableEnterToSubmit:null!==(o=null===(e=g.submit)||void 0===e?void 0:e.disableEnterToSubmit)&&void 0!==o&&o,"aria-controls":null!==(i=T.id)&&void 0!==i?i:void 0,"aria-haspopup":"listbox","aria-expanded":null!==T.id||void 0,"aria-activedescendant":null!==(l=T.activeDescendant)&&void 0!==l?l:void 0,"aria-invalid":f.length>_,"aria-describedby":w,"aria-labelledby":x,"aria-autocomplete":"list"},M=E?(0,r.jsx)($d,lp(ap({ref:this.ref},Z),{type:g,value:p?(0,On.JM)(""):d,canUseCommands:null===(t=g.commands)||void 0===t?void 0:t.enabled,canOnlyUseTextCommands:S})):(0,r.jsx)(dc,lp(ap({ref:this.ref},Z),{value:p?"":f}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Au.d9,{event:se.CkL.INSERT_TEXT, handler:this.handleInsertText}),(0,r.jsx)(Au.d9,{event:se.CkL.CLEAR_TEXT,handler:this.handleClearText}),M]})};return n}(o.Component);var bp=n(34225),vp=n(927219),mp=n.n(vp);function gp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&ce.default.track(se.rMx.MJ_CHAT_BAR_VIEWED,{channel_id:t.id,guild_id:t.guild_id})}),[n,i.length,t.id,t.guild_id]);if(!n||0===i.length)return null;var a=function(){(0,Ap.tA)(t.id,"imagine",Yp,Z.Vh.MJ_CHAT_BAR);Tp.dismiss();ce.default.track(se.rMx.MJ_CHAT_BAR_CTA_CLICKED,{channel_id:t.id,guild_id:t.guild_id,cta_type:"command"})};return(0,r.jsxs)("div",{className:zp().bar,children:[(0,r.jsx)("div",{children:q.Z.Messages.MJ_CHATBAR_BODY.format({commandHook:function(){return(0,r.jsx)(h.eee,{onClick:a,children:"/imagine"})}})}),(0,r.jsx)(h.P3F,{className:zp().closeButton,onClick:Tp.dismiss,children:(0,r.jsx)(It.Z,{className:zp().closeIcon})})]})},qp=n(418705),Qp=n(896490),Xp=n(348592),Jp=n(602187),$p=n.n(Jp),eh=n(978193),th=n.n(eh),nh=function(){return(0,r.jsxs)("div",{className:$p().bar,children:[(0,r.jsx)("img",{src:th(),className:$p().clydeIcon,alt:""}),(0,r.jsx)("div",{ children:q.Z.Messages.CLYDE_CHAT_BAR_UPSELL.format()}),(0,r.jsx)("div",{className:$p().learnMore,children:q.Z.Messages.LEARN_MORE_LINK.format({helpdeskArticle:Xp.Z.getArticleURL(se.BhN.CLYDE_AI)})}),(0,r.jsx)("div",{className:$p().divider}),(0,r.jsx)(h.P3F,{className:$p().closeButton,onClick:function(){(0,Qp.EW)(qp.z$.CLYDE_CHAT_BAR_NUX)},children:(0,r.jsx)(It.Z,{className:$p().closeIcon})})]})},rh=n(550131),oh=n(28862),ih=n(784426),ah=n(367406),lh=n(598123),uh=n(749131),ch=n(816884),sh=n.n(ch);function fh(e){var t=e.channel,n=e.message,i=e.replyChainLength;o.useEffect((function(){(0,S.yw)(se.rMx.THREAD_NUDGE_SHOWN,{type:"Reply Chain (".concat(3,")"),reply_chain_length:i+1,channel_id:t.id,guild_id:t.guild_id})}),[t]);return(0,r.jsxs)(h.P3F,{onClick:function(){(0,oh.A6)(t.id);(0,ah.R6)(t,n,"Reply Chain Nudge")},className:sh().threadSuggestionBar,focusProps:{offset:{right:-4,left:-4}},children:[(0,r.jsx)(h.xvT,{color:"header-secondary",className:sh().text,variant:"text-sm/normal", children:q.Z.Messages.THREAD_REPLY_SUGGESTION.format({count:Math.min(10,i+1)})}),(0,r.jsx)(h.xvT,{color:"text-link",className:sh().createThreadButton,variant:"text-sm/semibold",children:q.Z.Messages.CREATE_THREAD})]})}function dh(e){var t=e.reply,n=e.chatInputType,o=function(e){e.stopPropagation();(0,oh.qx)(i.id,!u)},i=t.channel,l=t.message,u=t.shouldMention,c=t.showMentionToggle,s=(0,rh.ZP)(l),f=s.nick,d=s.colorString,y=s.colorRoleName,b=function(e,t){var n=e.id,r=t.id;return(0,p.e7)([lh.Z],(function(){for(var e=r,t=0;t<10;t++){var o=lh.Z.getMessage(n,e);if((null==o?void 0:o.type)!==se.uaV.REPLY||null==o.messageReference)return t;e=o.messageReference.message_id}return 10}),[n,r])}(i,l),v=(0,xu.NE)(i,l),m=n.showThreadPromptOnReply&&b>=2&&v;return(0,r.jsx)("div",{className:sh().clipContainer,children:(0,r.jsxs)("div",{className:sh().container,children:[(0,r.jsxs)("div",{className:sh().replyBar,children:[(0,r.jsx)(h.P3F,{onClick:function(){return(0, ih.uL)(se.Z5c.CHANNEL(i.getGuildId(),i.id,l.id))},focusProps:{offset:{top:-8,right:-4,bottom:-8,left:-4}},children:(0,r.jsx)(h.xvT,{color:"header-secondary",className:a()(sh().text,sh().replyLabel),variant:"text-sm/normal",children:q.Z.Messages.REPLYING_TO.format({userHook:function(e,t){return(0,r.jsx)(h.PUh,{className:sh().name,name:f,color:d,roleName:y},t)}})})}),(0,r.jsxs)("div",{className:sh().actions,children:[c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.ua7,{text:u?q.Z.Messages.REPLY_MENTION_ON_TOOLTIP:q.Z.Messages.REPLY_MENTION_OFF_TOOLTIP,children:function(e){var t=e.onMouseEnter,n=e.onMouseLeave,i=e.onFocus,a=e.onBlur;return(0,r.jsx)(h.P3F,{role:"switch","aria-checked":u,onClick:o,onMouseEnter:t,onMouseLeave:n,onFocus:i,onBlur:a,children:(0,r.jsxs)(h.xvT,{variant:"text-sm/bold",color:u?"text-link":"text-muted",className:sh().mentionButton,children:[(0,r.jsx)(uh.Z,{"aria-label":q.Z.Messages.MENTION,className:sh().mentionIcon }),u?q.Z.Messages.REPLY_MENTION_ON:q.Z.Messages.REPLY_MENTION_OFF]})})}}),(0,r.jsx)("div",{className:sh().separator,"aria-hidden":!0})]}),(0,r.jsx)(h.P3F,{className:sh().closeButton,onClick:function(e){e.stopPropagation();(0,oh.A6)(i.id)},children:(0,r.jsx)(It.Z,{className:sh().closeIcon})})]})]}),m&&(0,r.jsx)(fh,{channel:i,message:l,replyChainLength:b})]})})}function ph(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var hh=function(e){var t=e.channel,n=e.type,o=e.activeCommand,i=e.pendingReply,l=(0,p.cj)([g.Z],(function(){return{activeCommandOption:g.Z.getActiveOption(t.id),activeCommandOptionStates:g.Z.getOptionStates(t.id)}})),u=l.activeCommandOption,c=l.activeCommandOptionStates,s=Ut(t),f=function(e){var t=e.getGuildId(),n=(0,p.e7)([ve.Z],(function(){return ve.Z.getGuild(t)})),r=(0,sn.Ib)(n),o=(0,Qp.wE)(qp.z$.CLYDE_CHAT_BAR_NUX);return r&&!o}(t),d=function(e){var t=(0,p.e7)([Vp],(function(){return!Vp.dismissed()})) ;return Mp.useExperiment({guildId:e.guild_id}).enabled&&t}(t),h=[];null!=o&&h.push((0,r.jsx)(Np,{activeCommand:o,activeOption:null!=u?u:null,optionStates:c}));null!=i&&h.push((0,r.jsx)(dh,{reply:i,chatInputType:n}));s&&h.push((0,r.jsx)(Bt,{}));f&&n===cn.I.NORMAL&&h.push((0,r.jsx)(nh,{}));!f&&d&&n===cn.I.NORMAL&&h.push((0,r.jsx)(Kp,{channel:t}));return 0===(h=h.map((function(e,t){var n=t===h.length-1;return(0,r.jsx)("div",{className:a()(ph({},tp().stackedAttachedBar,!n)),children:e},t)}))).length?null:(0,r.jsx)("div",{className:tp().attachedBars,children:h})};const yh=o.memo(hh);var bh=n(387099),vh=n(672798),mh=n(621270),gh=n(456741),Oh=n(398344),Eh=n(305082),Ch=n(645573),jh=n(964262),Sh=n(470643),Ih=n(399298),_h=n.n(Ih);function wh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length) ;for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?q.Z.Messages.SHARE_NITRO_MODAL_CONFIRMATION_GENERAL.format({count:s}):q.Z.Messages.SHARE_NITRO_MODAL_CONFIRMATION_GENERAL_LAST_REFERRAL}),(0,r.jsx)("hr",{className:cy().confirmationBodySeparator})]}),(0,r.jsxs)("div",{className:cy().confirmationButtonContainer,children:[(0,r.jsx)(h.zxk,{className:cy().confirmationShareButton,submitting:u, onClick:function(){return Cy(a,i.id,t,c)},children:q.Z.Messages.SHAER_NITRO_CONFIRMATION_BUTTON_TEXT}),(0,r.jsx)("div",{className:cy().confirmationCancelButtonContainer,children:(0,r.jsx)(h.P3F,{onClick:t,children:(0,r.jsx)(h.xvT,{variant:"text-sm/medium",className:cy().confirmationCancelCopy,children:q.Z.Messages.CANCEL})})})]})]})};function Sy(e){var t=e.referralsRemaining,n=e.channel,i=e.onClose,a=e.isResending,l=my(o.useState(!1),2),u=l[0],c=l[1],s=my(o.useState(!1),2),f=s[0],d=s[1],p=n.isDM()&&void 0!==n.recipients?n.recipients[0]:null;return null==p?null:u?(0,r.jsx)(jy,{onClose:i,referralsRemaining:t,channel:n,recipient:p}):(0,r.jsxs)("div",{className:cy().generalContainer,children:[(0,r.jsxs)("div",{className:cy().generalBodyContainer,children:[(0,r.jsx)(h.olH,{onClick:i,className:cy().closeButton}),(0,r.jsx)("img",{alt:"",src:py(),className:cy().generalBodyImage}),(0,r.jsx)(h.X6q,{className:cy().generalHeading,variant:"heading-xl/bold", children:a?q.Z.Messages.SHARE_NITRO_RESEND_TRIAL_HEADER:q.Z.Messages.SHARE_NITRO_MODAL_HEADER}),(0,r.jsx)(h.xvT,{className:cy().generalBodyCopy,variant:"text-md/bold",children:a?q.Z.Messages.SHARE_NITRO_RESEND_TRIAL_BODY:q.Z.Messages.SHARE_NITRO_MODAL_BODY_GENERAL.format({count:t})})]}),(0,r.jsx)("div",{className:cy().generalButtonContainer,children:(0,r.jsx)(h.zxk,{className:cy().generalShareButton,submitting:f,onClick:function(){a?Cy(p,n.id,i,d):c(!0)},children:a?q.Z.Messages.SHARE_NITRO_RESEND_BUTTON_TEXT:q.Z.Messages.SHARE_NITRO_BUTTON_TEXT})})]})}function Iy(e){var t=e.shouldShowPopout,n=e.referralsRemaining,o=e.channel,i=e.onClose,a=e.isResending;return t?(0,r.jsx)("div",{onMouseDown:function(e){return e.stopPropagation()},children:(0,r.jsx)(iy.y,{shouldShow:!0,position:"top",align:"center",renderPopout:function(e){return(0,r.jsx)(Sy,vy(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Ay=function(e){var t=e.referralsRemaining,n=e.fillColor;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd", d:"M27.1899 15.6966C26.7297 16.7497 26.0852 17.7137 25.2855 18.5425C24.38 19.4811 23.2941 20.2272 22.0931 20.7358C19.704 21.7967 16.9967 21.8902 14.54 20.9969C12.0833 20.1036 10.0685 18.2928 8.91879 15.9452C8.46102 14.9636 8.16829 13.9132 8.05239 12.8363H6.06478C5.8034 12.8364 5.55253 12.7334 5.36652 12.5498C5.1805 12.3661 5.07432 12.1166 5.07097 11.8553C5.07263 11.7264 5.09966 11.5992 5.1505 11.4808C5.20135 11.3624 5.27502 11.2552 5.3673 11.1653C5.45959 11.0753 5.56868 11.0045 5.68836 10.9567C5.80803 10.909 5.93594 10.8853 6.06478 10.8869H8.91879C9.04763 10.8869 9.1752 10.8616 9.29423 10.8123C9.41326 10.763 9.52141 10.6907 9.61251 10.5996C9.70361 10.5085 9.77588 10.4003 9.82518 10.2813C9.87448 10.1623 9.89986 10.0347 9.89986 9.90587C9.89986 9.77704 9.87448 9.64946 9.82518 9.53043C9.77588 9.4114 9.70361 9.30325 9.61251 9.21215C9.52141 9.12105 9.41326 9.04879 9.29423 8.99948C9.1752 8.95018 9.04763 8.9248 8.91879 8.9248H4.34473C4.21589 8.92649 4.08798 8.90278 3.9683 8.85502C3.84863 8.80727 3.73954 8.73641 3.64725 8.64649C3.55496 8.55657 3.4813 8.44935 3.43045 8.33096C3.37961 8.21257 3.35258 8.08532 3.35092 7.95648C3.35427 7.69512 3.46045 7.4456 3.64646 7.26197C3.83248 7.07834 4.08334 6.97539 4.34473 6.97541H10.779C10.9164 6.99114 11.0555 6.97766 11.1873 6.93586C11.3191 6.89405 11.4405 6.82487 11.5437 6.73283C11.6469 6.6408 11.7294 6.528 11.7859 6.40183C11.8425 6.27566 11.8717 6.13897 11.8717 6.00071C11.8717 5.86246 11.8425 5.72577 11.7859 5.5996C11.7294 5.47342 11.6469 5.36063 11.5437 5.26859C11.4405 5.17656 11.3191 5.10738 11.1873 5.06557C11.0555 5.02377 10.9164 5.01029 10.779 5.02602H8.19255C7.98262 5.04532 7.77097 5.02064 7.57112 4.95354C7.37127 4.88644 7.1876 4.7784 7.03186 4.63632C6.87611 4.49424 6.75171 4.32124 6.66659 4.12838C6.58147 3.93551 6.53751 3.72701 6.53751 3.51619C6.53751 3.30538 6.58147 3.09688 6.66659 2.90401C6.75171 2.71115 6.87611 2.53815 7.03186 2.39607C7.1876 2.25399 7.37127 2.14595 7.57112 2.07885C7.77097 2.01175 7.98262 1.98707 8.19255 2.00637H18.3855C18.7845 2.02155 19.181 2.06039 19.573 2.12223C18.4001 3.20574 17.5522 4.63592 17.192 6.25005C16.658 6.32722 16.133 6.48003 15.6334 6.70785C14.9556 7.00255 14.3439 7.43011 13.8342 7.96527C13.3245 8.50042 12.9273 9.13232 12.666 9.82361C12.4047 10.5149 12.2846 11.2515 12.3128 11.99C12.341 12.7285 12.517 13.4539 12.8303 14.1232C13.4795 15.479 14.6341 16.5265 16.0465 17.041C17.4589 17.5554 19.0167 17.496 20.3858 16.8753C21.0624 16.5792 21.673 16.1508 22.1817 15.6154C22.2111 15.5845 22.2401 15.5532 22.2687 15.5216C23.121 15.8312 24.0408 16 25 16C25.7593 16 26.4939 15.8942 27.1899 15.6966ZM20.4791 14.601L20.1568 15.1419C20.1268 15.1966 20.0825 15.242 20.0286 15.2734C19.9748 15.3049 19.9134 15.3211 19.851 15.3203H16.1943C16.132 15.3211 16.0706 15.3049 16.0167 15.2734C15.9629 15.242 15.9185 15.1966 15.8885 15.1419L14.0156 12.0203C13.9844 11.9638 13.968 11.9002 13.968 11.8356C13.968 11.771 13.9844 11.7074 14.0156 11.6508L15.8885 8.59296C15.9211 8.54156 15.9664 8.49936 16.0199 8.47036C16.0734 8.44137 16.1335 8.42656 16.1943 8.42733H17.0112C17.1461 10.991 18.488 13.2347 20.4791 14.601ZM1.54168 8.9248C1.80309 8.92824 2.05533 8.82853 2.24374 8.64728C2.43215 8.46602 2.54155 8.21783 2.54823 7.95648C2.54165 7.69616 2.43445 7.44851 2.24913 7.26557C2.06381 7.08263 1.8148 6.97862 1.55442 6.97541H0.993808C0.733423 6.97862 0.484416 7.08263 0.299097 7.26557C0.113779 7.44851 0.00657271 7.69616 0 7.95648C0.0066466 8.21561 0.114278 8.46189 0.299938 8.64279C0.485597 8.82369 0.73459 8.92489 0.993808 8.9248H1.54168Z", fill:n}),(0,r.jsx)("path",{d:"M31 8C31 11.3137 28.3137 14 25 14C21.6863 14 19 11.3137 19 8C19 4.68629 21.6863 2 25 2C28.3137 2 31 4.68629 31 8Z",fill:n,mask:"url(#mask)"}),(0,r.jsxs)("mask",{id:"mask",children:[(0,r.jsx)("path",{d:"M31 8C31 11.3137 28.3137 14 25 14C21.6863 14 19 11.3137 19 8C19 4.68629 21.6863 2 25 2C28.3137 2 31 4.68629 31 8Z",fill:"white"}),(0,r.jsx)("text",{fill:"black",fontFamily:"gg sans",fontSize:"12",fontWeight:"600",letterSpacing:"0em",children:(0,r.jsx)("tspan",{x:"21.6367",y:"12.212",children:t})})]})]})},Ty=function(e){var t=e.fillColor;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd", d:"M3.24374 8.64728C3.05533 8.82853 2.80309 8.92824 2.54168 8.9248H1.99381C1.73459 8.92489 1.4856 8.82369 1.29994 8.64279C1.11428 8.46189 1.00665 8.21561 1 7.95648C1.00657 7.69616 1.11378 7.44851 1.2991 7.26557C1.48442 7.08263 1.73342 6.97862 1.99381 6.97541H2.55442C2.8148 6.97862 3.06381 7.08263 3.24913 7.26557C3.43445 7.44851 3.54165 7.69616 3.54823 7.95648C3.54155 8.21783 3.43215 8.46602 3.24374 8.64728ZM26.2855 18.5425C25.38 19.4811 24.2941 20.2272 23.0931 20.7358C20.704 21.7967 17.9967 21.8902 15.54 20.9969C13.0833 20.1036 11.0685 18.2928 9.91879 15.9452C9.46102 14.9636 9.16829 13.9132 9.05239 12.8363H7.06478C6.8034 12.8364 6.55253 12.7334 6.36652 12.5498C6.1805 12.3661 6.07432 12.1166 6.07097 11.8553C6.07263 11.7264 6.09966 11.5992 6.1505 11.4808C6.20135 11.3624 6.27502 11.2552 6.3673 11.1653C6.45959 11.0753 6.56868 11.0045 6.68836 10.9567C6.80803 10.909 6.93594 10.8853 7.06478 10.8869H9.91879C10.0476 10.8869 10.1752 10.8616 10.2942 10.8123C10.4133 10.763 10.5214 10.6907 10.6125 10.5996C10.7036 10.5085 10.7759 10.4003 10.8252 10.2813C10.8745 10.1623 10.8999 10.0347 10.8999 9.90587C10.8999 9.77704 10.8745 9.64946 10.8252 9.53043C10.7759 9.4114 10.7036 9.30325 10.6125 9.21215C10.5214 9.12105 10.4133 9.04879 10.2942 8.99948C10.1752 8.95018 10.0476 8.9248 9.91879 8.9248H5.34473C5.21589 8.92649 5.08798 8.90278 4.9683 8.85502C4.84863 8.80727 4.73954 8.73641 4.64725 8.64649C4.55496 8.55657 4.4813 8.44935 4.43045 8.33096C4.37961 8.21257 4.35258 8.08532 4.35092 7.95648C4.35427 7.69512 4.46045 7.4456 4.64646 7.26197C4.83248 7.07834 5.08334 6.97539 5.34473 6.97541H11.779C11.9164 6.99114 12.0555 6.97766 12.1873 6.93586C12.3191 6.89405 12.4405 6.82487 12.5437 6.73283C12.6469 6.6408 12.7294 6.528 12.7859 6.40183C12.8425 6.27566 12.8717 6.13897 12.8717 6.00071C12.8717 5.86246 12.8425 5.72577 12.7859 5.5996C12.7294 5.47342 12.6469 5.36063 12.5437 5.26859C12.4405 5.17656 12.3191 5.10738 12.1873 5.06557C12.0555 5.02377 11.9164 5.01029 11.779 5.02602H9.19255C8.98262 5.04532 8.77097 5.02064 8.57112 4.95354C8.37127 4.88644 8.1876 4.7784 8.03186 4.63632C7.87611 4.49424 7.75171 4.32124 7.66659 4.12838C7.58147 3.93551 7.53751 3.72701 7.53751 3.51619C7.53751 3.30538 7.58147 3.09688 7.66659 2.90401C7.75171 2.71115 7.87611 2.53815 8.03186 2.39607C8.1876 2.25399 8.37127 2.14595 8.57112 2.07885C8.77097 2.01175 8.98262 1.98707 9.19255 2.00637H19.3855C21.2132 2.07591 22.9875 2.64152 24.5182 3.64258C26.049 4.64363 27.2785 6.04239 28.0749 7.68891C28.6312 8.86858 28.9435 10.1485 28.993 11.4518C29.0425 12.7551 28.8282 14.055 28.363 15.2735C27.8977 16.4919 27.1911 17.6039 26.2855 18.5425ZM13.3128 11.99C13.341 12.7285 13.517 13.4539 13.8303 14.1232C14.4795 15.479 15.6341 16.5265 17.0465 17.041C18.4589 17.5554 20.0167 17.496 21.3858 16.8753C22.0624 16.5792 22.673 16.1508 23.1817 15.6154C23.6904 15.08 24.0869 14.4484 24.3481 13.7576C24.6092 13.0667 24.7296 12.3307 24.7023 11.5927C24.6749 10.8547 24.5004 10.1295 24.1889 9.45993C23.5422 8.1018 22.3878 7.05217 20.9744 6.53736C19.5611 6.02254 18.002 6.08377 16.6334 6.70785C15.9556 7.00255 15.3439 7.43011 14.8342 7.96527C14.3245 8.50042 13.9273 9.13232 13.666 9.82361C13.4047 10.5149 13.2846 11.2515 13.3128 11.99ZM17.1943 8.42733H20.851C20.9185 8.43261 20.9831 8.45698 21.0372 8.49759C21.0914 8.5382 21.1328 8.59337 21.1568 8.65667L22.9788 11.7145C23.01 11.7711 23.0264 11.8347 23.0264 11.8993C23.0264 11.9639 23.01 12.0275 22.9788 12.084L21.1568 15.1419C21.1268 15.1966 21.0825 15.242 21.0286 15.2734C20.9748 15.3049 20.9134 15.3211 20.851 15.3203H17.1943C17.132 15.3211 17.0706 15.3049 17.0167 15.2734C16.9629 15.242 16.9185 15.1966 16.8885 15.1419L15.0156 12.0203C14.9844 11.9638 14.968 11.9002 14.968 11.8356C14.968 11.771 14.9844 11.7074 15.0156 11.6508L16.8885 8.59296C16.9211 8.54156 16.9664 8.49936 17.0199 8.47036C17.0734 8.44137 17.1335 8.42656 17.1943 8.42733Z", fill:t})})};function Zy(e){var t=e.width,n=void 0===t?31:t,o=e.height,i=void 0===o?22:o,a=e.color,l=void 0===a?"currentColor":a,u=e.referralsRemaining,c=e.isResending,s=e.hovered,f=Ny(e,["width","height","color","referralsRemaining","isResending","hovered"]),d=s?"url(#nitro_hover)":l;return(0,r.jsxs)("svg",Py(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function hb(e){ var t=e.width,n=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.className,l=e.fill,u=void 0===l?"currentColor":l,c=pb(e,["width","height","className","fill"]);return(0,r.jsx)("svg",db(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,O=(0,p.e7)([Nu.Z],(function(){return Nu.Z.getUploads(f.id,c.drafts.type)})),E=(0,p.cj)([g.Z],(function(){return{activeCommand:g.Z.getActiveCommand(f.id),activeCommandOption:g.Z.getActiveOption(f.id)}})),C=E.activeCommand,S=E.activeCommandOption,I=bh.Z.useExperiment({}).paymentsBlocked,_=[],w=gh.Z.getCurrentConfig({}).enabled,x=ge.default.getCurrentUser(),P=null!==(u=(0,p.e7)([vh.Z],(function(){ return w&&Ga.ZP.isPremiumExactly(x,fe.p9.TIER_2)?vh.Z.getReferralsRemaining():0})))&&void 0!==u?u:0,N=(0,p.e7)([vh.Z],(function(){if(!f.isDM()||void 0===f.recipients||f.recipients.length>1||!w)return!1;var e=f.recipients[0];return vh.Z.getSentUserIds().includes(e)})),A=(0,p.e7)([vh.Z],(function(){if(!f.isDM()||void 0===f.recipients||f.recipients.length>1)return!1;var e=f.recipients[0];return!(!w||null==e||!(N||P>0)||vh.Z.isFetchingRecipientEligibility(e))&&vh.Z.getRecipientEligibility(e)}));if(!Ro.tq){var T,Z,M,R;if(f.isDM()&&null!=(null===(T=c.gifts)||void 0===T?void 0:T.button)&&null==C)if(w&&A){gh.Z.trackExposure({});_.push((0,r.jsx)(By,{disabled:s,referralsRemaining:P,channel:f,isResending:N},"referral"))}else w||gh.Z.trackExposure({});null==(null===(Z=c.gifts)||void 0===Z?void 0:Z.button)||null!=C||I||_.push((0,r.jsx)(_b,{disabled:s,channel:f},"gift"));null==(null===(M=c.gifs)||void 0===M?void 0:M.button)||c.consolidateGifsStickersEmojis||null!=C||_.push((0,r.jsx)(Qh,{disabled:s, type:c},"gif"));null==(null===(R=c.stickers)||void 0===R?void 0:R.button)||c.consolidateGifsStickersEmojis||null!=C||_.push((0,r.jsx)(Ib,{disabled:s,type:c},"sticker"))}null==(null===(t=c.emojis)||void 0===t?void 0:t.button)||c.consolidateGifsStickersEmojis||null!=C&&(null==S||S.type===j.jw.ATTACHMENT)||_.push((0,r.jsx)(Nh,{disabled:s,type:c},"emoji"));!c.consolidateGifsStickersEmojis||null==(null===(n=c.gifs)||void 0===n?void 0:n.button)&&null==(null===(o=c.stickers)||void 0===o?void 0:o.button)&&null==(null===(i=c.emojis)||void 0===i?void 0:i.button)||null!=C||_.push((0,r.jsx)(Th.Z,{disabled:s,type:c},"expression"));null!=(null===(a=c.submit)||void 0===a?void 0:a.button)&&((null===(l=c.submit)||void 0===l?void 0:l.ignorePreference)||y)&&_.push((0,r.jsx)(gb,{onClick:d,disabled:s||0===O.length&&h&&!m},"submit"));return 0===_.length?null:(0,r.jsx)("div",{className:tp().buttons,children:_})}const xb=o.memo(wb);var Pb=n(573485),Nb=n(510472);function Ab(e,t,n){ t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Tb(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Zb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Mb(e){ var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Zb(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",Tb(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function kb(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Db(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",Lb(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Hb(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Gb(e,["width","height","color","foreground"]);return(0, r.jsx)("svg",Fb(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Kb(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Yb(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",zb(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var a;n=(a=lv(i[0],2))[0],r=a[1]}}var l=o.useCallback((function(e){null!=(null==t?void 0:t.selection)&&vc.withSingleEntry(t,(function(){Ec.Q.voidToText(t,e,r)}))}),[t,r]) ;return null==n?null:nv(n,{replace:l})}function yv(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function bv(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function vv(e){var t,n=e.editorRef,i=e.options,a=e.channel,l=null===(t=n.current)||void 0===t?void 0:t.getSlateEditor(),u=o.useCallback((function(e,t){var r=n.current;null!=e&&null!=r&&r.insertEmoji(e,t,!1);t&&(0,zo._Q)()}),[n]);return null==l?null:(0,r.jsxs)("div",{id:"slate-toolbar",className:iv().staticToolbar,children:[(0,r.jsx)("div",{className:iv().staticButtons,children:(0, r.jsx)(sv,{editorRef:n,options:i,iconClassName:iv().staticIcon,dividerClassName:iv().staticDivider})}),(0,r.jsx)(h.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(Bo.Z,{persistSearch:!0,channel:a,closePopout:t,onSelectEmoji:function(e,n){u(e,n);n&&t()},pickerIntention:se.HzX.COMMUNITY_CONTENT})},position:"bottom",animation:h.yRy.Animation.NONE,align:"left",children:function(e,t){var n=t.isShown;return(0,r.jsx)(Sh.Z,bv(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]2&&void 0!==arguments[2]&&arguments[2],o=e.current;null!=t&&null!=o&&o.insertEmoji(t,n,r);n&&(0,zo._Q)()}),[e])}(ee),Le=wv({editorRef:ee, disabled:ce,textValue:E,channelId:x.id,chatInputType:P,submit:U}),De=o.useCallback((function(){var e;return null==ne||null===(e=ne.current)||void 0===e?void 0:e.hide()}),[]),ke=function(e){var t=Sv(o.useState(0),2),n=t[0],r=t[1];return{editorHeight:n,handleResize:o.useCallback((function(t){r(null!=t?t:0);null==e||e(t)}),[e])}}(R),Ue=ke.editorHeight,Be=ke.handleResize,Fe=function(e,t,n){var r=o.useCallback((function(){var r,o;return!(n||!(null===(r=t.current)||void 0===r?void 0:r.onTabOrEnter(!1)))||(null===(o=e.current)||void 0===o?void 0:o.onTabOrEnter(!1))||!1}),[n]),i=o.useCallback((function(){var r,o;return!(n||!(null===(r=t.current)||void 0===r?void 0:r.onTabOrEnter(!0)))||(null===(o=e.current)||void 0===o?void 0:o.onTabOrEnter(!0))||!1}),[n]),a=o.useCallback((function(r){var o,i;return!(n||!(null===(o=t.current)||void 0===o?void 0:o.onMoveSelection(r)))||(null===(i=e.current)||void 0===i?void 0:i.onMoveSelection(r))||!1}),[n]);return{handleTab:r,handleEnter:i, handleMoveSelection:a}}(Ae,$,be),Ge=Fe.handleTab,He=Fe.handleEnter,Ve=Fe.handleMoveSelection,We=function(e,t,n){var r=Sv((0,zo.Iu)((function(e){return[e.activeView,e.activeViewType]}),f.Z),2),i=r[0],a=r[1];o.useEffect((function(){return function(){(0,zo._Q)(e)}}),[e]);var l=o.useCallback((function(e){t.emit("autocomplete-visibility-change",e);e&&(0,zo._Q)()}),[t]),u=o.useCallback((function(){var e;null==i&&(null===(e=n.current)||void 0===e||e.handleOuterClick())}),[i]);return{expressionPickerView:i,shouldHideExpressionPicker:null==i||null==a||a!==e,handleAutocompleteVisibilityChange:l,handleOuterClick:u}}(P,Se,ee),ze=We.expressionPickerView,Ye=We.shouldHideExpressionPicker,Ke=We.handleAutocompleteVisibilityChange,qe=We.handleOuterClick;Fu(Se,x.guild_id,x.id);var Qe=ce&&!((le||ue)&&pe)||we&&(null===(i=P.submit)||void 0===i?void 0:i.useDisabledStylesOnSubmit),Xe=null;null!=oe?Xe=null==T?void 0:T(oe,ie,tp().attachButton):ce&&!de||(Xe=null==A?void 0:A(P===cn.I.NORMAL,tp().attachButton)) ;var Je,$e,et,tt,nt,rt,ot=null!=Z,it=ye&&null!=C&&!ce&&P.showCharacterCount&&null==oe,at=ye&&!__OVERLAY__&&null!=C&&null==oe,lt=function(e,t,n,r){var o,i,a=Ar.up.useSetting(),l=(0,p.e7)([wu.Z],(function(){return wu.Z.getStickerPreview(e.id,t.drafts.type)})),u=null!=l&&l.length>0;return a&&(null===(o=t.stickers)||void 0===o?void 0:o.autoSuggest)&&!u&&!0!==(null===(i=r.current)||void 0===i?void 0:i.isVisible())&&!__OVERLAY__&&null!=n}(x,P,C,Ae),ut=Ut(x),ct=null!=oe||null!=Z||ut;return(0,r.jsx)(Zo,{value:Se,children:(0,r.jsxs)(X,{children:[at&&he?(0,r.jsx)(vv,{editorRef:ee,options:P.markdown,channel:x}):at?(0,r.jsx)(fv,{ref:ne,editorRef:ee,containerRef:te,options:P.markdown}):null,(0,r.jsxs)("div",{ref:J,className:a()(j,(et={},Ev(et,tp().channelTextArea,!0),Ev(et,tp().channelTextAreaDisabled,Qe),Ev(et,tp().highlighted,F),et)),onMouseDown:qe,children:[(0,r.jsx)(yh,{type:P,channel:x,activeCommand:oe,pendingReply:Z}),(0,r.jsxs)("div",{ref:te,onScroll:De,className:a()(S,(tt={}, Ev(tt,tp().scrollableContainer,!0),Ev(tt,tp().webkit,"Blink"===platform.layout),Ev(tt,tp().hasConnectedBar,ct),tt)),children:[(0,r.jsx)(Cp,{channelId:x.id,chatInputType:P}),P.hideAttachmentArea?null:(0,r.jsx)(Pb.Z,{channelId:x.id,type:P,canAttachFiles:fe}),(0,r.jsxs)("div",{className:a()(tp().inner,(nt={},Ev(nt,tp().innerDisabled,Qe),Ev(nt,tp().sansAttachButton,P!==cn.I.FORM&&P!==cn.I.EDIT&&P!==cn.I.RULES_INPUT&&P!==cn.I.PROFILE_BIO_INPUT&&P!==cn.I.FORUM_CHANNEL_GUIDELINES),Ev(nt,tp().sansAttachButtonCreateThread,P===cn.I.THREAD_CREATION),Ev(nt,tp().sansAttachButtonCreatePost,P===cn.I.CREATE_FORUM_POST),nt)),children:[Xe,(0,r.jsx)(h.tEY,{ringTarget:J,ringClassName:tp().focusRing,children:(0,r.jsx)(yp,{ref:ee,focused:N,useSlate:ye,textValue:E,richValue:C,disabled:ce,placeholder:_,accessibilityLabel:w,isPreviewing:(le||ue)&&pe,channel:x,type:P,canPasteFiles:fe,uploadPromptCharacterCount:se.en1,maxCharacterCount:null!=V?V:ve,"aria-describedby":z,onChange:M,onResize:Be,onBlur:L,onFocus:D, onKeyDown:k,onSubmit:xe,onTab:Ge,onEnter:He,onMoveSelection:Ve,onSelectionChanged:Ie,onMaybeShowAutocomplete:Te,onHideAutocomplete:Ze,promptToUpload:B,fontSize:Ee,spellcheckEnabled:Ce,canOnlyUseTextCommands:ot,className:a()((rt={},Ev(rt,tp().textAreaThreadCreation,P===cn.I.THREAD_CREATION),Ev(rt,tp().profileBioInput,P===cn.I.PROFILE_BIO_INPUT),rt)),"aria-labelledby":Y})}),(0,r.jsx)(xb,{type:P,disabled:ce,channel:x,handleSubmit:Pe,isEmpty:0===E.trim().length})]})]}),be?null:(0,r.jsx)(gt,{ref:$,channel:x,canOnlyUseTextCommands:ot}),(0,r.jsx)(So,{ref:Ae,channel:x,canMentionRoles:G,canMentionChannels:H,useNewSlashCommands:ye,canOnlyUseTextCommands:ot,canSendStickers:null===(l=P.stickers)||void 0===l?void 0:l.allowSending,textValue:E,focused:N,expressionPickerView:ze,type:P,editorRef:ee,onSendMessage:xe,onSendSticker:Le,onVisibilityChange:Ke,editorHeight:Ue,setValue:function(e,t){return null==M?void 0:M(null,e,t)},position:Q}),(0,r.jsx)(_u,{textValue:E,editorHeight:Ue}),it?(0,r.jsx)(Nb.Z,{ type:P,textValue:E,className:W,maxCharacterCount:V}):null,lt?(0,r.jsx)(fu,{editorRef:ee,channel:x,isEditorFocused:N,onSelectSticker:Le,submitButtonVisible:(null===(c=P.submit)||void 0===c?void 0:c.button)&&(null!==(Je=null===(y=P.submit)||void 0===y?void 0:y.ignorePreference)&&void 0!==Je?Je:Oe),stickerIconVisible:null!==($e=null===(O=P.stickers)||void 0===O?void 0:O.button)&&void 0!==$e&&$e}):null]}),Ye?null:(0,r.jsx)(kl,{positionTargetRef:J,type:P,onSelectGIF:Me,onSelectEmoji:Re,onSelectSticker:Le,channel:x})]})})}const Pv=o.memo(o.forwardRef(xv))},573485:(e,t,n)=>{"use strict";n.d(t,{Z:()=>z});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(247346),c=n(202351),s=n(744564),f=n(567867),d=n(73904),p=n(316878),h=n(106200),y=n(423427),b=n(284610),v=n(255592),m=n(34225),g=n(194212),O=n(707961),E=n(557617),C=n(474717),j=n(873506),S=n(115549),I=n(2590),_=n(518017),w=n.n(_),x=n(712218),P=n.n(x);function N(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{ a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H=[];function V(e){var t=e.channelId,n=e.type,i=(0,c.e7)([p.Z],(function(){return p.Z.keyboardModeEnabled})),O=(0,h.Z)("attachments",u.hy.HORIZONTAL),E=(0,c.e7)([v.Z],(function(){return v.Z.getUploads(t,n.drafts.type)})),C=(0,c.cj)([y.Z],(function(){var e=y.Z.getActiveCommand(t);if(null==e)return{isApplicationCommand:!1,commandOptions:H,commandOptionStates:null};var n=y.Z.getOptionStates(t);return{isApplicationCommand:!0, commandOptions:e.options,commandOptionStates:n}})),j=C.isApplicationCommand,_=C.commandOptions,w=C.commandOptionStates,x=o.useMemo((function(){var e;return null!==(e=null==_?void 0:_.filter((function(e){var t;return e.type===d.jw.ATTACHMENT&&(null==w||null===(t=w[e.name])||void 0===t?void 0:t.hasValue)})))&&void 0!==e?e:[]}),[_,w]),P=G(o.useState([]),2),N=P[0],A=P[1];o.useEffect((function(){var e=function(){f.Z.clearAll(t,n.drafts.type)};s.Z.subscribe("APPLICATION_COMMAND_SET_ACTIVE_COMMAND",e);return function(){return s.Z.unsubscribe("APPLICATION_COMMAND_SET_ACTIVE_COMMAND",e)}}),[t,n]);var T=o.useCallback((function(){O.focusFirstVisibleItem()}),[O]);(0,g.yp)({event:I.CkL.FOCUS_ATTACHMENT_AREA,handler:T});o.useEffect((function(){if(j){var e=[];N.forEach((function(t){x.some((function(e){return t.name===e.name}))||e.push(t)}));e.forEach((function(e){f.Z.remove(t,e.name,n.drafts.type)}));A(x)}}),[t,x.length,n]);return!j&&0===E.length||j&&0===x.length?null:(0,r.jsxs)(o.Fragment,{ children:[(0,r.jsx)(l.bG,{navigator:O,children:(0,r.jsx)(l.SJ,{children:function(e){var o=e.ref,l=F(e,["ref"]);return(0,r.jsx)("ul",B(function(e){for(var t=1;t{"use strict";n.d(t,{cr:()=>h, HZ:()=>y,cu:()=>b,tM:()=>v,IB:()=>m,lk:()=>g,xi:()=>O,zb:()=>E});var r=n(73904),o=n(49621),i=n(423427),a=n(836296),l=n(855483),u=n(651700),c=n(556635),s=n(1131);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&"text"===o[0].type&&""===o[0].text.trim();)o.shift();for(;o.length>0&&"text"===o[o.length-1].type&&""===o[o.length-1].text.trim();)o.pop()}return o}function g(e,t,n,r,i){ if(null==e.options)return{};var l,u=Object.fromEntries(e.options.map((function(e){return[e.name,a.f(e,null!==(l=r[e.name])&&void 0!==l?l:null,t,n,i)]})));o.VP(n,u);return u}function O(e,t,n,r,l){var u,c=d(r,1)[0],s=i.Z.getActiveCommand(n),f=null==s||null===(u=s.options)||void 0===u?void 0:u.find((function(e){return e.name===c.optionName}));if(null!=f){var p=m(e,f,c),h=a.f(f,p,t,n,l);o.g7(n,function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({},c.optionName,{lastValidationResult:h}));return h}}function E(e,t){if(null==t.options||0===t.options.length)return[];var n=c.bN.richValue(e),r=[],o=new Set(b(e)),i={},a=new Set,l=!0,s=!1,f=void 0;try{for(var d,h=t.options[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var y=d.value;i[y.displayName]=y;o.has(y.name)||a.add(y.displayName)}}catch(e){s=!0;f=e}finally{try{l||null==h.return||h.return()}finally{if(s)throw f}}for(var v=null,m=0;m{"use strict";n.d(t,{Z:()=>R});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(153686),s=n(19585),f=n(545758),d=n(473903),p=n(95891),h=n(850841),y=n(61209),b=n(715107),v=n(366007),m=n(652591),g=n(2590),O=n(473708),E=n(761066),C=n.n(E);function j(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){j(i,r,o,a,l,"next",e)}function l(e){j(i,r,o,a,l,"throw",e)}a(void 0)}))}}function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]g.J6R&&b,S=null!=n.upsellLongMessages&&!b,I=m-C,_=I>E,w=0===I?O.Z.Messages.CHARACTER_COUNT_AT_LIMIT:I>0?O.Z.Messages.CHARACTER_COUNT_CLOSE_TO_LIMIT.format({count:I}):O.Z.Messages.CHARACTER_COUNT_OVER_LIMIT,x=(0,s.Z)(c.Z.CHARACTER_COUNT).AnalyticsLocationProvider;return j&&I>=0||!_||S&&!_?(0,r.jsx)(x,{children:(0,r.jsxs)("div",{className:a()(y,A().characterCount,T({},A().error,I<0)),children:[(0,r.jsxs)("div",{ className:A().flairContainer,children:[j&&I>=0?(0,r.jsx)(u.ua7,{text:O.Z.Messages.PREMIUM_MESSAGE_LENGTH_CHATBOX_FLAIR.format({maxLength:m}),position:"top",children:function(e){return(0,r.jsx)(p.Z,Z({className:A().premiumFlair},e))}}):null,_?null:(0,r.jsx)(u.ua7,{text:w,position:"top",children:function(e){return(0,r.jsx)("span",M(Z({"aria-hidden":!0},e),{children:I}))}})]}),(0,r.jsx)(u.nn4,{children:O.Z.Messages.CHARACTER_COUNT_CLOSE_TO_LIMIT.format({count:I})}),S&&!_?(0,r.jsx)(P,{className:A().upsell,iconOnly:(null===(t=n.upsellLongMessages)||void 0===t?void 0:t.iconOnly)||!1}):null]})}):null}},1131:(e,t,n)=>{"use strict";n.d(t,{YD:()=>r,u9:()=>o,i$:()=>i,On:()=>a});var r=[0],o=[0,0],i=/(\t|\s)/,a=["applicationCommandOption"]},651700:(e,t,n)=>{"use strict";n.d(t,{sk:()=>v,sg:()=>g});var r=n(441143),o=n.n(r),i=n(773011),a=n(971561),l=n(61209),u=n(567403),c=n(840922),s=n(464187),f=n(473903),d=n(556635);function p(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n0&&!d.LC.isText(e[0]);null==l&&(l=f?"\n":"") ;var p,h=null!==(n=null==i?void 0:i.path[0])&&void 0!==n?n:0,y=null!==(p=null==a?void 0:a.path[0])&&void 0!==p?p:e.length-1;if(c)for(var b=y;b>=h;b--){var v=e[b];if(d.LC.isText(v)){if(v.text.length>0){y=b;break}}else if(!d.q.isEmpty(v)){y=b;break}if(b===h)return""}for(var m=h>0&&d.aj.isType(e[h-1],"blockQuote"),O=d.aj.isType(e[h],"blockQuote"),E=d.aj.isType(e[y],"blockQuote"),C=[],j=h;j<=y;j++){var S=e[j];if(!u||!d.LC.isText(S)||0!==S.text.length){var I=g(S,{mode:o,start:null!=i&&j===h?{path:i.path.slice(1),offset:i.offset}:void 0,end:null!=a&&j===y?{path:a.path.slice(1),offset:a.offset}:void 0,allowBlockQuotePrefix:null==i||null==a||!m&&(!O||E),preventEmojiSurrogates:s});(!u||I.length>0)&&C.push(I)}}return C.join(l)}function g(e,t){var n=null!=t?t:{},r=n.mode,p=n.start,b=n.allowBlockQuotePrefix,v=void 0!==b&&b,g=n.preventEmojiSurrogates,O=void 0!==g&&g;if(d.LC.isText(e))return function(e,t){var n,r,i=null!=t?t:{},a=i.start,l=i.end ;o()(null==a||0===a.path.length,"Invalid start provided to serializeText");o()(null==l||0===l.path.length,"Invalid end provided to serializeText");return e.substring(null!==(n=null==a?void 0:a.offset)&&void 0!==n?n:0,null!==(r=null==l?void 0:l.offset)&&void 0!==r?r:e.length)}(e.text,t);switch(e.type){case"line":case"testInline":return m(e.children,t);case"testInlineVoid":return"";case"blockQuote":var E=m(e.children,t),C=null!=p&&1===p.path.length&&0===p.path[0]&&0===p.offset;return v&&(null==p||C)?"> ".concat(E):E;case"emoji":var j=e.emoji;return O||null==j.surrogate?j.name:j.surrogate;case"customEmoji":var S=e.emoji;if("raw"===r){var I=S.animated?"a":"",_=S.name.replace(/:/g,"").split("~")[0];return"<".concat(I,":").concat(_,":").concat(S.emojiId,">")}return S.name;case"textMention":return e.name;case"channelMention":var w="<#".concat(e.channelId,">");if("raw"===r)return w;var x=l.Z.getChannel(e.channelId);return null==x?w:(0,i.F6)(x,f.default,c.Z,!0,!0);case"staticRouteLink": var P="");if("raw"===r)return P;var N=l.Z.getChannel(e.channelId);return null==N?P:(0,i.F6)(N,f.default,c.Z,!0,!0);case"roleMention":var A="<@&".concat(e.roleId,">");if("raw"===r)return A;var T=u.Z.getGuild(s.Z.getGuildId()),Z=null==T?void 0:T.roles[e.roleId];return null==Z?A:"@".concat(Z.name);case"userMention":var M="<@".concat(e.userId,">");if("raw"===r)return M;var R=f.default.getUser(e.userId);return null==R?M:"@".concat(R.username,"#").concat(R.discriminator);case"commandMention":return"");case"timestamp":return(0,a.He)(e.parsed.timestamp,e.parsed.format);case"applicationCommand":return m(e.children,y(function(e){for(var t=1;t{"use strict";n.d(t,{Q:()=>s});var r=n(104182),o=n(893691),i=n(556635),a=n(1131);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;t--)r.YR.removeNodes(e,{at:i.C0.child(a,t),voids:!0})}));d(e,l,null,u,null)},selectCommandOption:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=o.cr(e);if(null!=a)for(var l=0;l0){var b=c(i.bN.node(e,y.path),1)[0];if(i.LC.isText(b)){var v=b.text.charCodeAt(y.offset);if(v>=56320&&v<=57343){var m=b.text.charCodeAt(y.offset-1);m>=55296&&m<=56319&&(l&&y.offset>0?y.offset-=1:!l&&y.offset{"use strict";n.d(t,{lP:()=>we,bN:()=>be,q:()=>me,aj:()=>ve,C0:()=>Oe,Jz:()=>Ee,M8:()=>Ce,Ew:()=>je,LC:()=>ge});var r=n(441143),o=n.n(r),i=n(104182),a=n(380942),l=n(5387),u=n.n(l),c=n(120053),s=n(894012),f=n(296602),d=n(645842),p=n(757278),h=n(844494);const y=(0,n(260561).B)({id:"2022-12_timestamp_tooltip",label:"Timestamp Tooltip",kind:"user",defaultConfig:{enabled:!1},treatments:[{id:1,label:"Enabled",config:{enabled:!0}}]});var b=n(120637),v=(n(455049),b.Z.listLanguages()),m={},g=!0,O=!1,E=void 0;try{for(var C,j=v[Symbol.iterator]();!(g=(C=j.next()).done);g=!0){var S=C.value;S=S.toLowerCase();var I=b.Z.getLanguage(S);if(null!=I){var _=I.aliases;m[S]=S;if(null!=_){var w=!0,x=!1,P=void 0;try{for(var N,A=_[Symbol.iterator]();!(w=(N=A.next()).done);w=!0){ var T=N.value;m[T.toLowerCase()]=S}}catch(e){x=!0;P=e}finally{try{w||null==A.return||A.return()}finally{if(x)throw P}}}}}}catch(e){O=!0;E=e}finally{try{g||null==j.return||j.return()}finally{if(O)throw E}}var Z=/^[a-z0-9_+\-.#]+$/,M=/^[a-z0-9_+\-.#]+$/i;for(var R in m)if(null==R.match(Z))throw new Error("Language name does not match regex: ".concat(R));function L(e){for(var t,n=[],r=/\\|```/g;null!=(t=r.exec(e));)"\\"!==t[0]?n.push(t.index):r.lastIndex+=1;return n}function D(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function k(e){for(var t=1;t"},strong:{type:"inlineStyle",before:"**",after:"**"},u:{type:"inlineStyle",before:"__",after:"__"},s:{type:"inlineStyle",before:"~~",after:"~~"},escape:{type:"inlineStyle",before:"\\",after:""},inlineCode:{type:"inlineStyle",before:"`",after:"`"},staticRouteLink:{type:"inlineStyle",before:""},spoiler:{type:"inlineStyle",before:"||",after:"||"},url:{type:"inlineStyle",before:"",after:""},codeBlockText:{type:"inlineStyle",before:"",after:""},codeBlockSyntax:{type:"inlineStyle",before:"",after:""},codeBlockLang:{type:"inlineStyle",before:"",after:""},timestamp:{type:"inlineObject"}},F=new Set(["*","_","\\"]),G={},H={};for(var V in d.Z.RULES){if(!(V in B))throw new Error("Slate: Unknown markdown rule: ".concat(V,". If you have just added a new markdown rule ")+"then you probably need to add it to this file so that the rich chat box understands it.");var W=B[V];"skip"!==W.type&&(G[V]=z(d.Z.RULES[V])) ;"skip"!==W.type&&"inlineObject"!==W.type&&(H[V]=z("text"===V?p.ZP:d.Z.RULES[V]))}function z(e){o()(null!=e.parse,"Slate: rule must have a parse function");var t=e.parse;return U(k({},e),{parse:function(e,n,r){var o=t.call(this,e,n,r);o instanceof Array||(o.originalMatch=e);return o}})}var Y={url:{parse:function(e){return{type:"link",content:e[1],originalMatch:e}}},autolink:{parse:function(e){return{type:"autolink",content:e[1],originalMatch:e}}},codeBlockSyntax:{order:c.defaultRules.inlineCode.order-.1,match:function(e){return/^(```)([a-z0-9_+\-.]+$)?/.exec(e)},parse:function(e){return null!=e[2]&&""!==e[2]&&e[2].toLowerCase()in m?[{type:"codeBlockSyntax",content:e[1],originalMatch:e},{type:"codeBlockLang",content:e[2],originalMatch:e}]:{type:"codeBlockSyntax",content:e[0],originalMatch:e}}}},K=(0,h.Z)([G,Y]),q=(0,h.Z)([H,Y]),Q=s._p(K),X=s._p(q),J={max:1/0,maxAge:6e4,updateAgeOnGet:!0},$=new(u())(J),ee=new(u())(J);function te(e,t,n){var r=[],o={returnMentionIds:!0, disableAutoBlockNewlines:!0,guildId:t},i=n?X:Q,a=n?ee:$,l=a.get(e);if(null!=l)return l;var u=e.replace(/\r\n/g," \n").replace(/[\r\f]/g," ").replace(/\t/g," ")+"\n\n";ne(r,u,{originalMatch:{index:0,0:""},type:"paragraph",content:i(u,!1,o)},0,[]);var c=function(e){e=e.filter((function(e){return e.text.length>0}));if(0===e.length)return e;for(var t=[e[0]],n=1;n0){var a=t.indexOf(n,r),l=t.substring(r,a+n.length);o()(a>=0,"Slate: Unable to find syntax characters");e.push({text:l,attributes:[i],start:r,data:null});r=a+n.length}return r}function ie(e){for(var t=e.result,n=e.sourceText,r=e.text,o=e.originalStart,i=e.attributes,a=e.data,l=ae(n,o);"\n"===r.charAt(0)||" "===r.charAt(0);)r=r.substring(1);var u=n.indexOf(r,l) ;if(u!==l)l=o=le(t,n,l,u);else if("\\"===r&&"\\"===n.charAt(u+1)){u++;o=++l}if(u!==l){new f.Z("MarkdownToSlate").error(JSON.stringify({sourceText:n,searchText:r,searchStartsAt:n.substring(l),startPos:l}));throw Error("Slate: Unable to find content in source text!")}var c=l+r.length,s=n.substring(o,c);t.push({text:s,attributes:i.slice(),start:o,data:a});return c}function ae(e,t){for(;"\n"===e.charAt(t)||" "===e.charAt(t);)t++;return t}function le(e,t,n,r){for(;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)&&(0===t.length||"line"===t[0].type&&me.isEmpty(t[0]))},getFirstText:function(e){var t=be.node(e,ue.u9);return ge.isText(t[0])?t[0]:null},getCurrentBlock:function(e){return null==e.selection?null:this.getParentBlock(e,e.selection)},getCurrentElement:function(e){return null==e.selection?null:this.getParentElement(e,e.selection)},getCurrentInline:function(e){return null==e.selection?null:this.getParentInline(e,e.selection)},getCurrentVoid:function(e){return null==e.selection?null:this.getParentVoid(e,e.selection)},getCurrentText:function(e){var t=null!=e.selection?Ce.toPoint(e.selection):null;return null==t?null:be.node(e,t.path)},getParentBlock:function(e,t){var n;return null!==(n=be.above(e,{at:t,match:function(t){return be.isBlock(e,t)},mode:"lowest"}))&&void 0!==n?n:null},getParentElement:function(e,t){var n;return null!==(n=be.above(e,{at:t, match:function(e){return me.isElement(e)},mode:"lowest"}))&&void 0!==n?n:null},getParentInline:function(e,t){var n;return null!==(n=be.above(e,{at:t,match:function(t){return be.isInline(e,t)},mode:"lowest"}))&&void 0!==n?n:null},getParentVoid:function(e,t){var n;return null!==(n=be.above(e,{at:t,match:function(t){return be.isVoid(e,t)},mode:"lowest"}))&&void 0!==n?n:null},getSelectedText:function(e,t){var n=null;if(t){var r=a.F3.findDocumentOrShadowRoot(e),o=r.getSelection();if(null!=o&&o.rangeCount>0){var i,l=null===(i=r.getSelection())||void 0===i?void 0:i.getRangeAt(0);null!=l&&(n=a.F3.toSlateRange(e,l,{exactMatch:!0,suppressThrow:!0}))}}else n=e.selection;return null==n?"":this.getTextFromRange(e,n)},getTextFromRange:function(e,t){var n=pe(Ce.edges(t),2),r=n[0],o=n[1],i=be.nodes(e,{at:t,mode:"lowest",match:function(e){return ge.isText(e)}}),a="",l=!0,u=!1,c=void 0;try{for(var s,f=i[Symbol.iterator]();!(l=(s=f.next()).done);l=!0){ var d=pe(s.value,2),p=d[0],h=d[1],y=Oe.equals(h,r.path)?r.offset:0,b=Oe.equals(h,o.path)?o.offset:0;a+=p.text.substring(y,b)}}catch(e){u=!0;c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return a},withoutNormalizing:function(e,t){var n=be.isNormalizing(e);be.setNormalizing(e,!1);try{t()}finally{be.setNormalizing(e,n)}!1!==n&&be.normalize(e)},areStylesDisabled:function(e){var t;if(!e.previewMarkdown)return!0;var n=be.richValue(e),r=n[0],o="line"===(null==r?void 0:r.type)?r.children[0]:null;if(null==o||!ge.isText(o))return!1;var i=e.chatInputType,a=o.text;return 1===n.length&&1===r.children.length&&(!0===i.sedReplace&&a.startsWith("s/")||!0===(null===(t=i.autocomplete)||void 0===t?void 0:t.reactions)&&a.startsWith("+"))},focus:function(e){if(!a.F3.isFocused(e)){a.F3.focus(e);a.F3.deselect(e)}},getSelectionOverlap:function(e,t){if(null==e.selection)return{anchor:null,focus:null};if(Oe.isPath(t)){var n=be.range(e,t),r=pe(be.node(e,t),1)[0];if(me.isElement(r)){ var o=be.before(e,t),i=be.after(e,t);t={anchor:null!=o?o:n.anchor,focus:null!=i?i:n.focus}}else t=n}var a=pe(Ce.edges(t),2),l=a[0],u=a[1],c=null,s=null;Ee.equals(e.selection.anchor,l)?c="start":Ee.equals(e.selection.anchor,u)?c="end":Ce.includes(t,e.selection.anchor)&&(c="inside");Ee.equals(e.selection.focus,l)?s="start":Ee.equals(e.selection.focus,u)?s="end":Ce.includes(t,e.selection.focus)&&(s="inside");return{anchor:c,focus:s}}}),ve=de(fe({},i.NB),{isType:function(e,t){return i.W_.isElement(e)&&e.type===t},isInTypes:function(e,t){return i.W_.isElement(e)&&t.has(e.type)}}),me=de(fe({},i.W_),{updateElement:function(e,t){var n=be.node(e,t[1]);o()(!be.isEditor(t[0]),"Element is the root node");o()(null!=n,"Failed to find element");o()(me.isElement(n[0]),"Node at this path is no longer an element");o()(n[0].type===t[0].type,"Node at this path is a different type");return n},markdown:function(e,t,n){ var r,o="line"===e.type&&!0===(null===(r=e.codeBlockState)||void 0===r?void 0:r.wasInCodeBlock),i=e.children.map((function(e){return ge.isText(e)?e.text:" "})),a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=L(e);o.push(e.length);if(1===o.length&&n)return[];var i=0,a=n,l=[],u=!0,c=!1,s=void 0;try{for(var f,d=o[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value;if(a)l.push({text:e.substring(i,p),start:i,attributes:["codeBlockText"],data:void 0});else{var h=p===o[o.length-2]?e.substring(p+3):"";p+=3+(null!=h.match(M)?h:"").length;var y=e.substring(i,p);if(""!==y){te(y,t,r).forEach((function(e){l.push(U(k({},e),{start:e.start+i}))}))}}a=!a;i=p}}catch(e){c=!0;s=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw s}}return l}(i.join(""),null!=t?t:null,o,n);return{entries:a,serializedChildren:i}},isEmpty:function(e){if(e.children.length>1)return!1;if(0===e.children.length)return!0 ;var t=e.children[0];return ge.isText(t)&&0===t.text.length}}),ge=fe({},i.xv),Oe=de(fe({},i.y$),{isFirstEditorBlock:function(e){return Oe.equals(e,ue.YD)},isFirstEditorText:function(e){return Oe.equals(e,ue.u9)},isFirstChild:function(e,t){return Oe.equals(t,Oe.child(e,0))},child:function(e,t){return he(e).concat([t])}}),Ee=de(fe({},i.E9),{start:function(e){var t=pe(e,2)[1];return{path:Oe.child(t,0),offset:0}},end:function(e){var t=pe(e,2),n=t[0],r=t[1],o=n.children[n.children.length-1];return{path:Oe.child(r,n.children.length-1),offset:ge.isText(o)?o.text.length:0}},isAtStart:function(e,t){return Ee.equals(e,this.start(t))},isAtEnd:function(e,t){return Ee.equals(e,this.end(t))},clamp:function(e,t){var n=pe(Ce.edges(t),2),r=n[0],o=n[1];Ee.isBefore(e,r)&&(e=r);Ee.isAfter(e,o)&&(e=o);return e}}),Ce=de(fe({},i.e6),{toPoint:function(e){return null==e||Ce.isExpanded(e)?null:e.anchor},children:function(e){var t=pe(e,2),n=t[0],r=t[1],o=n.children[n.children.length-1];return{anchor:{ path:Oe.child(r,0),offset:0},focus:{path:Oe.child(r,n.children.length-1),offset:ge.isText(o)?o.text.length:0}}},clamp:function(e,t){var n=pe(Ce.edges(e),2),r=n[0],o=n[1],i=pe(Ce.edges(t),2),a=i[0],l=i[1];Ee.isBefore(r,a)&&(r=a);Ee.isAfter(o,l)&&(o=l);return Ce.isForward(e)?{anchor:r,focus:o}:{anchor:o,focus:r}}}),je={equals:function(e,t){return null==e&&null==t||null!=e&&null!=t&&Ce.equals(e,t)},isValid:function(e,t){if(null==t)return!1;var n=t.anchor,r=t.focus;if(!be.hasPath(e,n.path)||!be.hasPath(e,r.path))return!1;var o=pe(be.node(e,n.path),1)[0],i=pe(be.node(e,r.path),1)[0];return ge.isText(o)&&ge.isText(i)&&n.offset<=o.text.length&&r.offset<=i.text.length}},Se=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Ie=function(e,t,n){var r=be.toDOMRange(e,t).getBoundingClientRect(),o=be.toDOMRange(e,n).getBoundingClientRect();return Se(r,o)&&Se(o,r)},_e=function(e,t,n,r){for(var o={anchor:t,focus:t},i=0,a=n.length,l=Math.floor((i+a)/2);l!==i;){var u={anchor:n[l], focus:n[l]};Ie(e,u,o)?r?a=l:i=l:r?i=l:a=l;l=Math.floor((i+a)/2);if(!r&&l===n.length-2&&a===n.length-1){var c=n[n.length-1];Ie(e,{anchor:c,focus:c},o)&&(l=a)}}return n[l]},we={getLineStart:function(e,t,n){var r,o=be.getParentElement(e,t);if(null==o)return null;var i=be.previous(e,{at:t,match:function(t){return be.isInline(e,t)&&!be.isVoid(e,t)&&t!==o[0]}});null!=i&&(r=be.after(e,i[1]));null==r&&(r=be.start(e,o[1]));var a={anchor:r,focus:t},l=Array.from(be.positions(e,{at:a})),u=_e(e,t,l,!0);if(n&&Ee.equals(t,u)&&!Ee.isAtEnd(t,o)){var c=be.after(e,t);if(null==c)return u;u=_e(e,c,l,!0)}return u},getLineEnd:function(e,t,n){var r,o=be.getParentElement(e,t);if(null==o)return null;var i=be.next(e,{at:t,match:function(t){return be.isInline(e,t)&&!be.isVoid(e,t)&&t!==o[0]}});null!=i&&(r=be.before(e,i[1]));null==r&&(r=be.end(e,o[1]));var a={anchor:t,focus:r},l=Array.from(be.positions(e,{at:a})),u=_e(e,t,l,!1);if(n&&Ee.equals(t,u)&&!Ee.isAtEnd(t,o)){var c=be.after(e,t);if(null==c)return u ;u=_e(e,c,l,!1)}return u},getLineActionRange:function(e,t){var n=Ce.toPoint(e.selection);if(null==n)return null;if(t){var r=we.getLineStart(e,n,!1);return null==r?null:{anchor:r,focus:n}}var o=we.getLineEnd(e,n,!0);return null==o?null:{anchor:n,focus:o}}},xe=a.F3.findDocumentOrShadowRoot;a.F3.findDocumentOrShadowRoot=function(e){var t,n;return null!==(n=null===(t=e.windowContext)||void 0===t?void 0:t.renderWindow.document)&&void 0!==n?n:xe(e)}},468235:(e,t,n)=>{"use strict";n.d(t,{eL:()=>P,h6:()=>N,sS:()=>Z,jv:()=>A,C1:()=>x,em:()=>E,eU:()=>I,yi:()=>S,T1:()=>j,yl:()=>_,QM:()=>w});var r=n(744564),o=n(306472),i=n(120415),a=n(716118),l=n(335072);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}var s=function(e,t){var n,r,o,i,a={ label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>H});var r=n(785893),o=n(667294),i=n(824390),a=n.n(i),l=n(202351),u=n(707961),c=n(306472),s=n(102921),f=n(468235),d=n(335072),p=n(294184),h=n.n(p),y=n(730381),b=n.n(y),v=n(940405),m=n(473903),g=n(993137),O=n(472034),E=n(813749),C=n(72580),j=n(15649),S=n.n(j);function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){var t=e.clip,n=e.onDelete,o=e.onClick,i=(0,l.Wu)([m.default],(function(){return t.users.map((function(e){return m.default.getUser(e)})).filter(C.lm)})),a=b().duration(t.length),c="".concat(a.seconds()).padStart(2,"0");return(0,r.jsxs)(u.P3F,{onClick:function(){ return null==o?void 0:o(t)},className:h()(S().clipItem,I({},S().clickable,null!=o)),children:[(0,r.jsxs)(g.Z,{aspectRatio:16/9,className:S().clipThumbContainer,children:[(0,r.jsx)("img",{alt:"",src:t.thumbnail,className:S().clipThumb}),(0,r.jsx)(u.xvT,{className:S().clipDuration,variant:"text-xs/normal",color:"always-white",children:"".concat(a.minutes(),":").concat(c)}),(0,r.jsx)("div",{className:S().editContainer,children:(0,r.jsx)(O.Z,{className:S().editIcon})})]}),(0,r.jsxs)("div",{className:S().clipFooter,children:[(0,r.jsx)(u.X6q,{color:"text-normal",variant:"heading-deprecated-12/normal",children:t.gameName}),(0,r.jsx)(u.X6q,{className:S().clipName,color:"header-primary",variant:"heading-deprecated-12/medium",children:t.name}),(0,r.jsxs)("div",{className:S().usersAndDelete,children:[(0,r.jsx)(v.Z,{maxUsers:4,users:i}),null!=n&&(0,r.jsx)(u.zxk,{color:u.zxk.Colors.PRIMARY,onClick:function(e){e.stopPropagation();n(t)},className:S().deleteButton,size:u.zxk.Sizes.NONE, look:u.zxk.Looks.BLANK,children:(0,r.jsx)(E.Z,{className:S().deleteIcon})})]})]})]})}var w=n(190186),x=n(189865),P=n(473708),N=n(819731),A=n.n(N);function T(e){var t=e.filterQuery,n=e.setFilterQuery,o=e.onClose,i=e.sortOrder,a=e.setSortOrder;return(0,r.jsxs)("div",{className:A().root,children:[(0,r.jsx)(w.Z,{autoFocus:!0,size:w.Z.Sizes.LARGE,placeholder:P.Z.Messages.SEARCH,className:A().queryInput,query:t,onChange:n,onClear:function(){return n("")}}),(0,r.jsx)(u.PhF,{placeholder:P.Z.Messages.CLIPS_SORT_PLACEHOLDER,className:A().sortInput,options:[{value:"descending",label:P.Z.Messages.CLIPS_SORT_RECENT},{value:"ascending",label:P.Z.Messages.CLIPS_SORT_OLDEST}],isSelected:function(e){return e===i},select:a,serialize:function(e){return e}}),(0,r.jsx)(u.zxk,{size:u.zxk.Sizes.NONE,className:A().buttonReset,look:u.zxk.Looks.BLANK,onClick:o,children:(0,r.jsx)(x.Z,{className:A().closeIcon})})]})}var Z=n(997800),M=n.n(Z);function R(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{c$:()=>b,YZ:()=>v,bF:()=>m,kx:()=>O,Rq:()=>E,So:()=>C,Dr:()=>j,Su:()=>S,_Q:()=>I});var r=n(23279),o=n.n(r),i=n(999357),a=n(281110),l=n(744564),u=n(801809),c=n(878033),s=n(612831),f=n(2590);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}var h,y=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){ return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]3&&void 0!==a[3]?a[3]:s.AR.UNCATEGORIZED;return[4,u.Z.post({ url:f.ANM.DIRECTORY_CHANNEL_ENTRY(e,t),body:{description:n,primary_category_id:r},trackedActionData:{event:i.a9.DIRECTORY_GUILD_ENTRY_CREATE,properties:{directory_channel_id:e,guild_id:t,primary_category_id:r}}})];case 1:o=c.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_ENTRY_CREATE",channelId:e,entry:o.body});return[2]}}))}));return g.apply(this,arguments)}function O(e,t){u.Z.delete({url:f.ANM.DIRECTORY_CHANNEL_ENTRY(e,t),trackedActionData:{event:i.a9.DIRECTORY_GUILD_ENTRY_DELETE,properties:{directory_channel_id:e,guild_id:t}}});l.Z.dispatch({type:"GUILD_DIRECTORY_ENTRY_DELETE",channelId:e,guildId:t})}var E=o()(function(){var e=p((function(e,t){var n;return y(this,(function(r){switch(r.label){case 0:if(!c.Z.shouldFetch(e,t)){l.Z.dispatch({type:"GUILD_DIRECTORY_CACHED_SEARCH",channelId:e,query:t});return[2]}r.label=1;case 1:r.trys.push([1,3,,4]);l.Z.dispatch({type:"GUILD_DIRECTORY_SEARCH_START",channelId:e,query:t});return[4,a.Z.get({url:f.ANM.DIRECTORY_ENTRIES_SEARCH(e),query:{query:t} })];case 2:n=r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_SEARCH_SUCCESS",channelId:e,query:t,results:n.body});return[3,4];case 3:r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_FETCH_FAILURE"});return[3,4];case 4:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),200),C=function(e){l.Z.dispatch({type:"GUILD_DIRECTORY_SEARCH_CLEAR",channelId:e})},j=function(){var e=p((function(e,t,n){var r,o,i=arguments;return y(this,(function(u){switch(u.label){case 0:r=i.length>3&&void 0!==i[3]?i[3]:s.AR.UNCATEGORIZED;return[4,a.Z.patch({url:f.ANM.DIRECTORY_CHANNEL_ENTRY(e,t),body:{description:n,primary_category_id:r}})];case 1:o=u.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_ENTRY_UPDATE",channelId:e,entry:o.body});return[2]}}))}));return function(t,n,r){return e.apply(this,arguments)}}(),S=function(e,t){l.Z.dispatch({type:"GUILD_DIRECTORY_CATEGORY_SELECT",channelId:e,categoryId:t})},I=function(){var e=p((function(e,t){var n;return y(this,(function(r){switch(r.label){case 0: r.trys.push([0,2,,3]);return[4,a.Z.get({url:f.ANM.DIRECTORY_CHANNEL_LIST_BY_ID(e),query:{entity_ids:t}})];case 1:n=r.sent();l.Z.dispatch({type:"GUILD_DIRECTORY_ADMIN_ENTRIES_FETCH_SUCCESS",channelId:e,entries:n.body});return[3,3];case 2:r.sent();return[3,3];case 3:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}()},878033:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(202351),o=n(744564),i=n(549331);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e){u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return u(e)}function c(e){for(var t=1;ty};r.__getLocalVars=function(){return{CACHE_TIME:y,directorySearchState:b,directorySearchResults:v}};return n}(r.ZP.Store);m.displayName="GuildDirectorySearchStore";const g=new m(o.Z,{GUILD_DIRECTORY_SEARCH_START:function(e){var t=e.channelId,n=e.query;b[t]={fetching:!0,mostRecentQuery:n}},GUILD_DIRECTORY_SEARCH_SUCCESS:function(e){var t=e.channelId,n=e.query,r=e.results;b[t]=s(c({},b[t]),{fetching:!1});var o=[];r.forEach((function(e){var t=(0,i.MQ)(e);o.push(t)}));v[t]=s(c({},v[t]),l({},n,{results:(0,i.Th)(o),lastSearchedAt:Date.now()}))},GUILD_DIRECTORY_SEARCH_FAILURE:function(e){var t=e.channelId;b[t]=s(c({},b[t]),{fetching:!1})},GUILD_DIRECTORY_SEARCH_CLEAR:function(e){var t=e.channelId;b[t]={fetching:!1,mostRecentQuery:""}}, GUILD_DIRECTORY_CACHED_SEARCH:function(e){var t=e.channelId,n=e.query;b[t]={fetching:!1,mostRecentQuery:n}},GUILD_DIRECTORY_ENTRY_DELETE:function(e){var t,n=e.channelId,r=e.guildId,o=null===(t=b[n])||void 0===t?void 0:t.mostRecentQuery;if(null!=o){var i=v[n][o];if(null!=i){var a=i.results.filter((function(e){return e.guildId!==r}));v[n]=s(c({},v[n]),l({},b[n].mostRecentQuery,s(c({},i),{results:a})))}}}})},876186:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(202351),o=n(744564),i=n(549331),a=n(612831);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e){c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return c(e)}function s(e){for(var t=1;t=0?d:0))}}},GUILD_DIRECTORY_ENTRY_UPDATE:function(e){ var t,n,r,o,l=e.channelId,c=e.entry,d=(0,i.MQ)(c),p=null===(t=v[l])||void 0===t?void 0:t[d.guildId];v[l]=f(s({},v[l]),u({},d.guildId,s({},p,d)));var h,y,b=null!==(o=null==p?void 0:p.primaryCategoryId)&&void 0!==o?o:a.AR.UNCATEGORIZED,m=null!==(h=d.primaryCategoryId)&&void 0!==h?h:a.AR.UNCATEGORIZED,E=Object.assign({},null===(n=g[l])||void 0===n?void 0:n[b]);null!=p&&b!==m&&delete E[d.guildId];g[l]=f(s({},g[l]),(u(y={},b,E),u(y,m,f(s({},null===(r=g[l])||void 0===r?void 0:r[m]),u({},d.guildId,s({},p,d)))),y));if(m!==b&&null!=O[l]){var C,j,S,I,_;O[l]=f(s({},O[l]),(u(_={},b,(null===(C=O[l])||void 0===C?void 0:C[b])>0?(null===(j=O[l])||void 0===j?void 0:j[b])-1:0),u(_,m,(null!==(I=null===(S=O[l])||void 0===S?void 0:S[m])&&void 0!==I?I:0)+1),_))}},GUILD_DIRECTORY_CATEGORY_SELECT:function(e){var t=e.channelId,n=e.categoryId;m[t]=n},GUILD_DIRECTORY_COUNTS_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.counts;O[t]=n},GUILD_DIRECTORY_ADMIN_ENTRIES_FETCH_SUCCESS:function(e){ var t=e.channelId,n=e.entries,r=new Set;n.forEach((function(e){var t=(0,i.MQ)(e);r.add(t.guildId)}));E[t]=r}})},549331:(e,t,n)=>{"use strict";n.d(t,{MQ:()=>u,_N:()=>c,Th:()=>s,Lz:()=>f,TR:()=>d,gX:()=>p});var r=n(441143),o=n.n(r),i=n(496486),a=n.n(i),l=n(612831);function u(e){var t,n,r,i,a,u,c;o()(e.type===l.C2.GUILD,"Directory entries must be connected to a guild!");return{channelId:e.directory_channel_id,guildId:e.entity_id,type:e.type,authorId:e.author_id,createdAt:e.created_at,description:e.description,primaryCategoryId:e.primary_category_id,name:null===(t=e.guild)||void 0===t?void 0:t.name,icon:null===(n=e.guild)||void 0===n?void 0:n.icon,splash:null===(r=e.guild)||void 0===r?void 0:r.splash,features:new Set(null===(i=e.guild)||void 0===i?void 0:i.features),approximateMemberCount:null===(a=e.guild)||void 0===a?void 0:a.approximate_member_count,approximatePresenceCount:null===(u=e.guild)||void 0===u?void 0:u.approximate_presence_count, featurableInDirectory:null===(c=e.guild)||void 0===c?void 0:c.featurable_in_directory}}var c=5;function s(e){return a().orderBy(e,[function(e){return e.approximateMemberCount}],["desc"])}function f(e){return function(e){return a().orderBy(e,[function(e){return e.createdAt}],["desc"])}(e.filter((function(e){return e.featurableInDirectory&&p(e)}))).slice(0,c)}function d(e){return s(e)}function p(e){var t;return(null!==(t=e.approximateMemberCount)&&void 0!==t?t:0)>=5}},34183:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u,G:()=>c});var r=n(202351),o=n(61209),i=n(567403),a=n(682776),l=n(2590);function u(e){var t=(0,r.e7)([i.Z],(function(){return i.Z.getGuild(e.guildId)})),n=(0,r.e7)([o.Z],(function(){return o.Z.getChannel(e.channelId)})),u=(0,r.e7)([a.Z],(function(){return a.Z.can(l.Plq.ADMINISTRATOR,t)})),c=(0,r.e7)([a.Z],(function(){return a.Z.can(l.Plq.MANAGE_MESSAGES,n)}));return{isEntryAdmin:u,canEdit:u||c,canRemove:u||c}}function c(e){return(0,r.e7)([a.Z],(function(){ return a.Z.can(l.Plq.SEND_MESSAGES,e)}))}},156342:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>g});var r=n(785893),o=n(667294),i=n(707961),a=n(971402),l=n(112897),u=n(424871),c=n(528334),s=n(921603),f=n(34183),d=n(473708);function p(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,l,"next",e)}function l(e){p(i,r,o,a,l,"throw",e)}a(void 0)}))}}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>a});var r=n(785893),o=(n(667294),n(707961)),i=n(156342);const a=function(e){var t=e.entry,n=e.forceLightTheme,a=e.hideEditButton,l=e.children,u=e.onRequestOpen,c=e.onRequestClose;return(0,r.jsx)(o.yRy,{onRequestOpen:u,onRequestClose:c,animation:o.yRy.Animation.NONE,position:"bottom",spacing:4,align:"right",renderPopout:function(e){var o=e.closePopout;return(0,r.jsx)(i.default,{entry:t,closePopout:o,forceLightTheme:n,hideEditButton:a})},children:l})}},516659:(e,t,n)=>{"use strict";n.d(t,{au:()=>u,dy:()=>c,op:()=>s});var r=n(667294),o=n(202351),i=(n(744564),n(674748),n(188344),n(896490),n(671723),n(618887)),a=n(99827),l=n(293078);function u(e){if(null==e)return null;var t,n,r=(0,l.BS)(e);if(null==r)return null;r.dropsQuestId;n=null;return null==(t=null)||null==n?null:{experiment:t,config:n, drop:r}}function c(){return!1}function s(e){var t=u(e),n=null==t?void 0:t.drop,l=(0,o.e7)([a.Z],(function(){return null!=n&&a.Z.serverEligibleByQuestIds[n.dropsQuestId]})),c=(0,o.e7)([a.Z],(function(){return a.Z.hasInitialProgressFetched}));r.useEffect((function(){null!=n&&l&&!c&&(0,i.Vb)(n.dropsQuestId)}),[n,l,c])}},955521:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>v,Kq:()=>h,Ot:()=>y,jz:()=>b});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(896656),u=n(2590),c=n(214436),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){ Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function h(e){var t,n=e.locked,o=void 0!==n&&n,a=e.channelType;return(0,r.jsx)("div",{className:i()(s().emptyChannelIcon,(t={},f(t,s().locked,o),f(t,s().voiceChat,a===u.d4z.GUILD_VOICE||a===u.d4z.GUILD_STAGE_VOICE),t))})}function y(e){var t=e.children,n=e.className;return(0,r.jsx)(a.X6q,{"aria-hidden":"true",className:i()(n,s().header),variant:"heading-xxl/extrabold",children:t})}function b(e){var t=e.children;return(0,r.jsx)(a.xvT,{variant:"text-md/normal",color:"none",className:s().description,children:t})}const v=function(e){ var t=e.className,n=e.channelId,o=e.children,a=p(e,["className","channelId","children"]);return(0,r.jsx)("div",d(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(707961),s=n(971402),f=n(707906),d=n(749565),p=n(983403),h=n.n(p);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(e[e.length-1]=(0,r.jsx)(c.yRy,{renderPopout:y,shouldShow:C,position:"bottom",onRequestClose:function(){return j(!1)},children:function(){return(0,r.jsxs)(c.zxk,{className:a()(h().avatar,h().overflow),onClick:function(){return j(!0)},look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.NONE,children:["+",t+1]})}},"overflow"));return e}()})}},672886:(e,t,n)=>{"use strict";n.d(t,{i:()=>ne,Z:()=>re});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(989824),u=n(853158),c=n(202351),s=n(418705),f=n(707961),d=n(502526),p=n(396043),h=n(333398),y=n(4361),b=n(496486),v=n.n(b),m=n(15970),g=n(791707),O=n(736818),E=n(61209),C=n(5544),j=n(27851),S=n(567403),I=n(50433),_=n(598123),w=n(682776),x=n(102921),P=n(2590);function N(e){return(0,c.e7)([C.ZP],(function(){var t=function(t){return null!=e&&x.Z.extractTimestamp(t.channel.id)-x.Z.extractTimestamp(e.id)>500},n=C.ZP.getChannels(null==e?void 0:e.id),r=n[C.Zb];return n[C.sH].some(t)||r.some(t)}),[e])}function A(e){var t=(0, c.e7)([E.Z],(function(){return E.Z.getChannel(null==e?void 0:e.systemChannelId)})),n=(0,c.Wu)([_.Z],(function(){return null!=t?_.Z.getMessages(t.id).toArray():[]}));return(0,c.e7)([j.Z],(function(){var t,r=null!==(t=j.Z.getMemberCount(null==e?void 0:e.id))&&void 0!==t&&t,o=n.some((function(e){return e.type===P.uaV.USER_JOIN}));return r>1||o}),[e,n])}function T(e){var t=(0,c.e7)([I.Z],(function(){return I.Z.hasLayers()})),n=(0,c.e7)([S.Z],(function(){return S.Z.getGuild(null==e?void 0:e.id)}));return null!=(null==n?void 0:n.icon)&&!t}function Z(e){var t=(0,c.e7)([E.Z],(function(){return null!=e?E.Z.getMutableBasicGuildChannelsForGuild(e.id):null}));return function(e){var t=(0,c.e7)([O.default],(function(){return O.default.getId()}));return(0,c.e7)([_.Z],(function(){return v().some(e,(function(e){var n=_.Z.getMessages(e.id).toArray();return v().some(n,(function(e){return e.author.id===t&&!(0,g.Z)(e)}))}))}))}(o.useMemo((function(){return null==t?[]:v().values(t)}),[t]))} var M=n(703790),R=n(425902),L=n(917019),D=n(473903),k=n(718831),U=n(621329),B=n(930948),F=n(348592),G=n(120415),H=n(955521),V=n(909647),W=n(473708),z=n(713230),Y=n.n(z);function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0;o.useEffect((function(){if(fe){var e;(0,R.i)(null!==(e=null==d?void 0:d.id)&&void 0!==e?e:"")}}),[d,fe]);if(null==d)return null;var he=[];if(!b){E&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(930519),header:W.Z.Messages.WELCOME_CTA_INVITE_TITLE,completed:k,onClick:q})},"invite"));C&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{}, children:(0,r.jsx)(ne,{iconUrl:n(157862),header:W.Z.Messages.WELCOME_CTA_PERSONALIZE_TITLE,completed:z,onClick:re})},"customize"));j&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(747048),header:W.Z.Messages.WELCOME_CTA_MESSAGE_TITLE,completed:U,onClick:ee})},"message"));(0,G.$L)()&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(932568),header:W.Z.Messages.WELCOME_CTA_DOWNLOAD_TITLE,completed:I,onClick:oe})},"download"));fe&&he.push((0,r.jsx)(u.Z.div,{className:Y().cardWrapper,style:ae?{opacity:ce[he.length]}:{},children:(0,r.jsx)(ne,{iconUrl:n(467314),header:W.Z.Messages.WELCOME_CTA_APPS_RECOMMENDATION_TITLE,completed:pe,onClick:ie})},"addapp"))}var ye=v?W.Z.Messages.WELCOME_CTA_SUBTITLE_OWNER:W.Z.Messages.WELCOME_CTA_SUBTITLE_MEMBER;b&&(ye=W.Z.Messages.WELCOME_CTA_SUBTITLE_EXISTING_SERVER) ;var be,ve="".concat(F.Z.getArticleURL(P.BhN.GUILD_GETTING_STARTED),"?utm_source=discord&utm_medium=blog&utm_campaign=2020-06_help-new-user&utm_content=--t%3Apm");return(0,r.jsx)(H.ZP,{channelId:i.id,children:(0,r.jsx)("div",{className:Y().container,children:(0,r.jsxs)("div",{className:Y().inner,children:[(0,r.jsxs)(u.Z.div,{style:ue,children:[(0,r.jsx)(f.X6q,{className:Y().titleName,variant:"heading-xxl/semibold",children:W.Z.Messages.WELCOME_CTA_TITLE.format({guildName:d.name})}),(0,r.jsxs)(f.xvT,{color:"header-secondary",className:a()((be={},X(be,Y().subtitle,!0),X(be,Y().noChildren,0===he.length),be)),variant:"text-sm/normal",children:[ye," ",he.length>0?W.Z.Messages.WELCOME_CTA_SUBTITLE_ACTION_WITH_GUIDE.format({guideURL:ve}):null]})]}),he]})})})}},963985:(e,t,n)=>{"use strict";n.d(t,{kj:()=>d,oC:()=>p,UT:()=>h,CM:()=>y,xh:()=>b,s3:()=>v,_Z:()=>m});var r=n(842227),o=n(418705),i=n(917019),a=n(61209),l=n(682776),u=n(419051),c=n(488462);function s(){ var e=u.Z.getFavoriteChannels(),t=1;for(var n in e)t=Math.max(t,e[n].order);return t+1}function f(e){for(var t in e){var n=e[t];if(null!=n){if(n.type!==o.Dd.CATEGORY){var r=a.Z.getChannel(t);null!=r&&(r.isPrivate()||l.Z.can(c.Pl.VIEW_CHANNEL,r))||delete e[t]}}else delete e[t]}}function d(e,t){u.Z.isFavorite(e)||i.hW.updateAsync("favorites",(function(n){n.favoriteChannels[e]=o.aV.create({nickname:"",type:o.Dd.REFERENCE_ORIGINAL,position:s(),parentId:null!=t?t:"0"});f(n.favoriteChannels)}),i.fy.FREQUENT_USER_ACTION)}function p(e){var t=u.Z.getFavorite(e);null!=t&&i.hW.updateAsync("favorites",(function(n){delete n.favoriteChannels[e];if(t.type===o.Dd.CATEGORY)for(var r in n.favoriteChannels)n.favoriteChannels[r].parentId===e&&(n.favoriteChannels[r].parentId="0");f(n.favoriteChannels)}),i.fy.FREQUENT_USER_ACTION)}function h(e,t){u.Z.isFavorite(e)&&i.hW.updateAsync("favorites",(function(n){n.favoriteChannels[e].nickname=null!=t?t:""}),i.fy.FREQUENT_USER_ACTION)}function y(e){ var t=r.default.fromTimestamp(Date.now());i.hW.updateAsync("favorites",(function(n){n.favoriteChannels[t]=o.aV.create({nickname:e,type:o.Dd.CATEGORY,position:s(),parentId:"0"})}),i.fy.FREQUENT_USER_ACTION)}function b(e){p(e)}function v(e){i.hW.updateAsync("favorites",(function(t){var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;null!=l.position&&(t.favoriteChannels[l.id].position=l.position);if(void 0!==l.parent_id){var u;t.favoriteChannels[l.id].parentId=null!==(u=l.parent_id)&&void 0!==u?u:"0"}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}),i.fy.FREQUENT_USER_ACTION)}function m(){i.hW.updateAsync("favorites",(function(e){e.muted=!e.muted}),i.fy.INFREQUENT_USER_ACTION)}},495085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(202351),o=n(61209),i=n(602397),a=n(419051),l=n(2590);function u(e){return(0,r.cj)([i.ZP,o.Z,a.Z],(function(){if(e!==l.I_8)return i.ZP.getVoiceStates(e) ;var t=a.Z.getFavoriteChannels(),n={};for(var r in t){var u=o.Z.getChannel(r);null!=u&&(n[r]=i.ZP.getVoiceStatesForChannel(u))}return n}),[e])}},234503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}function l(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{ Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var f=new Set;var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=s(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(f=new Set(e))};r.hasHidden=function(e){return f.has(e)};r.getState=function(){return f};r.__getLocalVars=function(){return{hiddenChannels:f}};return n}(r.ZP.PersistedStore);d.displayName="ForumChannelAdminOnboardingGuideStore";d.persistKey="ForumChannelAdminOnboardingGuideStore";const p=new d(o.Z,{ADMIN_ONBOARDING_GUIDE_HIDE:function(e){var t=e.channelId ;e.hide?f.add(t):f.delete(t)}})},793998:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(730381),o=n.n(r),i=n(842227),a=function(e){var t=i.default.extractTimestamp(e);return!o()().isBefore(o()(t).add(o().duration(15,"days")))}},122590:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(202351),o=n(736818),i=n(407561),a=n(409125);function l(){var e=(0,r.e7)([o.default],(function(){return o.default.getId()})),t=(0,r.e7)([a.Z],(function(){return a.Z.getRemoteSessionId()}));return(0,r.e7)([i.Z],(function(){var n;return null!==(n=i.Z.getVoiceStateForSession(e,t))&&void 0!==n?n:void 0}))}},774209:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(202351),o=n(629223),i=n(72580),a=n(2590);function l(){return(0,r.Wu)([o.Z],(function(){return[o.Z.getAccount(null,a.ABu.XBOX),o.Z.getAccount(null,a.ABu.PLAYSTATION),o.Z.getAccount(null,a.ABu.PLAYSTATION_STAGING)].filter(i.lm)}))}},292571:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(785893),o=n(667294),i=n(468811),a=n.n(i),l=n(633878);function u(e,t){ (null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){ var t=e.width,n=void 0===t?16:t,i=e.height,u=void 0===i?16:i,p=e.color,h=void 0===p?"currentColor":p,y=e.foreground,b=f(e,["width","height","color","foreground"]),v=d(o.useState((function(){return a().v4()})),1)[0];return(0,r.jsxs)("svg",s(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>Z});var r=n(785893),o=(n(667294),n(318715)),i=n(707961),a=n(419087),l=n(202351),u=n(567403),c=n(682776),s=n(407561),f=n(176758),d=n(488462);var p=n(563367),h=n(441143),y=n.n(h),b=n(656645),v=n(842629),m=n(736097),g=n(520436),O=n(919694) ;var E=n(122590),C=n(774209),j=n(292571),S=n(2590),I=n(473708);function _(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_(i,r,o,a,l,"next",e)}function l(e){_(i,r,o,a,l,"throw",e)}a(void 0)}))}}function x(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function P(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>m});var r=n(202351),o=n(736818),i=n(361298),a=n(69660),l=n(77643),u=n(295652),c=n(72580),s=n(2590),f=n(473708);function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var p;!function(e){e.PACKET_LOSS="Packet Loss";e.FRAME_RATE_INPUT="Frame Rate Encode" ;e.FRAME_RATE_NETWORK="Frame Rate Decode";e.SOUNDSHARE_FAILED="Soundshare Failed";e.BAD_CONNECTION="Bad Connection"}(p||(p={}));function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return e<=5?3:e<=15?10:15}function y(e,t){var n={packetsSentOrReceived:0,packetsLost:0,packetLossRate:0,frameRate:0,resolution:0,numDatapoints:0},r=e.slice(-1*t).filter(c.lm);if(0===r.length)return function(e){for(var t=1;t0?r[t].packetsSentOrReceived-r[t-1].packetsSentOrReceived:0;n.packetsLost+=t>0?r[t].packetsLost-r[t-1].packetsLost:0;n.frameRate+=e.frameRate;n.resolution+=e.resolution})) ;var o=r[0].type,i=r.length;return{type:o,packetsSentOrReceived:n.packetsSentOrReceived,packetsLost:n.packetsLost,packetLossRate:n.packetsLost/(n.packetsLost+n.packetsSentOrReceived),frameRate:n.frameRate/i,resolution:n.resolution/i,numDatapoints:i}}var b=(0,u.oH)((function(e,t){return{message:e,errorType:t}}));function v(e,t){if("streamer"===e.type){if(100*e.packetLossRate>10)return b(f.Z.Messages.STREAM_BAD_STREAMER,p.PACKET_LOSS);if(e.frameRate<=h(t))return b(f.Z.Messages.STREAM_BAD_STREAMER,p.FRAME_RATE_INPUT)}else{if(100*e.packetLossRate>10)return b(f.Z.Messages.STREAM_BAD_SPECTATOR,p.PACKET_LOSS);if(e.frameRate<=h(t))return b(f.Z.Messages.STREAM_BAD_SPECTATOR,p.FRAME_RATE_NETWORK)}return null}function m(e){var t=(0,l.Wc)(e),n=e.stream.guildId,u=e.stream.ownerId;return(0,r.e7)([a.Z,i.Z,o.default],(function(){return null!=u?function(e,t,n,r){if(n)return b(f.Z.Messages.STREAM_SOUNDSHARE_FAILED,p.SOUNDSHARE_FAILED);if(null!=t){var o=y(t,5),i=y(t,30);if(i.numDatapoints>=5){var a ;return null!==(a=v(o,null==r?void 0:r.maxFrameRate))&&void 0!==a?a:v(i,null==r?void 0:r.maxFrameRate)}}return e===s.IE4.BAD?b(f.Z.Messages.STREAM_NETWORK_QUALITY_ERROR,p.BAD_CONNECTION):null}(a.Z.getQuality(),a.Z.getStatsHistory(n,u,u===o.default.getId()),u===o.default.getId()&&null!=i.Z.getHookError(s.K3D.SOUND),t):null}),[t,n,u])}},974760:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(473708),o=/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/g;function i(e){var t=r.Z.Messages.ACTIVITY_PANEL_GO_LIVE;null!=e&&null!=e.sourceName&&e.sourceName.length>0&&(t=e.sourceName);return{sanitizedTitle:t.replace(o,""),title:t}}},538272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(306263),o=n(924066),i=n(2590),a=n(473708);function l(e,t,n,l){return null==t||t.state===i.jm8.ENDED||(0,r.V9)(t)!==(0,r.V9)(e)?(0,o.P9)(l):t.ownerId===n?a.Z.Messages.WATCH_STREAM_STREAMING:a.Z.Messages.WATCH_STREAM_WATCHING}},216299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(547308),u=n(542231),c=n(211482),s=n(133310),f=n.n(s);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>0}(e)%h.length])}function b(e){var t,n=e.title,i=e.className,l=p(o.useState(y(n)),2),s=l[0],d=l[1];o.useEffect((function(){d(y(n))}),[n]);return(0,r.jsxs)("div",{className:f().wrapper,children:[(0,r.jsx)(c.ZP,{mask:c.ZP.Masks.STATUS_SCREENSHARE,width:32,height:32,children:(0,r.jsx)("div",{className:a()(f().icon,i),style:{backgroundColor:s},children:null!==(t=n[0])&&void 0!==t?t:"?"})}),(0,r.jsx)(u.Z,{className:f().badge})]})}},246549:(e,t,n)=>{"use strict";n.d(t,{c:()=>h,Z:()=>y});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(180172),s=n(107364),f=n(473708),d=n(627375),p=n.n(d);function h(e){ var t=e.isLoading,n=e.noText,o=e.className;return(0,r.jsx)(s.Z,{className:a()(p().emptyPreviewContainer,o),direction:s.Z.Direction.VERTICAL,align:s.Z.Align.CENTER,justify:s.Z.Justify.CENTER,children:t?(0,r.jsx)(u.$jN,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:p().emptyPreviewImage}),n?null:(0,r.jsx)(u.xvT,{variant:"text-sm/normal",color:"none",className:p().emptyPreviewText,children:f.Z.Messages.STREAM_NO_PREVIEW})]})})}function y(e){var t=e.stream,n=e.className,i=e.noText,u=void 0!==i&&i,s=(0,l.cj)([c.Z],(function(){return{url:c.Z.getPreviewURL(t.guildId,t.channelId,t.ownerId),isLoading:c.Z.getIsPreviewLoading(t.guildId,t.channelId,t.ownerId)}})),f=s.url,d=s.isLoading,y=o.useRef(d?null:f);o.useEffect((function(){d||(y.current=f)}),[f,d]);var b=null==f||d?y.current:f;return null==b?(0,r.jsx)(h,{className:n,isLoading:d,noText:u}):(0,r.jsx)("div",{className:a()(n,p().root),children:(0,r.jsx)("img",{src:b,alt:"",className:p().image})})}},544475:(e,t,n)=>{"use strict" ;n.d(t,{Z:()=>K});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(712861),c=n(202351),s=n(336194),f=n(707961),d=n(579581),p=n(859853),h=n(19585),y=n(725691),b=n(473903),v=n(95891),m=n(531441),g=n(977005),O=n(652591),E=n(850841),C=n(77643),j=n(503857),S=n(2590),I=n(203600),_=n(473708),w=n(233635),x=n.n(w),P=n(2019),N=n.n(P);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>o});var r=n(226810);function o(e,t){if(__OVERLAY__){var n=t.getGame(),o=(0,r.QF)();return null==n||null==o?null:{id:n.id,pid:o,pidPath:[],nativeProcessObserverId:0,hidden:!1, elevated:!1,name:n.name,lastFocused:0,exePath:"",exeName:"",cmdLine:"",processName:"",distributor:null,windowHandle:null}}return e.getVisibleGame()}},945549:(e,t,n)=>{"use strict";n.d(t,{X:()=>a});var r=n(842227),o=n(496916),i=n(290679),a=function(e){(0,o.Ju)(e,i.W.GUILD_HOME,r.default.fromTimestamp(Date.now()))}},153771:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(281110),o=n(744564),i=n(886391),a=n(201615),l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}var s,f=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){ return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]2&&void 0!==c[2]?c[2]:i.wB.APPROVED,a=c.length>3?c[3]:void 0;return[4,r.Z.patch({url:l.ANM.GUILD_JOIN_REQUEST(e,t),body:{action:n,rejection_reason:a}})];case 1:u=s.sent();o.Z.dispatch({type:"GUILD_JOIN_REQUEST_UPDATE",guildId:e,status:u.body.application_status,request:u.body});return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),b=function(){var e=c((function(e,t){var n;return f(this,(function(i){switch(i.label){case 0:return[4,r.Z.patch({url:l.ANM.GUILD_JOIN_REQUESTS(e),body:{ action:t}})];case 1:n=i.sent();o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_BULK_ACTION",guildId:e,action:t});return[2,n.body]}}))}));return function(t,n){return e.apply(this,arguments)}}(),v=function(){var e=c((function(e){var t,n;return f(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,r.Z.post({url:l.ANM.GUILD_MEMBER_REQUEST_TO_JOIN(e)})];case 1:t=i.sent();n=t.body;o.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_UPDATE",guildId:e,request:n});return[2,n];case 2:throw i.sent();case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=c((function(){var e;return f(this,(function(t){switch(t.label){case 0:return[4,r.Z.get({url:l.ANM.USER_JOIN_REQUEST_GUILDS})];case 1:e=t.sent();o.Z.dispatch({type:"USER_JOIN_REQUEST_GUILDS_FETCH",guilds:e.body});return[2]}}))}));return function(){return e.apply(this,arguments)}}();const g={fetchGuildJoinRequests:d,ackUserGuildJoinRequest:h,removeGuildJoinRequest:p,updateGuildJoinRequest:y, actionAllPendingJoinRequests:b,resetGuildJoinRequest:v,fetchRequestToJoinGuilds:m,setSelectedApplicationStatus:function(e,t){o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_APPLICATION_STATUS",guildId:e,applicationStatus:t})},setSelectedSortOrder:function(e,t){o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_SORT_ORDER",guildId:e,sortOrder:t})},setSelectedGuildJoinRequest:function(e,t){o.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_SELECTED",guildId:e,request:t})}}},780409:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(260561).B)({kind:"user",id:"2022-10_guild_onboarding_home_landing",label:"Guild Onboarding landing on home experience",defaultConfig:{landOnHome:!1},treatments:[{id:1,label:"Land on home for onboarding",config:{landOnHome:!0}}]})},145202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(318715),o=n(61209),i=n(661123),a=n(202351),l=n(744564);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){ c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return c(e)}function s(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t){f=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return f(e,t)}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}var h=null,y=null;var b=function(e){!function(e,t){ if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&f(e,t)}(n,e);var t=p(n);function n(){u(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getSelectedResourceChannelId=function(){return h};r.getSelectedTodoChannelId=function(){return y};r.getHomeNavigationChannelId=function(){return null!=h?h:y};r.__getLocalVars=function(){return{selectedResourceChannelId:h,selectedTodoChannelId:y}};return n}(a.ZP.Store);b.displayName="GuildOnboardingHomeNavigationStore";const v=new b(l.Z,{CHANNEL_SELECT:function(e){var t=e.channelId,n=o.Z.getChannel(t);if(!(null==n?void 0:n.isThread())||null==(null==n?void 0:n.parent_id)||![y,h].includes(n.parent_id)){t!==h&&(h=null);t!==y&&(y=null)}},SELECT_HOME_RESOURCE_CHANNEL:function(e){var t=e.channelId;h=t;y=null},SELECT_NEW_MEMBER_ACTION_CHANNEL:function(e){var t=e.channelId;h=null;y=t}}) ;var m=n(848465),g=n(897196);function O(e){var t,n=(0,r.ZP)([o.Z],(function(){return o.Z.getChannel(e)})),a=null!=n&&(0,i.yE)(n.flags,g.zZ.IS_GUILD_RESOURCE_CHANNEL),l=(0,r.ZP)([v],(function(){return v.getSelectedResourceChannelId()})),u=(0,m.g)(null!==(t=null==n?void 0:n.guild_id)&&void 0!==t?t:"");return null!=n&&u&&a&&l===n.id}},406665:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,Z:()=>f});var r=n(785893),o=(n(667294),n(77413)),i=n(318715),a=n(732016),l=n(797815);var u=n(8370),c=n.n(u),s={SMALL:c().small,MEDIUM:c().medium,LARGE:c().large};function f(e){var t=e.emojiId,n=e.emojiName,u=e.defaultComponent,c=e.size,f=void 0===c?s.MEDIUM:c,d=function(e,t){return{customEmoji:(0,i.ZP)([l.Z],(function(){return null!=e?l.Z.getCustomEmojiById(e):null}),[e]),unicodeEmoji:null!=t?a.ZP.getByName(a.ZP.convertSurrogateToName(t,!1)):null}}(t,n),p=d.customEmoji,h=d.unicodeEmoji;return null==p&&null==h?(0,r.jsx)(r.Fragment,{children:u}):(0,r.jsx)(o.Z,{emojiName:null!=p?null==p?void 0:p.name:n, animated:null!=p&&p.animated,emojiId:null==p?void 0:p.id,autoplay:!0,className:f})}},920803:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(853158),u=n(318715),c=n(707961),s=n(316878),f=n(773011),d=n(239813),p=n(61209),h=n(21372),y=n(177001),b=n(436622),v=n(83623),m=n(347005),g=n(185161),O=n(128169),E=n(661123),C=n(386531),j=n(689175),S=n(745623);var I=n(848465),_=n(406665),w=n(473708),x=n(98932),P=n.n(x);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&null!=o?o[a]:null;return{channelAction:l,completed:null!=l&&!0===(null==i?void 0:i[l.channelId])}}(d,p),O=b.channelAction,E=b.completed,I=function(e,t){var n=(0,u.ZP)([C.Z],(function(){return C.Z.getNewMemberActions(e)})),r=(0,u.ZP)([j.Z],(function(){return j.Z.getCompletedActions(e)}));return null==n?void 0:n.find((function(e){return!0!==(null==r?void 0:r[e.channelId])&&e.channelId!==t}))}(d,null==O?void 0:O.channelId),_=(0,u.ZP)([s.Z],(function(){ return s.Z.useReducedMotion})),x=(null==O?void 0:O.actionType)===g.oi.VIEW,N=A(o.useState(!1),2),M=N[0],R=N[1],L=A(o.useState(E),2),D=L[0],k=L[1];o.useEffect((function(){k(E)}),[p.id]);o.useEffect((function(){!D&&E&&setTimeout((function(){k(!0)}),x?1e3:0)}),[E,D,x]);var U=A(o.useState(new l.Z.Value(0)),1)[0],B=A(o.useState(new l.Z.Value(0)),1)[0];o.useEffect((function(){D?l.Z.timing(U,{toValue:0,duration:_?1:350,easing:l.Z.Easing.quad,delay:x?1e3:500}).start((function(){return R(!0)})):l.Z.timing(U,{toValue:1,duration:_?1:350,easing:l.Z.Easing.quad,delay:400}).start()}),[D,U,x,_]);o.useEffect((function(){D&&M&&l.Z.timing(B,{toValue:1,duration:_?0:350,easing:l.Z.Easing.quad,delay:400}).start()}),[D,B,M,_]);var F=o.useCallback((function(){null!=I&&(0,m.gp)(I.channelId)}),[I]);return null==O?null:(0,r.jsx)("div",{className:a()(P().container,h),children:M&&null!=I?(0,r.jsx)(l.Z.div,{style:{marginBottom:B.interpolate({inputRange:[0,1],outputRange:[-60,0]})},children:(0,r.jsxs)(c.P3F,{ className:a()(P().banner,P().clickable),onClick:F,children:[(0,r.jsx)(Z,{channelId:I.channelId,emojiId:null===(t=I.emoji)||void 0===t?void 0:t.id,emojiName:null==I||null===(n=I.emoji)||void 0===n?void 0:n.name}),(0,r.jsxs)("div",{className:P().text,children:[(0,r.jsx)(c.xvT,{variant:"text-md/semibold",color:"header-primary",children:w.Z.Messages.MEMBER_ACTIONS_NEXT_STEP.format({step:I.title})}),(0,r.jsx)(T,{action:I})]}),(0,r.jsx)("div",{className:P().iconCircle,children:(0,r.jsx)(y.Z,{width:16,height:16,className:P().nextIcon})})]})}):(0,r.jsxs)(l.Z.div,{className:P().banner,style:{marginBottom:U.interpolate({inputRange:[0,1],outputRange:[-60,0]})},children:[(0,r.jsx)(Z,{channelId:O.channelId,emojiId:null===(i=O.emoji)||void 0===i?void 0:i.id,emojiName:null==O||null===(f=O.emoji)||void 0===f?void 0:f.name}),(0,r.jsxs)("div",{className:P().text,children:[(0,r.jsx)(c.xvT,{variant:"text-md/semibold",color:"header-primary",children:O.title}),(0,r.jsx)(c.xvT,{variant:"text-xxs/normal", color:"text-muted",children:x?w.Z.Messages.MEMBER_ACTION_VIEW:w.Z.Messages.MEMBER_ACTION_CHAT})]}),D?(0,r.jsx)(v.Z,{className:P().completed,backgroundColor:"#fff",width:20,height:20}):null]})})}function R(e){var t=e.guildId,n=e.channel,o=e.className,i=(0,I.g)(t),a=(0,u.ZP)([h.ZP],(function(){var e;return!0===(null===(e=h.ZP.getSelfMember(t))||void 0===e?void 0:e.isPending)})),l=function(e){var t,n=(0,u.ZP)([h.ZP],(function(){return h.ZP.getSelfMember(e)}));return(0,E.yE)(null!==(t=null==n?void 0:n.flags)&&void 0!==t?t:0,O.qQ.COMPLETED_HOME_ACTIONS)}(t);return l||a||!i?null:(0,r.jsx)(M,{guildId:t,channel:n,className:o})}},909647:(e,t,n)=>{"use strict";n.d(t,{Rg:()=>r,j7:()=>o,Ft:()=>i});var r,o,i;!function(e){e.INVITE="member_joined";e.CHANNEL="create_channel";e.AVATAR="avatar";e.MESSAGE="send_message";e.COMPLETED="completed";e.DISMISSED="dismissed"}(r||(r={}));!function(e){e.PERSONALIZE_SERVER="Personalize Server";e.INVITE="Invite Friends";e.CREATE_CHANNEL="Create Channel" ;e.SEND_MESSAGE="Send Message";e.DOWNLOAD="Download";e.ADD_APP="Add App";e.DISMISS_GUILD_PROGRESS="Dismiss Guild Progress";e.DISCORD_OVERVIEW_VIDEO="Discord Overview Video";e.JOIN_GUILD="Join Guild";e.CONTACT_SYNC="Sync Contacts";e.DISMISS="Dismiss"}(o||(o={}));!function(e){e.CHANNEL_WELCOME="Channel Welcome CTA";e.GUILD_PROGRESS="Guild Progress";e.HUB_PROGRESS="Hub Progress"}(i||(i={}))},116433:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(202351),o=n(744564),i=n(709992);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){c=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return c(e,t)} var s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}var d,p=null,h=!1,y=!1;var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&c(e,t)}(n,e);var t=f(n);function n(){a(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getRecommendedGuilds=function(){return p};r.getLoadId=function(){return d};r.isFetching=function(){return h} ;r.failed=function(){return y};r.__getLocalVars=function(){return{recommendations:p,loadId:d,fetching:h,failed:y}};return n}(r.ZP.Store);b.displayName="GuildRecommendationsStore";const v=new b(o.Z,{GUILD_RECOMMENDATION_FETCH:function(){h=!0},GUILD_RECOMMENDATION_FETCH_SUCCESS:function(e){p=e.recommendedGuilds.map(i.PP);d=e.loadId;h=!1},GUILD_RECOMMENDATION_FETCH_FAILURE:function(){y=!0;h=!1}})},547721:(e,t,n)=>{"use strict";n.d(t,{tT:()=>m,Xf:()=>g,ix:()=>O,_k:()=>E,jO:()=>C,YN:()=>j,GG:()=>S,qi:()=>I,sp:()=>_,r4:()=>w,_1:()=>x,HQ:()=>P,YB:()=>N,QV:()=>A,Yl:()=>T,JH:()=>Z,oC:()=>M});var r=n(667294),o=n(202351),i=n(251295),a=n(532548),l=n(704230),u=n(840249),c=n(633440);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1&&void 0!==arguments[1]?arguments[1]:{},n=t.refetchOnMount,i=void 0!==n&&n,c=t.includeSoftDeleted,s=void 0===c||c,f=t.countryCode,d=t.dontFetchWhileTrue,p=(0,o.e7)([a.Z],(function(){return a.Z.isConnected()})),h=(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionGroupListingsForGuildFetchState(e):u.M.FETCHED})),y=r.useRef(i);r.useEffect((function(){if(null!=e&&p&&!0!==d){ var t=u.Z.getSubscriptionGroupListingsForGuildFetchState(e);if(i||t===u.M.NOT_FETCHED){y.current=!1;l.FP(e,{includeSoftDeleted:s,countryCode:f})}}}),[p,e,s,i,f,d]);return{listingsLoaded:h===u.M.FETCHED&&!0!==y.current}},g=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e,t){var n;return b(this,(function(r){switch(r.label){case 0:o(!0);u(null);r.label=1;case 1:r.trys.push([1,3,4,5]);return[4,l.uw(e,t)];case 2:return[2,r.sent()];case 3:n=r.sent();u(n);return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),function(t,n){return e.apply(this,arguments)});return{loading:n,createSubscriptionGroupListing:c,error:a}},O=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=r.useCallback((e=d((function(e,t,n){var r;return b(this,(function(i){switch(i.label){case 0:o(!0);u(null);i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,l.AD(e,t,n)];case 2:return[2,i.sent()];case 3:r=i.sent();u(r) ;return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),function(t,n,r){return e.apply(this,arguments)}),[]);return{loading:n,updateSubscriptionGroupListing:c,error:a}},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.includeSoftDeleted,r=void 0!==n&&n,i=t.includeUnpublished,a=void 0===i||i;return(0,o.Wu)([u.Z],(function(){if(null==e)return[];var t=u.Z.getSubscriptionGroupListing(e);if(null==t)return[];var n=[],o=!0,i=!1,l=void 0;try{for(var c,s=t.subscription_listings_ids[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var f=c.value,d=u.Z.getSubscriptionListing(f);null!=d&&(d.soft_deleted&&!r||(d.published||a)&&n.push(d))}}catch(e){i=!0;l=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw l}}return n}),[e,r,a])},C=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionListing(e):null}))},j=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionGroupListing(e):null}))},S=function(e){ return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionGroupListingsForGuild(e):v}))},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{includeSoftDeleted:!1,sortDeletedListingsLast:!1};m(e);return(0,o.Wu)([u.Z],(function(){var n=null!=e?u.Z.getSubscriptionGroupListingsForGuild(e):v,r=[],o=!0,i=!1,a=void 0;try{for(var l,c=n[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var s=l.value,f=!0,d=!1,p=void 0;try{for(var y,b=s.subscription_listings_ids[Symbol.iterator]();!(f=(y=b.next()).done);f=!0){var m=y.value,g=u.Z.getSubscriptionListing(m);null==g||!t.includeSoftDeleted&&g.soft_deleted||r.push(g)}}catch(e){d=!0;p=e}finally{try{f||null==b.return||b.return()}finally{if(d)throw p}}}}catch(e){i=!0;a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return t.includeSoftDeleted&&t.sortDeletedListingsLast?h(r.filter((function(e){return!e.soft_deleted}))).concat(h(r.filter((function(e){return e.soft_deleted})))):r}))},_=function(e){ var t=p(r.useState(!1),2),n=t[0],i=t[1],a=r.useMemo((function(){return e.map(c.W)}),[e]),s=(0,o.Wu)([u.Z],(function(){return a.filter((function(e){return!u.Z.getDidFetchListingForSubscriptionPlanId(e)}))}),[a]);r.useEffect((function(){if(!n&&s.length>0){i(!0);Promise.all(s.map((function(e){return l.vY(e)}))).catch((function(){})).then((function(){i(!1)}))}}),[n,s]);return{loading:n}},w=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e,t,n){var r;return b(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,3,4]);o(!0);u(null);return[4,l._d(e,t,n)];case 1:i.sent();return[2,!0];case 2:r=i.sent();u(r);return[3,4];case 3:o(!1);return[7];case 4:return[2]}}))})),function(t,n,r){return e.apply(this,arguments)});return{error:a,submitting:n,deleteSubscriptionListing:c}},x=function(){var e=p((0,i.Z)(l.AE),2),t=e[0],n=e[1],r=n.loading;return{error:n.error,submitting:r,archiveSubscriptionListing:t}},P=function(){ var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e){var t,n,r,i;return b(this,(function(a){switch(a.label){case 0:t=e.guildId,n=e.groupListingId,r=e.listingId;a.label=1;case 1:a.trys.push([1,3,4,5]);o(!0);u(null);return[4,l.O0({guildId:t,groupListingId:n,listingId:r,data:{published:!0}})];case 2:a.sent();return[2,!0];case 3:i=a.sent();u(i);return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})),function(t){return e.apply(this,arguments)});return{error:a,submitting:n,publishSubscriptionListing:c}},N=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionSettings(e):void 0}))},A=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=r.useCallback((e=d((function(e,t){var n;return b(this,(function(r){switch(r.label){case 0:o(!0);u(null);r.label=1;case 1:r.trys.push([1,3,4,5]);return[4,l.W2(e,t)];case 2:r.sent();return[3,5];case 3:n=r.sent();u(n);return[3,5];case 4:o(!1) ;return[7];case 5:return[2]}}))})),function(t,n){return e.apply(this,arguments)}),[]);return{loading:n,updateSubscriptionsSettings:c,error:a}},T=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],u=i[1],c=(e=d((function(e,t){var n;return b(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,3,4]);o(!0);u(null);return[4,l.J6(e,t)];case 1:return[2,r.sent()];case 2:n=r.sent();u(n);return[3,4];case 3:o(!1);return[7];case 4:return[2]}}))})),function(t,n){return e.apply(this,arguments)});return{error:a,submitting:n,deleteSubscriptionGroupListing:c}},Z=function(){var e,t=p(r.useState(!1),2),n=t[0],o=t[1],i=p(r.useState(null),2),a=i[0],c=i[1],s=(e=d((function(e){var t;return b(this,(function(n){switch(n.label){case 0:if(null!=u.Z.getSubscriptionSettings(e))return[2];o(!0);c(null);n.label=1;case 1:n.trys.push([1,3,4,5]);return[4,l.Qb(e)];case 2:n.sent();return[3,5];case 3:t=n.sent();c(t);return[3,5];case 4:o(!1);return[7];case 5:return[2]}}))})), function(t){return e.apply(this,arguments)});return{loading:n,fetchSubscriptionsSettings:s,error:a}},M=function(e){return(0,o.e7)([u.Z],(function(){return null!=e?u.Z.getSubscriptionTrial(e):null}))}},154146:(e,t,n)=>{"use strict";n.d(t,{I:()=>r,n:()=>u});var r,o=n(38736);function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e){for(var t=1;t{"use strict";n.d(t,{GM:()=>re,GP:()=>W,UE:()=>Y,Xo:()=>ce,PK:()=>B,B7:()=>se,Lo:()=>te,d9:()=>F,R7:()=>q,_T:()=>k,mR:()=>U,qs:()=>H,Ek:()=>V,p9:()=>G,H9:()=>ne,XZ:()=>J,TT:()=>$,F2:()=>ee}) ;var r=n(667294),o=n(441143),i=n.n(o),a=n(496486),l=n(468811),u=n.n(l),c=n(547308),s=n(202351),f=n(91500),d=n(327499),p=n(797815),h=n(534681),y=n(543491),b=n(704230),v=n(547721),m=n(840249),g=n(523347),O=n(84124),E=n(121052),C=n(2590),j={id:"0",name:"",mentionable:!1,position:0,hoist:!1,permissions:C.Plq.SEND_MESSAGES,color:0,colorString:"0",icon:null,unicodeEmoji:null,flags:0},S=n(154146),I=n(203600);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?(0,f.dv)({guildId:t,emojiId:e.id,roles:n}):(0,f.RE)(t,e.id)}}));return[4,Promise.all(Z(I).concat(Z(_)))];case 5:w.sent();w.label=6;case 6:return[2]}}))}))).apply(this,arguments)}function ae(e){var t,n=e.guildId,r=e.editStateId,o=e.groupListingId,l=m.Z.getSubscriptionListing(r);i()(null!=l,"listing doesnt exist");var u=r,c=S.n.getState().listings[u];i()(null!=c,"edit state does not exist");var s=c.name,f=c.description,d=c.channelBenefits,p=c.intangibleBenefits,h=c.priceTier,v=c.image,g=c.channelAccessFormat,O={};s!==l.name&&(O.name=s);f!==l.description&&(O.description=f);h!==(null===(t=l.subscription_plans[0])||void 0===t?void 0:t.price)&&(O.priceTier=h);null!=v&&(O.image=v) ;null!=g&&(O.can_access_all_channels=g===S.I.ALL_CHANNELS_ACCESS);if(null!=d||null!=p){var E=l.role_benefits.benefits.filter(y.rC),C=l.role_benefits.benefits.filter(y.lL),j=Z(null!=d?d:E).concat(Z(null!=p?p:C));O.benefits=j}return(0,a.isEmpty)(O)?l:b.O0({guildId:n,groupListingId:o,listingId:u,data:O})}function le(e){return ue.apply(this,arguments)}function ue(){return(ue=x((function(e){var t,n,r,o,a,l,u,c,s,f,d,p,h,y,v,m;return R(this,(function(g){switch(g.label){case 0:t=e.guildId,n=e.editStateId,r=e.groupListingId,o=e.onBeforeDispatchNewListing;a=S.n.getState().listings[n];i()(null!=a,"edit state does not exist");l=a.name,u=a.description,c=a.channelBenefits,s=a.intangibleBenefits,f=a.priceTier,d=a.image,p=a.channelAccessFormat;i()(null!=l,"no name provided");i()(null!=u,"no description provided");i()(null!=f,"no priceTier provided");i()(null!=d,"no image provided");h=p===S.I.ALL_CHANNELS_ACCESS;y=Z(null!=c?c:[]).concat(Z(null!=s?s:[]));return null!=(v=r)?[3,2]:[4,b.uw(t,{})];case 1: m=g.sent();v=m.id;g.label=2;case 2:return[2,b.dA({guildId:t,groupListingId:v,data:{can_access_all_channels:h,image:d,name:l,description:u,benefits:y,priceTier:f},onBeforeDispatchNewListing:o})]}}))}))).apply(this,arguments)}function ce(){var e,t=T(r.useState(!1),2),n=t[0],o=t[1],a=T(r.useState(),2),l=a[0],u=a[1],c=r.useCallback((e=x((function(e){var t,n,r,a,l,c,s,f,d,p;return R(this,(function(h){switch(h.label){case 0:t=e.guildId,n=e.editStateId,r=e.groupListingId,a=e.onBeforeDispatchNewListing,l=e.onAfterDispatchNewListing;c=n;s=m.Z.getSubscriptionListing(c);f=null!=s;h.label=1;case 1:h.trys.push([1,7,8,9]);o(!0);u(void 0);if(!f)return[3,3];i()(null!=r,"groupListingId is null");return[4,ae({guildId:t,editStateId:c,groupListingId:r})];case 2:h.sent();return[3,5];case 3:return[4,le({guildId:t,editStateId:c,groupListingId:r,onBeforeDispatchNewListing:a})];case 4:d=h.sent();c=d.id;y=n,b=c,S.n.setState((function(e){var t;return{listings:A(N({},e.listings),(t={},P(t,b,e.listings[y]), P(t,y,void 0),t))}}));null==l||l(d);h.label=5;case 5:return[4,oe({guildId:t,editStateId:c})];case 6:h.sent();re(c);return[2,!0];case 7:if(!("getAnyErrorMessage"in(p=h.sent())))throw p;u(p);return[3,9];case 8:o(!1);return[7];case 9:return[2]}var y,b}))})),function(t){return e.apply(this,arguments)}),[]);return{loading:n,error:l,handleCreateOrUpdateFromEditState:c}}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{includeSoftDeleted:!1},o=(0,v._k)(e,n),i=(0,S.n)((function(e){return e.editStateIdsForGroup[t]})),a=(0,S.n)((function(e){return e.setEditStateIdsForGroup})),l=r.useMemo((function(){return Z(o.map((function(e){return e.id}))).concat(Z(null!=i?i:[]))}),[i,o]),c=r.useCallback((function(){a(t,(function(e){return Z(null!=e?e:[]).concat([u().v4()])}))}),[t,a]),s=r.useCallback((function(e){a(t,(function(t){return(null!=t?t:[]).filter((function(t){return t!==e}))}))}),[t,a]);return{editStateIds:l,addNewEditStateId:c,removeEditStateId:s}}},633440:(e,t,n)=>{ "use strict";n.d(t,{W:()=>i,V:()=>a});var r=n(441143),o=n.n(r);function i(e){var t=e.items;o()(1===t.length,"more than 1 subscription item for role subscription");return t[0].planId}function a(e){var t,n=null==e||null===(t=e.renewalMutations)||void 0===t?void 0:t.items;if(null!=n){o()(n.length<=1,"more than 1 renewal mutation for role subscription");return null==n?void 0:n[0].planId}}},506847:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(667294),o=n(202351),i=n(810978),a=n(551778),l=n(536392),u=n(840249),c=n(633440),s=n(2590);function f(e){var t=(0,o.e7)([l.Z],(function(){return l.Z.getSubscriptions()})),n=r.useMemo((function(){if(null==t)return{};var e={},n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(t)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;if(l.type===s.NYc.GUILD){e[(0,c.W)(l)]=l}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return e}),[t]),f=(0,o.cj)([u.Z],(function(){ var t,r,o=null,i=null!=e?u.Z.getSubscriptionGroupListing(e):null,a=null!==(r=null==i?void 0:i.subscription_listings_ids)&&void 0!==r?r:[],l=!0,c=!1,s=void 0;try{for(var f,d=a[Symbol.iterator]();!(l=(f=d.next()).done);l=!0){var p=f.value,h=u.Z.getSubscriptionListing(p),y=null==h?void 0:h.subscription_plans[0].id;if(null!=y){var b=n[y];if(null!=b){o=b;t=h;break}}}}catch(e){c=!0;s=e}finally{try{l||null==d.return||d.return()}finally{if(c)throw s}}return{activeSubscription:o,activeSubscriptionListing:t}})),d=f.activeSubscription,p=f.activeSubscriptionListing,h=null==p?void 0:p.subscription_plans[0],y=null==h?void 0:h.id,b=null==h?void 0:h.sku_id,v=(0,o.e7)([a.Z],(function(){return null!=y?a.Z.get(y):null})),m=null==p?void 0:p.soft_deleted;r.useEffect((function(){null!=v||null==b||a.Z.isFetchingForSKU(b)||(0,i.GZ)(b,void 0,void 0,m)}),[v,b,m]);return{activeSubscription:d,activeSubscriptionListing:p,activeSubscriptionPlanFromStore:v}}},345623:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u}) ;var r=n(667294),o=n(202351),i=n(797815),a=n(104627),l=[];function u(e){var t=(0,o.e7)([i.Z],(function(){return i.Z.getGuildEmoji(e)}),[e]);return r.useMemo((function(){return null==t?l:t.filter((function(t){return(0,a.Kt)(t,e)}))}),[t,e])}},84124:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(567403),i=n(547721);function a(e,t){var n=(0,r.e7)([o.Z],(function(){return o.Z.getGuild(e)}),[e]),a=(0,i.jO)(t);return null==n||null==a?null:n.roles[a.role_id]}},805537:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(667294),o=n(202351),i=n(396043),a=n(19585),l=n(784426),u=n(652591),c=n(547721),s=n(840249),f=n(506847),d=n(2590);function p(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function h(e){var t,n=e.guildId,h=e.groupListingId,y=e.location,b=e.relevantSubscriptionListingIds,v=(0,c.tT)(n,{refetchOnMount:!1}).listingsLoaded,m=null!=(0,f.Z)(h).activeSubscription,g=(0,o.Wu)([s.Z],(function(){ return(null!=b?b:[]).filter((function(e){var t;return!0===(null===(t=s.Z.getSubscriptionListing(e))||void 0===t?void 0:t.published)}))}),[b]),O=(0,a.Z)(null!==(t=(0,l.DR)())&&void 0!==t?t:[]).analyticsLocations,E=r.useRef(!1);r.useEffect((function(){if(v&&null!=h&&null!=g&&!E.current){E.current=!0;u.default.track(d.rMx.ROLE_SUBSCRIPTION_LISTING_UPSELL_PAGE_VIEWED,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(667294),o=n(543491),i=n(856744),a=n(203600),l=n(473708);function u(e){ return r.useMemo((function(){var t,n=i.DN.map((function(e){return{value:e,label:e.interval===a.rV.DAY&&7===e.interval_count?l.Z.Messages.GUILD_ROLE_SUBSCRIPTION_SETUP_TIER_TRIAL_TIME_LIMIT_DEFAULT_OPTION.format({defaultLimit:(0,o.iG)(e)}):(0,o.iG)(e),isDefault:e.interval===a.rV.DAY&&7===e.interval_count}})),r=null!=e?null===(t=n.find((function(t){return null!=t.value&&t.value.interval===e.interval&&t.value.interval_count===e.interval_count})))||void 0===t?void 0:t.value:e;return{options:n,selectedOption:r}}),[e])}},719511:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(202351),o=n(61209);function i(e){return(0,r.Wu)([o.Z],(function(){return e.filter((function(e){return o.Z.hasChannel(e.ref_id)}))}),[e])}},22572:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(77413),l=n(202351),u=n(797815);const c=function(e,t){return(0,l.e7)([u.Z],(function(){if(null==t)return null;var n,r=u.Z.getDisambiguatedEmojiContext(e) ;return null!==(n=r.getById(t))&&void 0!==n?n:r.getByName(t)}),[e,t])};var s=n(124296),f=n(142412),d=n.n(f);function p(e){var t,n=e.guildId,o=e.emojiId,l=e.emojiName,u=e.className,f=c(n,o);return null!=f||null!=l?(0,r.jsx)(a.Z,{emojiId:null==f?void 0:f.id,emojiName:null!=l?l:null==f?void 0:f.name,animated:null!==(t=null==f?void 0:f.animated)&&void 0!==t&&t,className:i()(d().emojiIcon,u)}):(0,r.jsx)(s.Z,{className:i()(d().emojiIcon,u),useGradient:!0})}},922799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(959468),l=n(239813),u=n(61209),c=n(72580),s=n(856744),f=n(473708),d=n(983739),p=n.n(d);function h(e){var t=e.channelId,n=(0,o.e7)([u.Z],(function(){return u.Z.getChannel(t)}));if(null==n)return(0,r.jsx)(r.Fragment,{children:"[".concat(f.Z.Messages.GUILD_ROLE_SUBSCRIPTION_SETUP_TIER_DELETED_CHANNEL_LABEL,"]")});var c=(0,l.Th)(n.type);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.nn4,{children:(0,a.Z)({channel:n})}),(0, r.jsxs)("div",{"aria-hidden":!0,children:[null!=c&&(0,r.jsx)(c,{className:p().icon,"aria-hidden":!0}),n.name]})]})}function y(e){switch(e.ref_type){case s.Qs.CHANNEL:return(0,r.jsx)(h,{channelId:e.ref_id});case s.Qs.INTANGIBLE:return e.name;default:(0,c.vE)(e)}}},217131:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(837162),c=n(649536),s=n(358624),f=n(219369),d=n(473903),p=n(773148),h=n(463473),y=n(2590),b=n(473708),v=n(803596),m=n.n(v);function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){ Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function E(e){var t,n=e.guildId,i=e.role,v=e.theme,E=e.content,C=void 0===E?b.Z.Messages.GUILD_ROLE_SUBSCRIPTION_SETUP_FLAIR_PREVIEW_MESSAGE_TEXT:E,j=e.className,S=(0,l.e7)([d.default],(function(){return d.default.getCurrentUser()})),I=p.Z.useName(n,null,S),_=(0,u.Kz)(i),w=o.useMemo((function(){return(0,c.e5)(O(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(289283),u=n(707961),c=n(142926),s=n(473708),f=n(274522),d=n.n(f);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>u}) ;var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o} function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=l(e,["width","height"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{c:()=>dt,Z:()=>ht});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(333568),s=n(861426),f=n(615796),d=n(223430),p=n(443812),h=n(377463),y=n(58838),b=n(386991),v=n(775173),m=n(543491),g=n(142926),O=n(547721),E=n(341095),C=n(506847);var j=n(345623),S=n(84124),I=n(719511),_=n(133028),w=n(217131),x=n(22572),P=n(922799),N=n(959468),A=n(14096),T=n(784426),Z=n(61209),M=n(407561),R=n(414306),L=n(2590);function D(e,t){var n=(0,l.e7)([Z.Z],(function(){return Z.Z.getChannel(t)})),r=(0,R.Z)(null==n?void 0:n.id).needSubscriptionToAccess;if(null==n||r)return null;var o=n.isGuildVocal();return{navigateToChannel:function(){ o?A.Z.handleVoiceConnect({channel:n,connected:M.Z.isInChannel(n.id),needSubscriptionToAccess:!1,routeDirectlyToChannel:!0}):(0,T.uL)(L.Z5c.CHANNEL(e,n.id))},ariaLabel:(0,N.Z)({channel:n})}}var k=n(575103),U=n.n(k);function B(e){var t=e.benefit,n=e.guildId,o=D(n,t.ref_id),i=(0,r.jsx)(x.Z,{guildId:n,emojiId:t.emoji_id,emojiName:t.emoji_name}),l=null!=o?(0,r.jsx)(u.P3F,{className:U().channelLink,onClick:o.navigateToChannel,"aria-label":o.ariaLabel,role:"link",children:(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:a()(U().name,U().linkedName),children:(0,P.Z)(t)})}):(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:U().name,children:(0,P.Z)(t)});return(0,r.jsxs)("div",{className:U().container,children:[(0,r.jsxs)("div",{className:U().infoContainer,children:[l,(0,r.jsx)(u.xvT,{color:"interactive-normal",variant:"text-sm/normal",children:t.description})]}),(0,r.jsx)("div",{className:U().emojiContainer,children:i})]})} var F=n(336194),G=n(531441),H=n(249052),V=n(712861),W=n(856744),z=n(873954),Y=n.n(z),K=(0,V.Mg)(Y().tierImageSize),q=(0,V.Mg)(Y().tierImageSizeMobile);function Q(){return(0,c.Z)(W.iP)?q:K}var X=n(473708);function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.xvT,{variant:"text-xs/normal",color:"header-secondary",className:qe().confirmationSectionLabel, children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_CHANNEL_PREVIEW}),(0,r.jsx)("div",{className:qe().confirmationBenefits,children:s.map((function(e){return(0,r.jsx)(Ye,{benefit:e,guildId:o,onClick:function(){return t(!0)}},(0,m.ab)(e))}))})]}),function(){if(0===a.length)return null;var e,t=a[0];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.xvT,{variant:"text-xs/medium",color:"header-secondary",className:qe().confirmationSectionLabel,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_PREMIUM_EMOJI_PREVIEW_TITLE}),(0,r.jsxs)("div",{className:qe().emojiBenefitsRow,children:[(0,r.jsx)(Be.Z,{emojiId:t.id,emojiName:t.name,animated:null!==(e=t.animated)&&void 0!==e&&e,className:qe().emojiImage}),(0,r.jsxs)("div",{children:[(0,r.jsx)(u.xvT,{variant:"text-md/medium",color:"header-primary",className:qe().emojiName,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_PREMIUM_EMOJI_BENEFIT_TEXT}),(0,r.jsx)(u.xvT,{ color:"interactive-normal",variant:"text-sm/normal",children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_PREMIUM_EMOJI_BENEFIT_DESCRIPTION.format({count:a.length})})]})]})]})}(),(0,r.jsx)(u.zxk,{className:qe().confirmationButton,onClick:function(){return t(!0)},children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_PURCHASE_MODAL_CONFIRMATION_DONE_BUTTON})]})};function $e(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function et(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$e(i,r,o,a,l,"next",e)}function l(e){$e(i,r,o,a,l,"throw",e)}a(void 0)}))}}var tt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){ if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n5,h=t.length-5,y=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_SHOW_MORE_DESCRIPTION_WITH_ITEMS.format({numTruncated:h}),b=(0,p.Dt)();return 0===t.length?null:(0,r.jsxs)("div",{className:ot().benefitsSection,children:[(0,r.jsx)(u.X6q,{variant:"text-xs/bold",color:"header-secondary",className:ot().sectionHeader,id:b, children:n}),(0,r.jsx)(d.Z,{size:12}),(0,r.jsx)("ul",{className:ot().benefitsList,"aria-labelledby":b,children:s.map((function(e,t){return(0,r.jsx)("li",{children:(0,r.jsx)(B,{guildId:i,benefit:e},(0,m.ab)(e))},t)}))}),f&&(0,r.jsx)(pt,{isViewAll:l,onToggle:function(){return c((function(e){return!e}))},showMoreText:y})]})},ft=function(e){var t,n=e.guildId,o=e.listingId,i=function(e){return v.ZP.getEmojiURL({id:e.id,animated:e.animated,size:24})},a=(0,j.Z)(n),l=ct(E.XZ(o,n),1)[0],c=a.filter((function(e){return l.has(e.id)}));return 0===c.length?null:(0,r.jsxs)("div",{className:ot().benefitsSection,children:[(0,r.jsx)(u.X6q,{variant:"text-xs/bold",color:"header-secondary",className:ot().sectionHeader,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_EMOJI_SECTION_TITLE.format({count:c.length})}),(0,r.jsx)(d.Z,{size:12}),(0,r.jsx)("div",{className:ot().emojiList,children:c.map((function(e,n){return(0,r.jsx)(u.ua7,{text:e.name,"aria-label":!1,children:function(t){return(0, r.jsx)("img",ut(lt({},t),{className:ot().emojiListEmoji,src:i(e),width:24,height:24,alt:e.name}))}},null!==(t=e.id)&&void 0!==t?t:n)}))})]})},dt=function(e){var t=e.listingId,n=e.guildId,o=e.className,i=(0,S.Z)(n,t),l=ct(E.UE(t),1)[0],c=(0,I.Z)(l),s=ct(E.R7(t),1)[0],f=E.qs(t,n),p=ct(E.XZ(t,n),1)[0];return null==i&&0===c.length&&0===s.length&&0===p.size?null:(0,r.jsxs)("div",{className:a()(ot().subscriptionPerks,o),children:[null!=i&&(0,r.jsxs)(u.y5t,{component:(0,r.jsx)(u.X6q,{variant:"text-xs/bold",color:"header-secondary",className:ot().sectionHeader,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_MEMBER_PREVIEW}),children:[(0,r.jsx)(d.Z,{size:8}),(0,r.jsx)(w.Z,{role:f,guildId:n,className:ot().roleMessagePreview})]}),(0,r.jsx)(st,{header:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_EXCLUSIVE_CHANNELS_SECTION_TITLE,benefits:c,guildId:n}),(0,r.jsx)(st,{header:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_ADDITIONAL_BENEFITS_SECTION_TITLE,benefits:s,guildId:n}),(0,r.jsx)(ft,{ guildId:n,listingId:t})]})},pt=function(e){var t,n=e.onToggle,o=e.isViewAll,i=e.showMoreText;t=o?(0,r.jsxs)(r.Fragment,{children:[X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_SHOW_LESS_DESCRIPTION,(0,r.jsx)(y.Z,{className:ot().toggleTruncationButtonIcon})]}):(0,r.jsxs)(r.Fragment,{children:[i,(0,r.jsx)(h.Z,{className:ot().toggleTruncationButtonIcon})]});return(0,r.jsx)(u.zxk,{look:u.zxk.Looks.BLANK,size:u.zxk.Sizes.NONE,className:ot().toggleTruncationButton,innerClassName:ot().toggleTruncationButtonInner,onClick:n,children:t})};const ht=function(e){var t,n=e.listingId,i=e.guildId,p=e.groupListingId,h=e.analyticsLocation,y=(0,O.jO)(n),v=nt(y,i,p,h),j=v.openModal,S=v.canOpenModal,I=v.cannotOpenReason,w=v.isCheckingTrialEligibility,x=(0,l.e7)([f.Z],(function(){return f.Z.isSyncing})),P=(0, C.Z)(p),N=P.activeSubscription,A=P.activeSubscriptionListing,T=(null==A?void 0:A.id)===n,Z=(null==N?void 0:N.status)===L.O0b.CANCELED,M=ct(o.useState(!1),2),R=M[0],D=M[1],k=ct(o.useState(!1),2),U=k[0],B=k[1],F=o.useCallback((function(e){var t=!1;null!=e&&(t=e.scrollHeight-e.clientHeight>1);B(t)}),[]),G=ct(E._T(n),1)[0],H=ct(E.PK(n),1)[0],V=ct(E.TT(n),1)[0],z=ct(E.F2(n),1)[0],Y=function(e,t){var n=(0,O.oC)(t);return o.useMemo((function(){return null!=n&&(null==n.max_num_active_trial_users||n.max_num_active_trial_users>(null!==(e=n.num_active_trial_users)&&void 0!==e?e:0));var e}),[n])}(0,n),K=(0,g.oM)(i)&&null!=V&&null==N&&Y,q=(0,c.Z)(W.iP),Q=ct(o.useState(!1),2),J=Q[0],$=Q[1],ee=J||!q,te=(0,l.e7)([s.Z],(function(){return s.Z.isViewingSubscriptionRoles(i)})),ne=!0===(null==y?void 0:y.published),oe=!0===(null==y?void 0:y.soft_deleted),ie=X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_SHOW_MORE_DESCRIPTION;return!ne&&!te||oe?null:(0,r.jsxs)("article",{className:ot().container,"aria-label":G, children:[K&&(0,r.jsxs)("div",{className:a()(ot().tierTrialIndicator,ot().tierTopIndicator),children:[X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TRIAL_PERIOD.format({trialPeriodDuration:(0,m.iG)({interval:V.interval,interval_count:V.interval_count})}),(0,r.jsx)(u.ua7,{clickableOnMobile:!0,text:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TRIAL_DISCLAIMER.format({activeTrialUserLimit:null!=z?z:0}),children:function(e){return(0,r.jsx)(b.Z,lt({className:ot().tierTrialIndicatorIcon},e))}})]}),(0,r.jsxs)("div",{className:K?void 0:ot().cardContainerWithoutTopIndicator,children:[(0,r.jsxs)("div",{className:ot().tierInfoContainer,children:[q?(0,r.jsx)(ue,{listingId:n,isListingPublished:ne,expanded:ee,onToggleExpanded:function(){return $((function(e){return!e}))}}):(0,r.jsx)(re,{listingId:n,isListingPublished:ne}),ee&&(0,r.jsxs)(r.Fragment,{children:[q&&(0,r.jsx)("div",{className:ot().divider}),T?(0,r.jsx)(u.zxk,{fullWidth:!0,look:u.zxk.Looks.OUTLINED,color:u.zxk.Colors.PRIMARY,disabled:!0, children:Z?X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_CANCELED_LABEL:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_SUBSCRIBED_LABEL}):(0,r.jsx)(u.ua7,{text:S?null:I,"aria-label":null!==(t=S&&I)&&void 0!==t&&t,children:function(e){return(0,r.jsx)(_.Z,ut(lt({},e),{fullWidth:!0,disabled:!S||x,submitting:w,onClick:j,children:X.Z.Messages.GUILD_ROLE_SUBSCRIPTION_TIER_REVIEW_SUBSCRIBE_LABEL}))}}),(0,r.jsx)(d.Z,{size:16}),(0,r.jsx)(u.xvT,{variant:"text-sm/normal",color:"text-normal",className:a()((!U||!R)&&ot().tierDescriptionTruncate),children:(0,r.jsx)("div",{ref:F,children:H})}),U&&(0,r.jsx)(pt,{isViewAll:R,onToggle:function(){return D((function(e){return!e}))},showMoreText:ie})]})]}),ee&&(0,r.jsx)(u.y5t,{children:(0,r.jsx)(dt,{listingId:n,guildId:i})})]})]})}},877116:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(736818),o=n(682776),i=n(602397),a=n(563135),l=n(269300),u=n(79522);function c(e){if(!e.isGuildVoice())return!1 ;if(l.ZP.getGuildScheduledEventsByIndex(l.bN.CHANNEL_EVENT_ACTIVE(e.id)).length<1)return!1;if(!o.Z.can(u.AN,e))return!1;var t=new Set(i.ZP.getVoiceStatesForChannel(e).map((function(e){return e.user.id}))),n=r.default.getId(),c=!0,s=!1,f=void 0;try{for(var d,p=t[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var h=d.value;if(h!==n&&a.ZP.can({permission:u.AN,user:h,context:e}))return!1}}catch(e){s=!0;f=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw f}}return!0}},194026:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(136317),u=n(473708),c=n(782777),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){var t=e.className,n=e.iconContainerClassName,o=e.icon,c=e.color,d=e.title,p=e.description,h=e.userCount,y=e.onClick,b=e.highlight;return(0,r.jsxs)(a.P3F,{className:i()(s().container,t,null!=b&&f({},s().pulse,b)),onClick:y, children:[(0,r.jsx)("div",{style:{backgroundColor:c},className:i()(s().icon,n),children:o}),(0,r.jsxs)("div",{className:s().textContainer,children:[(0,r.jsx)(a.X6q,{variant:"heading-md/semibold",children:d}),(0,r.jsx)(a.xvT,{variant:"text-xs/normal",color:"header-secondary",className:s().inline,children:p}),null!=h&&h>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.xvT,{variant:"text-xs/normal",color:"header-secondary",className:s().dot,children:"•"}),(0,r.jsx)(a.xvT,{variant:"text-xs/normal",color:"header-secondary",className:s().inline,children:u.Z.Messages.GUILD_EVENT_INTERESTED.format({count:h})})]}):null]}),(0,r.jsx)(l.Z,{height:16,width:16,className:s().caret})]})}},311569:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=(n(667294),n(202351)),i=n(336194),a=n(707961),l=n(61209),u=n(570202),c=n(382840),s=n(852221),f=n(201441),d=n(371188),p=n(194026),h=n(473708),y=n(769539),b=n.n(y);function v(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return} l.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>r});const r={"😀":"#E67E22","😃":"#E67E22","😄":"#E67E22","😁":"#E67E22","😆":"#E67E22","😅":"#E67E22","🤣":"#F1C40F","😂":"#E67E22","🙂":"#F1C40F","🙃":"#F1C40F","🫠":"#F1C40F","😉":"#F1C40F","😊":"#F1C40F","😇":"#3498DB","🥰":"#F1C40F","😍":"#E67E22","🤩":"#E67E22","😘":"#F1C40F","😗":"#F1C40F","☺️":"#607D8B","😚":"#F1C40F","😙":"#F1C40F","🥲":"#F1C40F","😋":"#F1C40F","😛":"#F1C40F","😜":"#F1C40F","🤪":"#E67E22","😝":"#F1C40F","🤑":"#F1C40F","🤗":"#E67E22","🤭":"#F1C40F","🫢":"#F1C40F","🫣":"#F1C40F","🤫":"#F1C40F","🤔":"#F1C40F","🫡":"#F1C40F","🤐":"#F1C40F","🤨":"#F1C40F","😐":"#F1C40F", "😑":"#F1C40F","😶":"#F1C40F","🫥":"#F1C40F","😶‍🌫️":"#9B59B6","😏":"#F1C40F","😒":"#F1C40F","🙄":"#E67E22","😬":"#9B59B6","😮‍💨":"#F1C40F","🤥":"#F1C40F","😌":"#F1C40F","😔":"#F1C40F","😪":"#F1C40F","🤤":"#F1C40F","😴":"#F1C40F","😷":"#9B59B6","🤒":"#E67E22","🤕":"#9B59B6","🤢":"#E67E22","🤮":"#11806A","🤧":"#9B59B6","🥵":"#E67E22","🥶":"#3498DB","🥴":"#F1C40F","😵":"#F1C40F","😵‍💫":"#F1C40F","🤯":"#E67E22","🤠":"#E67E22","🥳":"#F1C40F","🥸":"#E67E22","😎":"#11806A","🤓":"#E67E22","🧐":"#F1C40F","😕":"#F1C40F","🫤":"#F1C40F","😟":"#F1C40F","🙁":"#F1C40F","☹️":"#F1C40F","😮":"#F1C40F","😯":"#F1C40F","😲":"#F1C40F","😳":"#E67E22","🥺":"#F1C40F","🥹":"#F1C40F","😦":"#F1C40F","😧":"#F1C40F","😨":"#5865F2","😰":"#E67E22","😥":"#F1C40F","😢":"#F1C40F","😭":"#F1C40F","😱":"#9B59B6","😖":"#F1C40F","😣":"#F1C40F","😞":"#F1C40F","😓":"#F1C40F","😩":"#F1C40F","😫":"#F1C40F","🥱":"#F1C40F","😤":"#F1C40F","😡":"#E67E22","😠":"#F1C40F","🤬":"#992D22","😈":"#9B59B6","👿":"#9B59B6","💀":"#9B59B6", "☠️":"#9B59B6","💩":"#992D22","🤡":"#9B59B6","👹":"#E74C3C","👺":"#E74C3C","👻":"#9B59B6","👽":"#9B59B6","👾":"#9B59B6","🤖":"#607D8B","😺":"#E67E22","😸":"#E67E22","😹":"#E67E22","😻":"#E67E22","😼":"#E67E22","😽":"#E67E22","🙀":"#E67E22","😿":"#E67E22","😾":"#E67E22","🙈":"#E67E22","🙉":"#E67E22","🙊":"#E67E22","💋":"#992D22","💌":"#9B59B6","💘":"#3498DB","💝":"#E91E63","💖":"#E91E63","💗":"#E91E63","💓":"#E91E63","💞":"#E91E63","💕":"#E91E63","💟":"#9B59B6","❣️":"#E74C3C","💔":"#E74C3C","❤️‍🔥":"#E74C3C","❤️‍🩹":"#9B59B6","❤️":"#E74C3C","🧡":"#E67E22","💛":"#F1C40F","💚":"#11806A","💙":"#3498DB","💜":"#9B59B6","🤎":"#992D22","🖤":"#607D8B","🤍":"#9B59B6","💯":"#992D22","💢":"#E74C3C","💥":"#E74C3C","💫":"#F1C40F","💦":"#9B59B6","💨":"#9B59B6","🕳️":"#9B59B6","💣":"#11806A","💬":"#9B59B6","👁️‍🗨️":"#11806A","🗨️":"#206694","🗯️":"#9B59B6","💭":"#9B59B6","💤":"#206694","👋":"#F1C40F","🤚":"#F1C40F","🖐️":"#F1C40F","✋":"#F1C40F","🖖":"#F1C40F","🫱":"#F1C40F","🫲":"#F1C40F", "🫳":"#F1C40F","🫴":"#F1C40F","👌":"#F1C40F","🤌":"#F1C40F","🤏":"#E67E22","✌️":"#F1C40F","🤞":"#F1C40F","🫰":"#F1C40F","🤟":"#F1C40F","🤘":"#F1C40F","🤙":"#F1C40F","👈":"#F1C40F","👉":"#F1C40F","👆":"#F1C40F","🖕":"#F1C40F","👇":"#E67E22","☝️":"#F1C40F","🫵":"#F1C40F","👍":"#F1C40F","👎":"#F1C40F","✊":"#F1C40F","👊":"#E67E22","🤛":"#F1C40F","🤜":"#E67E22","👏":"#F1C40F","🙌":"#F1C40F","🫶":"#E67E22","👐":"#F1C40F","🤲":"#F1C40F","🤝":"#F1C40F","🙏":"#F1C40F","✍️":"#607D8B","💅":"#F1C40F","🤳":"#9B59B6","💪":"#F1C40F","🦾":"#11806A","🦿":"#9B59B6","🦵":"#E67E22","🦶":"#F1C40F","👂":"#F1C40F","🦻":"#F1C40F","👃":"#F1C40F","🧠":"#9B59B6","🫀":"#E74C3C","🫁":"#E74C3C","🦷":"#9B59B6","🦴":"#9B59B6","👀":"#9B59B6","👁️":"#9B59B6","👅":"#9B59B6","👄":"#E74C3C","🫦":"#E74C3C","👶":"#F1C40F","🧒":"#F1C40F","👦":"#F1C40F","👧":"#F1C40F","🧑":"#F1C40F","👱":"#F1C40F","👨":"#F1C40F","🧔":"#F1C40F","🧔‍♂️":"#F1C40F","🧔‍♀️":"#E67E22","👨‍🦰":"#F1C40F","👨‍🦱":"#F1C40F","👨‍🦳":"#F1C40F", "👨‍🦲":"#F1C40F","👩":"#F1C40F","👩‍🦰":"#E67E22","🧑‍🦰":"#F1C40F","👩‍🦱":"#F1C40F","🧑‍🦱":"#F1C40F","👩‍🦳":"#F1C40F","🧑‍🦳":"#F1C40F","👩‍🦲":"#F1C40F","🧑‍🦲":"#F1C40F","👱‍♀️":"#F1C40F","👱‍♂️":"#F1C40F","🧓":"#F1C40F","👴":"#F1C40F","👵":"#F1C40F","🙍":"#F1C40F","🙍‍♂️":"#206694","🙍‍♀️":"#F1C40F","🙎":"#F1C40F","🙎‍♂️":"#F1C40F","🙎‍♀️":"#E67E22","🙅":"#9B59B6","🙅‍♂️":"#3498DB","🙅‍♀️":"#992D22","🙆":"#9B59B6","🙆‍♂️":"#206694","🙆‍♀️":"#992D22","💁":"#F1C40F","💁‍♂️":"#F1C40F","💁‍♀️":"#F1C40F","🙋":"#F1C40F","🙋‍♂️":"#F1C40F","🙋‍♀️":"#9B59B6","🧏":"#F1C40F","🧏‍♂️":"#206694","🧏‍♀️":"#E67E22","🙇":"#F1C40F","🙇‍♂️":"#206694","🙇‍♀️":"#992D22","🤦":"#9B59B6","🤦‍♂️":"#206694","🤦‍♀️":"#992D22","🤷":"#E67E22","🤷‍♂️":"#F1C40F","🤷‍♀️":"#992D22","🧑‍⚕️":"#9B59B6","👨‍⚕️":"#F1C40F","👩‍⚕️":"#9B59B6","🧑‍🎓":"#F1C40F","👨‍🎓":"#F1C40F","👩‍🎓":"#E67E22","🧑‍🏫":"#E67E22","👨‍🏫":"#E67E22","👩‍🏫":"#E67E22","🧑‍⚖️":"#F1C40F","👨‍⚖️":"#F1C40F","👩‍⚖️":"#E67E22", "🧑‍🌾":"#992D22","👨‍🌾":"#E67E22","👩‍🌾":"#992D22","🧑‍🍳":"#E67E22","👨‍🍳":"#E67E22","👩‍🍳":"#E67E22","🧑‍🔧":"#5865F2","👨‍🔧":"#206694","👩‍🔧":"#5865F2","🧑‍🏭":"#F1C40F","👨‍🏭":"#F1C40F","👩‍🏭":"#F1C40F","🧑‍💼":"#F1C40F","👨‍💼":"#F1C40F","👩‍💼":"#F1C40F","🧑‍🔬":"#9B59B6","👨‍🔬":"#9B59B6","👩‍🔬":"#9B59B6","🧑‍💻":"#9B59B6","👨‍💻":"#9B59B6","👩‍💻":"#9B59B6","🧑‍🎤":"#1ABC9C","👨‍🎤":"#206694","👩‍🎤":"#9B59B6","🧑‍🎨":"#E67E22","👨‍🎨":"#E67E22","👩‍🎨":"#E67E22","🧑‍✈️":"#992D22","👨‍✈️":"#F1C40F","👩‍✈️":"#992D22","🧑‍🚀":"#9B59B6","👨‍🚀":"#9B59B6","👩‍🚀":"#9B59B6","🧑‍🚒":"#992D22","👨‍🚒":"#992D22","👩‍🚒":"#992D22","👮":"#F1C40F","👮‍♂️":"#F1C40F","👮‍♀️":"#F1C40F","🕵️":"#992D22","🕵️‍♂️":"#992D22","🕵️‍♀️":"#992D22","💂":"#E67E22","💂‍♂️":"#E67E22","💂‍♀️":"#E67E22","🥷":"#11806A","👷":"#F1C40F","👷‍♂️":"#F1C40F","👷‍♀️":"#F1C40F","🫅":"#E67E22","🤴":"#F1C40F","👸":"#F1C40F","👳":"#F1C40F","👳‍♂️":"#9B59B6","👳‍♀️":"#F1C40F","👲":"#992D22","🧕":"#206694", "🤵":"#F1C40F","🤵‍♂️":"#992D22","🤵‍♀️":"#E67E22","👰":"#F1C40F","👰‍♂️":"#F1C40F","👰‍♀️":"#F1C40F","🤰":"#9B59B6","🫃":"#E67E22","🫄":"#9B59B6","🤱":"#992D22","👩‍🍼":"#992D22","👨‍🍼":"#E67E22","🧑‍🍼":"#E67E22","👼":"#F1C40F","🎅":"#9B59B6","🤶":"#9B59B6","🧑‍🎄":"#E67E22","🦸":"#E67E22","🦸‍♂️":"#E67E22","🦸‍♀️":"#E67E22","🦹":"#F1C40F","🦹‍♂️":"#F1C40F","🦹‍♀️":"#E67E22","🧙":"#992D22","🧙‍♂️":"#992D22","🧙‍♀️":"#992D22","🧚":"#E67E22","🧚‍♂️":"#E67E22","🧚‍♀️":"#3498DB","🧛":"#F1C40F","🧛‍♂️":"#607D8B","🧛‍♀️":"#E67E22","🧜":"#206694","🧜‍♂️":"#E67E22","🧜‍♀️":"#9B59B6","🧝":"#11806A","🧝‍♂️":"#F1C40F","🧝‍♀️":"#9B59B6","🧞":"#206694","🧞‍♂️":"#3498DB","🧞‍♀️":"#9B59B6","🧟":"#11806A","🧟‍♂️":"#11806A","🧟‍♀️":"#11806A","🧌":"#992D22","💆":"#F1C40F","💆‍♂️":"#F1C40F","💆‍♀️":"#F1C40F","💇":"#F1C40F","💇‍♂️":"#F1C40F","💇‍♀️":"#F1C40F","🚶":"#206694","🚶‍♂️":"#206694","🚶‍♀️":"#206694","🧍":"#9B59B6","🧍‍♂️":"#992D22","🧍‍♀️":"#F1C40F","🧎":"#E67E22","🧎‍♂️":"#F1C40F", "🧎‍♀️":"#E67E22","🧑‍🦯":"#206694","👨‍🦯":"#206694","👩‍🦯":"#206694","🧑‍🦼":"#11806A","👨‍🦼":"#992D22","👩‍🦼":"#992D22","🧑‍🦽":"#11806A","👨‍🦽":"#11806A","👩‍🦽":"#206694","🏃":"#F1C40F","🏃‍♂️":"#206694","🏃‍♀️":"#3498DB","💃":"#F1C40F","🕺":"#992D22","🕴️":"#607D8B","👯":"#E67E22","👯‍♂️":"#992D22","👯‍♀️":"#E67E22","🧖":"#9B59B6","🧖‍♂️":"#9B59B6","🧖‍♀️":"#F1C40F","🧗":"#9B59B6","🧗‍♂️":"#9B59B6","🧗‍♀️":"#9B59B6","🤺":"#9B59B6","🏇":"#992D22","⛷️":"#992D22","🏂":"#206694","🏌️":"#9B59B6","🏌️‍♂️":"#607D8B","🏌️‍♀️":"#E67E22","🏄":"#E67E22","🏄‍♂️":"#F1C40F","🏄‍♀️":"#9B59B6","🚣":"#E74C3C","🚣‍♂️":"#E74C3C","🚣‍♀️":"#E74C3C","🏊":"#9B59B6","🏊‍♂️":"#9B59B6","🏊‍♀️":"#9B59B6","⛹️":"#E67E22","⛹️‍♂️":"#206694","⛹️‍♀️":"#E67E22","🏋️":"#E67E22","🏋️‍♂️":"#E67E22","🏋️‍♀️":"#992D22","🚴":"#11806A","🚴‍♂️":"#11806A","🚴‍♀️":"#992D22","🚵":"#9B59B6","🚵‍♂️":"#9B59B6","🚵‍♀️":"#992D22","🤸":"#F1C40F","🤸‍♂️":"#206694","🤸‍♀️":"#F1C40F","🤼":"#E67E22","🤼‍♂️":"#E67E22", "🤼‍♀️":"#E67E22","🤽":"#E67E22","🤽‍♂️":"#E67E22","🤽‍♀️":"#E67E22","🤾":"#9B59B6","🤾‍♂️":"#E67E22","🤾‍♀️":"#E67E22","🤹":"#E67E22","🤹‍♂️":"#F1C40F","🤹‍♀️":"#E67E22","🧘":"#F1C40F","🧘‍♂️":"#E67E22","🧘‍♀️":"#F1C40F","🛀":"#9B59B6","🛌":"#9B59B6","🧑‍🤝‍🧑":"#9B59B6","👭":"#F1C40F","👫":"#F1C40F","👬":"#E67E22","💏":"#9B59B6","👩‍❤️‍💋‍👨":"#9B59B6","👨‍❤️‍💋‍👨":"#9B59B6","👩‍❤️‍💋‍👩":"#9B59B6","💑":"#9B59B6","👩‍❤️‍👨":"#9B59B6","👨‍❤️‍👨":"#9B59B6","👩‍❤️‍👩":"#9B59B6","👪":"#F1C40F","👨‍👩‍👦":"#206694","👨‍👩‍👧":"#F1C40F","👨‍👩‍👧‍👦":"#F1C40F","👨‍👩‍👦‍👦":"#F1C40F","👨‍👩‍👧‍👧":"#F1C40F","👨‍👨‍👦":"#206694","👨‍👨‍👧":"#F1C40F","👨‍👨‍👧‍👦":"#206694","👨‍👨‍👦‍👦":"#206694","👨‍👨‍👧‍👧":"#F1C40F","👩‍👩‍👦":"#E67E22","👩‍👩‍👧":"#E67E22","👩‍👩‍👧‍👦":"#E67E22","👩‍👩‍👦‍👦":"#F1C40F","👩‍👩‍👧‍👧":"#E67E22","👨‍👦":"#F1C40F","👨‍👦‍👦":"#206694","👨‍👧":"#206694","👨‍👧‍👦":"#F1C40F","👨‍👧‍👧":"#F1C40F","👩‍👦":"#F1C40F","👩‍👦‍👦":"#F1C40F","👩‍👧":"#F1C40F", "👩‍👧‍👦":"#F1C40F","👩‍👧‍👧":"#F1C40F","🗣️":"#607D8B","👤":"#607D8B","👥":"#607D8B","🫂":"#607D8B","👣":"#11806A","🐵":"#E67E22","🐒":"#E67E22","🦍":"#206694","🦧":"#992D22","🐶":"#9B59B6","🐕":"#E67E22","🦮":"#E67E22","🐕‍🦺":"#992D22","🐩":"#9B59B6","🐺":"#9B59B6","🦊":"#E67E22","🦝":"#992D22","🐱":"#F1C40F","🐈":"#9B59B6","🐈‍⬛":"#11806A","🦁":"#E67E22","🐯":"#F1C40F","🐅":"#992D22","🐆":"#E67E22","🐴":"#992D22","🐎":"#992D22","🦄":"#9B59B6","🦓":"#206694","🦌":"#E67E22","🦬":"#992D22","🐮":"#9B59B6","🐂":"#E74C3C","🐃":"#992D22","🐄":"#9B59B6","🐷":"#9B59B6","🐖":"#9B59B6","🐗":"#992D22","🐽":"#9B59B6","🐏":"#9B59B6","🐑":"#9B59B6","🐐":"#9B59B6","🐪":"#E67E22","🐫":"#E67E22","🦙":"#9B59B6","🦒":"#E67E22","🐘":"#9B59B6","🦣":"#992D22","🦏":"#9B59B6","🦛":"#9B59B6","🐭":"#9B59B6","🐁":"#9B59B6","🐀":"#9B59B6","🐹":"#9B59B6","🐰":"#9B59B6","🐇":"#9B59B6","🐿️":"#992D22","🦫":"#992D22","🦔":"#992D22","🦇":"#992D22","🐻":"#992D22","🐻‍❄️":"#9B59B6","🐨":"#9B59B6","🐼":"#11806A", "🦥":"#992D22","🦦":"#992D22","🦨":"#9B59B6","🦘":"#E67E22","🦡":"#9B59B6","🐾":"#11806A","🦃":"#992D22","🐔":"#E74C3C","🐓":"#9B59B6","🐣":"#F1C40F","🐤":"#F1C40F","🐥":"#F1C40F","🐦":"#9B59B6","🐧":"#E67E22","🕊️":"#9B59B6","🦅":"#992D22","🦆":"#9B59B6","🦢":"#9B59B6","🦉":"#992D22","🦤":"#E67E22","🪶":"#992D22","🦩":"#E74C3C","🦚":"#11806A","🦜":"#11806A","🐸":"#11806A","🐊":"#11806A","🐢":"#11806A","🦎":"#11806A","🐍":"#992D22","🐲":"#F1C40F","🐉":"#992D22","🦕":"#206694","🦖":"#11806A","🐳":"#3498DB","🐋":"#9B59B6","🐬":"#3498DB","🦭":"#9B59B6","🐟":"#3498DB","🐠":"#F1C40F","🐡":"#E67E22","🦈":"#9B59B6","🐙":"#992D22","🐚":"#9B59B6","🪸":"#E74C3C","🐌":"#E67E22","🦋":"#11806A","🐛":"#992D22","🐜":"#992D22","🐝":"#607D8B","🪲":"#11806A","🐞":"#992D22","🦗":"#992D22","🪳":"#992D22","🕷️":"#11806A","🕸️":"#9B59B6","🦂":"#992D22","🦟":"#992D22","🪰":"#E67E22","🪱":"#E74C3C","🦠":"#11806A","💐":"#F1C40F","🌸":"#9B59B6","💮":"#9B59B6","🪷":"#9B59B6","🏵️":"#E67E22","🌹":"#992D22", "🥀":"#9B59B6","🌺":"#E91E63","🌻":"#F1C40F","🌼":"#F1C40F","🌷":"#E74C3C","🌱":"#11806A","🪴":"#11806A","🌲":"#11806A","🌳":"#11806A","🌴":"#11806A","🌵":"#11806A","🌾":"#E67E22","🌿":"#11806A","☘️":"#11806A","🍀":"#11806A","🍁":"#992D22","🍂":"#992D22","🍃":"#11806A","🪹":"#992D22","🪺":"#3498DB","🍇":"#992D22","🍈":"#9B59B6","🍉":"#E74C3C","🍊":"#E67E22","🍋":"#F1C40F","🍌":"#9B59B6","🍍":"#992D22","🥭":"#E67E22","🍎":"#E74C3C","🍏":"#11806A","🍐":"#E67E22","🍑":"#E74C3C","🍒":"#E74C3C","🍓":"#992D22","🫐":"#206694","🥝":"#F1C40F","🍅":"#E74C3C","🫒":"#992D22","🥥":"#9B59B6","🥑":"#F1C40F","🍆":"#992D22","🥔":"#992D22","🥕":"#E67E22","🌽":"#992D22","🌶️":"#E74C3C","🫑":"#11806A","🥒":"#F1C40F","🥬":"#11806A","🥦":"#11806A","🧄":"#9B59B6","🧅":"#E67E22","🍄":"#E74C3C","🥜":"#E67E22","🫘":"#992D22","🌰":"#992D22","🍞":"#E67E22","🥐":"#E67E22","🥖":"#F1C40F","🫓":"#9B59B6","🥨":"#E74C3C","🥯":"#E67E22","🥞":"#F1C40F","🧇":"#E67E22","🧀":"#F1C40F","🍖":"#992D22","🍗":"#992D22", "🥩":"#992D22","🥓":"#E74C3C","🍔":"#E67E22","🍟":"#F1C40F","🍕":"#E67E22","🌭":"#E67E22","🥪":"#F1C40F","🌮":"#F1C40F","🌯":"#9B59B6","🫔":"#E67E22","🥙":"#E67E22","🧆":"#992D22","🥚":"#9B59B6","🍳":"#11806A","🥘":"#E67E22","🍲":"#9B59B6","🫕":"#992D22","🥣":"#3498DB","🥗":"#11806A","🍿":"#E74C3C","🧈":"#F1C40F","🧂":"#9B59B6","🥫":"#E74C3C","🍱":"#992D22","🍘":"#992D22","🍙":"#9B59B6","🍚":"#9B59B6","🍛":"#9B59B6","🍜":"#9B59B6","🍝":"#F1C40F","🍠":"#E74C3C","🍢":"#E67E22","🍣":"#E74C3C","🍤":"#E67E22","🍥":"#9B59B6","🥮":"#992D22","🍡":"#9B59B6","🥟":"#F1C40F","🥠":"#E67E22","🥡":"#9B59B6","🦀":"#E74C3C","🦞":"#992D22","🦐":"#E74C3C","🦑":"#E74C3C","🦪":"#9B59B6","🍦":"#E67E22","🍧":"#9B59B6","🍨":"#9B59B6","🍩":"#992D22","🍪":"#E67E22","🎂":"#9B59B6","🍰":"#9B59B6","🧁":"#E67E22","🥧":"#E67E22","🍫":"#E74C3C","🍬":"#9B59B6","🍭":"#9B59B6","🍮":"#9B59B6","🍯":"#F1C40F","🍼":"#9B59B6","🥛":"#9B59B6","☕":"#9B59B6","🫖":"#9B59B6","🍵":"#9B59B6","🍶":"#9B59B6","🍾":"#992D22", "🍷":"#9B59B6","🍸":"#9B59B6","🍹":"#F1C40F","🍺":"#E67E22","🍻":"#E67E22","🥂":"#9B59B6","🥃":"#9B59B6","🫗":"#9B59B6","🥤":"#E74C3C","🧋":"#E67E22","🧃":"#9B59B6","🧉":"#992D22","🧊":"#3498DB","🥢":"#992D22","🍽️":"#9B59B6","🍴":"#9B59B6","🥄":"#607D8B","🔪":"#9B59B6","🫙":"#9B59B6","🏺":"#992D22","🌍":"#F1C40F","🌎":"#206694","🌏":"#F1C40F","🌐":"#3498DB","🗺️":"#3498DB","🗾":"#3498DB","🧭":"#9B59B6","🏔️":"#11806A","⛰️":"#11806A","🌋":"#11806A","🗻":"#9B59B6","🏕️":"#992D22","🏖️":"#E67E22","🏜️":"#992D22","🏝️":"#3498DB","🏞️":"#3498DB","🏟️":"#9B59B6","🏛️":"#9B59B6","🏗️":"#F1C40F","🧱":"#992D22","🪨":"#11806A","🪵":"#992D22","🛖":"#992D22","🏘️":"#9B59B6","🏚️":"#9B59B6","🏠":"#9B59B6","🏡":"#11806A","🏢":"#9B59B6","🏣":"#9B59B6","🏤":"#9B59B6","🏥":"#9B59B6","🏦":"#9B59B6","🏨":"#9B59B6","🏩":"#9B59B6","🏪":"#607D8B","🏫":"#9B59B6","🏬":"#607D8B","🏭":"#9B59B6","🏯":"#206694","🏰":"#9B59B6","💒":"#9B59B6","🗼":"#992D22","🗽":"#607D8B","⛪":"#9B59B6","🕌":"#E67E22", "🛕":"#E67E22","🕍":"#E67E22","⛩️":"#992D22","🕋":"#992D22","⛲":"#9B59B6","⛺":"#E74C3C","🌁":"#9B59B6","🌃":"#206694","🏙️":"#206694","🌄":"#9B59B6","🌅":"#E67E22","🌆":"#E67E22","🌇":"#E67E22","🌉":"#206694","♨️":"#992D22","🎠":"#9B59B6","🛝":"#206694","🎡":"#992D22","🎢":"#E67E22","💈":"#9B59B6","🎪":"#9B59B6","🚂":"#992D22","🚃":"#607D8B","🚄":"#9B59B6","🚅":"#206694","🚆":"#607D8B","🚇":"#11806A","🚈":"#206694","🚉":"#206694","🚊":"#11806A","🚝":"#206694","🚞":"#9B59B6","🚋":"#11806A","🚌":"#3498DB","🚍":"#607D8B","🚎":"#206694","🚐":"#9B59B6","🚑":"#11806A","🚒":"#11806A","🚓":"#11806A","🚔":"#11806A","🚕":"#E67E22","🚖":"#992D22","🚗":"#9B59B6","🚘":"#E74C3C","🚙":"#3498DB","🛻":"#206694","🚚":"#E67E22","🚛":"#11806A","🚜":"#F1C40F","🏎️":"#E74C3C","🏍️":"#11806A","🛵":"#E67E22","🦽":"#11806A","🦼":"#992D22","🛺":"#F1C40F","🚲":"#11806A","🛴":"#607D8B","🛹":"#11806A","🛼":"#3498DB","🚏":"#9B59B6","🛣️":"#11806A","🛤️":"#992D22","🛢️":"#992D22","⛽":"#E74C3C","🛞":"#11806A", "🚨":"#E74C3C","🚥":"#9B59B6","🚦":"#11806A","🛑":"#9B59B6","🚧":"#607D8B","⚓":"#206694","🛟":"#9B59B6","⛵":"#992D22","🛶":"#992D22","🚤":"#9B59B6","🛳️":"#9B59B6","⛴️":"#206694","🛥️":"#9B59B6","🚢":"#9B59B6","✈️":"#3498DB","🛩️":"#9B59B6","🛫":"#206694","🛬":"#206694","🪂":"#992D22","💺":"#607D8B","🚁":"#E74C3C","🚟":"#9B59B6","🚠":"#992D22","🚡":"#F1C40F","🛰️":"#206694","🚀":"#9B59B6","🛸":"#206694","🛎️":"#992D22","🧳":"#992D22","⌛":"#9B59B6","⏳":"#9B59B6","⌚":"#992D22","⏰":"#9B59B6","⏱️":"#9B59B6","⏲️":"#9B59B6","🕰️":"#9B59B6","🕛":"#9B59B6","🕧":"#9B59B6","🕐":"#9B59B6","🕜":"#9B59B6","🕑":"#9B59B6","🕝":"#9B59B6","🕒":"#9B59B6","🕞":"#9B59B6","🕓":"#9B59B6","🕟":"#9B59B6","🕔":"#9B59B6","🕠":"#9B59B6","🕕":"#9B59B6","🕡":"#9B59B6","🕖":"#9B59B6","🕢":"#9B59B6","🕗":"#9B59B6","🕣":"#9B59B6","🕘":"#9B59B6","🕤":"#9B59B6","🕙":"#9B59B6","🕥":"#9B59B6","🕚":"#9B59B6","🕦":"#9B59B6","🌑":"#11806A","🌒":"#11806A","🌓":"#11806A","🌔":"#11806A","🌕":"#F1C40F","🌖":"#11806A", "🌗":"#11806A","🌘":"#11806A","🌙":"#F1C40F","🌚":"#206694","🌛":"#F1C40F","🌜":"#F1C40F","🌡️":"#9B59B6","☀️":"#F1C40F","🌝":"#F1C40F","🌞":"#F1C40F","🪐":"#E67E22","⭐":"#9B59B6","🌟":"#9B59B6","🌠":"#206694","🌌":"#9B59B6","☁️":"#9B59B6","⛅":"#9B59B6","⛈️":"#9B59B6","🌤️":"#9B59B6","🌥️":"#9B59B6","🌦️":"#F1C40F","🌧️":"#9B59B6","🌨️":"#9B59B6","🌩️":"#9B59B6","🌪️":"#607D8B","🌫️":"#9B59B6","🌬️":"#9B59B6","🌀":"#206694","🌈":"#1ABC9C","🌂":"#206694","☂️":"#9B59B6","☔":"#5865F2","⛱️":"#F1C40F","⚡":"#F1C40F","❄️":"#3498DB","☃️":"#9B59B6","⛄":"#9B59B6","☄️":"#E67E22","🔥":"#E67E22","💧":"#3498DB","🌊":"#9B59B6","🎃":"#E67E22","🎄":"#11806A","🎆":"#9B59B6","🎇":"#992D22","🧨":"#992D22","✨":"#F1C40F","🎈":"#E74C3C","🎉":"#E67E22","🎊":"#E67E22","🎋":"#E67E22","🎍":"#E67E22","🎎":"#206694","🎏":"#E67E22","🎐":"#9B59B6","🎑":"#11806A","🧧":"#E74C3C","🎀":"#9B59B6","🎁":"#E67E22","🎗️":"#F1C40F","🎟️":"#E74C3C","🎫":"#F1C40F","🎖️":"#F1C40F","🏆":"#E67E22","🏅":"#F1C40F","🥇":"#F1C40F", "🥈":"#9B59B6","🥉":"#992D22","⚽":"#9B59B6","⚾":"#9B59B6","🥎":"#F1C40F","🏀":"#E67E22","🏐":"#9B59B6","🏈":"#E74C3C","🏉":"#E67E22","🎾":"#F1C40F","🥏":"#3498DB","🎳":"#9B59B6","🏏":"#F1C40F","🏑":"#9B59B6","🏒":"#E67E22","🥍":"#206694","🏓":"#E74C3C","🏸":"#E67E22","🥊":"#E74C3C","🥋":"#9B59B6","🥅":"#992D22","⛳":"#11806A","⛸️":"#9B59B6","🎣":"#607D8B","🤿":"#11806A","🎽":"#3498DB","🎿":"#3498DB","🛷":"#992D22","🥌":"#11806A","🎯":"#9B59B6","🪀":"#11806A","🪁":"#206694","🎱":"#11806A","🔮":"#9B59B6","🪄":"#9B59B6","🧿":"#206694","🪬":"#206694","🎮":"#11806A","🕹️":"#11806A","🎰":"#9B59B6","🎲":"#9B59B6","🧩":"#1ABC9C","🧸":"#E67E22","🪅":"#9B59B6","🪩":"#9B59B6","🪆":"#E67E22","♠️":"#607D8B","♥️":"#607D8B","♦️":"#607D8B","♣️":"#607D8B","♟️":"#607D8B","🃏":"#9B59B6","🀄":"#9B59B6","🎴":"#992D22","🎭":"#992D22","🖼️":"#F1C40F","🎨":"#E67E22","🧵":"#E67E22","🪡":"#206694","🧶":"#E67E22","🪢":"#206694","👓":"#9B59B6","🕶️":"#607D8B","🥽":"#9B59B6","🥼":"#9B59B6","🦺":"#E74C3C", "👔":"#3498DB","👕":"#3498DB","👖":"#206694","🧣":"#992D22","🧤":"#1ABC9C","🧥":"#E67E22","🧦":"#9B59B6","👗":"#1ABC9C","👘":"#E67E22","🥻":"#E67E22","🩱":"#11806A","🩲":"#11806A","🩳":"#E67E22","👙":"#9B59B6","👚":"#9B59B6","👛":"#9B59B6","👜":"#E74C3C","👝":"#992D22","🛍️":"#9B59B6","🎒":"#E74C3C","🩴":"#3498DB","👞":"#992D22","👟":"#9B59B6","🥾":"#992D22","🥿":"#206694","👠":"#E74C3C","👡":"#9B59B6","🩰":"#9B59B6","👢":"#E67E22","👑":"#E67E22","👒":"#E67E22","🎩":"#11806A","🎓":"#992D22","🧢":"#3498DB","🪖":"#11806A","⛑️":"#992D22","📿":"#992D22","💄":"#E74C3C","💍":"#9B59B6","💎":"#3498DB","🔇":"#11806A","🔈":"#11806A","🔉":"#607D8B","🔊":"#11806A","📢":"#9B59B6","📣":"#992D22","📯":"#E74C3C","🔔":"#992D22","🔕":"#992D22","🎼":"#9B59B6","🎵":"#11806A","🎶":"#11806A","🎙️":"#11806A","🎚️":"#9B59B6","🎛️":"#9B59B6","🎤":"#9B59B6","🎧":"#9B59B6","📻":"#E67E22","🎷":"#E67E22","🪗":"#992D22","🎸":"#E74C3C","🎹":"#607D8B","🎺":"#E67E22","🎻":"#992D22","🪕":"#9B59B6","🥁":"#E74C3C", "🪘":"#992D22","📱":"#607D8B","📲":"#607D8B","☎️":"#E74C3C","📞":"#11806A","📟":"#11806A","📠":"#9B59B6","🔋":"#11806A","🪫":"#9B59B6","🔌":"#11806A","💻":"#607D8B","🖥️":"#11806A","🖨️":"#607D8B","⌨️":"#9B59B6","🖱️":"#9B59B6","🖲️":"#11806A","💽":"#9B59B6","💾":"#11806A","💿":"#9B59B6","📀":"#9B59B6","🧮":"#992D22","🎥":"#11806A","🎞️":"#9B59B6","📽️":"#206694","🎬":"#11806A","📺":"#992D22","📷":"#11806A","📸":"#11806A","📹":"#607D8B","📼":"#11806A","🔍":"#11806A","🔎":"#11806A","🕯️":"#9B59B6","💡":"#9B59B6","🔦":"#607D8B","🏮":"#E74C3C","🪔":"#992D22","📔":"#F1C40F","📕":"#992D22","📖":"#206694","📗":"#E67E22","📘":"#206694","📙":"#E67E22","📚":"#11806A","📓":"#9B59B6","📒":"#F1C40F","📃":"#9B59B6","📜":"#9B59B6","📄":"#9B59B6","📰":"#9B59B6","🗞️":"#9B59B6","📑":"#9B59B6","🔖":"#9B59B6","🏷️":"#F1C40F","💰":"#E67E22","🪙":"#206694","💴":"#9B59B6","💵":"#9B59B6","💶":"#9B59B6","💷":"#9B59B6","💸":"#9B59B6","💳":"#9B59B6","🧾":"#9B59B6","💹":"#9B59B6","✉️":"#9B59B6","📧":"#9B59B6", "📨":"#9B59B6","📩":"#9B59B6","📤":"#3498DB","📥":"#3498DB","📦":"#E67E22","📫":"#206694","📪":"#3498DB","📬":"#607D8B","📭":"#11806A","📮":"#E74C3C","🗳️":"#3498DB","✏️":"#E67E22","✒️":"#11806A","🖋️":"#11806A","🖊️":"#11806A","🖌️":"#206694","🖍️":"#E74C3C","📝":"#9B59B6","💼":"#992D22","📁":"#9B59B6","📂":"#9B59B6","🗂️":"#E67E22","📅":"#E74C3C","📆":"#9B59B6","🗒️":"#9B59B6","🗓️":"#9B59B6","📇":"#9B59B6","📈":"#9B59B6","📉":"#9B59B6","📊":"#9B59B6","📋":"#9B59B6","📌":"#E74C3C","📍":"#E74C3C","📎":"#9B59B6","🖇️":"#9B59B6","📏":"#9B59B6","📐":"#9B59B6","✂️":"#9B59B6","🗃️":"#11806A","🗄️":"#206694","🗑️":"#9B59B6","🔒":"#E67E22","🔓":"#E67E22","🔏":"#9B59B6","🔐":"#E67E22","🔑":"#F1C40F","🗝️":"#11806A","🔨":"#9B59B6","🪓":"#992D22","⛏️":"#9B59B6","⚒️":"#11806A","🛠️":"#11806A","🗡️":"#9B59B6","⚔️":"#11806A","🔫":"#1ABC9C","🪃":"#E74C3C","🏹":"#9B59B6","🛡️":"#9B59B6","🪚":"#9B59B6","🔧":"#206694","🪛":"#1ABC9C","🔩":"#9B59B6","⚙️":"#9B59B6","🗜️":"#607D8B","⚖️":"#607D8B", "🦯":"#9B59B6","🔗":"#206694","⛓️":"#9B59B6","🪝":"#E67E22","🧰":"#E74C3C","🧲":"#E74C3C","🪜":"#992D22","⚗️":"#9B59B6","🧪":"#11806A","🧫":"#9B59B6","🧬":"#3498DB","🔬":"#9B59B6","🔭":"#9B59B6","📡":"#9B59B6","💉":"#9B59B6","🩸":"#E74C3C","💊":"#F1C40F","🩹":"#9B59B6","🩼":"#9B59B6","🩺":"#11806A","🩻":"#3498DB","🚪":"#992D22","🛗":"#3498DB","🪞":"#E67E22","🪟":"#992D22","🛏️":"#992D22","🛋️":"#3498DB","🪑":"#E74C3C","🚽":"#9B59B6","🪠":"#E74C3C","🚿":"#9B59B6","🛁":"#9B59B6","🪤":"#F1C40F","🪒":"#9B59B6","🧴":"#9B59B6","🧷":"#9B59B6","🧹":"#992D22","🧺":"#992D22","🧻":"#9B59B6","🪣":"#206694","🧼":"#1ABC9C","🫧":"#9B59B6","🪥":"#9B59B6","🧽":"#F1C40F","🧯":"#E74C3C","🛒":"#9B59B6","🚬":"#9B59B6","⚰️":"#992D22","🪦":"#9B59B6","⚱️":"#E67E22","🗿":"#206694","🪧":"#9B59B6","🪪":"#9B59B6","🏧":"#3498DB","🚮":"#9B59B6","🚰":"#9B59B6","♿":"#9B59B6","🚹":"#3498DB","🚺":"#9B59B6","🚻":"#607D8B","🚼":"#E67E22","🚾":"#9B59B6","🛂":"#9B59B6","🛃":"#9B59B6","🛄":"#9B59B6","🛅":"#9B59B6", "⚠️":"#F1C40F","🚸":"#F1C40F","⛔":"#9B59B6","🚫":"#E74C3C","🚳":"#11806A","🚭":"#E74C3C","🚯":"#E74C3C","🚱":"#E74C3C","🚷":"#E74C3C","📵":"#E74C3C","🔞":"#607D8B","☢️":"#E67E22","☣️":"#E67E22","⬆️":"#607D8B","↗️":"#607D8B","➡️":"#607D8B","↘️":"#607D8B","⬇️":"#607D8B","↙️":"#607D8B","⬅️":"#607D8B","↖️":"#607D8B","↕️":"#607D8B","↔️":"#607D8B","↩️":"#607D8B","↪️":"#607D8B","⤴️":"#607D8B","⤵️":"#607D8B","🔃":"#607D8B","🔄":"#607D8B","🔙":"#11806A","🔚":"#11806A","🔛":"#11806A","🔜":"#206694","🔝":"#11806A","🛐":"#9B59B6","⚛️":"#9B59B6","🕉️":"#9B59B6","✡️":"#9B59B6","☸️":"#9B59B6","☯️":"#9B59B6","✝️":"#9B59B6","☦️":"#9B59B6","☪️":"#9B59B6","☮️":"#9B59B6","🕎":"#9B59B6","🔯":"#9B59B6","♈":"#9B59B6","♉":"#9B59B6","♊":"#9B59B6","♋":"#9B59B6","♌":"#9B59B6","♍":"#9B59B6","♎":"#9B59B6","♏":"#9B59B6","♐":"#9B59B6","♑":"#9B59B6","♒":"#9B59B6","♓":"#9B59B6","⛎":"#9B59B6","🔀":"#607D8B","🔁":"#607D8B","🔂":"#607D8B","▶️":"#607D8B","⏩":"#607D8B","⏭️":"#607D8B","⏯️":"#607D8B","◀️":"#607D8B", "⏪":"#607D8B","⏮️":"#607D8B","🔼":"#607D8B","⏫":"#607D8B","🔽":"#607D8B","⏬":"#607D8B","⏸️":"#607D8B","⏹️":"#607D8B","⏺️":"#607D8B","⏏️":"#607D8B","🎦":"#607D8B","🔅":"#F1C40F","🔆":"#F1C40F","📶":"#9B59B6","📳":"#F1C40F","📴":"#9B59B6","♀️":"#607D8B","♂️":"#607D8B","⚧️":"#607D8B","✖️":"#11806A","➕":"#11806A","➖":"#11806A","➗":"#11806A","🟰":"#9B59B6","♾️":"#607D8B","‼️":"#607D8B","⁉️":"#E74C3C","❓":"#992D22","❔":"#9B59B6","❕":"#9B59B6","❗":"#992D22","〰️":"#11806A","💱":"#206694","💲":"#206694","⚕️":"#607D8B","♻️":"#11806A","⚜️":"#992D22","🔱":"#E67E22","📛":"#9B59B6","🔰":"#F1C40F","⭕":"#992D22","✅":"#11806A","☑️":"#206694","✔️":"#11806A","❌":"#E74C3C","❎":"#11806A","➰":"#11806A","➿":"#206694","〽️":"#F1C40F","✳️":"#11806A","✴️":"#9B59B6","❇️":"#11806A","©️":"#607D8B","®️":"#607D8B","™️":"#607D8B","#️⃣":"#607D8B","*️⃣":"#607D8B","0️⃣":"#607D8B","1️⃣":"#607D8B","2️⃣":"#607D8B","3️⃣":"#607D8B","4️⃣":"#607D8B","5️⃣":"#607D8B","6️⃣":"#607D8B","7️⃣":"#607D8B","8️⃣":"#607D8B", "9️⃣":"#607D8B","🔟":"#607D8B","🔠":"#607D8B","🔡":"#607D8B","🔢":"#607D8B","🔣":"#607D8B","🔤":"#607D8B","🅰️":"#E74C3C","🆎":"#E74C3C","🅱️":"#9B59B6","🆑":"#E74C3C","🆒":"#607D8B","🆓":"#607D8B",ℹ️:"#9B59B6","🆔":"#9B59B6","Ⓜ️":"#9B59B6","🆕":"#607D8B","🆖":"#607D8B","🅾️":"#E74C3C","🆗":"#607D8B","🅿️":"#3498DB","🆘":"#9B59B6","🆙":"#607D8B","🆚":"#9B59B6","🈁":"#607D8B","🈂️":"#3498DB","🈷️":"#9B59B6","🈶":"#9B59B6","🈯":"#9B59B6","🉐":"#9B59B6","🈹":"#9B59B6","🈚":"#9B59B6","🈲":"#9B59B6","🉑":"#9B59B6","🈸":"#9B59B6","🈴":"#E74C3C","🈳":"#9B59B6","㊗️":"#9B59B6","㊙️":"#9B59B6","🈺":"#9B59B6","🈵":"#9B59B6","🔴":"#992D22","🟠":"#F1C40F","🟡":"#F1C40F","🟢":"#11806A","🔵":"#206694","🟣":"#9B59B6","🟤":"#992D22","⚫":"#607D8B","⚪":"#9B59B6","🟥":"#E74C3C","🟧":"#E67E22","🟨":"#F1C40F","🟩":"#11806A","🟦":"#3498DB","🟪":"#9B59B6","🟫":"#9B59B6","⬛":"#11806A","⬜":"#9B59B6","◼️":"#607D8B","◻️":"#9B59B6","◾":"#607D8B","◽":"#9B59B6","▪️":"#607D8B","▫️":"#607D8B","🔶":"#F1C40F", "🔷":"#206694","🔸":"#E67E22","🔹":"#206694","🔺":"#E74C3C","🔻":"#E74C3C","💠":"#3498DB","🔘":"#206694","🔳":"#9B59B6","🔲":"#607D8B","🏁":"#9B59B6","🚩":"#992D22","🎌":"#9B59B6","🏴":"#11806A","🏳️":"#9B59B6","🏳️‍🌈":"#E67E22","🏳️‍⚧️":"#9B59B6","🏴‍☠️":"#11806A","🇦🇨":"#206694","🇦🇩":"#206694","🇦🇪":"#E74C3C","🇦🇫":"#E74C3C","🇦🇬":"#992D22","🇦🇮":"#206694","🇦🇱":"#992D22","🇦🇲":"#E74C3C","🇦🇴":"#607D8B","🇦🇶":"#206694","🇦🇷":"#3498DB","🇦🇸":"#9B59B6","🇦🇹":"#9B59B6","🇦🇺":"#206694","🇦🇼":"#3498DB","🇦🇽":"#206694","🇦🇿":"#E91E63","🇧🇦":"#F1C40F","🇧🇧":"#206694","🇧🇩":"#E74C3C","🇧🇪":"#F1C40F","🇧🇫":"#11806A","🇧🇬":"#992D22","🇧🇭":"#9B59B6","🇧🇮":"#11806A","🇧🇯":"#E74C3C","🇧🇱":"#9B59B6","🇧🇲":"#992D22","🇧🇳":"#F1C40F","🇧🇴":"#11806A","🇧🇶":"#206694","🇧🇷":"#F1C40F","🇧🇸":"#3498DB","🇧🇹":"#E67E22","🇧🇻":"#E74C3C","🇧🇼":"#3498DB","🇧🇾":"#11806A","🇧🇿":"#206694","🇨🇦":"#992D22","🇨🇨":"#11806A","🇨🇩":"#E74C3C","🇨🇫":"#11806A","🇨🇬":"#F1C40F", "🇨🇭":"#9B59B6","🇨🇮":"#E67E22","🇨🇰":"#206694","🇨🇱":"#E74C3C","🇨🇲":"#E74C3C","🇨🇳":"#992D22","🇨🇴":"#206694","🇨🇵":"#206694","🇨🇷":"#206694","🇨🇺":"#206694","🇨🇻":"#206694","🇨🇼":"#206694","🇨🇽":"#11806A","🇨🇾":"#9B59B6","🇨🇿":"#992D22","🇩🇪":"#E74C3C","🇩🇬":"#9B59B6","🇩🇯":"#11806A","🇩🇰":"#992D22","🇩🇲":"#E67E22","🇩🇴":"#206694","🇩🇿":"#11806A","🇪🇦":"#F1C40F","🇪🇨":"#F1C40F","🇪🇪":"#9B59B6","🇪🇬":"#9B59B6","🇪🇭":"#9B59B6","🇪🇷":"#11806A","🇪🇸":"#F1C40F","🇪🇹":"#11806A","🇪🇺":"#206694","🇫🇮":"#206694","🇫🇯":"#3498DB","🇫🇰":"#206694","🇫🇲":"#3498DB","🇫🇴":"#3498DB","🇫🇷":"#206694","🇬🇦":"#11806A","🇬🇧":"#206694","🇬🇩":"#11806A","🇬🇪":"#E74C3C","🇬🇫":"#11806A","🇬🇬":"#9B59B6","🇬🇭":"#11806A","🇬🇮":"#9B59B6","🇬🇱":"#992D22","🇬🇲":"#11806A","🇬🇳":"#F1C40F","🇬🇵":"#F1C40F","🇬🇶":"#11806A","🇬🇷":"#9B59B6","🇬🇸":"#206694","🇬🇹":"#3498DB","🇬🇺":"#206694","🇬🇼":"#F1C40F","🇬🇾":"#E67E22","🇭🇰":"#992D22","🇭🇲":"#206694", "🇭🇳":"#9B59B6","🇭🇷":"#206694","🇭🇹":"#E91E63","🇭🇺":"#11806A","🇮🇨":"#206694","🇮🇩":"#992D22","🇮🇪":"#11806A","🇮🇱":"#206694","🇮🇲":"#992D22","🇮🇳":"#9B59B6","🇮🇴":"#9B59B6","🇮🇶":"#607D8B","🇮🇷":"#992D22","🇮🇸":"#9B59B6","🇮🇹":"#992D22","🇯🇪":"#9B59B6","🇯🇲":"#11806A","🇯🇴":"#E74C3C","🇯🇵":"#9B59B6","🇰🇪":"#E74C3C","🇰🇬":"#E74C3C","🇰🇭":"#992D22","🇰🇮":"#E74C3C","🇰🇲":"#11806A","🇰🇳":"#E74C3C","🇰🇵":"#206694","🇰🇷":"#9B59B6","🇰🇼":"#1ABC9C","🇰🇾":"#206694","🇰🇿":"#1ABC9C","🇱🇦":"#E74C3C","🇱🇧":"#9B59B6","🇱🇨":"#3498DB","🇱🇮":"#206694","🇱🇰":"#E74C3C","🇱🇷":"#E74C3C","🇱🇸":"#9B59B6","🇱🇹":"#11806A","🇱🇺":"#E74C3C","🇱🇻":"#992D22","🇱🇾":"#E74C3C","🇲🇦":"#992D22","🇲🇨":"#9B59B6","🇲🇩":"#206694","🇲🇪":"#992D22","🇲🇫":"#206694","🇲🇬":"#E74C3C","🇲🇭":"#206694","🇲🇰":"#992D22","🇲🇱":"#F1C40F","🇲🇲":"#F1C40F","🇲🇳":"#206694","🇲🇴":"#11806A","🇲🇵":"#9B59B6","🇲🇶":"#206694","🇲🇷":"#E74C3C","🇲🇸":"#206694","🇲🇹":"#9B59B6", "🇲🇺":"#E74C3C","🇲🇻":"#11806A","🇲🇼":"#992D22","🇲🇽":"#9B59B6","🇲🇾":"#9B59B6","🇲🇿":"#E67E22","🇳🇦":"#E74C3C","🇳🇨":"#E67E22","🇳🇪":"#11806A","🇳🇫":"#9B59B6","🇳🇬":"#9B59B6","🇳🇮":"#5865F2","🇳🇱":"#206694","🇳🇴":"#E74C3C","🇳🇵":"#992D22","🇳🇷":"#206694","🇳🇺":"#F1C40F","🇳🇿":"#206694","🇴🇲":"#11806A","🇵🇦":"#206694","🇵🇪":"#9B59B6","🇵🇫":"#992D22","🇵🇬":"#E74C3C","🇵🇭":"#992D22","🇵🇰":"#11806A","🇵🇱":"#E74C3C","🇵🇲":"#206694","🇵🇳":"#206694","🇵🇷":"#992D22","🇵🇸":"#9B59B6","🇵🇹":"#E74C3C","🇵🇼":"#F1C40F","🇵🇾":"#9B59B6","🇶🇦":"#9B59B6","🇷🇪":"#E74C3C","🇷🇴":"#F1C40F","🇷🇸":"#206694","🇷🇺":"#992D22","🇷🇼":"#F1C40F","🇸🇦":"#11806A","🇸🇧":"#11806A","🇸🇨":"#11806A","🇸🇩":"#9B59B6","🇸🇪":"#F1C40F","🇸🇬":"#E74C3C","🇸🇭":"#206694","🇸🇮":"#E74C3C","🇸🇯":"#E74C3C","🇸🇰":"#992D22","🇸🇱":"#9B59B6","🇸🇲":"#9B59B6","🇸🇳":"#F1C40F","🇸🇴":"#3498DB","🇸🇷":"#11806A","🇸🇸":"#E74C3C","🇸🇹":"#E67E22","🇸🇻":"#9B59B6","🇸🇽":"#E74C3C", "🇸🇾":"#992D22","🇸🇿":"#992D22","🇹🇦":"#206694","🇹🇨":"#206694","🇹🇩":"#F1C40F","🇹🇫":"#206694","🇹🇬":"#11806A","🇹🇭":"#992D22","🇹🇯":"#E91E63","🇹🇰":"#F1C40F","🇹🇱":"#E74C3C","🇹🇲":"#11806A","🇹🇳":"#992D22","🇹🇴":"#992D22","🇹🇷":"#E74C3C","🇹🇹":"#992D22","🇹🇻":"#607D8B","🇹🇼":"#3498DB","🇹🇿":"#11806A","🇺🇦":"#F1C40F","🇺🇬":"#607D8B","🇺🇲":"#E74C3C","🇺🇳":"#3498DB","🇺🇸":"#E74C3C","🇺🇾":"#9B59B6","🇺🇿":"#1ABC9C","🇻🇦":"#9B59B6","🇻🇨":"#F1C40F","🇻🇪":"#206694","🇻🇬":"#206694","🇻🇮":"#9B59B6","🇻🇳":"#992D22","🇻🇺":"#11806A","🇼🇫":"#E74C3C","🇼🇸":"#E74C3C","🇽🇰":"#206694","🇾🇪":"#E74C3C","🇾🇹":"#9B59B6","🇿🇦":"#E67E22","🇿🇲":"#11806A","🇿🇼":"#11806A","🏴󠁧󠁢󠁥󠁮󠁧󠁿":"#992D22","🏴󠁧󠁢󠁳󠁣󠁴󠁿":"#206694","🏴󠁧󠁢󠁷󠁬󠁳󠁿":"#11806A"}},7602:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(318715),o=n(829816);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,r.ZP)([o.Z],(function(){return o.Z.getGuildChannelEmojis(e,t) }))}},630203:(e,t,n)=>{"use strict";n.d(t,{_:()=>F,Z:()=>G});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(202351),c=n(707961),s=n(77413),f=n(679724),d=n(859853),p=n(621647),h=n(773011),y=n(239813),b=n(201521),v=n(491260),m=n(788169),g=n(473903),O=n(319086),E=n(971611),C=n(362660),j=n(310126),S=n(2590),I=n(411325),_=n.n(I);function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){ var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name) ;return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}var R={SELECTED:_().modeSelected,CONNECTED:_().modeConnected,UNREAD_HIGHLIGHT:_().modeUnread,UNREAD:_().modeUnreadNormal,MUTED:_().modeMuted,LOCKED:_().modeLocked};function L(e){e.stopPropagation()}function D(e){switch(e){case S.d4z.GUILD_STAGE_VOICE:case S.d4z.GUILD_VOICE:return _().typeVoice;case S.d4z.ANNOUNCEMENT_THREAD:case S.d4z.PUBLIC_THREAD:case S.d4z.PRIVATE_THREAD:return _().typeThread;case S.d4z.GUILD_ANNOUNCEMENT:case S.d4z.GUILD_TEXT:case S.d4z.GUILD_STORE:case S.d4z.GUILD_FORUM:default:return _().typeDefault}}var k=j.default.getEnableHardwareAcceleration()?c.Xo$:c.qEK;function U(e){var t=e.channel;return(0,r.jsx)(k,{src:(0,p.x)(t),"aria-hidden":!0,size:c.EFr.SIZE_20})}function B(e){var t=e.channel,n=(0,u.e7)([g.default],(function(){return g.default.getUser(null==t?void 0:t.recipients[0])})),o=(0,u.e7)([m.Z],(function(){ return null!=n&&null!=t&&!t.isMultiUserDM()&&null!=m.Z.getTypingUsers(null==t?void 0:t.id)[null==n?void 0:n.id]})),i=(0,u.cj)([v.Z],(function(){return null==n||null==t||t.isMultiUserDM()?{status:null,isMobile:!1}:{status:v.Z.getStatus(n.id),isMobile:v.Z.isMobileOnline(n.id)}})),a=i.status,l=i.isMobile;return(0,r.jsx)(k,{size:c.EFr.SIZE_20,src:null==n?void 0:n.getAvatarURL(void 0,40),status:a,isMobile:l,isTyping:o,"aria-label":null==n?void 0:n.username,statusTooltip:!0})}var F=function(e){var t=e.className,n=e.channel,o=e.guild,i=e.locked,l=e.hasActiveThreads,u=function(e,t,n){switch(e.type){case S.d4z.DM:return function(){return(0,r.jsx)(B,{channel:e})};case S.d4z.GROUP_DM:return function(){return(0,r.jsx)(U,{channel:e})};default:return(0,y.KS)(e,t,n)}}(n,o,{locked:i,hasActiveThreads:l});if(null==u)return null;var s=(0,y.bT)(n,o,i,l);return(0,r.jsx)(c.ua7,{text:s,delay:500,children:function(e){return(0,r.jsx)("div",N(P({},e),{role:"img",className:_().iconContainer,children:(0, r.jsx)(u,{className:a()(_().icon,t)})}))}})};function G(e){var t,n,i,u=e.channel,p=e.name,y=e.muted,v=e.selected,m=e.connected,g=e.unread,j=e.canHaveDot,I=e.mentionCount,w=e.relevant,M=e.locked,k=e.hasActiveThreads,U=e.onClick,B=e.onMouseDown,G=e.onMouseUp,H=e.onContextMenu,V=e.connectDragPreview,W=e.className,z=e.iconClassName,Y=e.subtitle,K=e.subtitleColor,q=e.channel.type,Q=e.onMouseEnter,X=e.onMouseLeave,J=e["aria-label"],$=e.children,ee=e.guild,te=e.channelTypeOverride,ne=e.forceInteractable,re=e.isFavoriteSuggestion,oe=e.emojiAndColor,ie=(0,l.JA)(u.id),ae=(ie.role,A(ie,["role"])),le=o.useRef(null),ue=o.useRef(null),ce=(0,b.Z)(u),se=S.Z5c.CHANNEL(ce,u.id),fe=(0,h.ZP)(u),de=u.isGuildVocal(),pe=de&&!m,he=f._.useExperiment({}),ye=he.enabled,be=he.left,ve=o.useContext(d.S).reducedMotion.enabled,me=T(o.useState([]),2),ge=me[0],Oe=me[1];t=ge.length,n=500,i=function(){Oe([])},o.useLayoutEffect((function(){var e=null;if(t>0){clearTimeout(e);e=setTimeout((function(){i();clearTimeout(e) }),4*n)}return function(){return clearTimeout(e)}}),[t,n,i]);var Ee,Ce,je=null!=oe?(0,C.Cj)(oe[1],.16):void 0,Se=o.useMemo((function(){return null!=oe?(0,r.jsx)(s.Z,{emojiName:oe[0],className:_().twemoji}):null}),[oe]),Ie=(0,r.jsxs)("div",{className:a()(_().content,x({},_().favoriteSuggestion,re)),ref:ue,children:[ye&&null!=oe&&(0,r.jsx)("div",{className:_().emojiColorFill,style:{backgroundColor:je,opacity:v?1:0}}),(0,r.jsxs)(O.Z,N(P({role:pe?"button":"link",href:de?void 0:se,ref:le,className:a()(_().mainContent,x({},_().mainContentWithChannelEmoji,null!=oe)),onMouseDown:function(e){ye&&0===e.button&&function(e){if(!ve){var t=e.currentTarget.getBoundingClientRect(),n=t.width>t.height?t.width:t.height,r={x:e.pageX-t.x-n/2,y:e.pageY-t.y-n/2,size:n};Oe(Z(ge).concat([r]))}}(e)},onClick:function(){return null==U?void 0:U(u)}},ae),{"aria-label":J,focusProps:{enabled:!1},children:[null!=oe&&be&&(0,r.jsx)("div",{className:a()(_().channelEmoji,_().channelEmojiLeftOfIcon),style:{ backgroundColor:je},children:Se}),(0,r.jsx)(F,{className:z,channel:u,guild:ee,hasActiveThreads:k,locked:M}),null!=oe&&!be&&(0,r.jsx)("div",{className:a()(_().channelEmoji,_().channelEmojiRightOfIcon),style:{backgroundColor:je},children:Se}),(0,r.jsxs)(E.Z,{className:a()(_().name,_().channelName),"aria-hidden":!0,children:[null==p?fe:p,null!=Y&&""!==Y?(0,r.jsx)(c.xvT,{color:null!=K?K:"text-muted",variant:"text-xs/medium",className:_().subtitle,children:Y}):null]})]})),o.Children.count($)>0?(0,r.jsx)("div",{onClick:L,className:_().children,children:$}):null,ye&&ge.length>0&&ge.map((function(e,t){return(0,r.jsx)("span",{className:_().ripple,style:{top:e.y,left:e.x,width:e.size,height:e.size,backgroundColor:null!=oe?oe[1]:"#607D8B",animationDuration:"".concat(500,"ms"),opacity:.36}},"ripple-".concat(t))}))]}),_e=null!=U||null!=G||null!=B||ne;return(0,r.jsx)(c.tEY,{focusTarget:le,ringTarget:ue,offset:{top:2,bottom:2,right:4},children:(0,r.jsxs)("div",{ className:a()(W,_e?_().wrapper:_().notInteractive,(Ce=null!=oe,v&&!Ce?R.SELECTED:m?R.CONNECTED:M?R.LOCKED:y?R.MUTED:g?w||null!=I&&I>0?R.UNREAD_HIGHLIGHT:R.UNREAD:null),D(null!=te?te:q)),onMouseUp:function(e){return null==G?void 0:G(e,u)},onMouseDown:function(e){return null==B?void 0:B(e,u)},onContextMenu:function(e){return null==H?void 0:H(e,u)},onMouseEnter:Q,onMouseLeave:X,children:[y||!j||!g||v&&!de?null:(0,r.jsx)("div",{className:a()(_().unread,(w||I)&&_().unreadRelevant)}),null!==(Ee=null==V?void 0:V(Ie))&&void 0!==Ee?Ee:Ie]})})}},125680:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(641277),u=n(639115),c=n.n(u);function s(e){var t=e.className,n=e.embeddedApps;if(n.length<=0)return null;if(1===n.length)return(0,r.jsx)("div",{className:i()(c().container,t),children:(0,r.jsx)(l.Z,{game:n[0].application,className:c().icon24px})});var o=n.length-1;return(0,r.jsxs)("div",{className:i()(c().container,t),children:[(0,r.jsx)(l.Z,{ game:n[0].application,className:c().icon20px}),2===n.length?(0,r.jsx)(l.Z,{game:n[1].application,className:c().icon20px}):(0,r.jsx)(a.xvT,{className:c().overflow,variant:"text-xs/bold",color:"interactive-active",children:"+".concat(o)})]})}},811182:(e,t,n)=>{"use strict";n.d(t,{j:()=>ku,E:()=>Uu});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(798159),u=n(457217),c=n(202351),s=n(707961),f=n(216151),d=n(217458),p=n(213276),h=n(316878),y=n(153686),b=n(19585),v=n(294184),m=n.n(v),g=n(248088),O=n(971402),E=n(396043),C=n(703790),j=n(682776),S=n(718831),I=n(930865),_=n(744564);function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function P(e){P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return P(e)}function N(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function A(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e,t){T=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return T(e,t)}var Z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{ Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A(this,n)}}var R={},L=function(e){var t=e.guildId,n=e.premiumCount;R=N(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)}(e),o=(0,Te.W)(e.id),i=(0,ke.m)(e.id),a=Ze.Z.useExperiment({}).landOnHome,l=(0,c.e7)([Me.ZP],(function(){return Me.ZP.shouldShowOnboarding(e.id)})),u=(0,Le.g)(e.id),s=(0, re.Ks)(e.id),f=Re.Z.getNewMemberActions(e.id),d=(0,De.Z)(e.id),p=[],h=e.hasFeature(F.oNc.HUB),y=e.hasFeature(F.oNc.COMMUNITY);h&&p.push(_e.f.GUILD_HUB_HEADER_OPTIONS);if(l&&a)return p;e.premiumProgressBarEnabled&&p.push(_e.f.GUILD_PREMIUM_PROGRESS_BAR);u&&d&&null!=f&&f.length>0&&p.push(_e.f.GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR);h||!n&&!u||p.push(_e.f.GUILD_HOME);r&&!t&&p.push(_e.f.GUILD_SCHEDULED_EVENTS);s&&y&&p.push(_e.f.CHANNELS_AND_ROLES);i&&p.push(_e.f.GUILD_ROLE_SUBSCRIPTIONS);o&&p.push(_e.f.GUILD_MEMBER_APPLICATIONS);return p}var He=n(786522),Ve=n(791216),We=n(660177),ze=n(630631),Ye=n(327499),Ke=n(910878),qe=n(777158),Qe=n(963985),Xe=n(968968),Je=n(877475),$e=n(567403),et=n(90692);function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&i2&&void 0!==arguments[2]&&arguments[2];if(null==e)return 0;var r=null;t.filter((function(t){var r=t.channel.type;return null!=e&&(n||rt(e.type,r)) })).find((function(t,n){var o=t.channel.id;if(null!=e&&o===e.id){r=n;return!0}return!1}));return r}function at(e){return{referenceId:e.id,parentId:e.parent_id}}function lt(e,t,n,r,o){if(null==e||null==n)return null;var i=F.d4z.GUILD_CATEGORY;return e.type===i?r===t||rt?function(e,t,n){var r,o=F.d4z.GUILD_CATEGORY,i=n[(null!==(r=it(t,n,!0))&&void 0!==r?r:0)+1],a=ot(-1,t.id,e.type,n);return null==a||a.channel.id===e.id?null:null==i||i.channel.type===o?{referenceId:a.channel.id,parentId:null}:null}(e,n,o):null:rt(e.type,n.type)?at(n):r0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?l:u,r,(function(e){var t=e.channel.type;return(0,ye.r8)(t)}));o=it(e,f);i=it(t,f);c(f)}if(e.isGuildVocal()||e.isCategory()){var d=(0,qe.Z)(l.length>0?l:u,r,(function(e){return e.channel.isGuildVocal()}));o=it(e,d);i=it(t,d);c(d)} if(e.parent_id!==n){var p=!1;a.find((function(t){if(t.id===e.id){t.parent_id=n;return p=!0}return!1}));p||a.push({id:e.id,parent_id:n})}return a}(a,bt(n,i.referenceId),i.parentId,l);if(0!==c.length)if(n!==F.I_8){c=c.filter((function(e){var t=e.id,n=ie.Z.getChannel(t);if(null==n)return!1;var r=ie.Z.getChannel(n.parent_id);return n.type===F.d4z.GUILD_CATEGORY||null==r?j.Z.can(F.Plq.MANAGE_CHANNELS,u):j.Z.can(F.Plq.MANAGE_CHANNELS,r)}));var f;a.parent_id!==i.parentId&&c.find((function(e){if(e.id!==a.id)return!1;var t=ie.Z.getChannel(e.parent_id);if(!(null!=t&&j.Z.can(F.Plq.MANAGE_ROLES,a)&&j.Z.can(F.Plq.MANAGE_ROLES,t)))return!0;var n=ut.ZP.areChannelsLocked(a,t),r=ut.ZP.areChannelsLocked(a,ie.Z.getChannel(a.parent_id));(null==a.parent_id&&!n||r&&!n)&&(f=e);return!0}));if(null!=f){var d=ie.Z.getChannel(f.parent_id);null!=d&&(0,s.h7j)((function(e){return(0,r.jsx)(Ke.default,pt(dt({},e),{channel:a,category:d,onConfirm:function(){if(null!=f){f.lock_permissions=!0;Ye.Z.batchChannelUpdate(n,c) }},onCancel:function(){null!=f&&Ye.Z.batchChannelUpdate(n,c)}}))}))}else Ye.Z.batchChannelUpdate(n,c)}else(0,Qe.s3)(c)}}}},canDrop:function(e,t){var n=t.getItem(),r=ie.Z.getChannel(n.id);if(null==r)return!1;var o=lt(ie.Z.getChannel(n.id),n.position,e.channel,e.position,n.channelList);if(null==o)return!1;if(ge.Z.getGuildId()===F.I_8)return!0;var i=$e.Z.getGuild(n.guildId);if(null==i)return!1;var a=ie.Z.getChannel(o.parentId),l=ie.Z.getChannel(r.parent_id),u=j.Z.can(F.Plq.MANAGE_CHANNELS,i),c=null!=l?j.Z.can(F.Plq.MANAGE_CHANNELS,l):u,s=null!=a?j.Z.can(F.Plq.MANAGE_CHANNELS,a):u;return c&&s}},(function(e,t){var n=t.getItem();return null==n||null==n.isChannelDrag?{connectChannelDropTarget:e.dropTarget(),sorting:!1,sortingType:null,sortingPosition:null,sortingParent:null}:{connectChannelDropTarget:e.dropTarget(),sorting:!0,sortingType:n.type,sortingPosition:t.isOver()&&t.canDrop()?n.position:null,sortingParent:t.isOver()&&t.canDrop()?n.parentId:null}}))((0,We.E)(yt,{canDrag:function(e){ var t=e.channel;if(ge.Z.getGuildId()===F.I_8)return!0;var o=$e.Z.getGuild(t.getGuildId());if(null==o)return!1;if((0,re.r1)(o.id)&&j.Z.can(F.Plq.MANAGE_CHANNELS,o)){"true"===ze.Z.get("doNotShowReorderModal")||(0,s.ZDy)(st((function(){var e,t;return ht(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(18359)]).then(n.bind(n,518359))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,dt({},e))}]}}))})));return!1}if(t.type===F.d4z.GUILD_CATEGORY)return j.Z.can(F.Plq.MANAGE_CHANNELS,o)&&!(0,re.r1)(o.id);var i=ie.Z.getChannel(t.parent_id);return null!=i&&j.Z.can(F.Plq.MANAGE_CHANNELS,i)||null==i&&j.Z.can(F.Plq.MANAGE_CHANNELS,o)},beginDrag:function(e){var t=e.channel,n=t.id,r=t.parent_id,o=t.guild_id,i=t.type,a=e.position,l=ge.Z.getGuildId(),u=Je.Z.getCategories(l),c=(0,qe.Z)(u._categories,u,(function(e){var t=e.channel ;return t.type===F.d4z.GUILD_CATEGORY&&null!=u[t.id]&&0===u[t.id].length?l===F.I_8||j.Z.can(F.Plq.MANAGE_CHANNELS,t)&&j.Z.can(F.Plq.VIEW_CHANNEL,t):!Xe.Z.isCollapsed(t.parent_id)}));return{isChannelDrag:!0,id:n,position:a,parentId:r,type:i,channelList:c,guildId:o}}},(function(e){return{connectChannelDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}}))(e))}var mt=n(9430),gt=n(971611),Ot=n(127661),Et=n(613665),Ct=n(795909),jt=n(796938),St=n(202237),It=n(627001);var _t=n(559836),wt=n.n(_t);function xt(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Pt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xt(i,r,o,a,l,"next",e)}function l(e){xt(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Nt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function At(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e) ;for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Mt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]p?wt().containerDragAfter:wt().containerDragBefore:wt().containerDefault;var E,C=o.useCallback((function(){v?(0,He.mJ)(i.id):(0,He.c4)(i.id)}),[i.id,v]),S=o.useCallback((function(e){if("null"!==i.id){var t=$e.Z.getGuild(i.getGuildId());null!=t&&(0,O.jW)(e,Pt((function(){var e,o;return Mt(this,(function(a){switch(a.label){case 0: return[4,n.e(96006).then(n.bind(n,696006))];case 1:e=a.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,Tt(At({},e),{channel:i,guild:t}))}]}}))})))}}),[i]),I=o.useCallback((function(){var e=i.type===F.d4z.GUILD_CATEGORY?null:i.type,t=i.getGuildId();null!=t&&(0,s.ZDy)(Pt((function(){var o,a;return Mt(this,(function(l){switch(l.label){case 0:return[4,Promise.all([n.e(40532),n.e(94805),n.e(14929)]).then(n.bind(n,394805))];case 1:o=l.sent(),a=o.default;return[2,function(n){return(0,r.jsx)(a,Tt(At({},n),{channelType:e,guildId:t,categoryId:"null"!==i.id?i.id:null}))}]}}))})))}),[i]),_=(0,u.JA)(i.id),w=(_.role,_.tabIndex),x=Zt(_,["role","tabIndex"]),P=o.useRef(null),N=o.useRef(null),A=(0,r.jsxs)("li",{className:t,"data-dnd-name":i.name,children:[(0,r.jsx)(s.tEY,{focusTarget:P,ringTarget:N,offset:{left:4,right:4},children:(0,r.jsxs)("div",{ref:N,className:m()(wt().iconVisibility,wt().wrapper,(E={},Nt(E,wt().collapsed,v),Nt(E,wt().muted,b),Nt(E,wt().clickable,!0),E)),onContextMenu:S, children:[(0,r.jsxs)(s.P3F,Tt(At({innerRef:P,className:wt().mainContent,tabIndex:w},x),{onClick:C,"aria-label":G.Z.Messages.CATEGORY_A11Y_LABEL.format({categoryName:i.name}),"aria-expanded":!v,focusProps:{enabled:!1},children:[h?null:(0,r.jsx)(Et.Z,{className:wt().icon}),(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:i.name})})]})),(0,r.jsx)("div",{onClick:Rt,className:wt().children,children:g&&!f?(0,r.jsx)(s.ua7,{text:G.Z.Messages.CREATE_CHANNEL,children:function(e){var t=e.onMouseEnter,n=e.onMouseLeave;return(0,r.jsx)(s.zxk,{"aria-label":G.Z.Messages.CREATE_CHANNEL,look:s.zxk.Looks.BLANK,size:s.zxk.Sizes.NONE,className:m()(wt().addButton,wt().forceVisible),onClick:I,onMouseEnter:t,onMouseLeave:n,tabIndex:w,focusProps:{offset:{top:-3,right:-4,bottom:-3,left:-4}},children:(0,r.jsx)(Ct.Z,{className:wt().addButtonIcon})})}}):null})]})}),y]});return null!=l&&null!=a?l(a(A)):A})));var Dt=o.memo((function(e){var t=e.name,n=e.onDismiss,o=e.className;return(0, r.jsx)("li",{className:m()(o,wt().containerDefault),children:(0,r.jsxs)("div",{className:m()(wt().iconVisibility,wt().wrapperStatic),children:[(0,r.jsx)("div",{className:wt().mainContent,children:(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:t})})}),null!=n?(0,r.jsx)(s.DY3,{text:G.Z.Messages.CLEAR_RECENT_CHANNELS,className:wt().dismissWrapper,children:(0,r.jsx)(s.P3F,{className:wt().dismissButton,onClick:n,children:(0,r.jsx)(Ot.Z,{className:wt().dismiss})})}):null]})})})),kt=o.memo((function(e){var t=e.category,n=(0,c.e7)([It.Z],(function(){return It.Z.isVoiceCategoryCollapsed(t.guild.id)})),i=o.useCallback((function(){n?(e=t.guild.id,_.Z.dispatch({type:"VOICE_CATEGORY_EXPAND",guildId:e,expand:!0})):function(e){_.Z.dispatch({type:"VOICE_CATEGORY_COLLAPSE",guildId:e,expand:!1})}(t.guild.id);var e}),[t.guild.id,n]);return n?(0,r.jsxs)(s.P3F,{className:wt().voiceChannelsButton,onClick:i,children:[(0,r.jsx)(jt.Z,{className:wt().voiceChannelsToggleIcon,width:16, height:16}),(0,r.jsx)(s.xvT,{variant:"text-sm/medium",children:G.Z.Messages.VOICE_CHANNELS_CATEGORY_BUTTON_EXPAND})]}):(0,r.jsxs)(s.P3F,{className:wt().voiceChannelsButton,onClick:i,children:[(0,r.jsx)(jt.Z,{className:wt().voiceChannelsToggleIcon,width:16,height:16}),(0,r.jsx)(s.xvT,{variant:"text-sm/medium",children:G.Z.Messages.VOICE_CHANNELS_CATEGORY_BUTTON_COLLAPSE})]})})),Ut=o.memo((function(e){var t=e.category,n=e.channel,o=(0,c.e7)([It.Z],(function(){return It.Z.isVoiceCategoryCollapsed(t.guild.id)}));return o||null==n||n.record.type===F.d4z.GUILD_CATEGORY?o?(0,r.jsx)("li",{className:m()(wt().containerDefault),children:(0,r.jsx)("div",{className:m()(wt().iconVisibility,wt().wrapperStatic),children:(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:G.Z.Messages.VOICE_CHANNELS_CATEGORY_HEADER})})})}):null:(0,r.jsx)("div",{style:{height:16}})})),Bt=o.memo((function(e){var t=e.channel;return(0,r.jsx)("li",{className:m()(wt().containerDefault),children:(0, r.jsx)("div",{className:m()(wt().iconVisibility,wt().wrapperStatic),children:(0,r.jsx)(St.Z,{className:wt().name,children:(0,r.jsx)(gt.Z,{children:t.name})})})})})),Ft=n(736543),Gt=n(37689),Ht=34,Vt=32,Wt={origin:{x:-36,y:7},targetWidth:232,targetHeight:40,offset:{x:0,y:0}},zt=n(797323),Yt=n.n(zt);function Kt(e,t,n){if(e===je.zm)return 12;if(e===je.wd)return t.hasFeature(F.oNc.HUB)?0:12;if(e===n.voiceChannelsSectionNumber){var r,o=n.getCategoryFromSection(e);if(null==o||o.isEmpty())return 0;if(o.isCollapsed)return 52;var i=null===(r=n.getChannelFromSectionRow(e,0))||void 0===r?void 0:r.channel;return null==i||i.record.type===F.d4z.GUILD_CATEGORY?12:28}return 40}function qt(e,t){switch(e){case je.zm:return"hoisted-spacer";case je.wd:return"uncategorized-spacer";case je.p2:return"favorites";case t.recentsSectionNumber:return"recents-header";case t.voiceChannelsSectionNumber:return"voice-channels-header";default:var n=t.getNamedCategoryFromSection(e) ;return null!=n?"category-".concat(n.id):"section-".concat(e)}}const Qt=o.memo((function(e){var t=e.sectionIndex,n=e.guild,i=e.guildChannels,a=e.guildChannelsVersion,l=e.selectedChannelId,u=e.disableManageChannels,c=o.useCallback((function(){var e=i.getCategoryFromSection(i.recentsSectionNumber);if(null!=e){var t=null,r=e.getShownChannelAndThreadIds();null!=l&&r.includes(l)&&(t=(0,ne.KY)(i));(0,ne.Uo)(n.id,r,t)}}),[n.id,l,i,a]);switch(t){case je.zm:return(0,r.jsx)("div",{style:{height:12}});case je.wd:return n.hasFeature(F.oNc.HUB)?null:(0,r.jsx)("div",{style:{height:12}});case je.p2:return(0,r.jsx)(Dt,{name:G.Z.Messages.FAVORITES});case i.recentsSectionNumber:return(0,r.jsx)(Dt,{name:G.Z.Messages.RECENTS_CATEGORY_HEADER,onDismiss:c});case i.voiceChannelsSectionNumber:var s,f=i.getCategoryFromSection(i.voiceChannelsSectionNumber);if(null==f||f.isEmpty())return null;var d=null===(s=i.getChannelFromSectionRow(t,0))||void 0===s?void 0:s.channel;return(0,r.jsxs)(o.Fragment,{children:[(0, r.jsx)("div",{className:Yt().sectionDivider}),(0,r.jsx)(Ut,{category:f,channel:d})]});case je.wF:var p=i.getNamedCategoryFromSection(t);return null==p?null:(0,r.jsx)(Lt,{channel:p.record,position:p.position,disableManageChannels:u,children:(0,r.jsx)(Ft.Z,{inlineSpecs:Wt,arrowAlignment:Gt.cy.TOP,tutorialId:"organize-by-topic",position:"right"})});default:var h=i.getNamedCategoryFromSection(t);return null==h?null:(0,r.jsx)(Lt,{channel:h.record,position:h.position,disableManageChannels:u})}}));var Xt=n(87127),Jt=n(269300),$t=n(15970),en=n(347834),tn=n(766496),nn=n(177570),rn=n(621329),on=n(189865),an=n(466317),ln=n(226919),un=n(267682),cn=n.n(un);function sn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function fn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){sn(i,r,o,a,l,"next",e)}function l(e){sn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function dn(e,t){ if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function hn(e){hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return hn(e)}function yn(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]t?cn().containerDragAfter:cn().containerDragBefore}function Sn(e){var t=e.channel,n=e.disableManageChannels,o=e.tabIndex,i=function(){Xt.ZP.open(t.id)};return(0,c.e7)([j.Z,ge.Z],(function(){return n||ge.Z.getGuildId()===F.I_8||!j.Z.can(F.Plq.MANAGE_CHANNELS,t)&&!j.Z.can(F.Plq.MANAGE_ROLES,t)&&!j.Z.can(F.Plq.MANAGE_WEBHOOKS,t)||(0,ye.r8)(t.type)&&!j.Z.can(F.Plq.VIEW_CHANNEL,t)||t.isGuildVocal()&&!j.Z.can(F.Plq.CONNECT,t)||!ye.dF.has(t.type)}))?null:(0,r.jsx)(s.ua7,{text:G.Z.Messages.EDIT_CHANNEL,spacing:2,children:function(e){var t=e.onMouseEnter,n=e.onMouseLeave,a=e.onFocus,l=e.onBlur;return(0,r.jsx)(s.P3F,{className:cn().iconItem,onClick:i,tabIndex:o,"aria-label":G.Z.Messages.EDIT_CHANNEL,onMouseEnter:t,onMouseLeave:n,onFocus:a,onBlur:l,children:(0,r.jsx)(an.Z,{width:16,height:16,className:cn().actionIcon})})}})}function In(e){ var t=e.channel,o=e.isDefaultChannel,i=void 0!==o&&o,a=e.locked,l=e.tabIndex,u=function(){if(null!=f){var e=nn.Z.getAllActiveStreams().filter((function(e){return e.state!==F.jm8.ENDED&&e.channelId===t.id}));(0,s.ZDy)(fn((function(){var o,i;return En(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,bn(yn({},n),{guild:f,channel:t,streamUserId:1===e.length?e[0].ownerId:null,source:F.t4x.GUILD_CHANNELS,guildScheduledEvent:p}))}]}}))})))}},f=(0,c.e7)([$e.Z],(function(){return $e.Z.getGuild(t.getGuildId())})),d=(0,c.e7)([tn.Z],(function(){return tn.Z.getStageInstanceByChannel(t.id)}),[t.id]),p=(0,c.e7)([Jt.ZP],(function(){return Jt.ZP.getActiveEventByChannel(t.id)}),[t.id]),h=(0,c.e7)([j.Z],(function(){return(0,$t.b)(j.Z,f,t,d)})),y=(0,c.e7)([j.Z],(function(){ return j.Z.can(F.Plq.CREATE_INSTANT_INVITE,t)?G.Z.Messages.CREATE_INSTANT_INVITE:G.Z.Messages.INVITE_TO_SERVER}));if(a||!h)return null;var b=(0,r.jsx)(ln.Z,{width:16,height:16,className:cn().actionIcon,"aria-hidden":!0});i&&(b=(0,r.jsx)(Ft.Z,{tutorialId:"instant-invite",position:"left",children:(0,r.jsx)("div",{children:b})}));return(0,r.jsx)(s.ua7,{text:y,spacing:2,children:function(e){return(0,r.jsx)(s.P3F,bn(yn({className:cn().iconItem},e),{onClick:u,tabIndex:l,"aria-label":y,children:b}))}})}function _n(e){var t=e.channel,n=function(){(0,en._U)(t.guild_id,t.id)};return(0,r.jsx)(s.ua7,{text:G.Z.Messages.REMOVE_FAVORITE_SUGGESTION,spacing:2,children:function(e){return(0,r.jsx)(s.P3F,bn(yn({className:cn().iconItem},e),{onClick:n,"aria-label":G.Z.Messages.REMOVE_FAVORITE_SUGGESTION,children:(0,r.jsx)(on.Z,{width:16,height:16,className:cn().actionIcon})}))}})}function wn(e){var t=e.channel,n=function(){(0,en.dM)(t.guild_id,t.id,!0,{section:F.jXE.CHANNEL_LIST})};return(0,r.jsx)(s.ua7,{ text:G.Z.Messages.ADD_FAVORITE,spacing:2,children:function(e){return(0,r.jsx)(s.P3F,bn(yn({className:cn().iconItem},e),{onClick:n,"aria-label":G.Z.Messages.ADD_FAVORITE,children:(0,r.jsx)(rn.Z,{width:16,height:16,className:cn().actionIcon})}))}})}var xn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&mn(e,t)}(n,e);var t=On(n);function n(){dn(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderEditButton=function(){return(0,r.jsx)(Sn,yn({},this.props))};o.renderInviteButton=function(){return(0,r.jsx)(In,yn({},this.props))};o.renderRemoveSuggestionButton=function(){return(0,r.jsx)(_n,yn({},this.props))};o.renderAcceptSuggestionButton=function(){return(0,r.jsx)(wn,yn({},this.props))};o.getClassName=function(){var e=this.props;return jn(e.position,e.sortingPosition)};o.isDisabled=function(){ var e=this.props;return Cn(e.channel,e.sorting,e.sortingType)};return n}(o.PureComponent);xn.defaultProps={isDefaultChannel:!1};var Pn=n(630203);function Nn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function An(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Nn(i,r,o,a,l,"next",e)}function l(e){Nn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Tn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Zn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){ Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var Mn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]r})),f=!l||u,d=o.useCallback((function(){(0,Hn.uL)(F.Z5c.CHANNEL(t.id,a?Yn.oC.CUSTOMIZE_COMMUNITY:Yn.oC.CHANNEL_BROWSER))}),[t.id,a]),p=o.useCallback((function(e){(0,O.jW)(e,er((function(){var e,o;return rr(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(93087)]).then(n.bind(n,93087))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,nr(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue} if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0}var kr=n(708258),Ur=n(542231),Br=n(883825),Fr=n.n(Br);function Gr(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Hr(e){var t,n=e.total,o=e.users,i=e.videoLimit;return(0,r.jsxs)("div",{className:Fr().wrapper,children:[(0,r.jsxs)("span",{className:m()(Fr().users,(t={},Gr(t,Fr().video,i),Gr(t,Fr().extraLong,o>=100),t)),children:[i?(0,r.jsx)(Ur.Z,{className:Fr().videoIcon}):null,o.toString().padStart(2,"0")]}),(0,r.jsx)("span",{className:m()(Fr().total,Gr({},Fr().extraLong,n>=100)),children:n.toString().padStart(2,"0")})]})}function Vr(e){var t=e.channel,n=e.video,o=e.userCount,i=(0,kr.Z)(t).limit,a=-1,l=!1;t.userLimit>0&&(a=t.userLimit);if(n&&i>0){l=a<0||i0?Math.min(a,i):i}return(0,r.jsx)(Hr,{users:o,total:a,videoLimit:l})} var Wr=n(550744),zr=n.n(Wr);function Yr(e){var t=e.mentionsCount;return(0,r.jsx)("div",{className:zr().mentionsBadge,"aria-hidden":!0,children:(0,r.jsx)(Wn.mA,{count:t})})}var Kr=n(973198),qr=n(379364),Qr=n(948025),Xr=n.n(Qr);function Jr(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function $r(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jr(i,r,o,a,l,"next",e)}function l(e){Jr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function eo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function to(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var oo=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?G.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_MENTIONS.format({channelName:i.name,mentionCount:b}):y?G.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL_WITH_UNREADS.format({channelName:i.name}):G.Z.Messages.GUILD_SIDEBAR_THREAD_A11Y_LABEL.format({channelName:i.name});return(0,r.jsxs)("li",{role:I,className:m()(cn().containerDefault,eo({},cn().selected,a)),children:[(0,r.jsx)(ao,{}),f?null:(0,r.jsx)(ao,{style:{transform:"rotateX(180deg) translateY(-9px)"}}),(0,r.jsx)(s.tEY,{focusTarget:w,ringTarget:x,offset:{top:2,bottom:2,right:4},children:(0,r.jsxs)("div",{className:m()(cn().iconVisibility,Jn().wrapper,Jn().typeThread,(t={},eo(t,Jn().modeSelected,a),eo(t,Jn().modeMuted,!a&&v),eo(t,Jn().modeUnread,!v&&!a&&y),t)),onMouseDown:E,onContextMenu:C,children:[!y||v||a?null:(0,r.jsx)("div",{className:m()(Jn().unread,Jn().unreadRelevant)}),(0,r.jsx)("div",{className:Jn().content,ref:x,children:(0,r.jsxs)(s.P3F,no(to({ innerRef:w,className:m()(Jn().mainContent,Jn().threadMainContent),onClick:g},_),{"aria-label":P,focusProps:{enabled:!1},children:[(0,r.jsx)(gt.Z,{className:m()(Jn().name,Jn().channelName),"aria-hidden":!0,children:i.name}),(0,r.jsxs)("div",{className:Jn().children,children:[j>0&&i.userLimit>0?(0,r.jsx)(Vr,{userCount:j,video:p,channel:i}):null,Dr(b)?(0,r.jsx)(Yr,{mentionsCount:b}):null]})]}))})]})}),(0,r.jsx)(Kr.Z,{channel:i,collapsed:!l,collapsedMax:6,voiceStates:d,location:F.Sbl.GUILD_CHANNEL_LIST})]})}function ao(e){var t=e.style;return(0,r.jsx)("svg",{className:Xr().spine,width:"12",height:"11",viewBox:"0 0 12 11",fill:"none","aria-hidden":!0,style:t,children:(0,r.jsx)("path",{d:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",fill:"currentColor"})})}const lo=o.memo(io);function uo(e){ var t=e.channel,n=e.selectedChannel,o=e.selectedVoiceChannelId,i=e.sortedThreadIds,a=(0,c.Wu)([ie.Z],(function(){return i.map((function(e){return ie.Z.getChannel(e)})).filter(le.lm)}),[i]),l=(0,c.e7)([ae.ZP],(function(){var e=a[a.length-1];if(null==e)return 0;var t=ae.ZP.getVoiceStates(e.guild_id)[e.id];return null==t||0===t.length?0:o!==e.id?40:32*t.length+8}));return(0,r.jsx)("li",{className:Xr().container,children:(0,r.jsxs)("ul",{role:"group","aria-label":G.Z.Messages.THREAD_GROUP_A11Y_LABEL.format({channelName:t.name}),children:[(0,r.jsx)("div",{className:Xr().spineBorder,style:{bottom:24+l}}),a.map((function(e,t){return(0,r.jsx)(lo,{thread:e,isSelectedChannel:(null==n?void 0:n.id)===e.id,isSelectedVoice:o===e.id,isLast:t===a.length-1},e.id)}))]})})}const co=o.memo(uo);var so=n(247250),fo=n(387927),po=n(959468),ho=n(276985),yo=n(716371),bo=n(414306),vo=n(84441),mo=n(852626),go=n(426797),Oo=n(746477),Eo=n(473903),Co=n(58118),jo=n(415788),So=n.n(jo);function Io(e,t,n,r,o,i,a){try{ var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function _o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Io(i,r,o,a,l,"next",e)}function l(e){Io(i,r,o,a,l,"throw",e)}a(void 0)}))}}function wo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function xo(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1&&void 0!==arguments[1]&&arguments[1];return(0,c.cj)([ko.ZP,Do.default],(function(){var n=Do.default.getId();return ko.ZP.getPermissionsForUser(n,e,t)}),[e,t])}(e,!0).moderator;return!t&&n?Uo.START_EVENT:Uo.NORMAL} var Go=n(980617),Ho=n(921122),Vo=n(933954),Wo=n(438355),zo=n(358969),Yo=n(124296),Ko=n(957361),qo=n.n(Ko);function Qo(e){var t=e.locked;return(0,r.jsx)("div",{className:m()(cn().iconItem,qo().premiumChannelIcon),children:(0,r.jsx)(Yo.Z,{className:cn().actionIcon,useGradient:t})})}var Xo=n(337207),Jo=n(18882),$o=n(913302);function ei(e){var t=e.channel,n=e.locked,r=e.video,o=e.selected,i=(0,kr.Z)(t).limit,a=-1;t.userLimit>0&&(a=t.userLimit);r&&i>0&&(a=a>0?Math.min(a,i):i);return a>0&&!n&&!o}var ti=n(125680);function ni(e){var t,n=e.channel,o=e.highlighted,i=e.isChannelSelected,a=e.isChannelCollapsed,l=e.voiceStates,u=e.enableConnectedUserLimit,f=e.enableActivities,d=e.isSubscriptionGated,p=e.needSubscriptionToAccess,h=e.isNewChannel,y=e.muted,b=(0,c.e7)([me.ZP],(function(){return me.ZP.getMentionCount(n.id)})),v=(0,Vo.ZP)(n),m=(0,c.e7)([j.Z],(function(){return!j.Z.can(F.Plq.CONNECT,n)})),g=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(n.id)})),O=(0, Lo.PK)(n.id)&&n.isGuildStageVoice(),E=ei({channel:n,locked:m,video:g||O,selected:i}),C=(0,Xo.ar)(),S=(0,c.e7)([Jo.Z],(function(){return Jo.Z.getNewThreadCount(n.guild_id,n.id)})),I=(0,zo.n2)(n.guild_id,n.id);if(Dr(b))return(0,r.jsx)(Yr,{mentionsCount:b});if(h)return(0,r.jsx)(Wn.IG,{text:G.Z.Messages.NEW,color:Un.Z.unsafe_rawColors.BRAND_260.css,className:Qn().newChannel});if(o)return(0,r.jsx)(Wo.Z,{width:16,height:16});if(!y&&n.isForumChannel()&&null!=S&&S>0)return(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"text-brand",children:G.Z.Messages.CHANNEL_NEW_POSTS_LABEL.format({count:(0,Wn.NG)(S)})});if(!y&&n.isForumChannel()&&null!=I&&I>0)return(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"text-muted",children:(0,Wn.NG)(I)});var _=null!==(t=null==l?void 0:l.length)&&void 0!==t?t:0;return null!=u&&u&&E?(0,r.jsx)(Vr,{userCount:_,video:g||O,channel:n}):C&&a&&(0,$o.a)(l)?(0,r.jsx)(Wn.IG,{text:G.Z.Messages.LIVE,color:Un.Z.unsafe_rawColors.RED_400.css}):null!=f&&f&&function(e){ return e.length>0}(v)?(0,r.jsx)(ti.Z,{embeddedApps:v}):d?(0,r.jsx)(Qo,{locked:p}):null}var ri=n(485911),oi=n(314824),ii=n.n(oi);function ai(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function li(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ai(i,r,o,a,l,"next",e)}function l(e){ai(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ci(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function si(e){si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return si(e)}function fi(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function hi(e,t){return!t||"object"!==bi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yi(e,t){yi=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return yi(e,t)}var bi=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function vi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=si(e);if(t){var o=si(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hi(this,n)}}var mi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]}, trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]n?cn().containerDragAfter:cn().containerDragBefore:cn().containerDefault};i.renderVoiceUsers=function(){var e=this.props,t=e.channel,n=e.collapsed,o=e.tabIndex,i=e.speakerVoiceStates,a=e.numAudience;return(0,r.jsx)(Kr.Z,{channel:t,voiceStates:i,collapsed:n,tabIndex:o,location:F.Sbl.GUILD_CHANNEL_LIST,numAudience:a})};i.renderChannelInfo=function(){var e=this.props,t=e.channel,n=e.collapsed,o=e.isSubscriptionGated,i=e.needSubscriptionToAccess,a=e.voiceStates,l=(0, Lo.xJ)(t.id);return(0,r.jsx)(ni,{channel:t,highlighted:!1,isChannelSelected:!1,isChannelCollapsed:n,voiceStates:a,isSubscriptionGated:o,needSubscriptionToAccess:i,enableConnectedUserLimit:l||t.userLimit>0&&t.userLimit0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0,v=!(!y||!f.unread)&&b,m=(0,c.e7)([Fi.Z],(function(){return Fi.Z.shouldIndicateNewChannel(n.id,t.id)})),g=(0,bo.Z)(t.id),O=g.needSubscriptionToAccess,E=g.isSubscriptionGated,C=(0,c.e7)([mt.Z],(function(){return mt.Z.isFavorite(n.id,t.id)})),S=(0,c.e7)([Eo.default],(function(){var e=Eo.default.getCurrentUser();return null!=e&&(!t.isNSFW()||e.nsfwAllowed)}),[t]);return(0,r.jsx)(pa,aa(ia({},f,p,e),{highlighted:v,canHaveDot:d,hasActiveThreads:u,hasMoreActiveThreads:s,relevant:h,isSubscriptionGated:E,needSubscriptionToAccess:O, isNewChannel:m&&e.canBeNewChannel,isFavoriteSuggestion:i&&!C,canShowThreadPreviewForUser:S,emojiAndColor:a}))}var ya=n(495085),ba=n(901654),va=n(294162),ma=n(377463),ga=n(58838);function Oa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}function Ra(e){ return e.isGuildStageVoice()?ue.Z.getMutableParticipants(e.id,ce.pV.SPEAKER).length>0:ae.ZP.getVoiceStatesForChannel(e).length>0}function La(e){var t,n=Se.Z.getGuildWithoutChangingCommunityRows(e).guildChannels,r=n.getChannels(null!==(t=Ta[e])&&void 0!==t?t:[]);if(null==r||0===r.length)return!1;for(var o,i=null,l=null,u=null,c=null,s=!0,f=!0,d=!1,p=n.getCategoryFromSection(n.voiceChannelsSectionNumber),h=null!==(o=null==p?void 0:p.getShownChannelIds())&&void 0!==o?o:[],y=Ia(n.getSlicedChannels(r),3),b=y[0],v=y[1],m=y[2],g=0;g=0;I--){var _=b[I];if(Za(_.id)||a().some(_.threadIds,Za)){null==l&&(l=_.id);C=!0}if(Ma(_.id)||a().some(_.threadIds,Ma)){null==i&&(i=_.id);E+=me.ZP.getMentionCount(_.id);E+=a().sumBy(_.threadIds,me.ZP.getMentionCount)}}if(f||s)for(var w=0;w0?N={mode:_a.MENTIONS,mentionCount:j,targetChannelId:u}:!d&&a().some(T,Ra)?N={mode:_a.VOICE_CHANNELS,mentionCount:0,targetChannelId:null}:f&&S&&(N={mode:_a.UNREAD,mentionCount:0,targetChannelId:c});s&&E>0?A={mode:_a.MENTIONS,mentionCount:E,targetChannelId:i}:f&&C&&(A={mode:_a.UNREAD,mentionCount:0,targetChannelId:l});var Z=null!=A&&(null==N||N.mode!==_a.MENTIONS&&A.mode===_a.MENTIONS),M=null!=N&&(N.mode===_a.MENTIONS||!Z);Aa[e]={topBar:Z&&null!=A?A:Pa,bottomBar:M&&null!=N?N:Pa};return!0}var Da=a().throttle(La,200);function ka(e){var t=e.guildId;return!!(0,re.pE)(t)&&Da(t)}function Ua(e){var t=e.id,n=ie.Z.getChannel(t);return null!=n&&(!!(0, re.pE)(n.guild_id)&&Da(n.guild_id))}function Ba(e){var t=e.channel,n=ie.Z.getChannel(t.id);return null!=n&&(!!(0,re.pE)(n.guild_id)&&Da(n.guild_id))}function Fa(e){var t=e.channelId,n=ie.Z.getChannel(t);return null!=n&&(!!(0,re.pE)(n.guild_id)&&(ge.Z.getGuildId()===n.guild_id&&Da(n.guild_id)))}var Ga=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Sa(e,t)}(n,e);var t=xa(n);function n(){Ea(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(Se.Z,me.ZP,mt.Z,Mr.Z,ae.ZP,ge.Z)};r.getUnreadStateForGuildId=function(e){var t;return null!==(t=Aa[e])&&void 0!==t?t:Na};r.__getLocalVars=function(){return{EMPTY_BAR:Pa,EMPTY_STATE:Na,unreadStatesByGuildId:Aa,visibleChannelIdsByGuildId:Ta,recalculate:Da}};return n}(c.ZP.Store);Ga.displayName="ChannelListUnreadsStore" ;const Ha=new Ga(_.Z,{UPDATE_CHANNEL_LIST_DIMENSIONS:function(e){var t=e.guildId,n=e.channelIds;if(!(0,re.pE)(t)||null==n)return!1;if(!a().isEqual(Ta[t],n)){Ta[t]=n;return La(t)}return!1},BULK_ACK:function(e){var t=e.channels,n=!1;a()(t).map((function(e){var t,n=e.channelId;return null===(t=ie.Z.getChannel(n))||void 0===t?void 0:t.guild_id})).filter(le.lm).uniq().forEach((function(e){(0,re.pE)(e)&&Da(e)&&(n=!0)}));return n},CHANNEL_ACK:Fa,CHANNEL_DELETE:Ba,CHANNEL_LOCAL_ACK:Fa,MESSAGE_ACK:Fa,MESSAGE_CREATE:Fa,MESSAGE_DELETE_BULK:Fa,MESSAGE_DELETE:Fa,PASSIVE_UPDATE_V1:function(e){return!(null==e.channels||!(0,re.pE)(e.guildId))&&Da(e.guildId)},RESORT_THREADS:Fa,THREAD_CREATE:Ba,THREAD_DELETE:Ba,THREAD_LIST_SYNC:ka,THREAD_MEMBER_UPDATE:Ua,THREAD_MEMBERS_UPDATE:Ua,THREAD_UPDATE:Ba,BULK_CLEAR_RECENTS:ka,CATEGORY_COLLAPSE_ALL:ka,CATEGORY_EXPAND_ALL:ka,VOICE_STATE_UPDATES:function(e){var t=e.voiceStates,n=ge.Z.getGuildId();if(null==n)return!1;if(!new Set(t.map((function(e){return e.guildId }))).has(n))return!1;var r=Aa[n];return null!=r&&r.bottomBar.mode===_a.VOICE_CHANNELS&&Da(n)},USER_GUILD_SETTINGS_CHANNEL_UPDATE:function(e){var t=e.guildId,n=e.channelId;if(null==t||null==n)return!1;var r=Ta[t];return null!=r&&(!!r.includes(n)&&Da(t))}});var Va=n(57937),Wa=n.n(Va);function za(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Ya={friction:30,tension:300};function Ka(e){var t,n=e.guildChannels,i=e.jumpToVoiceChannels,a=n.getCategoryFromSection(n.voiceChannelsSectionNumber),l=(0,ya.Z)(n.id),u=o.useCallback((function(e){e.preventDefault();e.stopPropagation();i()}),[i]),c=null!==(t=null==a?void 0:a.getChannelRecords())&&void 0!==t?t:[],f=(0,Ce.c4)(c,null,l);return(0,r.jsxs)(s.P3F,{className:m()(Wa().bar),onClick:u,children:[(0,r.jsx)(jt.Z,{className:Wa().voiceChannelsIcon,width:14,height:14,color:Un.Z.unsafe_rawColors.GREEN_330.css}),(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"text-positive", className:Wa().barText,children:G.Z.Messages.VOICE_CHANNEL_BAR_ACTIVE.format({count:f.length})}),(0,r.jsx)(va.Z,{guildId:n.id,className:Wa().voiceChannelsUsers,users:f.slice(0,4),renderMoreUsers:function(){return null},max:4,size:s.EFr.SIZE_16})]})}function qa(e){var t,n=e.position,i=e.guildChannels,a=e.guildChannelsVersion,l=e.jumpToVoiceChannels,u=e.jumpToChannel,f=(0,c.cj)([Ha],(function(){return Ha.getUnreadStateForGuildId(i.id)})),d=f.bottomBar,p=f.topBar,y=(0,c.e7)([h.Z],(function(){return h.Z.useReducedMotion})),b=(0,c.e7)([ba.Z],(function(){return ba.Z.isFocused()})),v="bottom"===n?d:p,O=v.mode,E=v.mentionCount,C=v.targetChannelId,j=O===_a.HIDDEN,S="bottom"===n?"translateY(180%)":"translateY(-180%)",I=(0,g.useSpring)({to:{transform:j?S:"translateY(0%)"},config:Ya,immediate:y||!b}),_=o.useCallback((function(e){e.preventDefault();e.stopPropagation();null!=C&&u(C)}),[u,C]);return(0,r.jsx)("div",{className:m()(Wa().container,(t={},za(t,Wa().top,"top"===n), za(t,Wa().bottom,"bottom"===n),t)),children:(0,r.jsx)(g.animated.div,{className:Wa().containerPadding,style:I,"aria-hidden":j,children:O===_a.HIDDEN?(0,r.jsx)("div",{className:m()(Wa().bar,Wa().emptyBar)}):O===_a.UNREAD?(0,r.jsxs)(s.P3F,{className:Wa().bar,onClick:_,children:["bottom"===n?(0,r.jsx)(ma.Z,{className:Wa().unreadIcon,height:14,width:14}):(0,r.jsx)(ga.Z,{className:Wa().unreadIcon,height:14,width:14}),(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"interactive-normal",className:Wa().barText,children:G.Z.Messages.NEW_UNREADS})]}):O===_a.MENTIONS?(0,r.jsx)(s.P3F,{className:m()(Wa().bar,Wa().mentionsBar),onClick:_,children:(0,r.jsx)(s.xvT,{variant:"text-xs/semibold",color:"status-danger-text",className:Wa().barText,children:G.Z.Messages.NEW_MENTIONS_COUNT.format({count:E})})}):O===_a.VOICE_CHANNELS?(0,r.jsx)(Ka,{jumpToVoiceChannels:l,guildChannels:i,guildChannelsVersion:a}):void 0})})}var Qa=n(487517),Xa=n(633997);function Ja(e,t,n){t in e?Object.defineProperty(e,t,{value:n, enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function $a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function el(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tl(e){var t=ie.Z.getChannel(e) ;return null!=t&&null!=t.getGuildId()&&(!(t.isThread()?Mr.Z.isMuted(t.id):mt.Z.isChannelMuted(t.getGuildId(),t.id))&&me.ZP.hasRelevantUnread(t))}function nl(e){var t=ie.Z.getChannel(e);if(null==t)return!1;var n=t.getGuildId();if(null==n)return!1;var r=mt.Z.isGuildCollapsed(n),o=mt.Z.isChannelMuted(n,t.id);return(!r||!o)&&me.ZP.getMentionCount(e)>0}const rl=o.forwardRef((function(e,t){var n=e.guildId,o=e.guildChannels,i=e.guildChannelsVersion,a=el(e,["guildId","guildChannels","guildChannelsVersion"]),l=(0,Qa.T)(n,o,i,!1,{ignoreRecents:!0}),u=(0,c.e7)([ba.Z],(function(){return ba.Z.isFocused()}));return(0,r.jsx)(Xa.Z,$a(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(0,r.jsx)(Wn.mA,{className:Jn().numberBadge,disableColor:!0,count:c})]}))})]})})}function dl(e){var t=e.guild,o=e.selected,i=(0,c.cj)([me.ZP],(function(){return{hasUnread:me.ZP.hasUnread(t.id,Kn.W.GUILD_EVENT),mentionCount:me.ZP.getMentionCount(t.id,Kn.W.GUILD_EVENT)}}),[t.id]),a=i.hasUnread,l=i.mentionCount,f=(0,c.e7)([mt.Z],(function(){return mt.Z.isMuteScheduledEventsEnabled(t.id)})),d=(0,u.JA)("upcoming-events-".concat(t.id));function p(){p=al((function(){return sl(this,(function(e){switch(e.label){case 0:return[4,(0,s.ZDy)(al((function(){var e,o;return sl(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(40706),n.e(89853)]).then(n.bind(n,389853))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,cl(ul({},e),{guildId:t.id}))}]}}))})))];case 1:e.sent();(0, Bn.EW)(kn.z$.GUILD_HEADER_EVENT_UPSELL);return[2]}}))}));return p.apply(this,arguments)}var h=(0,Fe.ZP)(t.id),y=h.length>0?G.Z.Messages.GUILD_EVENTS_PLURAL.format({number:h.length}):G.Z.Messages.GUILD_EVENTS,b=a&&!f;return(0,r.jsx)(fl,{selected:o,showUnread:b,handleClick:function(){return p.apply(this,arguments)},handleContextMenu:function(e){(0,O.jW)(e,al((function(){var e,o;return sl(this,(function(i){switch(i.label){case 0:return[4,n.e(28008).then(n.bind(n,28008))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,cl(ul({},e),{guildId:t.id}))}]}}))})))},eventsMuted:f,rowLabel:y,mentionCount:l,listItemProps:d})}var pl=n(513328);function hl(e){var t=e.channel,n=e.embeddedApps;if(t.type!==F.d4z.GUILD_VOICE);else if(null!=n&&n.length>0){var r=n.map((function(e){return e.application.name}));return G.Z.Messages.GUILD_SIDEBAR_VOICE_CHANNEL_DESCRIBED_BY_LABEL_ACTIVITIES.format({activeActivities:r.join(", ")})}} var yl=n(773011),bl=n(14096),vl=n(122590),ml=n(769321),gl=n(616679),Ol=n(357088),El=n(545580),Cl=n(71854),jl=n(542517),Sl=n(699248),Il=n(239813),_l=n(181763),wl=n(491260),xl=n(954979),Pl=n(754953),Nl=n(802467),Al=n(3564),Tl=n(749565),Zl=n(238871),Ml=n.n(Zl);function Rl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Ll=Ee.u.SIZE_24;function Dl(e){var t,n=e.activity,i=e.user,a=e.embeddedApp,l=e.onOpenSpotifyAlbum,u=n.assets,c=n.application_id;if(null==u||null==u.large_image&&null==u.small_image)return null!=a?function(e){var t=Wi.ZP.getApplicationIconURL({id:e.application.id,icon:e.application.icon}),n=e.application.name;return(0,r.jsx)(s.ua7,{text:n,position:"top", children:function(){return(0,r.jsx)("img",{alt:n,src:t,className:Ml().applicationLargeImage})}})}(a):null;var f,d=null!==(t=u.large_image)&&void 0!==t?t:u.small_image,p=(0,jl.Z)(n),h=p?Ml().spotifyLargeImage:Ml().applicationLargeImage,y=null!=d?(0,r.jsx)("img",{alt:null!==(f=u.large_text)&&void 0!==f?f:"",src:(0,Al.xF)(c,d,[128,128]),className:h}):null;if(p){y=(0,r.jsx)(s.P3F,{className:Ml().clickable,onClick:function(){l(n,i.id)},children:y});return(0,r.jsx)(s.ua7,{text:null!=u.large_text?u.large_text:null,position:"top",children:function(e){e.onClick;var t=Rl(e,["onClick"]);return null!=y?o.cloneElement(y,t):null}})}return y}function kl(e){var t=e.activity,n=e.embeddedApp,o=e.onOpenSpotifyTrack,i=t.details,a=t.name,l=a;if(null!=n)l=n.application.name;else{if(!(0,jl.Z)(t)||null==t.sync_id||null==i)return null;a=i;l=(0,r.jsx)(s.P3F,{className:Ml().headerLink,onClick:function(){o(t)},children:i})}return(0,r.jsx)(Nl.Z,{title:a,className:Ml().header,children:l})}function Ul(e){ var t=e.activity,n=e.user,o=e.onOpenSpotifyArtist,i=t.details,a=t.state,l=i;(0,jl.Z)(t)&&null!=a&&(l=[(0,r.jsx)(Pl.Z,{artists:a,linkClassName:Ml().bodyLink,canOpen:null!=t.sync_id,onOpenSpotifyArtist:function(e){o(t,n.id,e)}},a)]);return null==l||""===l?null:(0,r.jsx)("div",{className:m()(Ml().ellipsisRow,Ml().colorHeaderSecondary,Ml().bodyTextSize),children:l})}function Bl(e){var t=e.activity,n=t.state;return null==n||""===n||(0,jl.Z)(t)?null:(0,r.jsx)("div",{className:m()(Ml().ellipsisRow,Ml().colorHeaderSecondary,Ml().bodyTextSize,Ml().activity),children:n})}function Fl(e){var t=e.activity;if(!(0,jl.Z)(t))return null;var n=t.timestamps;if(null==(null==n?void 0:n.start)||null==(null==n?void 0:n.end))return null;var o=n.start,i=n.end;return(0,r.jsx)(xl.Z,{start:o,end:i,className:Ml().timeBar,themed:!0,singleLine:!0})}function Gl(e){var t=e.activity,n=e.embeddedApp,i=e.user,a=e.channel,l=e.sortedVoiceStates,u=e.onOpenSpotifyTrack,f=e.onOpenSpotifyArtist,d=e.onOpenSpotifyAlbum,p=[] ;null!=n?p=Array.from(n.embeddedActivity.connections.keys()):(0,jl.Z)(t)&&(p=l.map((function(e){return e.user.id})));var h=(0,c.Wu)([Eo.default],(function(){return p.map((function(e){return Eo.default.getUser(e)})).filter(le.lm)})),y=null!=n||(0,jl.Z)(t),b=o.useMemo((function(){var e=new Map;y&&l.forEach((function(t){var n=t.member;null!=n&&e.set(t.user.id,n)}));return e}),[l,y]);if(!y)return null;return(0,r.jsxs)("div",{className:Ml().flexColumn,children:[(0,r.jsxs)("div",{className:Ml().flexRow,children:[(0,r.jsx)(Dl,{activity:t,user:i,embeddedApp:n,onOpenSpotifyAlbum:d}),(0,r.jsxs)("div",{className:Ml().detailsAndAvatarsContainer,children:[(0,r.jsx)(kl,{activity:t,embeddedApp:n,onOpenSpotifyTrack:u}),(0,r.jsx)(Ul,{activity:t,user:i,onOpenSpotifyArtist:f}),(0,r.jsx)(Bl,{activity:t}),p.length>0&&(0,r.jsx)(Ee.Z,{className:Ml().usersSummary,guildId:a.guild_id,users:h,size:Ll,max:7,renderUser:function(e){if(null==e)return null ;var t,n=b.get(e.id),o=null!==(t=null==n?void 0:n.nick)&&void 0!==t?t:Tl.ZP.getName(e);return(0,r.jsx)(s.DY3,{text:o,position:"bottom",children:(0,r.jsx)("img",{src:e.getAvatarURL(a.guild_id,Ll),alt:o,className:Ml().avatar},e.id)},e.id)}})]})]}),(0,r.jsx)(Fl,{activity:t})]})}var Hl=n(363582),Vl=n(758338),Wl=n.n(Vl);function zl(e){var t=e.userCount;return(0,r.jsxs)("div",{className:Wl().container,children:[(0,r.jsx)(Hl.Z,{width:12,height:12,className:Wl().peopleIcon}),(0,r.jsx)(s.xvT,{variant:"text-sm/normal",color:"header-secondary",className:Wl().userCountText,children:t})]})}var Yl=n(99354),Kl=n.n(Yl);function ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]50?{}:Jl({},e.getGuildId(),null!==(n=t.map((function(e){return e.user.id})))&&void 0!==n?n:[]);var n}),[e,t]);(0,Ol.$)(n)}(t,l);var d,p=(0,Vo.ZP)(t),h=new Map;p.forEach((function(e){h.set(e.application.id,e)}));var y,b=null!==(d=null==l?void 0:l.filter(le.lm))&&void 0!==d?d:[],v=function(e){return function(t){ return[F.IIU.PLAYING,F.IIU.WATCHING].includes(t.type)&&(null!=t.assets||null!=t.state||null!=t.details||null!=t.party)&&(null==t.session_id||t.session_id===e.voiceState.sessionId)||t.type===F.IIU.LISTENING}},m=(0,c.e7)([wl.Z],(function(){var e=new Map(h);b.forEach((function(t){var n=wl.Z.findActivity(t.user.id,v(t));if(null!=n&&(0,Cl.Z)(n)){var r=null!=n.application_id?e.get(n.application_id):null;null!=r&&null!=n.application_id&&e.set(n.application_id,eu($l({},r),{embeddedActivity:eu($l({},n),{application_id:r.embeddedActivity.application_id,connections:r.embeddedActivity.connections,url:r.embeddedActivity.url,guildId:r.embeddedActivity.guildId,channelId:r.embeddedActivity.channelId})}))}}));return e}),[b,h],c.pF),g=(0,c.e7)([wl.Z],(function(){var e={};b.forEach((function(t){var n=wl.Z.findActivity(t.user.id,v(t));if(null!=n&&!(0,Cl.Z)(n)){ var r,o,i,a,l="".concat(null!==(o=n.application_id)&&void 0!==o?o:"",":").concat(null!==(i=null===(r=n.party)||void 0===r?void 0:r.id)&&void 0!==i?i:t.user.id),u=null!==(a=e[l])&&void 0!==a?a:{members:[],activity:n};u.members.push(t);(0,El.Z)(u.activity,F.xjy.JOIN)||(u.activity=n);e[l]=u}}));return Object.values(e)}),[b],c.pF),O=tu(Array.from(m.values()).map((function(e){return{members:b,activity:e.embeddedActivity}}))).concat(tu(g));return 0===O.length?null:(0,r.jsxs)(s.Ttm,{className:Kl().container,children:[(0,r.jsx)(lu,{channel:t,isChannelSelected:u,voiceStatesCount:null!==(y=null==l?void 0:l.length)&&void 0!==y?y:0}),(0,r.jsx)("div",{className:Kl().headerDivider}),O.map((function(e,n){var o=e.members,i=e.activity,l=i.application_id,u=null!=l?m.get(l):void 0;return(0,r.jsx)(au,{activity:i,embeddedApp:u,channel:t,members:o,onAction:a},n)})),f&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:Kl().headerDivider}),(0,r.jsx)("div",{className:Kl().settingNudgeText, children:(0,r.jsx)(s.xvT,{variant:"text-xs/normal",tag:"span",children:G.Z.Messages.VOICE_CHANNEL_ACTIVITY_STATUS_REDIRECT.format({onClick:function(){(0,s.ZDy)(Xl((function(){var e,t;return nu(this,(function(o){switch(o.label){case 0:return[4,Promise.all([n.e(40532),n.e(30530)]).then(n.bind(n,124561))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,eu($l({},e),{guild:i}))}]}}))})))}})})})]})]})}var au=function(e){var t=e.channel,n=e.activity,o=e.members,i=e.embeddedApp,a=e.onAction,l=null!=i,u=l?Array.from(i.embeddedActivity.connections.keys()):[],s=(0,c.e7)([Eo.default,Do.default],(function(){if(o.length<=0)return null;if(l){var e,t;return null!==(t=null===(e=o.find((function(e){return e.voiceState.sessionId===(null==n?void 0:n.session_id)})))||void 0===e?void 0:e.user)&&void 0!==t?t:Eo.default.getUser(u[0])}var r,i;return null!==(i=null===(r=o.find((function(e){return e.user.id!==Do.default.getId()})))||void 0===r?void 0:r.user)&&void 0!==i?i:o[0].user})) ;if(null==s)return null;var f=l||(0,jl.Z)(n);return(0,r.jsxs)("div",{className:Kl().activity,children:[(0,r.jsx)("div",{className:Kl().channelActivityContainer,children:f?(0,r.jsx)(Gl,{activity:n,embeddedApp:i,user:s,channel:t,sortedVoiceStates:o,onOpenSpotifyTrack:_l.aG,onOpenSpotifyArtist:_l.d$,onOpenSpotifyAlbum:_l.Z5}):(0,r.jsx)(gl.Z,{type:gl.P.VOICE_CHANNEL,activity:n,user:s,guildId:t.getGuildId(),channelId:t.id,renderHeaderAccessory:function(){return(0,r.jsx)(ou,{guildId:t.guild_id,members:o})},isEmbedded:l})}),(0,r.jsx)("div",{className:Kl().activityActionsContainer,children:(0,r.jsx)(Sl.Z,{type:gl.P.VOICE_CHANNEL,activity:n,user:s,guildId:t.getGuildId(),channelId:t.id,color:Kl().button,onAction:a,isEmbedded:l})})]})};function lu(e){var t=e.channel,n=e.isChannelSelected,o=e.voiceStatesCount,i=(0,c.e7)([j.Z],(function(){return!j.Z.can(F.Plq.CONNECT,t)})),a=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(t.id)})),l=ei({channel:t,locked:i,video:a,selected:n}),u=(0, c.e7)([$e.Z],(function(){return $e.Z.getGuild(t.guild_id)})),f=(0,Il.KS)(t,u);return null==f?null:(0,r.jsxs)("div",{className:Kl().popoutHeaderContainer,children:[(0,r.jsxs)("div",{className:Kl().channelNameContainer,children:[(0,r.jsx)(f,{className:Kl().channelIcon}),(0,r.jsx)(s.xvT,{variant:"text-md/semibold",color:"interactive-normal",className:Kl().channelName,children:t.name})]}),l?(0,r.jsx)(Vr,{userCount:o,video:a,channel:t}):(0,r.jsx)(zl,{userCount:o})]})}function uu(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function cu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){uu(i,r,o,a,l,"next",e)}function l(e){uu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} function du(e){du=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return du(e)}function pu(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function bu(e,t){return!t||"object"!==mu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vu(e,t){vu=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return vu(e,t)}var mu=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function gu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=du(e);if(t){ var o=du(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bu(this,n)}}var Ou=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]n?cn().containerDragAfter:cn().containerDragBefore:cn().containerDefault};i.renderVoiceUsers=function(){var e=this.props,t=e.channel,n=e.voiceStates,o=e.collapsed,i=e.tabIndex;return(0,r.jsx)(Kr.Z,{channel:t,collapsed:o,collapsedMax:6,voiceStates:n,tabIndex:i,location:F.Sbl.GUILD_CHANNEL_LIST})};i.renderChannelInfo=function(){ var e=this.props,t=e.channel,n=e.selected,o=e.collapsed,i=e.voiceStates,a=e.isSubscriptionGated,l=e.needSubscriptionToAccess;return(0,r.jsx)("div",{className:cn().channelInfo,children:(0,r.jsx)(ni,{channel:t,highlighted:!1,isChannelSelected:n,isChannelCollapsed:o,voiceStates:i,isSubscriptionGated:a,needSubscriptionToAccess:l,enableConnectedUserLimit:!0,enableActivities:!0})})};i.render=function(){var e=this,t=this.props,n=t.channel,o=t.selected,i=t.connected,a=t.unread,l=t.mentionCount,u=t.locked,c=t.sorting,f=t.isUserOver,d=t.connectChannelDropTarget,p=t.connectChannelDragSource,h=t.connectUserDropTarget,y=t.connectDragPreview,b=t.canReorderChannel,v=t.canMoveMembers,g=t.showTutorial,O=t.hasActiveEvent,E=t.subtitle,C=t.embeddedApps,j=t.isSubscriptionGated,S=t.isFavoriteSuggestion,I=t.emojiAndColor,_=this.state,w=_.shouldShowActivities,x=_.shouldShowGuildVerificationPopout,P=this.getVoiceStatesCount(),N=(0,r.jsxs)("li",{ className:m()(this.getModeClass(),fu({},cn().disabled,this.isDisabled())),"data-dnd-name":n.name,children:[(0,r.jsx)("div",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:(0,r.jsx)(s.yRy,{position:"right",renderPopout:this.renderPopout,spacing:0,onRequestClose:this.closeGuildVerificationPopout,shouldShow:w&&!c&&!f&&!x||x,children:function(){return(0,r.jsx)(s.ua7,{text:e.getTooltipText(),children:function(t){var c,s=t.onClick,f=t.onContextMenu,d=yu(t,["onClick","onContextMenu"]);return(0,r.jsxs)(Pn.Z,hu(pu({className:cn().iconVisibility,iconClassName:m()(fu({},cn().iconLive,O)),channel:n,selected:!S&&o,connected:i,unread:i?a:void 0,mentionCount:l,locked:u,subtitle:null===(c=Ui(E))||void 0===c?void 0:c.subtitle,onClick:function(){e.handleClick();null==s||s()},onContextMenu:function(t){e.handleContextMenu(t);null==f||f()},connectDragPreview:y,isFavoriteSuggestion:S,emojiAndColor:I,"aria-label":(0,po.Z)({channel:n,unread:a,mentionCount:l,userCount:P, embeddedActivitiesCount:C.length,isSubscriptionGated:j}),"aria-describedby":hl({channel:n,embeddedApps:C})},d),{children:[S&&e.renderAcceptSuggestionButton(),S&&e.renderRemoveSuggestionButton(),!S&&e.renderOpenChatButton(),!S&&e.renderInviteButton(),!S&&e.renderEditButton(),!S&&e.renderChannelInfo()]}))}})}})}),this.renderVoiceUsers()]});v&&(N=h(N));b&&(N=d(p(N)));g&&(N=(0,r.jsx)(Ft.Z,{tutorialId:"voice-conversations",position:"right",offsetX:-20,children:N}));return N};return o}(xn),Cu=vt((0,fo.Q)(Eu));function ju(e){var t,n,o=e.guild,i=e.channel,a=e.disableSorting,l=e.isFavoriteCategory,u=e.emojiAndColor,s=(0,c.cj)([me.ZP],(function(){return{unread:me.ZP.hasUnread(i.id),mentionCount:me.ZP.getMentionCount(i.id)}})),f=(0,c.cj)([ie.Z,Oo.Z,j.Z],(function(){var e=ie.Z.getChannel(i.parent_id),t=Oo.Z.getCheck(i.guild_id);return{canManageChannel:j.Z.can(F.Plq.MANAGE_CHANNELS,i), canReorderChannel:!0!==a&&(o.id===ri._||(null!=e?j.Z.can(F.Plq.MANAGE_CHANNELS,e):j.Z.can(F.Plq.MANAGE_CHANNELS,o))),canMoveMembers:j.Z.can(F.Plq.MOVE_MEMBERS,i),locked:!j.Z.can(F.Plq.CONNECT,i),bypassLimit:j.Z.can(F.Plq.MOVE_MEMBERS,i),unverifiedAccount:!t.canChat}})),d=(0,c.e7)([Lr.Z],(function(){return Lr.Z.hasVideo(i.id)})),p=(0,Vo.ZP)(i),h=(0,yl.ZP)(i),y=(0,Fe.qY)(i.id),b=(0,bo.Z)(i.id),v=b.isSubscriptionGated,m=b.needSubscriptionToAccess,g=(0,vl.Z)(),O=(0,c.e7)([mt.Z],(function(){return mt.Z.isFavorite(o.id,i.id)}));return(0,r.jsx)(Cu,hu(pu({channelName:h,embeddedApps:p,embeddedActivityType:null===(t=p[0])||void 0===t||null===(n=t.embeddedActivity)||void 0===n?void 0:n.type,video:d,hasActiveEvent:null!=y,isSubscriptionGated:v,needSubscriptionToAccess:m},s,f,e),{connected:e.connected||(null==g?void 0:g.channelId)===i.id,isFavoriteSuggestion:l&&!O,emojiAndColor:u}))}function Su(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Au(e,t){return!t||"object"!==Mu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tu(e,t){Tu=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Tu(e,t)}function Zu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){ var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Su(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Su(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Mu=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Ru(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{ Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=wu(e);if(t){var o=wu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Au(this,n)}}var Lu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Tu(e,t)}(n,e);var t=Ru(n);function n(){Iu(this,n);var e;(e=t.apply(this,arguments))._list=null;e.unreadTopRef=o.createRef();e.unreadBottomRef=o.createRef();e.state={initialized:!1,isUnreadVisible:!0,topUnread:null,topMention:null,bottomUnread:null,bottomMention:null};e.setListRef=function(t){var n;e.context.ref.current=null!==(n=null==t?void 0:t.getScrollerNode())&&void 0!==n?n:null;e._list=t};e.jumpToVoiceChannels=function(){ for(var t,n,r,o=e.props,i=o.guildChannels,a=o.voiceStates,l=0,u=null!==(r=null===(t=i.getCategoryFromSection(i.voiceChannelsSectionNumber))||void 0===t?void 0:t.getShownChannelIds())&&void 0!==r?r:[],c=0;c0){l=c+1;break}}null===(n=e._list)||void 0===n||n.scrollToIndex({section:i.voiceChannelsSectionNumber,row:l,animate:!0,padding:8})};e.jumpToChannel=function(t){return e.scrollToChannel(t,!0,32)};e.jumpToChannelWithMentionsAndUnreads=function(t,n){var r=Zu(n,2),o=r[0],i=r[1];return e.scrollToChannel(t,!0,null!=o&&null!=i?32:8)};e.isChannelVisible=function(t,n){var r=e.getSectionRowsFromChannel(t),o=e._list;if(null==o)return!1;var i=!0,a=!1,l=void 0;try{for(var u,c=r[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var s=u.value,f=s.row,d=s.section,p=Zu(o.getScrollPosition(d,f),2),h=p[0],y=p[1],b=o.getScrollerState();if(n&&h+yb.scrollTop)return!0}}catch(e){a=!0;l=e }finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}return!1};e.getVisibleChannels=function(){var t=e._list;if(null==t)return[];for(var n=t.getItems(),r=t.getScrollerState(),o=[],i=0;i=e.props.guildChannels.favoritesSectionNumber){var l=e.props.guildChannels.getChannelFromSectionRow(a.section,a.row),u=Zu(t.getScrollPosition(a.section,a.row),2),c=u[0],f=u[1];null!=l&&c+fr.scrollTop&&o.push(l.channel.id)}}return o};e.handleResize=function(){var t,n,r=e.props.showNewUnreadsBar,o=null!==(n=null===(t=e._list)||void 0===t?void 0:t.getScrollerState())&&void 0!==n?n:null;e.setState({isUnreadVisible:e.isUnreadVisible()});if(r&&null!=o){var i=o.scrollTop;e.updateChannelListScroll(i)}};e.handleListScroll=function(){var t,n,r=e.props.onScroll,o=null!==(n=null===(t=e._list)||void 0===t?void 0:t.getScrollerState())&&void 0!==n?n:null;if(null!=o){var i=o.scrollTop;null!=r&&r(o) ;e.updateChannelListScroll(i)}null!=e.unreadTopRef.current&&e.unreadTopRef.current.calculateState();null!=e.unreadBottomRef.current&&e.unreadBottomRef.current.calculateState()};e.handleUnreadCalculate=function(t,n,r){var o=e.isUnreadVisible();r?e.setState({isUnreadVisible:o,bottomUnread:n,bottomMention:t}):e.setState({isUnreadVisible:o,topUnread:n,topMention:t})};e.updateChannelListScroll=a().throttle((function(t){f.Z.updateChannelListScroll(e.props.guildId,t,e.getVisibleChannels())}),100);e.getSectionHeight=function(t){var n=e.props;return Kt(t,n.guild,n.guildChannels)};e.getSectionFooterHeight=function(t){var n=e.props,r=n.guildChannels,o=n.voiceStates,i=n.selectedVoiceChannelId,a=n.optInEnabled;if(t===r.voiceChannelsSectionNumber)return 44;var l=Pe(r,a,t),u=l.hasDivider?12:0;if(!l.hasVoiceSummary)return u;var c=r.getNamedCategoryFromSection(t);return null!=c&&(0,Ce.af)(c.id,c.getChannelRecords(),i,o)?Ht+u:u};e.getRowHeight=function(t,n){ var r=e.props,o=r.guildChannels,i=r.voiceStates,a=r.stageChannelSpeakerVoiceStates,l=r.selectedVoiceChannelId,u=Ht;if(t===je.zm){var c=o.getCommunitySection();return c.isEmpty()?0:c.getRow(n)===_e.f.GUILD_PREMIUM_PROGRESS_BAR?56:u}if(o.isPlaceholderRow(t,n))return 0;var s=o.getChannelFromSectionRow(t,n);if(null==s)return 0;var f=s.channel,d=s.category;if(f.record.type===F.d4z.GUILD_CATEGORY)return 40;var p=!0,h=!1,y=void 0;try{for(var b,v=f.threadIds[Symbol.iterator]();!(p=(b=v.next()).done);p=!0){var m=b.value;u+=Ht;var g=i[f.id];if(null!=g&&g.length>0){u+=l===m?g.length*Vt:Vt;u+=8}}}catch(e){h=!0;y=e}finally{try{p||null==v.return||v.return()}finally{if(h)throw y}}if(f.record.isGuildVoice()){var O=i[f.id];if(null!=O&&O.length>0){var E=O.length*Vt;(f.isCollapsed||d.isCollapsed)&&(E=Vt);u+=E+8}}null!=f.subtitle&&(u+=16);if(f.record.isGuildStageVoice()){var C,j,S=null!==(C=i[f.id])&&void 0!==C?C:[],I=null!==(j=a[f.id])&&void 0!==j?j:[];if(null!=S&&S.length>0){var _=I.length*Vt ;f.isCollapsed||d.isCollapsed?_=Math.ceil(_/5):_+=Vt;u+=_+8}}return u};e.dismissRecents=function(){var t=e.props,n=t.guild,r=t.guildChannels,o=t.selectedChannelId,i=r.getCategoryFromSection(r.recentsSectionNumber);if(null!=i){var a=null,l=i.getShownChannelAndThreadIds();null!=o&&l.includes(o)&&(a=(0,ne.KY)(r));(0,ne.Uo)(n.id,l,a)}};e.renderSection=function(t){var n=t.section,o=e.props,i=o.guildChannels,a=o.guildChannelsVersion,l=o.guild,u=o.selectedChannelId,c=o.disableManageChannels;return(0,r.jsx)(Qt,{sectionIndex:n,guild:l,guildChannels:i,guildChannelsVersion:a,selectedChannelId:u,disableManageChannels:c},qt(n,i))};e.renderRow=function(t){var n=t.section,i=t.row,a=e.props,l=a.guild,u=a.selectedChannel,c=a.selectedChannelId,s=a.selectedVoiceChannel,f=a.selectedVoiceChannelId,d=a.guildChannels,p=a.voiceStates,h=a.disableManageChannels,y=a.stageChannelSpeakerVoiceStates,b=a.optInEnabled,v=a.channelEmojis;if(n===je.zm){var m=d.getCommunitySection().getRow(i);if(null==m)return null ;switch(m){case _e.f.GUILD_HUB_HEADER_OPTIONS:return(0,r.jsx)(te.Z,{guild:l,channel:ve.ZP.getDefaultChannel(l.id)},_e.f.GUILD_HUB_HEADER_OPTIONS);case _e.f.GUILD_PREMIUM_PROGRESS_BAR:return(0,r.jsx)(ee,{guild:l},_e.f.GUILD_PREMIUM_PROGRESS_BAR);case _e.f.GUILD_HOME:return(0,r.jsx)(yr,{guild:l,selected:c===Yn.oC.GUILD_HOME},_e.f.GUILD_HOME);case _e.f.GUILD_SCHEDULED_EVENTS:return(0,r.jsx)(dl,{guild:l,selected:c===_e.f.GUILD_SCHEDULED_EVENTS},_e.f.GUILD_SCHEDULED_EVENTS);case _e.f.GUILD_ROLE_SUBSCRIPTIONS:return(0,r.jsx)(Zr,{guild:l,selected:c===Yn.oC.ROLE_SUBSCRIPTIONS},_e.f.GUILD_ROLE_SUBSCRIPTIONS);case _e.f.GUILD_MEMBER_APPLICATIONS:return(0,r.jsx)(mr,{guild:l,selected:c===Yn.oC.MEMBER_APPLICATIONS},_e.f.GUILD_MEMBER_APPLICATIONS);case _e.f.GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR:return(0,r.jsx)(Ir,{guild:l});case _e.f.CHANNELS_AND_ROLES:return(0,r.jsx)(or,{guild:l,selected:c===Yn.oC.CHANNEL_BROWSER||c===Yn.oC.CUSTOMIZE_COMMUNITY},_e.f.CHANNELS_AND_ROLES);case _e.f.GUILD_DIRECTORY: return(0,r.jsx)(Ln,{guild:l,selectedChannelId:c,disableManageChannels:h},_e.f.GUILD_DIRECTORY);default:return null}}if(d.isPlaceholderRow(n,i))return null;var g=d.getChannelFromSectionRow(n,i);if(null==g)return null;var O,E=g.category,C=g.channel,j=E instanceof je.VR,S=C.record,I=null!=v?v[S.name.toLowerCase()]:void 0,_=null!=I?[I,null!==(O=Ne.Z[I])&&void 0!==O?O:"#607D8B"]:void 0,w="".concat(n).concat(C.id);switch(S.type){case F.d4z.GUILD_ANNOUNCEMENT:case F.d4z.GUILD_TEXT:case F.d4z.GUILD_FORUM:case F.d4z.DM:case F.d4z.GROUP_DM:return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(ha,{channel:S,guild:l,position:C.position,selected:c===C.id,muted:C.isMuted,subtitle:C.subtitle,disableManageChannels:h,canBeNewChannel:b&&n===d.recentsSectionNumber,isFavoriteCategory:j,emojiAndColor:_}),C.threadCount>0?(0,r.jsx)(co,{channel:S,sortedThreadIds:C.threadIds,selectedChannel:null==u||u.id!==C.id&&u.parent_id!==S.id?null:u,selectedVoiceChannelId:(null==s?void 0:s.parent_id)===S.id?f:null}):null]},w) ;case F.d4z.GUILD_STAGE_VOICE:var x,P;return(0,r.jsx)(Ei,{channel:S,guild:l,position:C.position,selected:c===C.id,connected:f===C.id,collapsed:C.isCollapsed||E.isCollapsed,voiceStates:null!==(x=p[C.id])&&void 0!==x?x:[],speakerVoiceStates:null!==(P=y[C.id])&&void 0!==P?P:[],disableManageChannels:h,isFavoriteCategory:j,emojiAndColor:_},w);case F.d4z.GUILD_VOICE:return(0,r.jsx)(ju,{channel:S,guild:l,position:C.position,selected:c===C.id,connected:f===C.id,collapsed:C.isCollapsed||E.isCollapsed,voiceStates:p[C.id],subtitle:C.subtitle,disableManageChannels:h,showTutorial:C.isFirstVoiceChannel,isFavoriteCategory:j,emojiAndColor:_},w);case F.d4z.GUILD_STORE:return(0,r.jsx)(ki,{channel:S,guild:l,position:C.position,selected:c===C.id},w);case F.d4z.GUILD_CATEGORY:return n!==d.voiceChannelsSectionNumber?null:(0,r.jsx)(Bt,{channel:S},"readonly-".concat(S.id));default:return null}};e.renderSectionFooter=function(t){ var n=t.section,i=e.props,a=i.guildChannels,l=i.voiceStates,u=i.selectedVoiceChannelId,c=i.optInEnabled;if(n===a.voiceChannelsSectionNumber){var s=a.getCategoryFromSection(a.voiceChannelsSectionNumber);return null==s?null:(0,r.jsx)(kt,{category:s},"voice-channels-button")}var f=Pe(a,c,n),d=f.hasDivider,p=f.hasVoiceSummary,h=d?(0,r.jsx)("div",{className:Yt().sectionDivider},"divider-".concat(n)):null;if(!p)return h;var y=a.getCategoryFromSection(n);if(null==y||!y.isCollapsed)return h;var b=(0,Ce.c4)(y.getChannelRecords(),u,l);return 0===b.length?h:(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("div",{className:Yt().voiceUserSummary,children:(0,r.jsx)(Ee.Z,{renderIcon:!0,users:b,max:8,showUserPopout:!0,guildId:e.props.guildId})}),h]},"".concat(n,"-footer"))};e.getAnchorId=function(t,n){var r,o,i=e.props.guildChannels;if(t!==je.zm){if(null==n){var a ;return t===je.p2?"favorites-header":t===i.recentsSectionNumber?"recents-header":t===i.voiceChannelsSectionNumber?"voice-channels":t===je.wd?"uncategorized-header":null===(a=i.getNamedCategoryFromSection(t))||void 0===a?void 0:a.id}if(!i.isPlaceholderRow(t,n))return null===(r=i.getChannelFromSectionRow(t,n))||void 0===r||null===(o=r.channel)||void 0===o?void 0:o.id}};e.testShouldSkipTutorial=function(){if(he.Z.shouldShow("voice-conversations")){var t=e.props.guildChannels.getFirstVoiceChannel();if(null!=t){var n=e._list;if(null!=n){var r=e.getSectionRowsFromChannel(t.id),o=!0,i=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,s=c.section,f=c.row;n.isItemVisible(s,f)||d.Z.dismiss("voice-conversations")}}catch(e){i=!0;a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}}else d.Z.dismiss("voice-conversations")}};return e}var i=n.prototype;i.componentDidMount=function(){this.setState({initialized:!0})} ;i.componentWillUnmount=function(){this.updateChannelListScroll.cancel()};i.componentDidUpdate=function(e,t){var n=this.props,r=n.scrollToChannel,o=n.guildId,i=n.selectedChannelId,a=this.state.initialized,l=be.Z.getGuildDimensions(o).scrollTop;if(null!=r){this.scrollToChannel(r);f.Z.clearChannelListScrollTo(o)}else o!==e.guildId?null!=l&&this.scrollTo(l):i!==e.selectedChannelId?this.scrollToChannel(i):!t.initialized&&a&&(null==l&&null!=i?this.scrollToChannel(i,!1,8,this.handleListScroll):this.scrollTo(null!=l?l:0,this.handleListScroll));this.testShouldSkipTutorial()};i.getSectionRowsFromChannel=function(e){return this.props.guildChannels.getSectionRowsFromChannel(e)};i.scrollTo=function(e,t){var n;null===(n=this._list)||void 0===n||n.scrollTo({to:e,animate:!1,callback:t})};i.scrollToChannel=function(e){ var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,r=arguments.length>3?arguments[3]:void 0,o=this._list,i=this.getSectionRowsFromChannel(e)[0];if(null!=i&&null!=o)if(null!=i.threadOffset){var a=Zu(o.getScrollPosition(i.section,i.row),1),l=a[0],u=i.threadOffset*Ht;o.scrollIntoViewRect({start:l+u,end:l+u+Ht,padding:n,animate:t,callback:r})}else o.scrollToIndex({section:i.section,row:i.row,animate:t,padding:n,callback:r})};i.isUnreadVisible=function(){var e=this.props.guildChannels,t=this._list;return null!=t&&t.getItems().some((function(n){if("row"!==n.type)return!1;var r=n.section,o=n.row;if(r{"use strict";n.d(t,{ZP:()=>x});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(289283),c=n(707961),s=n(769321),f=n(386991),d=n(755284),p=n(775173),h=n(393299),y=n(2590),b=n(485911),v=n(473708),m=n(273413),g=n.n(m);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>ze});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(513328),c=n(473664),s=n(258104),f=n(28661),d=n(895462),p=n(177570),h=n(736818),y=n(736097),b=n(682776),v=n(679450),m=n(377128),g=n(91717),O=n(707961),E=n(247250),C=n(971402),j=n(842629),S=n(481008),I=n(387927),_=n(409125),w=n(550677),x=n(473708);function P(e){switch(e){case w.YE.XBOX:return x.Z.Messages.XBOX_REMOTE_CONNECTED_RAW;case w.YE.PLAYSTATION:return x.Z.Messages.PLAYSTATION_REMOTE_CONNECTED_RAW}} var N=n(306263),A=n(924066),T=n(88329),Z=n(616679),M=n(357088),R=n(699248),L=n(567403),D=n(491260),k=n(407561),U=n(700223),B=n(652591),F=n(179678),G=n(538272),H=n(246549),V=n(2590),W=n(811693),z=n.n(W);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function $(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e,t){ee=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ee(e,t)}function te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{ for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ne=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function re(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{ Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $(this,n)}}var oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ee(e,t)}(n,e);var t=re(n);function n(){K(this,n);return t.apply(this,arguments)}var o=n.prototype;o.componentDidMount=function(){var e=this.props,t=e.user,n=e.streamApplication;B.default.track(V.rMx.OPEN_POPOUT,{type:"Stream Preview",other_user_id:t.id,application_id:null!=n?n.id:null,application_name:null!=n?n.name:null,game_id:null!=n?n.id:null,is_streaming:!0})};o.renderPreview=function(e){var t=this.props,n=t.onWatch,o=t.activeStream,i=t.currentUserId,a=t.canWatch,l=t.unavailableReason;return(0, r.jsxs)(O.P3F,{onClick:n,className:z().previewContainer,children:[(0,r.jsx)(H.Z,{className:z().previewImage,stream:e}),a?(0,r.jsx)("div",{className:z().previewHover,children:(0,r.jsx)(O.xvT,{variant:"text-sm/normal",color:"none",className:z().white,children:(0,G.Z)(e,o,i,l)})}):null]})};o.render=function(){var e=this.props,t=e.activity,n=e.user,o=e.stream,i=e.previewIsOpen;return null==o?null:(0,r.jsx)("div",{className:a()(z().streamPreviewWrapper,q({},z().mounted,i)),children:(0,r.jsxs)("div",{className:z().streamPreview,children:[this.renderPreview(o),(0,r.jsxs)("div",{className:z().body,children:[null!=t?(0,r.jsx)(Z.Z,{hideHeader:!0,type:Z.P.STREAM_PREVIEW,activity:t,user:n,guildId:o.guildId,channelId:o.channelId}):(0,r.jsx)(R.Z,{type:Z.P.STREAM_PREVIEW,applicationStream:o,user:n,guildId:o.guildId,channelId:o.channelId,className:z().activityActions,color:z().watchButton}),(0,r.jsx)(U.Z,{type:U.Z.Types.INLINE,className:z().protip, children:__OVERLAY__?x.Z.Messages.WATCH_STREAM_IN_APP:x.Z.Messages.WATCH_STREAM_TIP})]})]})})};return n}(o.PureComponent);function ie(e){var t=e.user,n=e.channel,i=J(e,["user","channel"]),a=te((0,l.Wu)([k.Z,L.Z,b.Z,_.Z],(function(){return(0,A.p9)(n,k.Z,L.Z,b.Z,_.Z)})),2),u=a[0],c=a[1],s=(0,l.e7)([p.Z],(function(){return p.Z.getStreamForUser(t.id,n.getGuildId())})),f=(0,l.e7)([p.Z],(function(){return p.Z.getActiveStreamForApplicationStream(s)})),d=(0,l.e7)([h.default],(function(){return h.default.getId()})),y=(0,l.e7)([D.Z],(function(){return(0,F.L2)(s,D.Z)})),v=(0,l.e7)([D.Z],(function(){return(0,F.Um)(s,D.Z)})),m=o.useMemo((function(){return q({},n.guild_id,[t.id])}),[n.guild_id,t.id]);(0,M.$)(m);return(0,r.jsx)(oe,X(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ee(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e,t){Ce=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ce(e,t)}var je=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){ var n,r=ve(e);if(t){var o=ve(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}var Ie=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);nu+1?i.slice(0,u):i).map((function(t){var i,l=t.user,u=t.nick,f=t.voiceState;return(0,r.jsx)(Ve,{user:l,nick:u,isSelfOnOtherClient:h.default.getId()===l.id&&f.sessionId!==h.default.getSessionId(),mute:f.isVoiceMuted(),deaf:f.isVoiceDeafened(),video:f.selfVideo, serverMute:f.mute,serverDeaf:f.deaf,sessionId:null!==(i=f.sessionId)&&void 0!==i?i:"",channel:n,collapsed:a,canDrag:o&&b.Z.can(V.Plq.MOVE_MEMBERS,n),showPreview:e.handleShowPreview,hidePreview:e.handleHidePreview,previewIsOpen:y,shouldShowPreview:p===l.id,tabIndex:c,location:s},l.id)}));null!=f&&f>0?v.push((0,r.jsx)(we,{collapsed:a,numAudience:f})):a&&i.length>u+1&&v.push((0,r.jsx)(_e,{numUsers:i.length-u}));return v};o.render=function(){var e=this.renderVoiceUsers(),t=this.props,n=t.collapsed,o=t.className,i=t.children;return null==e&&null==i?null:(0,r.jsxs)(g.e,{className:a()(o,Te().list,Re({},Te().collapsed,n)),collapsed:n,children:[e,i]})};return n}(o.Component);We.defaultProps={allowPreviews:!0,allowDragging:!0};const ze=We},896812:(e,t,n)=>{"use strict";n.d(t,{eD:()=>r,g8:()=>f,Mg:()=>d,qQ:()=>p});var r,o=n(441143),i=n.n(o),a=n(496486);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2];this._pluckNode(e);var o=null!=t.parentId?this.nodes[t.parentId]:this.root,a=o.children.indexOf(t);i()(!(e.type===r.FOLDER&&o.type===r.FOLDER),"[GUILDS TREE] Tried moving a folder (".concat(e.id,") inside of another folder (").concat(o.id,")"));i()(a>=0,"[GUILDS TREE] target node (".concat(t.id,") did not exist within its specified parent (").concat(t.parentId,")"));var l=n?1:0;o.children=c(o.children);o.children.splice(a+l,0,e);e.parentId=o.id;this.version++;return this};t.moveInto=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._pluckNode(e) ;var r=n?t.children.length:0;t.children=c(t.children);t.children.splice(r,0,e);e.parentId=t.id;this.version++;return this};t.addNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];i()(e.type!==r.ROOT,"[GUILDS TREE] Tried adding another root node into the tree");i()(null!=e.id,"[GUILDS TREE] Tried adding a node without an id");i()(null==this.nodes[e.id],"[GUILDS TREE] Tried adding a node that already exists (".concat(e.id,")"));this.nodes[e.id]=e;this.version++;return this.moveInto(e,t,n)};t.removeNode=function(e){i()(e!==this.root,"[GUILDS TREE] Tried removing the root node from the tree");i()(null!=e.id,"[GUILDS TREE] Tried removing a node without an id");this._pluckNode(e);e.parentId=void 0;delete this.nodes[e.id];this.version++;return this};t.replaceNode=function(e,t){i()(e!==this.root,"[GUILDS TREE] Tried replacing the root node of the tree") ;i()(null!=e.id,"[GUILDS TREE] Tried replacing a node without an id");i()(null!=t.id,"[GUILDS TREE] Tried replacing a node with one that does not have an id");i()(t.type!==r.ROOT,"[GUILDS TREE] Tried adding another root node into the tree");var n=null!=e.parentId?this.nodes[e.parentId]:this.root,o=n.children.indexOf(e);i()(o>=0,"[GUILDS TREE] existing node (".concat(e.id,") did not exist within its specified parent (").concat(e.parentId,")"));n.children=c(n.children);n.children.splice(o,1,t);t.parentId=n.id;e.parentId=void 0;delete this.nodes[e.id];this.nodes[t.id]=t;this.version++;return this};t.cloneNode=function(e){return(0,a.clone)(e)};t.convertToFolder=function(e){for(var t=s();null!=this.getNode(t);)t=s();var n={type:r.FOLDER,id:t,expanded:!1,children:[]};this.replaceNode(e,n);this.removeNode(e);this.addNode(e,n,!1);this.version++;return n};t.allNodes=function(){return Object.values(this.nodes)};t.getNode=function(e){return this.nodes[e]};t.getRoots=function(){ return this.root.children};t.sortedGuildNodes=function(){return function e(t){return null==t.children?[]:t.children.map((function(t){return e(t)})).flat()}(this.root)};t._pluckNode=function(e){var t=null!=e.parentId?this.nodes[e.parentId]:this.root;i()(null!=t,"[GUILDS TREE] source node (".concat(e.id,") had a parent id (").concat(e.parentId,") which doesn't exist in the tree"));var n=t.children;i()(null!=n,"[GUILDS TREE] source node (".concat(e.id,") had a parent id (").concat(e.parentId,") which contains no children"));t.children=n.filter((function(t){return t!==e}));e.parentId=void 0;this.version++};!function(e,t,n){t&&u(e.prototype,t);n&&u(e,n)}(e,[{key:"size",get:function(){return this.allNodes().length}}]);return e}();function d(e,t){return{type:r.GUILD,id:e,parentId:t,children:[],unavailable:!1}}function p(e,t){var n,o,i;return{type:r.FOLDER,id:e.folderId,parentId:t,name:null!==(n=e.folderName)&&void 0!==n?n:void 0,color:null!==(o=e.folderColor)&&void 0!==o?o:void 0, expanded:null!==(i=e.expanded)&&void 0!==i&&i,children:[]}}},169071:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var r=n(751615),o=n(628486),i=n(2590);function a(){var e=(0,o.Z)((function(e){return e.guildId})),t=(0,r.TH)().pathname,n=t.startsWith(i.Z5c.GUILD_DISCOVERY),a=t.startsWith(i.Z5c.GUILD_MEMBER_VERIFICATION("")),l=t.startsWith(i.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(""));return null==e&&!(n||a||l)}},917313:(e,t,n)=>{"use strict";n.d(t,{Z:()=>na});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(973935),s=n(751615),f=n(457217),d=n(809784),p=n(202351),h=n(199731),y=n(513328),b=n(707961),v=n(216151),m=n(106200),g=n(566706),O=n(825252),E=n(31914),C=(n(340974),n(567403)),j=n(671723),S=n(652591);n(116433);const I=(0,n(260561).B)({kind:"user",id:"2022-01_server_recommendations_rollout",label:"Rollout experiment for server recommendations.",defaultConfig:{showRecs:!1},treatments:[{id:1,label:"Show server recommendations",config:{showRecs:!0}}]}) ;var _=n(2590),w=n(594697);var x=n(944522),P=n(628486),N=n(953727),A=n(107218),T=n(473903),Z=n(120415),M=n(463473),R=n(896812),L=n(656793),D=n(780861),k=n(813869),U=n(66768),B=n(552889),F=n(744564);function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e){H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return H(e)}function V(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function W(e,t){W=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return W(e,t)}var z=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{ Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=H(e);if(t){var o=H(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}var K={};var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&W(e,t)}(n,e);var t=Y(n);function n(){G(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){var t=e;null!=t&&Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(K[e]=t[e])}))};r.getState=function(){return K};r.hasViewed=function(e){return null!=K[e]};r.__getLocalVars=function(){return{lastViewed:K}};return n}(p.ZP.PersistedStore);q.displayName="ViewHistoryStore";q.persistKey="ViewHistoryStore";const Q=new q(F.Z,{VIEW_HISTORY_MARK_VIEW:function(e){ var t=e.key;K[t]=Date.now()}});var X=n(901654),J=n(633997),$=n(295652),ee=n(473708);function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}var ce=(0,$.oH)((function(e,t,n){return["null"].concat(oe(t),oe(e),[ae,_.x8Z.E3_SERVER_DISCOVERY_BADGE,ie])})) ;const se=o.forwardRef((function(e,t){var n=(0,p.Wu)([B.Z,U.Z,k.Z],(function(){return ce(B.Z.guildFolders,U.Z.getUnreadPrivateChannelIds(),k.Z.getStoreChangeSentinel())})),o=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()})),i=(0,p.e7)([D.Z],(function(){return D.Z.getExpandedFolders()}));return(0,r.jsx)(J.Z,re(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var Me=[18,18,16,16,14,12,10];const Re=function(e){var t,n,i=e.children,l=e.icon,u=e.name,c=e.ariaLabel,f=e.className,d=e.style,p=e.to,h=e.onClick,y=e.selected,v=void 0!==y&&y,m=Ze(e,["children","icon","name","ariaLabel","className","style","to","onClick","selected"]),g=(0,s.k6)();null==l&&null!=u&&(n=function(e){var t;return null!==(t=Me[e.length-1])&&void 0!==t?t:Me[Me.length-1]}(t=(0,we.Zg)(u)));var O=o.useCallback((function(e){if(null==p);else if("string"==typeof p)g.push(p);else{var t=p.pathname,n=void 0===t?"":t,r=p.state;g.push(n,r)}null!=h&&h(e)}),[g,p,h]);return(0,r.jsxs)(b.P3F,Te(Ae({},m),{onClick:O,className:a()(f,Pe().wrapper,Ne({},Pe().selected,v)),"aria-label":null!=c&&""!==c?c:null!=u?u:"",style:Te(Ae({},d),{fontSize:n}),focusProps:{enabled:!1},children:[null!=t?(0,r.jsx)("div",{className:a()(Pe().childWrapper,Pe().acronym),"aria-hidden":!0,children:t}):null,null!=l?(0,r.jsx)("img",{ className:Pe().icon,src:l,alt:" ",width:48,height:48,"aria-hidden":!0}):null,null!=i?(0,r.jsx)("div",{className:Pe().childWrapper,children:i}):null]}))};var Le=n(671232),De=n.n(Le);function ke(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ue(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?lt(l):null,upperBadge:ut({audio:u,video:c,screenshare:s,participating:d}),lowerBadgeWidth:(0,_e.OV)(l),children:(0,r.jsx)(f.mh,{id:n.id,children:function(t){return(0,r.jsx)(Re,mt({to:_.Z5c.CHANNEL(_.ME,n.id),onMouseEnter:function(){return e.setState({hovered:!0})},onMouseLeave:function(){ return e.setState({hovered:!1})},icon:e.getChannelIcon(),selected:a||y,ariaLabel:null!=i?i:"",onContextMenu:e.handleContextMenu},t))}})})})]}))})};return i}(o.PureComponent);wt.defaultProps={badge:0,audio:!1,video:!1,isCurrentUserInThisDMCall:!1};const xt=o.forwardRef((function(e,t){var n=e.channel.id,o=(0,ve.ZP)(e.channel),i=(0,p.e7)([pe.Z],(function(){return pe.Z.getChannelId()}),[]),a=(0,p.e7)([g.Z],(function(){return null!=i?g.Z.getMode(i):_.WtW.VOICE}),[i]),l=(0,p.e7)([me.Z],(function(){return me.Z.getAllApplicationStreamsForChannel(n).length>0})),u=(0,p.e7)([Oe.Z],(function(){return Oe.Z.getChannelId()}),[]),c=(0,p.e7)([ge.ZP],(function(){return ge.ZP.getMentionCount(n)}),[n]),s=i===n,f=!1,d=!1;if(s){f=a===_.WtW.VOICE;d=a===_.WtW.VIDEO}return(0,r.jsx)(wt,gt(mt({},e),{ref:t,channelName:o,unread:c>0,selected:u===n,badge:c,audio:f,video:d,stream:l,isCurrentUserInThisDMCall:s}))}));function Pt(){(0,p.e7)([de.Z],(function(){return de.Z.getPrivateChannelsVersion()})) ;var e=de.Z.getMutablePrivateChannels(),t=(0,p.Wu)([U.Z],(function(){return U.Z.getUnreadPrivateChannelIds()})),n=(0,p.cj)([pe.Z],(function(){return{selectedVoiceGuildId:pe.Z.getGuildId(),selectedVoiceChannelId:pe.Z.getChannelId()}})),i=n.selectedVoiceGuildId,a=n.selectedVoiceChannelId,l=t.map((function(t){var n=e[t];return null==n||n.id===a?null:(0,r.jsx)(xt,{channel:n},n.id)}));if(null==i&&null!=a){var u=e[a];null!=u&&l.unshift((0,r.jsx)(xt,{channel:u},u.id))}return(0,r.jsx)(fe.Z,{component:o.Fragment,children:l})}var Nt=n(898652),At=n(202772),Tt=n.n(At);function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Jt()(t.type!==R.eD.ROOT,"[GuildDropTarget] Tried using a root node as a drop target.");return{accept:e,canDrop:function(e){ return e.nodeId!==t.id&&((!r||e.type!==R.eD.FOLDER||t.type!==R.eD.FOLDER)&&(e.type!==R.eD.FOLDER||null==t.parentId))},drop:function(e){var o=e.nodeId;en.Z.moveById(o,t.id,n,r)},collect:function(e){return{canDrop:e.canDrop(),isOver:e.isOver()}}}}function un(e){var t=e.name,n=e.targetNode,i=e.combine,l=e.below,u=o.useMemo((function(){return ln([R.eD.GUILD,R.eD.FOLDER],n,l,i)}),[n,l,i]),c=on((0,$t.L)(u),2),s=c[0],f=s.canDrop,d=s.isOver,p=c[1],h=an([[f,nn().autoPointerEvents],[d,nn().dragOver]]);return(0,r.jsx)("div",{ref:function(e){h.current=e;p(e)},"data-dnd-name":ee.Z.Messages.DND_DROP_ABOVE.format({itemName:t}),className:a()(nn().target)})}function cn(e){var t=e.name,n=e.targetNode,i=e.onDragOverChanged,l=on((0,$t.L)((function(){return ln([R.eD.GUILD],n,!0,!0)})),2),u=l[0],c=u.canDrop,s=u.isOver,f=l[1];o.useEffect((function(){null==i||i(s)}),[i,s]);var d=an([[c,nn().autoPointerEvents],[s,nn().dragOver]]);return(0,r.jsx)(Fe,{text:t,shouldShow:s,forceOpen:s,disableWrapper:!0, tooltipClass:nn().centerTargetTooltip,children:(0,r.jsx)("div",{ref:function(e){d.current=e;f(e)},"data-dnd-name":ee.Z.Messages.DND_DROP_COMBINE.format({itemName:t}),className:a()(nn().centerTarget,{})})})}const sn=o.memo((function(e){var t=e.name,n=e.targetNode,o=e.noCombine,i=void 0!==o&&o,a=e.below,l=void 0!==a&&a,u=e.onDragOverChanged,c=!i&&null==n.parentId;return(0,r.jsxs)("div",{className:nn().wrapper,"aria-hidden":!0,children:[(0,r.jsx)(un,{name:t,targetNode:n,below:l}),c?(0,r.jsx)(cn,{name:t,targetNode:n,onDragOverChanged:u}):null]})}));function fn(e){var t=e.name,n=e.targetNode,o=on((0,$t.L)((function(){return ln([R.eD.GUILD],n,!0,!0)})),2),i=o[0],l=i.canDrop,u=i.isOver,c=o[1],s=an([[u,nn().wrapperOver]]),f=an([[u,nn().dragOver],[l,nn().autoPointerEvents]]);return(0,r.jsx)("div",{ref:s,className:a()(nn().folderEndWrapper),"aria-hidden":!0,children:(0,r.jsx)("div",{className:nn().folderTarget,children:(0,r.jsx)("div",{ref:function(e){f.current=e;c(e)}, "aria-label":"At end of ".concat(t),className:a()(nn().target)})})})}function dn(e){var t=e.children,n=on((0,$t.L)({accept:[]}),2)[1];return(0,r.jsx)("div",{ref:n,children:t})}var pn=n(416625);function hn(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function yn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hn(i,r,o,a,l,"next",e)}function l(e){hn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function bn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var vn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1, r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0,c=!1,s=!1,f=!1,d=!1;if(n){c=!i;s=i;f=r;d=l}else{f=o;d=u}return ut({audio:c,video:s,screenshare:f,liveStage:!1,participating:n,participatingInStage:!1,activity:d})}(c),O=v>0?(0,Yn.Ne)(v):null;return Ve((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ie,{selected:h,hovered:i,unread:m&&!u,className:qn().pill}),(0,r.jsx)(Vn,{children:(0,r.jsx)(b.aRk,{selected:h||i,upperBadge:g,lowerBadge:O,children:(0,r.jsx)(Re,tr(er({},e),{ariaLabel:ee.Z.Messages.GUILD_TOOLTIP_A11Y_LABEL.format({guildName:ee.Z.Messages.FAVORITES_GUILD_NAME,mentions:v}),to:{pathname:_.Z5c.CHANNEL(_.I_8,s),state:ar},selected:h||i,onMouseEnter:function(){return a(!0)},onMouseLeave:function(){return a(!1)},onMouseDown:function(){null!=d&&En.Z.preload(d.guild_id,d.id)},onContextMenu:function(e){(0,ye.jW)(e,Jn((function(){var e,t;return ir(this,(function(o){switch(o.label){ case 0:return[4,n.e(29375).then(n.bind(n,429375))];case 1:e=o.sent(),t=e.default;return[2,function(e){return(0,r.jsx)(t,er({},e))}]}}))})))},children:(0,r.jsx)(zn.Z,{className:qn().favoriteIcon,width:20,height:20})}))})})]}))}var ur=n(336194),cr=n(366007),sr=n(95891),fr=n(795909),dr=n(203600),pr=n(980771),hr=n.n(pr);function yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?lt(i):null,upperBadge:!t&&l?(0,r.jsx)(Ir.Z,{className:Dr().downloadProgress,determineOwnVisibility:!1}):null,lowerBadgeWidth:(0,_e.OV)(i),children:(0,r.jsx)(Re,Fr(Br({onMouseEnter:function(){return s(!0)},onMouseLeave:function(){return s(!1)},onClick:function(){if(!__OVERLAY__){null!=v&&clearTimeout(v);m(setTimeout(j,500));E(O+1);if(15===O){j();var e=!Sr.Z.get(_.wli);Sr.Z.set(_.wli,e);e?(0,Mr.GN)("discodo"):(0,Mr.GN)("user_leave");h(!0);setTimeout((function(){h(!1)}),1e3)}}},selected:t||c,ariaLabel:ee.Z.Messages.DIRECT_MESSAGES},C),{to:{pathname:a,state:{analyticsSource:{page:_.ZY5.GUILD_CHANNEL,section:_.jXE.NAVIGATION,object:_.qAy.BUTTON_HOME}}},children:(0,r.jsx)(Tr.Z,{className:Dr().homeIcon})}))})})]}))})})}function Wr(){var e=(0,Rr.n)(),t=(0,p.e7)([Ar.Z,Nr.Z],(function(){var e=(0,Ir.E)(Ar.Z.activeItems,Nr.Z),t=Zr.lK(e),n=t.total,r=t.progress,o=Zr.xI(r,n);return o>0&&o<100})),n=(0,p.e7)([wr.Z],(function(){ return wr.Z.getPendingCount()})),o=Object.keys(dr.nG),i=(0,p.e7)([xr.Z],(function(){return xr.Z.getUnacknowledgedOffers(o).length})),a=(0,p.e7)([T.default],(function(){return T.default.getCurrentUser()})),l=n+i+(0,_r.q)();return(0,r.jsx)(Vr,{selected:e,user:a,selectedChannelId:Oe.Z.getChannelId(_.ME),badge:l,link:Pr.Z.getHomeLink(),showProgressBadge:t})}var zr=n(848285),Yr=n(757753),Kr=n(348311),qr=n(97641),Qr=n(944010),Xr=n(934870),Jr=n(124251),$r=n(211482),eo=n(954938),to=n.n(eo);function no(e){var t=e.className;return(0,r.jsx)($r.ZP,{mask:$r.ZP.Masks.SQUIRCLE,className:a()(t,to().placeholderMask),width:48,height:48,style:{display:"block"},children:(0,r.jsx)("div",{className:to().dragInner})})}var ro=n(550262),oo=n.n(ro);function io(e){var t=e.guild,n=e.show,o=e.active,i=e.onAnimationStart,l=e.onAnimationRest,u={},c={};u.transform="translate3d(10px, 10px, 0) scale3d(3, 3, 1)";c.transform="translate3d(0, 0, 0) scale3d(1, 1, 1)";var s=(0, b.dQu)(ur.Z.unsafe_rawColors.BRAND_500).hex(),f=(0,b.dQu)(ur.Z.unsafe_rawColors.PRIMARY_630).hex();if(o&&null==t.icon){u.backgroundColor=s;c.backgroundColor=f}var d=(0,he.useTransition)(n,{from:u,enter:c,leave:u,config:{duration:100},onStart:i,onRest:l});return(0,r.jsx)(r.Fragment,{children:d((function(e,n,o){return n&&(0,r.jsx)("div",{className:a()(oo().folder,oo().hover),children:(0,r.jsx)("div",{className:oo().folderIconWrapper,children:(0,r.jsxs)("div",{className:oo().closedFolderIconWrapper,children:[(0,r.jsx)(he.animated.div,{className:oo().folderIconPreview,style:e,children:(0,r.jsx)(Jr.Z,{guild:t,size:Jr.Z.Sizes.SMOL,className:oo().guildIcon})}),(0,r.jsx)(no,{className:oo().miniPlaceholder})]})})},o.key)}))})}var ao=n(385563),lo=n(912665),uo=n.n(lo);function co(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0){var V;H=null!==(V=lt(w))&&void 0!==V?V:void 0}else if(null==H&&null!=U){var W;H=null!==(W=ct({guildJoinRequestStatus:U}))&&void 0!==W?W:void 0}var z=null!==(i=e.lowerBadgeWidth)&&void 0!==i?i:(0,_e.OV)(w),Y=bo((0,qr.c)({type:R.eD.GUILD,item:function(){requestAnimationFrame((function(){null==c||c()}));return{type:l.type,nodeId:l.id}},end:function(){null==s||s();(0, Qr.V1)(A.Z.getCompatibleGuildFolders())},collect:function(e){return{dragging:e.isDragging()}}}),2),K=Y[0].dragging,q=Y[1],Q=(0,f.Ie)(null!=B?B:""),X=bo(o.useState(!1),2),J=X[0],$=X[1],te=!M&&J,ne=bo(o.useState(!1),2),re=ne[0],oe=ne[1],ie=bo(o.useState(!1),2),ae=ie[0],le=ie[1],ue=bo(o.useState((function(){return new y.sW(70,(function(){return le(!0)}))})),1)[0];o.useEffect((function(){return function(){return ue.cancel()}}),[ue]);var ce=o.useCallback((function(){null==d?(0,Xr.X)(B,{state:mo}):(0,Or.uL)(d,{state:mo})}),[B,d]),se=o.useCallback((function(){if(null==d&&null!=p&&!I&&k){var e=(0,Xr.V)(p.id);null!=e&&En.Z.preload(p.id,e)}}),[d,p,I,k]),fe=o.useCallback((function(e){null!=p&&P(e,p)}),[p,P]),de=o.useCallback((function(e){if("ArrowLeft"===e.key&&null!=F){var t;null===(t=document.querySelector("[aria-owns=folder-items-".concat(F,"]")))||void 0===t||t.focus()}}),[F]),pe=o.useCallback((function(e){if(e)ue.delay();else{ue.cancel();le(!1)}}),[ue]),he=o.useCallback((function(e){ null==u||u(B,e)}),[B,u]);if(null==p)return null;var ye,be=ae||re?(0,r.jsx)(io,{guild:p,show:ae,active:m,onAnimationStart:function(){oe(ae)},onAnimationRest:function(){!ae&&oe(!1)}}):(0,r.jsx)(Re,yo(ho({ariaLabel:ee.Z.Messages.GUILD_TOOLTIP_A11Y_LABEL.format({guildName:p.toString(),mentions:w}),name:p.toString(),onClick:ce,onMouseEnter:function(){!M&&$(!0)},onMouseLeave:function(){!M&&$(!1)},onMouseDown:se,onContextMenu:fe,onKeyDown:de,icon:p.getIconURL(96,te&&h),selected:m||te},Q),{role:"treeitem"})),ve=K?(0,r.jsx)(dn,{children:(0,r.jsx)(no,{})}):(0,r.jsx)("div",{ref:T?q:void 0,"data-dnd-name":p.toString(),className:a()(uo().blobContainer,(ye={},po(ye,uo().sorting,M),po(ye,uo().wobble,ae),po(ye,uo().selected,ae||m),ye)),children:(0,r.jsx)(b.aRk,{selected:ae||m||te,innerClassName:C&&(0,L.c)()?uo().muted:void 0,upperBadge:G,lowerBadge:H,lowerBadgeWidth:z,children:be})});return Ve((0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(Ie,{hovered:!K&&te,selected:!K&&m,unread:!K&&O,className:uo().pill }),(0,r.jsx)(ao.Z,{guild:p,disabled:M,children:ve}),T?(0,r.jsx)(sn,{name:p.name,targetNode:l,onDragOverChanged:pe}):null]}),he)}));function Eo(e){var t=e.guild,n=e.invite,i=o.useMemo((function(){return(0,R.Mg)(t.id)}),[t.id]),a=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()}));return null==t?null:(0,r.jsx)(Oo,{guildNode:i,guild:t,animatable:a,draggable:!1,contextMenu:function(){},selected:!0,route:_.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(t.id,n.code)})}function Co(e){var t,n=e.isOnHubVerificationRoute,o=(0,s.LX)(null!==(t=window.location.pathname)&&void 0!==t?t:"",{path:_.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(":guildId",":inviteCode")}),i=(0,p.e7)([Yr.Z],(function(){if(null==o)return null;var e=o.params.inviteCode;return null!=e?Yr.Z.getInvite(e):null})),a=null!=(null==i?void 0:i.guild)?new zr.Z(null==i?void 0:i.guild):null;return n?null!=a&&null!=i?(0,r.jsx)(Eo,{guild:a,invite:i}):(0,r.jsx)(kt,{tooltip:ee.Z.Messages.HUB_DISCORD_HUBS,id:"guild-hub-button",icon:Kr.Z}):null} var jo=n(853168),So=n.n(jo);function Io(){return Ve((0,r.jsx)("div",{className:So().guildSeparator}))}var _o=n(112184),wo=n(837067),xo=n(911345),Po=n.n(xo);function No(){var e=(0,p.e7)([wo.Z,C.Z],(function(){return wo.Z.unavailableGuilds.filter((function(e){return null==C.Z.getGuild(e)})).length}));return e>0?Ve((0,r.jsx)(Fe,{text:ee.Z.Messages.PARTIAL_OUTAGE.format({count:e}),color:b.ua7.Colors.RED,children:(0,r.jsx)(b.eee,{href:(0,_o.Z)(_.RK.TWITTER),target:"_blank",className:Po().guildsError,"aria-label":ee.Z.Messages.PARTIAL_OUTAGE_A11Y.format({count:e}),children:(0,r.jsx)("span",{"aria-hidden":!0,className:Po().errorInner,children:"!"})})})):null}var Ao=n(547308),To=n(9430),Zo=n(551069);function Mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e) ;for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Uo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()} var Bo=(0,we.Mg)(oo().animationDuration),Fo=(0,we.Mg)(oo().guildIconSize);function Go(e){var t=e.guildId,n=e.animate,o=(0,p.e7)([C.Z],(function(){return C.Z.getGuild(t)}),[t]),i=(0,p.e7)([To.Z],(function(){return To.Z.isMuted(t)}));return null==o?(0,r.jsx)("div",{className:oo().guildIconUnavailable,children:"!"}):(0,r.jsx)(Jr.Z,{guild:o,animate:n,size:Jr.Z.Sizes.SMOL,className:a()(oo().guildIcon,i&&(0,L.c)()&&oo().guildIconMuted),tabIndex:-1})}function Ho(e){var t,n,i=e.folderNode,a=e.hovered,l=e.expanded,u=i.color,c=i.children,s=null!=u?u:_.Wyy,f=c.map((function(e){return e.id})),d=Uo(o.useState(!1),2),p=d[0],h=d[1],y=Uo(o.useState(l),2),b=y[0],v=y[1],m=l?0:-Fo,g=(0,he.useSpring)({transform:"translate3d(0, ".concat(m,"px, 0)"),config:{duration:Bo},onStart:function(){h(!0);v(l)},onRest:function(){h(!1);v(l)}}),O=p?g:void 0;(p||b)&&(t=(0,r.jsx)(he.animated.div,{style:O,className:oo().expandedFolderIconWrapper,children:(0,r.jsx)(Zo.Z,{style:{color:(0,Ao.Rf)(s)}})}));!p&&b||(n=(0, r.jsx)(he.animated.div,{style:O,className:oo().closedFolderIconWrapper,children:f.slice(0,4).map((function(e){return(0,r.jsx)(Go,{guildId:e,animate:a},e)}))}));return(0,r.jsxs)("div",{"aria-hidden":!0,style:l?void 0:{backgroundColor:(0,Ao.br)(s,.4)},className:oo().folderIconWrapper,children:[t,n]})}function Vo(e){var t=e.folderNode,n=e.forceCircular,i=e.expanded,l=e.sorting,u=e.mediaState,c=e.mentionCount,s=void 0===c?0:c,f=e.tooltipName,d=e.folderGroupId,p=e.folderIconContent,h=e.onClick,y=e.onContextMenu,v=e.onHoverChange,m=e.onKeyDown,g=e.treeItemProps.onFocus,O=ko(e.treeItemProps,["onFocus"]),E=Uo(o.useState(!1),2),C=E[0],j=E[1],S=o.useCallback((function(){!l&&j(!0);null==v||v(!0)}),[l,v]),I=o.useCallback((function(){!l&&j(!1);null==v||v(!1)}),[l,v]),_=i||null==u?null:ut(u),w=!i&&s>0?lt(s):null;return(0,r.jsx)(b.aRk,{selected:!n,upperBadge:_,lowerBadge:w,lowerBadgeWidth:(0,_e.OV)(s),children:(0,r.jsx)(b.P3F,Do(Lo({className:a()(oo().folder,Ro({},oo().hover,C)),onClick:h, onContextMenu:y,onMouseEnter:S,onMouseLeave:I,onKeyDown:m,onFocus:g,"aria-label":ee.Z.Messages.GUILD_FOLDER_TOOLTIP_A11Y_LABEL.format({folderName:f,mentions:s}),"aria-expanded":i,"aria-owns":d,focusProps:{enabled:!1}},O),{role:"treeitem",children:null!=p?(0,r.jsx)("div",{className:oo().expandedFolderIconWrapper,children:p}):(0,r.jsx)(Ho,{folderNode:t,hovered:C,expanded:i})}))})}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var oi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]} ;return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0}))}]}}))})))}),[a,l,u,v,b]);return(0,r.jsx)(Xo,ni(ti({},i),{folderNode:t,expanded:f, selected:null!=s&&c.includes(s),mentionCount:b,unread:v,mediaState:h,defaultFolderName:d,onExpandCollapse:m,onContextMenu:g}))}));var ai=n(885073),li=n(85039),ui=n(633878);function ci(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function si(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function fi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){ var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function di(e){var t=e.width,n=void 0===t?48:t,o=e.height,i=void 0===o?48:o,a=e.color,l=void 0===a?"currentColor":a,u=fi(e,["width","height","color"]);return(0,r.jsxs)("svg",si(function(e){for(var t=1;t0,a=null!=(0,pi.k5)(e),l=(null===(n=(0,yi.Z)())||void 0===n?void 0:n.guild_id)===e,u=(0,p.e7)([bi.default],(function(){return bi.default.getId()})),c=(0,p.cj)([pe.Z],(function(){return{selectedVoiceGuildId:pe.Z.getGuildId(),selectedVoiceChannelId:pe.Z.getChannelId()}})),s=c.selectedVoiceGuildId,f=c.selectedVoiceChannelId,d=s===e,h=(0,p.e7)([me.Z],(function(){return!!d&&null!=me.Z.getActiveStreamForUser(u,e)})),y=(0,p.e7)([me.Z],(function(){return me.Z.getAllApplicationStreams().some((function(t){return t.guildId===e}))})),b=(0,p.e7)([Wn.Z],(function(){return d&&null!=f&&Wn.Z.hasVideo(f)}),[d,f]),v=(0,p.e7)([Cn.ZP],(function(){return Cn.ZP.getEmbeddedActivitiesForGuild(e) })),m=(0,p.e7)([Cn.ZP],(function(){return Array.from(Cn.ZP.getSelfEmbeddedActivities().values()).some((function(t){return t.guildId===e}))})),g=v.length>0,O=!1,E=!1,C=!1,j=!1;if(d){O=!b;E=b;C=h;j=m}else{C=!r&&y;j=!r&&g}return o.useMemo((function(){return{audio:O,video:E,screenshare:C,liveStage:i,hasActiveEvent:a,participating:d,participatingInStage:l,activity:j}}),[i,d,a,l,O,E,C,j])}var mi=n(827694),gi=n.n(mi);function Oi(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Ei(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e} const Ci=o.memo((function(e){var t=e.guildNode,n=e.lowerBadge,i=t.id,a=(0,p.e7)([C.Z],(function(){return C.Z.getGuild(i)})),l=(0,ai.E)(i),u=(0,p.e7)([X.Z],(function(){return X.Z.isFocused()})),c=(0,p.e7)([wo.Z],(function(){return wo.Z.isUnavailable(i)})),s=(0,p.e7)([To.Z],(function(){return To.Z.isMuted(i)})),f=(0,P.Z)((function(e){return e.guildId})),d=vi(i),h=(0,p.cj)([k.Z],(function(){return{badge:k.Z.getMentionCount(i),unread:k.Z.hasUnread(i)}})),y=h.badge,b=h.unread,v=(0,li.Ij)(a)&&0===y,m=o.useMemo((function(){return null!=n?n:v?(0,r.jsx)("div",{className:gi().pauseBackground,children:(0,r.jsx)(di,{className:gi().pause,width:10,height:10})}):null}),[n,v]);return(0,r.jsx)(Oo,Ei(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ai(e){var t=e.width,n=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Ni(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",Pi(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{ if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ji=(0,Z.ED)()?4:(0,Z.id)()?0:12,$i=Ji+10,ea=function(){function e(t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.guildsTree=t;this.setScrolling=n;this.onScroll=r;this.scrollerRef=o.createRef();this.guildDiscoveryRef=o.createRef();this.nodeRefs={};this.timeout=new y.V7;this.isScrolling=!1;this.scrollToGuild=function(e,t){var n=i.scrollerRef.current ;if(null!=n)if(null==e&&window.location.pathname.startsWith(_.Z5c.GUILD_DISCOVERY)||e===_.x8Z.SERVER_DISCOVERY_BADGE||e===_.x8Z.E3_SERVER_DISCOVERY_BADGE){var r=(0,c.findDOMNode)(i.guildDiscoveryRef.current);(0,d.k)(r,HTMLElement)?n.scrollIntoViewNode({node:r,animate:t,padding:8}):n.scrollTo({to:0,animate:t})}else if(null!=e){for(var o=i.nodeRefs[e];null==o;){var a=i.guildsTree.getNode(e);if(null==(null==a?void 0:a.parentId))break;o=i.nodeRefs[a.parentId]}null!=o&&(0,d.k)(o)?n.scrollIntoViewNode({node:o,animate:t,padding:8}):n.scrollTo({to:0,animate:t})}else n.scrollTo({to:0,animate:t})};this.handleJumpToGuild=function(e){i.scrollToGuild(e,!0)};this.scrollTo=function(e){var t;null===(t=i.scrollerRef.current)||void 0===t||t.scrollTo(e)};this.isItemVisible=function(e,t,n){var r=i.scrollerRef.current;if(null==r)return!1;var o=n.findIndex((function(t){return"string"==typeof t||null==t?t===e:t.includes(e)}));if(o<0)return!1;var a=56*o+$i;t||(a+=40);var l=r.getScrollerState() ;return!!(!t&&a>=l.scrollTop||t&&a+56<=l.scrollTop+l.offsetHeight)};this.handleScroll=function(){i.isScrolling||i.setScrolling(!0);i.timeout.start(200,(function(){return i.setScrolling(!1)}));i._handleScroll()};this._handleScroll=u().debounce((function(){var e=i.scrollerRef.current;if(null!=e){var t=e.getScrollerState().scrollTop;v.Z.updateGuildListScrollTo(t);i.onScroll()}}),200);this.setNodeRef=function(e,t){i.nodeRefs[e]=t}}e.prototype.setGuildsTree=function(e){this.guildsTree=e};return e}();function ta(e){var t=e.disableAppDownload,n=void 0===t?Z.FB:t,i=e.isOverlay,l=void 0!==i&&i,u=e.className,c=e.themeOverride,d=Xi((0,p.Wu)([A.Z],(function(){var e=A.Z.getGuildsTree();return[e,e.version]})),1)[0],h=(0,p.e7)([x.Z],(function(){return x.Z.lurkingGuildIds()})),v=o.useMemo((function(){return l?[]:h}),[h,l]),m=(0,p.e7)([T.default],(function(){var e;return null===(e=T.default.getCurrentUser())||void 0===e?void 0:e.isStaff()})),S=(0,p.e7)([g.Z],(function(){ return g.Z.isFullscreenInContext()})),w=Xi(o.useState(!1),2),L=w[0],D=w[1],k=o.useCallback((function(){return D(!0)}),[]),U=o.useCallback((function(){return D(!1)}),[]),B=o.useRef(!1),F=Xi(o.useState((function(){return new y.V7})),1)[0],G=o.useRef(null),H=o.useRef(null),V=(0,f.OP)(),W=V.ref,z=Qi(V,["ref"]),Y=(0,b.mFp)(),K=Xi(o.useState(!1),2),q=K[0],Q=K[1],X=Xi(o.useState((function(){return new ea(d,Q,(function(){var e,t;null===(e=G.current)||void 0===e||e.calculateState();null===(t=H.current)||void 0===t||t.calculateState()}))})),1),J=X[0],$=(0,s.TH)().pathname,te=$.startsWith(_.Z5c.GUILD_DISCOVERY),ne=$.startsWith(_.Z5c.GUILD_MEMBER_VERIFICATION_FOR_HUB(""));o.useLayoutEffect((function(){if(!B.current&&0!==d.size){if(te)J.scrollToGuild(null,!1);else{var e=N.Z.getGuildListDimensions().scrollTop;J.scrollTo({to:e,animate:!1})}B.current=!0;return function(){return F.stop()}}}),[]);o.useEffect((function(){J.setGuildsTree(d);if(!B.current&&0!==d.size){var e=P.Z.getState().guildId ;J.scrollToGuild(e,!1);var t=null,n=P.Z.subscribe((function(e){var n=e.guildId;if(n!==t){t=n;J.scrollToGuild(t,!1)}}));return n}}),[d,J]);var re,oe,ie,ae,le,ue=(re=(0,p.e7)([C.Z],(function(){return C.Z.getGuildCount()})),oe=(0,p.e7)([j.ZP],(function(){return j.ZP.getGamesSeen(!1).filter((function(e){return(0,j.Zs)(e)})).length}),[]),ie=(0,p.e7)([E.Z],(function(){return E.Z.hasConsented(_.pjP.PERSONALIZATION)})),ae=I.useExperiment({}).showRecs,ie&&ae&&re<4&&oe>=2),ce=d.getRoots(),fe=(0,O.Z)();return(0,r.jsx)("nav",{className:a()(Wi().wrapper,u,(0,M.Q)(c),Yi({},Wi().hidden,S)),"aria-label":ee.Z.Messages.GUILDS_BAR_A11Y_LABEL,children:(0,r.jsxs)("ul",qi(Ki({ref:W},z,Y),{role:"tree",className:Wi().tree,children:[(0,r.jsx)(se,{ref:G,isVisible:J.isItemVisible,onJumpTo:J.handleJumpToGuild,className:Wi().unreadMentionsIndicatorTop,barClassName:Wi().unreadMentionsBar}),(0,r.jsxs)(b.xVE,{className:a()((le={},Yi(le,Wi().scroller,!0),Yi(le,Wi().scrolling,q),le)),ref:J.scrollerRef, onScroll:J.handleScroll,children:[(0,r.jsx)(Wr,{}),fe?(0,r.jsx)(lr,{}):null,(0,r.jsx)(Co,{isOnHubVerificationRoute:ne}),(0,r.jsx)(Pt,{}),v.map((function(e){return(0,r.jsx)(ji,{guildId:e},e)})),m?(0,r.jsx)(Hi,{}):null,(0,r.jsx)(mr,{}),!l&&ue?(0,r.jsx)(jr,{ref:J.guildDiscoveryRef,selected:te,tooltip:ee.Z.Messages.GUILD_DISCOVERY_TOOLTIP}):null,(0,r.jsx)(Io,{}),(0,r.jsx)("div",{"aria-label":ee.Z.Messages.SERVERS,children:ce.map((function e(t){switch(t.type){case R.eD.FOLDER:return(0,r.jsx)(ii,{folderNode:t,setNodeRef:J.setNodeRef,draggable:!0,sorting:L,onDragStart:k,onDragEnd:U,renderChildNode:e},t.id);case R.eD.GUILD:return(0,r.jsx)(Ci,{guildNode:t,setRef:J.setNodeRef,draggable:!0,sorting:L,onDragStart:k,onDragEnd:U},t.id);default:return null}}))}),l?null:(0,r.jsx)(On,{disableTooltip:v.length>0,lastTargetNode:ce[ce.length-1]}),l||ue?null:(0,r.jsx)(jr,{ref:J.guildDiscoveryRef,selected:te}),(0,r.jsx)(No,{}),n?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Io,{}),(0,r.jsx)(Vt,{})]})]}),(0, r.jsx)(se,{reverse:!0,ref:H,isVisible:J.isItemVisible,onJumpTo:J.handleJumpToGuild,className:Wi().unreadMentionsIndicatorBottom,barClassName:Wi().unreadMentionsBar})]}))})}const na=o.memo((function(e){var t=(0,m.Z)("guildsnav");return(0,r.jsx)(f.bG,{navigator:t,children:(0,r.jsx)(ta,Ki({},e))})}),(function(e,t){return!1===t.isVisible||(0,h.Z)(e,t)}))},893263:(e,t,n)=>{"use strict";n.d(t,{Ne:()=>i});var r=n(785893),o=(n(667294),n(294184),n(795470),n(886391),n(3219),n(570202),n(542231),n(621329),n(189865),n(449401),n(425454),n(472034),n(796938),n(516909),n(531441));n(2590),n(212515);function i(e){return(0,r.jsx)(o.mA,{count:e})}},25410:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=n(667294),i=n(202351),a=n(707961),l=n(201459),u=n(9430),c=n(312682),s=n(105538),f=n(373438),d=n(930948),p=n(140567),h=n(2590),y=n(473708),b=n(180362),v=n.n(b);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{MA:()=>at,TS:()=>it,ud:()=>tt,v0:()=>rt}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(77413),s=n(503370),f=n(491260),d=n(749565),p=n(310126),h=n(539116),y=n.n(h);function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var m=p.default.getEnableHardwareAcceleration()?u.P5S:u.qbd;const g=l.ZP.connectStores([f.Z],(function(e){var t=e.userId,n=e.defaultStatus;return{status:null!=t?f.Z.getStatus(t,null,n):null,streaming:null!=t&&(0,s.Z)(f.Z.getActivities(t))}}))((function(e){ var t=e.streaming,n=e.status,o=e.hideTooltip,i=e.className,l=e.style,c=e.isMobile,s=e.size,f=e.defaultStatus,p=e.position,h=void 0===p?"top":p,g=t?u.Skl.STREAMING:null!=n?n:f;return(0,r.jsx)(u.ua7,{text:o?null:(0,d.u5)(g),position:h,children:function(e){return(0,r.jsx)("div",v(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(c=(0,r.jsx)(u.DY3,{className:Q().tooltip,text:l.join(", "),position:"bottom",children:c}));return(0,r.jsxs)(o.Fragment,{children:[0!==n?", ":null,c]},n)}))};return e}();function ee(e){var t=e.channel.getRecipientId(),n=(0,R.gc)(t),i=new Array(n.length).fill(null),a=function(e){var t=(0,l.e7)([P.default],(function(){return P.default.getUser(e) }),[e]),n=J(o.useState((function(){return new $(e,null!=t?t:void 0)})),1)[0];n.updateData(e,null!=t?t:void 0);return n}(t);return 0===a.getNicknameGuildPairs().length&&0===n.length?(0,r.jsx)("div",{className:Q().spacer}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(G.iz,{}),(0,r.jsx)(F.IG,{text:K.Z.Messages.AKA,disableColor:!0,className:Q().akaBadge}),n.length>0?(0,r.jsx)(H.Z,{size:16,users:i,showUserPopout:!1,renderUser:function(e,t,o){var i,l=a.user,c=n[o];return null==c||null==l?null:(0,r.jsx)(u.DY3,{text:null===(i=k.Z.getGuild(c))||void 0===i?void 0:i.name,position:"bottom",children:(0,r.jsx)("img",{alt:"",className:Q().avatar,onClick:a.handleClick,src:l.getAvatarURL(c,16),"aria-hidden":!0})},c[1])},renderMoreUsers:a.renderMoreAvatars,guildId:void 0,max:3,className:Q().avatars}):null,a.getNicknameGuildPairs().length>0?(0,r.jsx)(U.Z,{position:"bottom",className:Q().nicknames,children:a.renderNicknamePairs()}):null]})}var te=n(761953),ne=n(619941),re=n.n(ne);function oe(e,t){ if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e){ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return ie(e)}function ae(e,t){return!t||"object"!==ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function le(e,t){le=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return le(e,t)}var ue=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=ie(e);if(t){var o=ie(this).constructor;n=Reflect.construct(r,arguments,o) }else n=r.apply(this,arguments);return ae(this,n)}}var se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&le(e,t)}(n,e);var t=ce(n);function n(){oe(this,n);var e;(e=t.apply(this,arguments)).inputRef=o.createRef();e.state={focused:!1,lastGoodValue:e.props.value,value:e.props.value};e.handleChange=function(t){var n=e.props.onChange;e.setState({value:t.currentTarget.value});null==n||n(t)};e.handleFocus=function(t){var n=e.props.onFocus;e.setState({focused:!0,lastGoodValue:t.currentTarget.value});null==n||n(t)};e.handleBlur=function(t){if(fe("",e.props,e.state)){e.setState({focused:!1});var n=e.props.onBlur;null==n||n(t)}else e.setState({focused:!1,value:e.state.lastGoodValue})};e.handleKeyPress=function(t){if(t.which===z.yXg.ENTER){var n;null===(n=e.inputRef.current)||void 0===n||n.blur()}};return e} var i=n.prototype;i.componentDidUpdate=function(e,t){if(t.focused!==this.state.focused&&this.state.focused){var n;null===(n=this.inputRef.current)||void 0===n||n.focus()}null!==this.props.value&&this.props.value!==e.value&&this.props.value!==this.state.value&&fe(this.props.value,this.props,this.state)&&this.setState({value:this.props.value})};i.render=function(){var e,t=this.props,n=t.className,o=t.name,i=t.autoComplete,l=t.maxLen,u={position:"absolute",left:0,width:"100%",opacity:1};this.state.focused?e={visibility:"hidden",pointerEvents:"none"}:u.opacity=0;return(0,r.jsx)("div",{className:a()(re().outer,n),children:(0,r.jsxs)("div",{className:re().container,children:[(0,r.jsx)("input",{type:"text",className:re().input,ref:this.inputRef,style:u,value:this.state.value,name:o,maxLength:l,autoComplete:i,onKeyPress:this.handleKeyPress,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur}),(0,r.jsx)("div",{className:re().input,style:e,children:this.state.value})]})})} ;return n}(o.Component);function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=""!==e?e:null!=n.value&&""!==n.value?n.value:"";return!(null!=t.minLen&&r.lengtht.maxLen)}var de=n(483701),pe=n.n(de);const he=function(e){var t=e.channel,n=(0,E.ZP)(t);return(0,r.jsx)("div",{className:pe().container,onDoubleClick:function(e){return e.stopPropagation()},children:(0,r.jsx)(se,{minLen:1,maxLen:z.HN8,className:pe().channelName,name:"channel_name",autoComplete:"off",value:null!=n?n:"",onBlur:function(e){n!==e.currentTarget.value&&te.Z.setName(t.id,e.currentTarget.value)}})})};var ye=n(809784),be=n(971402),ve=n(107364),me=n(214468),ge=n.n(me);function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} function Ce(e){Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Ce(e)}function je(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Se(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ie(e,t){ return!t||"object"!==we(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _e(e,t){_e=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _e(e,t)}var we=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var o=Ce(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ie(this,n)}}var Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{ value:e,writable:!0,configurable:!0}});t&&_e(e,t)}(n,e);var t=xe(n);function n(){Oe(this,n);var e;(e=t.apply(this,arguments)).scrollerRef=o.createRef();e.handleScroll=function(){var t=e.scrollerRef.current;if(null!=t){var n,r;null===(r=(n=e.props).onScroll)||void 0===r||r.call(n,t)}};return e}n.prototype.render=function(){var e,t=this,n=this.props,o=n.renderFooter,i=n.selectable,l=n.renderHeader,c=n.className,s=n.onClose,f=n.children;null!=o&&(e=(0,r.jsx)(u.mzw,{direction:ve.Z.Direction.HORIZONTAL,children:o()}));return(0,r.jsx)(u.u_l,{onCloseRequest:s,renderModal:function(n){var o=n.onClose,d=Se(n,["onClose"]);return(0,r.jsxs)(u.Y0X,je(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>Ve});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(730381),s=n.n(c),f=n(289283),d=n(842227),p=n(202351),h=n(707961),y=n(744564),b=n(997244),v=n(761953),m=n(299192),g=n(224813);const O=function(e,t){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY",query:e,channelId:t})},E=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY",query:"",channelId:e})},C=function(e){y.Z.dispatch({ type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_SELECT",row:e})},j=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_ADD_USER",userId:e})},S=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_REMOVE_USER",userId:e})},I=function(e){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_OPEN",channelId:e})},_=function(){y.Z.dispatch({type:"PRIVATE_CHANNEL_RECIPIENTS_INVITE_CLOSE"})};var w=n(864928),x=n(72831),P=n(650332),N=n(26468),A=n(396043),T=n(621647),Z=n(773011),M=n(625751),R=n(784426),L=n(382060),D=n(61209),k=n(869160),U=n(876296),B=n(563367),F=n(717091),G=n(840922),H=n(793461),V=n(473903),W=n(107364),z=n(443812),Y=n(633878);function K(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function q(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e) ;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function X(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=Q(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",q(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ne(e,t){ return!t||"object"!==Me(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ae(e,t){Ae=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ae(e,t)}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||Re(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(e){return function(e){if(Array.isArray(e))return je(e)}(e)||function(e){ if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Me=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Re(e,t){if(e){if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){ var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ne(this,n)}}var De=(0,z.hQ)(),ke=(0,z.hQ)();function Ue(e){var t=e.className,n=e.children;return(0,r.jsxs)(W.Z,{align:W.Z.Align.CENTER,justify:W.Z.Justify.CENTER,direction:W.Z.Direction.VERTICAL,className:a()(me().errorState,t),children:[(0,r.jsx)("div",{className:a()(me().errorStateIcon,Ce().marginBottom20)}),n]})}var Be=function(e){var t,n,o=e.channel,i=e.onClose,a=null!==(t=(0,Z.ZP)(o))&&void 0!==t?t:"",l=(0,p.e7)([F.ZP],(function(){return null!==(n=F.ZP.lastMessageId(o.id))&&void 0!==n?n:o.id}));return(0,r.jsx)(h.P3F,{onClick:function(){(0,R.XU)(ye.ME,o.id);i()},children:(0,r.jsxs)("div",{className:me().confirmChannelItemContainer,children:[(0,r.jsx)(h.qEK,{src:(0,T.x)(o),size:h.EFr.SIZE_24,"aria-label":a}),(0,r.jsx)("span",{className:me().confirmChannelName,children:a}),(0,r.jsx)("span",{className:me().lastActiveTimestamp,children:s()(d.default.extractTimestamp(l)).fromNow()})]})}) },Fe=function(e){var t=e.onConfirm,n=e.channelIds,o=Pe(e,["onConfirm","channelIds"]),i=(0,p.e7)([D.Z],(function(){return Array.from(n).map(D.Z.getChannel)}),[n]);return(0,r.jsxs)(h.sm4,xe(we({header:be.Z.Messages.GROUP_DM_INVITE_CONFIRM,confirmText:be.Z.Messages.GROUP_DM_INVITE_CONFIRM_BUTTON,cancelText:be.Z.Messages.CANCEL,onConfirm:t,confirmButtonColor:h.zxk.Colors.BRAND},o),{children:[(0,r.jsx)(h.xvT,{variant:"text-md/normal",children:be.Z.Messages.GROUP_DM_INVITE_CONFIRM_DESCRIPTION}),(0,r.jsx)(h.vwX,{className:me().selectExistingFormHeader,children:be.Z.Messages.GROUP_DM_INVITE_SELECT_EXISTING}),(0,r.jsx)(h.Ttm,{className:me().confirmInviteScroller,children:i.filter(re.lm).sort((function(e,t){var n,r,o=null!==(n=e.lastMessageId)&&void 0!==n?n:e.id,i=null!==(r=t.lastMessageId)&&void 0!==r?r:t.id;return d.default.compare(i,o)})).map((function(e){return(0,r.jsx)(Be,{onClose:o.onClose,channel:e},e.id)}))})]}))},Ge=function(e){!function(e,t){ if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ae(e,t)}(n,e);var t=Le(n);function n(){Se(this,n);var e;(e=t.apply(this,arguments)).state={separator:!1,copied:!1};e.scrollerRef=o.createRef();e.searchBarRef=o.createRef();e._mobileCloseRef=o.createRef();e.scrollPageUp=function(){var t;null===(t=e.scrollerRef.current)||void 0===t||t.scrollPageUp({animate:!0})};e.scrollPageDown=function(){var t;null===(t=e.scrollerRef.current)||void 0===t||t.scrollPageDown({animate:!0})};e.renderMobileCloseButton=function(){return(0,r.jsx)("div",{className:a()(me().mobileToolsContainer),ref:e._mobileCloseRef,children:(0,r.jsx)(h.JcV,{containerRef:e._mobileCloseRef,children:(0,r.jsx)("div",{children:(0,r.jsx)(x.Z,{className:me().mobileToolsCloseIcon,closeAction:e.props.onClose,keybind:"ESC"})})})})};e.getRowHeight=function(t,n){ return t>0?0:null!=e.props.results[n]?42:0};e.renderRow=function(t){var n=t.section,o=t.row;if(n>0)return null;var i=e.props,a=i.results,l=i.selectedUsers,u=i.selectedRow,c=i.hideDiscriminator,s=a[o];if(null==s)return null;var f=s.user,d=s.comparator,p=l.has(f.id);return(0,r.jsx)(he,{row:o,user:f,hideDiscriminator:c,comparator:d,checked:p,selected:o===u,onClick:e.handleClick,onMouseEnter:e.focusResult,"aria-posinset":o+1,"aria-setsize":a.length},f.id)};e.forceFocus=function(){var t=e.searchBarRef.current;null==t||t.focus()};e.focusResult=function(e){C(e)};e.handleSelect=function(t,n){var r=e.props,o=r.results,i=r.channel;null==n?E(null==i?void 0:i.id):null!=o&&e.handleClick(o[n].user.id)};e.handleSelectionChange=function(t,n){C(n);var r=e.scrollerRef.current;null!=r&&r.scrollToIndex({section:t,row:n,padding:8})};e.handleQueryChange=function(t){var n=e.props.channel;O(t,null==n?void 0:n.id)};e.handleRemoveUser=function(t){var n=Array.from(e.props.selectedUsers);S(n[t]);e.forceFocus()} ;e.handleClick=function(t){var n=e.props,r=n.selectedUsers,o=n.query,i=n.channel;if(!r.has(t)){j(t);o.length>0&&E(null==i?void 0:i.id)}else S(t);e.forceFocus()};e.handleAddFriendNavigation=function(){(0,R.uL)(ye.Z5c.FRIENDS);m.Z.setSection(ye.pJs.ADD_FRIEND);e.props.onClose()};e.handleScroll=function(){var t=e.scrollerRef.current;null!=t&&e.setState({separator:!t.isScrolledToTop()})};e.createNewDM=function(e){v.Z.openPrivateChannel(e,!1,!1,"New Group DM")};e.pushToExistingDM=function(e,t){var n=B.Z.getChannelId()===e.id;v.Z.addRecipients(e.id,t,ye.Sbl.ADD_FRIENDS_TO_DM).then((function(r){n&&(e.isDM()&&r!==e.id?b.Z.call(r,!1,!0):b.Z.ring(r,t))}))};e.handleInviteUsers=function(){var t=e.props,n=t.channel,o=t.selectedUsers,i=t.onClose,a=Array.from(o);if(null!=n){var l=We(Array.from(new Set(Ze(n.recipients).concat(Ze(a)))));l.size>0?(0,h.h7j)((function(t){return(0,r.jsx)(Fe,xe(we({},t),{onConfirm:function(){return e.pushToExistingDM(n,a)},channelIds:l}))}),{},(0, h.VnL)(e.context.appContext)):e.pushToExistingDM(n,a)}else{var u=We(a);a.length>1&&u.size>0?(0,h.h7j)((function(t){return(0,r.jsx)(Fe,xe(we({},t),{onConfirm:function(){return e.createNewDM(a)},channelIds:u}))}),{},(0,h.VnL)(e.context.appContext)):e.createNewDM(a)}i()};e.handleCopyInvite=function(t){var n=e.props,r=n.channel,o=n.invite;null!=o&&(0,te.JG)(t);null!=e.copyTimeout&&clearTimeout(e.copyTimeout);e.setState({copied:!0});e.copyTimeout=setTimeout((function(){e.setState({copied:!1})}),1e3);ee.default.track(ye.rMx.COPY_INSTANT_INVITE,{server:null,channel:null!=r?r.id:null,channel_type:null!=r?r.type:null,location:ye.Sbl.ADD_FRIENDS_TO_DM,code:null!=o?o.code:null})};return e}var i=n.prototype;i.componentDidMount=function(){var e=this.props.channel;y.Z.wait((function(){return I(null==e?void 0:e.id)}));var t=(0,A.v_)(e);null!=e?e.isDM()?ee.default.track(ye.rMx.OPEN_POPOUT,xe(we({},t),{type:"Add Friends to DM",source:"DM",is_friend:!this.isNotFriends() })):ee.default.track(ye.rMx.OPEN_POPOUT,xe(we({},t),{type:"Add Friends to DM",source:"Group DM"})):ee.default.track(ye.rMx.OPEN_POPOUT,xe(we({},t),{type:"New Group DM",source:"Friends List"}));ne.S.subscribe(ye.CkL.SCROLL_PAGE_UP,this.scrollPageUp);ne.S.subscribe(ye.CkL.SCROLL_PAGE_DOWN,this.scrollPageDown)};i.componentWillUnmount=function(){ne.S.unsubscribe(ye.CkL.SCROLL_PAGE_UP,this.scrollPageUp);ne.S.unsubscribe(ye.CkL.SCROLL_PAGE_DOWN,this.scrollPageDown);null!=this.copyTimeout&&clearTimeout(this.copyTimeout);y.Z.wait((function(){return _()}))};i.isNotFriends=function(){var e=this.props.channel;if(null==e||!e.isDM())return!1;var t=e.getRecipientId();if(null==t)throw new Error("no recipient in DM");return!G.Z.isFriend(t)};i.createInvite=function(){var e=this.props.channel;if(null!=e&&e.isMultiUserDM()&&!this.isPartyFull()){var t=oe.getCurrentConfig({}).inviteMaxAgeSeconds;g.Z.createInvite(e.id,{max_age:t},ye.t4x.GROUP_DM)}};i.isPartyFull=function(){var e=this.props.channel ;return null!=e&&e.recipients.length+1>=this.getMaxParticipants()};i.getMaxParticipants=function(){var e=this.props.channel,t=V.default.getCurrentUser();return null!=t&&t.isStaff()?ye.p3w:null!=e&&e.userLimit>0?e.userLimit:ye.pAY};i.getRemaining=function(){var e=this.props,t=e.channel,n=e.selectedUsers,r=(null==t?0:t.recipients.length)+1;return this.getMaxParticipants()-n.size-r};i.renderCreateGroupButton=function(){var e=this.props,t=e.channel,n=e.selectedUsers,o=this.getRemaining(),i=null!=t&&0===n.size||o<0,a=n.size>1?be.Z.Messages.CREATE_GROUP_DM:be.Z.Messages.CREATE_DM;return(0,r.jsx)(h.zxk,{fullWidth:!0,disabled:i,onClick:this.handleInviteUsers,children:a})};i.renderAddUsersButton=function(){var e=this.props,t=e.channel,n=e.selectedUsers;if(null!=t&&!t.isDM()){var o=this.getRemaining(),i=0===n.size||o<0;return(0,r.jsx)("div",{className:me().addButton,children:(0,r.jsx)(h.zxk,{size:h.zxk.Sizes.SMALL,disabled:i,onClick:this.handleInviteUsers,children:be.Z.Messages.ADD})})}} ;i.renderSubtitle=function(){if(!this.props.hasFriends||this.isNotFriends()||this.isPartyFull())return null;var e=this.getRemaining(),t=e<=0?be.Z.Messages.GROUP_DM_INVITE_FULL_SUB2.format({number:this.getMaxParticipants()}):be.Z.Messages.GROUP_DM_INVITE_REMAINING.format({number:e});return(0,r.jsx)(h.xvT,{variant:"text-xs/normal",className:a()(me().subtitle,Ie({},me().subtitleWarning,e<0),Ce().marginTop4),children:t})};i.renderSearchBar=function(){var e=this.props,t=e.query,n=e.hasFriends,o=e.results,i=e.selectedRow,l=e.selectedUsers;if(!n||this.isNotFriends())return null;var u,c=[];l.forEach((function(e){var t=V.default.getUser(e);null!=t&&c.push(t.username)}));return(0,r.jsxs)(W.Z,{className:a()(me().searchBar,Ce().marginTop20),children:[(0,r.jsx)(P.ZP,{ref:this.searchBarRef,className:me().searchBarComponent,autoFocus:!0,placeholder:0===l.size?be.Z.Messages.GROUP_DM_SEARCH_PLACEHOLDER:void 0,disabled:this.isPartyFull(),size:P.ZP.Sizes.MEDIUM,query:t,selectedRow:i, sections:[null!==(u=null==o?void 0:o.length)&&void 0!==u?u:0],tags:c,onSelect:this.handleSelect,onSelectionChange:this.handleSelectionChange,onQueryChange:this.handleQueryChange,onRemoveTag:this.handleRemoveUser,inputProps:{"aria-labelledby":De,"aria-controls":ke,"aria-expanded":!0,"aria-activedescendant":"user-row-".concat(i)}}),this.renderAddUsersButton()]})};i.renderHeader=function(){var e=null!=this.scrollerRef.current&&this.state.separator,t=this.isNotFriends()?be.Z.Messages.GROUP_DM_ADD_FRIENDS:be.Z.Messages.GROUP_DM_HEADER;return(0,r.jsxs)(h.xBx,{direction:W.Z.Direction.VERTICAL,align:W.Z.Align.STRETCH,className:me().header,separator:e,children:[f.tq?this.renderMobileCloseButton():null,(0,r.jsx)(h.X6q,{id:De,variant:"heading-lg/semibold",children:t}),this.renderSubtitle(),this.renderSearchBar()]})};i.renderBody=function(){var e=this,t=this.props,n=t.channel,o=t.hasFriends,i=t.results;if(this.isNotFriends()){var l=null!=n?n.getRecipientId():null ;if(null==l)throw new Error("no recipient in DM");var u=V.default.getUser(l),c=null!=u?u.username:"",s=null!=u&&G.Z.getRelationshipType(u.id)===ye.OGo.PENDING_OUTGOING;return(0,r.jsxs)(Ue,{className:me().notFriends,children:[(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_NOT_FRIENDS.format({username:c})}),(0,r.jsx)(h.zxk,{disabled:s,size:h.zxk.Sizes.SMALL,onClick:function(){return null!=u?e.handleAddFriend(u):null},className:Ce().marginTop20,children:s?be.Z.Messages.ADD_FRIEND_BUTTON_AFTER:be.Z.Messages.ADD_FRIEND_BUTTON})]})}return o?this.isPartyFull()?(0,r.jsxs)(Ue,{className:me().partyFull,children:[(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_FULL_MAIN}),(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_FULL_SUB2.format({number:this.getMaxParticipants()})})]}):0===i.length?(0,r.jsx)(Ue,{className:a()(me().noResults,Ce().marginBottom20),children:(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_EMPTY})}):(0,r.jsx)(h.aVo,{ref:this.scrollerRef, sections:[i.length],className:me().scroller,renderRow:this.renderRow,rowHeight:this.getRowHeight,renderSection:this.renderSection,sectionHeight:0,onScroll:this.handleScroll,paddingTop:0,paddingBottom:14,fade:!0,role:void 0,innerRole:"listbox",innerId:ke,innerAriaMultiselectable:!0,innerAriaOrientation:"vertical"}):(0,r.jsxs)(Ue,{className:me().noFriends,children:[(0,r.jsx)("div",{children:be.Z.Messages.GROUP_DM_INVITE_NO_FRIENDS}),(0,r.jsx)(h.zxk,{autoFocus:!0,color:h.zxk.Colors.GREEN,fullWidth:!0,size:h.zxk.Sizes.SMALL,onClick:this.handleAddFriendNavigation,className:Ce().marginTop20,children:be.Z.Messages.ADD_FRIEND})]})};i.renderSection=function(){return null};i.renderInviteLink=function(){var e=this,t=this.props,n=t.channel,i=t.invite,l=t.hideInstantInvites,u=this.state.copied;if(null==n||!n.isMultiUserDM()||this.isPartyFull())return null;var c=null!=i?(0,M.Z)(i.code):"";return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(h.vwX,{tag:"h5",className:Ce().marginBottom8, children:be.Z.Messages.GROUP_DM_INVITE_LINK_TITLE}),(0,r.jsxs)(W.Z,{className:a()(Oe().input,Ie({},Oe().success,u)),justify:W.Z.Justify.BETWEEN,align:W.Z.Align.CENTER,children:[c.length>0?(0,r.jsx)(h.oil,{className:me().copyInput,name:"invite",value:l?be.Z.Messages.INSTANT_INVITE_HIDDEN:c,editable:!1,inputClassName:me().noBorder,spellCheck:"false",onClick:function(e){return e.currentTarget.select()}}):(0,r.jsx)(h.oil,{className:me().copyInput,name:"invite",value:c,placeholder:(0,M.Z)(be.Z.Messages.GROUP_DM_INVITE_LINK_EXAMPLE),editable:!1,inputClassName:me().noBorder,spellCheck:"false",onClick:function(){return e.createInvite()}}),te.wS&&c.length>0?(0,r.jsx)(h.zxk,{size:h.zxk.Sizes.SMALL,color:u?h.zxk.Colors.GREEN:h.zxk.Colors.BRAND,className:me().copyButton,onClick:function(){return e.handleCopyInvite(c)},children:u?be.Z.Messages.INVITE_COPIED:be.Z.Messages.COPY}):null,0===c.length?(0,r.jsx)(h.zxk,{size:h.zxk.Sizes.SMALL,color:h.zxk.Colors.BRAND,className:me().copyButton, onClick:function(){return e.createInvite()},children:be.Z.Messages.GROUP_DM_INVITE_LINK_CREATE}):null]}),c.length>0?(0,r.jsx)(h.xvT,{variant:"text-xs/normal",className:a()(Ce().marginTop8,me().footerText),children:be.Z.Messages.INVITE_EXPIRES_HOURS.format({numHours:"".concat(24)})}):null]})};i.renderFooter=function(){var e=this.props,t=e.hasFriends,n=e.channel;if(this.isNotFriends()||!t||this.isPartyFull())return null;var i=null==n||n.isDM()?this.renderCreateGroupButton():this.renderInviteLink();return null!=i?(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("div",{className:me().footerSeparator}),(0,r.jsx)(W.Z,{direction:W.Z.Direction.VERTICAL,className:me().footer,children:i})]}):void 0};i.render=function(){var e=this.props.transitionState;return(0,r.jsxs)(h.Y0X,{transitionState:null!=e?e:h.Dvm.ENTERED,className:me().popout,children:[this.renderHeader(),this.renderBody(),this.renderFooter()]})};i.handleAddFriend=function(e){this.props.onClose();w.Z.sendRequest(e.tag,{location:"Group DM"})} ;return n}(o.PureComponent);Ge.contextType=N.ZP;var He=p.ZP.connectStores([U.Z,k.Z,H.Z],(function(e){var t,n=e.channel;null!=n&&null!=(t=k.Z.getInvite(n.id))&&t.isExpired()&&(t=null);return xe(we({},U.Z.getState()),{invite:t,hideDiscriminator:H.Z.hidePersonalInformation,hideInstantInvites:H.Z.hideInstantInvites})}))(Ge);function Ve(e){var t=e.channel,n=e.iconClassName,i=e.icon,a=e.tooltip,l=e.tooltipPosition,u=void 0===l?"bottom":l,c=e.popoutPosition,s=void 0===c?"bottom":c,f=e.popoutAlign,d=void 0===f?"right":f,p=e.subscribeToGlobalHotkey,y=void 0!==p&&p,b=Te(o.useState(null!=t&&t.isGroupDM()&&0===t.recipients.length),2),v=b[0],m=b[1],g=function(){return m((function(e){return!e}))};o.useEffect((function(){y&&ne.S.subscribe(ye.CkL.TOGGLE_DM_CREATE,g);return function(){ne.S.unsubscribe(ye.CkL.TOGGLE_DM_CREATE,g)}}),[y]);return(0,r.jsx)(h.yRy,{renderPopout:function(e){return(0,r.jsx)(He,xe(we({},e),{onClose:e.closePopout,channel:t}))},position:s,shouldShow:v,align:d, onRequestClose:function(){return m(!1)},animation:h.yRy.Animation.NONE,children:function(e){return(0,r.jsx)($.ZP.Icon,xe(we({},e),{onClick:g,icon:null!=i?i:null==t?X:J.Z,className:n,iconClassName:n,tooltip:a,tooltipPosition:u}))}})}function We(e){var t=ze(e);return new Set(u()(D.Z.getMutablePrivateChannels()).values().filter((function(e){return(0,L.bc)(e.type)})).filter((function(e){return ze(e.recipients)===t})).map((function(e){return e.id})).value())}function ze(e){return JSON.stringify(e.sort())}},198325:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(785893),o=n(667294),i=n(202351),a=n(707961),l=n(201441),u=n(893263),c=n(784426),s=n(715107),f=n(570202),d=n(794547),p=n(226919),h=n(933850),y=n(651034),b=n(172028),v=n(842227),m=n(876186),g=n(549331),O=n(717091);var E=n(2590),C=n(473708),j=n(670331),S=n.n(j);function I(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function _(e){return function(){var t=this,n=arguments ;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){I(i,r,o,a,l,"next",e)}function l(e){I(i,r,o,a,l,"throw",e)}a(void 0)}))}}function w(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function x(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?C.Z.Messages.GUILD_EVENTS_PLURAL.format({number:t}):C.Z.Messages.GUILD_EVENTS},handler:function(e){return(0,a.ZDy)(_((function(){var t,o;return N(this,(function(i){switch(i.label){case 0:return[4,Promise.all([n.e(40532),n.e(40706),n.e(89853)]).then(n.bind(n,389853))];case 1:t=i.sent(),o=t.default;return[2,function(t){return(0,r.jsx)(o,P(x({},t),{guildId:e.id}))}]}}))})))}},{icon:(0,r.jsx)(d.Z,{className:S().icon}),key:"JOIN_SERVERS",getName:function(){return C.Z.Messages.HUB_SIDEBAR_JOIN_SERVERS},handler:function(e,t){return(0,c.XU)(e.id,t.id)}},{icon:(0,r.jsx)(h.Z,{className:S().icon}),key:"ADD_SERVERS",getName:function(){return C.Z.Messages.HUB_SIDEBAR_ADD_SERVERS},handler:function(e,t){return(0,a.ZDy)(_((function(){ var o,i;return N(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(95599),n.e(47035)]).then(n.bind(n,647035))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,P(x({},n),{directoryGuildName:e.name,directoryGuildId:e.id,directoryChannelId:t.id}))}]}}))})))}},{icon:(0,r.jsx)(p.Z,{className:S().icon}),key:"INVITE_MEMBERS",getName:function(){return C.Z.Messages.HUB_SIDEBAR_INVITE_MEMBERS},handler:function(e,t){return(0,a.ZDy)(_((function(){var o,i;return N(this,(function(a){switch(a.label){case 0:return[4,Promise.all([n.e(40532),n.e(45446),n.e(86502),n.e(58635)]).then(n.bind(n,945446))];case 1:o=a.sent(),i=o.default;return[2,function(n){return(0,r.jsx)(i,P(x({},n),{guild:e,channel:t,source:E.t4x.HUB_SIDEBAR}))}]}}))})))}}];const T=function(e){var t=e.guild,n=e.channel,a=(0,l.ZP)(t.id);o.useEffect((function(){b.Z.trackExposure({guildId:t.id})}),[t.id]);var c=b.Z.useExperiment({guildId:t.id}).showHubEventsList,f=(0,i.e7)([s.Z],(function(){ return null!=n&&s.Z.getChannelId()===n.id})),d=o.useMemo((function(){return{numEvents:a.length}}),[a.length]),p=function(e){return(0,i.e7)([m.Z,O.ZP],(function(){if(null==e)return 0;var t,n=O.ZP.ackMessageId(e.id);if(null==n)return 0;var r=Object.values(null!==(t=m.Z.getDirectoryEntries(e.id))&&void 0!==t?t:{}).filter((function(e){var t=v.default.fromTimestamp(new Date(e.createdAt).getTime());return(0,g.gX)(e)&&t>n}));return Math.min(g._N,r.length)}),[e])}(n);return(0,r.jsx)("div",{children:A.map((function(e){if(!c&&"EVENTS"===e.key)return null;var o=f&&"JOIN_SERVERS"===e.key;return(0,r.jsx)(y.Z,{avatar:e.icon,name:e.getName(d),focusProps:{offset:{right:4,top:1,bottom:1}},onClick:function(){return function(e){if(null!=n){var r=A.find((function(t){return t.key===e}));null==r||r.handler(t,n)}}(e.key)},selected:o,className:S().optionItem,selectedClassName:S().selected,innerClassName:S().itemInner,avatarClassName:S().avatar,children:"JOIN_SERVERS"===e.key&&p>0?(0,u.Ne)(p):null},e.key)}))}) }},668403:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ve});var r=n(785893),o=n(667294),i=n(707961),a=n(744564),l=n(301928),u=n(294184),c=n.n(u),s=n(441143),f=n.n(s),d=n(496486),p=n.n(d),h=n(853158),y=n(202351),b=n(443660),v=n(344524),m=n(442921),g=n(241166),O=n(316878),E=n(930948),C=n(716118),j=n(2590),S=n(814873),I=n.n(S);function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function x(e){x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return x(e)}function P(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&A(e,t)}function N(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){ if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e,t){A=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return A(e,t)}var T=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}var M=function(){return!0},R=function(){return!0},L=function(){return(0,r.jsxs)("div",{className:I().symbol,children:[(0,r.jsx)("div",{className:I().symbolBackground}),(0,r.jsx)("img",{alt:"",src:n(492137)})]},"symbol")},D=140,k=function(e){P(o,e);var t=Z(o);function o(){ _(this,o);var e;(e=t.apply(this,arguments))._renderSecondaryTimeout=null;e._doneTimeout=null;e.state={animating:!1,renderSecondary:!1,scale:p().random(.6,1,!0),offsetX:p().random(0,D,!1)-70,offsetY:p().random(0,D,!1)-70};e.done=function(){e.props.onAnimationComplete(e.props.componentId)};return e}var i=o.prototype;i.componentDidMount=function(){var e=this;this.setState({animating:!0});this._renderSecondaryTimeout=setTimeout((function(){e.setState({renderSecondary:!0})}),120);this._doneTimeout=setTimeout(this.done,1e3);M()};i.componentDidUpdate=function(e,t){this.state.renderSecondary&&!t.renderSecondary&&R()};i.componentWillUnmount=function(){clearTimeout(this._renderSecondaryTimeout);clearTimeout(this._doneTimeout)};i.renderPrimary=function(){return(0,r.jsxs)("div",{className:I().primaryExplosion,children:[(0,r.jsx)("img",{alt:"",className:I().circleInner,src:n(800193),width:70,height:69}),(0,r.jsx)("img",{alt:"",className:I().circleOuter,src:n(537687),width:96,height:95}),(0, r.jsx)("img",{alt:"",className:I().linesSecondary,src:n(806956),width:183,height:104}),(0,r.jsx)("img",{alt:"",className:I().linesMain,src:n(138e3),width:69,height:180})]},"primary-explosion")};i.renderSecondary=function(e,t){return(0,r.jsxs)("div",{className:I().secondaryExplosion,style:{top:t,left:e},children:[(0,r.jsx)("img",{alt:"",className:I().circleInner,src:n(166682),width:61,height:58},"circle-inner"),(0,r.jsx)("img",{alt:"",className:I().circleOuter,src:n(532958),width:85,height:85},"circle-outer"),(0,r.jsx)("img",{alt:"",className:I().linesSecondary,src:n(94672),width:162,height:173},"lines-secondary"),(0,r.jsx)("img",{alt:"",className:I().linesMain,src:n(529753),width:156,height:306},"lines-main")]},"secondary-explosion")};i.render=function(){var e=this.state,t=e.renderSecondary,n=e.offsetX,o=e.offsetY,i=e.animating,a=e.scale,l=[this.renderPrimary()];t&&l.push(this.renderSecondary(n,o));return(0,r.jsx)("div",{className:c()(I().container,w({},I().animate,i)),style:{ top:this.props.top,left:this.props.left,transform:"scale(".concat(a,")")},children:l})};return o}(o.PureComponent);const U=function(e){P(n,e);var t=Z(n);function n(){_(this,n);var e;(e=t.apply(this,arguments))._timeouts=[];e.children=[];e.state={explosions:0,visible:!1};e.setTimeout=function(t,n){var r=setTimeout(t,n);e._timeouts.push(r);return r};e.removeExplosion=function(t){var n=e.children,r=n.findIndex((function(e){if(e.type!==k)return!1;var n=e.props;return null!=n.componentId&&n.componentId===t}));r>=0&&n.splice(r,1);e.forceUpdate()};e.createExplosion=function(){var t=e.children,n=window.innerWidth/2>>0,o=window.innerHeight/2>>0;if(e.state.explosions<8){var i="expl-".concat(e.state.explosions);t.push((0,r.jsx)(k,{componentId:i,top:p().random(o-100,o+100,!1),left:p().random(n-200,n+200,!1),onAnimationComplete:e.removeExplosion},i));e.setTimeout(e.createExplosion,240);e.setState({explosions:e.state.explosions+1})}else e.setTimeout(e.addSymbol,750)};e.addSymbol=function(){ e.children=[(0,r.jsx)(L,{},"symbol")];e.forceUpdate();e.setTimeout(e.delayedClose,3e3)};e.delayedClose=function(){e.props.onClose()};return e}var o=n.prototype;o.componentDidMount=function(){var e=this;this.setTimeout((function(){e.setState({visible:!0});E.S.dispatch(j.CkL.SHAKE_APP,{duration:2400})}),1800);this.setTimeout(this.createExplosion,1800)};o.componentWillUnmount=function(){g.Z.enable();this.children.length=0;var e=!0,t=!1,n=void 0;try{for(var r,o=this._timeouts[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;clearTimeout(i)}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}};o.render=function(){return(0,r.jsx)("div",{className:c()(I().ragingDemon,w({},I().visible,this.state.visible)),children:this.children})};return n}(o.PureComponent);var B=n(473708),F=n(539430),G=n.n(F);function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{e4:()=>f,qR:()=>p,hi:()=>v,Xy:()=>h,gN:()=>y,r_:()=>b});var r,o=n(281110),i=n(744564),a=n(84441);!function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED";e[e.PENDING=1]="PENDING" ;e[e.ACCEPTED=2]="ACCEPTED";e[e.REJECTED=3]="REJECTED"}(r||(r={}));var l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}var s=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0] ;continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{t9:()=>o,cl:()=>r,WN:()=>a,oi:()=>l,t$:()=>u,pS:()=>i});var r,o="Message Request Accept Confirmation";!function(e){e[e.ACCEPT=0]="ACCEPT";e[e.REJECT=1]="REJECT";e[e.ACCEPT_CONFIRMATION_PROMPT=2]="ACCEPT_CONFIRMATION_PROMPT";e[e.DISMISS_CONFIRMATION_PROMPT=3]="DISMISS_CONFIRMATION_PROMPT";e[e.ACCEPT_HAM_CONFIRMATION_PROMPT=4]="ACCEPT_HAM_CONFIRMATION_PROMPT";e[e.DISMISS_HAM_CONFIRMATION_PROMPT=5]="DISMISS_HAM_CONFIRMATION_PROMPT"}(r||(r={}));var i,a=73,l=26,u=100;!function(e){e.REQUESTS="REQUESTS";e.SPAM="SPAM"}(i||(i={}))},206932:(e,t,n)=>{"use strict";n.d(t,{Z:()=>S});var r=n(202351),o=n(744564),i=n(649536),a=n(473903),l=n(996344),u=n(48315);function c(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2];if(E(e)&&(null==t||e===(null==t?void 0:t.channel_id))){var r=null==t?null:(0,i.e5)(t);g[e]={loaded:!0,error:n,message:r}}}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&y(e,t)}(n,e);var t=m(n);function n(){s(this,n);return t.apply(this,arguments)} var r=n.prototype;r.initialize=function(){this.waitFor(l.Z,u.Z,a.default)};r.shouldLoadMessageRequestPreview=function(e){return!O.has(e)};r.getMessageRequestPreview=function(e){e in g||(g[e]={loaded:!1,error:!1,message:null});return g[e]};r.__getLocalVars=function(){return{messageRequestPreviews:g,shouldReceivePreviewStateFromGateway:O}};return n}(r.ZP.Store);j.displayName="MessageRequestPreviewStore";const S=new j(o.Z,{CONNECTION_OPEN:function(){g={};O.clear()},CHANNEL_CREATE:function(e){var t=e.channel;E(t.id)&&O.add(t.id)},CHANNEL_UPDATES:function(e){var t=e.updates,n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value.channel;if(!E(l.id)){O.delete(l.id);delete g[l.id]}}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},CHANNEL_DELETE:function(e){var t=e.channel;O.delete(t.id);delete g[t.id]},MESSAGE_CREATE:function(e){if(e.isPushNotification)return!1;C(e.message.channel_id,e.message)}, MESSAGE_UPDATE:function(e){var t=e.message.channel_id;if(null==t)return!1;var n=g[t];if(null==n)return!1;if(null==n.message)return!1;g[t]=p(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>c});var r=n(667294),o=n(202351),i=n(473903),a=n(562205),l=n(996344),u=new Set(["GB"]);function c(){var e=(0,o.e7)([l.Z],(function(){return l.Z.getUserCountryCode()})),t=!1===(0,o.e7)([i.default],(function(){var e;return null===(e=i.default.getCurrentUser())||void 0===e?void 0:e.nsfwAllowed}));r.useEffect((function(){null==e&&(0,a.hi)()}),[e]);return!(null==e||!u.has(e.alpha2))&&!!t}},525008:(e,t,n)=>{"use strict";n.d(t,{m:()=>x});var r=n(667294),o=n(8400),i=n.n(o),a=n(347365),l=n(424871),u=n(924308),c=n(725691),s=n(769321),f=n(652591),d=n(562205),p=n(785893),h=n(707961),y=n(234594),b=n(2590);function v(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments ;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{a:()=>v});var r=n(496486),o=n.n(r),i=n(202351),a=n(281110),l=n(744564),u=n(598123),c=n(717091),s=n(206932),f=n(2590);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return} l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}var h=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue} if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{_:()=>a}) ;var r=n(202351),o=n(841800),i=n(804185);function a(){var e=(0,r.e7)([i.ZP],(function(){return i.ZP.getSidebarState(i.uZ)})),t=(null==e?void 0:e.type)===o.t.VIEW_MESSAGE_REQUEST?e:null;return{channelId:null==t?void 0:t.channelId,hasSingleMessageRequest:null!=(null==t?void 0:t.details)&&t.details.type===o.F.MESSAGE_REQUEST&&t.details.hasSingleMessageRequest}}},544488:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});var r=n(202351),o=n(996344);function i(){return(0,r.e7)([o.Z],(function(){return o.Z.getMessageRequestsCount()}))}},986923:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(707961)),i=n(761953),a=n(424871),l=n(761465),u=n(473708);function c(e){var t=e.channel,n=e.buttonSize,c=void 0===n?o.PhG.TINY:n,s=e.className,f=e.onReportClick,d=e.onReportSubmit,p=e.onMouseEnter,h=e.onMouseLeave,y=(0,l.a)(t),b=y.message,v=y.error,m=y.loaded;if(null==b&&(m||v))return null;var g=function(){null==d||d();i.Z.closePrivateChannel(t.id)};return(0,r.jsx)(o.zxk,{className:s,size:c, color:o.zxk.Colors.RED,disabled:null==b,onClick:function(e){e.stopPropagation();null==f||f();null!=b&&(0,a.WL)(b,g)},onMouseEnter:p,onMouseLeave:h,children:u.Z.Messages.REPORT})}},944928:(e,t,n)=>{"use strict";n.d(t,{g:()=>g});var r=n(120053),o=n.n(r),i=n(156824),a=n(665472),l=n(396043),u=n(920724),c=n(330768),s=n(769321),f=n(797815),d=n(598123),p=n(2590);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{W:()=>r,p:()=>o});var r="chat-messages";function o(e,t){return"".concat(r,"-").concat(e,"-").concat(t)}},771344:(e,t,n)=>{"use strict";n.d(t,{V:()=>i});var r=n(202351),o=n(598123);function i(e,t){return(0,r.e7)([o.Z],(function(){var n=o.Z.getMessages(e),r=n.findOldest((function(e){return e.author.id===t}));if(null!=r){var i=n.toArray(),a=!0,l=!1,u=void 0;try{for(var c,s=i[Symbol.iterator]();!(a=(c=s.next()).done);a=!0){var f=c.value;if(f.author.id!==t)break;f.content.length>(null==r?void 0:r.content.length)&&(r=f)}}catch(e){l=!0;u=e}finally{try{a||null==s.return||s.return()}finally{if(l)throw u}}return r}}),[e,t])}},715919:(e,t,n)=>{"use strict";n.d(t,{$:()=>u}) ;var r=n(202351),o=n(996344),i=n(598123),a=n(840922),l=n(2590);function u(e){var t=e.isDM()&&!e.isSystemDM()&&!e.rawRecipients.some((function(e){return e.bot})),n=t?e.getRecipientId():null;return(0,r.e7)([i.Z,o.Z,a.Z],(function(){if(!t)return!1;if(o.Z.isMessageRequest(e.id))return!1;if(null!=n&&a.Z.getRelationshipType(n)===l.OGo.BLOCKED)return!1;var r=i.Z.getMessages(e.id);return r.ready&&!r.hasMoreBefore&&!r.hasMoreAfter&&r.length<25&&!i.Z.hasCurrentUserSentMessage(e.id)}),[e.id,n,t])}},219369:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(4361),u=n(508754),c=n(283285),s=n(323725),f=n(545516),d=n(13489),p=n.n(d);function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e){for(var t=1;t{"use strict";n.d(t,{Rr:()=>p,aJ:()=>h,ZP:()=>y});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(941498),u=n(2590),c=n(296133),s=n.n(c);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)throw new Error("generateMessageSpecs: too many attachments relative to messageGroups: ".concat(n,", ").concat(o));for(var s=i/u.yqN.FONT_SIZE_DEFAULT,f=t?l.iv:l.pk,d=t?l.Pb:l.XX,h=0,y=new Array(n).fill(null).map((function(){var e=a().random(1,r);h+=c*s;h+=f*s;h+=(e-1)*d*s;return e})),b=y.map((function(e,t){return t})),v=[];v.length{"use strict";n.d(t,{Z:()=>Pl}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(202351),c=n(707961),s=n(665472),f=n(316878),d=n(439683),p=n(385983),h=n(861426),y=n(489610),b=n(769321),v=n(736818),m=n(481056),g=n(746477),O=n(598123),E=n(682776),C=n(717091),j=n(107403),S=n(473903),I=n(507488),_=n(194212),w=n(916286),x=n(549995),P=n.n(x),N=n(141780),A=n(70145),T=n(102921),Z=n(101609),M=n(349658),R=n(493254),L=n(2590);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nh){e.isFirstMessageInForumPost(o)||c.push({type:L.ys_.DIVIDER,unreadId:e.id});h=null}var g=(null==p?void 0:p.type)===L.ys_.MESSAGE?r:p;(0,Z.J)(o,g,e)&&(n=e.id);var O={type:e.type===L.uaV.THREAD_STARTER_MESSAGE?L.ys_.THREAD_STARTER_MESSAGE:L.ys_.MESSAGE,content:e,groupId:n,isHighlight:null!=s[e.id]||n!==e.id&&(null==r?void 0:r.isHighlight)};if(n===e.id){r=O;d=c.length}var E=i.jumpSequenceId,C=i.jumpFlash,j=i.jumpTargetId;C&&e.id===j&&null!=E&&(O.flashKey=E) ;i.jumpTargetId===e.id&&(O.jumpTarget=!0);if(null!==y){y.content.push(O);O.jumpTarget&&(y.hasJumpTarget=!0)}else{if(O.isHighlight){r.isHighlight=!0;for(var S=c.length-1;S>d;S--){var I=c[S];(0,R.Yh)(I)&&(I.isHighlight=!0)}}c.push(O)}e.isFirstMessageInForumPost(o)&&c.push({type:L.ys_.FORUM_POST_ACTION_BAR})}));f&&(0,M.P1)(o)&&p.Z.trackExposure({});return c}var B=n(627027),F=n(798159),G=n(930948),H=n(896656);function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o} var W=n(496486),z=n.n(W),Y=n(809784),K=n(216151),q=n(496916),Q=n(26468),X=n(784426),J=n(60744),$=n(953727),ee=n(441143),te=n.n(ee),ne=n(4361),re=n(696978),oe=n(438355),ie=n(883650),ae=n(837162),le=n(798808),ue=n(490355),ce=n(61209),se=n(508754),fe=n(661123),de=n(791707),pe=n(550131),he=n(248088);function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Kt(e){e.stopPropagation()}function qt(e){ var t=e.channel,n=e.message,o=e.togglePopout,i=e.shouldShow,a=e.isFocused,l=(0,u.e7)([Rt.Z],(function(){return Rt.Z.remainingBurstCurrency})),s=(0,u.e7)([S.default],(function(){return S.default.getCurrentUser()})),f=(0,Zt.I5)(s),d=f?Fe.Z.Messages.ADD_BURST_REACTION:(0,r.jsx)(lt.X,{tooltipText:Fe.Z.Messages.ADD_BURST_REACTION}),p=(0,r.jsx)(lt.X,{tooltipText:Fe.Z.Messages.SUPER_REACTION_NITRO_TOOLTIP,textColor:"always-white"}),h=o;l<1&&(h=f?Dt.openOutOfBurstsModal:function(){return(0,ut.openBurstReactionsUpsellModal)({analytics:{type:Ft.cd.BURST_REACTION_UPSELL,page:null!=t.getGuildId()?L.ZY5.GUILD_CHANNEL:L.ZY5.DM_CHANNEL,section:(0,st.s4)(t),object:L.qAy.EMOJI_REACTION_PICKER_POPOUT_UPSELL}})});return(0,r.jsx)(nt.Z,{contentTypes:[$e.z$.BURST_REACTION_BUTTON_SPARKLE,$e.z$.BURST_REACTION_NITRO_TOOLTIP],children:function(e){var u=e.visibleContent,s=e.markAsDismissed;return(0,r.jsx)(c.yRy,{renderPopout:function(e){var r=e.closePopout;return tn(t,n,r,!0)},shouldShow:i,onRequestClose:o, position:Je.tq?"top":"left",align:Je.tq?"center":"top",children:function(e,r){e.onClick;var o=Yt(e,["onClick"]),i=r.isShown;return Xt(Wt({key:"add-burst-reaction",label:Fe.Z.Messages.ADD_BURST_REACTION,ariaLabel:Fe.Z.Messages.ADD_BURST_REACTION_A11Y.format({n:l}),tooltipText:f||u!==$e.z$.BURST_REACTION_NITRO_TOOLTIP?d:p,tooltipColor:f||u!==$e.z$.BURST_REACTION_NITRO_TOOLTIP?c.FGA.PRIMARY:c.FGA.BRAND,sparkle:a&&u===$e.z$.BURST_REACTION_BUTTON_SPARKLE,icon:yt.Z,channel:t,selected:i,message:n,onClick:function(){s();h()}},o))}})}})}function Qt(e){var t=e.message,n=e.channel,r=e.canReport,o=e.onClose,i=e.updatePosition;return(0,kt.useMessageMenu)({message:t,channel:n,textSelection:"",favoriteableType:null,favoriteableId:null,favoriteableName:null,itemHref:void 0,itemSrc:void 0,itemTextContent:void 0,canReport:r,onHeightUpdate:i,onClose:o,navId:"message-actions",ariaLabel:Fe.Z.Messages.MESSAGE_UTILITIES_A11Y_LABEL})}function Xt(e){ var t=e.label,n=e.ariaLabel,o=e.tooltipText,i=e.tooltipColor,a=e.icon,l=e.channel,u=e.message,s=e.onClick,f=e.key,d=e.disabled,p=e.dangerous,h=e.separator,y=e.sparkle,b=Yt(e,["label","ariaLabel","tooltipText","tooltipColor","icon","channel","message","onClick","key","disabled","dangerous","separator","sparkle"]);return(0,r.jsx)(c.ua7,{text:null!=o?o:t,color:null!=i?i:c.FGA.PRIMARY,"aria-label":t,hideOnClick:!0,tooltipClassName:Ht().tooltip,children:function(e){var o=e.onMouseEnter,i=e.onMouseLeave,c=e.onClick;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(At.zx,zt(Wt({onMouseEnter:o,onMouseLeave:i,onClick:function(e){null==c||c();s(l,u,e)},"aria-label":null!=n?n:t,disabled:d,dangerous:p},b),{children:[(0,r.jsx)(a,{className:Ht().icon}),h?(0,r.jsx)(At.Z0,{}):null,y&&(0,r.jsx)(pt.Z,{})]}))})}},f)}function Jt(e){var t=function(e){var t=e.channel,n=e.message,r=e.showEmojiPicker,o=e.showEmojiBurstPicker,i=e.showMoreUtilities,a=e.setPopout,l=e.isFocused,c=n.author,s=(0, u.e7)([dt.Z],(function(){return dt.Z.getGuild(t.guild_id)}),[t.guild_id]),d=(0,u.e7)([v.default],(function(){return v.default.getId()})),p=(0,rt.Z)(tt.t),h=(0,Ce.$R)(t),y=(0,Ce.Gu)(t),m=b.nc.useSetting(),O=b.Sb.useSetting(),C=(0,u.e7)([g.Z],(function(){return null==t.guild_id||g.Z.canChatInGuild(t.guild_id)}),[t]),j=(0,u.cj)([E.Z],(function(){return{canAddNewReactions:C&&E.Z.can(L.Plq.ADD_REACTIONS,t),canManageMessages:E.Z.can(L.Plq.MANAGE_MESSAGES,t)}}),[t,C]),S=j.canManageMessages,I=j.canAddNewReactions,_=(0,Ee.Ui)(t,n),w=(0,Ce.NE)(t,n),x=(0,u.e7)([Oe.Z],(function(){return null!=t.guild_id&&Oe.Z.isLurking(t.guild_id)}),[t]),P=c.id===d,N=(S||P)&&h&&n.type in L.HfH;n.type===L.uaV.AUTO_MODERATION_ACTION&&(N=N&&S);var A=(0,Mt.a4)(n)&&null!=p&&p===Bt.N.TREATMENT_1,T=(0,Lt.Z)(n,t,S),Z=!t.isSystemDM()&&(0,Ie.Z)(n,d)&&h&&!y,M=(0,_e.Z)({channel:t,canChat:C,renderReactions:m,canAddNewReactions:I,isLurking:x,isActiveChannelOrUnarchivableThread:h }).disableReactionCreates,R=t.type===L.d4z.GUILD_ANNOUNCEMENT&&null!=s&&s.hasFeature(L.oNc.NEWS)&&(P||S)&&n.type===L.uaV.DEFAULT,D=t.getGuildId(),k=null!=D&&(n.type===L.uaV.USER_JOIN||n.type===L.uaV.GUILD_INVITE_REMINDER)&&E.Z.canWithPartialContext(L.Plq.MANAGE_GUILD,{guildId:D}),U=it.Z.useExperiment({}).showTODOs,B=(0,u.e7)([at.Z],(function(){return null!=at.Z.getTODOMessages().find((function(e){return e.messageId===n.id}))})),F=(0,Ut.Z)(),G=(0,u.e7)([f.Z],(function(){return f.Z.keyboardModeEnabled})),H=F&&!G&&!r&&!o&&!i;return{channel:t,message:n,canPin:T,canEdit:Z,canDelete:N,canReport:A,canReply:_,canStartThread:w,canCopy:Se.wS,hasDeveloperMode:O,canReact:!M&&m,hasReactions:n.reactions.length>0,canPublish:R,canConfigureJoin:k,isExpanded:H,showEmojiPicker:r,showEmojiBurstPicker:o,showMoreUtilities:i,showMessageTODOActions:U,isMessageTODO:B,setPopout:a,isFocused:l,isGuildInviteReminder:n.type===L.uaV.GUILD_INVITE_REMINDER} }(e),n=t.channel,i=t.message,a=t.canCopy,l=t.canPin,s=t.canDelete,d=t.canReport,p=t.canEdit,h=t.canPublish,y=t.hasReactions,m=t.canReact,O=t.canConfigureJoin,C=t.canReply,j=t.canStartThread,S=t.isExpanded,I=t.showMoreUtilities,_=t.showEmojiPicker,w=t.showEmojiBurstPicker,x=t.showMessageTODOActions,P=t.isMessageTODO,N=t.setPopout,A=t.hasDeveloperMode,T=t.isGuildInviteReminder,Z=t.isFocused,M=o.useCallback((function(){I||Tt.default.track(L.rMx.MESSAGE_POPOUT_MENU_OPENED_DESKTOP,{message_id:i.id,channel:i.channel_id});N({moreUtilities:!I})}),[I,N,i]),R=o.useCallback((function(){N({emojiPicker:!_})}),[_,N]),D=o.useCallback((function(){N({emojiBurstPicker:!w})}),[w,N]),k=(0,et.Qd)(n.getGuildId()),U=k.enabled,B=k.hasTabUI,F=U&&!B,G=(0,Ce.$R)(n),H=i.hasFlag(L.iLy.CROSSPOSTED),V=[];U&&B&&V.push($e.z$.BURST_REACTION_BUTTON_SPARKLE);return(0,r.jsxs)(r.Fragment,{children:[S?(0,r.jsxs)(r.Fragment,{children:[a&&A?Xt({key:"copy-id",channel:n,message:i,label:Fe.Z.Messages.COPY_ID,icon:vt.Z, onClick:we.F4}):null,a&&!T?Xt({key:"copy-link",channel:n,message:i,label:Fe.Z.Messages.COPY_LINK,icon:gt.Z,onClick:we.fB}):null,O?Xt({key:"configure",channel:n,message:i,label:Fe.Z.Messages.CONFIGURE,icon:mt.Z,onClick:we.zW}):null,x?Xt({key:"mark-todo",channel:n,message:i,label:P?Fe.Z.Messages.MESSAGE_TODOS_MARK_AS_DONE:Fe.Z.Messages.MESSAGE_TODOS_MARK_AS_TODO,icon:P?bt.Z:jt.Z,onClick:P?we.sT:we.JS}):null,G?Xt({key:"mark-unread",channel:n,message:i,label:Fe.Z.Messages.MARK_UNREAD,icon:Ot.Z,onClick:we.B8}):null,l?Xt({key:"pin",channel:n,message:i,label:i.pinned?Fe.Z.Messages.UNPIN_MESSAGE:Fe.Z.Messages.PIN_MESSAGE,icon:_t.Z,onClick:we.rY}):null,C&&p?Xt({key:"reply-self",channel:n,message:i,label:Fe.Z.Messages.MESSAGE_ACTION_REPLY,icon:wt.Z,onClick:we.HH}):null,y?Xt({key:"reactions",channel:n,message:i,label:Fe.Z.Messages.VIEW_REACTIONS,icon:Ct.Z,onClick:function(e,t){return(0,we.op)(e,t)}}):null]}):null,m&&!T?(0,r.jsx)(nt.Z,{contentTypes:V,children:function(e){ var t=e.visibleContent,o=e.markAsDismissed;return(0,r.jsx)(c.yRy,{renderPopout:function(e){var t=e.closePopout;return tn(n,i,t)},shouldShow:_,onRequestClose:R,position:Je.tq?"top":"left",align:Je.tq?"center":"top",children:function(e,r){e.onClick;var a=Yt(e,["onClick"]),l=r.isShown;return Xt(Wt({key:"add-reaction",label:Fe.Z.Messages.ADD_REACTION,icon:ht.Z,channel:n,selected:l,message:i,sparkle:Z&&t===$e.z$.BURST_REACTION_BUTTON_SPARKLE,onClick:function(){o();R()}},a))}})}}):null,m&&!T&&F?(0,r.jsx)(qt,{channel:n,message:i,togglePopout:D,shouldShow:w,isFocused:Z}):null,C&&!p?Xt({key:"reply-other",channel:n,message:i,label:Fe.Z.Messages.MESSAGE_ACTION_REPLY,icon:wt.Z,onClick:we.HH}):null,p?Xt({key:"edit",channel:n,message:i,label:Fe.Z.Messages.EDIT,icon:It.Z,onClick:we.Hd}):null,j?Xt({key:"thread",channel:n,message:i,label:Fe.Z.Messages.CREATE_THREAD,icon:Pt.Z,onClick:we.gK}):null,!j&&i.hasFlag(L.iLy.HAS_THREAD)?Xt({key:"view-thread",channel:n,message:i,label:Fe.Z.Messages.VIEW_THREAD, icon:Pt.Z,onClick:we.qe}):null,h?Xt({key:"publish",channel:n,message:i,label:H?Fe.Z.Messages.NEWS_CHANNEL_PUBLISHED:Fe.Z.Messages.NEWS_CHANNEL_PUBLISH,icon:Et.Z,onClick:we.Xl,disabled:H,separator:!0}):null,s&&(T||S)?Xt({key:"delete",channel:n,message:i,label:Fe.Z.Messages.DELETE,icon:Nt.Z,onClick:we.$Z,dangerous:!0,separator:!S}):null,S&&s?null:(0,r.jsx)(c.yRy,{renderPopout:function(e){var t=e.updatePosition,o=e.closePopout;return(0,r.jsx)(Qt,{channel:n,message:i,canReport:d,onClose:o,updatePosition:t})},shouldShow:I,onRequestClose:M,position:"left",align:"top",animation:c.yRy.Animation.NONE,children:function(e,t){e.onClick;var r=Yt(e,["onClick"]),o=t.isShown;return Xt(Wt({key:"more",label:Fe.Z.Messages.MORE,icon:St.Z,channel:n,message:i,selected:o,onClick:M},r))}})]})}function $t(e){var t=e.channel,n=e.message,o=(0,u.e7)([ie.Z],(function(){return null!=ie.Z.getMessage(n.id)}),[n.id]),i=null==n.interaction||null!=n.interactionData&&(0,ot.$s)(n.interactionData),a=!o&&i;return(0, r.jsxs)(r.Fragment,{children:[a&&Xt({key:"retry",label:Fe.Z.Messages.RETRY,icon:xt.Z,channel:t,message:n,onClick:we.mG}),Xt({key:"delete-usent",label:Fe.Z.Messages.DELETE,icon:Nt.Z,channel:t,message:n,onClick:we.$Z})]})}function en(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null!=e&&(0,ct.rU)(t.id,n.id,(0,st.g1)(e),void 0,{burst:r})}function tn(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Wt({openPopoutType:"message_reaction_emoji_picker"},o&&{openPopoutType:"message_super_reaction_emoji_picker",page:null!=e.getGuildId()?L.ZY5.GUILD_CHANNEL:L.ZY5.DM_CHANNEL,section:(0,st.s4)(e),object:L.qAy.EMOJI_REACTION_PICKER_POPOUT});return(0,r.jsx)(ft.$,{channel:e,closePopout:n,onSelectEmoji:function(r,o,i){en(r,e,t,i);o&&n()},analyticsOverride:i,isBurstReaction:o})}const nn=o.memo((function(e){var t,n=e.channel,o=e.message,i=e.isHeader,l=(0,u.e7)([m.Z],(function(){return m.Z.isEditing(n.id,o.id)}),[n.id,o.id]),c=function(e){ var t=e.channel,n=e.message;return n.state===L.yb.SEND_FAILED?(0,r.jsx)($t,{channel:t,message:n}):null}(e),s=function(e){return e.message.state!==L.yb.SEND_FAILED?(0,r.jsx)(Jt,Wt({},e)):null}(e);return l||null==c&&null==s?null:(0,r.jsx)("div",{className:a()(e.className,(t={},Vt(t,Ht().container,!0),Vt(t,Ht().isHeader,i),t)),onClick:Kt,onContextMenu:Kt,role:"group","aria-label":Fe.Z.Messages.MESSAGE_UTILITIES_A11Y_LABEL,children:(0,r.jsxs)(At.ZP,{children:[c,s]})})}));var rn=n(13489),on=n.n(rn);function an(e,t,n,o){var i=e.message,a=e.channel,l=e.groupId,u=e.compact,c=void 0!==u&&u,s=n.emojiPicker,f=n.emojiBurstPicker,d=n.moreUtilities,p=i.state===L.yb.SENDING,h=i.id===l,y=(0,fe.yE)(i.flags,L.iLy.EPHEMERAL),b=i.state===L.yb.SEND_FAILED;return p||y&&!b?null:(0,r.jsx)(nn,{className:on().buttons,isHeader:!c&&h&&!(0,de.Z)(i),channel:a,message:i,setPopout:t,showEmojiPicker:s,showEmojiBurstPicker:f,showMoreUtilities:d,isFocused:o})}var ln=n(824803),un=n(62994),cn=o.memo((function(e){ var t=e.message,n=e.channel,i=e.compact,a=void 0!==i&&i,l=e.groupId,u=e.isGroupStart,c=e.usernameProfile,s=e.avatarProfile,f=e.setPopout,d=e.author,p=e.repliedMessage,h=e.roleIcon,y=(0,ge.wq)(t.author.id,n.id),b=(0,ge.XO)(t,n,c,f),v=(0,ge.R9)(s,f),m=o.useCallback((function(){return f({usernameProfile:!1,avatarProfile:!1,referencedUsernameProfile:!1})}),[f]);return(0,r.jsx)(ln.ZP,{guildId:n.guild_id,message:t,channel:n,repliedMessage:p,author:d,compact:a,subscribeToGroupId:l,showTimestampOnHover:!u&&a&&t.type!==L.uaV.REPLY,renderPopout:un.Z,showAvatarPopout:s,showUsernamePopout:c,onClickAvatar:v,onClickUsername:b,onContextMenu:y,onPopoutRequestClose:m,roleIcon:h})})),sn=o.memo(Be.Z);function fn(e){var t=e.messageProps,n=e.setPopout,o=e.messagePopouts,i=e.replyReference,a=e.author,l=e.repliedMessage,u=e.roleIcon,c=t.message,s=t.compact,f=t.channel,d=t.groupId,p=o.usernameProfile,h=o.avatarProfile;if((0,de.Z)(c))return null;var y=c.id===d;return y||s||null!=i?(0,r.jsx)(cn,{message:c, channel:f,compact:s,subscribeToGroupId:d,isGroupStart:y,groupId:d,setPopout:n,usernameProfile:p,avatarProfile:h,author:a,repliedMessage:l,roleIcon:u}):(0,r.jsx)(sn,{compact:!0,timestamp:c.timestamp,isInline:!1,id:(0,me.Dv)(c),isVisibleOnlyOnHover:!0,cozyAlt:!0})}var dn=n(913928),pn=n(281808),hn=n(889025),yn=n(944928),bn=n(30027),vn=n(39416),mn=n.n(vn);function gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function On(e){On=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return On(e)}function En(e,t){return!t||"object"!==jn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cn(e,t){Cn=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Cn(e,t)}var jn=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Sn(e){ var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=On(e);if(t){var o=On(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return En(this,n)}}function In(e){e.stopPropagation()}var _n=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Cn(e,t)}(n,e);var t=Sn(n);function n(){gn(this,n);var e;(e=t.apply(this,arguments)).node=o.createRef();e.onClickSave=function(){var t=e.props.textValue;e.onSubmit(t)};e.onSubmit=function(t){var n=e.props,r=n.message,o=n.channel,i=n.onConfirmDelete,a=n.onCancel,l=n.saveMessage,u=n.validateEdit;if(0===t.length){ i(o,r);a(o.id);return Promise.resolve({shouldClear:!1,shouldRefocus:!1})}return u({value:t,channel:o}).then((function(n){if(!n.valid)return Promise.resolve({shouldClear:!1,shouldRefocus:!1});var r=(0,yn.g)(t,{channel:o,isEdit:!0});null!=(null==r?void 0:r.content)&&(t=r.content);var i=bn.ZP.parse(e.props.channel,t);i.content!==e.props.message.content&&l(e.props.channel.id,e.props.message.id,i);a(o.id);return Promise.resolve({shouldClear:!0,shouldRefocus:!0})}))};e.onChange=function(t,n,r){var o=e.props,i=o.channel;(0,o.onChange)(i.id,n,r)};e.onKeyDown=function(t){if(t.keyCode===L.yXg.ESCAPE&&!t.shiftKey){var n=e.props,r=n.channel,o=n.onCancel;t.preventDefault();t.stopPropagation();o(r.id)}};return e}n.prototype.render=function(){var e=this.props,t=e.className,n=e.textValue,o=e.richValue,i=e.message,a=e.channel,l=e.onCancel,u=e.children;return(0,r.jsxs)("div",{className:t,ref:this.node,onContextMenu:In,children:[u({textValue:n,richValue:o,message:i,channel:a,onChange:this.onChange, onSubmit:this.onSubmit,onKeyDown:this.onKeyDown}),(0,r.jsx)("div",{className:mn().operations,children:Fe.Z.Messages.EDIT_TEXTAREA_HELP.format({onCancel:function(){return l(a.id)},onSave:this.onClickSave})})]})};return n}(o.PureComponent),wn=n(476770);function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tr(e){var t=e.id,n=e.message,i=e.message.id,s=e.channel,d=e.channel.id,p=e.compact,h=void 0!==p&&p,y=e.className,v=e.flashKey,g=e.groupId,O=e.isHighlight,E=e.renderContentOnly;te()(n.type!==L.uaV.THREAD_STARTER_MESSAGE,"Message must not be a thread starter message");var C,j,S,I=L.OBS.has(n.type)?n.messageReference:void 0,_=(0,l.JA)(null!==(C=e.id)&&void 0!==C?C:""),w=_.onFocus,x=er(_,["onFocus"]),P=b.RS.useSetting(),N=b.NA.useSetting(),A=P&&N,T=(0,u.e7)([ue.Z],(function(){return ue.Z.getMessageByReference(I)})),Z=(0,Ne.Z)(n.id,R.d$),M=Z.popouts,D=Z.selected,k=Z.setPopout,U=(0,ge.qo)(n,s,k),B=(0, ge.Go)(n,s),F=(0,ge.tn)(g,n.author.id,D),G=F.handleMouseEnter,H=F.handleMouseLeave,V=F.hasHovered,W=F.isHovered,z=(0,ge.bb)(w),Y=z.isFocused,K=z.hasFocused,q=z.handleFocus,Q=z.handleBlur,X=(0,u.e7)([m.Z],(function(){return m.Z.isEditing(d,i)}),[d,i]),J=(0,u.e7)([f.Z],(function(){return f.Z.keyboardModeEnabled})),$=D||X||J&&Y,ee=$||W,he=(0,u.e7)([ce.Z],(function(){return n.hasFlag(L.iLy.HAS_THREAD)&&ce.Z.getChannel(n.id)})),ye=n.isFirstMessageInForumPost(s),be=(0,ne.dj)(n.id),Oe=(0,ne.tu)(s.guild_id,n.id),Ee=be||Oe,Ce=(0,Ae.Z)(n,{hideSimpleEmbedContent:A,isInteracting:ee,formatInline:!1,allowList:ye||Ee,allowHeading:ye||Ee,allowLinks:Ee,previewLinkTarget:Ee}),je=Ce.content,Se=Ce.hasSpoilerEmbeds,Ie=Pe(i,d,J),_e=(0,pe.ZP)(n),we=(0,u.e7)([le.Z],(function(){return le.Z.getPendingReply(d)})),xe=function(e){var t=o.useRef(e);o.useEffect((function(){t.current=null!=e?e:t.current}));return null!=e?e:t.current}(v),Ze=(0,ae.p9)({guildId:s.guild_id,roleId:_e.iconRoleId}),Me=(0,me.iG)(n,g),Re=(0, me.Gx)(n),Le=null!=(0,u.e7)([ie.Z],(function(){return ie.Z.getMessage(i)}),[i]),De=!X&&Le?function(e,t){var n=e.message,o=e.compact;return(0,r.jsx)(Xe,{message:n,content:t,compact:o})}(e,je):Rn(e,je,X),ke=n.id===g,Ue=(0,re.A)(),Be=O&&ke?(0,r.jsxs)("div",{className:on().highlightContainer,children:[(0,r.jsx)(oe.Z,{className:on().highlightIcon,width:10,height:10}),(0,r.jsx)(c.xvT,{style:{color:Ue},variant:"text-sm/medium",children:Fe.Z.Messages.HIGHLIGHT})]}):null,Ge=(0,r.jsx)(c.tEY,{offset:{left:4,right:4},children:(0,r.jsx)("li",{id:t,className:on().messageListItem,"aria-setsize":-1,children:(0,r.jsx)(se.Z,$n(Jn({},x),{"aria-setsize":-1,"aria-roledescription":Fe.Z.Messages.MESSAGE_A11Y_ROLE_DESCRIPTION,"aria-labelledby":Me,"aria-describedby":Re,onFocus:q,onBlur:Q,onContextMenu:U,onKeyDown:Ie,onClick:B,compact:h,contentOnly:E,className:a()(y,(j={},Qn(j,on().message,!0),Qn(j,on().cozyMessage,!h),Qn(j,on().mentioned,n.mentioned&&!(0,de.Z)(n)),Qn(j,on().highlighted,O), Qn(j,on().ephemeral,(0,fe.yE)(n.flags,L.iLy.EPHEMERAL)),Qn(j,on().systemMessage,(0,de.Z)(n)),Qn(j,on().groupStart,!E&&(ke||n.type===L.uaV.REPLY)),Qn(j,on().selected,$),Qn(j,on().replying,(null==we?void 0:we.message.id)===n.id),Qn(j,on().interactionSending,n.isCommandType()&&n.state===L.yb.SENDING),Qn(j,on().automodMessage,Le),j)),zalgo:!X,childrenHighlight:Be,childrenRepliedMessage:E?void 0:Kn(e,k,M,I,T),childrenExecutedCommand:Un(e,k,M),childrenHeader:E?void 0:fn({messageProps:e,setPopout:k,messagePopouts:M,replyReference:I,author:_e,repliedMessage:T,roleIcon:Ze}),childrenAccessories:(0,Te.Z)({channelMessageProps:e,hasSpoilerEmbeds:Se,handleContextMenu:U,isInteracting:ee}),childrenButtons:V||K?an(e,k,M,W||Y):void 0,childrenSystemMessage:(0,qn.Z)(e),childrenMessageContent:De,onMouseMove:G,onMouseLeave:H,hasThread:!E&&n.hasFlag(L.iLy.HAS_THREAD)&&null!=he,isSystemMessage:(0,de.Z)(n),hasReply:n.type===L.uaV.REPLY}))})});return null!=xe?(0,r.jsx)(ve,{flashKey:xe,className:a()((S={}, Qn(S,on().backgroundFlash,!0),Qn(S,on().groupStart,!h&&n.id===g),S)),children:Ge},"bg-flash-".concat(t)):Ge}function nr(e){var t,n=e.id,o=e.message,i=e.message.messageReference,c=e.compact,s=void 0!==c&&c,f=e.className;te()(o.type===L.uaV.THREAD_STARTER_MESSAGE,"Message must be a thread starter message");var d,p=Xn({},(0,l.JA)(null!==(t=e.id)&&void 0!==t?t:"")),h=(0,u.e7)([ue.Z],(function(){return ue.Z.getMessageByReference(i)})),y=(0,Ne.Z)(o.id,R.d$),b=y.popouts,v=y.setPopout,m=(0,pe.ZP)(o),g=(0,me.iG)(o),O=(0,me.Gx)(o);return o.type===L.uaV.THREAD_STARTER_MESSAGE&&null!=h&&h.state===ue.Y.LOADED?(0,r.jsx)(rr,$n(Jn({},e),{message:h.message,groupId:h.message.id})):(0,r.jsx)(se.Z,$n(Jn({},p),{id:n,compact:s,className:a()(f,(d={},Qn(d,on().message,!0),Qn(d,on().cozyMessage,!s),Qn(d,on().systemMessage,!0),Qn(d,on().groupStart,!0),d)),childrenHeader:fn({messageProps:e,setPopout:v,messagePopouts:b,replyReference:i,author:m}),childrenSystemMessage:(0,qn.Z)(e),childrenMessageContent:null, "aria-labelledby":g,"aria-describedby":O,hasThread:!1}))}function rr(e){var t,n,i=e.id,s=e.message,d=e.message,p=d.id,h=d.channel_id,y=e.channel.guild_id,v=e.compact,m=void 0!==v&&v,g=e.className,O=e.groupId,E=s.type===L.uaV.REPLY?s.messageReference:void 0,C=(0,l.JA)(null!==(t=e.id)&&void 0!==t?t:""),j=C.onFocus,S=er(C,["onFocus"]),I=(0,ge.bb)(j),_=I.isFocused,w=I.handleFocus,x=I.handleBlur,P=(0,Ne.Z)(s.id,R.d$),N=P.popouts,A=P.selected,T=P.setPopout,Z=b.RS.useSetting(),M=b.NA.useSetting(),D=Z&&M,k=(0,u.e7)([ue.Z],(function(){return ue.Z.getMessageByReference(E)})),U=(0,ge.tn)(O,s.author.id,A),B=U.handleMouseEnter,F=U.handleMouseLeave,G=U.isHovered,H=(0,u.e7)([f.Z],(function(){return f.Z.keyboardModeEnabled})),V=A||H&&_,W=V||G,z=(0,Ae.Z)(s,{hideSimpleEmbedContent:D,isInteracting:W,formatInline:!1}),Y=z.content,K=z.hasSpoilerEmbeds,q=Pe(p,h,H),Q=(0,pe.ZP)(s),J=(0,me.iG)(s,O),$=(0,me.Gx)(s),ee=Rn(e,Y,!1),te=o.useCallback((function(){return(0,X.XU)(y,h,p)}),[y,h,p]),ne=(0,ae.p9)({ guildId:y,roleId:Q.iconRoleId});return(0,r.jsxs)("div",{className:on().quotedChatMessage,children:[(0,r.jsx)(c.P3F,{className:on().jump,onClick:te,"aria-label":Fe.Z.Messages.JUMP,children:Fe.Z.Messages.JUMP}),(0,r.jsx)(se.Z,$n(Jn({},S),{id:i,compact:m,className:a()(g,(n={},Qn(n,on().message,!0),Qn(n,on().cozyMessage,!m),Qn(n,on().mentioned,s.mentioned&&!(0,de.Z)(s)),Qn(n,on().ephemeral,(0,fe.yE)(s.flags,L.iLy.EPHEMERAL)),Qn(n,on().systemMessage,(0,de.Z)(s)),Qn(n,on().groupStart,s.id===O||s.type===L.uaV.REPLY),Qn(n,on().selected,V),n)),zalgo:!0,onKeyDown:q,onFocus:w,onBlur:x,childrenRepliedMessage:Kn(e,T,N,E,k),childrenHeader:fn({messageProps:e,setPopout:T,messagePopouts:N,replyReference:E,author:Q,repliedMessage:k,roleIcon:ne}),childrenAccessories:(0,Te.Z)({channelMessageProps:e,hasSpoilerEmbeds:K,isInteracting:W,renderThreadAccessory:!1,renderComponentAccessory:!1,renderSuppressEmbeds:!1}),childrenSystemMessage:(0,qn.Z)(e),childrenMessageContent:ee,onMouseMove:B,onMouseLeave:F, "aria-labelledby":J,"aria-describedby":$,hasThread:!1}))]})}const or=o.memo(tr);function ir(e,t){for(var n=e.offsetTop,r=e.offsetParent;null!=r&&r!==t&&(0,Y.k)(r,HTMLElement);){var o;n+=null!==(o=r.offsetTop)&&void 0!==o?o:0;r=r.offsetParent}return n}function ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?n:1)])&&void 0!==i?i:a[l-1];return null!=u?u:null}var pr={scrollTop:0,scrollHeight:0,offsetHeight:0},hr=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.ref=o.createRef();this.automaticAnchor=null;this.messageFetchAnchor=null;this.focusAnchor=null;this.jumping=!1;this.dragging=!1;this.isAtBottom=!1;this.prevScrollTop=null;this.anchorTimeout=null;this.initialScrollTop=null;this.acking=!1;this.scrollCounter=0;this.offsetHeightCache=0;this.scrollHeightCache=0;this.scrollTopCache=-1;this._bottomAnchor=null;this._automaticAnchorCallbacks=[];this._scrollCompleteCallbacks=[] ;this.updateVisibleMessagesDebounced=z().debounce(J.JR,300);this.handleScroll=function(e){var t;if(n.isInitialized()){var r=n.getScrollerState(),o=n.isScrolledToBottom(r);if(o!==n.isAtBottom)if(o){n.isAtBottom=!0;n.props.handleScrollToBottom()}else{n.isAtBottom=!1;n.props.handleScrollFromBottom()}if(r.offsetHeight!==n.offsetHeightCache||r.scrollHeight!==n.scrollHeightCache){n.scrollCounter=0;clearTimeout(n.anchorTimeout);n.isPinned()||(null==n.automaticAnchor?n.setAutomaticAnchor(n.findAnchor()):n.updateAutomaticAnchor(r.scrollTop,!0));clearTimeout(n.anchorTimeout);n.fixScrollPosition(r.offsetHeight,r.scrollHeight);n.scrollTopCache=r.scrollTop}else{if(null!=e&&e.target!==(null===(t=n.ref.current)||void 0===t?void 0:t.getScrollerNode()))return;if(n.scrollTopCache!==r.scrollTop){n.pinned=o;n.scrollCounter=Math.min(n.scrollCounter+1,5);n.pinned?n.cleanAutomaticAnchor():null!=n.automaticAnchor?n.updateAutomaticAnchor(r.scrollTop,!0):n.setAutomaticAnchor(n.findAnchor()) ;n.scrollTopCache=r.scrollTop;clearTimeout(n.anchorTimeout);n.anchorTimeout=setTimeout((function(){n.scrollCounter=0;n.anchorTimeout=null;n.prevScrollTop=null;var e=n.getScrollerState(),t=e.scrollHeight,r=e.offsetHeight;if(n.isHeightChange(r,t))n.handleScroll();else{n.cleanAutomaticAnchor();n.isPinned()||n.setAutomaticAnchor(n.findAnchor())}}),35)}}n.handleFocusAnchorScroll(r.scrollTop,r.offsetHeight);n.updateStoreDimensionsDebounced();if(n.isScrollLoadingDisabled()){n.props.canLoadMore||n.enableAutomaticAck();return n.handleScrollSpeed(r)}var i=n.isInScrollTriggerLoadingRegion(r);1===i?n.loadMore():2===i?n.loadMore(!0):n.enableAutomaticAck();n.handleScrollSpeed(r)}};this.handleResize=function(e,t){var r=n.offsetHeightCache,o=n.scrollHeightCache;"container"===t?r=e.contentRect.height:"content"===t&&(o=e.contentRect.height);n.isHeightChange(r,o)&&n.fixScrollPosition(r,o)};this.handleMouseDown=function(e){e.target===e.currentTarget&&(n.dragging=!0)};this.handleMouseUp=function(){ n.dragging=!1;n.handleScroll()};this.loadMore=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=n.props.messages;if(r){var i=o.last();null!=i&&(t=i.id)}else{var a=o.first();null!=a&&(e=a.id)}n.messageFetchAnchor=n.findFetchAnchor(r);n.loading=!0;s.Z.fetchMessages({channelId:n.props.channel.id,before:e,after:t,limit:L.AQB,truncate:!0})};this.updateStoreDimensionsDebounced=z().debounce(this.updateStoreDimensions,200);this.props=t;this.loading=t.messages.loadingMore;var r=$.Z.getChannelDimensions(t.channel.id);if(null!=t.messages.jumpTargetId)this.pinned=!1;else{var i;this.initialScrollTop=null!==(i=null==r?void 0:r.scrollTop)&&void 0!==i?i:null;this.pinned=null==r}}var t=e.prototype;t.isReady=function(){return this.props.messages.ready};t.isLoading=function(){return this.loading||this.props.messages.loadingMore};t.isPinned=function(){return this.pinned};t.isJumping=function(){return this.jumping};t.isDragging=function(){return this.dragging} ;t.isInitialized=function(){return void 0===this.initialScrollTop};t.isScrollLoadingDisabled=function(){return this.isLoading()||!this.isInitialized()||this.isJumping()||this.isDragging()||!this.props.canLoadMore};t.isActivelyScrolling=function(){return this.scrollCounter>=5};t.getDocument=function(){var e,t;return null===(t=null===(e=this.ref.current)||void 0===e?void 0:e.getScrollerNode())||void 0===t?void 0:t.ownerDocument};t.getElementFromMessageId=function(e){var t=this.getDocument(),n=this.props.channel.id;return null==t?null:function(e,t,n){return e.getElementById((0,H.p)(t,n))}(t,n,e)};t.isScrolledToBottom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getScrollerState(),t=e.scrollTop,n=e.scrollHeight,r=e.offsetHeight;return t>=n-r-R.kQ&&!this.props.messages.hasMoreAfter};t.mergePropsAndUpdate=function(e){this.mergePropsAndUpdate_(e);this.props.messages.ready&&this.enableAutomaticAck()};t.mergePropsAndUpdate_=function(e){ var t=this.props.messages,n=this.props.focusId;this.props=function(e){for(var t=1;t=this.newMessageBarBuffer()?this.newMessageBarBuffer():0,l=null,u=function(e){var n;return-1===e?r.id:null===(n=t._array[e])||void 0===n?void 0:n.id},c=-1,s=!1;;){var f=u(c);if(null==f)break;var d=this.getAnchorData(f,i);this._bottomAnchor=d;if(s&&null!=d&&d.offsetTop>i+a+o.offsetHeight)break;if(s)c++;else{if(null!=d&&(d.offsetTop>=i+a||c===t.length-1)){l=d;s=!0}c++}}return l};t.findFetchAnchor=function(e){for(var t=this.props.messages,n=this.getScrollerState().scrollTop,r=e?-1:1,o=null,i=t._array.length-1,a=e?i:0;null!=t._array[a];a+=r){var l=t._array[a],u=this.getAnchorData(l.id,n);if(null!=u){o=u;break}}return o};t.getAnchorFixData=function(){ var e=[this.focusAnchor,this.isLoading()?null:this.messageFetchAnchor,this.automaticAnchor],t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(null!=a){var l=this.getElementFromMessageId(a.id);if((0,Y.k)(l)){var u=a===this.messageFetchAnchor?a.offsetHeight-l.offsetHeight:0;return{node:l,fixedScrollTop:l.offsetTop-(a.offsetFromTop+u)}}}}}catch(e){n=!0;r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return null};t.fixAnchorScrollPosition=function(){var e=this.getAnchorFixData();if(null!=e){var t=e.node,n=e.fixedScrollTop;if(null!=this.focusAnchor){var r;this.isPinned()?this.scrollTo(Number.MAX_SAFE_INTEGER,!1,this.handleScroll):this.mergeTo(n,this.handleScroll);null===(r=this.ref.current)||void 0===r||r.scrollIntoViewNode({node:t,padding:R.kQ,callback:this.handleScroll})}else this.mergeTo(n,this.handleScroll);this.isActivelyScrolling()?this.setAutomaticAnchor(null):this.setAutomaticAnchor(this.findAnchor()) ;this.isLoading()||(this.messageFetchAnchor=null)}else this.handleScroll()};t.hasAnchor=function(){return null!=this.focusAnchor||null!=this.messageFetchAnchor||null!=this.automaticAnchor};t.updateFocusAnchor=function(e,t,n){var r=this.focusAnchor=null!=e?this.getAnchorData(e,t):null;null!=r&&(r.offsetFromTop>=n||t>r.offsetTop+r.offsetHeight)&&(this.focusAnchor=null)};t.handleFocusAnchorScroll=function(e,t){var n;this.updateFocusAnchor(null===(n=this.focusAnchor)||void 0===n?void 0:n.id,e,t)};t.updateFetchAnchor=function(e,t,n){var r,o=null===(r=this.ref.current)||void 0===r?void 0:r.getScrollerNode();null!=this.messageFetchAnchor&&null!=o&&(this.messageFetchAnchor=this.getAnchorData(this.messageFetchAnchor.id,e,this.isInPlaceholderRegion({scrollTop:e,offsetHeight:t,scrollHeight:n})>0?t:void 0))};t.updateAutomaticAnchor=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null===(t=this.ref.current)||void 0===t?void 0:t.getScrollerNode() ;if(null!=this.automaticAnchor&&null!=r){var o=this.getAnchorData(this.automaticAnchor.id,e);n&&null!=o&&null!=this.automaticAnchor&&(o.offsetFromTop=this.automaticAnchor.offsetFromTop);this.setAutomaticAnchor(o)}};t.setAutomaticAnchor=function(e){var t,n,r=this;this.automaticAnchor=e;null===(t=this._automaticAnchorCallbacks)||void 0===t||t.forEach((function(e){return e(r.automaticAnchor,r._bottomAnchor)}));this.updateVisibleMessagesDebounced(null==e?void 0:e.id,null===(n=this._bottomAnchor)||void 0===n?void 0:n.id)};t.getScrollerState=function(){var e,t;return null!==(t=null===(e=this.ref.current)||void 0===e?void 0:e.getScrollerState())&&void 0!==t?t:pr};t.isHeightChange=function(e,t){return e!==this.offsetHeightCache||t!==this.scrollHeightCache};t.isInPlaceholderRegion=function(e){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,o=this.props,i=o.messages,a=o.placeholderHeight,l=a,u=r-n-a;return i.hasMoreBefore&&tn?1:i.hasMoreAfter&&t>=u?2:0} ;t.isInScrollTriggerLoadingRegion=function(e){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,o=this.props.messages;return o.hasMoreBefore&&t<=this.getOffsetToTriggerLoading("top",e)&&r>n?1:o.hasMoreAfter&&t>=this.getOffsetToTriggerLoading("bottom",e)?2:0};t.handleScrollSpeed=function(e){if(!this.isJumping()&&!this.isDragging()&&this.props.canLoadMore){var t=e.scrollTop,n=e.offsetHeight,r=e.scrollHeight,o=this.prevScrollTop,i=this.props.placeholderHeight;this.prevScrollTop=t;if(null!=o){var a=this.isInPlaceholderRegion(e),l=t-o;if(0!==a)if(1===a&&t+l<=0){this.mergeTo(i-n);this.prevScrollTop=i-n}else if(2===a&&t+l>=r-n){this.mergeTo(r-i);this.prevScrollTop=r-i}}}};t.enableAutomaticAck=function(){var e=this;if(this.isInitialized()&&!this.acking){this.acking=!0;this.updateStoreDimensions((function(){(0,q.CZ)(e.props.channel.id,e.props.windowId)}))}};t.fixScrollPosition=function(e,t){this.offsetHeightCache=e;this.scrollHeightCache=t;this.fixJumpTarget() ;this.isPinned()&&null==this.messageFetchAnchor&&null==this.focusAnchor?this.scrollTo(Number.MAX_SAFE_INTEGER,!1,this.handleScroll):this.fixAnchorScrollPosition()};t.fixJumpTarget=function(){if(this.isJumping()){var e=this.props,t=e.messages,n=e.hasUnreads;if(null!=t.jumpTargetId){var r=dr(t);if(null==r)return;var o=this.getElementFromMessageId(r);(0,Y.k)(o)?this.scrollTo(this.getOffsetOrientationFromNode(o,"middle",n?this.newMessageBarBuffer():R.kQ),!0):this.scrollToNewMessages(!0,"middle")}else this.scrollTo(Number.MAX_SAFE_INTEGER,!0)}};t.scrollToNewMessages=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",r=arguments.length>2?arguments[2]:void 0,o=this,i=null===(e=this.getDocument())||void 0===e?void 0:e.getElementById(R.j1),a=function(){o.jumping=!1;o.setAutomaticAnchor(o.findAnchor());null!=r&&r();o.handleScroll()};this.pinned=!1;this.jumping=t ;null!=i?this.scrollTo(this.getOffsetOrientationFromNode(i,n,this.newMessageBarBuffer()),t,a):this.scrollTo(this.getOffsetToPreventLoading("top"),t,a)};t.getOffsetOrientationFromNode=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=null===(n=this.ref.current)||void 0===n?void 0:n.getScrollerNode();if(null==o)return 0;var i=this.getScrollerState(),a=ir(e,o);return"middle"===t?Math.min(a-.5*i.offsetHeight+.5*e.offsetHeight-8,a-r):a-r};t.restoreScroll=function(){if(!this.isInitialized()){var e=this.initialScrollTop;this.initialScrollTop=void 0;var t=dr(this.props.messages);null!=t?this.scrollToMessage(t,!1):this.props.hasUnreads&&this.props.channel.type!==L.d4z.GUILD_VOICE&&this.props.channel.type!==L.d4z.GUILD_STAGE_VOICE?this.scrollToNewMessages():null!=e?this.scrollTo(e+this.props.placeholderHeight,!1,this.handleScroll):this.setScrollToBottom()}};t.scrollTo=function(e){ var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;null===(t=this.ref.current)||void 0===t||t.scrollTo({to:e,animate:!f.Z.useReducedMotion&&n,callback:r});this.isPinned()?this.updateStoreDimensions():this.updateStoreDimensionsDebounced()};t.mergeTo=function(e,t){var n;null===(n=this.ref.current)||void 0===n||n.mergeTo({to:e,callback:t});this.isPinned()?this.updateStoreDimensions():this.updateStoreDimensionsDebounced()};t.setScrollToBottom=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this,n=this.props,r=n.messages,o=n.channel;r.hasMoreAfter?fr(o):this.scrollTo(Number.MAX_SAFE_INTEGER,e,(function(){t.jumping=!1;t.handleScroll()}))};t.updateStoreDimensions=function(e){if(!this.isJumping()&&this.isInitialized()){var t=this.props.channel;if(this.isPinned())K.Z.clearChannelDimensions(t.id,e);else{var n=this.props.placeholderHeight,r=this.getScrollerState(),o=r.scrollTop,i=r.scrollHeight,a=r.offsetHeight ;K.Z.updateChannelDimensions(t.id,o-n,i-n,a,e)}}};t.scrollIntoViewRect=function(){};t.scrollPageUp=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.ref.current)||void 0===e||e.scrollPageUp({animate:t})};t.scrollPageDown=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.ref.current)||void 0===e||e.scrollPageDown({animate:t})};t.scrollToMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this;if(null!=this.ref.current)if(e!==this.props.channel.id){var o=this.getElementFromMessageId(e);if(!this.isJumping()&&t&&null!=n&&!f.Z.useReducedMotion){var i=T.Z.extractTimestamp(e);i>n?this.scrollTo(0):this.scrollTo(Number.MAX_SAFE_INTEGER)}this.pinned=!1;this.jumping=!0;var a=function(){r.jumping=!1;(0,Y.k)(o)&&f.Z.keyboardModeEnabled&&o.focus({preventScroll:!0});r.scrollCounter=0;r.handleScroll();r._scrollCompleteCallbacks.forEach((function(e){ return e()}))};(0,Y.k)(o)?this.scrollTo(this.getOffsetOrientationFromNode(o,"middle",this.props.hasUnreads?this.newMessageBarBuffer():R.kQ),t,a):this.scrollToNewMessages(t,"middle",a)}else this.scrollTo(0)};t.getOffsetToTriggerLoading=function(e,t){var n=t.scrollHeight,r=t.offsetHeight,o=this.props,i=o.messages,a=o.hasUnreads,l=o.placeholderHeight;return"top"===e?i.hasMoreBefore?a?l-R.D4-2:l+500:0:i.hasMoreAfter?n-r-l-500:n-r};t.getOffsetToPreventLoading=function(e){var t=this.props.messages,n=0;"top"===e&&t.hasMoreBefore?n=2:"bottom"===e&&t.hasMoreAfter&&(n=-2);return this.getOffsetToTriggerLoading(e,this.getScrollerState())+n};t.getSnapshotBeforeUpdate=function(e){if(this.hasAnchor()||null!=e){var t=this.getScrollerState(),n=t.scrollTop,r=t.offsetHeight,o=t.scrollHeight;this.updateFocusAnchor(e,n,r);this.updateFetchAnchor(n,r,o);this.updateAutomaticAnchor(n)}};t.addAutomaticAnchorCallback=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1] ;this._automaticAnchorCallbacks.push(e);this._automaticAnchorCallbacks=z().uniq(this._automaticAnchorCallbacks);!0===t&&this.setAutomaticAnchor(this.findAnchor())};t.removeAutomaticAnchorCallback=function(e){this._automaticAnchorCallbacks=z().without(this._automaticAnchorCallbacks,e)};t.addScrollCompleteCallback=function(e){this._scrollCompleteCallbacks.push(e);this._scrollCompleteCallbacks=z().uniq(this._scrollCompleteCallbacks)};t.removeScrollCompleteCallback=function(e){this._scrollCompleteCallbacks=z().without(this._scrollCompleteCallbacks,e)};t.cleanup=function(){var e=this;this.acking=!1;this.updateStoreDimensionsDebounced.cancel();this._automaticAnchorCallbacks.forEach((function(t){return e.removeAutomaticAnchorCallback(t)}));(0,q.jT)(this.props.channel.id,this.props.windowId)};return e}();var yr=n(730381),br=n.n(yr),vr=n(268319),mr=n(151650),gr=n(34225);function Or(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} function Er(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Cr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var jr=o.forwardRef((function(e,t){var n,o=e.className,i=e.isBeforeGroup,l=void 0!==i&&i,u=Cr(e,["className","isBeforeGroup"]),c=u.children;return(0, r.jsx)(gr.Z,Er(function(e){for(var t=1;t3?3:n.length)-1,l=(0,r.jsx)("img",{src:i,alt:"",className:to().avatar},t);return a?l:(0,r.jsx)(Yr.ZP,{className:to().avatarMask,mask:Yr.ZP.Masks.VOICE_USER_SUMMARY_ITEM,width:24,height:24,children:l},t)})).filter((function(e){return null!=e})):[]}),[n]);if(null==n||0===n.length)return(0,r.jsx)(c.xvT,{color:"header-secondary",variant:"text-sm/normal", children:Fe.Z.Messages.NO_MUTUAL_GUILDS});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:to().avatarContainer,children:i}),(0,r.jsx)(c.P3F,{onClick:function(){(0,Wr.m)({userId:t,section:$r.oh.MUTUAL_GUILDS,analyticsLocation:{section:L.jXE.DIRECT_MESSAGE}})},children:(0,r.jsx)(c.xvT,{className:to().mutualGuilds,variant:"text-sm/normal",children:Fe.Z.Messages.USER_PROFILE_MUTUAL_GUILDS.format({count:n.length})})})]})},ro=function(e){var t,n=e.relationshipType,o=e.userId,i=e.showingBanner,a=null===(t=S.default.getUser(o))||void 0===t?void 0:t.bot,l=function(){Ur.Z.addRelationship({userId:o,context:{location:L.ZY5.DM_CHANNEL}})},u=(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,color:c.zxk.Colors.PRIMARY,onClick:function(){Ur.Z.addRelationship({userId:o,context:{location:L.ZY5.DM_CHANNEL},type:L.OGo.BLOCKED})},children:Fe.Z.Messages.BLOCK});switch(n){case L.OGo.NONE:return(0,r.jsxs)(r.Fragment,{children:[!a&&!i&&(0,r.jsx)(c.zxk,{className:to().action, size:c.zxk.Sizes.TINY,onClick:l,children:Fe.Z.Messages.ADD_FRIEND}),u]});case L.OGo.FRIEND:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){Ur.Z.removeFriend(o,{location:L.ZY5.DM_CHANNEL})},color:c.zxk.Colors.PRIMARY,children:Fe.Z.Messages.REMOVE_FRIEND}),u]});case L.OGo.BLOCKED:return(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){Ur.Z.unblockUser(o,{location:L.ZY5.DM_CHANNEL})},color:c.zxk.Colors.PRIMARY,children:Fe.Z.Messages.UNBLOCK});case L.OGo.PENDING_INCOMING:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.xvT,{className:to().action,color:"header-secondary",variant:"text-sm/normal",children:Fe.Z.Messages.FRIEND_REQUEST_RECEIVED}),(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:l,children:Fe.Z.Messages.FRIEND_REQUEST_ACCEPT}),(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,color:c.zxk.Colors.PRIMARY,onClick:function(){ Ur.Z.cancelFriendRequest(o,{location:L.ZY5.DM_CHANNEL})},children:Fe.Z.Messages.FRIEND_REQUEST_IGNORE}),u]});case L.OGo.PENDING_OUTGOING:return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,disabled:!0,children:Fe.Z.Messages.ADD_FRIEND_BUTTON_AFTER}),u]});default:return null}},oo=function(e){var t=e.channelId,n=e.otherUserId,i=o.useCallback((function(){(0,c.CFj)((0,c.Yz2)(Fe.Z.Messages.MESSAGE_REQUESTS_SPAM_REQUEST_ERROR_ALERT_TITLE,c.pCN.FAILURE))}),[]),a=o.useCallback((function(){Vr.Z.closeChannelSidebar(zr.uZ)}),[]),l=o.useCallback((function(){Vr.Z.closeChannelSidebar(zr.uZ)}),[]),u=(0,Fr.m)({user:S.default.getUser(n),onError:i,onAcceptSuccess:l,onRejectSuccess:a}),s=u.acceptMessageRequest,f=u.rejectMessageRequest,d=u.isAcceptLoading,p=u.isRejectLoading,h=u.isOptimisticAccepted,y=u.isOptimisticRejected,b=d||p||(h||y);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){ return s(t)},disabled:b,submitting:d,children:Fe.Z.Messages.MESSAGE_REQUEST_ACCEPT}),(0,r.jsx)(c.zxk,{className:to().action,size:c.zxk.Sizes.TINY,onClick:function(){return f(t)},color:c.zxk.Colors.PRIMARY,disabled:b,submitting:p,children:Fe.Z.Messages.MESSAGE_REQUEST_IGNORE})]})};const io=function(e){var t=e.userId,n=e.channel,o=e.showingBanner,i=(0,Gr._)().channelId,a=(0,u.e7)([Br.Z],(function(){return null!=i&&Br.Z.isSpam(i)}),[i]),l=(0,u.e7)([Ln.Z],(function(){return Ln.Z.getRelationshipType(t)}),[t]),c=n.id===i;return a||c?(0,r.jsxs)("div",{className:to().mobileContainer,children:[(0,r.jsx)("div",{className:to().mobileMutualGuilds,children:(0,r.jsx)(no,{userId:t})}),(0,r.jsxs)("div",{className:to().mobileButtons,children:[(0,r.jsx)(oo,{channelId:n.id,otherUserId:t}),(0,r.jsx)(Hr.Z,{channel:n})]})]}):!0===Je.tq||c?(0,r.jsxs)("div",{className:to().mobileContainer,children:[(0,r.jsx)("div",{className:to().mobileMutualGuilds,children:(0,r.jsx)(no,{userId:t})}),(0,r.jsxs)("div",{ className:to().mobileButtons,children:[(0,r.jsx)(ro,{relationshipType:l,userId:t,showingBanner:o}),!o&&(0,r.jsx)(Jr,{otherUserId:t,channel:n,navigateAwayOnReportSuccess:!1})]})]}):(0,r.jsxs)("div",{className:to().container,children:[(0,r.jsx)(no,{userId:t}),(0,r.jsx)("div",{className:to().divider}),(0,r.jsx)(ro,{relationshipType:l,userId:t,showingBanner:o}),!o&&(0,r.jsx)(Jr,{otherUserId:t,channel:n})]})};var ao=n(955521),lo=n(469023),uo=n(358969),co=n(572615),so=n(727081),fo=n(319794),po=n.n(fo);function ho(e){var t=e.appliedTags,n=e.setAppliedTags,o=null!=n?function(e){if(t.has(e)){t.delete(e);n(new Set(t))}}:void 0;return(0,r.jsx)("div",{className:po().tags,children:Array.from(t).map((function(e){return(0,r.jsx)(so.ZP,{tag:e,onRemove:o,size:null==o?so.ZP.Sizes.SMALL:so.ZP.Sizes.MEDIUM},e.id)}))})}var yo=n(143901),bo=n(229261),vo=n.n(bo);function mo(e){var t,n=e.channel,i=(0,uo.eV)(n),a=(0,u.cj)([co.Z],(function(){return co.Z.getMessage(n.id)})).firstMessage,l=o.useMemo((function(){ return new Set(i)}),[i]),s=null!==(t=(0,lo.Z)(n))&&void 0!==t?t:yo.Z;return(0,r.jsxs)(ao.ZP,{channelId:n.id,className:vo().container,children:[(0,r.jsx)("div",{className:vo().iconWrapper,children:(0,r.jsx)(s,{className:vo().icon,strokeWidth:1.75})}),(0,r.jsx)(ao.Ot,{className:vo().header,children:n.name}),null==a&&(0,r.jsx)(c.xvT,{variant:"text-md/normal",color:"header-secondary",children:Fe.Z.Messages.REPLY_QUOTE_MESSAGE_DELETED}),(0,r.jsx)(ho,{appliedTags:l})]})}var go=n(621647);function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)return(0,r.jsx)(Vo.Z,{guildId:t.guild_id,className:zo().avatars,maxUsers:5,users:b});var e=b[0],n=kr.ZP.getName(e);return(0,r.jsxs)("div",{className:zo().avatars,children:[(0,r.jsx)(c.qEK,{src:e.getAvatarURL(t.guild_id,24),"aria-label":n,size:c.EFr.SIZE_24}),(0,r.jsx)(c.xvT,{tag:"span",className:zo().singleUserName,variant:"text-md/normal",children:n})," ",(0,r.jsx)(c.xvT,{tag:"span",variant:"text-md/normal",color:"text-muted",children:Fe.Z.Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE})]})}(),y.map((function(e,n){var o,i,l=null!==(i=e.colorString)&&void 0!==i?i:(0,So.Rf)(L.p6O),u=void 0!==(null===(o=e.tags)||void 0===o?void 0:o.guild_connections);return v?(0,r.jsx)(ko,{className:a()(zo().role,Ko({},zo().last,n===y.length-1)),roleName:e.name,roleColor:l,disabled:!v,verified:u, onClick:function(){xo.Z.open(t.guild_id,L.pNK.MEMBERS);xo.Z.selectRole(e.id)}},e.id):(0,r.jsx)(Ro,{className:a()(zo().role,Ko({},zo().last,n===y.length-1)),roleName:e.name,roleColor:l,verified:u},e.id)}))]}),l?(0,r.jsx)(c.u_l,{renderModal:function(e){return(0,r.jsx)(wo.default,qo(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,V=function(){I?Hi.Z.leaveThread(j,"Forum Toolbar"):Hi.Z.joinThread(j,"Forum Toolbar")},W=function(){(0,Ki.B)({postId:j.id,location:{section:L.jXE.CHANNEL_HEADER}});(0,xi.J)((0,zi.wR)(j.guild_id,t));C(!0)},z=I?Wi.Z:Vi.Z,Y=!H&&!x;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:a()(Xi().container,ta({},Xi().header,m)),ref:d,children:[(0, r.jsxs)("div",{className:a()(Xi().reactButtons,ta({},Xi().loading,D)),children:[Y&&null!=Z&&(0,r.jsx)("div",{className:$i().reactions,children:(0,r.jsx)(Fi.le,{message:S,readOnly:!1,useChatFontScaling:!1,isLurking:P,isPendingMember:N,emoji:Z,type:Ai.O.NORMAL,hideCount:!0,count:0,me:!1,burst_count:0,burst_me:!1})}),(0,r.jsx)(Bi.Z,{message:S,channel:j,disableReactionCreates:!A||x,disableReactionUpdates:w,isLurking:P,isPendingMember:N,maxReactions:y,className:Xi().reactions,useChatFontScaling:!1,isForumToolbar:!0,forceHideReactionCreates:!0}),!x&&(0,r.jsx)(Zi.X,{type:Ai.O.NORMAL,message:S,channel:j,useChatFontScaling:!1,className:Xi().addReactButton,isForumToolbar:!0,children:!H&&Fe.Z.Messages.FORUM_REACT_TO_POST}),!x&&B&&!F&&(0,r.jsx)(Zi.X,{type:Ai.O.BURST,remainingBurstCurrency:G,message:S,channel:j,useChatFontScaling:!1,isForumToolbar:!0,className:Xi().addReactButton})]}),(0,r.jsxs)("div",{className:Xi().buttons,children:[(0,r.jsx)(c.ua7,{text:Fe.Z.Messages.FORUM_FOLLOW_TOOLTIP, children:function(e){return(0,r.jsxs)(c.zxk,ra(na({},e),{look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.SMALL,onClick:V,className:Xi().button,innerClassName:a()(Xi().buttonInner,ta({},Xi().active,I)),children:[(0,r.jsx)(z,{width:ia,height:ia}),I?Fe.Z.Messages.FORUM_FOLLOWING_POST:Fe.Z.Messages.FOLLOW]}))}}),(0,r.jsx)(c.ua7,{text:Fe.Z.Messages.COPY_LINK,children:function(e){return(0,r.jsxs)(c.zxk,ra(na({},e),{look:c.zxk.Looks.BLANK,size:c.zxk.Sizes.SMALL,onClick:W,className:Xi().button,innerClassName:Xi().buttonInner,children:[E?(0,r.jsx)(Wi.Z,{width:ia,height:ia}):(0,r.jsx)(gt.Z,{width:ia,height:ia}),E?Fe.Z.Messages.COPIED:null]}))}})]})]}),(0,r.jsx)(Ui,{channel:j,isLastItem:l})]})}var la=n(451458),ua=n(4798),ca=n(715107),sa=n(84977),fa=n(321705),da=n(715919),pa=n(487868),ha=n(732827),ya=n(326763),ba=n.n(ya);function va(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var n,o,a=null!==(o=null===(n=i.content[t+1])||void 0===n?void 0:n.isGroupStart)&&void 0!==o&&o;return(0,r.jsx)(Sr,{isUnread:!0,isBeforeGroup:a,id:s},"divider")}if(e.type===L.ys_.MESSAGE||e.type===L.ys_.THREAD_STARTER_MESSAGE){var u=e.type===L.ys_.THREAD_STARTER_MESSAGE?nr:or;return(0,r.jsx)(u,{className:ba().blocked,compact:c,channel:l,message:e.content,groupId:e.groupId,flashKey:e.flashKey,isLastItem:!1,isHighlight:!1,renderContentOnly:!1},e.content.id)}})):null]})}const Ca=o.memo(Ea);var ja=n(989824),Sa=n(853158),Ia=n(396043),_a=n(327566),wa=n(321568),xa=n(633878);function Pa(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} function Na(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function Aa(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Ta(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=Aa(e,["width","height","color"]);return(0, r.jsxs)("svg",Na(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&j(!0)}),[u,t]);var S=o.useCallback((function(){a();d.setValue(0)}),[d,a]);o.useLayoutEffect((function(){var e=p.current;null!=e&&b(e.clientWidth)}),[p,b]);o.useEffect((function(){null!=v.current&&O(v.current.clientWidth+1)}),[v,O,u]);o.useEffect((function(){n?Sa.Z.parallel([Sa.Z.timing(s,{toValue:1,duration:C?500:0}),Sa.Z.timing(f,{toValue:1,duration:C?500:0})]).start():Sa.Z.parallel([Sa.Z.timing(s,{toValue:0,duration:300,delay:500}),Sa.Z.timing(f,{toValue:0,duration:100,delay:500})]).start()}),[s,f,n]);o.useEffect((function(){t>0&&!l&&Sa.Z.timing(d,{toValue:1,duration:C?300:0}).start()}),[d,t,l]);var I=n?1:0,_=n?0:-y;return C?(0,r.jsx)("div",{children:(0,r.jsx)(Sa.Z.div,{style:{opacity:i?I:f,marginLeft:i?_:s.interpolate({inputRange:[0,1],outputRange:[-y,0]})},children:(0,r.jsx)(c.P3F,{ "aria-label":Fe.Z.Messages.CHANNEL_HIGHLIGHT_NAVIGATOR_NEXT,className:Ba().navigator,onClick:S,children:(0,r.jsxs)("div",{className:Ba().highlightsCountContainer,ref:p,children:[l?(0,r.jsx)(c.$jN,{type:c.$jN.Type.SPINNING_CIRCLE,className:Ba().spinner}):(0,r.jsx)(oe.Z,{className:Ba().highlightIcon,width:16,height:16}),(0,r.jsx)("div",{className:Ba().rollingText,children:(0,r.jsx)(Sa.Z.div,{style:{marginTop:i?-18:d.interpolate({inputRange:[0,1],outputRange:[0,-18]})},children:(0,r.jsxs)("div",{ref:v,style:{width:g},children:[(0,r.jsx)(c.xvT,{className:Ba().oldText,variant:"text-sm/medium",children:Fe.Z.Messages.CHANNEL_HIGHLIGHTS_COUNT.format({count:t+1})}),(0,r.jsx)(c.xvT,{className:Ba().newText,variant:"text-sm/medium",children:Fe.Z.Messages.CHANNEL_HIGHLIGHTS_COUNT.format({count:Math.max(t,1)})})]})})}),(0,r.jsx)("div",{className:Ba().button,children:(0,r.jsx)(Za.Z,{className:Ba().icon})})]})})})}):null}function Va(e){ var t=e.guildId,n=e.channelId,r=e.highlightedMessageIds,i=e.setNumHighlightsVisited,a=e.messages,l=e.scrollManager,u=Ga(o.useState(null),2),c=u[0],s=u[1],f=Ga(o.useState(null),2),d=f[0],p=f[1],h=o.useCallback((function(e,t){var n,r;s(null!==(n=null==e?void 0:e.id)&&void 0!==n?n:null);p(null!==(r=null==t?void 0:t.id)&&void 0!==r?r:null)}),[s,p]);o.useEffect((function(){l.addAutomaticAnchorCallback(h);return function(){l.removeAutomaticAnchorCallback(h)}}),[l,h]);var y=null;if(null!=c&&null!=d){var b,v,m=a.indexOf(c),g=a.indexOf(d);y=null!==(v=null===(b=a.getByIndex(m+Math.floor(g-m)))||void 0===b?void 0:b.id)&&void 0!==v?v:null}!function(e){var t=e.guildId,n=e.channelId,r=e.highlightedMessageIds,i=e.setNumHighlightsVisited,a=e.topVisibleMessage,l=e.middleVisibleMessage,u=ka(o.useState(!1),2),c=u[0],s=u[1],f=ka(o.useState(!1),2),d=f[0],p=f[1];o.useEffect((function(){d||null==a||null==l||p(!0)}),[a,l,d,p]);o.useEffect((function(){if(!c&&r.length>0&&d){var e=r.filter((function(e){ return T.Z.compare(e,a)>=0&&T.Z.compare(l,e)>=0})).length;if(e>0){for(var o=0;o0})).length;i((function(o){if(e>o)for(var i=o;i=0&&(a.length-a.indexOf(c)>50?C(!0):C(!1))}),[a,c,C]);return{scrolledFarBack:E}}function Wa(e){ var t=e.channelId,n=e.guildId,i=e.hasMoreAfter,a=e.isAtBottom,l=e.isLoading,s=e.isJumpingToBottom,d=e.messages,p=e.scrollManager,h=e.jumpToPresent,b=Ga(o.useState(C.ZP.ackMessageId(t)),2),v=b[0],m=b[1];o.useEffect((function(){m(C.ZP.ackMessageId(t))}),[t]);var g=(0,_a.rd)(t,v),O=Ga(o.useState(0),2),E=O[0],j=O[1],S=g.length-E,I=g.length>0&&d.jumpTargetId===g[0];o.useEffect((function(){S>0&&Ia.ZP.trackWithMetadata(L.rMx.CHANNEL_HIGHLIGHTS_VIEWED,{num_unread_highlights:S,did_jump_to_first_unread_highlight:I})}),[t]);var _=Va({guildId:n,channelId:t,highlightedMessageIds:g,setNumHighlightsVisited:j,messages:d,scrollManager:p}).scrolledFarBack,w=o.useCallback((function(){q.In(t,!0);h()}),[h,t]),x=(0,u.e7)([f.Z],(function(){return f.Z.useReducedMotion}));return(0,y.sk)(n)&&(0!==g.length||i||_)?(0,r.jsxs)("div",{className:Ba().container,style:{visibility:a&&0===S?"hidden":"inherit"},children:[s?(0,r.jsx)("div",{className:Ba().highlightsCountContainer}):(0,r.jsx)(Ha,{visible:S>0, numHighlights:S,disableAnimation:x,navigateToNextHighlight:function(){var e=g[E];if(null!=e){wa.K({guildId:n,channelId:t,targetMessageId:e,highlightedMessageIds:g,numHighlightsVisited:E});j((function(e){return e+1}))}},isLoading:l,channelId:t},t),(0,r.jsx)(c.P3F,{"aria-label":Fe.Z.Messages.JUMP_TO_BOTTOM,className:Ba().navigator,onClick:w,children:(0,r.jsx)("div",{className:Ba().button,children:s&&l?(0,r.jsx)(c.$jN,{type:c.$jN.Type.SPINNING_CIRCLE,className:Ba().jumpSpinner}):(0,r.jsx)(Ta,{className:Ba().icon})})})]}):null}var za=n(918771),Ya=n(840598),Ka=n(78551),qa=n(600277),Qa=n(721290),Xa=n.n(Qa);function Ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(null===(t=u.first())||void 0===t?void 0:t.isFirstMessageInForumPost(l)),G=(0,mr.t)(l.guild_id),V=(0,Ar.Z)(l.id);n=(0,et.Qd)().enabled,i=b.Yk.useSetting(),a=(0,il.ZP)([f.Z],(function(){return f.Z.useReducedMotion})),o.useEffect((function(){var e=function(e){var t=e.messageId,n=e.channelId,r=e.emoji,o=e.optimistic,l=e.burst ;!o&&l&&i&&!a&&(0,ct.T6)({channelId:n,messageId:t,emoji:r,key:al.I.EXTERNAL})};n&&Re.Z.subscribe("MESSAGE_REACTION_ADD",e);return function(){Re.Z.unsubscribe("MESSAGE_REACTION_ADD",e)}}),[i,n,a]);var W=null,z=[];if(!k&&j)z.push((0,r.jsx)(xr,{channel:l,count:u.length,showRedactedMessages:function(){return U(!0)}}));else{var Y,K=h.map((function(e,t){if(e.type===L.ys_.DIVIDER){var n,o,i=null!=e.unreadId;return null!=O?null:(0,r.jsx)(Sr,{isUnread:i,isBeforeGroup:null==e.content&&pl(h[t+1]),id:i?R.j1:void 0,children:e.content},"divider-".concat(null!==(o=null!==(n=e.contentKey)&&void 0!==n?n:e.unreadId)&&void 0!==o?o:t))}if(e.type===L.ys_.FORUM_POST_ACTION_BAR)return(0,r.jsx)(aa,{parentChannelId:l.parent_id,postId:l.id,isLastItem:t+1===h.length,isFirstMessage:!0},"forum-post-action-bar-".concat(l.id));if(e.type===L.ys_.MESSAGE_GROUP_BLOCKED||e.type===L.ys_.MESSAGE_GROUP_SPAMMER){var a ;a=e.type===L.ys_.MESSAGE_GROUP_BLOCKED?Fe.Z.Messages.BLOCKED_MESSAGE_COUNT:Fe.Z.Messages.HIDDEN_SPAM_MESSAGE_COUNT;return(0,r.jsx)(Ca,{unreadId:R.j1,messages:e,channel:l,compact:p,collapsedReason:a},e.key)}if(!(null!=O&&O>1e3*e.content.timestamp.unix())){var u=E.Z.can(L.Plq.CREATE_INSTANT_INVITE,l);if(!(0,fa.Z)(e.content,u)){e.type===L.ys_.MESSAGE&&null==W&&(W=e);var c=e.groupId===(null==W?void 0:W.groupId)?W.content.id:e.groupId,s=e.type===L.ys_.THREAD_STARTER_MESSAGE?nr:or;return(0,r.jsx)(s,{compact:p,channel:l,message:e.content,groupId:c,flashKey:e.flashKey,id:(0,H.p)(l.id,e.content.id),isLastItem:t>=h.length-1,isHighlight:e.isHighlight,renderContentOnly:V},e.content.id)}}}));(Y=z).push.apply(Y,fl(K))}var q,Q,X=h[h.length-1];null!=P&&v.forEach((function(e,t){var n=0===t&&(0,Z.J)(l,X,new ua.Z({type:L.uaV.DEFAULT,author:P}));z.push((0,r.jsx)(yl,{file:e,channel:l,user:P,isGroupStart:n},"upload-".concat(e.id)))}));if(u.hasMoreBefore&&null==O){u.length>0&&z.unshift((0,r.jsx)("div",{ style:{height:R.D4,flex:"0 0 auto"}},"buffer"));var J=f.Z.useReducedMotion;(J&&N()||!J)&&z.unshift((0,r.jsx)(B.ZP,cl({compact:p},g),"has-more"))}u.hasMoreBefore&&null==O||z.unshift((0,r.jsx)(wi,{channel:l,showingBanner:j||I},"empty-message"));u.hasMoreAfter&&z.push((0,r.jsx)(B.ZP,cl({compact:p},g),"has-more-after"));!j&&!I&&M&&N()&&z.push((0,r.jsx)(ol,{channel:l}));if(c>0&&d&&N()){var $,ee,te=C.ZP.getOldestUnreadTimestamp(l.id),ne=0!==te?te:T.Z.extractTimestamp(l.id),re=(0,A.KC)(br()(),br()(new Date(ne)));if(C.ZP.isEstimated(l.id)){$=re?Fe.Z.Messages.NEW_MESSAGES_ESTIMATED:Fe.Z.Messages.NEW_MESSAGES_ESTIMATED_WITH_DATE;ee=Fe.Z.Messages.NEW_MESSAGES_PILL_ESTIMATED}else{$=re?Fe.Z.Messages.NEW_MESSAGES:Fe.Z.Messages.NEW_MESSAGES_WITH_DATE;ee=Fe.Z.Messages.NEW_MESSAGES_PILL}q=G&&l.type===L.d4z.GUILD_TEXT?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(za.LE,{content:$.format({count:c,timestamp:ne}),channelId:l.id}),(0,r.jsx)(za.BO,{channelId:l.id,scrollManager:m})]}):x?(0,r.jsx)(za.dB,{ content:ee.format({count:c}),channelId:l.id,hasNoticeAbove:l.isForumPost()&&!F}):(0,r.jsx)(za.LE,{content:$.format({count:c,timestamp:ne}),channelId:l.id})}null==q&&G&&l.type===L.d4z.GUILD_TEXT&&(q=(0,r.jsx)(za.BO,{channelId:l.id,scrollManager:m}));if(u.error)Q=(0,r.jsx)(za.Rp,{loading:u.loadingMore,onClick:function(){return e=l.id,void s.Z.fetchMessages({channelId:e,limit:L.AQB,truncate:!0});var e}});else if(x&&N()){var oe=u.jumpReturnTargetId,ie=w;null!=oe&&(ie=function(){return hl(l,oe)});Q=(0,r.jsx)(Wa,{channelId:l.id,guildId:l.guild_id,messages:u,scrollManager:m,isAtBottom:_,hasMoreAfter:u.hasMoreAfter,isLoading:u.loadingMore,isJumpingToBottom:u.jumpedToPresent,jumpToPresent:ie},l.id)}else if(!x&&u.hasMoreAfter&&N()){var ae=u.jumpReturnTargetId;Q=u.loadingMore&&u.jumpedToPresent?(0,r.jsx)(za.DR,{}):null!=ae?(0,r.jsx)(za.DR,{type:za.A7.REPLY,onClick:function(){return hl(l,ae)}}):(0,r.jsx)(za.DR,{onClick:function(){return function(e){s.Z.jumpToPresent(e.id,L.AQB) ;var t=ca.Z.getChannelId();e.id===t&&(0,la.Kh)(e.id)}(l)}})}var le=l.isForumPost()&&!F?(0,r.jsx)(aa,{postId:l.id}):null;return{channelStreamMarkup:z,newMessagesBar:q,jumpToPresentBar:Q,forumPostActionBar:le}}var vl=n(113358),ml=n.n(vl);function gl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Sl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{ if(l)throw o}}return i}}(e,t)||_l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Il(e){return function(e){if(Array.isArray(e))return gl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _l(e,t){if(e){if("string"==typeof e)return gl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);return"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gl(e,t):void 0}}function wl(e){ var t,n=e.className,i=e.messageGroupSpacing,d=e.scrollerClassName,p=e.channel,y=e.messages,b=e.unreadCount,v=e.showNewMessagesBar,m=e.messageDisplayCompact,g=e.channelStream,O=e.uploads,C=e.hasUnreads,j=e.editingMessageId,S=e.fontSize,I=e.keyboardModeEnabled,w=e.filterAfterTimestamp,x=e.showingSpamBanner,P=e.showingQuarantineBanner,N=Sl(o.useState(!1),2),A=N[0],T=N[1],Z=o.useMemo((function(){return m?(0,B.aJ)({compact:!0,messageGroups:30,groupRange:4,attachments:8,fontSize:S,groupSpacing:i}):(0,B.aJ)({compact:!1,messageGroups:26,groupRange:4,attachments:8,fontSize:S,groupSpacing:i})}),[m,S,i]),M=function(e){var t=e.messages,n=e.channel,r=e.compact,i=e.hasUnreads,a=e.focusId,l=e.placeholderHeight,u=e.canLoadMore,c=void 0===u||u,s=e.handleScrollToBottom,f=e.handleScrollFromBottom,d=o.useContext(Q.ZP).windowId,p=ur(o.useState((function(){return new hr({messages:t,channel:n,compact:r,hasUnreads:i,focusId:a,placeholderHeight:l,canLoadMore:c,windowId:d,handleScrollToBottom:s, handleScrollFromBottom:f})})),1)[0];p.getSnapshotBeforeUpdate(a);o.useLayoutEffect((function(){return p.mergePropsAndUpdate({messages:t,channel:n,compact:r,hasUnreads:i,focusId:a,placeholderHeight:l,canLoadMore:c,windowId:d,handleScrollToBottom:s,handleScrollFromBottom:f})}));o.useLayoutEffect((function(){return function(){return p.cleanup()}}),[p]);return p}({messages:y,channel:p,compact:m,hasUnreads:C,focusId:j,placeholderHeight:Z.totalHeight,canLoadMore:null==w,handleScrollToBottom:o.useCallback((function(){return T(!0)}),[T]),handleScrollFromBottom:o.useCallback((function(){return T(!1)}),[T])}),D=function(e){var t=e.scrollerRef,n=V(e,["scrollerRef"]),r=o.useCallback((function(){var e=t.current;return null==e?Promise.resolve():new Promise((function(t){e.scrollToBottom({callback:function(){return requestAnimationFrame(t)}})}))}),[]),i=o.useCallback((function(){var e=t.current;return null==e?Promise.resolve():new Promise((function(t){e.scrollToTop({callback:function(){ return requestAnimationFrame(t)}})}))}),[]),a=o.useCallback((function(e){var r,o,i;if(n.keyboardModeEnabled){var a=null===(o=null===(r=t.current)||void 0===r?void 0:r.getScrollerNode())||void 0===o?void 0:o.ownerDocument,l=null==a?void 0:a.querySelector(e);null!=l&&(null===(i=t.current)||void 0===i||i.scrollIntoViewNode({node:l,padding:4*R.kQ,callback:function(){return null==l?void 0:l.focus()}}))}}),[n.keyboardModeEnabled]),l=o.useCallback((function(){n.hasMoreAfter||G.S.dispatchToLastSubscribed(L.CkL.TEXTAREA_FOCUS)}),[n.hasMoreAfter]),u=(0,F.ZP)({id:H.W,preserveFocusPosition:!1,setFocus:a,isEnabled:n.keyboardModeEnabled&&!n.isEditing,scrollToStart:i,scrollToEnd:r,onNavigateNextAtEnd:l}),c=o.useCallback((function(e){var t=e.atEnd;void 0!==t&&t?u.focusLastVisibleItem():u.focusFirstVisibleItem()}),[u]);(0,_.yp)({event:L.CkL.FOCUS_MESSAGES,handler:c});return u}({scrollerRef:M.ref,isEditing:null!=j,keyboardModeEnabled:I,hasMoreAfter:y.hasMoreAfter}),k=function(e){return(0, u.e7)([h.Z],(function(){return E.Z.can(L.Plq.READ_MESSAGE_HISTORY,e)?null:h.Z.getViewingRolesTimestamp(e.getGuildId())}))}(p),U=bl({channel:p,messages:y,unreadCount:b,showNewMessagesBar:v,messageDisplayCompact:m,channelStream:g,uploads:O,loadMore:M.loadMore,scrollManager:M,specs:Z,filterAfterTimestamp:null!=w?w:k,showingSpamBanner:x,showingQuarantineBanner:P,isAtBottom:A,jumpToPresent:function(){if(y.hasPresent()){var e;null===(e=M.ref.current)||void 0===e||e.scrollToBottom({animate:!f.Z.useReducedMotion})}else s.Z.jumpToPresent(p.id,L.AQB)}}),W=U.channelStreamMarkup,z=U.newMessagesBar,Y=U.jumpToPresentBar,K=U.forumPostActionBar;!function(e){var t=o.useCallback((function(){var t;return null===(t=e.current)||void 0===t?void 0:t.scrollToBottom()}),[e]),n=o.useCallback((function(){var t;return null===(t=e.current)||void 0===t?void 0:t.scrollPageUp({animate:!f.Z.useReducedMotion})}),[e]),r=o.useCallback((function(){var t;return null===(t=e.current)||void 0===t?void 0:t.scrollPageDown({ animate:!f.Z.useReducedMotion})}),[e]);(0,_.yp)({event:L.CkL.SCROLLTO_PRESENT,handler:t});(0,_.yp)({event:L.CkL.SCROLL_PAGE_UP,handler:n});(0,_.yp)({event:L.CkL.SCROLL_PAGE_DOWN,handler:r})}(M.ref);var q,X=(0,c.mFp)(),J=(0,l.l2)(D),$=J.ref,ee=jl(J,["ref"]),te=o.useCallback((function(e){M.ref.current=e;var t;$.current=null!==(t=null==e?void 0:e.getScrollerNode())&&void 0!==t?t:null}),[]);return(0,r.jsx)(l.bG,{navigator:D,children:(0,r.jsxs)("div",{className:a()(ml().messagesWrapper,n,"group-spacing-".concat(i)),children:[z,(0,r.jsxs)(c.eTT,Cl(El({ref:te,customTheme:!0,className:a()(d,ml().scroller),contentClassName:ml().scrollerContent,onResize:M.handleResize,onScroll:M.handleScroll,onMouseDown:M.handleMouseDown,onMouseUp:M.handleMouseUp},X),{tabIndex:-1,role:"group",children:[K,(0,r.jsxs)("ol",Cl(El({className:ml().scrollerInner,"aria-label":Fe.Z.Messages.CHANNEL_MESSAGES_A11Y_LABEL.format({channelName:p.name})},ee),{children:[(0,r.jsx)("span",{className:ml().navigationDescription, id:"messagesNavigationDescription","aria-hidden":!0,children:Fe.Z.Messages.CHANNEL_MESSAGES_A11Y_DESCRIPTION}),W,(0,r.jsx)("div",{className:a()((q={},Ol(q,ml().scrollerSpacer,!x&&!P),Ol(q,ml().empty,0===y.length&&!y.loadingMore),Ol(q,ml().emptyForum,1===y.length&&!y.loadingMore&&p.isForumPost()&&(null===(t=y.first())||void 0===t?void 0:t.isFirstMessageInForumPost(p))),q))})]}))]})),Y]})})}var xl=o.memo(wl,(function(e,t){return null!=e.isHidden&&null!=t.isHidden&&e.isHidden&&t.isHidden}));const Pl=o.memo((function(e){var t=e.channel,n=e.showingSpamBanner,i=e.showingQuarantineBanner,a=e.forceCompact,l=void 0!==a&&a,c=jl(e,["channel","showingSpamBanner","showingQuarantineBanner","forceCompact"]),s=function(e){var t=e.getGuildId(),n=(0,u.e7)([g.Z],(function(){return null==t||g.Z.canChatInGuild(t)}),[t]),r=(0,u.cj)([E.Z],(function(){return{canManageMessages:E.Z.can(L.Plq.MANAGE_MESSAGES,e),permissionVersion:null!=t?E.Z.getGuildVersion(t):null}}),[e,t]),o=r.canManageMessages;return{ canChat:n,permissionVersion:r.permissionVersion,canManageMessages:o}}(t),h=s.canManageMessages,_=s.permissionVersion,x=s.canChat,P=function(){var e=b.jU.useSetting(),t=b.cC.useSetting(),n=(0,u.cj)([f.Z],(function(){return{messageGroupSpacing:f.Z.messageGroupSpacing,fontSize:f.Z.fontSize,keyboardModeEnabled:f.Z.keyboardModeEnabled}}));return{messageGroupSpacing:n.messageGroupSpacing,messageDisplayCompact:e,renderSpoilers:t,fontSize:n.fontSize,keyboardModeEnabled:n.keyboardModeEnabled}}(),N=P.messageGroupSpacing,A=P.fontSize,T=P.messageDisplayCompact,Z=P.renderSpoilers,M=P.keyboardModeEnabled,R=function(e){var t,n,r,i=(0,u.e7)([O.Z],(function(){return O.Z.getMessages(e.id)}),[e.id]),a=(0,u.e7)([C.ZP],(function(){return null!==(n=C.ZP.getOldestUnreadMessageId(e.id))&&void 0!==n?n:null}),[e.id]),l=(0,y.sk)(e.guild_id),c=(0,u.Wu)([d.Z],(function(){if(!l)return[];var t=d.Z.getHighlightedMessageIds(e.id),n=d.Z.getTempHighlightedMessageIds(e.guild_id);return Array.from(Il(n).concat(Il(t))) })),s=p.Z.useExperiment({}).enabled,f=null!==(r=null===(t=S.default.getUser(v.default.getId()))||void 0===t?void 0:t.hasFlag(L.xW$.SPAMMER))&&void 0!==r&&r,h=o.useMemo((function(){return U({channel:e,messages:i,highlightedMessageIds:c,oldestUnreadMessageId:a,treatSpam:s&&!f})}),[i,e,a,s,c]),b=(0,u.e7)([m.Z],(function(){var t;return null===(t=m.Z.getEditingMessage(e.id))||void 0===t?void 0:t.id}));return{messages:i,channelStream:h,oldestUnreadMessageId:a,editingMessageId:b}}(t),D=R.messages,k=R.channelStream,B=R.oldestUnreadMessageId,F=R.editingMessageId;return(0,r.jsx)(I.a.Provider,{value:(0,w.Z)(Z,h),children:(0,r.jsx)(xl,Cl(El({},c),{messageGroupSpacing:N,showNewMessagesBar:!0,channel:t,messageDisplayCompact:l||T,messages:D,channelStream:k,permissionVersion:_,uploads:(0,u.e7)([j.Z],(function(){return j.Z.getFiles(t.id)}),[t]),unreadCount:(0,u.e7)([C.ZP],(function(){return C.ZP.getUnreadCount(t.id)}),[t]),hasUnreads:null!=B,canChat:x,editingMessageId:F,fontSize:A, keyboardModeEnabled:M,showingSpamBanner:n,showingQuarantineBanner:i}))})}))},399098:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(785893),o=(n(667294),n(496486)),i=n.n(o),a=n(707961),l=n(658689),u=n(725691),c=n(183640),s=n(633878);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t) ;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function h(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=p(e,["width","height","color"]);return(0,r.jsxs)("svg",d(function(e){for(var t=1;t1?(0,r.jsxs)("div",{className:m().partyMemberOverflow,children:["+",g]}):null]})})}},995247:(e,t,n)=>{"use strict";n.d(t,{Uo:()=>L,qw:()=>U,KY:()=>R,fU:()=>k,tn:()=>D,Fo:()=>M});var r=n(667294),o=n(824390),i=n.n(o),a=n(842227),l=n(202351),u=n(418705),c=n(496916),s=n(777158),f=n(896490),d=n(848465),p=n(556056),h=n(971561),y=n(82375),b=n(744564),v=n(917019),m=n(652591),g=n(2590);function O(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,l,"next",e)}function l(e){O(i,r,o,a,l,"throw",e)}a(void 0)}))}}var C=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){ return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0}));(0,s.Z)(e._categories,e).forEach(Z);return e}),[t,n,l,o])}function R(e){var t=e.getSections();if(t[p.zm]>0){switch(e.getCommunitySection().getRow(0)){case N.f.GUILD_HOME:return P.oC.GUILD_HOME;case N.f.GUILD_ROLE_SUBSCRIPTIONS:return P.oC.ROLE_SUBSCRIPTIONS;case N.f.GUILD_MEMBER_APPLICATIONS:return P.oC.MEMBER_APPLICATIONS}}for(var n=p.wd;n0){var r,o=null===(r=e.getChannelFromSectionRow(n,0))||void 0===r?void 0:r.channel;if(null!=o)return o.id}return null}function L(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;j(e,t);(0,c.y5)(t.map((function(e){return{channelId:e,readStateType:A.W.CHANNEL,messageId:x.ZP.lastMessageId(e)}})));null!=n&&(0,I.uL)(g.Z5c.CHANNEL(e,n))}function D(e,t,n,r){var o=(0,f.wE)(u.z$.CHANNEL_BROWSER_NUX),i=(0,l.cj)([_.Z],(function(){var t={},n=_.Z.getMutableGuildChannelsForGuild(e) ;for(var r in n){var o=n[r].parent_id;if(null!=o){var i;t[o]=(null!==(i=t[o])&&void 0!==i?i:0)+1}}return t}),[e]),a=t._categories.map((function(e){var r=t[e.channel.id];return{rowCount:"null"!==e.channel.id&&0===i[e.channel.id]?1:r.length,rowHeight:0===r.length?0:n}}));o||null==r||a.unshift({rowCount:1,rowHeight:r});return a}function k(e){var t,n,r=(0,l.e7)([w.Z],(function(){return w.Z.getCategories(e)})),o=r._categories.length,i=r._categories[r._categories.length-1];if(null==i)return 0;var a=r[null!==(n=null===(t=i.channel)||void 0===t?void 0:t.id)&&void 0!==n?n:"null"];return null==a?0:0===a.length?i.index+2-o:a[a.length-1].index+2-o}function U(e){var t;return T.Z.Messages.CHANNEL_BROWSER_ACTIVE_TEXT.format({timeAgo:(0,h.ZB)(String(a.default.extractTimestamp(null!==(t=x.ZP.lastMessageId(e))&&void 0!==t?t:e)/1e3),"R").formatted})}},337710:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(202351),o=n(848465),i=n(9430),a=n(489610),l=n(897196);function u(e){var t,n=(0, a.DM)(null!=e.getGuildId()?e.guild_id:"null"),u=(0,r.e7)([i.Z],(function(){return i.Z.isChannelRecordOrParentOptedIn(e)})),c=(0,o.g)(null!==(t=e.guild_id)&&void 0!==t?t:"null")&&e.hasFlag(l.zZ.IS_GUILD_RESOURCE_CHANNEL);return n&&!c&&!u&&!e.isThread()}},517285:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(396043),c=n(795909),s=n(652591),f=n(347834),d=n(2590),p=n(473708),h=n(448624),y=n.n(h);function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(318715)),i=n(707961),a=n(785085),l=n(996739);function u(e){var t=e.isShaking,n=e.shakeLocation,u=e.children,c=e.className,s=(0,l.Z)(n);return(0,o.ZP)([a.Z],(function(){return a.Z.isEnabled({shakeLocation:n})}))?(0,r.jsx)(i.UkV,{isShaking:t,intensity:s,className:c,children:u}):(0,r.jsx)(r.Fragment,{children:u})}},996739:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(901654),i=n(785085);function a(e){var t=(0,r.e7)([o.Z],(function(){return o.Z.isFocused()}));return(0,r.e7)([i.Z],(function(){return i.Z.isEnabled({shakeLocation:e})&&t?i.Z.shakeIntensity:0}))}},472009:(e,t,n)=>{"use strict" ;n.d(t,{Z:()=>re});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(473727),s=n(202351),f=n(707961),d=n(199912),p=n(443269),h=n(242818),y=n(260012),b=n(599347),v=n(26468),m=n(316878),g=n(258104),O=n(944010),E=n(895303),C=n(379991),j=n(473708);function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:function(){},n=function(t){O.ZP.updatedUnsyncedSettings({disableEmbeddedActivityPopOutAlert:!0});t();e()},o=!C.ZP.disableEmbeddedActivityPopOutAlert;o?(0,f.h7j)((function(o){return(0,r.jsx)(E.default,I({ confirmText:j.Z.Messages.EMBEDDED_ACTIVITIES_YEP,secondaryConfirmText:j.Z.Messages.DONT_ASK_AGAIN,title:j.Z.Messages.EMBEDDED_ACTIVITIES_CAREFUL,cancelText:j.Z.Messages.EMBEDDED_ACTIVITIES_NVM,onConfirm:function(){o.onClose();e()},onCancel:t,onConfirmSecondary:function(){return n(o.onClose)},body:j.Z.Messages.EMBEDDED_ACTIVITIES_POP_IN_WARNING},o))}),{},f.u1M):e()}var w=n(153686),x=n(19585),P=n(141772),N=n(673817),A=n(91841),T=n(924726),Z=n(384411),M=n(64234),R=n(901654),L=n(329543),D=n(211482),k=n(120415),U=n(463473),B=n(310126),F=n(954183),G=n(979197),H=n(2590),V=n(347079),W=n.n(V);function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function K(e){K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return K(e)}function q(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>l});var r=n(667294),o=n(513328);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{rK:()=>d,ZP:()=>p});var r=n(667294),o=n(730381),i=n.n(o),a=n(513328),l=n(249139);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>g});var r=n(785893),o=n(667294),i=n(707961),a=n(19585),l=n(652591),u=n(398344),c=n(2590),s=n(824012),f=n.n(s),d=n(20616),p=n.n(d),h=n(556306),y=n.n(h) ;function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>r});var r="https://dis.gd/appeal"},894772:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ct}) ;var r=n(785893),o=n(667294),i=n(707961),a=n(744564),l=n(301928),u=n(956485),c=n(980604),s=n(294184),f=n.n(s),d=n(289283),p=n(202351),h=n(971402),y=n(242839),b=n(241166),v=n(728197);const m=(0,n(260561).B)({kind:"user",id:"2021-02_staff_qc_debugging",label:"Display QS scores in results. Not a real experiment",defaultConfig:{showScores:!1},treatments:[{id:1,label:"Show scores in QS results",config:{showScores:!0}}]});var g=n(61209),O=n(813869),E=n(567403),C=n(717091),j=n(715107),S=n(602397),I=n(700223),_=n(621647),w=n(773011),x=n(239813),P=n(2590),N=n(473708);function A(e){if(null==e)return null;switch(e.type){case P.d4z.GUILD_ANNOUNCEMENT:return N.Z.Messages.NEWS_CHANNEL;case P.d4z.GUILD_STORE:return N.Z.Messages.STORE_CHANNEL;case P.d4z.DM:case P.d4z.GROUP_DM:return N.Z.Messages.DM;case P.d4z.PRIVATE_THREAD:return N.Z.Messages.PRIVATE_THREAD;case P.d4z.ANNOUNCEMENT_THREAD:case P.d4z.PUBLIC_THREAD:return N.Z.Messages.THREAD;case P.d4z.GUILD_TEXT:return N.Z.Messages.TEXT_CHANNEL ;case P.d4z.GUILD_FORUM:return e.isMediaChannel()?N.Z.Messages.MEDIA_CHANNEL:N.Z.Messages.FORUM_CHANNEL;case P.d4z.GUILD_STAGE_VOICE:return N.Z.Messages.STAGE_CHANNEL;case P.d4z.GUILD_VOICE:return N.Z.Messages.VOICE_CHANNEL;case P.d4z.GUILD_CATEGORY:default:return null}}var T=n(327930),Z=n(840922),M=n(473903),R=n(749565),L=n(901165),D=n(641277),k=n(124251),U=n(294162),B=n(633878);function F(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function G(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function H(e,t){if(null==e)return{} ;var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function V(e){var t=e.width,n=void 0===t?24:t,o=e.height,i=void 0===o?24:o,a=e.color,l=void 0===a?"currentColor":a,u=e.foreground,c=H(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",G(function(e){for(var t=1;t>0}):null]})};return n}(o.PureComponent),oe=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderIcon=function(){var e=this.props.guild;return(0,r.jsx)("div",{className:K().guildIconContainer,children:(0,r.jsx)(k.Z,{tabIndex:-1,guild:e, size:k.Z.Sizes.MINI,className:K().guildIcon})})};o.renderName=function(){var e=this.props.guild;return(0,r.jsx)("div",{className:K().name,children:(0,r.jsx)("span",{className:K().match,children:e.name})})};o.renderContent=function(){var e=this.props,t=e.unread,n=e.children;return(0,r.jsxs)("div",{className:t?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:n})]})};o.getAccessibilityLabel=function(){var e=this.props.guild;return N.Z.Messages.QUICK_SWITCHER_RESULTS_GUILD_LABEL.format({name:e.name})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),ie=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)} var o=n.prototype;o.renderIcon=function(){var e,t=this.props.channel,n=(0,x.KS)(t);if(null==n)return null;var o=null!==(e=A(t))&&void 0!==e?e:"";return(0,r.jsx)("div",{className:K().iconContainer,role:"img","aria-label":o,children:(0,r.jsx)(n,{className:K().icon,width:16,height:16})})};o.renderName=function(){var e,t,n=this.props,o=n.mentions,i=n.category,a=n.channel;null!=o&&o>0&&(e=(0,r.jsx)(L.Z,{className:K().badge,value:o}));null!=i&&(t=(0,r.jsx)("span",{className:K().note,children:(0,w.F6)(i,M.default,Z.Z)}));return(0,r.jsxs)("div",{className:K().name,children:[(0,r.jsx)("span",{className:K().match,children:(0,w.F6)(a,M.default,Z.Z)}),e,this.renderVoiceStates(),t]})};o.renderVoiceStates=function(){var e=this.props,t=e.voiceStates,n=e.channel;return null==t?null:(0,r.jsx)(U.Z,{guildId:n.guild_id,users:t.map((function(e){return{user:e.user}})),max:4})};o.renderContent=function(){var e=this.props,t=e.unread,n=e.mentions,o=e.children;return(0,r.jsxs)("div",{"aria-hidden":!0, className:t||null!=n&&n>0?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:o})]})};o.getAccessibilityLabel=function(){var e,t=this.props.channel,n=null===(e=E.Z.getGuild(this.props.channel.guild_id))||void 0===e?void 0:e.name,r=(0,w.F6)(t,M.default,Z.Z),o=A(t);return N.Z.Messages.QUICK_SWITCHER_RESULTS_CHANNEL_LABEL.format({name:r,type:o,guild:n})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component);ie.defaultProps={unread:!1};var ae=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderIcon=function(){var e=this.props.channel;return(0,r.jsx)("div",{className:K().dmIconContainer,children:(0, r.jsx)(i.qEK,{src:(0,_.x)(e),size:i.EFr.SIZE_20,"aria-hidden":!0})})};o.renderName=function(){var e,t=this.props,n=t.mentions,o=t.channel;null!=n&&n>0&&(e=(0,r.jsx)(L.Z,{className:K().badge,value:n}));return(0,r.jsxs)("div",{className:K().name,children:[(0,r.jsx)("span",{className:K().match,children:(0,w.F6)(o,M.default,Z.Z)}),e]})};o.renderContent=function(){var e=this.props,t=e.mentions,n=e.children;return(0,r.jsxs)("div",{className:null!=t&&t>0?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:n})]})};o.getAccessibilityLabel=function(){var e=this.props,t=e.channel,n=e.mentions,r=(0,w.F6)(t,M.default,Z.Z);return null!=n&&n>0?N.Z.Messages.QUICK_SWITCHER_RESULTS_GROUP_DM_UNREAD_LABEL.format({name:r,mentions:n}):N.Z.Messages.QUICK_SWITCHER_RESULTS_GROUP_DM_LABEL.format({name:r})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id ;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),le=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderIcon=function(){var e=this.props.user;return(0,r.jsx)("div",{className:K().iconContainer,children:(0,r.jsx)(i.qEK,{src:e.getAvatarURL(void 0,20),"aria-hidden":!0,size:i.EFr.SIZE_20})})};o.getDisplayNickname=function(){var e,t=this.props,n=t.user,r=t.comparator,o=t.nickname;if(null!=r&&r===n.tag){var i=r.split("#");i.pop();e=i.join("#")}else e=null!=r&&""!==r?r:n.username;e===n.username&&(e=null!=o?o:e);return e};o.renderName=function(){var e,t=this.props,n=t.user,o=t.mentions,i=this.getDisplayNickname();null!=o&&o>0&&(e=(0,r.jsx)(L.Z,{className:K().badge,value:o}));return(0,r.jsxs)("div",{className:K().name,children:[(0,r.jsx)("span",{className:K().match,children:i}),e,(0, r.jsx)("span",{className:K().username,children:R.ZP.getUserTag(n)})]})};o.renderContent=function(){var e=this.props,t=e.children,n=e.mentions;return(0,r.jsxs)("div",{className:null!=n&&n>0?K().contentUnread:K().contentDefault,children:[this.renderIcon(),this.renderName(),(0,r.jsx)("div",{className:K().misc,children:t})]})};o.getAccessibilityLabel=function(){var e=this.props,t=e.mentions,n=e.user,r=this.getDisplayNickname(),o=R.ZP.getUserTag(n);return null!=t&&t>0?N.Z.Messages.QUICK_SWITCHER_RESULTS_USER_UNREAD_LABEL.format({name:r,id:o,mentions:t}):N.Z.Messages.QUICK_SWITCHER_RESULTS_USER_LABEL.format({name:r,id:o})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,"aria-label":this.getAccessibilityLabel(),onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),ue=function(e){J(n,e);var t=ne(n);function n(){Q(this,n) ;return t.apply(this,arguments)}var o=n.prototype;o.renderContent=function(){var e=this.props,t=e.children,n=e.application;return(0,r.jsxs)("div",{className:K().contentDefault,children:[(0,r.jsx)("div",{className:K().iconContainer,children:(0,r.jsx)(D.Z,{tabIndex:-1,className:K().gameIcon,game:n,size:K().gameIconSize})}),n.name,(0,r.jsx)("div",{className:K().misc,children:t})]})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.focused,a=e.id;return(0,r.jsx)(re,{id:a,onMouseEnter:t,onClick:n,onFocus:o,focused:i,children:this.renderContent()})};return n}(o.Component),ce=function(e){J(n,e);var t=ne(n);function n(){Q(this,n);return t.apply(this,arguments)}n.prototype.render=function(){return(0,r.jsx)("div",{className:K().resultDefault,children:(0,r.jsx)("div",{className:K().contentDefault,children:(0,r.jsx)("div",{className:K().header,children:this.props.children})})})};return n}(o.Component),se=function(e){J(n,e);var t=ne(n);function n(){Q(this,n) ;return t.apply(this,arguments)}var o=n.prototype;o.renderContent=function(){var e,t,n=this.props,o=n.link,i=n.children,a=(0,T.Qj)(o.path);if(null==a||void 0===a.messageId){e=N.Z.Messages.QUICKSWITCHER_LINK_UNKNOWN;t=(0,r.jsx)(W.Z,{width:16,height:16})}else if((0,T.VO)(a)){e=N.Z.Messages.QUICKSWITCHER_LINK_MESSAGE;t=(0,r.jsx)(V,{width:16,height:16})}else{e=N.Z.Messages.QUICKSWITCHER_LINK_NO_ACCESS;t=(0,r.jsx)(z.Z,{width:16,height:16})}return(0,r.jsxs)("div",{className:K().contentDefault,children:[(0,r.jsx)("div",{className:K().iconContainer,children:t}),e,(0,r.jsx)("div",{className:K().misc,children:i})]})};o.render=function(){var e=this.props,t=e.onMouseEnter,n=e.onClick,o=e.onFocus,i=e.onContextMenu,a=e.focused,l=e.score,u=e.id;return(0,r.jsx)(re,{id:u,onMouseEnter:t,onClick:n,onFocus:o,onContextMenu:i,focused:a,score:l,children:this.renderContent()})};return n}(o.Component),fe=n(443812),de=n(930948),pe=n(348592),he=n(853158),ye=n(513328),be=n(180127),ve=n.n(be);function me(e,t){ if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Oe(e){Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return Oe(e)}function Ee(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e,t){Ce=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return Ce(e,t)}var je=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function Se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}() ;return function(){var n,r=Oe(e);if(t){var o=Oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}var Ie={friction:15,tension:100},_e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&Ce(e,t)}(i,e);var t=Se(i);function i(){me(this,i);var e;(e=t.apply(this,arguments)).state={shown:!1,translateY:new he.Z.Value(0)};e.rootRef=o.createRef();e.focusTimeout=new ye.V7;e.handleResultFocus=function(t){var n=t.node;e.focusTimeout.start(1,(function(){if(e.props.hasQuery&&null!=n&&null!=e.rootRef.current){var t=e.rootRef.current.getBoundingClientRect().top,r=n.getBoundingClientRect().top,o=Math.abs(t-r);e.springTo(o-118+9)}else e.springTo(0)}))};return e}var a=i.prototype;a.componentDidMount=function(){this.setState({shown:!0}) ;de.S.subscribe(P.CkL.QUICKSWITCHER_RESULT_FOCUS,this.handleResultFocus)};a.componentWillUnmount=function(){this.focusTimeout.stop();de.S.unsubscribe(P.CkL.QUICKSWITCHER_RESULT_FOCUS,this.handleResultFocus)};a.componentDidUpdate=function(){this.props.hasQuery||this.springTo(0)};a.springTo=function(e){he.Z.spring(this.state.translateY,function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?e.search(""):(0,u.Cp)();return;case"k":if(!0===t.ctrlKey||!0===t.metaKey){t.preventDefault();t.stopPropagation();(0,u.Cp)()}return;case"enter":if(-1===l)return;t.preventDefault();if(t.altKey)return e.handleContextMenu(t);var c=i[l];null!=c&&e.selectResult(c);return;case"arrowup":l=(0,v.gJ)(v.a8.UP,l,i);break;case"arrowdown":l=(0,v.gJ)(v.a8.DOWN,l,i);break;case"n":if(!t.ctrlKey)return;l=(0,v.gJ)(v.a8.DOWN,l,i);break;case"p":if(!t.ctrlKey)return;l=(0,v.gJ)(v.a8.UP,l,i);break;default:return}t.preventDefault();(0,u.tF)(l)};e.renderRow=function(t){var n=t.row,o=e.props.results[n],i=e.props.selectedIndex,a=m.getCurrentConfig({}).showScores;switch(o.type){case v.h8.HEADER:return(0,r.jsx)(ce,{children:o.record.text},"".concat(o.type,"-").concat(o.record.id));case v.h8.TEXT_CHANNEL:return(0,r.jsx)(ze,{id:e.getRowId(n),focused:i>=0&&n===i, onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,channel:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.VOICE_CHANNEL:return(0,r.jsx)(Ye,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,channel:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.GUILD:return(0,r.jsx)(Ke,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,guild:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.USER:return(0,r.jsx)(Qe,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){ return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,user:o.record,comparator:o.comparator,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.GROUP_DM:return(0,r.jsx)(qe,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,channel:o.record,score:a?o.score:void 0},"".concat(o.type,"-").concat(o.record.id));case v.h8.APPLICATION:return(0,r.jsx)(ue,{id:e.getRowId(n),focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,application:o.record},"".concat(o.type,"-").concat(o.record.id));case v.h8.LINK:return(0,r.jsx)(se,{focused:i>=0&&n===i,onClick:function(){return e.selectResult(o)},onMouseEnter:function(){return e.focusResult(o)},onFocus:e.focusNode,onContextMenu:e.handleContextMenu,link:o.record,score:a?o.score:void 0, id:e.getRowId(n)},"".concat(o.type,"-").concat(o.record.id));default:return null}};return e}var l=a.prototype;l.componentDidMount=function(){b.Z.disable();b.Z.enableTemp(y.u)};l.componentWillUnmount=function(){b.Z.disableTemp();b.Z.enable()};l.componentDidUpdate=function(e,t){var n=this.state,r=n.mouseFocusDisabled,o=n.query,i=this.props.selectedIndex,a=this.scrollerRef.current;null!=a&&(o!==t.query?a.scrollTo({to:0}):r&&i>=0&&a.scrollToIndex({section:0,row:i,padding:10}))};l.close=function(){(0,u.Cp)()};l.search=function(e){this.setState({query:e});(0,u.yC)(e)};l.renderInput=function(){var e=this.props,t=e.selectedIndex,n=e.results,o=this.state.query,a=n.length>0&&""!==o;return(0,r.jsx)(i.tEY,{children:(0,r.jsx)("input",{className:Pe().input,"aria-label":N.Z.Messages.QUICK_SWITCHER,ref:this.inputRef,type:"text",role:"combobox","aria-controls":this._listId,"aria-expanded":a,"aria-activedescendant":a?this.getRowId(t):void 0,"aria-autocomplete":"list", placeholder:N.Z.Messages.QUICKSWITCHER_PLACEHOLDER,onChange:this.handleInputChange,onKeyDown:this.handleKeyDown,value:this.state.query,spellCheck:!1,autoFocus:!0})})};l.renderSection=function(){return null};l.renderResults=function(){var e=this.state.query,t=this.props.results;return 0===t.length&&e.length>0?(0,r.jsx)(Ve,{}):0===t.length?null:(0,r.jsx)(i._2F,{innerId:this._listId,innerRole:"listbox","aria-label":N.Z.Messages.QUICK_SWITCHER_RESULTS_LABEL,ref:this.scrollerRef,sectionHeight:0,rowHeight:34,paddingBottom:He,sections:[t.length],className:Pe().scroller,renderRow:this.renderRow,renderSection:this.renderSection})};l.focusNode=function(e){de.S.dispatch(P.CkL.QUICKSWITCHER_RESULT_FOCUS,{node:e})};l.getRowId=function(e){return"quick-switcher-".concat(this._listId,"-item-").concat(e)};l.renderProtip=function(){return(0,r.jsx)(I.Z,{className:f()(Pe().protip,Ze({},Pe().hasContent,this.state.query.length>0)),type:I.Z.Types.INLINE,children:N.Z.Messages.QUICKSWITCHER_PROTIP.format({ userSymbolHook:function(e,t){return Xe(t,v.xQ.USER,N.Z.Messages.QUICKSWITCHER_PROTIP_USERNAMES)},textChannelSymbolHook:function(e,t){return Xe(t,v.xQ.TEXT_CHANNEL,N.Z.Messages.QUICKSWITCHER_PROTIP_TEXT_CHANNELS)},voiceChannelSymbolHook:function(e,t){return Xe(t,v.xQ.VOICE_CHANNEL,N.Z.Messages.QUICKSWITCHER_PROTIP_VOICE_CHANNELS)},guildSymbolHook:function(e,t){return Xe(t,v.xQ.GUILD,N.Z.Messages.QUICKSWITCHER_PROTIP_GUILDS)},helpdeskArticle:pe.Z.getArticleURL(P.BhN.QUICK_SWITCHER_TUTORIAL)})})};l.renderTutorial=function(){var e=this.state.query,t=this.props,n=t.seenTutorial,o=t.results;return n?null:(0,r.jsx)(we,{hasQuery:e.length>0&&o.length>0})};l.render=function(){return(0,r.jsx)(i.Y0X,{"aria-label":N.Z.Messages.QUICK_SWITCHER,size:i.CgR.DYNAMIC,transitionState:this.props.transitionState,className:f()(Pe().container,d.tq&&Pe().mobileContainer),fullscreenOnMobile:!1,children:(0,r.jsxs)("div",{className:f()(Pe().quickswitcher,d.tq&&Pe().mobileQuickswitcher), onMouseMove:this.handleMouseMove,children:[this.renderInput(),this.renderResults(),this.renderProtip(),this.renderTutorial()]})})};return a}(o.PureComponent);function $e(e){var t=(0,p.cj)([c.Z],(function(){return c.Z.getProps()}));return(0,r.jsx)(Je,Le({},t,e))}function et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function nt(e){nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return nt(e)}function rt(e,t){return!t||"object"!==it(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ot(e,t){ot=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return ot(e,t)}var it=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e} ;function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var o=nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rt(this,n)}}var lt="QUICK_SWITCHER_MODAL_KEY",ut=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&ot(e,t)}(n,e);var t=at(n);function n(){et(this,n);return t.apply(this,arguments)}var o=n.prototype;o._initialize=function(){a.Z.subscribe("QUICKSWITCHER_SHOW",this.handleShow);a.Z.subscribe("QUICKSWITCHER_HIDE",this.handleHide)};o._terminate=function(){ a.Z.unsubscribe("QUICKSWITCHER_SHOW",this.handleShow);a.Z.unsubscribe("QUICKSWITCHER_HIDE",this.handleHide)};o.handleShow=function(){c.Z.isOpen()&&!(0,i.nfh)(lt)&&(0,i.h7j)((function(e){return(0,r.jsx)($e,function(e){for(var t=1;t{"use strict";n.d(t,{S:()=>a,c:()=>l});var r=n(2590),o=n(897196),i=/^\d+$/;function a(e){return null!=e&&(e===r.ME||e===r.I_8||!!i.test(e))}function l(e){return null==e||(!!i.test(e)||!!(0,o.AB)(e))}},928733:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s}) ;var r=n(785893),o=n(667294),i=n(723812),a=n(336194),l=n(707961);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>tt});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n.n(l),c=n(202351),s=n(707961),f=n(224813),d=n(790405),p=n(396043),h=n(64234),y=n(769321),b=n(733300),v=n(715107),m=n(131795),g=n.n(m),O=n(853158),E=n(355616),C=n.n(E);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e){S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return S(e)}function I(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){_=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _(e,t)}var w=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function x(e){var t=function(){ if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function P(e){var t=function(e){return e.interpolate({inputRange:[0,1],outputRange:["0px","1px"]})};return{transform:[{translateX:t(e.x)},{translateY:t(e.y)}]}}const N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_(e,t)}(n,e);var t=x(n);function n(){j(this,n);var e;(e=t.apply(this,arguments)).state={x:new O.Z.Value(0),y:new O.Z.Value(0)};e._isMounted=!1;e.shouldLoop=function(){return e._isMounted};return e} var o=n.prototype;o.componentDidMount=function(){this._isMounted=!0;var e=this.state,t=e.x,n=e.y;if("Firefox"!==g().name){O.Z.animate(t,{loop:!0,toValueMin:-74,toValueMax:95,overshootClamping:!0,friction:5,tension:1,shouldLoop:this.shouldLoop});O.Z.animate(n,{loop:!0,toValueMin:-59,toValueMax:75,overshootClamping:!0,friction:5,tension:1,shouldLoop:this.shouldLoop})}};o.componentWillUnmount=function(){this._isMounted=!1};o.render=function(){return(0,r.jsxs)("div",{className:C().searchIndexAnimation,children:[(0,r.jsx)("div",{className:C().searchIndexBackground}),(0,r.jsxs)("svg",{className:C().searchIndexForeground,width:"320",height:"280",children:[(0,r.jsx)("defs",{children:(0,r.jsx)("rect",{id:"search-index-foreground-mask-a",width:"80",height:"80",rx:"40"})}),(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsxs)("g",{transform:"translate(120 80)",children:[(0,r.jsx)("mask",{id:"search-index-foreground-mask-b",fill:"#fff",children:(0,r.jsx)(O.Z.use,{style:P(this.state), className:C().mask,xlinkHref:"#search-index-foreground-mask-a"})}),(0,r.jsxs)("g",{mask:"url(#search-index-foreground-mask-b)",children:[(0,r.jsx)("path",{fill:"#FFF",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),(0,r.jsx)("path",{fill:"#FFD773",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-7.1156 170.8361c0 10.68-8.658 19.338-19.339 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.681 0 19.339 8.658 19.339 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),(0, r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-15.0267 170.8361c0 6.311-5.116 11.427-11.428 11.427-6.31 0-11.426-5.116-11.426-11.427s5.116-11.427 11.426-11.427c6.312 0 11.428 5.116 11.428 11.427z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFF",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFD773",d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M6.9479 154.135c0 10.68-8.658 19.338-19.338 19.338-10.68 0-19.338-8.658-19.338-19.338 0-10.68 8.658-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-12.39 165.5622c-6.311 0-11.427-5.116-11.427-11.427s5.116-11.427 11.427-11.427 11.427 5.116 11.427 11.427c0 2.727-.955 5.231-2.55 7.196",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{fill:"#FFD773", d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-4.4789 140.9499c0 10.68-8.658 19.338-19.338 19.338-10.681 0-19.338-8.658-19.338-19.338 0-10.68 8.657-19.338 19.338-19.338 10.68 0 19.338 8.658 19.338 19.338z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-23.8168 129.5232c6.311 0 11.427 5.116 11.427 11.427s-5.116 11.427-11.427 11.427c-6.312 0-11.427-5.116-11.427-11.427",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),(0,r.jsx)("path",{fill:"#FFF", d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),(0,r.jsx)("path",{fill:"#FFD773",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M100.5348-15.3089c-10.639.941-20.026-6.919-20.968-17.558-.941-10.638 6.92-20.026 17.559-20.967 10.638-.942 20.025 6.919 20.967 17.558.941 10.638-6.919 20.026-17.558 20.967z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M110.2125-35.5789c.556 6.286-4.089 11.833-10.375 12.39-6.287.556-11.834-4.089-12.391-10.375-.555-6.286 4.089-11.834 10.376-12.39",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#C2FFF9", d:"M-76.4877 122.3928l14.704 5.777-8.133 24.358-25.269-4.57 1.997-15.671"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-76.4877 122.3928l14.704 5.777-8.133 24.358-25.269-4.57 1.997-15.671zm-18.6982 25.5654l33.402-19.788",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-93.1889 132.2868l23.272 20.241-6.571-30.135",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#C2FFF9",d:"M151.5172-63.3406l4.276 12.99-20.723 8.042-10.921-19.362 11.546-7.33"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M151.5172-63.3406l4.276 12.99-20.723 8.042-10.921-19.362 11.546-7.33z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M135.6949-69.0003l-.625 26.692 16.447-21.032m-27.3679 1.6701l31.645 11.319",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#E4E9F8", d:"M59.7897 13.2502l-102.171 25.055c-2.453.602-4.93-.899-5.531-3.352l-17.794-72.557c-.602-2.454.9-4.93 3.353-5.532l102.171-25.055c2.454-.601 4.931.899 5.533 3.353l17.793 72.556c.601 2.454-.9 4.93-3.354 5.532"}),(0,r.jsx)("path",{fill:"#7687B2",d:"M45.3502-64.8382c-.602-2.453-3.078-3.954-5.532-3.353l-102.171 25.056c-2.454.601-3.954 3.078-3.353 5.531l3.489 14.228 111.056-27.234-3.489-14.228z"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M59.7897 13.2502l-102.171 25.055c-2.453.602-4.93-.899-5.531-3.352l-17.794-72.557c-.602-2.454.9-4.93 3.353-5.532l102.171-25.055c2.454-.601 4.931.899 5.533 3.353l17.793 72.556c.601 2.454-.9 4.93-3.354 5.532zM-62.2172-23.3763l111.057-27.234m-95.9164 3.7287l-8.367 21.844m30.0096-27.1517l-8.366 21.844m30.0096-27.1516l-8.366 21.844M17.8522-62.804L9.4862-40.96m30.0095-27.1516l-8.366 21.844",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FF7B78", d:"M28.693-19.9388c3.986 16.254-5.959 32.661-22.213 36.647-16.254 3.986-32.661-5.959-36.646-22.213-3.987-16.253 5.959-32.661 22.213-36.646 16.252-3.986 32.661 5.959 36.646 22.212"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M28.693-19.9388c3.986 16.254-5.959 32.661-22.213 36.647-16.254 3.986-32.661-5.959-36.646-22.213-3.987-16.253 5.959-32.661 22.213-36.646 16.252-3.986 32.661 5.959 36.646 22.212z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-16.3051-26.1936l7.999 32.618 26.541-23.798"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M-16.3051-26.1936l7.999 32.618 26.541-23.798z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M101.5895 23.7946l33.137 35.518-29.647-1.029c-2.585-.09-4.608-2.258-4.518-4.843l1.028-29.646z"}),(0,r.jsx)("path",{fill:"#E4E9F8", d:"M134.7262 59.3127l-3.195 92.059c-.089 2.585-2.258 4.608-4.843 4.519l-93.619-3.249c-2.586-.09-4.609-2.258-4.519-4.844l4.223-121.705c.09-2.585 2.259-4.608 4.844-4.518l63.972 2.22"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M134.7262 59.3127l-3.195 92.059c-.089 2.585-2.258 4.608-4.843 4.519l-93.619-3.249c-2.586-.09-4.609-2.258-4.519-4.844l4.223-121.705c.09-2.585 2.259-4.608 4.844-4.518l63.972 2.22",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M101.5895 23.7946l33.137 35.518-29.647-1.029c-2.585-.09-4.608-2.258-4.518-4.843l1.028-29.646z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M104.15 6.4353l39.81 27.834-29.21 5.171c-2.547.451-4.978-1.248-5.429-3.796l-5.171-29.209z"}),(0,r.jsx)("path",{fill:"#E4E9F8", d:"M143.9596 34.2692l16.058 90.704c.45 2.547-1.249 4.978-3.796 5.429l-92.242 16.329c-2.546.452-4.977-1.248-5.428-3.795l-21.229-119.914c-.451-2.547 1.248-4.978 3.796-5.428l63.031-11.159"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M143.9596 34.2692l16.058 90.704c.45 2.547-1.249 4.978-3.796 5.429l-92.242 16.329c-2.546.452-4.977-1.248-5.428-3.795l-21.229-119.914c-.451-2.547 1.248-4.978 3.796-5.428l63.031-11.159",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M104.15 6.4353l39.81 27.834-29.21 5.171c-2.547.451-4.978-1.248-5.429-3.796l-5.171-29.209z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#5871B7",d:"M10.7613-26.0428h117.831c2.829 0 5.123 2.294 5.123 5.123v7.341c0 1.565.716 3.045 1.943 4.016l7 5.542c.659.522.646 1.525-.026 2.029l-6.867 5.151c-1.29.967-2.05 2.485-2.05 4.098v7.685c0 2.829-2.294 5.123-5.123 5.123H10.7613c-2.83 0-5.124-2.294-5.124-5.123v-35.862c0-2.829 2.294-5.123 5.124-5.123"}),(0, r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M10.7613-26.0428h117.831c2.829 0 5.123 2.294 5.123 5.123v7.341c0 1.565.716 3.045 1.943 4.016l7 5.542c.659.522.646 1.525-.026 2.029l-6.867 5.151c-1.29.967-2.05 2.485-2.05 4.098v7.685c0 2.829-2.294 5.123-5.123 5.123H10.7613c-2.83 0-5.124-2.294-5.124-5.123v-35.862c0-2.829 2.294-5.123 5.124-5.123zM64.1588 1.2805h-43.147m21.5738-8.1114h-21.574m91.3894 0H49.816m33.9815-8.1118h-62.786",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M166.0641 58.8137l-21.664 89.53c-.608 2.514-3.14 4.06-5.654 3.451l-91.048-22.031c-2.515-.608-4.06-3.14-3.451-5.654l28.64-118.362c.609-2.515 3.14-4.059 5.655-3.451l62.215 15.055"}),(0,r.jsx)("path",{fill:"#E4E9F8",d:"M140.7574 17.3513l25.307 41.462-28.832-6.976c-2.515-.609-4.06-3.14-3.452-5.654l6.977-28.832z"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M166.0641 58.8137l-21.664 89.53c-.608 2.514-3.14 4.06-5.654 3.451l-91.048-22.031c-2.515-.608-4.06-3.14-3.451-5.654l28.64-118.362c.609-2.515 3.14-4.059 5.655-3.451l62.215 15.055",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M140.7574 17.3513l25.307 41.462-28.832-6.976c-2.515-.609-4.06-3.14-3.452-5.654l6.977-28.832z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#5865f2",d:"M84.6422 57.6999h-117.832c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.045-1.943-4.017l-7-5.542c-.659-.521-.646-1.525.027-2.029l6.867-5.151c1.29-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h117.832c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M84.6422 57.6999h-117.832c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.045-1.943-4.017l-7-5.542c-.659-.521-.646-1.525.027-2.029l6.867-5.151c1.29-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h117.832c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123zM-26.3637 22.2653h48.67M6.0826 30.3767h68.309m-100.7553 0h22.799m53.1942 8.1118h14.942m-24.3346 0h4.534m-71.1346 0h54.093m-54.093 8.1113h63.186",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#98AFED",d:"M63.191 113.1003h-130.64c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.046-1.943-4.017l-7-5.542c-.658-.521-.646-1.525.026-2.029l6.868-5.151c1.291-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h130.64c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M63.191 113.1003h-130.64c-2.829 0-5.123-2.293-5.123-5.123v-7.34c0-1.566-.716-3.046-1.943-4.017l-7-5.542c-.658-.521-.646-1.525.026-2.029l6.868-5.151c1.291-.967 2.049-2.485 2.049-4.098v-7.685c0-2.829 2.294-5.123 5.123-5.123h130.64c2.829 0 5.123 2.294 5.123 5.123v35.862c0 2.83-2.294 5.123-5.123 5.123zM-60.6225 77.6657h99.433m-23.4398 8.1114h7.949m-19.6892 0h-64.253m0 8.1118h47.398m-47.398 8.1113h116.122",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#E4E9F8",d:"M37.8805 30.8191h-105.198c-2.527 0-4.574-2.048-4.574-4.574v-74.706c0-2.527 2.047-4.574 4.574-4.574h105.198c2.526 0 4.574 2.047 4.574 4.574v74.706c0 2.526-2.048 4.574-4.574 4.574"}),(0,r.jsx)("path",{fill:"#7687B2",d:"M42.4547-33.7181v-14.743c0-2.527-2.048-4.574-4.574-4.574h-105.198c-2.527 0-4.575 2.047-4.575 4.574v14.743h114.347z"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M37.8805 30.8191h-105.198c-2.527 0-4.574-2.048-4.574-4.574v-74.706c0-2.527 2.047-4.574 4.574-4.574h105.198c2.526 0 4.574 2.047 4.574 4.574v74.706c0 2.526-2.048 4.574-4.574 4.574zM-71.892-33.8123H42.455m-94.0442-19.2231l-13.328 19.223m35.6121-19.223l-13.328 19.223m35.6132-19.223l-13.328 19.223m35.6122-19.223l-13.328 19.223m35.6121-19.223l-13.328 19.223",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FF7B78",d:"M15.5836-8.8211c0 16.735-13.566 30.302-30.302 30.302-16.735 0-30.302-13.567-30.302-30.302s13.567-30.302 30.302-30.302c16.736 0 30.302 13.567 30.302 30.302"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M15.5836-8.8211c0 16.735-13.566 30.302-30.302 30.302-16.735 0-30.302-13.567-30.302-30.302s13.567-30.302 30.302-30.302c16.736 0 30.302 13.567 30.302 30.302z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#FFF",d:"M-26.6293-25.6136v33.584l31.445-16.792"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M-26.6293-25.6136v33.584l31.445-16.792zM184.3375 8.3772v6.43m3.2149-3.2152h-6.43m-292.9079 79.082v6.43m3.2148-3.2151h-6.43M195.901-43.6692l-1.516 1.515m-6.0611 6.0621l-1.516 1.516m9.0931-.0004l-1.516-1.516m-6.0611-6.0616l-1.516-1.515M-88.642 168.9265l-1.516 1.516m-6.0621 6.0616l-1.516 1.515m9.0941.0001l-1.516-1.515m-6.0621-6.0621l-1.516-1.516M174.3463-8.8211c0 1.775-1.439 3.215-3.215 3.215-1.776 0-3.215-1.44-3.215-3.215s1.439-3.215 3.215-3.215c1.776 0 3.215 1.44 3.215 3.215z",strokeLinecap:"round",strokeLinejoin:"round"})]})]}),(0,r.jsxs)(O.Z.g,{className:C().magnifyingGlass,style:P(this.state),children:[(0,r.jsx)("path",{fill:"#C9D2F0",d:"M89.8311 190.9259c-2.441-2.441-2.441-6.4 0-8.841l36.771-36.771 8.841 8.841-36.771 36.771c-2.441 2.441-6.4 2.441-8.841 0"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M89.8311 190.9259c-2.441-2.441-2.441-6.4 0-8.841l36.771-36.771 8.841 8.841-36.771 36.771c-2.441 2.441-6.4 2.441-8.841 0z",strokeLinecap:"round",strokeLinejoin:"round"}),(0, r.jsx)("path",{fill:"#9F7373",d:"M100.1458 189.4524l-8.841-8.841c-1.628-1.628-1.628-4.267 0-5.894l17.437-17.437c1.627-1.628 4.266-1.628 5.894 0l8.841 8.841c1.628 1.628 1.628 4.267 0 5.894l-17.437 17.437c-1.627 1.628-4.266 1.628-5.894 0"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M100.1458 189.4524l-8.841-8.841c-1.628-1.628-1.628-4.267 0-5.894l17.437-17.437c1.627-1.628 4.266-1.628 5.894 0l8.841 8.841c1.628 1.628 1.628 4.267 0 5.894l-17.437 17.437c-1.627 1.628-4.266 1.628-5.894 0z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{fill:"#F3F9FF",d:"M132.1122 148.6448c-15.621-15.621-15.621-40.948 0-56.569 15.621-15.621 40.948-15.621 56.569 0 15.621 15.621 15.621 40.948 0 56.569-15.621 15.621-40.948 15.621-56.569 0m63.895-63.895c-19.667-19.667-51.554-19.667-71.221 0s-19.667 51.554 0 71.221 51.554 19.667 71.221 0 19.667-51.554 0-71.221"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2", d:"M196.0069 155.9708c-19.667 19.667-51.554 19.667-71.221 0s-19.667-51.554 0-71.221 51.554-19.667 71.221 0 19.667 51.554 0 71.221z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:"#1E2126",strokeWidth:"2",d:"M132.1122 148.6448c-15.621-15.621-15.621-40.948 0-56.569 15.621-15.621 40.948-15.621 56.569 0 15.621 15.621 15.621 40.948 0 56.569-15.621 15.621-40.948 15.621-56.569 0z",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M84 66h130v130H84z"})]})]})]})]})};return n}(o.Component);var A=n(930948),T=n(840474),Z=n(649536),M=n(804808),R=n(840922);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?(0,r.jsxs)(s.P3F,{tag:"div",className:Te().resultsBlocked,onClick:function(){return d.QY(i,!y)},children:[(0,r.jsx)("div",{className:Te().resultsBlockedImage}),(0,r.jsx)("div",{className:Te().resultsBlockedText,children:y?B.Z.Messages.SEARCH_HIDE_BLOCKED_MESSAGES.format({count:c }):B.Z.Messages.SEARCH_NUM_RESULTS_BLOCKED_NOT_SHOWN.format({count:c})})]}):null,!h&&(0,r.jsx)(fe,{changePage:v,offset:f,totalResults:p,pageLength:U.vpv})]})}function Ue(e){var t,n=e.channel,i=e.results,a=e.highlighter,l=e.startIndex,u=e.resultRefs,c=e.totalResults,f=e.scrollTo,d=e.searchId,p=e.renderEmbeds,h=e.offset,b=e.jumpToMessage,m=e.listNavigator,g=y.cC.useSetting(),O=o.useCallback((function(e){if(e!==v.Z.getChannelId()){var t=oe.Z.getChannel(e);null!=t&&ie.Z.can(U.Plq.VIEW_CHANNEL,t)&&(0,re.Kh)(t.id)}}),[]),E=null!=n?(0,$.F6)(n,ae.default,R.Z,!1):"???",C=null!=(null==n?void 0:n.parent_id)?oe.Z.getChannel(n.parent_id):null,j=null!=C?C.name:null,S=null!==(t=(0,ee.Z)(n))&&void 0!==t?t:ue.Z,I=null!=C?(0,ee.Z)(C):null,_=ie.Z.can(U.Plq.MANAGE_MESSAGES,n),w=(0,M.ZP)({content:E,embeds:[]},{postProcessor:a}).content,x=o.useRef(null),P=De(o.useState(!1),2),N=P[0],A=P[1];o.useEffect((function(){var e=x.current ;null!=e&&null!=e.offsetWidth&&null!=e.scrollWidth&&A(e.offsetWidth0&&void 0!==arguments[0]?arguments[0]:null;if(null!=e.props.searchAnalyticsId){var n=0,r=0,o=0,i=0;null!=e.props.searchResults&&u()(e.props.searchResults).flatten().filter((function(e){return e.isSearchHit})).forEach((function(e){if(null!=e.content&&""!==e.content){n++;/https?:\/\/[^\s]+/.test(e.content)&&i++}null!=e.embeds&&e.embeds.length>0&&o++ ;null!=e.attachments&&e.attachments.length>0&&r++}));p.ZP.trackWithMetadata(U.rMx.SEARCH_RESULT_VIEWED,{search_type:e.props.searchType,search_id:e.props.searchAnalyticsId,prev_search_id:t!==e.props.searchAnalyticsId?t:null,is_error:e.props.searchHasError,limit:e.props.searchLimit,offset:e.props.searchOffset,page:Math.floor(e.props.searchOffset/e.props.searchLimit)+1,total_results:e.props.searchTotalResults,page_results:null!=e.props.searchResults?e.props.searchResults.length:null,is_indexing:e.props.searchIsIndexing,page_num_messages:n,page_num_links:i,page_num_embeds:o,page_num_attach:r})}};return e}var r=n.prototype;r.componentDidMount=function(){this.autoAnalytics()};r.componentDidUpdate=function(e){this.props.searchAnalyticsId===e.searchAnalyticsId&&this.props.searchOffset===e.searchOffset||this.autoAnalytics(e.searchAnalyticsId)};r.render=function(){return null};return n}(o.Component),$e=function(e){var t=e.children;return(0,r.jsx)("div",{className:Fe().emptyResultsWrap, children:(0,r.jsx)("div",{className:Fe().emptyResultsContent,children:t})})},et=function(e){We(n,e);var t=Xe(n);function n(){Ge(this,n);var e;(e=t.apply(this,arguments)).state={searchMode:U.QIO.NEWEST,searchQuery:null};e.scrollerRef=o.createRef();e.scrollTo=function(t,n,r){var o=e.scrollerRef.current;if(null!=o){var i=o.getScrollerState().scrollTop-t;o.scrollTo({to:i,animate:n,callback:r})}};e.selectChannel=function(e){e!==v.Z.getChannelId()&&f.Z.transitionToInviteChannelSync(e)};e.searchPrevious=function(){var t=e.props,n=t.searchId;t.search.isSearching||d.jn(n)};e.searchNext=function(){var t=e.props,n=t.searchId;t.search.isSearching||d.m$(n)};e.handleSearchResultsClose=function(){var t=e.props.searchId;d.qt(t)};e.searchByMode=function(t){var n=e.props,r=n.searchId,o=n.search.isSearching;if(t!==e.state.searchMode&&!o){p.ZP.trackWithMetadata(U.rMx.SEARCH_RESULT_SORT_CHANGED,{search_id:b.Z.getAnalyticsId(r),new_sort_type:t});d.Nz(r,t);e.setState({searchMode:t})}} ;e.toggleShowBlockedMessages=function(){var t=e.props,n=t.searchId,r=t.search.showBlockedResults;d.QY(n,!r)};e.renderHeader=function(){var t=e.state.searchMode,n=e.props.search,o=n.totalResults,i=n.isSearching,a=n.isHistoricalIndexing,l=n.documentsIndexed;return(0,r.jsx)(z,{searchMode:t,searchByMode:e.searchByMode,totalResults:o,isSearching:i,isIndexing:a,documentsIndexed:l})};e.renderIndexing=function(){var t=b.Z.getSearchType(e.props.searchId)===U.aib.GUILD?B.Z.Messages.SEARCH_GUILD_STILL_INDEXING:B.Z.Messages.SEARCH_DM_STILL_INDEXING;return(0,r.jsxs)($e,{children:[(0,r.jsx)(N,{}),(0,r.jsx)("div",{className:(Fe().emptyResultsText,Fe().stillIndexing),children:t})]})};e.renderNoResults=function(){var t=e.props.search.showNoResultsAlt,n=t?B.Z.Messages.SEARCH_NO_RESULTS_ALT:B.Z.Messages.SEARCH_NO_RESULTS;return(0,r.jsxs)($e,{children:[(0,r.jsx)("div",{className:a()(Fe().noResultsImage,He({},Fe().alt,t))}),(0,r.jsx)("div",{ className:a()(Fe().emptyResultsText,Fe().noResults,He({},Fe().alt,t)),children:n})]})};e.renderError=function(){return(0,r.jsxs)($e,{children:[(0,r.jsx)("div",{className:Fe().errorImage}),(0,r.jsx)("div",{className:a()(Fe().emptyResultsText,Fe().errorMessage),children:B.Z.Messages.SEARCH_ERROR})]})};e.renderContent=function(){var t=e.props,n=t.searchResults,o=t.blockCount,i=e.props.search,a=i.totalResults,l=i.isSearching,u=i.isIndexing;return i.hasError?e.renderError():u?e.renderIndexing():l?null:a>0?(0,r.jsx)(ke,{search:e.props.search,searchResults:n,blockCount:o,searchId:e.props.searchId,renderEmbeds:e.props.renderEmbeds,scrollTo:e.scrollTo}):e.renderNoResults()};return e}var i=n.prototype;i.componentDidMount=function(){A.S.subscribe(U.CkL.SEARCH_RESULTS_CLOSE,this.handleSearchResultsClose)};i.componentWillUnmount=function(){A.S.unsubscribe(U.CkL.SEARCH_RESULTS_CLOSE,this.handleSearchResultsClose)};i.componentDidUpdate=function(e){var t=e.search ;if(this.props.search.showBlockedResults!==t.showBlockedResults){var n=this.scrollerRef.current;if(null==n)return;n.scrollToBottom()}var r=b.Z.getQuery(this.props.searchId);JSON.stringify(r)!==JSON.stringify(this.state.searchQuery)&&this.setState({searchQuery:r,searchMode:U.QIO.NEWEST})};i.render=function(){var e=this.props,t=e.searchAnalyticsId,n=e.searchType,o=e.searchResults,i=this.props.search,a=i.offset,l=i.hasError,u=i.totalResults,c=i.isHistoricalIndexing;return(0,r.jsxs)("section",{className:Fe().searchResultsWrap,"aria-label":B.Z.Messages.SEARCH_RESULTS_SECTION_LABEL,children:[this.renderHeader(),(0,r.jsx)(s.Den,{ref:this.scrollerRef,className:Fe().scroller,children:this.renderContent()}),(0,r.jsx)(Je,{searchType:n,searchAnalyticsId:t,searchResults:o,searchOffset:a,searchLimit:U.vpv,searchHasError:l,searchTotalResults:u,searchIsIndexing:c})]})};return n}(o.PureComponent);function tt(e){var t=e.searchId;return(0,r.jsx)(et,ze(Ye(ze({searchId:t},(0,c.cj)([b.Z],(function(){return{ search:b.Z.getResultsState(t),searchAnalyticsId:b.Z.getAnalyticsId(t),searchType:b.Z.getSearchType()}}),[t]),function(e){var t=(0,c.e7)([b.Z],(function(){var t,n=b.Z.getQuery(e),r=b.Z.getRawResults(e);if(null==n||null==r)return[];var o=(0,T.nC)(null!==(t=n.content)&&void 0!==t?t:"");return r.map((function(e){return e.map((function(e){var t=(0,Z.e5)(e);return t.isSearchHit?t.set("customRenderedContent",(0,M.ZP)(t,{postProcessor:o})):t}))}))}),[e],c.pF),n=D((0,c.e7)([R.Z],(function(){var e=0;return[t.map((function(t){return t.filter((function(t){var n=R.Z.isBlocked(t.author.id);n&&t.isSearchHit&&e++;return!n||t.isSearchHit}))})),e]}),[t],c.pF),2);return{searchResults:n[0],blockCount:n[1]}}(t)),{renderEmbeds:y.NA.useSetting(),developerMode:y.Sb.useSetting()}),(0,c.cj)([h.Z],(function(){return{theme:h.Z.theme}}))))}},468874:(e,t,n)=>{"use strict";n.d(t,{oW:()=>u,AX:()=>c,cV:()=>s,BR:()=>f,Df:()=>d,ZZ:()=>p,gr:()=>h,fW:()=>y,Bo:()=>b,LT:()=>v}) ;var r=n(575494),o=n(281110),i=n(744564),a=n(99452),l=n(2590);function u(e,t,n,r,o){i.Z.dispatch({type:"SHARED_CANVAS_DRAW_LINE_POINT",channelId:e,userId:n,lineId:t,streamerId:r,point:o})}function c(e,t,n,r){return o.Z.post({url:l.ANM.SHARED_CANVAS_LINES(e,n),body:{line_id:t,points:r}})}function s(e,t,n,r){i.Z.dispatch({type:"SHARED_CANVAS_UPDATE_LINE_POINTS",userId:t,lineId:e,newPoints:r,streamerId:n})}function f(e,t,n){return o.Z.post({url:l.ANM.SHARED_CANVAS_EMOJI_HOSES(e,t),body:{emoji_hose:n}})}function d(e,t,n){o.Z.delete({url:l.ANM.SHARED_CANVAS_EMOJI_HOSE(e,t,n),backoff:new r.Z})}function p(e,t){t.state=a.f.STOP;i.Z.dispatch({type:"SHARED_CANVAS_UPDATE_EMOJI_HOSE",emojiHose:t,userId:t.userId,streamerId:e})}function h(e,t,n){i.Z.dispatch({type:"SHARED_CANVAS_UPDATE_EMOJI_HOSE",emojiHose:e,userId:t,streamerId:n})}function y(e,t){i.Z.dispatch({type:"SHARED_CANVAS_CLEAR_DRAWABLES",drawables:e,streamerId:t})}function b(e){i.Z.dispatch({type:"SHARED_CANVAS_SET_DRAW_MODE",drawMode:e}) }function v(){i.Z.dispatch({type:"TOGGLE_OVERLAY_CANVAS"})}},35723:(e,t,n)=>{"use strict";n.d(t,{Ks:()=>r,qh:()=>o,q2:()=>i,Fq:()=>a,FO:()=>l});var r=80,o=48,i=3,a=500,l=5e3},9134:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(260561).B)({kind:"guild",id:"2023-01_shared_canvas",label:"Shared Canvas",defaultConfig:{isSharedCanvasEnabled:!1},treatments:[{id:1,label:"Enable Shared Canvas",config:{isSharedCanvasEnabled:!0}}]})},407761:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var r=n(202351),o=n(744564),i=n(732016),a=n(473903),l=n(38004),u=n(99452),c=n(569588),s=n(35723);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?j[o][f]=b({},j[o][f],c):j[o].push(c)}var d=null!==(n=null!==(t=r.emojiId)&&void 0!==t?t:r.emojiName)&&void 0!==n?n:"";if(null==I[d]){var p,h=null!=r.emojiName?i.ZP.convertNameToSurrogate(r.emojiName):null;I[d]=new Image;I[d].src=(0,l.qc)({id:r.emojiId,name:null!==(p=null!=h?h:r.emojiName)&&void 0!==p?p:"",animated:!1},s.qh)}x(a)},SHARED_CANVAS_CLEAR_DRAWABLES:function(e){var t=e.drawables,n=e.streamerId;if(null!=j[n]){var r=new Set;t.forEach((function(e){return r.add(e.id)}));j[n]=j[n].filter((function(e){return!r.has(e.id)}))}},SHARED_CANVAS_SET_DRAW_MODE:function(e){var t=e.drawMode;w=t},TOGGLE_OVERLAY_CANVAS:function(e){e=null!==e?e:function(e){throw e}(new TypeError("Cannot destructure undefined"));_=!_}});const A=N},99452:(e,t,n)=>{"use strict";n.d(t,{W:()=>r,f:()=>o});var r,o;!function(e){e.LINE="line";e.EMOJI_HOSE="emoji_hose"}(r||(r={}));!function(e){e.START="START";e.STOP="STOP"}(o||(o={}))},569588:(e,t,n)=>{"use strict";n.d(t,{UN:()=>s,hn:()=>f, np:()=>d,RR:()=>p,P7:()=>h,bg:()=>y});var r=n(717621),o=n.n(r),i=n(547308),a=n(109206),l=n(473903),u=n(99452),c=n(35723);function s(e){var t=e.current,n=null==t?void 0:t.getContext("2d");null!=t&&null!=n&&n.clearRect(0,0,t.width,t.height)}function f(e,t){var n=e.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top;return{x:(t.clientX-i)/r,y:(t.clientY-a)/o}}function d(e,t){return Math.round(e*t*window.devicePixelRatio)}function p(e,t,n){return{x:d(e.x,t),y:d(e.y,n),deltaTime:e.deltaTime}}function h(e){return e.type===u.W.LINE}function y(e,t,n,r){var u,s=l.default.getUser(e),f=null==s?void 0:s.getAvatarURL(null,c.Ks),d=null!=f?null===(u=a.SR.getState().palette[f])||void 0===u?void 0:u[0]:null,p=null!=d?"#".concat(o()({r:d[0],g:d[1],b:d[2]}).toHex()):r;return{fillColor:p,outlineColor:(0,i.Bd)((0,i._i)(p))>.5?n:t}}},103245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w}) ;var r=n(667294),o=n(513328),i=n(336194),a=n(707961),l=n(109206),u=n(407561),c=n(468874),s=n(407761),f=n(99452),d=n(569588),p=n(496486),h=n.n(p),y=n(468811),b=n.n(y),v=n(38736);function m(e,t,n,r,o){e.save();e.beginPath();e.fillStyle=r;e.arc(t,n,Math.round(20*window.devicePixelRatio)/2+o,0,2*Math.PI);e.fill();e.restore()}function g(e,t,n,r){e.save();var o=s.Z.getAvatarImage(r);if(null!=o){var i=20*window.devicePixelRatio;e.beginPath();e.arc(t,n,i/2,0,2*Math.PI);e.clip();e.drawImage(o,t-i/2,n-i/2,i,i);e.restore()}}var O=n(35723),E={X_OFFSET:2*O.qh,Y_OFFSET:25,X_SPEED:.5,Y_SPEED_MIN:-1,Y_SPEED_MAX:-5,OPACITY:1,OPACITY_SPEED_MIN:.01,OPACITY_SPEED_MAX:.05,SIZE_MIN:O.qh/2,SIZE_MAX:O.qh},C=(0,v.Z)((function(){return{particles:{},lastSpawned:{}}}));function j(e,t){return{id:b().v4(),x:e+h().random(-E.X_OFFSET,E.X_OFFSET),y:t+h().random(-E.Y_OFFSET,E.Y_OFFSET),xSpeed:h().random(-E.X_SPEED,E.X_SPEED),ySpeed:h().random(E.Y_SPEED_MIN,E.Y_SPEED_MAX),opacity:E.OPACITY, opacitySpeed:h().random(E.OPACITY_SPEED_MIN,E.OPACITY_SPEED_MAX),size:h().random(E.SIZE_MIN,E.SIZE_MAX)}}function S(e,t){var n;h()(null!==(n=C.getState().particles[e.id])&&void 0!==n?n:{}).forEach(t)}function I(e){var t,n,r=e.emojiHose,o=e.context,i=e.canvasWidth,a=e.canvasHeight,l=e.fallbackColor,u=e.outlineColorDark,p=e.outlineColorLight,y=e.streamerId,b=e.deadDrawables;o.save();var v=s.Z.getEmojiImage(null!==(n=null!==(t=r.emojiId)&&void 0!==t?t:r.emojiName)&&void 0!==n?n:""),E=(0,d.np)(r.x,i),I=(0,d.np)(r.y,a),_=(0,d.bg)(r.userId,u,p,l).outlineColor;S(r,(function(e){return function(e,t){t.x+=t.xSpeed*window.devicePixelRatio;t.y+=t.ySpeed*window.devicePixelRatio;t.opacity-=t.opacitySpeed;t.opacity<=0&&C.setState((function(n){delete n.particles[e.id][t.id];0===Object.keys(n.particles[e.id]).length&&delete n.particles[e.id];return n}))}(r,e)}));!function(e,t,n){var r,o=null!==(r=C.getState().lastSpawned[e.id])&&void 0!==r?r:0,i=Date.now() ;o+100>i||e.state===f.f.STOP||(Math.random()<=.8||o+3000}(r)||b.push(r);o.restore()}function _(e){var t=e.drawable,n=e.context,r=e.canvasWidth,o=e.canvasHeight,i=e.fallbackColor,a=e.outlineColorDark,l=e.outlineColorLight,u=e.linesDrawnAt,c=e.streamerId,s=e.deadDrawables;switch(t.type){case f.W.LINE:return function(e){ var t=e.line,n=e.context,r=e.canvasWidth,o=e.canvasHeight,i=e.fallbackColor,a=e.outlineColorDark,l=e.outlineColorLight,u=e.linesDrawnAt,c=e.deadDrawables;null==u.current[t.id]&&(u.current[t.id]=Date.now());n.lineCap="round";n.lineJoin="round";var s=t.points.map((function(e){return(0,d.RR)(e,r,o)})),f=u.current[t.id],p=function(e){return f+e.deltaTime},h=function(e){return p(e)+1500>=Date.now()},y=function(e){return p(e)<=Date.now()&&h(e)},b=s.find(y);if(null!=b){var v=function(e,t){var r=null;n.lineWidth=t*window.devicePixelRatio;n.strokeStyle=e;n.beginPath();n.moveTo(b.x,b.y);for(var o=1;o0&&(0, c.fW)(b,i)}}}}({canvasRef:e,drawables:n,fallbackColor:p,linesDrawnAt:b,streamerId:t,outlineColorDark:h,outlineColorLight:y,channelId:f})}),[e,f,p,h,y]);r.useEffect((function(){var t=new ResizeObserver((function(){var t=e.current;if(null!=t){var r=t.getBoundingClientRect(),o=r.width,i=r.height;t.width=o*window.devicePixelRatio;t.height=i*window.devicePixelRatio;m(n)}}));null!=e.current&&t.observe(e.current);return function(){return t.disconnect()}}),[e,m,n]);var g=r.useCallback((function(){var t=s.Z.getDrawables(n),r=C.getState().particles,o=t.length>0||Object.keys(r).length>0;if(o&&null==v.current._ref)if(null==v.current._ref){m(n);v.current.start(16.666666666666668,(function(){return m(n)}))}else if(!o&&null!=v.current._ref){v.current.stop();(0,d.UN)(e)}}),[e,m,n]);r.useEffect((function(){var e=v.current;s.Z.addChangeListener(g);g();(0,l.vM)(t.getAvatarURL(null,O.Ks));return function(){s.Z.removeChangeListener(g);e.stop()}}))}},336177:(e,t,n)=>{"use strict";n.d(t,{w:()=>g,Dx:()=>O, $d:()=>C,AA:()=>S,TB:()=>_,hs:()=>w,xR:()=>x,R:()=>P,xz:()=>N,un:()=>A});var r=n(496486),o=n.n(r),i=n(281110),a=n(744564),l=n(105783),u=n(539381),c=n(917019),s=n(656907),f=n(911980),d=n(460214),p=n(2590),h=n(131559),y=n(473708);function b(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,l,"next",e)}function l(e){b(i,r,o,a,l,"throw",e)}a(void 0)}))}}var m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r), 0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=h.oX){l.Z.show({title:y.Z.Messages.FAVORITES_LIMIT_REACHED_TITLE,body:y.Z.Messages.FAVORITES_LIMIT_REACHED_BODY.format({count:h.oX})});return!1}if(t.soundIds.includes(e))return!1;t.soundIds.push(e)}),h.fy.INFREQUENT_USER_ACTION)}function w(e){c.DZ.updateAsync("favoriteSoundboardSounds",(function(t){t.soundIds=t.soundIds.filter((function(t){return t!==e}))}),h.fy.INFREQUENT_USER_ACTION)}function x(e,t){a.Z.dispatch({type:"GUILD_SOUNDBOARD_SOUND_PLAY_START",soundId:e,userId:t})}function P(e,t){a.Z.dispatch({type:"GUILD_SOUNDBOARD_SOUND_PLAY_END",soundId:e,userId:t})}function N(e){a.Z.dispatch({type:"USER_SOUNDBOARD_SET_VOLUME",volume:e})}function A(){return T.apply(this,arguments)}function T(){return(T=v((function(){var e,t,n;return m(this,(function(r){switch(r.label){case 0:if(!s.Z.shouldFetchDefaultSounds())return[2];a.Z.dispatch({type:"SOUNDBOARD_FETCH_DEFAULT_SOUNDS"});r.label=1;case 1:r.trys.push([1,3,,4]);return[4,i.Z.get(p.ANM.SOUNDBOARD_DEFAULT_SOUNDS)] ;case 2:e=r.sent();t=e.body.map((function(e){return(0,f.o3)(e,d.X8)}));a.Z.dispatch({type:"SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS",sounds:t});return[3,4];case 3:n=r.sent();a.Z.dispatch({type:"SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE"});throw new u.Z(n);case 4:return[2]}}))}))).apply(this,arguments)}},911980:(e,t,n)=>{"use strict";n.d(t,{o3:()=>l,bg:()=>u,vB:()=>c});function r(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function o(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function l(e,t){var n=e.sound_id,r=e.emoji_id,l=e.emoji_name,u=e.override_path,c=e.user_id;return i(o({},a(e,["sound_id","emoji_id","emoji_name","override_path","user_id"])),{soundId:n,guildId:t,emojiId:r,emojiName:l,overridePath:u,userId:c})}var u,c;!function(e){e[e.FAVORITES=0]="FAVORITES";e[e.GUILD=1]="GUILD" ;e[e.DEFAULTS=2]="DEFAULTS";e[e.SEARCH=3]="SEARCH"}(u||(u={}));!function(e){e[e.SOUND=0]="SOUND"}(c||(c={}))},815378:(e,t,n)=>{"use strict";n.d(t,{pI:()=>a,Rp:()=>l});var r=n(769321),o=n(736097),i=n(615457);function a(){var e,t=r.kU.getSetting();return null!==(e=null==t?void 0:t.volume)&&void 0!==e?e:100}function l(e){var t,n,a=(n=r.kU.getSetting(),(0,i.P)(null!==(t=null==n?void 0:n.volume)&&void 0!==t?t:100)/100),l=Math.min(o.Z.getOutputVolume()/100,1);return Math.min(e*a*l,1)}},182306:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(682776),o=n(255088),i=n(2590);function a(e){if(null==e)return!1;var t=o.ZP.getCurrentConfig({guildId:e.guild_id}).allowSoundboard,n=r.Z.can(i.Plq.USE_SOUNDBOARD,e),a=r.Z.can(i.Plq.SPEAK,e);return t&&e.type===i.d4z.GUILD_VOICE&&n&&a}},897699:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2590);function o(e,t){var n=null!=t?r.ANM.SOUNDBOARD_DEFAULT_SOUND:r.ANM.SOUNDBOARD_SOUND,o=null!=t?t:e,i=window.GLOBAL_ENV,a=i.CDN_HOST ;return"development"!==i.PROJECT_ENV?"".concat(location.protocol,"//").concat(a).concat(n(o)):"".concat(location.protocol).concat(window.GLOBAL_ENV.API_ENDPOINT).concat(n(o))}},229400:(e,t,n)=>{"use strict";n.d(t,{O:()=>a,f:()=>l});var r=n(202351),o=n(736097),i=n(36256);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.Z;return e.supports(i.AN.SAMPLE_PLAYBACK)}function l(){return(0,r.e7)([o.Z],(function(){return a(o.Z)}))}},347387:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b,G:()=>y});var r=n(667294),o=n(441143),i=n.n(o),a=n(202351),l=n(242942),u=n(407561),c={currentPreviewRef:r.createRef()};const s=r.createContext(c);var f=n(656907),d=n(815378),p=n(897699);function h(e,t,n){i()(null!=e,"Not currently in voice channel");i()(null!=t,"Sound to play is null");(0,l.kq)(e,t,__OVERLAY__,n)}function y(e,t,n){h(u.Z.getCurrentClientVoiceChannelId(t),e,n)}function b(e,t){var n=r.useContext(s).currentPreviewRef,o=(0,a.e7)([u.Z],(function(){ return u.Z.getCurrentClientVoiceChannelId(t)})),i=(0,a.e7)([f.Z],(function(){return null!=e&&f.Z.isPlayingSound(e.soundId)}),[e]),l=r.useCallback((function(t,r){null!=n.current&&n.current.pause();h(o,null!=r?r:e,t)}),[e,n,o]),c=r.useCallback((function(){if(null!=e){var t=new Audio((0,p.Z)(e.soundId,e.overridePath));null!=n.current&&n.current.pause();n.current=t;t.currentTime=0;t.volume=(0,d.Rp)(e.volume);t.play()}}),[e,n]);r.useCallback((function(){return function(){var e;return null===(e=n.current)||void 0===e?void 0:e.pause()}}),[n]);return{playSoundboardSound:l,isPlayingSound:i,previewSound:c}}},16727:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(202351),c=n(336194),s=n(707961),f=n(77413),d=n(362565),p=n(82677),h=n(701190),y=n(796938),b=n(336177),v=n(656907),m=n(347387),g=n(971402),O=n(567403);function E(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function C(e){ return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){E(i,r,o,a,l,"next",e)}function l(e){E(i,r,o,a,l,"throw",e)}a(void 0)}))}}function j(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function S(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var I=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){ return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function M(e){var t=e.disabled,n=void 0!==t&&t,o=e.onClick,i=e.text,l=e.children;return(0,r.jsx)(s.ua7,{text:i,children:function(e){return(0,r.jsx)(s.P3F,T(A({},e),{"aria-label":i, className:a()(P().secondaryButton,N({},P().buttonDisabled,n)),onClick:o,children:l}))}})}const R=o.forwardRef((function(e,t){var n,i=function(e){e.stopPropagation();e.currentTarget.blur();Q?(0,b.hs)(F):(0,b.TB)(F)},g=function(e){e.stopPropagation();e.currentTarget.blur();K()},E=function(){Y(U)},C=e.sound,j=e.voiceChannelGuildId,S=e.className,I=e.focused,x=e.interactive,R=void 0===x||x,L=e.enableSecondaryActions,D=void 0!==L&&L,k=e.onMouseEnter,U=e.analyticsLocations,B=Z(e,["sound","voiceChannelGuildId","className","focused","interactive","enableSecondaryActions","onMouseEnter","analyticsLocations"]),F=C.soundId,G=C.name,H=C.emojiId,V=C.emojiName,W=function(e){return o.useCallback((function(t){t.stopPropagation();var n=O.Z.getGuild(e.guildId);null!=n&&_(t,n,e)}),[e])}(C),z=(0,m.Z)(C,j),Y=z.playSoundboardSound,K=z.previewSound,q=z.isPlayingSound,Q=(0,u.e7)([v.Z],(function(){return v.Z.isFavoriteSound(F)}),[F]),X="sound-".concat(C.soundId),J=(0,l.JA)(X),$=null!=H||null!=V;return(0, r.jsx)("li",{ref:t,className:P().soundButtonWrapper,onMouseEnter:k,children:(0,r.jsxs)(s.kL8,T(A({},B),{buttonProps:T(A({},J),{id:X,role:"button"}),"aria-label":w.Z.Messages.SOUNDBOARD_PLAY_SOUND.format({emojiName:C.emojiName,soundName:C.name}),className:a()(S,P().soundButton,(n={},N(n,P().playing,q),N(n,P().soundButtonInteractive,R),N(n,P().buttonDisabled,!R),N(n,P().focused,R&&I),n)),onClick:E,onContextMenu:D?W:E,children:[(0,r.jsxs)("div",{className:P().soundInfo,"aria-hidden":!0,children:[$&&(0,r.jsx)(f.Z,{emojiId:H,emojiName:V,className:P().emoji}),(0,r.jsx)(s.xvT,{variant:"text-xs/medium",color:R?"header-primary":"text-muted",className:a()(P().soundName,N({},P().hasEmoji,$)),children:G})]}),(0,r.jsxs)("div",{className:P().buttonOverlay,children:[(0,r.jsx)("div",{className:P().buttonOverlayBackground}),(0,r.jsxs)("div",{className:P().buttonOverlayActions,children:[D?(0,r.jsx)(M,{disabled:!R,onClick:g,text:w.Z.Messages.SOUNDBOARD_SOUND_PREVIEW_SOUND.format({emojiName:C.emojiName, soundName:C.name}),children:(0,r.jsx)(y.Z,{className:P().secondaryIcon})}):null,(0,r.jsx)(h.Z,{className:P().playIcon}),D?(0,r.jsx)(M,{disabled:!R,onClick:i,text:w.Z.Messages.SOUNDBOARD_SOUND_FAVORITE_SOUND.format({emojiName:C.emojiName,soundName:C.name}),children:Q?(0,r.jsx)(p.Z,{className:a()(P().secondaryIcon,P().favoriteIconFavorite),color:c.Z.unsafe_rawColors.GOLD.css}):(0,r.jsx)(d.Z,{className:P().secondaryIcon})}):null]})]})]}))})}))},607313:(e,t,n)=>{"use strict";n.d(t,{IN:()=>a,oZ:()=>l});n(785893),n(667294);var r=n(744564),o=(n(472009),n(15338),n(563367),n(304275)),i=(n(310126),n(626826),n(460214));n(2590),n(473708);i.FW.width,i.FW.height,i.FW.padding;function a(e,t){r.Z.dispatch({type:"OVERLAY_SET_INPUT_LOCKED",locked:!1,pid:t});r.Z.dispatch({type:"SOUNDBOARD_SET_OVERLAY_ENABLED",enabled:!0,keepOpen:e})}function l(e){r.Z.dispatch({type:"SOUNDBOARD_SET_OVERLAY_ENABLED",enabled:!1});o.Z.isInputLocked(e)||r.Z.dispatch({type:"OVERLAY_SET_INPUT_LOCKED",locked:!0,pid:e})}}, 641429:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ve});var r=n(785893),o=n(667294),i=n(999357),a=n(202351),l=n(336194),u=n(707961),c=n(153686),s=n(19585),f=n(674748),d=n(917019),p=n(563367),h=n(138049),y=n(265367),b=n(120415),v=n(79251),m=n(336177),g=n(656907),O=n(824390),E=n.n(O),C=n(971402),j=n(711003),S=n(761731),I=n(43566),_=n(604992),w=n(483902),x=n(394352),P=n(803782),N=n.n(P);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&!i&&null!=d?d():(0,r.jsx)(w.Z,{role:"none presentation",listPadding:a,onScroll:C,renderRow:l,renderSection:u,renderSectionHeader:c,renderSectionFooter:s,rowCount:p,rowCountBySection:h,rowHeight:y,sectionHeaderHeight:b,sectionFooterHeight:v,stickyHeaders:!0,ref:g}),null==f?void 0:f()]})}));var M=n(503528),R=n(707558),L=n(650332),D=n(301627),k=n.n(D);const U=o.forwardRef((function(e,t){ var n=e.store,i=e.hasSendableExpressions,a=e.onKeyDown,l=e.gridNavigatorId,u=e.expressionsListRef,c=e.defaultSearchPlaceholder,s=e.emptySearchPlaceholder,f=o.useRef(null),d=(0,x.Iu)((function(e){return{searchQuery:e.searchQuery,searchPlaceholder:e.searchPlaceholder,isSearchSuggestion:e.isSearchSuggestion}}),M.Z),p=d.searchQuery,h=d.searchPlaceholder,y=d.isSearchSuggestion,b=n.useStore((function(e){return e.inspectedExpressionPosition}),M.Z),v=o.useCallback((function(e){var t;n.setActiveCategoryIndex(""===e?0:I.c);n.setInspectedExpressionPosition(0,0);(0,x.$2)(null);(0,x.ql)(e);null===(t=u.current)||void 0===t||t.scrollTo(0)}),[u,n]),m=o.useCallback((function(){(0,x.ql)("")}),[]);o.useImperativeHandle(t,(function(){return{focus:function(){var e;return null===(e=f.current)||void 0===e?void 0:e.focus()}}}));o.useLayoutEffect((function(){if(y){var e;null===(e=f.current)||void 0===e||e.focus()}}),[y]);return(0,r.jsx)("div",{className:k().wrapper,children:(0,r.jsx)(L.ZP,{autoFocus:i, disabled:!i,query:p,ref:f,size:L.ZP.Sizes.MEDIUM,placeholder:null!=h?h:i||null==s?c:s,onClear:m,onKeyDown:a,onQueryChange:v,className:k().searchBar,preventEscapePropagation:!1,useKeyboardNavigation:!1,inputProps:{"aria-haspopup":"grid","aria-controls":l,"aria-expanded":!0,"aria-activedescendant":(0,R.NE)(l,b.columnIndex,b.rowIndex)}})})}));var B=n(732071),F=n.n(B);function G(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function H(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&e.push({key:ae.bg.FAVORITES,categoryInfo:{type:ae.bg.FAVORITES},items:Te(t)});var _=!0,w=!1,x=void 0;try{for(var P,N=d[Symbol.iterator]();!(_=(P=N.next()).done);_=!0){var A,T=P.value,Z=null!==(A=u.get(T.id))&&void 0!==A?A:[];Z.length>0&&e.push({categoryInfo:{type:ae.bg.GUILD,guild:T},key:T.id,items:Te(Z)})}}catch(e){w=!0;x=e}finally{try{_||null==N.return||N.return()}finally{if(w)throw x}}e.push({key:ae.bg.DEFAULTS,categoryInfo:{type:ae.bg.DEFAULTS},items:Te(s)});return e}),[u,s,c,d])}(h),v=Pe(o.useState([]),2),m=v[0],O=v[1],j=function(e,t){return t.length>0?[{key:ae.bg.SEARCH,categoryInfo:{type:ae.bg.SEARCH},items:Te(t)}]:e}(b,m),S=z.T4.useSetting(),_=o.useMemo((function(){return new Set(S)}),[S]),w=o.useCallback((function(e){!_.has(e)?_.add(e):_.delete(e);z.T4.updateSetting(Array.from(_))}),[_]),x=o.useCallback((function(e,n,o,i,a){return(0,r.jsx)(Re,{descriptors:e,rowIndex:o.rowIndex, isUsingKeyboardNavigation:o.isUsingKeyboardNavigation,gridRowProps:n,getItemProps:i,onItemMouseEnter:a,soundButtonProps:{voiceChannelGuildId:t,interactive:!p,analyticsLocations:c}},"row-".concat(n["aria-rowindex"]))}),[c,t,p]),P=o.useCallback((function(e){var t="".concat(e.key);return(0,r.jsx)(Ze,{categoryInfo:e.categoryInfo,toggleCollapsed:function(){return w(t)},collapsed:_.has(t)},"header-".concat(t))}),[_,w]),N=o.useCallback((function(e){return 0===e?32:40}),[]),A=o.useCallback((function(e){(0,le.G)(e.item,t,c)}),[c,t]),T=o.useCallback((function(e){if(0!==e.length){var t=b.reduce((function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=t.items[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;t.categoryInfo.type!==ae.bg.FAVORITES&&e.push(l.item)}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return e}),[]),n=e.toLocaleLowerCase(),r=t.filter((function(e){ var t=E()(n,e.name.toLocaleLowerCase()),r=null!=e.emojiName&&E()(n,e.emojiName.toLocaleLowerCase());return t||r}));O(r)}else O([])}),[b]),Z=o.useCallback((function(e){(0,C.jW)(e,Ie((function(){var e,o;return Ne(this,(function(i){switch(i.label){case 0:return[4,n.e(56674).then(n.bind(n,656674))];case 1:e=i.sent(),o=e.default;return[2,function(e){return(0,r.jsx)(o,xe(we({guildId:t},e),{onPickerClose:l}))}]}}))})))}),[t,l]),M=o.useCallback((function(){return(0,r.jsx)(u.P3F,{tabIndex:0,className:Ce().settingsClickArea,onClick:Z,"aria-label":Oe.Z.Messages.SETTINGS,children:(0,r.jsx)(re.Z,{className:Ce().settingsIcon})})}),[Z]),R=o.useCallback((function(e){return(0,r.jsx)(me,{soundboardListRef:e,categories:b})}),[b]);return(0,r.jsx)(W,{categories:j,collapsedCategories:_,containerWidth:i,store:I.Wq,onSelectItem:A,onSearchExpressions:T,hasSearchResults:m.length>0,defaultSearchPlaceholder:"Search",renderRow:x,renderSectionHeader:P,renderCategoryList:R,renderHeaderAccessories:M,rowHeight:48, sectionHeaderHeight:N,listPadding:Ae,itemNodeWidth:150,gridNavigatorId:y,renderEmptySearchState:Me})}var De=n(2590),ke=n(328314),Ue=n.n(ke);function Be(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Fe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Be(i,r,o,a,l,"next",e)}function l(e){Be(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ge(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var He=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r), 0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>k});var r=n(785893),o=n(667294),i=n(999357),a=n(202351),l=n(153686),u=n(19585),c=n(674748),s=n(563367),f=n(336177),d=n(656907),p=n(347387),h=n(460214);var y=n(496486),b=n.n(y),v=n(707961);function m(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function g(e,t,n,r){return m(e,n,r)!==m(t,n,r)&&m(e,t,n)!==m(e,t,r)}function O(e,t,n){var r={x:n.x,y:n.y},o={x:n.x+n.width,y:n.y},i={x:n.x,y:n.y+n.height},a={x:n.x+n.width,y:n.y+n.height} ;return g(e,t,r,o)||g(e,t,o,a)||g(e,t,a,i)||g(e,t,i,r)}var E=n(473708),C=n(641297),j=n.n(C);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n.5?r-n:e<.5?r:r-n/2}const T=o.memo((function(e){var t=e.wheelWidth,n=e.wheelHeight,i=e.itemWidth,a=e.itemHeight,l=e.showDeadZoneIndicator,u=e.activeItem,c=e.onItemSelect,s=e.onItemAction,f=e.interactive,d=void 0===f||f,p=e.children,h=o.useRef(null),m=o.useRef([]),g=o.useRef(!1),C=o.useRef(null),S=I(o.useState(0),2),T=S[0],Z=S[1],M=I(o.useState({x:0,y:0}),2),R=M[0],L=M[1],D=Math.abs(R.x)+Math.abs(R.y)>0,k=o.useMemo((function(){return b().chunk(p,N)}),[p]),U=o.useCallback((function(e,t){null==m.current[T]?m.current[T]=[]:m.current[T][t]=e}),[T]),B=o.useCallback((function(e,t){C.current=t;c(N*e+t) }),[c]),F=o.useCallback((function(){C.current=null;c(null)}),[c]),G=o.useCallback((function(e){F();g.current=e}),[F]),H=o.useCallback((function(e,t,n){if(g.current)L({x:0,y:0});else{var r={x:e.x-t.x,y:e.y-t.y},o=r.x<0,i=r.y<0,a=function(e,t){var n=Math.abs(t.x),r=Math.abs(t.y),o=Math.atan2(r,n)*(180/Math.PI),i=e/2-w;return{x:Math.max(i*Math.cos(2*Math.PI*o/360),0),y:Math.max(i*Math.sin(2*Math.PI*o/360),0)}}(n,r),l=o?Math.max(r.x,-a.x):Math.min(r.x,a.x),u=i?Math.max(r.y,-a.y):Math.min(r.y,a.y);L({x:l/2,y:u/2})}}),[]),V=o.useCallback((function(e){if(null!=C.current){e.preventDefault();e.stopPropagation();null==s||s(N*T+C.current)}}),[s,T]),W=o.useMemo((function(){return(0,y.throttle)((function(e){if(null!=h.current){var r=h.current.getBoundingClientRect(),o={x:r.left+r.width/2,y:r.top+r.height/2},i={x:e.clientX,y:e.clientY};H(i,o,Math.max(t,n));if(g.current)null!=u&&F();else{for(var a,l,c,s,f=(a=o,l=i,c=Math.max(t,n),s=Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)),{ x:l.x+(l.x-a.x)/s*c,y:l.y+(l.y-a.y)/s*c}),d=0;d0?1:-1,n=T+t;if(n>=0&&nC.current?B(n,C.current):F());Z(n)}}}),[d,T,k,B,F]),Y=o.useMemo((function(){return k[T].map((function(e,o){var l=P[o];if(null==l)throw new Error("Too many items supplied ".concat(p.length," expected max of ").concat(P.length));var u=A(l.x,t,i),c=A(l.y,n,a);return(0,r.jsx)("div",{ref:function(e){return U(e,o)},className:j().chatWheelItem,style:{left:u,top:c,width:i,height:a},children:e},o)}))}),[k,T,t,i,n,a,p.length,U]);return(0,r.jsx)(v.P3F,{className:j().chatWheelMouseInput,onMouseMove:W,onWheel:z,onClick:V,children:(0,r.jsxs)("div",{ref:h,className:j().chatWheel,style:{width:t,height:n},children:[(0,r.jsxs)("svg",{className:j().chatWheelBackground,viewBox:"0 0 288 288", xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsxs)("filter",{id:"soundboard-wheel-background-shadow",x:"0",y:"0",width:"288",height:"288",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,r.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,r.jsx)("feOffset",{dy:"8"}),(0,r.jsx)("feGaussianBlur",{stdDeviation:"8"}),(0,r.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"}),(0,r.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_489_60382"}),(0,r.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_489_60382",result:"shape"})]}),(0,r.jsxs)("g",{filter:"url(#soundboard-wheel-background-shadow)",children:[(0,r.jsx)("circle",{className:j().chatWheelBackground,cx:"144",cy:"144",r:"103.68",strokeWidth:"40.32"}),l&&(0,r.jsx)("circle",{className:j().chatWheelDeadZone,onMouseEnter:function(){ return G(!0)},onMouseLeave:function(){return G(!1)},cx:_,cy:_,r:w}),D&&(0,r.jsx)("circle",{className:j().chatWheelCenter,cx:_+R.x,cy:_+R.y,r:w})]}),l&&(0,r.jsx)("circle",{className:j().chatWheelDeadZone,onMouseEnter:function(){return G(!0)},onMouseLeave:function(){return G(!1)},cx:_,cy:_,r:w,stroke:"none"})]}),(0,r.jsxs)("div",{className:j().innerContent,children:[l&&(0,r.jsx)(x,{className:j().chatWheelDeadZoneIcon}),d&&k.length>1?(0,r.jsx)("div",{className:j().paginationHint,children:E.Z.Messages.CHAT_WHEEL_PAGINATION_HINT}):null]}),Y]})})}));var Z=n(16727),M=n(309413),R=n.n(M);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{v:()=>o});var r=n(744564);function o(e){r.Z.dispatch({type:"STAGE_MUSIC_MUTE",muted:e})}},519718:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(736818),o=n(82274),i=n(808194),a=n(933022),l=n(766496);function u(e){if(!e.isGuildStageVoice())return!1;if(!l.Z.isLive(e.id))return!1;var t=r.default.getId();return!!a.ZP.isModerator(t,e.id)&&(!!a.ZP.isSpeaker(t,e.id)&&(null==o.Z.getMutableParticipants(e.id).find((function(n){return n.user.id!==t&&a.ZP.isModerator(n.user.id,e.id)}))||null==o.Z.getMutableParticipants(e.id,i.pV.SPEAKER).find((function(n){return n.user.id!==t&&a.ZP.isModerator(n.user.id,e.id)}))))}},499219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(61209),i=n(715107);function a(){return(0,r.e7)([i.Z,o.Z],(function(){var e=i.Z.getVoiceChannelId() ;if(null!=e){var t=o.Z.getChannel(e);if(null==t?void 0:t.isGuildStageVoice())return t}return null}))}},129532:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ii});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(496486),s=n(751615),f=n(202351),d=n(630631),p=n(707961),h=n(744564),y=n(677681),b=n(26468),v=n(566706),m=n(91036),g=n(509097),O=n(753705),E=n(201521),C=n(15338),j=n(979197),S=n(784426),I=n(173388),_=n(299836),w=n(729139),x=n(656262),P=n(631443),N=n(821297),A=n(980617),T=n(736818),Z=n(77457),M=n(567403),R=n(682776),L=n(715107),D=n(176758),k=n(120415),U=n(463473),B=n(310126),F=n(915840),G=n(442812),H=n(808194),V=n(766496),W=n(299239),z=n(971402),Y=n(385028),K=n(357088),q=n(725691),Q=n(183640),X=n(21372),J=n(491260),$=n(189865),ee=n(447642),te=n(462791),ne=n(373438),re=n(771575),oe=n(749565),ie=n(473708);function ae(e){var t;if((0,oe.EO)(e.user))return ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_NEW_TO_DISCORD;var n=null===(t=e.member)||void 0===t?void 0:t.joinedAt ;if(null==n)return ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_NON_MEMBER;if(null!=e.member&&e.member.roles.length>0){var r,o;return null!==(o=null===(r=e.role)||void 0===r?void 0:r.name)&&void 0!==o?o:ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_MEMBER_ROLES}return(new Date).getTime()-Date.parse(n)<864e5?ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_NEW_MEMBER:ie.Z.Messages.REQUEST_TO_SPEAK_MEMBER_INFO_MEMBER}var le=n(525261),ue=n(61209),ce=n(563135),se=n(2590);function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?ie.Z.Messages.REQUEST_TO_SPEAK_LIST_TITLE.format({numHands:i.length}):ie.Z.Messages.REQUEST_TO_SPEAK_AREA_TITLE},"participants-section"):null}})]})}var Re=n(842629),Le=n(276985),De=n(716371),ke=n(730380),Ue=n(72580),Be=n(773148),Fe=n(788671),Ge=n.n(Fe),He=function(e,t){return Be.Z.getName(e.getGuildId(),e.id,t.user)};function Ve(e,t){return 0===t.length?ie.Z.Messages.CURRENTLY_IN_STAGE_EMPTY:1===t.length?ie.Z.Messages.CURRENTLY_IN_STAGE_1.format({a:He(e,t[0])}):2===t.length?ie.Z.Messages.CURRENTLY_IN_STAGE_2.format({a:He(e,t[0]),b:He(e,t[1])}):t.length>2?ie.Z.Messages.CURRENTLY_IN_STAGE_2_N.format({a:He(e,t[0]),b:He(e,t[1]),n:t.length-2}):void 0}const We=function(e){ var t=e.participants,n=e.channel,i=e.hasConnectPermission,a=(0,De.J)(n.guild_id),l=o.useCallback((function(){a?(0,Le.hk)(n.guild_id,(function(){return Re.default.selectVoiceChannel(n.id)})):Re.default.selectVoiceChannel(n.id)}),[n.id,n.guild_id,a]),u=t.filter((function(e){return e.type===H.Ui.VOICE})),c=4===u.length?2:3,s=(0,f.Wu)([v.Z],(function(){return u.map((function(e){return v.Z.getParticipant(n.id,e.id)})).filter(Ue.lm)}),[n.id,u]);return(0,r.jsxs)("div",{className:Ge().container,children:[(0,r.jsx)("div",{className:Ge().tiles,style:{maxWidth:168*c},children:s.slice(0,5).map((function(e){return(0,r.jsx)(ke.ZP,{participant:e,channel:n,className:Ge().tile,paused:!0,inCall:!0,noVideoRender:!0,inPopout:!1,width:48},e.id)}))}),(0,r.jsx)(p.X6q,{className:Ge().channelName,variant:"heading-xxl/semibold",children:n.name}),(0,r.jsx)("div",{className:Ge().participantsRow,children:(0,r.jsx)(p.xvT,{color:"header-secondary",variant:"text-sm/normal",children:Ve(n,u)})}),(0,r.jsx)(p.zxk,{ disabled:!i,className:Ge().joinButton,color:i?p.zxk.Colors.GREEN:p.zxk.Colors.PRIMARY,onClick:l,size:p.zxk.Sizes.MEDIUM,children:i?ie.Z.Messages.STAGE_CHANNEL_JOIN:ie.Z.Messages.CHANNEL_LOCKED_SHORT})]})};var ze=n(336194),Ye=n(247250),Ke=n(679724),qe=n(773011),Qe=n(833667),Xe=n(865050),Je=n(7602),$e=n(283099),et=n(684412),tt=n(607072),nt=n(636398),rt=n(575907),ot=n(372417),it=n(353945),at=n(709189),lt=n(961241),ut=n(363582),ct=n(652591),st=n(162723),ft=n(227202),dt=n(713717),pt=n(468811),ht=n.n(pt),yt=n(732068),bt=n(390817),vt=n.n(bt);function mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){ var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mt(e,t)}(e,t)||function(){ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e){var t=e.width,n=void 0===t?24:t,i=e.height,a=void 0===i?24:i,l=e.isBadged,u=void 0!==l&&l,c=Et(o.useState((function(){return ht().v4()})),1)[0];return(0,r.jsxs)("svg",{width:n,height:a,viewBox:"0 0 24 24",children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("mask",{id:c,children:[(0,r.jsx)("rect",{fill:"white",width:"100%",height:"100%"}),u&&(0,r.jsx)("circle",{cx:"20",cy:"19",r:"10",fill:"black"})]})}),(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd", d:"M20.53 7.76998C20.455 7.60998 20.31 7.48998 20.135 7.44498C20.075 7.42832 20.0106 7.41165 19.9462 7.39498L19.85 7.36998C19.305 7.22998 18.635 7.56498 18.35 8.11498L17.37 9.99998C17.085 10.55 16.725 10.51 16.57 9.90998L14.395 1.38498C14.24 0.779981 13.64 0.459981 13.05 0.664981C12.46 0.869981 12.095 1.52498 12.225 2.13498L13.495 7.95998C13.63 8.56998 13.575 9.11498 13.375 9.18498C13.175 9.25498 12.85 8.83498 12.65 8.24498L10.55 2.07498C10.35 1.48498 9.71004 1.17498 9.12004 1.37998C8.53004 1.58498 8.21504 2.22998 8.41004 2.81998L10.47 8.99998C10.665 9.58998 10.665 10.125 10.465 10.195C10.265 10.265 9.88504 9.86498 9.62504 9.29998L7.27504 4.29998C7.01004 3.73998 6.32004 3.44498 5.73004 3.64998C5.14504 3.85498 4.87504 4.47498 5.14004 5.03998L8.10004 11.045C8.36004 11.61 8.41004 12.125 8.21004 12.195C8.01004 12.265 7.53004 11.93 7.14004 11.445L5.10504 8.82498C4.71504 8.33998 4.04004 8.07498 3.59504 8.22998C3.15504 8.38498 3.04004 8.94498 3.34504 9.48998L5.84504 13.865C5.90004 14.02 7.35504 16.8 7.46004 16.915C8.50004 18.565 10.145 19.51 12.23 18.79L12.96 18.5372V15.84C12.96 14.2494 14.2494 12.96 15.84 12.96H18.3887C18.763 12.143 19.1735 11.2467 19.5492 10.4262L19.5592 10.4045L19.5647 10.3926L19.5648 10.3922L19.5702 10.3804L19.581 10.3569C19.9595 9.53048 20.3003 8.78624 20.53 8.28498C20.605 8.11498 20.605 7.92998 20.53 7.76998ZM11.81 20.51L12.96 20.0792V23.395H11.815L11.185 22.03C11.055 21.75 11.045 21.425 11.165 21.135C11.285 20.845 11.52 20.62 11.81 20.51ZM14.4 16.32C14.4 15.2596 15.2596 14.4 16.32 14.4H22.08C23.1404 14.4 24 15.2596 24 16.32V22.08C24 23.1404 23.1404 24 22.08 24H16.32C15.2596 24 14.4 23.1404 14.4 22.08V16.32ZM16.32 16.56H22.08V17.52H16.32V16.56ZM22.08 18.72H16.32V19.68H22.08V18.72ZM16.32 20.88H22.08V21.84H16.32V20.88Z", mask:"url(#".concat(c,")")})]})}function jt(e){var t=e.className,n=e.numRequestToSpeak,o=n>0,i=n>99?"99+":n;return(0,r.jsxs)("div",{className:a()(vt().raisedHandIcon,t),children:[(0,r.jsx)(Ct,{isBadged:o}),o?(0,r.jsx)(p.xvT,{className:vt().raisedHandCount,variant:"text-xs/semibold",children:i}):null]})}function St(e){var t=e.toggleRequestToSpeakSidebar,n=e.showRequestToSpeakSidebar,i=e.className,a=e.numRequestToSpeak,l=e.onClick,u=Ot(e,["toggleRequestToSpeakSidebar","showRequestToSpeakSidebar","className","numRequestToSpeak","onClick"]),c=o.useCallback((function(){null==l||l();t()}),[l,t]);return(0,r.jsx)(yt.Z,function(e){for(var t=1;tse.RcX;return i&&!n&&u&&!d&&a>=s}var Lt=n(203600),Dt=n(78465),kt=n.n(Dt) ;function Ut(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Bt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=Jt(Qt,t,n,r),a=o.useRef(e);o.useEffect((function(){var t=i(e);a.current=t}),[e,i]);return 0===t?e:a.current},Jt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=o.useRef((0,c.throttle)(e,t,r));o.useEffect((function(){i.current=(0,c.throttle)(e,t,r);return function(){var e;null===(e=i.current)||void 0===e||e.cancel()}}),[e,t,r].concat(qt(n)));return i.current};function $t(e,t){(null==t||t>e.length)&&(t=e.length) ;for(var n=0,r=new Array(t);nl})):e,u=(0,c.chunk)(r,t);a.push(u);o.push(u.length)},m=null!=i?zt.Z.getParticipant(e,i):null;(null==m?void 0:m.speaker)?v([m],1,!1):v([],1,!1);[H.pV.SPEAKER,H.pV.AUDIENCE].forEach((function(e){v(zt.Z.getMutableParticipants(r[0],e),t[e],e===H.pV.SPEAKER)}));v(u,1,!1);return[o,a]}),[r,t,i,n,e])}var nn;!function(e){e[e.SELECTED=0]="SELECTED";e[e.SPEAKER=1]="SPEAKER";e[e.AUDIENCE=2]="AUDIENCE";e[e.MEDIA=3]="MEDIA"}(nn||(nn={})) ;var rn=n(742257),on=n(217674),an=n(330944),ln=n.n(an);function un(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function cn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){un(i,r,o,a,l,"next",e)}function l(e){un(i,r,o,a,l,"throw",e)}a(void 0)}))}}function sn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fn(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Vn(e){ var t=e.aspectRatio,n=e.blocked,o=e.channel,i=e.className,a=e.focused,l=e.children,u=e.inCall,c=e.inPopout,s=e.noBorder,f=e.onClick,d=e.onContextMenu,p=e.onDoubleClick,h=e.onVideoResize,y=e.paused,b=e.pulseSpeakingIndicator,v=e.participant,m=e.width,g=Hn(e,["aspectRatio","blocked","channel","className","focused","children","inCall","inPopout","noBorder","onClick","onContextMenu","onDoubleClick","onVideoResize","paused","pulseSpeakingIndicator","participant","width"]),O=Dn.Z.getVideoComponent();return(0,r.jsx)("div",{style:{width:m},className:Bn().spaceBetweenTiles,children:(0,r.jsxs)(kn.Z,{className:Bn().tileSizer,aspectRatio:t,children:[(0,r.jsx)(ke.ZP,Gn({blocked:n,channel:o,className:i,focused:a,inCall:u,inPopout:c,noBorder:s,onClick:f,onContextMenu:d,onDoubleClick:p,onVideoResize:h,participant:v,paused:y,pulseSpeakingIndicator:b,videoComponent:O,width:m},g)),l]})})}var Wn=n(422557),zn=n(955871),Yn=n.n(zn);function Kn(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0, configurable:!0,writable:!0}):e[t]=n;return e}function qn(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}const Qn=function(){return(0,r.jsx)(p.ua7,{text:ie.Z.Messages.STAGE_MODERATOR_TOOLTIP,children:function(e){return(0,r.jsx)("div",qn(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_r,{channel:c,speakers:u}),s&&(0,r.jsx)(pr.ZP,{})]}),(0,r.jsx)(dr.Z,{width:20,height:20,className:a()(xr().downIcon,Pr({},xr().upIcon,l))})]})}));var Ar=n(248722),Tr=n.n(Ar);function Zr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n100?i(!0):t<75&&i(!1)}),[t]);return r?5e3:0}(a.id),I=Rr(function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=tn(e,t,r),i=en(o,2),a=i[0],l=i[1],u=en(Xt(o,n,[t[H.pV.AUDIENCE]]),2),c=u[0],s=u[1],f=[a[r?nn.MEDIA:nn.SELECTED],a[nn.SPEAKER],c[nn.AUDIENCE]],d=[l[r?nn.MEDIA:nn.SELECTED],l[nn.SPEAKER],s[nn.AUDIENCE]];return[f,d]}(a.id,j,S),2),_=I[0],w=I[1],x=[Math.max(null!==(n=_[Lr.SELECTED])&&void 0!==n?n:1,1),Math.max(null!==(i=_[Lr.SPEAKER])&&void 0!==i?i:1,1),_[Lr.AUDIENCE]],P=function(e,t){var n=Math.floor(e/t-8);return{speakerTileWidth:n,speakerTileHeight:Math.floor(n/ir)} }(l,C),N=P.speakerTileWidth,A=P.speakerTileHeight,T=d?l-32:Math.min(l-64,3*N+8),Z=function(e){return e===_.length-1||0===y&&1===e},M=Rr(o.useState(!1),2),R=M[0],L=M[1],D=Rr(o.useState(!1),2),k=D[0],U=D[1];return(0,r.jsx)(wn,{sections:x,renderSection:function(e){var t=e.section;return t===Lr.SPEAKER?0===h?null:(0,r.jsx)(Nr,{participantCount:h,label:ie.Z.Messages.SPEAKER_LABEL,className:Tr().header,onClick:function(){return L(!R)},collapsed:R,speakers:g,channel:a,isStreamLive:O},"speaker-header-".concat(t)):t===Lr.AUDIENCE?0===y?null:(0,r.jsx)(Nr,{participantCount:y,label:ie.Z.Messages.AUDIENCE_LABEL,className:Tr().header,onClick:function(){return U(!k)},collapsed:k,channel:a},"audience-header-".concat(t)):null},sectionHeight:function(e){return 48},renderRow:function(e){var t=e.section,n=e.row,i=w[t][n];if(null==(null==i?void 0:i.length))return null;switch(t){case Lr.SELECTED:return 0===i.length||null==i[0]?null:(0,r.jsx)("div",{className:Tr().focusedRow,children:(0,r.jsx)(ur,{channel:a, participant:i[0],width:T})},"selected-participant");case Lr.SPEAKER:return R?null:(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(fr,{tileWidth:N,channel:a,participants:i,selectedParticipant:b})},"speakers-".concat(t,"-").concat(n));case Lr.AUDIENCE:return k?null:(0,r.jsx)(On,{channel:a,participants:i,maxTiles:E},"audience-".concat(t,"-").concat(n));default:return null}},rowHeight:function(e){return null==w[e][Lr.SELECTED]?0:e===Lr.SELECTED?T/ir+8:e===Lr.SPEAKER?R?0:A:k?0:98},renderFooter:function(e){var t=e.section;return Z(t)?(0,r.jsx)("div",{className:Tr().spacer},"bottom-spacer"):null},footerHeight:function(e){return e===Lr.SPEAKER?8:e===Lr.SELECTED?12:Z(e)?88:0},className:Tr().scroller,chunkSize:60,onScroll:u})}));var Fr=n(666305),Gr=n(496388),Hr=n(668269),Vr=n(99189),Wr=n(866926),zr=n(852221),Yr=n(311569),Kr=n(194026);function qr(e){var t=e.className,n=e.channel,o=e.highlight,i=(0,b.bp)();return(0,r.jsx)(Kr.Z,{highlight:null!=o&&o,className:t,icon:(0,r.jsx)(pe.Z,{height:20,width:20}), color:ze.Z.unsafe_rawColors.GREEN_360.css,title:ie.Z.Messages.STAGE_CHANNEL_START_TITLE,description:ie.Z.Messages.STAGE_CHANNEL_START_SUBTITLE,onClick:function(){(0,Nt.T)(n,i)}})}var Qr=n(199047),Xr=n(708258),Jr=n(259099),$r=n(79987),eo=n(270662),to=n(289261),no=n(65200),ro=n(759864),oo=n(473903),io=n(164760),ao=n(419348),lo=n(127661),uo=n(633878);function co(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function so(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function fo(e,t){if(null==e)return{};var n,r,o=function(e,t){ if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function po(e){var t=e.width,n=void 0===t?22:t,o=e.height,i=void 0===o?20:o,a=e.color,l=void 0===a?"currentColor":a,u=fo(e,["width","height","color"]);return(0,r.jsxs)("svg",so(function(e){for(var t=1;te.length)&&(t=e.length) ;for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,_=g&&!S||null!=j&&j.user.id!==(null==O?void 0:O.id),w=(0,vo.pp)(t.id);if(null==O)return null;var x=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(rt.Z,{children:(0,r.jsx)(Gr.Z,{onClose:t})})},position:"top",align:"center",animation:p.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(ro.C,{centerButton:!0,hasPermission:y,enabled:h, cameraUnavailable:d,onChange:eo.r,onCameraUnavailable:to.Z,channelLimitReached:g,channelLimit:m,popoutOpen:o,onPopoutClick:n})}}),(0,r.jsx)(eo.NZ,{channel:t,currentUser:O,exitFullScreen:function(){return null},canGoLive:E,hasPermission:y,disabled:_})]});return(0,r.jsxs)("div",{className:_o().container,children:[w&&(0,r.jsx)(Lo,{channelId:t.id}),C&&(0,r.jsx)(Ao,{channel:t}),C&&!o?(0,r.jsxs)("div",{className:a()(_o().avControls,_o().buttonSpacing),children:[I&&m>0&&x,(0,r.jsx)(p.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(rt.Z,{children:(0,r.jsx)(Fr.default,{onClose:t,renderInputDevices:!0,renderOutputDevices:!0})})},align:"center",position:"top",animation:p.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,a=t.isShown;return(0,r.jsx)(no.Z,{centerButton:!0,onPopoutClick:n,selfMute:i,serverMute:l,suppress:o,popoutOpen:a,onClick:function(){return(0,Hr.Z)(l,o)},awaitingRemote:c})}})]}):null,C&&u&&o&&(0,r.jsx)(Zo,{onClick:function(){return(0,re.RK)(t,!1)} }),C&&!o&&(0,r.jsx)(Ro,{onClick:function(){return(0,re.yi)(t)}}),(0,r.jsx)(Mo,{channel:t})]})}));function ko(e){var t=e.channel;return(0,r.jsx)(Vr.Z,{children:function(e){return(0,r.jsxs)("div",{className:a()(e,_o().container),children:[(0,r.jsx)(Lo,{channelId:t.id}),(0,r.jsx)(Mo,{channel:t})]})}})}const Uo=o.memo((function(e){var t=e.channel,n=e.isOnStartStageScreen,o=Oo(t.id),i=(0,st.B)(t.id),l=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,t)}),[t]),u=t.guild_id,c=(0,Eo.Z)(t.id),s=(0,f.e7)([v.Z],(function(){return null!=t?v.Z.getSelectedParticipant(t.id):null})),d=!c&&null==s;return n?(0,r.jsx)(ko,{channel:t}):o||i?(0,r.jsx)(Vr.Z,{children:function(e){return(0,r.jsxs)("div",{className:a()(e,_o().containerColumn),children:[(0,r.jsxs)("div",{className:_o().eventPrompts,children:[d?(0,r.jsx)(Yr.Z,{guildId:u,channelId:null==t?void 0:t.id}):null,(0,r.jsx)("div",{className:_o().separator}),d&&l?(0,r.jsx)(qr,{highlight:!0,channel:t}):null,(0,r.jsx)("div",{className:_o().separator})]}),(0, r.jsx)(Do,{channel:t})]})}}):(0,r.jsx)(To,{channel:t})}));var Bo=n(570202),Fo=n(360703);function Go(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function Ho(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Go(i,r,o,a,l,"next",e)}function l(e){Go(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Vo(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function Wo(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e} var zo=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:3,n=Qo((0,f.e7)([zt.Z],(function(){var n=zt.Z.getMutableParticipants(e).filter((function(e){return e.type===H.Ui.VOICE})),r=[],o=!0,i=!1,a=void 0;try{for(var l,u=function(){var e=l.value;if(r.length>=t)return"break";if(null!=r.find((function(t){return t.id===e.user.id})))return"continue";r.push(e.user)},c=n[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){if("break"===u())break}}catch(e){i=!0;a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return[{participants:n,usersInSummary:r},zt.Z.getParticipantsVersion(e)]}),[e,t],Yt.QF),1),r=n[0];return r}var Jo=n(425777),$o=n.n(Jo);function ei(e){var t=e.onClick;return(0,r.jsx)(Kr.Z,{iconContainerClassName:$o().continueIconContainer,icon:(0,r.jsx)(pe.Z,{className:$o().continueIcon,height:20,width:20}),color:ze.Z.unsafe_rawColors.PRIMARY_700.css,title:ie.Z.Messages.STAGE_CONTINUE_PROMPT_TITLE,description:ie.Z.Messages.STAGE_CONTINUE_PROMPT_SUBTITLE, onClick:t})}function ti(e){if(0===e.length)return"";if(1===e.length)return ie.Z.Messages.STAGE_AUDIENCE_WAITING_ONE.format({first:e[0].userNick});if(2===e.length)return ie.Z.Messages.STAGE_AUDIENCE_WAITING_TWO.format({first:e[0].userNick,second:e[1].userNick});var t=e.length-2;return ie.Z.Messages.STAGE_AUDIENCE_WAITING_MANY.format({first:e[0].userNick,second:e[1].userNick,numOthers:t})}function ni(e){var t=e.channel,n=Xo(t.id),o=n.participants,i=n.usersInSummary;return(0,r.jsxs)("div",{className:$o().audienceSummary,children:[(0,r.jsx)(Ko.Z,{className:$o().summaryItem,guildId:t.guild_id,users:i,size:Ko.u.SIZE_16}),(0,r.jsx)(p.xvT,{variant:"text-sm/normal",color:"header-secondary",children:ti(o)})]})}function ri(e){var t=e.channel,n=e.onContinueClick,o=(0,f.e7)([R.Z],(function(){return R.Z.can(ft.yP,t)}),[t]),i=t.guild_id,a=(0,zr.o)(i,t),l=(0,Eo.Z)(t.id),u=Xo(t.id).usersInSummary;return(0,r.jsxs)("div",{children:[(0,r.jsx)(he.Z,{children:(0,r.jsx)("div",{className:$o().iconBackground, children:(0,r.jsx)(pe.Z,{width:40,height:40,className:$o().icon})})}),(0,r.jsxs)("div",{className:$o().headerContainer,children:[(0,r.jsx)(p.X6q,{className:$o().title,variant:"heading-xl/semibold",children:ie.Z.Messages.STAGE_START_PROMPT_TITLE_MODERATOR}),(0,r.jsx)(p.xvT,{className:$o().subtitle,variant:"text-sm/normal",children:ie.Z.Messages.STAGE_START_PROMPT_SUBTITLE})]}),l?null:(0,r.jsx)(Yr.Z,{guildId:i,channelId:t.id}),o?(0,r.jsx)(qr,{className:$o().eventPrompt,channel:t}):null,a?(0,r.jsx)(Yo,{className:$o().eventPrompt,guildId:i}):null,(o||u.length>0)&&(0,r.jsx)("hr",{className:$o().separator}),o?(0,r.jsx)(ei,{onClick:n}):null,(0,r.jsx)(ni,{channel:t})]})}var oi=n(396043),ii=n(987152),ai=n(930948),li=n(202181),ui=n(830987),ci=n.n(ui);function si(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function fi(e){ var t=e.channel,n=e.appContext,i=e.popoutOpen,a=e.popoutWindow,l=e.currentWindow,u=n===se.IlC.POPOUT,c=o.useRef(null),s=(0,f.cj)([v.Z],(function(){var e=v.Z.getMode(t.id),r=n===se.IlC.POPOUT;r&&(e=se.WtW.VIDEO);var o=e===se.WtW.VIDEO?v.Z.getLayout(t.id,n):se.AEg.MINIMUM;r&&o!==se.AEg.FULL_SCREEN&&(o=se.AEg.NO_CHAT);return{currentLayout:o,mode:e}}),[t,n]),d=s.currentLayout,p=s.mode,y=(0,f.e7)([L.Z],(function(){return L.Z.getVoiceChannelId()===t.id}),[t.id]);o.useEffect((function(){c.current=p}));var b=o.useRef(d),m=o.useMemo((function(){var e=null!=a&&u?a.document:document,t=l.document.getElementById("app-mount");return{currentWindow:l,currentDocument:e,rootNode:t}}),[a,u,l]),g=m.currentDocument,O=m.rootNode,E=i&&!u,j=p===se.WtW.VIDEO&&y&&!E,S=o.useCallback((function(e,r){if(r!==e){Ye.Z.updateLayout(t.id,r,n);r===se.AEg.FULL_SCREEN&&t.isPrivate()&&ai.S.dispatch(se.CkL.TEXTAREA_BLUR)}}),[n,t]),I=o.useCallback((function(e){if(null!=O&&e===se.AEg.FULL_SCREEN){S(e,b.current);(0, li.Pr)((function(e){b.current=e}),g)}}),[g,S,O]),_=o.useCallback((function(e){return function(){if(null!=O)if(e!==se.AEg.FULL_SCREEN){b.current=e;S(e,se.AEg.FULL_SCREEN);(0,li.Dj)(O)}else I(e)}}),[S,I,O]);o.useEffect((function(){var e=function(){null!=O&&((0,li.rB)(O,g)||d!==se.AEg.FULL_SCREEN||_(d)())};g.addEventListener(li.NO,e);return function(){g.removeEventListener(li.NO,e)}}),[g,d,_,O]);o.useEffect((function(){ct.default.track(se.rMx.VIDEO_LAYOUT_TOGGLED,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>l});var r=n(785893),o=(n(667294),n(349491)),i=n(289450),a=n.n(i);const l=function(e){var t=e.size;return(0,r.jsx)("div",{className:a().unownedStickerLockContainer,style:{width:t,height:t},children:(0,r.jsx)(o.Z,{width:12,height:12,className:a().unownedStickerLockIcon})})}},965196:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(712861),c=n(707961),s=n(971402),f=n(579581),d=n(933850),p=n(652591),h=n(748755),y=n(514351),b=n(513586),v=n(600277),m=n(461908),g=n(2590),O=n(473708),E=n(859167),C=n.n(E);function j(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){j(i,r,o,a,l,"next",e)}function l(e){j(i,r,o,a,l,"throw",e)}a(void 0)}))}}function I(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function _(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var P=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>o,Q:()=>i});var r=(0,n(260561).B)({kind:"user",id:"2022-07_system_dm_safety_onboarding",label:"System DM Safety Onboarding",defaultConfig:{systemDMRedesignEnabled:!1},treatments:[{id:1,label:"Enabled, v1 copy",config:{systemDMRedesignEnabled:!0}},{id:2,label:"Enabled, v2 copy",config:{systemDMRedesignEnabled:!0}}]});const o=r;function i(){return r.getCurrentConfig({}).systemDMRedesignEnabled}}, 29975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>T});var r=n(496486),o=n.n(r),i=n(842227),a=n(202351),l=n(744564),u=n(61209),c=n(21372),s=n(512291),f=n(491260),d=n(436154),p=n(473903),h=n(72580),y=n(563135),b=n(749565),v=n(2590);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n50?this.rebuild():e.forEach((function(e){return n.updateUserId(e)}));return!0};t.updateUserId=function(e){if(!this.allUserIds.has(e))return!1;var t=j(this.findOldState(e),3),n=t[0],r=t[1],o=t[2],i=j(this.calculateNewState(e,u.Z.getChannel(this.parentId)),3),a=i[0],l=i[1],c=i[2];if(n===a&&r===l&&o===c)return!1;this.removeUserId(e,n);this.addUser(e,a,l,c);return!0};t.addUserId=function(e){var t=j(this.calculateNewState(e,u.Z.getChannel(this.parentId)),3),n=t[0],r=t[1],o=t[2];this.addUser(e,n,r,o)};t.removeUserId=function(e,t){this.allUserIds.delete(e);if(null!=t&&this.removeUserIdFromSection(e,t))return!0;for(var n in this.sections)if(this.removeUserIdFromSection(e,n))return!0;return!1};t.addUser=function(e,t,n,r,o){this.allUserIds.add(e);var i=p.default.getUser(e);if(null!=i&&""!==i.username){ t in this.sections||(this.sections[t]={sectionId:t,usersById:{},userIds:[]});var a=this.sections[t];a.usersById[e]={userId:e,displayName:n,canViewChannel:r};if(o)a.userIds.push(e);else{var l=this.findUserIdSortedPosition(a,e,n);a.userIds.splice(l,0,e)}this.version++}};t.findUserIdSortedPosition=function(e,t,n){for(var r=e.userIds,o=e.usersById,i=0;i{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(707961),a=n(312682),l=n(105538),u=n(373438),c=n(930948),s=n(665783),f=n(551856),d=n(379364),p=n(2590),h=n(473708),y=n(385919),b=n.n(y);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>R}) ;var r=n(785893),o=n(667294),i=n(707961),a=n(281873),l=n(576668),u=n(874710),c=n(103314),s=n(313031),f=n(954814),d=n(839463),p=n(218318),h=n(40111),y=n(579583),b=n(112897),v=n(201521),m=n(451458),g=n(189865),O=n(824456),E=n(186440),C=n(373438),j=n(930948),S=n(426012),I=n(367406),_=n(2590),w=n(473708);function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>M});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(202351),u=n(744564),c=n(971402),s=n(764079),f=n(341305),d=n(396043),p=n(773011),h=n(281808),y=n(684412),b=n(451458),v=n(61209),m=n(284610),g=n(567403),O=n(407561),E=n(373438),C=n(54282),j=n(379364),S=n(2590),I=n(473708),_=n(75627),w=n.n(_);function x(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){x(i,r,o,a,l,"next",e)}function l(e){x(i,r,o,a,l,"throw",e)}a(void 0)}))}}function N(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function A(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>b,r:()=>v});var r=n(667294),o=n(503528),i=n(105783),a=n(268319),l=n(460471),u=n(503871),c=n(30027),s=n(284610),f=n(567403),d=n(275374),p=n(161283),h=n(2590),y=n(473708);function b(e){var t=e.parentChannel,n=e.parentMessageId,o=e.threadSettings,i=e.privateThreadMode,l=e.location,u=e.onThreadCreated,f=e.useDefaultThreadName,d=r.useCallback((function(e,t,n,r){a.Z.uploadFiles({channelId:e.id,uploads:t,draftType:s.d.FirstThreadMessage,options:{stickerIds:r},parsedMessage:c.ZP.parse(e,n)})}),[]);return(0,p.JA)({parentChannel:t,parentMessageId:n,threadSettings:o,privateThreadMode:i,location:l,onThreadCreated:u, useDefaultThreadName:f,uploadHandler:d})}function v(e){var t=e.parentChannel,n=(0,u.xH)((function(e){return{name:e.name,appliedTags:e.appliedTags}}),o.Z),r=n.name,a=n.appliedTags;return(0,p.Wj)({parentChannel:t,name:r,appliedTags:a,upload:function(e,n,r){return new Promise((function(o,a){var u=new l.Z(e);u.on("error",(function(e,n,r){if(n===h.evJ.EXPLICIT_CONTENT){var o,l=f.Z.getGuild(null!==(o=t.getGuildId())&&void 0!==o?o:"");null!=l&&i.Z.show({title:y.Z.Messages.UPLOAD_AREA_UPLOAD_FAILED_TITLE,body:y.Z.Messages.BOT_GUILD_EXPLICIT_CONTENT.format({name:l.toString()})})}else if(n===h.evJ.ENTITY_TOO_LARGE){var u=(0,d.dg)(t.getGuildId());i.Z.show({title:y.Z.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,body:y.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:(0,d.Ng)(u)})})}else n===h.evJ.TOO_MANY_ATTACHMENTS&&i.Z.show({title:y.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_TITLE,body:y.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_MESSAGE.format({limit:h.dN1})});a({body:r})}));u.on("complete",(function(e,t){ o({body:t})}));u.uploadFiles(r,n,"message.attachments")}))}})}},736543:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(973935),a=n(809784),l=n(202351),u=n(217458),c=n(901654),s=n(454871),f=n(361925);function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function h(e){h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return h(e)}function y(e){for(var t=1;t{"use strict";n.d(t,{V:()=>ue,Z:()=>ce});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(973935),s=n(809784),f=n(202351),d=n(707961),p=n(217458),h=n(50433),y=n(901654),b=n(37689),v=n(414273),m=n.n(v),g=n(949191),O=n.n(g),E=n(305257),C=n.n(E);function j(){return(0,r.jsx)("div",{className:m().container,children:(0,r.jsxs)("svg",{width:"224",height:"148",viewBox:"0 0 224 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M0.5 33.5H223.5V140C223.5 144.142 220.142 147.5 216 147.5H8C3.85786 147.5 0.5 144.142 0.5 140V33.5Z",fill:"#F2F3F4",stroke:"#E3E5E8"}),(0,r.jsx)("circle",{cx:"28",cy:"120",r:"16", fill:"url(#tutorial-media-channels-image1)"}),(0,r.jsx)("path",{ d:"M62.104 116L61.468 107.72H59.488L57.4 113.96L55.3 107.72H53.284L52.648 116H54.076L54.496 109.892L56.584 116.024H58L60.076 109.892L60.52 116H62.104ZM65.7704 111.08C66.4664 111.08 66.8264 111.584 66.9224 112.484H64.6064C64.7144 111.548 65.1944 111.08 65.7704 111.08ZM68.3144 115.412L68.1464 114.284C67.5104 114.728 66.8984 115.004 66.1544 115.004C65.2664 115.004 64.6544 114.512 64.5944 113.384H68.3144C68.3144 113.3 68.3264 113.156 68.3264 113.036C68.3264 111.392 67.5464 110.084 65.8064 110.084C64.2944 110.084 63.1664 111.224 63.1664 113.108C63.1664 115.196 64.3784 116.12 65.9984 116.12C66.9344 116.12 67.6904 115.844 68.3144 115.412ZM72.6338 112.088C72.6338 112.724 72.2498 113.192 71.6138 113.192C70.9898 113.192 70.6058 112.736 70.6058 112.136C70.6058 111.5 70.9778 111.008 71.6138 111.008C72.2258 111.008 72.6338 111.476 72.6338 112.088ZM74.6858 116.24C74.6858 115.352 73.9418 114.98 72.7538 114.812L72.0098 114.74C71.1098 114.608 70.9298 114.56 70.9298 114.368C70.9298 114.272 71.0258 114.164 71.1698 114.056C71.3138 114.08 71.4698 114.092 71.6378 114.092C72.8858 114.092 73.9538 113.348 73.9538 112.1C73.9538 111.836 73.9058 111.572 73.7978 111.344L74.8538 111.272L74.6618 110.12L73.2458 110.624C72.8258 110.276 72.2738 110.084 71.6018 110.084C70.3058 110.084 69.2738 110.864 69.2738 112.136C69.2738 112.904 69.6818 113.504 70.3658 113.828C69.8858 114.116 69.6338 114.428 69.6338 114.752C69.6338 114.98 69.7418 115.196 69.9698 115.376C69.2498 115.784 68.8778 116.204 68.8778 116.744C68.8778 117.704 70.0658 118.184 71.6378 118.184C73.3178 118.184 74.6858 117.488 74.6858 116.24ZM71.7338 117.332C70.6418 117.332 70.1258 117.02 70.1258 116.588C70.1258 116.288 70.3178 116.012 70.7378 115.712C71.0258 115.772 71.2058 115.808 71.6018 115.856L72.3818 115.952C73.1018 116.06 73.3538 116.24 73.3538 116.552C73.3538 116.984 72.7658 117.332 71.7338 117.332ZM78.8219 114.404C78.4259 114.788 77.9579 115.028 77.4659 115.028C77.0219 115.028 76.7579 114.776 76.7579 114.356C76.7579 113.804 77.1539 113.312 78.8219 113.108V114.404ZM80.2619 116V112.028C80.2619 110.636 79.5179 110.084 78.0179 110.084C77.0939 110.084 76.3859 110.288 75.7139 110.552L75.8939 111.704C76.5179 111.428 77.1539 111.236 77.8259 111.236C78.4619 111.236 78.8219 111.476 78.8219 112.1V112.268C76.4819 112.496 75.3299 113.108 75.3299 114.512C75.3299 115.52 75.9899 116.12 76.9739 116.12C77.8379 116.12 78.4379 115.736 78.9059 115.244L79.0259 116H80.2619ZM86.633 116V111.824C86.633 110.744 86.057 110.084 84.977 110.084C84.197 110.084 83.585 110.504 83.045 111.02L82.913 110.204H81.689V116H83.129V112.088C83.549 111.644 84.005 111.356 84.449 111.356C84.977 111.356 85.193 111.704 85.193 112.208V116H86.633Z", fill:"#060607"}),(0,r.jsx)("path",{ d:"M62.02 132L61.372 123.72H59.992L57.412 130.512L54.832 123.72H53.44L52.78 132H53.836L54.34 125.316L56.932 132.036H57.832L60.424 125.316L60.94 132H62.02ZM65.8287 126.996C66.6567 126.996 67.0647 127.524 67.1967 128.448H64.4367C64.6047 127.476 65.1687 126.996 65.8287 126.996ZM68.2647 131.352L68.1087 130.392C67.4847 130.884 66.8847 131.208 66.0567 131.208C65.0607 131.208 64.4367 130.584 64.3887 129.252H68.2767V129.024C68.2767 127.44 67.5087 126.156 65.8407 126.156C64.4007 126.156 63.3207 127.284 63.3207 129.12C63.3207 131.22 64.4847 132.12 65.9727 132.12C66.9207 132.12 67.6527 131.832 68.2647 131.352ZM71.073 123.72H69.789L70.077 129.54L70.773 129.384L71.073 123.72ZM71.025 132V130.572H69.825V132H71.025ZM84.7192 132L84.0712 123.72H82.6912L80.1112 130.512L77.5312 123.72H76.1392L75.4792 132H76.5352L77.0392 125.316L79.6312 132.036H80.5312L83.1232 125.316L83.6392 132H84.7192ZM89.6079 130.428C89.1279 130.92 88.5279 131.232 87.9039 131.232C87.3639 131.232 87.0519 130.932 87.0519 130.464C87.0519 129.876 87.4959 129.3 89.6079 129.096V130.428ZM90.6759 132V127.992C90.6759 126.72 90.0039 126.156 88.6119 126.156C87.7239 126.156 87.0759 126.36 86.3919 126.636L86.5359 127.56C87.1599 127.284 87.8199 127.068 88.5159 127.068C89.1759 127.068 89.6079 127.32 89.6079 128.04V128.28C87.2199 128.532 85.9959 129.096 85.9959 130.524C85.9959 131.496 86.6439 132.12 87.6759 132.12C88.6119 132.12 89.2359 131.7 89.6919 131.232L89.8119 132H90.6759ZM92.6347 134.184C93.4747 134.184 94.0987 133.872 94.5667 132.6L96.9067 126.276H95.7907L94.2907 130.728L92.7547 126.192L91.6747 126.36L93.7627 132.024L93.6187 132.408C93.3907 133.02 93.0667 133.248 92.5867 133.248C92.4187 133.248 92.2027 133.212 92.0227 133.164L92.1787 134.136C92.2867 134.16 92.4067 134.184 92.6347 134.184ZM103.068 128.976C103.068 127.068 102.048 126.156 100.812 126.156C100.032 126.156 99.4795 126.552 99.0955 126.948V123.336L98.0275 123.504V131.712C98.7835 131.94 99.3955 132.072 100.26 132.072C101.916 132.072 103.068 131.064 103.068 128.976ZM101.988 129.024C101.988 130.5 101.364 131.16 100.248 131.16C99.7195 131.16 99.4555 131.1 99.0955 130.968V128.04C99.5275 127.5 100.056 127.104 100.656 127.104C101.424 127.104 101.988 127.776 101.988 129.024ZM106.61 126.996C107.438 126.996 107.846 127.524 107.978 128.448H105.218C105.386 127.476 105.95 126.996 106.61 126.996ZM109.046 131.352L108.89 130.392C108.266 130.884 107.666 131.208 106.838 131.208C105.842 131.208 105.218 130.584 105.17 129.252H109.058V129.024C109.058 127.44 108.29 126.156 106.622 126.156C105.182 126.156 104.102 127.284 104.102 129.12C104.102 131.22 105.266 132.12 106.754 132.12C107.702 132.12 108.434 131.832 109.046 131.352ZM117.779 129.768C117.779 128.52 117.227 127.968 115.619 127.236C114.359 126.66 114.047 126.36 114.047 125.724C114.047 125.112 114.467 124.608 115.415 124.608C116.075 124.608 116.699 124.872 117.155 125.22L117.335 124.092C116.855 123.816 116.255 123.624 115.451 123.624C113.951 123.624 112.931 124.476 112.931 125.808C112.931 126.996 113.519 127.512 115.079 128.22C116.327 128.784 116.663 129.096 116.663 129.852C116.663 130.656 116.051 131.112 115.187 131.112C114.359 131.112 113.579 130.776 113.015 130.404L112.847 131.556C113.459 131.88 114.263 132.096 115.163 132.096C116.711 132.096 117.779 131.196 117.779 129.768ZM122.456 130.428C121.976 130.92 121.376 131.232 120.752 131.232C120.212 131.232 119.9 130.932 119.9 130.464C119.9 129.876 120.344 129.3 122.456 129.096V130.428ZM123.524 132V127.992C123.524 126.72 122.852 126.156 121.46 126.156C120.572 126.156 119.924 126.36 119.24 126.636L119.384 127.56C120.008 127.284 120.668 127.068 121.364 127.068C122.024 127.068 122.456 127.32 122.456 128.04V128.28C120.068 128.532 118.844 129.096 118.844 130.524C118.844 131.496 119.492 132.12 120.524 132.12C121.46 132.12 122.084 131.7 122.54 131.232L122.66 132H123.524ZM127.928 132.024L127.784 131.112C127.652 131.136 127.484 131.148 127.292 131.148C126.692 131.148 126.5 130.86 126.5 130.392V127.176H127.88L127.736 126.276H126.5V124.212L125.456 124.368V126.276H124.592V127.176H125.456V130.584C125.456 131.736 126.116 132.096 127.124 132.096C127.496 132.096 127.748 132.06 127.928 132.024ZM129.199 126.276V130.44C129.199 131.472 129.763 132.12 130.855 132.12C131.659 132.12 132.343 131.676 132.883 131.172L133.015 132H133.867V126.276H132.799V130.236C132.283 130.788 131.707 131.16 131.143 131.16C130.519 131.16 130.267 130.764 130.267 130.176V126.276H129.199ZM138.755 127.176L138.587 126.156C137.651 126.204 136.991 126.792 136.583 127.44L136.403 126.276H135.551V132H136.619V128.616C137.003 127.86 137.807 127.224 138.755 127.176ZM140.397 129.252C140.397 127.836 141.045 127.104 141.945 127.104C142.557 127.104 142.905 127.2 143.349 127.428V130.164C142.893 130.776 142.389 131.172 141.729 131.172C140.961 131.172 140.397 130.512 140.397 129.252ZM139.317 129.3C139.317 131.22 140.337 132.12 141.573 132.12C142.413 132.12 143.001 131.688 143.433 131.172L143.565 132H144.417V123.336L143.349 123.504V126.456C142.989 126.312 142.473 126.204 141.909 126.204C140.517 126.204 139.317 127.212 139.317 129.3ZM149.362 130.428C148.882 130.92 148.282 131.232 147.658 131.232C147.118 131.232 146.806 130.932 146.806 130.464C146.806 129.876 147.25 129.3 149.362 129.096V130.428ZM150.43 132V127.992C150.43 126.72 149.758 126.156 148.366 126.156C147.478 126.156 146.83 126.36 146.146 126.636L146.29 127.56C146.914 127.284 147.574 127.068 148.27 127.068C148.93 127.068 149.362 127.32 149.362 128.04V128.28C146.974 128.532 145.75 129.096 145.75 130.524C145.75 131.496 146.398 132.12 147.43 132.12C148.366 132.12 148.99 131.7 149.446 131.232L149.566 132H150.43ZM152.389 134.184C153.229 134.184 153.853 133.872 154.321 132.6L156.661 126.276H155.545L154.045 130.728L152.509 126.192L151.429 126.36L153.517 132.024L153.373 132.408C153.145 133.02 152.821 133.248 152.341 133.248C152.173 133.248 151.957 133.212 151.777 133.164L151.933 134.136C152.041 134.16 152.161 134.184 152.389 134.184ZM159.19 129.54L159.886 129.384L159.994 128.196C161.422 127.548 162.286 126.984 162.286 125.688C162.286 124.38 161.29 123.564 159.826 123.564C158.842 123.564 157.99 123.912 157.258 124.452L157.414 125.556C158.086 125.004 158.83 124.584 159.766 124.584C160.57 124.584 161.158 125.004 161.158 125.736C161.158 126.504 160.654 126.888 159.526 127.356L159.034 127.56L159.19 129.54ZM158.938 132H160.138V130.572H158.938V132Z", fill:"#2E3338"}),(0,r.jsx)("path",{d:"M0.5 8C0.5 3.85786 3.85786 0.5 8 0.5H216C220.142 0.5 223.5 3.85786 223.5 8V33.5H0.5V8Z",fill:"#F2F3F4",stroke:"#E3E5E8"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd", d:"M12.5641 23.75C12.253 23.75 12.0174 23.4689 12.0718 23.1626L12.5 20.75H10.0951C9.78449 20.75 9.54905 20.4698 9.60259 20.1638L9.69009 19.6638C9.73196 19.4246 9.93972 19.25 10.1826 19.25H12.7625L13.5575 14.75H11.1526C10.842 14.75 10.6065 14.4698 10.6601 14.1638L10.7476 13.6638C10.7895 13.4246 10.9972 13.25 11.2401 13.25H13.82L14.2793 10.6626C14.3216 10.4239 14.5291 10.25 14.7716 10.25H15.2559C15.567 10.25 15.8026 10.5311 15.7482 10.8374L15.32 13.25H19.82L20.2793 10.6626C20.3216 10.4239 20.5291 10.25 20.7716 10.25H21.2559C21.567 10.25 21.8026 10.5311 21.7482 10.8374L21.32 13.25H23.7249C24.0355 13.25 24.271 13.5302 24.2174 13.8362L24.1299 14.3362C24.0881 14.5754 23.8803 14.75 23.6374 14.75H21.0575L20.2625 19.25H22.6674C22.978 19.25 23.2135 19.5302 23.1599 19.8362L23.0724 20.3362C23.0306 20.5754 22.8228 20.75 22.5799 20.75H20L19.5407 23.3374C19.4984 23.5761 19.2909 23.75 19.0484 23.75H18.5641C18.253 23.75 18.0174 23.4689 18.0718 23.1626L18.5 20.75H14L13.5407 23.3374C13.4984 23.5761 13.2909 23.75 13.0484 23.75H12.5641ZM15.0578 14.75L14.2628 19.25H18.7628L19.5578 14.75H15.0578Z", fill:"#4F5660"}),(0,r.jsx)("path",{ d:"M41.014 22V17.128C41.014 15.868 40.384 15.098 39.11 15.098C38.2 15.098 37.458 15.588 36.856 16.19C36.604 15.532 36.086 15.098 35.12 15.098C34.21 15.098 33.524 15.588 32.894 16.19L32.74 15.238H31.312V22H32.992V17.422C33.482 16.918 33.972 16.582 34.49 16.582C35.106 16.582 35.33 16.988 35.33 17.576V22H37.01V17.422C37.5 16.918 37.99 16.582 38.508 16.582C39.124 16.582 39.334 16.988 39.334 17.576V22H41.014ZM46.3967 20.138C45.9347 20.586 45.3887 20.866 44.8147 20.866C44.2967 20.866 43.9887 20.572 43.9887 20.082C43.9887 19.438 44.4507 18.864 46.3967 18.626V20.138ZM48.0767 22V17.366C48.0767 15.742 47.2087 15.098 45.4587 15.098C44.3807 15.098 43.5547 15.336 42.7707 15.644L42.9807 16.988C43.7087 16.666 44.4507 16.442 45.2347 16.442C45.9767 16.442 46.3967 16.722 46.3967 17.45V17.646C43.6667 17.912 42.3227 18.626 42.3227 20.264C42.3227 21.44 43.0927 22.14 44.2407 22.14C45.2487 22.14 45.9487 21.692 46.4947 21.118L46.6347 22H48.0767ZM53.8857 22.098L55.6777 21.832L53.0317 18.29L55.5237 15.238H53.6197L51.4217 18.038V11.892L49.7417 12.158V22H51.4217V18.64L53.8857 22.098ZM59.1699 16.26C59.9819 16.26 60.4019 16.848 60.5139 17.898H57.8119C57.9379 16.806 58.4979 16.26 59.1699 16.26ZM62.1379 21.314L61.9419 19.998C61.1999 20.516 60.4859 20.838 59.6179 20.838C58.5819 20.838 57.8679 20.264 57.7979 18.948H62.1379C62.1379 18.85 62.1519 18.682 62.1519 18.542C62.1519 16.624 61.2419 15.098 59.2119 15.098C57.4479 15.098 56.1319 16.428 56.1319 18.626C56.1319 21.062 57.5459 22.14 59.4359 22.14C60.5279 22.14 61.4099 21.818 62.1379 21.314ZM66.9533 18.78V17.156H63.3133V18.78H66.9533ZM72.9665 18.528C72.9665 20.012 72.3085 20.726 71.4405 20.726C70.8665 20.726 70.5445 20.628 70.1385 20.432V17.534C70.5865 16.96 71.0625 16.582 71.6645 16.582C72.4205 16.582 72.9665 17.226 72.9665 18.528ZM74.6605 18.43C74.6605 16.162 73.5265 15.098 72.1125 15.098C71.1745 15.098 70.5165 15.616 70.0405 16.162L69.8865 15.238H68.4585V24.604L70.1385 24.352V21.804C70.5445 21.958 71.0625 22.07 71.7065 22.07C73.2605 22.07 74.6605 20.95 74.6605 18.43ZM77.7827 22V11.892L76.1027 12.158V22H77.7827ZM83.2561 20.138C82.7941 20.586 82.2481 20.866 81.6741 20.866C81.1561 20.866 80.8481 20.572 80.8481 20.082C80.8481 19.438 81.3101 18.864 83.2561 18.626V20.138ZM84.9361 22V17.366C84.9361 15.742 84.0681 15.098 82.3181 15.098C81.2401 15.098 80.4141 15.336 79.6301 15.644L79.8401 16.988C80.5681 16.666 81.3101 16.442 82.0941 16.442C82.8361 16.442 83.2561 16.722 83.2561 17.45V17.646C80.5261 17.912 79.1821 18.626 79.1821 20.264C79.1821 21.44 79.9521 22.14 81.1001 22.14C82.1081 22.14 82.8081 21.692 83.3541 21.118L83.4941 22H84.9361ZM92.3691 22V17.128C92.3691 15.868 91.6971 15.098 90.4371 15.098C89.5271 15.098 88.8131 15.588 88.1831 16.19L88.0291 15.238H86.6011V22H88.2811V17.436C88.7711 16.918 89.3031 16.582 89.8211 16.582C90.4371 16.582 90.6891 16.988 90.6891 17.576V22H92.3691ZM99.0642 20.012C99.0642 18.738 98.3782 18.262 96.6282 17.814C95.6202 17.548 95.3682 17.338 95.3682 16.974C95.3682 16.61 95.6762 16.358 96.3062 16.358C96.9782 16.358 97.7762 16.596 98.4482 16.974L98.6722 15.574C98.0002 15.28 97.1882 15.098 96.3062 15.098C94.7382 15.098 93.8142 15.924 93.8142 17.1C93.8142 18.332 94.5002 18.808 96.1382 19.228C97.2162 19.494 97.5102 19.69 97.5102 20.166C97.5102 20.614 97.1182 20.88 96.3902 20.88C95.5502 20.88 94.6542 20.558 93.9262 20.082L93.7022 21.482C94.3462 21.832 95.3542 22.14 96.3342 22.14C98.1122 22.14 99.0642 21.342 99.0642 20.012Z", fill:"#060607"}),(0,r.jsx)("circle",{cx:"28",cy:"62",r:"16",fill:"url(#tutorial-media-channels-image2)"}),(0,r.jsx)("path",{ d:"M59.572 60V51.72H58.096V57.144L54.376 51.72H52.876V60H54.352V54.3L58.252 60H59.572ZM63.4852 55.08C64.1812 55.08 64.5412 55.584 64.6372 56.484H62.3212C62.4292 55.548 62.9092 55.08 63.4852 55.08ZM66.0292 59.412L65.8612 58.284C65.2252 58.728 64.6132 59.004 63.8692 59.004C62.9812 59.004 62.3692 58.512 62.3092 57.384H66.0292C66.0292 57.3 66.0412 57.156 66.0412 57.036C66.0412 55.392 65.2612 54.084 63.5212 54.084C62.0092 54.084 60.8812 55.224 60.8812 57.108C60.8812 59.196 62.0932 60.12 63.7132 60.12C64.6492 60.12 65.4052 59.844 66.0292 59.412ZM68.7047 60V51.336L67.2647 51.564V60H68.7047ZM71.7281 60V51.336L70.2881 51.564V60H71.7281ZM73.8635 62.184C74.9075 62.184 75.5795 61.764 76.0715 60.372L78.2915 54.204H76.8395L75.5435 58.284L74.2235 54.12L72.7235 54.312L74.8235 59.988L74.7755 60.156C74.5835 60.78 74.1995 60.996 73.7195 60.996C73.4675 60.996 73.2635 60.96 73.0835 60.912L73.2755 62.124C73.4075 62.16 73.5515 62.184 73.8635 62.184Z",fill:"#060607"}),(0,r.jsx)("path",{ d:"M58.792 76.084L59.908 75.844L56.716 67.684H55.588L52.348 76H53.524L54.448 73.516H57.82L58.792 76.084ZM56.128 69.004L57.448 72.52H54.82L56.128 69.004ZM65.7697 76V71.836C65.7697 70.804 65.1937 70.156 64.1137 70.156C63.2977 70.156 62.6257 70.612 62.0857 71.104L61.9537 70.276H61.1017V76H62.1697V72.04C62.6857 71.488 63.2617 71.116 63.8257 71.116C64.4497 71.116 64.7017 71.512 64.7017 72.1V76H65.7697ZM67.7558 78.184C68.5958 78.184 69.2198 77.872 69.6878 76.6L72.0278 70.276H70.9118L69.4118 74.728L67.8758 70.192L66.7958 70.36L68.8838 76.024L68.7398 76.408C68.5118 77.02 68.1878 77.248 67.7078 77.248C67.5398 77.248 67.3238 77.212 67.1438 77.164L67.2998 78.136C67.4078 78.16 67.5278 78.184 67.7558 78.184ZM77.9291 73.144C77.9291 71.26 76.8011 70.156 75.2651 70.156C73.7411 70.156 72.6371 71.26 72.6371 73.144C72.6371 75.028 73.7411 76.12 75.2651 76.12C76.8011 76.12 77.9291 75.028 77.9291 73.144ZM76.8491 73.144C76.8491 74.344 76.3211 75.232 75.2651 75.232C74.2571 75.232 73.7171 74.32 73.7171 73.144C73.7171 71.944 74.2331 71.044 75.2651 71.044C76.2971 71.044 76.8491 71.968 76.8491 73.144ZM83.9572 76V71.836C83.9572 70.804 83.3812 70.156 82.3012 70.156C81.4852 70.156 80.8132 70.612 80.2732 71.104L80.1412 70.276H79.2892V76H80.3572V72.04C80.8732 71.488 81.4492 71.116 82.0132 71.116C82.6372 71.116 82.8892 71.512 82.8892 72.1V76H83.9572ZM87.8013 70.996C88.6293 70.996 89.0373 71.524 89.1693 72.448H86.4093C86.5773 71.476 87.1413 70.996 87.8013 70.996ZM90.2373 75.352L90.0813 74.392C89.4573 74.884 88.8573 75.208 88.0293 75.208C87.0333 75.208 86.4093 74.584 86.3613 73.252H90.2493V73.024C90.2493 71.44 89.4813 70.156 87.8133 70.156C86.3733 70.156 85.2933 71.284 85.2933 73.12C85.2933 75.22 86.4573 76.12 87.9453 76.12C88.8933 76.12 89.6253 75.832 90.2373 75.352ZM101.73 70.276H100.662L99.4503 74.512L98.1903 70.276H97.2903L96.0303 74.512L94.7823 70.192L93.7383 70.36L95.5743 76.024H96.4623L97.7223 71.704L98.9943 76.024H99.8943L101.73 70.276ZM106.014 74.428C105.534 74.92 104.934 75.232 104.31 75.232C103.77 75.232 103.458 74.932 103.458 74.464C103.458 73.876 103.902 73.3 106.014 73.096V74.428ZM107.082 76V71.992C107.082 70.72 106.41 70.156 105.018 70.156C104.13 70.156 103.482 70.36 102.798 70.636L102.942 71.56C103.566 71.284 104.226 71.068 104.922 71.068C105.582 71.068 106.014 71.32 106.014 72.04V72.28C103.626 72.532 102.402 73.096 102.402 74.524C102.402 75.496 103.05 76.12 104.082 76.12C105.018 76.12 105.642 75.7 106.098 75.232L106.218 76H107.082ZM113.406 76V71.836C113.406 70.804 112.83 70.156 111.75 70.156C110.934 70.156 110.262 70.612 109.722 71.104L109.59 70.276H108.738V76H109.806V72.04C110.322 71.488 110.898 71.116 111.462 71.116C112.086 71.116 112.338 71.512 112.338 72.1V76H113.406ZM117.815 76.024L117.671 75.112C117.539 75.136 117.371 75.148 117.179 75.148C116.579 75.148 116.387 74.86 116.387 74.392V71.176H117.767L117.623 70.276H116.387V68.212L115.343 68.368V70.276H114.479V71.176H115.343V74.584C115.343 75.736 116.003 76.096 117.011 76.096C117.383 76.096 117.635 76.06 117.815 76.024ZM124.494 76.024L124.35 75.112C124.218 75.136 124.05 75.148 123.858 75.148C123.258 75.148 123.066 74.86 123.066 74.392V71.176H124.446L124.302 70.276H123.066V68.212L122.022 68.368V70.276H121.158V71.176H122.022V74.584C122.022 75.736 122.682 76.096 123.69 76.096C124.062 76.096 124.314 76.06 124.494 76.024ZM130.71 73.144C130.71 71.26 129.582 70.156 128.046 70.156C126.522 70.156 125.418 71.26 125.418 73.144C125.418 75.028 126.522 76.12 128.046 76.12C129.582 76.12 130.71 75.028 130.71 73.144ZM129.63 73.144C129.63 74.344 129.102 75.232 128.046 75.232C127.038 75.232 126.498 74.32 126.498 73.144C126.498 71.944 127.014 71.044 128.046 71.044C129.078 71.044 129.63 71.968 129.63 73.144ZM139.375 76V71.836C139.375 70.804 138.799 70.156 137.719 70.156C136.903 70.156 136.243 70.612 135.775 71.032V67.336L134.707 67.504V76H135.775V72.04C136.291 71.488 136.867 71.116 137.431 71.116C138.055 71.116 138.307 71.512 138.307 72.1V76H139.375ZM144.299 74.428C143.819 74.92 143.219 75.232 142.595 75.232C142.055 75.232 141.743 74.932 141.743 74.464C141.743 73.876 142.187 73.3 144.299 73.096V74.428ZM145.367 76V71.992C145.367 70.72 144.695 70.156 143.303 70.156C142.415 70.156 141.767 70.36 141.083 70.636L141.227 71.56C141.851 71.284 142.511 71.068 143.207 71.068C143.867 71.068 144.299 71.32 144.299 72.04V72.28C141.911 72.532 140.687 73.096 140.687 74.524C140.687 75.496 141.335 76.12 142.367 76.12C143.303 76.12 143.927 75.7 144.383 75.232L144.503 76H145.367ZM151.692 76V71.836C151.692 70.804 151.116 70.156 150.036 70.156C149.22 70.156 148.548 70.612 148.008 71.104L147.876 70.276H147.024V76H148.092V72.04C148.608 71.488 149.184 71.116 149.748 71.116C150.372 71.116 150.624 71.512 150.624 72.1V76H151.692ZM156.484 72.136C156.484 72.82 156.028 73.36 155.296 73.36C154.588 73.36 154.132 72.844 154.132 72.184C154.132 71.488 154.576 70.936 155.296 70.936C156.004 70.936 156.484 71.452 156.484 72.136ZM158.188 76.42C158.188 75.532 157.432 75.148 156.22 74.932L155.812 74.86C154.804 74.68 154.6 74.632 154.6 74.428C154.6 74.32 154.72 74.188 154.888 74.08C155.032 74.104 155.176 74.116 155.32 74.116C156.484 74.116 157.516 73.372 157.516 72.148C157.516 71.824 157.444 71.524 157.288 71.26L158.38 71.152L158.224 70.192L156.772 70.636C156.376 70.324 155.872 70.156 155.296 70.156C154.132 70.156 153.1 70.912 153.1 72.148C153.1 72.928 153.532 73.528 154.168 73.852C153.784 74.08 153.568 74.356 153.568 74.632C153.568 74.848 153.676 75.052 153.928 75.232C153.124 75.664 152.716 76.12 152.716 76.708C152.716 77.716 153.904 78.184 155.392 78.184C156.88 78.184 158.188 77.62 158.188 76.42ZM155.44 77.416C154.324 77.416 153.736 77.08 153.736 76.624C153.736 76.228 154.036 75.892 154.708 75.556C154.936 75.604 155.104 75.64 155.416 75.7L156.1 75.82C156.916 75.964 157.18 76.204 157.18 76.552C157.18 77.032 156.556 77.416 155.44 77.416ZM167.003 73.144C167.003 71.26 165.875 70.156 164.339 70.156C162.815 70.156 161.711 71.26 161.711 73.144C161.711 75.028 162.815 76.12 164.339 76.12C165.875 76.12 167.003 75.028 167.003 73.144ZM165.923 73.144C165.923 74.344 165.395 75.232 164.339 75.232C163.331 75.232 162.791 74.32 162.791 73.144C162.791 71.944 163.307 71.044 164.339 71.044C165.371 71.044 165.923 71.968 165.923 73.144ZM168.339 70.276V74.44C168.339 75.472 168.903 76.12 169.995 76.12C170.799 76.12 171.483 75.676 172.023 75.172L172.155 76H173.007V70.276H171.939V74.236C171.423 74.788 170.847 75.16 170.283 75.16C169.659 75.16 169.407 74.764 169.407 74.176V70.276H168.339ZM177.44 76.024L177.296 75.112C177.164 75.136 176.996 75.148 176.804 75.148C176.204 75.148 176.012 74.86 176.012 74.392V71.176H177.392L177.248 70.276H176.012V68.212L174.968 68.368V70.276H174.104V71.176H174.968V74.584C174.968 75.736 175.628 76.096 176.636 76.096C177.008 76.096 177.26 76.06 177.44 76.024ZM184.119 76.024L183.975 75.112C183.843 75.136 183.675 75.148 183.483 75.148C182.883 75.148 182.691 74.86 182.691 74.392V71.176H184.071L183.927 70.276H182.691V68.212L181.647 68.368V70.276H180.783V71.176H181.647V74.584C181.647 75.736 182.307 76.096 183.315 76.096C183.687 76.096 183.939 76.06 184.119 76.024ZM190.082 76V71.836C190.082 70.804 189.506 70.156 188.426 70.156C187.61 70.156 186.95 70.612 186.482 71.032V67.336L185.414 67.504V76H186.482V72.04C186.998 71.488 187.574 71.116 188.138 71.116C188.762 71.116 189.014 71.512 189.014 72.1V76H190.082ZM193.038 68.452C193.038 68.08 192.738 67.768 192.366 67.768C191.994 67.768 191.682 68.08 191.682 68.452C191.682 68.824 191.994 69.124 192.366 69.124C192.738 69.124 193.038 68.824 193.038 68.452ZM192.894 76V70.276H191.826V76H192.894ZM198.656 74.404C198.656 73.312 198.02 72.904 196.604 72.544C195.704 72.316 195.416 72.1 195.416 71.716C195.416 71.308 195.752 71.056 196.4 71.056C197 71.056 197.636 71.26 198.14 71.548L198.308 70.54C197.768 70.3 197.132 70.156 196.424 70.156C195.176 70.156 194.408 70.828 194.408 71.74C194.408 72.76 194.948 73.168 196.292 73.504C197.324 73.756 197.648 73.948 197.648 74.476C197.648 74.956 197.216 75.232 196.484 75.232C195.704 75.232 195.008 74.944 194.468 74.572L194.312 75.58C194.804 75.856 195.644 76.12 196.4 76.12C197.876 76.12 198.656 75.448 198.656 74.404ZM60.328 86.276H59.26L58.048 90.512L56.788 86.276H55.888L54.628 90.512L53.38 86.192L52.336 86.36L54.172 92.024H55.06L56.32 87.704L57.592 92.024H58.492L60.328 86.276ZM63.5318 86.996C64.3598 86.996 64.7678 87.524 64.8998 88.448H62.1398C62.3078 87.476 62.8718 86.996 63.5318 86.996ZM65.9678 91.352L65.8118 90.392C65.1878 90.884 64.5878 91.208 63.7598 91.208C62.7638 91.208 62.1398 90.584 62.0918 89.252H65.9798V89.024C65.9798 87.44 65.2118 86.156 63.5438 86.156C62.1038 86.156 61.0238 87.284 61.0238 89.12C61.0238 91.22 62.1878 92.12 63.6758 92.12C64.6238 92.12 65.3558 91.832 65.9678 91.352ZM69.5201 86.996C70.3481 86.996 70.7561 87.524 70.8881 88.448H68.1281C68.2961 87.476 68.8601 86.996 69.5201 86.996ZM71.9561 91.352L71.8001 90.392C71.1761 90.884 70.5761 91.208 69.7481 91.208C68.7521 91.208 68.1281 90.584 68.0801 89.252H71.9681V89.024C71.9681 87.44 71.2001 86.156 69.5321 86.156C68.0921 86.156 67.0121 87.284 67.0121 89.12C67.0121 91.22 68.1761 92.12 69.6641 92.12C70.6121 92.12 71.3441 91.832 71.9561 91.352ZM76.9364 92.084L78.1004 91.904L75.4844 88.808L77.8964 86.276H76.6124L74.3924 88.676V83.336L73.3244 83.504V92H74.3924V89L76.9364 92.084ZM81.1099 86.996C81.9379 86.996 82.3459 87.524 82.4779 88.448H79.7179C79.8859 87.476 80.4499 86.996 81.1099 86.996ZM83.5459 91.352L83.3899 90.392C82.7659 90.884 82.1659 91.208 81.3379 91.208C80.3419 91.208 79.7179 90.584 79.6699 89.252H83.5579V89.024C83.5579 87.44 82.7899 86.156 81.1219 86.156C79.6819 86.156 78.6019 87.284 78.6019 89.12C78.6019 91.22 79.7659 92.12 81.2539 92.12C82.2019 92.12 82.9339 91.832 83.5459 91.352ZM89.5822 92V87.836C89.5822 86.804 89.0062 86.156 87.9262 86.156C87.1102 86.156 86.4382 86.612 85.8982 87.104L85.7662 86.276H84.9142V92H85.9822V88.04C86.4982 87.488 87.0742 87.116 87.6382 87.116C88.2622 87.116 88.5142 87.512 88.5142 88.1V92H89.5822ZM91.9983 89.252C91.9983 87.836 92.6463 87.104 93.5463 87.104C94.1583 87.104 94.5063 87.2 94.9503 87.428V90.164C94.4943 90.776 93.9903 91.172 93.3303 91.172C92.5623 91.172 91.9983 90.512 91.9983 89.252ZM90.9183 89.3C90.9183 91.22 91.9383 92.12 93.1743 92.12C94.0143 92.12 94.6023 91.688 95.0343 91.172L95.1663 92H96.0183V83.336L94.9503 83.504V86.456C94.5903 86.312 94.0743 86.204 93.5103 86.204C92.1183 86.204 90.9183 87.212 90.9183 89.3ZM99.3194 89.54L100.015 89.384L100.123 88.196C101.551 87.548 102.415 86.984 102.415 85.688C102.415 84.38 101.419 83.564 99.9554 83.564C98.9714 83.564 98.1194 83.912 97.3874 84.452L97.5434 85.556C98.2154 85.004 98.9594 84.584 99.8954 84.584C100.699 84.584 101.287 85.004 101.287 85.736C101.287 86.504 100.783 86.888 99.6554 87.356L99.1634 87.56L99.3194 89.54ZM99.0674 92H100.267V90.572H99.0674V92Z", fill:"#2E3338"}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("pattern",{id:"tutorial-media-channels-image1",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"32",width:"32",href:O()})}),(0,r.jsx)("pattern",{id:"tutorial-media-channels-image2",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"32",width:"32",href:C()})})]})]})})}var S=n(439250),I=n.n(S);function _(){return(0,r.jsx)("div",{className:I().container,children:(0,r.jsxs)("svg",{width:"248",height:"67",viewBox:"0 0 248 67",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{ d:"M1.91937 22.0819L0.353585 25.3514C0.282937 25.5093 0.265227 25.6857 0.303076 25.8544C0.311999 25.943 0.339002 26.0288 0.382429 26.1067C0.425856 26.1845 0.484791 26.2527 0.555622 26.3071C0.607907 26.38 0.675826 26.4403 0.754452 26.4838C0.833079 26.5273 0.920441 26.5529 1.0102 26.5586C1.19659 26.5915 1.38843 26.5741 1.5658 26.5083L4.74788 24.949L5.15196 24.8484L5.55603 24.949L8.73811 26.5083H9.29371L9.74829 26.2568C9.85659 26.1275 9.92655 25.9707 9.95033 25.8041C9.98818 25.6354 9.97046 25.459 9.89982 25.3011L8.33403 22.0315C8.2926 21.919 8.27539 21.799 8.28352 21.6794C8.27533 21.5434 8.29245 21.4069 8.33403 21.277L9.89982 18.1081C9.94425 18.0329 9.97177 17.949 9.98049 17.8621C9.98921 17.7753 9.97892 17.6876 9.95033 17.6051C9.93611 17.4208 9.86561 17.2453 9.74829 17.1021C9.60449 16.9853 9.42824 16.9151 9.2432 16.9009C9.16036 16.8724 9.07231 16.8622 8.98511 16.8709C8.89791 16.8796 8.81364 16.907 8.73811 16.9512L5.50552 18.5105L5.10145 18.6111L4.69737 18.5105L1.5153 16.9512C1.43095 16.9057 1.3382 16.8778 1.24269 16.8692C1.14717 16.8605 1.05089 16.8713 0.959695 16.9009C0.792331 16.9246 0.634911 16.9943 0.505112 17.1021C0.372179 17.2408 0.284186 17.416 0.252566 17.6051C0.236844 17.779 0.271925 17.9537 0.353585 18.1081L1.86886 21.3273C1.94921 21.4454 1.98499 21.5879 1.96988 21.7297C1.98577 21.7888 1.98948 21.8504 1.9808 21.9109C1.97212 21.9715 1.95122 22.0296 1.91937 22.0819Z", fill:"#AEC7FF"}),(0,r.jsx)("path",{d:"M205.949 47.6259C218.112 47.6259 227.971 37.8071 227.971 25.695C227.971 13.5829 218.112 3.76405 205.949 3.76405C193.787 3.76405 183.927 13.5829 183.927 25.695C183.927 37.8071 193.787 47.6259 205.949 47.6259Z",fill:"url(#tutorial-media-voice-channels-image2)"}),(0,r.jsx)("path",{d:"M206.106 47.5713C218.256 47.5713 228.106 37.7216 228.106 25.5713C228.106 13.4211 218.256 3.57133 206.106 3.57133C193.956 3.57133 184.106 13.4211 184.106 25.5713C184.106 37.7216 193.956 47.5713 206.106 47.5713Z",stroke:"#3ba55c",strokeWidth:"3"}),(0,r.jsx)("path",{d:"M43.8822 66.4461C56.0446 66.4461 65.9042 56.6273 65.9042 44.5152C65.9042 32.4031 56.0446 22.5843 43.8822 22.5843C31.7198 22.5843 21.8602 32.4031 21.8602 44.5152C21.8602 56.6273 31.7198 66.4461 43.8822 66.4461Z",fill:"url(#tutorial-media-voice-channels-image1)"}),(0,r.jsx)("path",{ d:"M43.6684 66.0315C55.8187 66.0315 65.6684 56.1818 65.6684 44.0315C65.6684 31.8813 55.8187 22.0315 43.6684 22.0315C31.5181 22.0315 21.6684 31.8813 21.6684 44.0315C21.6684 56.1818 31.5181 66.0315 43.6684 66.0315Z",stroke:"#3ba55c",strokeWidth:"3"}),(0,r.jsx)("path",{d:"M138.597 43.8116C134.96 31.857 134.96 19.0973 138.597 7.14265",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M111.562 25.5955C115.2 37.5501 115.2 50.3098 111.562 62.2644",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M159.71 37.6246C158.509 33.6948 157.896 29.6101 157.892 25.5023C157.9 21.3782 158.513 17.2775 159.71 13.3296",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M149.154 10.2613C146.124 20.198 146.124 30.8065 149.154 40.7433",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{ d:"M170.266 16.4482C169.347 19.3785 168.887 22.4324 168.903 25.5023C168.887 28.5721 169.347 31.626 170.266 34.5563",stroke:"#FF6E5C",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M90.0579 56.1351C91.2957 52.1951 91.9258 48.0908 91.9267 43.9625C91.9301 39.8503 91.2999 35.7619 90.0579 31.8401",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M100.614 28.6068C103.644 38.5435 103.644 49.152 100.614 59.0887",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M79.5015 34.9084C81.3857 40.7986 81.3857 47.1263 79.5015 53.0165",stroke:"#FFED00",strokeWidth:"5",strokeMiterlimit:"10",strokeLinecap:"round"}),(0,r.jsx)("path",{ d:"M182.237 57.1914L184.257 56.4872C184.354 56.4431 184.436 56.3722 184.494 56.2831C184.551 56.1939 184.582 56.0902 184.582 55.9842C184.582 55.8783 184.551 55.7746 184.494 55.6854C184.436 55.5962 184.354 55.5254 184.257 55.4812L182.237 54.777C182.16 54.7552 182.088 54.7169 182.027 54.6648C181.966 54.6127 181.917 54.548 181.884 54.4752L181.176 52.4632C181.143 52.3626 181.079 52.275 180.993 52.2128C180.907 52.1507 180.803 52.1173 180.697 52.1173C180.59 52.1173 180.487 52.1507 180.4 52.2128C180.314 52.275 180.25 52.3626 180.217 52.4632L179.51 54.4752C179.476 54.548 179.427 54.6127 179.366 54.6648C179.305 54.7169 179.233 54.7552 179.156 54.777L177.186 55.4812C177.052 55.4812 176.924 55.5342 176.829 55.6286C176.734 55.7229 176.681 55.8508 176.681 55.9842C176.681 56.1176 176.734 56.2456 176.829 56.3399C176.924 56.4343 177.052 56.4872 177.186 56.4872L179.156 57.1914C179.233 57.2133 179.305 57.2516 179.366 57.3037C179.427 57.3558 179.476 57.4205 179.51 57.4933L180.217 59.5053C180.25 59.6059 180.314 59.6935 180.4 59.7556C180.487 59.8178 180.59 59.8512 180.697 59.8512C180.803 59.8512 180.907 59.8178 180.993 59.7556C181.079 59.6935 181.143 59.6059 181.176 59.5053L181.884 57.4933C181.917 57.4205 181.966 57.3558 182.027 57.3037C182.088 57.2516 182.16 57.2133 182.237 57.1914Z", fill:"#EC7DF7"}),(0,r.jsx)("path",{d:"M242.696 1.35812C242.696 0.746955 242.199 0.251511 241.585 0.251511C240.972 0.251511 240.474 0.746955 240.474 1.35812V2.4949C240.474 3.10607 240.972 3.60151 241.585 3.60151C242.199 3.60151 242.696 3.10607 242.696 2.4949V1.35812Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M242.696 10.2613C242.696 9.65011 242.199 9.15466 241.585 9.15466C240.972 9.15466 240.474 9.65011 240.474 10.2613V11.3981C240.474 12.0092 240.972 12.5047 241.585 12.5047C242.199 12.5047 242.696 12.0092 242.696 11.3981V10.2613Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M246.636 7.49476C247.25 7.49476 247.747 6.99933 247.747 6.38817C247.747 5.77701 247.25 5.28156 246.636 5.28156H245.495C244.881 5.28156 244.384 5.77701 244.384 6.38817C244.384 6.99933 244.881 7.49476 245.495 7.49476H246.636Z",fill:"#7196FF"}),(0,r.jsx)("path",{ d:"M237.696 7.49477C238.31 7.49477 238.807 6.99931 238.807 6.38815C238.807 5.77699 238.31 5.28154 237.696 5.28154H236.555C235.941 5.28154 235.443 5.77699 235.443 6.38815C235.443 6.99931 235.941 7.49477 236.555 7.49477H237.696Z",fill:"#7196FF"}),(0,r.jsx)("path",{d:"M25.2929 2.23526C24.8786 1.82274 24.207 1.82274 23.7928 2.23526C23.3786 2.64777 23.3786 3.31659 23.7928 3.7291L24.5535 4.48669C24.9678 4.8992 25.6394 4.8992 26.0536 4.48669C26.4678 4.07418 26.4678 3.40536 26.0536 2.99285L25.2929 2.23526Z",fill:"#F7D036"}),(0,r.jsx)("path",{d:"M31.3539 8.25656C30.9397 7.84404 30.2681 7.84404 29.8538 8.25656C29.4396 8.66907 29.4396 9.33789 29.8538 9.7504L30.6146 10.508C31.0288 10.9205 31.7004 10.9205 32.1146 10.508C32.5289 10.0955 32.5289 9.42666 32.1146 9.01415L31.3539 8.25656Z",fill:"#F7D036"}),(0,r.jsx)("path",{ d:"M32.109 3.71739C32.5233 3.30488 32.5233 2.63606 32.109 2.22354C31.6948 1.81103 31.0232 1.81103 30.609 2.22355L29.8482 2.98114C29.434 3.39365 29.434 4.06247 29.8482 4.47498C30.2625 4.88749 30.9341 4.88749 31.3483 4.47498L32.109 3.71739Z",fill:"#F7D036"}),(0,r.jsx)("path",{d:"M26.0985 9.73869C26.5128 9.32618 26.5128 8.65736 26.0985 8.24485C25.6843 7.83233 25.0127 7.83233 24.5985 8.24485L23.8378 9.00244C23.4235 9.41495 23.4235 10.0838 23.8378 10.4963C24.252 10.9088 24.9236 10.9088 25.3378 10.4963L26.0985 9.73869Z",fill:"#F7D036"}),(0,r.jsxs)("defs",{children:[(0,r.jsx)("pattern",{id:"tutorial-media-voice-channels-image1",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"44",width:"44",href:O()})}),(0,r.jsx)("pattern",{id:"tutorial-media-voice-channels-image2",x:"0",y:"0",patternUnits:"objectBoundingBox",height:"1",width:"1",children:(0,r.jsx)("image",{x:"0",y:"0",height:"44",width:"44",href:C()})})]})]})})} var w=n(503528),x=n(621647),P=n(628486),N=n(61209),A=n(567403),T=n(473903),Z=n(124251),M=n(775173),R=n(762507),L=n.n(R);function D(){var e=(0,P.Z)((function(e){return{guildId:e.guildId,channelId:e.channelId}}),w.Z),t=e.guildId,n=e.channelId,o=(0,f.e7)([A.Z],(function(){return A.Z.getGuild(t)})),i=(0,f.e7)([N.Z],(function(){return null==o?N.Z.getChannel(n):null})),a=(0,f.e7)([T.default],(function(){return T.default.getCurrentUser()})),l=null!=i?(0,x.x)(i):null,u=null!=a?a.getAvatarURL(t,80):M.pK[0],c=(0,r.jsx)(d.qEK,{src:u,"aria-hidden":!0,size:d.EFr.SIZE_80,className:L().avatarSizeOverride}),s=null;s=null!=o?(0,r.jsx)(Z.Z,{guild:o}):null!=l?(0,r.jsx)(d.qEK,{"aria-hidden":!0,src:l,size:d.EFr.SIZE_80,className:L().avatarSizeOverride}):c;return(0,r.jsxs)("div",{className:L().container,children:[(0,r.jsx)("div",{className:L().personAvatar,children:c}),(0,r.jsx)("div",{className:L().guildAvatar,children:s}),(0,r.jsx)("svg",{className:L().illustration,xmlns:"http://www.w3.org/2000/svg", width:"156",height:"70",viewBox:"0 0 123 55",children:(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsx)("path",{fill:"#D3D6ED",d:"M7.6003,3.7337 C7.6003,3.1817 7.1533,2.7337 6.6003,2.7337 C5.7663,2.7337 5.0903,2.0577 5.0903,1.2237 C5.0903,0.6717 4.6423,0.2237 4.0903,0.2237 C3.5383,0.2237 3.0903,0.6717 3.0903,1.2237 C3.0903,2.0577 2.4133,2.7337 1.5803,2.7337 C1.0283,2.7337 0.5803,3.1817 0.5803,3.7337 C0.5803,4.2857 1.0283,4.7337 1.5803,4.7337 C2.4133,4.7337 3.0903,5.4097 3.0903,6.2437 C3.0903,6.7967 3.5383,7.2437 4.0903,7.2437 C4.6423,7.2437 5.0903,6.7967 5.0903,6.2437 C5.0903,5.4097 5.7663,4.7337 6.6003,4.7337 C7.1533,4.7337 7.6003,4.2857 7.6003,3.7337"}),(0,r.jsx)("path",{fill:"#ACB0FF", d:"M96.6157,5.4263 C96.6157,4.8743 96.1687,4.4263 95.6157,4.4263 C95.0627,4.4263 94.6157,4.8743 94.6157,5.4263 C94.6157,6.2603 93.9397,6.9363 93.1057,6.9363 C92.5537,6.9363 92.1057,7.3843 92.1057,7.9363 C92.1057,8.4883 92.5537,8.9363 93.1057,8.9363 C93.9397,8.9363 94.6157,9.6123 94.6157,10.4463 C94.6157,10.9983 95.0627,11.4463 95.6157,11.4463 C96.1687,11.4463 96.6157,10.9983 96.6157,10.4463 C96.6157,9.6123 97.2917,8.9363 98.1257,8.9363 C98.6787,8.9363 99.1257,8.4883 99.1257,7.9363 C99.1257,7.3843 98.6787,6.9363 98.1257,6.9363 C97.2917,6.9363 96.6157,6.2603 96.6157,5.4263 Z"}),(0,r.jsx)("path",{fill:"#FFF", d:"M120.7351 14.0452L119.5511 15.2282C119.1611 15.6182 119.1611 16.2512 119.5511 16.6422 119.7471 16.8372 120.0031 16.9352 120.2581 16.9352 120.5141 16.9352 120.7701 16.8372 120.9651 16.6422L122.1491 15.4592C122.5401 15.0682 122.5401 14.4362 122.1491 14.0452 121.7581 13.6542 121.1261 13.6542 120.7351 14.0452zM113.635 21.1452C113.245 21.5352 113.245 22.1682 113.635 22.5592 113.831 22.7542 114.087 22.8522 114.342 22.8522 114.598 22.8522 114.855 22.7542 115.049 22.5592L116.233 21.3752C116.624 20.9842 116.624 20.3522 116.233 19.9612 115.842 19.5702 115.209 19.5702 114.819 19.9612L113.635 21.1452zM120.9655 19.9612C120.5745 19.5702 119.9425 19.5702 119.5515 19.9612 119.1605 20.3522 119.1605 20.9842 119.5515 21.3752L120.7355 22.5592C120.9305 22.7542 121.1865 22.8522 121.4425 22.8522 121.6975 22.8522 121.9535 22.7542 122.1495 22.5592 122.5395 22.1682 122.5395 21.5352 122.1495 21.1452L120.9655 19.9612zM115.0491 14.0449C114.6591 13.6549 114.0251 13.6549 113.6351 14.0449 113.2451 14.4359 113.2451 15.0689 113.6351 15.4589L114.8191 16.6419C115.0141 16.8369 115.2701 16.9349 115.5261 16.9349 115.7821 16.9349 116.0381 16.8369 116.2331 16.6419 116.6241 16.2509 116.6241 15.6189 116.2331 15.2279L115.0491 14.0449z" }),(0,r.jsx)("rect",{width:"40",height:"25",x:"68",y:"22",fill:"#999CF4",fillRule:"nonzero",rx:"3"}),(0,r.jsx)("path",{fill:"#999CF4",fillRule:"nonzero",d:"M90,46 L90,53.8100983 C90,54.362383 90.4477153,54.8100983 91,54.8100983 C91.2501917,54.8100983 91.4912948,54.7163131 91.6757246,54.5472524 L101,46 L90,46 Z",transform:"matrix(-1 0 0 1 191 0)"}),(0,r.jsxs)("g",{fill:"#FFF",fillRule:"nonzero",opacity:".902",transform:"translate(78 32)",children:[(0,r.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"10.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"18.5",cy:"2.5",r:"2.5"})]}),(0,r.jsx)("rect",{width:"40",height:"25",x:"13",y:"9",fill:"#5865f2",fillRule:"nonzero",rx:"3"}),(0,r.jsx)("path",{fill:"#5865f2",fillRule:"nonzero",d:"M20,33 L20,40.8100983 C20,41.362383 20.4477153,41.8100983 21,41.8100983 C21.2501917,41.8100983 21.4912948,41.7163131 21.6757246,41.5472524 L31,33 L20,33 Z"}),(0,r.jsxs)("g",{fill:"#FFF",fillRule:"nonzero",opacity:".902", transform:"translate(23 19)",children:[(0,r.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"10.5",cy:"2.5",r:"2.5"}),(0,r.jsx)("circle",{cx:"18.5",cy:"2.5",r:"2.5"})]})]})})]})}var k=Object.freeze({"voice-conversations":{popoutPosition:"right",highPriority:!0,textAlign:b.iu.CENTER,media:function(){return(0,r.jsx)(_,{})}},"writing-messages":{popoutPosition:"top",highPriority:!0,textAlign:b.iu.CENTER,spacing:10,media:function(){return(0,r.jsx)(D,{})}},"direct-messages":{popoutPosition:"right"},"create-first-server":{popoutPosition:"right",highPriority:!0},"organize-by-topic":{popoutPosition:"right",textAlign:b.iu.CENTER,spacing:8,media:function(){return(0,r.jsx)(j,{})}},"instant-invite":{popoutPosition:"right",spacing:24,highPriority:!0},"whos-online":{spacing:16,popoutPosition:"left"},"server-settings":{popoutPosition:"bottom",spacing:10},"friends-list":{spacing:8,popoutPosition:"right"},"create-more-servers":{spacing:8,popoutPosition:"right"}}),U=function(e){ return e in k?k[e]:null},B=n(464187),F=n(226919),G=n(473708),H=n(909774),V=n.n(H),W=function(){return(0,r.jsx)(r.Fragment,{children:G.Z.Messages.TIP_INSTANT_INVITE_BODY3.format({shareIcon:G.Z.Messages.INSTANT_INVITE,shareIconHook:function(){return(0,r.jsx)(F.Z,{className:V().icon},"icon")}})})},z=function(){var e=(0,f.e7)([A.Z,B.Z],(function(){return A.Z.getGuild(B.Z.getGuildId())}),[]),t=null==e?void 0:e.name;return(0,r.jsx)(r.Fragment,{children:G.Z.Messages.TIP_WRITING_MESSAGES_BODY3.format({serverName:t})})},Y=n(361925),K=n(2590),q=n(577254),Q=n.n(q);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>x});var r=n(289283),o=n(202351),i=n(744564),a=n(532548);const l=Object.freeze({"voice-conversations":{popoutOffset:{x:45,y:0}},"writing-messages":{prerequisites:["voice-conversations"],popoutOffset:{x:-36,y:0}},"direct-messages":{popoutOffset:{x:50,y:0}},"create-first-server":{popoutOffset:{x:45,y:0}},"organize-by-topic":{popoutOffset:{x:50,y:0}},"instant-invite":{prerequisites:["organize-by-topic"],popoutOffset:{x:-10,y:0}},"whos-online":{prerequisites:["instant-invite"],popoutOffset:{x:-50,y:0}},"server-settings":{prerequisites:["instant-invite"],popoutOffset:{y:32,x:0}},"friends-list":{prerequisites:["instant-invite"], popoutOffset:{x:45,y:0}},"create-more-servers":{prerequisites:["server-settings"],popoutOffset:{x:45,y:0}}});var u=n(199790);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{T:()=>C,Z:()=>j});var r=n(785893),o=n(667294),i=n(202351),a=n(707961),l=n(971402),u=n(285991),c=n(334835),s=n(491260),f=n(924308),d=n(762423),p=n(2590),h=n(473708),y=n(867705),b=n.n(y);function v(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function O(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1 };case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{D:()=>w,Z:()=>x});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(202351),l=n(707961),u=n(971402),c=n(735885),s=n(74535),f=n(795470),d=n(934870),p=n(124251),h=n(749565),y=n(924308),b=n(2590),v=n(473708),m=n(867705),g=n.n(m),O=n(190361),E=n.n(O);function C(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){C(i,r,o,a,l,"next",e)}function l(e){C(i,r,o,a,l,"throw",e)}a(void 0)}))}}function S(e,t,n){t in e?Object.defineProperty(e,t,{ value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}var _=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0, o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>d});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(656645),l=n(736097),u=n(615457),c=n(473708);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n ;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(){var e=(0,o.e7)([l.Z],(function(){return(0,u.P)(l.Z.getInputVolume())}));return(0,r.jsx)(i.II_,{id:"input",label:c.Z.Messages.FORM_LABEL_INPUT_VOLUME,control:function(t,n){return(0,r.jsx)(i._wy,f(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>f});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(656645),l=n(736097),u=n(120415),c=n(2590),s=n(473708);function f(){var e=!u.FB,t=(0,o.e7)([l.Z],(function(){return l.Z.getMode()})),n=function(e,n){return(0,r.jsx)(i.k5B,{id:e,group:"input-modes",label:n,checked:t===e,action:function(){return a.Z.setMode(e)}},e)};return[n(c.pM4.VOICE_ACTIVITY,s.Z.Messages.INPUT_MODE_VAD),n(c.pM4.PUSH_TO_TALK,e?s.Z.Messages.INPUT_MODE_PTT_LIMITED:s.Z.Messages.INPUT_MODE_PTT)]}},755380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(202351)),i=n(707961),a=n(656645),l=n(736097),u=n(615457),c=n(120415),s=n(473708);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function p(){var e=(0,o.e7)([l.Z],(function(){return(0,u.P)(l.Z.getOutputVolume())}));return(0,r.jsx)(i.II_,{id:"output",label:s.Z.Messages.FORM_LABEL_OUTPUT_VOLUME,control:function(t,n){return(0,r.jsx)(i._wy,d(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>a});var r=n(202351),o=n(736097),i=n(630926);function a(){return(0,r.e7)([o.Z],(function(){return(0,i.Z)(o.Z)}))}},791271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(773148),o=n(358500);function i(e,t,n){if(t.type===o.fO.ACTIVITY){var i;return null!==(i=null==n?void 0:n.name)&&void 0!==i?i:null}return r.Z.getName(e.getGuildId(),e.id,t.user)}},781295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(358500);function o(e){var t,n;return e.type!==r.fO.ACTIVITY&&((0,r._5)(e)?null!=e.streamId:null!==(n=null===(t=e.voiceState)||void 0===t?void 0:t.selfVideo)&&void 0!==n&&n)}},199047:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(496486),o=n.n(r),i=n(202351),a=n(736097),l=n(36256);function u(){var e=(0,i.cj)([a.Z],(function(){ var e,t,n=null===(t=null===(e=o()(a.Z.getVideoDevices()).values().first())||void 0===e?void 0:e.disabled)||void 0===t||t;return{enabled:a.Z.isVideoEnabled(),cameraUnavailable:n||!a.Z.supports(l.AN.VIDEO)}}));return{enabled:e.enabled,cameraUnavailable:e.cameraUnavailable}}},79987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(202351),o=n(861426),i=n(736818),a=n(736097),l=n(682776),u=n(407561),c=n(2590);function s(e){return(0,r.cj)([i.default,u.Z,a.Z,l.Z,o.Z],(function(){return function(e){var t,n=e.channel,r=e.authenticationStore,s=void 0===r?i.default:r,f=e.voiceStateStore,d=void 0===f?u.Z:f,p=e.mediaEngineStore,h=void 0===p?a.Z:p,y=e.permissionStore,b=void 0===y?l.Z:y,v=e.impersonateStore,m=void 0===v?o.Z:v,g=null!=n?d.getVoiceState(n.getGuildId(),s.getId()):null,O=h.isSelfMute()||h.isSelfMutedTemporarily(),E=null==n?void 0:n.getGuildId(),C=m.isViewingRoles(E)&&!b.can(c.Plq.SPEAK,n);return{selfMute:O,suppress:(null==g?void 0:g.suppress)||C, mute:null!==(t=null==g?void 0:g.mute)&&void 0!==t&&t}}({channel:e,authenticationStore:i.default,voiceStateStore:u.Z,mediaEngineStore:a.Z,permissionStore:l.Z,impersonateStore:o.Z})}))}},767484:(e,t,n)=>{"use strict";n.d(t,{OV:()=>F,ZP:()=>H});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(707961),c=n(579581),s=n(258104),f=n(61040),d=n(322422),p=n(195034),h=n(483535),y=n(92585),b=n(744564),v=n(961337),m=n(979197),g=n(930948),O=n(2590),E=function(e,t){return b.Z.wait((function(){(0,v.Cz)(e,t)}))};function C(e){var t,n=e.embedId,i=e.className,a=e.style,u=(0,l.e7)([m.Z],(function(){return m.Z.getWindow(O.KJ3.CHANNEL_CALL_POPOUT)})),c=null!==(t=null==u?void 0:u.window)&&void 0!==t?t:window,s=o.useRef(null),f=o.useMemo((function(){var e=null;return function(){null==e&&(e=c.requestAnimationFrame((function(){var t,r;E(n,null!==(r=null===(t=s.current)||void 0===t?void 0:t.getBoundingClientRect())&&void 0!==r?r:null);e=null})))}}),[n,c]);o.useEffect((function(){ c.addEventListener("resize",f);g.S.subscribe(O.CkL.REMEASURE_TARGET,f);return function(){c.removeEventListener("resize",f);g.S.unsubscribe(O.CkL.REMEASURE_TARGET,f)}}),[f,c]);o.useLayoutEffect((function(){var e=s.current;if(null!=e){var t=e.ownerDocument.defaultView;if(null!=t){f();var r=new t.ResizeObserver(f);r.observe(e);return function(){r.disconnect();E(n,null)}}}}),[n,f]);return(0,r.jsx)("div",{ref:s,style:a,className:i})}var j,S=n(391186),I=n(283133),_=n(153686),w=n(19585),x=n(28661),P=n(736818),N=n(473903),A=n(96606),T=n(72580),Z=n(773148),M=n(473708),R=n(353537),L=n.n(R);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n400?j.LARGE:e>300?j.MEDIUM:j.SMALL}(v),g=U(function(e){return e>400?[u.EFr.SIZE_56,56]:e>300?[u.EFr.SIZE_32,32]:[u.EFr.SIZE_24,24]}(v),1),O=g[0],E=(0,l.Wu)([N.default,P.default],(function(){return Array.from(p).map((function(e){return P.default.getId()===e?null:N.default.getUser(e)})).filter(T.lm)})),C=(0,l.e7)([s.ZP],(function(){return s.ZP.getEmbeddedActivitiesForChannel(b.id).find((function(e){return e.application_id===h.id}))})),I=(0,w.Z)().analyticsLocations,_=(0,c.O)(),x=Z.Z.getName(b.getGuildId(),b.id,null==E?void 0:E[0]),A=(0,d.s5)({userId:null===(t=N.default.getCurrentUser())||void 0===t?void 0:t.id,activity:C,channelId:b.id,application:h })===d.Fw.CAN_JOIN,R=null!==(n=b.getGuildId())&&void 0!==n?n:void 0;return(0,r.jsxs)("div",{className:L().splash,children:[(0,r.jsx)(F,{avatarSize:O,guildId:R,channelId:b.id,users:E}),(0,r.jsx)(u.xvT,{className:a()(L().subheader,(o={},k(o,L().small,m===j.SMALL),k(o,L().medium,m===j.MEDIUM),o)),variant:"text-sm/normal",children:E.length>1?M.Z.Messages.EMBEDDED_ACTIVITIES_USERNAME_AND_OTHERS.format({username:x,count:E.length-1}):M.Z.Messages.EMBEDDED_ACTIVITIES_IS_PLAYING.format({username:x})}),(0,r.jsx)(u.xvT,{className:a()(L().header,(i={},k(i,L().small,m===j.SMALL),k(i,L().medium,m===j.MEDIUM),i)),variant:"text-sm/normal",children:h.name}),(0,r.jsx)("div",{className:L().buttons,children:A?(0,r.jsx)(u.zxk,{onClick:function(e){e.stopPropagation();null!=C&&(0,f.Z)({activity:C,currentEmbeddedApplication:y,activityChannelId:b.id,locationObject:_.location,embeddedActivitiesManager:S.Z,analyticsLocations:I})},size:function(e){switch(e){case j.LARGE:return u.zxk.Sizes.LARGE;case j.MEDIUM: return u.zxk.Sizes.MEDIUM;case j.SMALL:return u.zxk.Sizes.SMALL}}(m),className:L().button,color:u.zxk.Colors.PRIMARY,children:M.Z.Messages.EMBEDDED_ACTIVITIES_JOIN_ACTIVITY}):null})]})}function H(e){var t=e.participant,n=e.width,o=e.selected,i=e.interactible,a=e.channel,l=(0,w.Z)(_.Z.ACTIVITY_TILE).AnalyticsLocationProvider,u=t.id,c=(0,p.Z)(),s=(null==c?void 0:c.channelId)===a.id&&c.application_id===u,f=(0,h.Z)(),d=U((0,x.Z)([u]),1)[0],b=(0,y.Z)({applicationId:u,names:B,size:1024}).url,v=!o&&s,m=!s,g=!s&&!o;return(0,r.jsx)(l,{children:(0,r.jsx)("div",{className:L().container,children:(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)(C,{className:L().iframe,embedId:(0,I.Z)(a.id,u)}),m&&null!=d&&null!=b&&""!==b?(0,r.jsx)("img",{className:L().splashImage,alt:d.name,src:b}):null,g&&null!=d&&(0,r.jsx)(G,{width:n,channel:a,participants:t.participants,application:d,currentEmbeddedApplication:f}),i||m?null:(0,r.jsx)("div",{className:L().clickShield})]})})})}},730380:(e,t,n)=>{"use strict";n.d(t,{ BP:()=>cn,ZP:()=>sn});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(202351),u=n(336194),c=n(707961),s=n(656645),f=n(213276),d=n(28661),p=n(91036),h=n(468811),y=n.n(h),b=n(744564),v=n(316878),m=n(396043),g=n(777314),O=n(869495),E=n(285629),C=n(496486),j=n.n(C),S=n(211248),I=n.n(S),_=n(833529),w=n.n(_);function x(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){x(i,r,o,a,l,"next",e)}function l(e){x(i,r,o,a,l,"throw",e)}a(void 0)}))}}var N,A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1, r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=2e3?(0,ie.H)(n):e=setTimeout((function(){h(!1);y&&(0,ie.H)(n)}),y?2e3:6e3);return function(){null!=e&&clearTimeout(e)}}),[s,n,y]);return y?null:b((function(e,n){var o=e.rotate;return n&&(0,r.jsx)(ae.animated.div,{className:ce().voiceChannelEffectEmojiContainer,style:{transform:o.to(pe)},children:(0,r.jsx)(le.Z,{ className:a()(ce().voiceChannelEffectEmoji),emojiId:c.id,emojiName:c.name,animated:null!==(t=c.animated)&&void 0!==t&&t})})}))}var ye=n(736818),be=n(736097),ve=n(225253),me=n(742257),ge=n(542231),Oe=n(781736),Ee=n(308377),Ce=n(554647),je=n(425454),Se=n(186440),Ie=n(796938),_e=n(61473),we=n(791271),xe=n(767484),Pe=n(408816),Ne=n(247250),Ae=n(481008),Te=n(587683),Ze=n(774930),Me=n(257164),Re=n(246549),Le=n(544475),De=n(441143),ke=n.n(De),Ue=n(318715),Be=n(636398),Fe=n(473903),Ge=n(9134),He=n(407761),Ve=n(99452),We=n(569588),ze=n(306263),Ye=n(69660),Ke=n(652591),qe=n(203600);function Qe(e,t){var n=e.handleMouseDown,r=e.handleMouseMove,i=e.handleMouseUp,a=e.handleMouseEnter,u=o.useRef(null),c=(0,l.e7)([Ye.Z],(function(){return Ye.Z.getRTCConnection((0,ze.V9)(t))})),s=o.useCallback((function(e,t,r){u.current=Date.now();n(e,t,r)}),[n]),f=o.useCallback((function(e,t,n){i(e,t,n);if(null!=u.current){!function(e,t,n){Ke.default.track(M.rMx.PREMIUM_FEATURE_USAGE,{ feature_name:"".concat(qe.QP.SHARED_CANVAS,"_").concat(e.type),feature_tier:qe.h1.FREE,media_session_id:t.getMediaSessionId(),parent_media_session_id:t.parentMediaSessionId,guild_id:t.guildId,duration:n})}(e,c,Date.now()-u.current);u.current=null}}),[i,c]);return{handleMouseUp:f,handleMouseDown:s,handleMouseMove:r,handleMouseEnter:a}}var Xe=n(468874),Je=function(){};function $e(e,t,n){var r=o.useRef(y().v4()),i=o.useRef(Date.now()),a=o.useCallback((function(o,a){var l={x:o,y:a,deltaTime:Date.now()-i.current};(0,Xe.oW)(t,r.current,e,n,l);(0,Xe.cV)(r.current,e,n,[l])}),[t,n,e]),l=o.useCallback((function(e,t,n){r.current=y().v4();i.current=Date.now();a(t,n)}),[a]),u=o.useCallback((function(e,t,n){return a(t,n)}),[a]),c=o.useCallback((function(e,t,n){return l(e,t,n)}),[l]);return o.useMemo((function(){return{handleMouseDown:l,handleMouseMove:u,handleMouseUp:Je,handleMouseEnter:c}}),[l,c,u])}var et=n(513328),tt=n(35723);function nt(e,t,n){t in e?Object.defineProperty(e,t,{value:n, enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function rt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return ;if("string"==typeof e)return gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(e){var t=e.width,n=void 0===t?24:t,i=e.height,a=void 0===i?24:i,l=e.color,u=void 0===l?"currentColor":l,c=e.foreground,s=Ct(e,["width","height","color","foreground"]),f=jt(o.useState((function(){return y().v4()})),1)[0];return(0,r.jsxs)("svg",Et(function(e){for(var t=1;t0})),j=(0,l.e7)([bt.Z],(function(){return bt.Z.isFocused() })),S=(null==E?void 0:E.ownerId)===y,I=S&&!j&&!f,_=null!=E?(0,Me.Z)(E,m,m.id===y,I):null,w=d<195;o.useEffect((function(){if(!C&&(null==O?void 0:O.isGuildStageVoice())&&!S){(0,Ae.rn)(v);Ne.Z.updateStageStreamSize(v.channelId,!1)}}),[]);return b?(0,r.jsx)(Bt,{isSmall:w}):(null==E?void 0:E.state)===M.jm8.ENDED?(0,r.jsx)(xt.Z,{selected:n,stream:E,width:d}):(null==E?void 0:E.state)===M.jm8.FAILED?(0,r.jsx)(Pt.Z,{selected:n,stream:E,width:d}):t.type===Zt.fO.HIDDEN_STREAM?(0,r.jsx)(Nt.Z,{selected:n,participant:t,width:d}):null!=E&&!n&&null!=h&&be.Z.supports(Mt.AN.VIDEO)?(0,r.jsxs)(r.Fragment,{children:[null!=O?(0,r.jsx)(dt,{focused:p,channelId:O.id,guildId:O.guild_id,streamerId:m.id,hasScreenMessage:null!=_,stream:v}):null,(0,r.jsx)(ve.Z,{onResize:i,wrapperClassName:Lt().videoWrapper,className:Lt().content,streamId:g,videoComponent:h,fit:s,paused:u||I,videoSpinnerContext:S?Te.m.SELF_STREAM:Te.m.REMOTE_STREAM,userId:m.id}),null!=_?(0,r.jsx)(pt.Z,kt({size:(0,wt.L)(d)},_)):null]}):(0, r.jsxs)("div",{className:a()(Lt().content,Lt().streamPreview,Dt({},Lt().small,w)),children:[(0,r.jsx)(Re.Z,{noText:!0,className:a()(Lt().absoluteFill,Dt({},Lt().streamPreviewOpacity,null==E)),stream:t.stream}),n?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_t.a,{isSmall:w,children:(0,r.jsx)(c.xvT,{variant:w?"text-sm/semibold":"text-md/semibold",color:"none",children:d<175?G.Z.Messages.WATCH:G.Z.Messages.WATCH_STREAM})}),C?(0,r.jsx)(_t.a,{className:Lt().addCTA,tooltip:G.Z.Messages.STREAM_WATCH_MULTIPLE_TOOLTIP,onClick:function(e){e.stopPropagation();(0,Ae.rn)(v,{forceMultiple:!0})},isSmall:w,children:(0,r.jsx)(vt.Z,{className:Lt().addStreamIcon})}):null]})]})}var Gt=n(80317),Ht=n(995141),Vt=n(566706),Wt=n(979197),zt=n(68392),Yt=n(775173),Kt=n(773148),qt=n(781295);function Qt(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var Xt=c.EFr.SIZE_80,Jt=c.EFr.SIZE_40;function $t(e){ var t=e.participant,n=e.channel,i=e.inCall,u=e.width,s=e.paused,f=e.selected,d=e.fit,h=e.onVideoResize,y=e.blocked,b=e.noVideoRender,m=void 0!==b&&b,g=e.pulseSpeakingIndicator,O=void 0!==g&&g,E=be.Z.getVideoComponent(),C=(0,l.e7)([ye.default],(function(){return ye.default.getId()})),j=(0,l.e7)([v.Z],(function(){return v.Z.useReducedMotion})),S=t.user,I=t.streamId,_=t.speaking,w=S.id===C,x=(0,qt.Z)(t),P=(0,l.e7)([bt.Z],(function(){return bt.Z.isFocused()})),N=(0,l.e7)([Wt.Z],(function(){return Wt.Z.getWindowFocused(M.KJ3.CHANNEL_CALL_POPOUT)})),A=(0,l.e7)([be.Z],(function(){return null!=S.id&&be.Z.isLocalVideoDisabled(S.id,(0,p.Z)(t.type))}),[S.id,t.type]),T=Kt.Z.getName(n.getGuildId(),n.id,S),Z=u<124,R=(0,Gt.U)().canUseAvatarDecorations,L=(0,l.e7)([Vt.Z],(function(){return Vt.Z.getSelectedParticipant(n.id)}));o.useEffect((function(){n.isGuildStageVoice()&&!x&&(null==L?void 0:L.id)===S.id&&Ne.Z.selectParticipant(n.id,null)}),[x]) ;if(i&&!A&&!m&&x&&!f&&null!=E&&be.Z.supports(Mt.AN.VIDEO))return(0,r.jsx)(ve.Z,{onResize:h,wrapperClassName:Lt().videoWrapper,className:Lt().content,mirror:w,streamId:I,videoComponent:E,fit:d,paused:s,videoSpinnerContext:S.id===C?Te.m.SELF_VIDEO:Te.m.REMOTE_VIDEO,userId:S.id});var D=!j&&_&&(N||P),k=Z?Jt:Xt,U=R?(0,Yt.NZ)({userId:S.id,avatarDecoration:S.avatarDecoration,size:(0,Ht.y)(k),canAnimate:D}):null;return(0,r.jsx)("div",{className:a()(Lt().content,Qt({},Lt().blockedAvatar,y)),children:(0,r.jsx)(zt.Z,{"aria-label":T,src:S.getAvatarURL(n.guild_id,(0,c.pxk)(Z?Jt:Xt),D),avatarDecoration:U,backgroundSrc:S.getAvatarURL(n.guild_id,80),size:k,pulseSpeakingIndicator:O,speaking:_})})}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e) ;for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function an(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return en(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()} var ln=o.memo((function(e){var t,n,i,u=e.participant,h=e.onDoubleClick,y=e.onContextMenu,b=e.onClick,v=e.onMouseDown,m=e.onKeyDown,O=e.className,E=e.style,C=e.channel,j=e.width,S=e.inPopout,I=e.onVideoResize,_=e.inCall,w=void 0!==_&&_,x=e.selected,P=void 0!==x&&x,N=e.noBorder,A=void 0!==N&&N,T=e.noVideoRender,Z=void 0!==T&&T,R=e.focused,L=void 0!==R&&R,D=e.blocked,k=void 0!==D&&D,U=e.fit,B=void 0===U?ve.L.CONTAIN:U,H=e.paused,V=void 0!==H&&H,W=e.pulseSpeakingIndicator,z=void 0!==W&&W,K=o.useContext(oe.h9),q=an(o.useState(!1),2),Q=q[0],X=q[1],$=(0,l.e7)([ye.default],(function(){return ye.default.getId()})),ee=u.type===Zt.fO.ACTIVITY?null:null===(t=u.user)||void 0===t?void 0:t.id,te=an((0,d.Z)(u.type===Zt.fO.ACTIVITY?[u.id]:[]),1)[0],ae=(0,l.e7)([g.Z],(function(){return g.Z.getEnabled()})),le=(0,l.e7)([be.Z],(function(){return null!=ee&&be.Z.isLocalVideoDisabled(ee,(0,p.Z)(u.type))}),[ee,u.type]),ue=function(e,t){var n,r,o=null,i=null,a=null,l=!1,u=!1;switch(e.type){case Zt.fO.ACTIVITY: break;case Zt.fO.USER:o=e.streamId;a=e.voiceState;l=e.speaking;u=e.ringing;break;case Zt.fO.STREAM:o=e.streamId;i=e.stream}return{streamId:o,stream:i,speaking:l,ringing:u,muted:null!==(n=null==a?void 0:a.isVoiceMuted())&&void 0!==n&&n,deafen:null!==(r=null==a?void 0:a.isVoiceDeafened())&&void 0!==r&&r,mirror:e.type===Zt.fO.USER&&e.user.id===t,hasVideo:(0,qt.Z)(e)}}(u,$),ce=ue.speaking,se=ue.muted,fe=ue.deafen,de=ue.ringing,pe=ue.hasVideo,me=(0,l.e7)([be.Z],(function(){return null!=ee&&be.Z.isLocalMute(ee,(0,p.Z)(u.type))}),[ee,u.type]),Oe=u.type===Zt.fO.STREAM&&ee===$,Ee=(0,l.e7)([ie.Z],(function(){return null!=ee?ie.Z.getEffectForUserId(ee):null}));o.useEffect((function(){X(L)}),[L]);var Ce=o.useCallback((function(){null!=ee&&s.Z.toggleLocalMute(ee,Mt.Yn.STREAM)}),[ee]),je=o.useCallback((function(e){null==b||b(u,e)}),[b,u]),Se=o.useCallback((function(e){null==h||h(u,e)}),[h,u]),Ie=o.useCallback((function(e){null==y||y(u,e)}),[y,u]),_e=null,Ne=null,Ae="";switch(u.type){ case Zt.fO.STREAM:_e=(0,r.jsx)(Ft,{participant:u,selected:P,width:j,fit:B,onVideoResize:I,paused:V,inPopout:S,focused:L});Ne=(0,r.jsx)(Ut,{participant:u,selected:P,width:j,focused:L,idle:K});Ae=G.Z.Messages.CALL_TILE_A11Y_LABEL_STREAM.format({streamerName:u.user.username});break;case Zt.fO.USER:_e=(0,r.jsx)($t,{channel:C,inCall:w,participant:u,fit:B,onVideoResize:I,paused:V,selected:P,width:j,blocked:k,noVideoRender:Z,pulseSpeakingIndicator:z});Ae=G.Z.Messages.CALL_TILE_A11Y_LABEL_USER.format({username:u.user.username});break;case Zt.fO.ACTIVITY:_e=(0,r.jsx)(xe.ZP,{interactible:L,participant:u,selected:P,channel:C,width:j});Ae=G.Z.Messages.CALL_TILE_A11Y_LABEL_ACTIVITY.format({activityName:null==te?void 0:te.name});break;case Zt.fO.HIDDEN_STREAM:_e=(0,r.jsx)(Ft,{participant:u,selected:P,width:j,fit:B,onVideoResize:I,paused:V,inPopout:S,focused:L})}var Te,Ze,Me,Re,Le=o.useRef(null);return(0,r.jsx)(f.Z,{section:M.jXE.VOICE_CHANNEL_TILE,children:(0,r.jsx)("div",{ className:a()(Lt().wrapper,tn({},Lt().ringing,de),O),children:(0,r.jsxs)(re.Z,{shakeLocation:J.oZ.VOICE_USER,isShaking:ce,className:Lt().tile,children:[(0,r.jsx)(Pe.Z,{ref:Le,className:a()(Lt().tile,(Me={},tn(Me,Lt().noBorder,A),tn(Me,Lt().noInteraction,null==b),tn(Me,Lt().idle,K),Me)),noBorder:A,style:E,participantUserId:ee,children:(0,r.jsxs)(c.kL8,{"aria-label":Ae,className:Lt().tileChild,onDoubleClick:Se,onContextMenu:Ie,onClick:je,onMouseDown:v,onKeyDown:m,focusProps:{offset:1},children:[u.type===Zt.fO.USER&&null!=ee&&null!=Ee?(0,r.jsx)(he,{voiceChannelEffect:Ee,onComplete:function(){return(0,ie.H)(ee)},userId:ee}):null,u.type===Zt.fO.USER?(0,r.jsx)("div",{className:Lt().voiceChannelEffectsContainer,children:(0,r.jsx)(F,{userId:ee,channelId:C.id,guildId:C.getGuildId(),containerDimensions:{width:null!==(Te=null==Le||null===(n=Le.current)||void 0===n?void 0:n.clientWidth)&&void 0!==Te?Te:0, height:null!==(Ze=null==Le||null===(i=Le.current)||void 0===i?void 0:i.clientHeight)&&void 0!==Ze?Ze:0}})}):null,_e,A?null:(0,r.jsx)("div",{className:Lt().indicators,children:Ne}),P?(0,r.jsx)("div",{className:Lt().selectedScreen,children:(0,r.jsx)(ge.Z,{className:Lt().selectedIcon})}):null,u.type!==Zt.fO.ACTIVITY?(0,r.jsx)(un,{focused:L,width:j,inCall:w,participantType:u.type,hasVideo:null!=pe&&pe,muted:se,deafen:fe,idle:K,title:(0,we.Z)(C,u),blocked:k,localMute:me,localVideoDisabled:le,hideAudioIcon:Oe,onContextMenu:Ie,onToggleMute:Ce,participantUserId:ee}):null,u.type===Zt.fO.USER&&ae?(0,r.jsx)(Y,{userId:u.id,channelId:C.id}):null,w&&!A?(0,r.jsx)("div",{className:a()(Lt().border,(Re={},tn(Re,Lt().voiceChannelEffect,!L&&null!=Ee),tn(Re,Lt().speaking,ce&&!L),Re))}):null]})}),(0,r.jsx)(ne,{isFiring:Q,callTileRef:Le.current})]})})})}));ln.displayName="CallTile";var un=o.memo((function(e){ var t=e.muted,n=e.deafen,o=e.idle,i=e.title,s=e.width,f=e.hasVideo,d=e.inCall,h=e.localMute,y=e.localVideoDisabled,b=e.focused,v=e.blocked,m=e.hideAudioIcon,g=e.participantType,O=e.participantUserId,E=e.onContextMenu,C=e.onToggleMute,j=null,S=null,I=null,_=Tt(s),w=function(e){return e<=124}(s),x=(0,l.e7)([be.Z],(function(){return null!=O&&be.Z.isLocalVideoAutoDisabled(O,(0,p.Z)(g))}),[O,g]);if(!m)if(n||t||h){var P=n?Ee.Z:Ce.Z;j=(0,r.jsx)(P,{foreground:a()(tn({},Lt().localMuteStrikethrough,h&&!n)),className:Lt().status});if(h&&g===Zt.fO.STREAM&&f&&!b){j=(0,r.jsx)(c.ua7,{text:G.Z.Messages.UNMUTE,children:function(e){var t=e.onClick,n=on(e,["onClick"]);return(0,r.jsx)(c.P3F,rn(nn({},n),{onClick:function(e){e.stopPropagation();null==t||t();C()},className:a()(Lt().status,Lt().interactive),children:(0,r.jsx)(_e.Z,{})}))}})}}else if(!h&&g===Zt.fO.STREAM&&f&&!_&&!b){j=(0,r.jsx)(c.ua7,{text:G.Z.Messages.MUTE,children:function(e){var t=e.onClick,n=on(e,["onClick"]);return(0, r.jsx)(c.P3F,rn(nn({},n),{onClick:function(e){e.stopPropagation();null==t||t();C()},className:a()(Lt().status,Lt().interactive,Lt().toggleMute),children:(0,r.jsx)(Ie.Z,{})}))}})}d&&be.Z.supports(Mt.AN.VIDEO)||!f?d&&f&&y&&!x&&(S=(0,r.jsx)(Oe.Z,{className:Lt().status,foreground:Lt().localMuteStrikethrough})):S=(0,r.jsx)(ge.Z,{className:Lt().status});if(g===Zt.fO.STREAM&&!b&&f){I=(0,r.jsx)(c.ua7,{text:G.Z.Messages.OPTIONS,children:function(e){var t=e.onClick,n=on(e,["onClick"]);return(0,r.jsx)(c.P3F,rn(nn({},n),{onClick:function(e){e.stopPropagation();null==t||t();E(e)},className:a()(Lt().status,Lt().interactive),children:(0,r.jsx)(Se.Z,{})}))}})}return(0,r.jsxs)("div",{className:Lt().overlayContainer,children:[(0,r.jsx)("div",{className:a()(Lt().overlayTop,tn({},Lt().small,s<195)),children:x?o?(0,r.jsx)(Oe.Z,{className:Lt().status}):(0,r.jsxs)("div",{className:a()(Lt().overlayTitle,Lt().videoDisabledTitle),children:[(0,r.jsx)(Oe.Z,{className:Lt().status}),(0,r.jsx)(c.xvT,{ variant:"text-sm/normal",className:Lt().overlayTitleText,children:G.Z.Messages.UNSTABLE_CONNECTION})]}):null}),(0,r.jsxs)("div",{className:a()(Lt().overlayBottom,tn({},Lt().small,s<195)),children:[w?(0,r.jsx)("div",{}):(0,r.jsxs)(c.xvT,{className:a()(Lt().overlayTitle,tn({},Lt().idle,o)),color:"none",variant:"text-md/normal",children:[v?(0,r.jsx)("div",{className:Lt().blocked,children:(0,r.jsx)(me.Z,{className:Lt().blockedIcon,color:u.Z.unsafe_rawColors.RED_400.css})}):null,g===Zt.fO.STREAM&&(0,r.jsx)(je.Z,{className:Lt().titleIcon}),null!=i&&""!==i?(0,r.jsx)("span",{className:Lt().overlayTitleText,children:i}):null]}),(0,r.jsxs)("div",{className:Lt().statusContainer,children:[S,j,I]})]})]})}));un.displayName="CallTileOverlay";var cn=ve.L;const sn=ln},270662:(e,t,n)=>{"use strict";n.d(t,{NZ:()=>Mt,ZP:()=>kt,r:()=>Zt}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(441143),u=n.n(l),c=n(248088),s=n(202351),f=n(707961),d=n(656645),p=n(842629),h=n(481008),y=n(213276),b=n(26468),v=n(859853),m=n(258104),g=n(555086),O=n(153686),E=n(19585),C=n(566706),j=n(400572),S=n(666305),I=n(496388),_=n(668269),w=n(958481),x=n(409125),P=n(122590),N=n(306263),A=n(866926),T=n(371607),Z=n(201441),M=n(575907),R=n(732068),L=n(61209),D=n(419348),k=n(127661),U=n(382840),B=n(242735),F=n(877116),G=n(852221),H=n(473708),V=n(874721),W=n.n(V);function z(e){var t=e.guildId,n=e.channelId,o=e.onClick,i=(0,b.bp)(),a=(0,Z.qY)(n),l=(0,s.e7)([L.Z],(function(){return L.Z.getChannel(n)}),[n]),u=(0,G.o)(t,l);if(null==a)return null;var c=function(){null!=l&&(0,F.Z)(l)?(0,U.lC)(l,i):o()},d=function(){B.Z.endEvent(a.id,a.guild_id)};return u?(0,r.jsx)(f.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(f.v2r,{navId:"exit-options",onSelect:function(){},"aria-label":H.Z.Messages.DISCONNECT_MENU, onClose:t,children:(0,r.jsx)(f.sNh,{id:"end-voice-event",color:"danger",action:d,label:H.Z.Messages.END_EVENT,icon:k.Z})})})},align:"center",position:"top",animation:f.yRy.Animation.FADE,children:function(e){var t=e.onClick;return(0,r.jsx)(R.d,{label:H.Z.Messages.DISCONNECT_SELF,color:"red",iconComponent:D.Z,onClick:c,onPopoutClick:t,className:W().buttonSpacing})}}):(0,r.jsx)(R.d,{className:W().buttonSpacing,label:H.Z.Messages.DISCONNECT_SELF,color:"red",iconComponent:D.Z,onClick:o})}var Y=n(311569),K=n(636398),q=n(997244),Q=n(189865);function X(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function J(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)} return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function $(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ee(e){var t=e.channel,n=$(e,["channel"]);return(0,r.jsx)(R.d,J(function(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function ce(e){var t=e.hasPermission,n=e.centerButton,o=void 0!==n&&n,i=ue(e,["hasPermission","centerButton"]),a=o?R.d:R.Z,l=t?H.Z.Messages.SHARE_YOUR_SCREEN:H.Z.Messages.ACTIVITY_PANEL_GO_LIVE_TOOLTIP_NO_PERMISSION_IN_VOICE;return(0,r.jsx)(a,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function tt(e){var t,n=e.isActivityActive,o=et(e,["isActivityActive"]);(0,s.e7)([Je.Z],(function(){return Je.Z.getIsEnabled()}),[])&&(t="yellow");return(0,r.jsx)(R.d,function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0}))}))}({channelId:t.id}),O=!u&&n,C=o.useCallback((function(e){"focus"!==e.type&&h()}),[h]),j=(0,Ce.O)(),S=(0,b.bp)()===Ue.IlC.POPOUT,I=(0,E.Z)().analyticsLocations,_=o.useCallback((function(){(0,ke.Z)({channel:t,guildId:t.guild_id,locationObject:j.location,openInPopout:S,analyticsLocations:I})}),[j.location,I,t,S]),w=[];n&&!u&&w.push(Ee.z$.ACTIVITIES_MINI_SHELF_SPARKLES);(0,_e.Z)(t.id)&&!u&&w.push(Ee.z$.ACTIVITY_GDM_ROCKET_SPARKLE);return(0,r.jsx)(Qe.Z,{contentTypes:w,children:function(e){var n=e.visibleContent,o=e.markAsDismissed;return(0,r.jsx)(f.yRy,{shouldShow:d,animationPosition:"bottom",position:"bottom",align:"center",spacing:16,onRequestClose:function(){p(!1)},renderPopout:function(e){var n=e.closePopout;return O?(0,r.jsx)(Ke,{channel:t,closePopout:n,onMouseEnter:h,onMouseLeave:y,isHovered:d,onClick:o}):(0,r.jsx)(r.Fragment,{})},children:function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tt,{disabled:u,label:O?void 0:l,isActivityActive:g||d, className:st().controlButton,onClick:function(){_();n!==Ee.z$.ACTIVITIES_MINI_SHELF_SPARKLES&&n!==Ee.z$.ACTIVITY_GDM_ROCKET_SPARKLE||o()},onMouseEnter:C,onMouseLeave:y}),v?(0,r.jsx)(qe.A,{top:4,right:10,size:12,maskColor:qe.T.BLACK}):null,function(){switch(n){case Ee.z$.ACTIVITIES_MINI_SHELF_SPARKLES:case Ee.z$.ACTIVITY_GDM_ROCKET_SPARKLE:return(0,r.jsx)(ut,{});default:return null}}()]})}})}})}var dt=n(73407),pt=n(761449),ht=n(986279),yt=n(957430);const bt=function(e){var t=e.isHovered,n=e.closePopout,i=e.onMouseEnter,a=e.onMouseLeave,l=e.onFocus,u=e.channel;o.useEffect((function(){t||n()}),[n,t]);return(0,r.jsx)(M.Z,{children:(0,r.jsx)("div",{onMouseEnter:i,onMouseLeave:a,children:(0,r.jsx)(yt.Z,{channel:u,closePopout:n,onFocus:l})})})};function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,E=o.useCallback((function(e){"focus"!==e.type&&(y||O||c())}),[y,O,c]),C=o.useCallback((function(){y||d()}),[d,y]),j=o.useCallback((function(e,t){p();b(!y);l&&!y||null==t||t(e)}),[p,y,l]),S=l||y;return(0,r.jsx)(f.yRy,{shouldShow:S,animationPosition:"bottom",position:"bottom",align:"center",spacing:16,onRequestClose:function(){u(!1);b(!1)},renderPopout:function(e){var n=e.closePopout;return(0,r.jsx)(bt,{isHovered:S,channel:t,closePopout:n,onMouseEnter:c,onMouseLeave:C,onFocus:function(){return b(!0)}})},children:function(e){var t=e.onClick,o=e.onKeyDown;return(0,r.jsx)(pt.Z,{isCenterButton:!0,totalCooldownSeconds:m,remainingCooldownSeconds:g,className:a()(st().controlButton,n),onKeyDown:function(e){return function(e,t){e.keyCode===Ue.yXg.ENTER&&e.keyCode===Ue.yXg.SPACE&&j(e,t)}(e,o)},onClick:function(e){ return function(e,t){j(e,t)}(e,t)},onMouseEnter:E,onMouseLeave:C,isActive:S})}})};var Ot,Et=n(740106),Ct=n(289261),jt=n(665435),St=n(537077),It=n(904333),_t=n(358500);function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function Tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return ;if("string"==typeof e)return wt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(e,t){if(pe.Z.isVideoEnabled()!==e){var n=function(){return d.Z.setVideoEnabled(e)};e?(0,It.Z)(n,t):n()}}function Mt(e){var t=e.channel,n=e.currentUser,i=e.exitFullScreen,a=e.canGoLive,l=e.hasPermission,u=e.disabled,c=(0,b.bp)(),d=(0,s.Wu)([fe.Z],(function(){return fe.Z.getAllActiveStreams()})).find((function(e){return e.ownerId===n.id})),p=t.getGuildId(),h=o.useCallback((function(){null==i||i();if(!a)return(0,jt.Z)();(0,St.Z)(p,t.id,Ue.ZY5.GUILD_CHANNEL)}),[p,t.id,a,i]),y=null!=d;return(0,r.jsx)(K.Z,{children:(0,r.jsx)(f.yRy,{ renderPopout:function(e){var o=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(Et.Z,{channel:t,currentUser:n,activeStreams:null!=d?[d]:[],handleGoLive:h,onClose:o,appContext:c})})},position:"top",align:"center",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=At(e,["onClick"]),i=t.isShown;return(0,r.jsx)("div",{children:null!=d?(0,r.jsx)(ie.Z,Nt(Pt({},o),{centerButton:!0,className:st().controlButton,onClick:function(){return(0,T.Z)(d)},isSelfStream:!0,onPopoutClick:y?n:null,popoutOpen:i,shouldShowTooltip:!i})):(0,r.jsx)(ce,Nt(Pt({},o),{centerButton:!0,className:st().controlButton,hasPermission:l,onClick:a?h:jt.Z,onPopoutClick:y?n:null,popoutOpen:i,shouldShowTooltip:!i,disabled:u}))})}})})}function Rt(e){var t=e.channel,n=t.getGuildId();return(0,g.Z)(n,t.id)?(0,r.jsx)("div",{className:st().buttonContainer,children:(0,r.jsx)(ft,{channel:t})}):null}!function(e){e.ACTIVITY="ACTIVITY";e.STREAM="STREAM";e.CALL="CALL";e.EVENT="EVENT"}(Ot||(Ot={})) ;var Lt=o.memo((function(e){var t=e.connectedActivityApplicationId,n=e.currentUser,i=e.onDisconnectCall,a=e.channel,l=(0,s.e7)([C.Z],(function(){return C.Z.getSelectedParticipant(a.id)})),u=o.useContext(v.S).reducedMotion,d=Tt(o.useState(!1),2),y=d[0],b=d[1],m=null==l?void 0:l.id,g=(0,s.e7)([fe.Z],(function(){return null!=m?fe.Z.getActiveStreamForStreamKey(m):null}),[m]),O=(null==l?void 0:l.type)===_t.fO.STREAM&&null!=g&&g.ownerId!==(null==n?void 0:n.id),E=(0,s.Wu)([fe.Z],(function(){return fe.Z.getAllActiveStreamsForChannel(a.id).filter((function(e){return e.ownerId!==(null==n?void 0:n.id)}))})),j=(0,Z.qY)(a.id),S=o.useCallback((function(){return(null==l?void 0:l.type)===_t.fO.ACTIVITY&&l.id===t?Ot.ACTIVITY:O?Ot.STREAM:null!=j?Ot.EVENT:Ot.CALL}),[l,t,O,j]),I=Tt(o.useState(S()),2),_=I[0],w=I[1],x=(0,c.useSpring)({opacity:y?.2:1,transform:y&&!u.enabled?"scale(0.7)":"scale(1)",config:{mass:2,tension:y?600:1e3,friction:45,precision:.01,clamp:y},onRest:function(){w(S());b(!1)}}) ;o.useEffect((function(){S()!==_&&b(!0)}),[_,S]);var P=function(e,t){var o={centerButton:!0,className:st().controlButton,popoutOpen:e};switch(_){case Ot.ACTIVITY:if(null==l||null==n)return;return(0,r.jsx)(ne.Z,Nt(Pt({},o),{applicationId:l.id,color:"red",channelId:a.id,onPopoutClick:E.length>0?t:null}));case Ot.STREAM:return(0,r.jsx)(ie.Z,Nt(Pt({},o),{color:"red",onClick:function(){if(null!=g)(0,h.g)((0,N.V9)(g));else{var e=!0,t=!1,n=void 0;try{for(var r,o=E[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;(0,h.g)((0,N.V9)(i))}}catch(e){t=!0;n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}},onPopoutClick:E.length>1?t:null,isSelfStream:!1}));case Ot.CALL:return(0,r.jsx)(re.Z,Nt(Pt({},o),{color:"red",onClick:function(){p.default.disconnect();null==i||i()},onPopoutClick:E.length>0?t:null}));case Ot.EVENT:return(0,r.jsx)(z,{guildId:a.guild_id,channelId:a.id,onClick:function(){p.default.disconnect();null==i||i()}})}};return(0,r.jsx)(f.yRy,{ renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(Et.Z,{channel:a,currentUser:n,activeStreams:E,handleGoLive:Ue.VqG,hideSelfOptions:!0,onClose:t})},position:"top",align:"center",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(c.animated.div,{style:x,children:P(o,n)})}})}));function Dt(e){var t=e.channel,n=e.cameraUnavailable,i=e.hasCameraPermission,l=e.currentUser,u=(0,b.bp)(),c=(0,me.Z)(t),f=c.reachedLimit,d=c.limit,h=o.useCallback((function(){(0,It.Z)((function(){return p.default.selectVoiceChannel(t.id,!0)}),u)}),[t.id,u]),y=o.useCallback((function(){p.default.selectVoiceChannel(t.id,!1)}),[t.id]),v=o.useCallback((function(){n?(0,Ct.Z)():h()}),[n,h]),m=(0,s.e7)([de.Z],(function(){var e=de.Z.getCall(t.id);return!0===(null==e?void 0:e.ringing.includes(l.id))}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(se.C,{enabled:!0,centerButton:!0,join:!0,color:"green",channelLimitReached:f,channelLimit:d,channel:t, cameraUnavailable:n,hasPermission:i,onCameraUnavailable:v,className:st().controlButton,iconClassName:st().joinIcon,onChange:h}),(0,r.jsx)(te.Z,{centerButton:!0,color:"green",channel:t,className:a()(st().controlButton,st().lastButton),onClick:y}),m?(0,r.jsx)(ee,{color:"red",channel:t,className:st().controlButton}):null]})}const kt=(0,w.Z)((function(e){var t,n=e.channel,o=e.className,i=e.onDisconnectCall,l=e.exitFullScreen,c=(0,s.e7)([ye.default],(function(){var e=ye.default.getCurrentUser();u()(null!=e,"CenterControlTray: currentUser cannot be undefined");return e})),d=(0,ve.Z)(),p=d.cameraUnavailable,h=d.enabled,b=(0,ge.Z)(n),v=(0,Oe.Z)(n),g=v.suppress,C=v.selfMute,w=v.mute,N=(0,s.cj)([pe.Z],(function(){return{canGoLive:(0,A.Z)(pe.Z)}})).canGoLive,T=(0,P.Z)(),Z=(0,s.e7)([x.Z],(function(){return null!=x.Z.getAwaitingRemoteSessionInfo()})),R=null!=T,L=(0,s.e7)([he.Z],(function(){return(null!==(t=null==T?void 0:T.channelId)&&void 0!==t?t:he.Z.getVoiceChannelId())===n.id})),D=(0, j.Z)(n,!0),k=(0,s.e7)([m.ZP],(function(){var e=m.ZP.getSelfEmbeddedActivityForChannel(n.id);return null!=e?e.application_id:null})),U=(0,me.Z)(n),B=U.reachedLimit,F=U.limit,G=(0,E.Z)(O.Z.VOICE_CONTROL_TRAY).AnalyticsLocationProvider;if(!L)return(0,r.jsx)(G,{children:(0,r.jsx)(Dt,{channel:n,cameraUnavailable:p,hasCameraPermission:b,currentUser:c})});var H=be.ZP.can({permission:Ue.Plq.ADD_REACTIONS,user:c,context:n})&&!n.isPrivate()&&!D;return(0,r.jsx)(G,{children:(0,r.jsxs)(y.Z,{section:Ue.jXE.VOICE_CONTROL_TRAY,children:[(0,r.jsx)("div",{className:st().eventPromptsContainer,children:(0,r.jsx)(Y.Z,{guildId:n.guild_id,channelId:n.id})}),(0,r.jsxs)("div",{className:a()(st().wrapper,o),children:[!R&&(0,r.jsx)(f.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(I.Z,{onClose:t})})},position:"top",align:"center",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(se.C,{centerButton:!0,hasPermission:b, className:st().controlButton,enabled:h,cameraUnavailable:p,onChange:Zt,onCameraUnavailable:Ct.Z,channelLimitReached:B,channelLimit:F,popoutOpen:o,onPopoutClick:n})}}),!R&&(0,r.jsx)(Rt,{channel:n}),!R&&(0,r.jsx)(Mt,{channel:n,currentUser:c,exitFullScreen:l,canGoLive:N,hasPermission:b}),(0,r.jsx)(f.yRy,{renderPopout:function(e){var t=e.closePopout;return(0,r.jsx)(M.Z,{children:(0,r.jsx)(S.default,{onClose:t,renderInputDevices:!0,renderOutputDevices:!0,renderInputModes:!0})})},align:"center",position:"top",animation:f.yRy.Animation.FADE,children:function(e,t){var n=e.onClick,o=t.isShown;return(0,r.jsx)(oe.Z,{centerButton:!0,onPopoutClick:R?null:n,className:st().controlButton,selfMute:C,serverMute:w,suppress:g,popoutOpen:o,awaitingRemote:Z,onClick:function(){return(0,_.Z)(w,g)}})}}),H&&!R?(0,r.jsx)("div",{className:st().buttonContainer,children:(0,r.jsx)(gt,{channel:n})}):null,(0,r.jsx)(Lt,{connectedActivityApplicationId:k,currentUser:c,channel:n,onDisconnectCall:i})]})]})})}))}, 173388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(441143),l=n.n(a),u=n(202351),c=n(707961),s=n(269300),f=n(427054),d=n(567403),p=n(682776),h=n(2590),y=n(473708),b=n(459595),v=n.n(b);function m(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){m(i,r,o,a,l,"next",e)}function l(e){m(i,r,o,a,l,"throw",e)}a(void 0)}))}}function O(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function E(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var S=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>h});var r=n(785893),o=(n(667294),n(503857)),i=n(294184),a=n.n(i),l=n(707961),u=n(265367),c=n(636398),s=n(471870),f=n.n(s);function d(e){var t=e.errorMessage,n=e.className;return(0,r.jsx)(l.DY3,{className:a()(n,f().root),text:t,position:"bottom",color:l.FGA.GREY,children:(0,r.jsx)(c.Z,{children:(0,r.jsx)(u.Z,{"aria-label":null!=t?t:"",className:f().warningIcon})})})}var p=n(440031);function h(e){var t=e.participant,n=e.className,i=function(e){return null==e?null:p.Z.isDeveloper?"".concat(e.message," (").concat(e.errorType,")"):e.message}((0,o.Z)(t));return null!=i?(0,r.jsx)(d,{className:n,errorMessage:i}):null}},575907:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(785893),o=n(667294),i=n(636398);function a(e){var t=e.children,n=(0,i.Y)("popup"),a=n.preventIdle,l=n.allowIdle;o.useEffect((function(){a();return function(){return l()}}),[l,a]);return(0,r.jsx)(r.Fragment,{children:t})}},299836:(e,t,n)=>{"use strict";n.d(t,{z:()=>M,Z:()=>L}) ;var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(248088),c=n(202351),s=n(707961),f=n(744564),d=n(247250),p=n(665472),h=n(908741),y=n(804808),b=n(550131),v=n(513586),m=n(600277),g=n(598123),O=n(840922),E=n(763536),C=n(775173),j=n(72580),S=n(463473),I=n(2590),_=n(939198),w=n(832684),x=n.n(w);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?M.map((function(e){return(0,r.jsx)(m.ZP,{className:x().sticker,size:128,sticker:e,isInteracting:g},e.id)})):null;return(0,r.jsxs)(s.P3F,{className:x().toast,onMouseEnter:function(){j(!0)},onMouseLeave:function(){j(!1)},onClick:S,children:[(0,r.jsxs)("div",{className:a()(x().messageContentWrapper,N({},x().mentioned,n.mentioned)),children:[null!==(t=null!=T?T:R)&&void 0!==t?t:(0,r.jsx)("span",{children:P}),null!=R?null:Z]}),(0,r.jsx)("img",{alt:"",src:null!=(null==l?void 0:l.guildMemberAvatar)&&null!=u?(0, C.JM)({guildId:u,userId:n.author.id,avatar:l.guildMemberAvatar}):n.author.getAvatarURL(u,32),className:x().avatar})]})}function L(e){var t=e.channelId,n=e.className,i=A(o.useState(!1),2),s=i[0],d=i[1],p=function(e){var t,n=e.channelId,r=e.isFrozen,i=e.count,a=e.lingerMs,l=A(o.useState([]),2),u=l[0],s=l[1],d=A(o.useState(!1),2),p=d[0],h=d[1],y=o.useRef(null),b=o.useRef(),v=o.useCallback((function(){s([]);h(!0)}),[]);o.useEffect((function(){var e=function(e){var t=e.channelId,r=e.message;if(t===n&&r.type!==I.uaV.STAGE_START&&r.type!==I.uaV.STAGE_END&&r.type!==I.uaV.STAGE_TOPIC&&r.type!==I.uaV.STAGE_SPEAKER&&r.type!==I.uaV.STAGE_RAISE_HAND){clearTimeout(b.current);b.current=setTimeout(v,a);s((function(e){return T(e).concat([r.id])}))}};f.Z.subscribe("MESSAGE_CREATE",e);return function(){f.Z.unsubscribe("MESSAGE_CREATE",e)}}),[n,v,i,a]);o.useEffect((function(){return function(){clearTimeout(b.current)}}),[]);o.useEffect((function(){u.length>3&&s((function(e){var t=e.length-3 ;return T(e.slice(t))}))}),[u]);r&&null==y.current?y.current=u:r||null==y.current||(y.current=null);var m=null!==(t=y.current)&&void 0!==t?t:u;return{toastsHidden:p,toastMessages:(0,c.Wu)([g.Z],(function(){return m.map((function(e){return g.Z.getMessage(n,e)}))}),[m]).filter(j.lm)}}({channelId:t,isFrozen:s,count:3,lingerMs:M}),h=p.toastsHidden,y=p.toastMessages,b=o.useRef({}),v=A(o.useState({}),2),m=v[0],O=v[1],E=o.useCallback((function(e,t){null==t?delete b.current[e]:b.current[e]=t}),[]);o.useLayoutEffect((function(){var e={},t=0,n=!0,r=!1,o=void 0;try{for(var i,a=y[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u,c=i.value,s=null!==(u=b.current[c.id])&&void 0!==u?u:0;e[c.id]=t;t+=s+8}}catch(e){r=!0;o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}(0,l.isEqual)(e,m)||O(e)}),[y]);var C=y.map((function(e){return{message:e,height:b.current[e.id],y:m[e.id]}})),_=(0,u.useTransition)(C,{keys:function(e){return e.message.id},from:function(){return{opacity:0}}, enter:function(e){return{opacity:1,translateY:e.y}},update:function(e){return{translateY:e.y}},leave:function(e){var t=e.height,n=e.y;return{opacity:0,translateY:h?n:-(null!=t?t:0)-8,pointerEvents:"none"}}});return(0,r.jsx)("div",{className:a()(n,(0,S.Q)(I.BRd.DARK)),onMouseEnter:function(){d(!0)},onMouseLeave:function(){d(!1)},children:_((function(e,t){return(0,r.jsx)(u.animated.div,{ref:function(e){return E(t.message.id,null!=e?e.offsetHeight:null)},className:x().toastWrapper,style:e,children:(0,r.jsx)(R,{message:t.message})})}))})}},729139:(e,t,n)=>{"use strict";n.d(t,{e:()=>r,Z:()=>y});var r,o=n(785893),i=(n(667294),n(294184)),a=n.n(i),l=n(107364),u=n(419375),c=n(817333),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}!function(e){e[e.TOP=0]="TOP";e[e.BOTTOM=1]="BOTTOM"}(r||(r={}));function h(e){var t=e.disableGradients,n=void 0!==t&&t,i=e.renderHeader,a=e.renderBottomLeft,u=e.renderBottomCenter,c=e.renderBottomRight,f=e.renderCenter,d=n===r.TOP||!0===n,p=n===r.BOTTOM||!0===n;return(0,o.jsxs)("div",{className:s().videoControls,children:[!d&&(0,o.jsx)("div",{className:s().gradientTop}),!p&&(0,o.jsx)("div",{ className:s().gradientBottom}),(0,o.jsx)("div",{className:s().topControls,children:null==i?void 0:i()}),null==f?void 0:f(),(0,o.jsxs)("div",{className:s().bottomControls,children:[(0,o.jsx)(l.Z,{grow:0,shrink:1,basis:"50%",align:l.Z.Align.CENTER,children:null==a?void 0:a()}),(0,o.jsx)(l.Z,{grow:1,justify:l.Z.Justify.CENTER,align:l.Z.Align.CENTER,children:null==u?void 0:u()}),(0,o.jsx)(l.Z,{grow:0,shrink:1,justify:l.Z.Justify.END,basis:"50%",align:l.Z.Align.CENTER,children:null==c?void 0:c()})]})]})}function y(e){var t=e.screenMessage,n=e.onDoubleClick,r=e.onActive,i=e.onForceIdle,l=e.idle,c=e.children,y=e.renderChatButton,b=e.renderChatToasts,v=e.renderVoiceChannelEffects,m=e.style,g=p(e,["screenMessage","onDoubleClick","onActive","onForceIdle","idle","children","renderChatButton","renderChatToasts","renderVoiceChannelEffects","style"]);return(0,o.jsxs)("div",{className:a()(s().root,f({},s().idle,l)),style:m,onMouseMove:r,onMouseDown:r,onMouseLeave:i,onDoubleClick:n, children:[c,null!=t?(0,o.jsx)(u.Z,d({size:"large"},t)):null,(0,o.jsx)(h,d({},g)),null==y?void 0:y({className:s().chatButton,showingClassName:s().chatButtonShowing}),null==b?void 0:b(),null==v?void 0:v()]})}},372417:(e,t,n)=>{"use strict";n.d(t,{T:()=>A});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(468811),c=n.n(u),s=n(202351),f=n(707961),d=n(247250),p=n(566706),h=n(717091),y=n(715107),b=n(788169),v=n(194212),m=n(299836),g=n(732068),O=n(2590),E=n(473708),C=n(919776),j=n.n(C);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e) ;for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0){i.push(r.value);if(t&&i.length===t)break}}catch(e){l=!0;o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()} function x(e){var t=(0,s.e7)([b.Z],(function(){return!(0,l.isEmpty)(b.Z.getTypingUsers(e))}),[e]),n=(0,s.e7)([y.Z],(function(){return y.Z.getVoiceChannelId()===e}),[e]),r=(0,s.cj)([h.ZP],(function(){return{unreadCount:h.ZP.getUnreadCount(e),mentionCount:h.ZP.getMentionCount(e)}}),[e]);return{unreadCount:r.unreadCount,mentionCount:r.mentionCount,voiceChannelIsSelected:n,isTyping:t}}function P(e){var t=e.width,n=void 0===t?24:t,i=e.height,a=void 0===i?24:i,l=e.isBadged,u=void 0!==l&&l,s=e.isTyping,d=void 0!==s&&s,p=w(o.useState((function(){return c().v4()})),1)[0];return(0,r.jsxs)("svg",{width:n,height:a,viewBox:"0 0 24 24",children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("mask",{id:p,children:[(0,r.jsx)("rect",{fill:"white",width:"100%",height:"100%"}),d&&(0,r.jsx)("g",{fill:"black",transform:"translate(5.5, 8.5) scale(".concat(11/24,")"),children:(0,r.jsx)(f.IJ0,{dotRadius:3.5,spacing:3,fill:"black"})}),u&&(0,r.jsx)("circle",{cx:"20",cy:"19",r:"10",fill:"black"})]})}),(0,r.jsx)("path",{ fill:"currentColor",d:"M4.79805 3C3.80445 3 2.99805 3.8055 2.99805 4.8V15.6C2.99805 16.5936 3.80445 17.4 4.79805 17.4H7.49805V21L11.098 17.4H19.198C20.1925 17.4 20.998 16.5936 20.998 15.6V4.8C20.998 3.8055 20.1925 3 19.198 3H4.79805Z",mask:"url(#".concat(p,")")})]})}function N(e){var t,n=e.className,o=x(e.channelId),i=o.unreadCount,l=o.mentionCount,u=o.isTyping,c=null!=l&&l>0,s=null!==(t=c?l:i)&&void 0!==t?t:0,d=s>99?"99+":s,p=o.voiceChannelIsSelected&&null!=i&&i>0;return(0,r.jsxs)("div",{className:a()(j().chatIcon,n),children:[(0,r.jsx)(P,{isBadged:p,isTyping:u}),p&&(0,r.jsx)(f.xvT,{className:a()(j().unreadCount,I({},j().mention,c)),variant:"text-xs/normal",children:d})]})}function A(e){ var t=e.channelId,n=e.className,i=e.showingClassName,l=e.onClick,u=e.inPopout,c=e.showRequestToSpeakSidebar,f=e.toggleRequestToSpeakSidebar,h=_(e,["channelId","className","showingClassName","onClick","inPopout","showRequestToSpeakSidebar","toggleRequestToSpeakSidebar"]),y=h.disabled,b=o.useRef(null),C=(0,s.e7)([p.Z],(function(){return p.Z.getChatOpen(t)}),[t]),j=function(e){var t=x(e),n=t.unreadCount,r=t.mentionCount,i=t.isTyping,a=w(o.useState(!1),2),l=a[0],u=a[1];o.useEffect((function(){u(n>0);var e=setTimeout((function(){u(!1)}),m.z);return function(){clearTimeout(e);u(!1)}}),[n]);return{isShowing:l||r>0||i,unreadCount:n,mentionCount:r}}(t),S=j.isShowing,P=j.unreadCount,A=j.mentionCount,T=o.useCallback((function(){null==l||l();!C&&c&&(null==f||f());d.Z.updateChatOpen(t,!C)}),[t,C,l,c,f]),Z=o.useCallback((function(e){var n=e.className;return(0,r.jsx)(N,{className:n,channelId:t})}),[t]),M=o.useCallback((function(){var e;null===(e=b.current)||void 0===e||e.focus()}),[]);(0,v.yp)({ event:O.CkL.FOCUS_CHAT_BUTTON,handler:y?null:M});var R,L=w(o.useState(!1),2),D=L[0],k=L[1],U=o.useCallback((function(){u&&k(!0)}),[u]);(0,v.yp)({event:O.CkL.SHOW_TEXT_IN_VOICE_POPOUT_COMING_SOON_TIP,handler:U});o.useEffect((function(){var e;D&&(e=setTimeout((function(){k(!1)}),3e3));return function(){clearTimeout(e)}}),[D]);var B=[R=u&&y?E.Z.Messages.TEXT_IN_VOICE_POPOUT_DISABLED:C?E.Z.Messages.VIDEO_CALL_HIDE_CHAT:E.Z.Messages.VIDEO_CALL_SHOW_CHAT];A>0&&B.push(E.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_MENTIONS.format({mentionCount:A}));P>0&&B.push(E.Z.Messages.GUILD_SIDEBAR_CHANNEL_A11Y_LABEL_UNREAD);return(0,r.jsx)(g.Z,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(186440)),i=n(732068),a=n(473708);function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(){u=Object.assign||function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(248088)),i=n(781453),a=n(732068),l=n(473708),u=n(553858),c=n.n(u);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var h=(0,o.animated)((function(e){var t=e.className,n=e.percentComplete,o=52;return(0,r.jsx)("svg",{className:t,width:o,height:o,viewBox:"0 0 ".concat(o," ").concat(o),children:(0,r.jsx)("circle",{style:{strokeDashoffset:100*n},className:c().progress,cx:26,cy:26,r:20,fill:"none",stroke:"#4F545C",pathLength:"100"})})}));function y(e){ var t=e.totalCooldownSeconds,n=e.remainingCooldownSeconds,u=e.onClick,s=e.onKeyDown,y=e.onMouseEnter,b=e.onMouseLeave,v=e.isActive,m=void 0!==v&&v,g=e.isCenterButton,O=void 0!==g&&g,E=p(e,["totalCooldownSeconds","remainingCooldownSeconds","onClick","onKeyDown","onMouseEnter","onMouseLeave","isActive","isCenterButton"]),C=n>0,j=(0,o.useSpring)({percentComplete:0!==n?(t-n)/t:0,config:d(f({},o.config.molasses),{duration:1e3})}),S=C?l.Z.Messages.VOICE_CHANNEL_EFFECTS_COOLDOWN.format({seconds:n}):void 0,I=O?a.d:a.Z;return(0,r.jsxs)("div",{className:c().container,children:[(0,r.jsx)(I,d(f({},E),{disabled:C,label:S,iconComponent:i.Z,onClick:u,onKeyDown:s,onMouseEnter:y,onMouseLeave:b,isActive:m,grow:!1})),C?(0,r.jsx)(h,{className:c().countdown,percentComplete:j.percentComplete}):null]})}},427054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=(n(667294),n(441143)),i=n.n(o),a=n(202351),l=n(707961),u=n(26468),c=n(567403),s=n(682776),f=n(226919),d=n(732068),p=n(2590),h=n(473708) ;function y(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,l,"next",e)}function l(e){y(i,r,o,a,l,"throw",e)}a(void 0)}))}}function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1, r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(164760)),i=n(732068),a=n(473708);function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o }(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function s(e){var t=e.channel,n=e.centerButton,s=void 0!==n&&n,f=c(e,["channel","centerButton"]),d=s?i.d:i.Z,p=t.isManaged()||!t.isPrivate()?a.Z.Messages.CONNECT:a.Z.Messages.JOIN_CALL;return(0,r.jsx)(d,u(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(180306)),i=n(961241),a=n(554647),l=n(732068),u=n(783240),c=n.n(u);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0, writable:!0}):e[t]=n;return e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function d(e){var t=e.className;return(0,r.jsx)(a.Z,{foreground:c().slash,className:t})}function p(e){var t=e.selfMute,n=e.serverMute,a=e.suppress,u=e.centerButton,c=void 0!==u&&u,p=e.awaitingRemote,h=f(e,["selfMute","serverMute","suppress","centerButton","awaitingRemote"]),y=t||n||a,b=c?l.d:l.Z,v=(0,o.Z)(t,n,a,p),m=y?d:i.Z;return(0,r.jsx)(b,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>s});var r=n(785893),o=(n(667294),n(467853)),i=n(552675),a=n(732068),l=n(473708);function u(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function s(e){var t=e.popoutWindowAlwaysOnTop,n=e.onToggleStayOnTop,s=c(e,["popoutWindowAlwaysOnTop","onToggleStayOnTop"]),f=t?l.Z.Messages.POPOUT_REMOVE_FROM_TOP:l.Z.Messages.POPOUT_STAY_ON_TOP,d=t?i.Z:o.Z;return(0, r.jsx)(a.Z,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>y});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(202351),l=n(656645),u=n(736097),c=n(474993),s=n(615457),f=n(120415),d=n(636398),p=n(817374),h=n.n(p);const y=a.ZP.connectStores([u.Z],(function(e){var t=e.userId,n=e.context;return{currentVolume:u.Z.getLocalVolume(t,n),muted:u.Z.isLocalMute(t,n)}}))((function(e){var t=e.className,n=e.iconClassName,o=e.sliderClassName,a=e.userId,u=e.currentVolume,p=e.muted,y=e.context,b=e.currentWindow,v=void 0===b?window:b;return(0,r.jsx)(d.Z,{children:(0,r.jsx)(c.Z,{currentWindow:v, iconClassName:i()(n,h().controlIcon),sliderClassName:o,className:t,value:(0,s.P)(u),muted:p,maxValue:f.FB?200:100,onValueChange:function(e){return function(e,t,n,r){e>0&&n&&l.Z.toggleLocalMute(t,r);l.Z.setLocalVolume(t,(0,s.A)(e),r)}(e,a,p,y)},onToggleMute:function(){return function(e,t){l.Z.toggleLocalMute(e,t)}(a,y)}})})}))},242942:(e,t,n)=>{"use strict";n.d(t,{yX:()=>E,Lx:()=>w,kq:()=>j});var r=n(496486),o=n(281110),i=n(744564),a=n(396043),l=n(61209),u=n(563367),c=n(671723),s=n(715107),f=n(652591),d=n(2590),p=n(203600);var h=n(797815),y=n(38004),b=n(986279),v=n(143692),m=n(460214);function g(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function O(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}var E,C=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)}, "function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{H:()=>C,Z:()=>T});var r=n(496486),o=n(202351),i=n(445316),a=n(744564),l=n(285629),u=n(358500);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=20){ var t=j[j.length-1],n=e.getTime()-t.getTime();nu.e5+1&&g.pop()}},N=function(e){var t=e.userId;null!=O[t]&&delete O[t]},A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&h(e,t)}(n,e);var t=m(n);function n(){s(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getEffectForUserId=function(e){return O[e]};r.__getLocalVars=function(){return{ effectCooldownEndTime:b,recentlyUsedEmojis:g,effectsByUserId:O,effectsToAnnounce:E,lastSentEffects:j,MAX_EFFECTS_COUNT:20,MAX_EFFECTS_INTERVAL_MS:S,handleVoiceChannelEffectSentLocal:I,handleTimestampUpdate:_,announceReaction:w,handleReceivedVoiceChannelEffect:x,handleAddRecentlyUsedEmojis:P,handleClearVoiceChannelEffect:N}};!function(e,t,n){t&&f(e.prototype,t);n&&f(e,n)}(n,[{key:"recentlyUsedEmojis",get:function(){return g}},{key:"isOnCooldown",get:function(){return null!=b&&new Date{"use strict";n.d(t,{Z:()=>X}) ;var r=n(785893),o=n(667294),i=n(496486),a=n(202351),l=n(418705),u=n(707961),c=n(744564),s=n(734691),f=n(732016),d=n(316878),p=n(396043),h=n(627342),y=n(589503),b=n(620597),v=n(473903),m=n(38004),g=n(72580),O=n(850841),E=n(242942),C=n(143692);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e){S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return S(e)}function I(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){_=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return _(e,t)}var w,x=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1 ;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}var N=function(){w=w===C.q.BASIC?C.q.PREMIUM:C.q.BASIC},A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_(e,t)}(n,e);var t=P(n);function n(){j(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){var t;w=null!==(t=null==e?void 0:e.animationType)&&void 0!==t?t:C.q.PREMIUM};r.getState=function(){return{animationType:w}};r.__getLocalVars=function(){return{animationType:w,handleToggleAnimationType:N}};return n}(a.ZP.PersistedStore);A.displayName="VoiceChannelEffectsPersistedStore" ;A.persistKey="VoiceChannelEffectsPersistedStore";const T=new A(c.Z,{VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE:N});var Z=n(986279),M=n(285629),R=n(175241),L=n(473708);function D(e){var t=e.value,n=e.labelText,o=e.onChange,i=e.onShowUpsell,l=(0,a.e7)([v.default],(function(){return v.default.getCurrentUser()})),u=O.ZP.canUseFancyVoiceChannelReactions(l),c="";c=u?t?L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_TOOLTIP_ENABLED:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_TOOLTIP_DISABLED:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_UPSELL;return(0,r.jsx)(R.Z,{checked:t,onChange:o,labelText:n,tooltipText:c,iconAltText:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE_TADA_ALT,canToggle:u,onClick:u?function(){}:i})}var k=n(74568),U=n(869530),B=n(2590),F=n(358500),G=n(203600),H=n(131559),V=n(687042),W=n.n(V);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&P.splice(P.length-1,1,N[0]);var A=(0,M.Iu)(_),R=function(e){c.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_RECENT_EMOJI",emoji:e});(0,E.Lx)({channel:n,emoji:e,location:E.yX.EMOJI_PICKER,animationType:_,animationId:A,isPremium:I})},V=function(){(0,k.openEffectsUpsellModal)({analytics:{type:G.cd.EMOJI_PICKER_EMOJI_CLICKED,object:B.qAy.BUTTON_CTA,section:B.jXE.VOICE_CHANNEL_EFFECTS_BAR}})},z=function(e){w.current=e;e&&p.ZP.trackWithMetadata(B.rMx.VOICE_CHANNEL_EFFECT_EMOJI_PICKER_EXPANDED,{channel_id:X, guild_id:J})},X=n.id,J=n.guild_id;o.useEffect((function(){p.ZP.trackWithMetadata(B.rMx.VOICE_CHANNEL_EFFECT_BAR_VIEWED,{channel_id:X,guild_id:J})}),[X,J]);var $=j?[l.z$.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP]:[],ee=_===C.q.PREMIUM;return(0,r.jsx)(h.Z,{contentTypes:$,children:function(e){var t=e.visibleContent,o=e.markAsDismissed,i=j&&t===l.z$.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP;return(0,r.jsx)(u.yRy,{position:"left","aria-label":L.Z.Messages.VOICE_CHANNEL_EFFECTS_MORE,shouldShow:i,renderPopout:function(){return(0,r.jsx)("div",{onMouseEnter:g,children:(0,r.jsx)(b.ZP,{className:W().reducedMotionTooltip,header:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_TITLE,content:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_BODY,onClick:function(){s.Z.open(B.oAB.ACCESSIBILITY,null,{scrollPosition:H.rP.REDUCED_MOTION});f()},markAsDismissed:o,buttonCTA:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_CONFIRM, secondaryButtonCTA:L.Z.Messages.VOICE_CHANNEL_EFFECTS_REDUCED_MOTION_TOOLTIP_CANCEL,caretPosition:b.DF.RIGHT_CENTER})})},children:function(){return(0,r.jsx)(U.Z,{title:L.Z.Messages.VOICE_CHANNEL_EFFECTS_HOTBAR_TITLE,channel:n,closePopout:f,onSelectEmoji:R,onSelectDisabledEmoji:V,onFocus:g,onExpandedToggle:z,analyticsOverride:q,emojiSearchProps:{accessory:(0,r.jsx)(D,{labelText:L.Z.Messages.VOICE_CHANNEL_EFFECTS_TOGGLE,value:ee,onChange:function(){if(I){p.ZP.trackWithMetadata(B.rMx.VOICE_CHANNEL_EFFECT_FANCY_ANIMATION_TOGGLED,{channel_id:X,guild_id:J,enabled:!ee});return c.Z.dispatch({type:"VOICE_CHANNEL_EFFECT_TOGGLE_ANIMATION_TYPE"})}},onShowUpsell:function(){return(0,k.openEffectsUpsellModal)({analytics:{type:w.current?G.cd.VOICE_CHANNEL_EFFECTS_TOGGLE_CLICKED_EXPANDED:G.cd.VOICE_CHANNEL_EFFECTS_TOGGLE_CLICKED,object:B.qAy.VOICE_CHANNEL_EFFECTS_TOGGLE,section:w.current?B.jXE.VOICE_CHANNEL_EFFECTS_EMOJI_PICKER:B.jXE.VOICE_CHANNEL_EFFECTS_BAR}})}})},recentlyUsedEmojis:N})}})}})}}, 74568:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>C,openEffectsUpsellModal:()=>j});var r=n(785893),o=(n(667294),n(707961)),i=n(73202),a=n(593166),l=n(442212),u=n(786170),c=n(652591),s=n(2590),f=n(473708),d=n(147209),p=n.n(d),h=n(77015),y=n.n(h);function b(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,l,"next",e)}function l(e){b(i,r,o,a,l,"throw",e)}a(void 0)}))}}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function g(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var E=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue ;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>D});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(496486),u=n(248088),c=n(707961),s=n(77413),f=n(662478),d=n(732016),p=n(589503),h=n(77918),y=n(394352),b=n(470643),v=n(443812),m=n(377463),g=n(38004),O=n(72580),E=n(2590),C=n(358500),j=n(668785),S=n(687042),I=n.n(S);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&U.splice(U.length-1,1,m[0]);var B=function(e){D(e);null==d||d(e)},F=function(e,t){if(null==e&&t)i();else{null!=e&&s(e);B(!t);t&&(0,y.$2)(null)}};return(0,r.jsxs)(c.VqE,{"aria-labelledby":S,children:[(0,r.jsx)(c.y5t,{forceLevel:2,children:(0,r.jsx)(c.nn4,{children:(0,r.jsx)(c.H,{id:S,children:n})})}),(0,r.jsxs)("div",{ className:I().container,children:[(0,r.jsx)(h.Z,{analyticsOverride:O,channel:t,className:a()(I().animatedPicker,w({},I().animatedPickerTall,T)),headerClassName:a()(I().emojiPickerHeader,w({},I().emojiPickerHeaderExpanded,T)),closePopout:i,onSelectEmoji:T?F:function(){},shouldHidePickerActions:!T,wrapper:"div",pickerIntention:Z,searchProps:P(x({},b),{accessory:(0,r.jsx)(L,{otherAccessories:null==b?void 0:b.accessory,isEmojiPickerExpanded:T,onSetExpanded:B,onFocus:u}),onKeyDown:function(e){null!=e&&e.key!==j.vn.TAB&&(e.key!==j.vn.ENTER||e.shiftKey?B(!0):B(!T))}})}),(0,r.jsx)("div",{className:I().slotsContainer,children:(0,r.jsx)("div",{className:a()(I().slots,I().slotsWide),children:U.map((function(e){var n=g.ZP.isEmojiDisabled(e,t,E.HzX.CHAT);return(0,r.jsx)("div",{className:I().slot,children:(0,r.jsx)(c.DY3,{text:e.name,position:"top","aria-label":e.name,tooltipClassName:I().tooltipContainer,color:c.ua7.Colors.BRAND,children:(0,r.jsx)(R,{emoji:e,isDisabled:n,onClick:function(){ n?null==f||f(e):F(e,!0)}})})},e.name)}))})})]})]})}},135750:(e,t,n)=>{"use strict";n.d(t,{y0:()=>s,RM:()=>f,Xb:()=>d,sm:()=>p,VP:()=>h,Es:()=>y});var r=n(281110),o=n(744564),i=n(2590);function a(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,u,"next",e)}function u(e){a(i,r,o,l,u,"throw",e)}l(void 0)}))}}var u,c=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]) ;switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1&&void 0!==arguments[1]&&arguments[1];o.Z.dispatch({type:"WELCOME_SCREEN_VIEW",guildId:e,isLurking:t})},f=(u=l((function(e){var t;return c(this,(function(n){switch(n.label){case 0:o.Z.dispatch({type:"WELCOME_SCREEN_FETCH_START"});n.label=1;case 1:n.trys.push([1,3,,4]);return[4,r.Z.get({url:i.ANM.GUILD_WELCOME_SCREEN(e),oldFormErrors:!0})];case 2:t=n.sent();o.Z.dispatch({ type:"WELCOME_SCREEN_FETCH_SUCCESS",guildId:e,welcomeScreen:t.body});return[2,t.body];case 3:n.sent();o.Z.dispatch({type:"WELCOME_SCREEN_FETCH_FAIL"});return[3,4];case 4:return[2]}}))})),function(e){return u.apply(this,arguments)}),d=function(){o.Z.dispatch({type:"WELCOME_SCREEN_SETTINGS_RESET"})},p=function(){o.Z.dispatch({type:"WELCOME_SCREEN_SETTINGS_CLEAR"})},h=function(e){o.Z.dispatch({type:"WELCOME_SCREEN_SETTINGS_UPDATE",settings:e})},y=function(){var e=l((function(e,t){var n;return c(this,(function(a){switch(a.label){case 0:o.Z.dispatch({type:"WELCOME_SCREEN_SUBMIT"});a.label=1;case 1:a.trys.push([1,3,,4]);return[4,r.Z.patch({url:i.ANM.GUILD_WELCOME_SCREEN(e),body:{description:t.description,welcome_channels:t.channels,enabled:t.enabled},oldFormErrors:!0})];case 2:n=a.sent();o.Z.dispatch({type:"WELCOME_SCREEN_SUBMIT_SUCCESS",guildId:e,welcomeScreen:n.body});return[3,4];case 3:a.sent();o.Z.dispatch({type:"WELCOME_SCREEN_SUBMIT_FAILURE"});return[3,4];case 4:return[2]}}))})) ;return function(t,n){return e.apply(this,arguments)}}()},102909:(e,t,n)=>{"use strict";n.d(t,{a:()=>f,Z:()=>O});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)}function l(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0 }catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var f={},d={},p={},h=!1,y=!1,b=!1;function v(e){var t=e.invite.guild;if(null!=(null==t?void 0:t.welcome_screen)){d[t.id]=t.welcome_screen;return!0}return!1}function m(e){var t=e.welcomeScreen,n=e.guildId;d[n]=null!=t?t:f}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=s(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.get=function(e){if(null!=e)return d[e]};r.isFetching=function(){return y};r.hasError=function(){return b};r.hasSeen=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return null!=e&&(t?h:p[e]||!1)};r.__getLocalVars=function(){return{ welcomeScreens:d,seenGuilds:p,lurkingGuildSeen:h,fetching:y,hasError:b}};return n}(r.ZP.Store);g.displayName="WelcomeScreenStore";const O=new g(o.Z,{INVITE_RESOLVE_SUCCESS:v,INVITE_ACCEPT_SUCCESS:v,WELCOME_SCREEN_SUBMIT_SUCCESS:m,WELCOME_SCREEN_UPDATE:m,WELCOME_SCREEN_VIEW:function(e){var t=e.guildId,n=e.isLurking;p[t]=!0;n&&(h=!0)},GUILD_STOP_LURKING:function(){h=!1},GUILD_DELETE:function(e){var t=e.guild.id;p[t]=!1},WELCOME_SCREEN_FETCH_START:function(){y=!0;b=!1},WELCOME_SCREEN_FETCH_SUCCESS:function(e){y=!1;b=!1;var t=e.welcomeScreen,n=e.guildId;d[n]=null!=t?t:f},WELCOME_SCREEN_FETCH_FAIL:function(){y=!1;b=!0}})},180172:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(481008),u=n(306263),c=n(443132);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return f(e)}function d(e,t){ return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e,t){p=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return p(e,t)}var h=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}var b=12e4,v={},m={},g=new Set;function O(){v={};m={}}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function") ;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&p(e,t)}(n,e);var t=y(n);function n(){s(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getPreviewURL=function(e,t,n){var r=(0,u.V9)({streamType:null!=e?c.lo.GUILD:c.lo.CALL,guildId:e,channelId:t,ownerId:n}),o=v[r];if(null==o||Date.now()>o.expires){if(!g.has(r)){g.add(r);a.Z.wait((function(){(0,l.n9)(e,t,n)}))}return null}return o.url};r.getPreviewURLForStreamKey=function(e){var t=(0,u.my)(e),n=t.guildId,r=t.channelId,o=t.ownerId;return this.getPreviewURL(n,r,o)};r.getIsPreviewLoading=function(e,t,n){var r=(0,u.V9)({streamType:null!=e?c.lo.GUILD:c.lo.CALL,guildId:e,channelId:t,ownerId:n});return g.has(r)};r.__getLocalVars=function(){return{READ_PREVIEW_EXPIRY:b,READ_PREVIEW_DEFAULT_RETRY:1e4,streamPreviews:v,fetchAttempts:m,fetchingPreviews:g}};return n}(i.ZP.Store);E.displayName="ApplicationStreamPreviewStore";const C=new E(a.Z,{CONNECTION_OPEN:O,LOGOUT:O, STREAM_PREVIEW_FETCH_START:function(e){var t,n=e.streamKey;m[n]=(null!==(t=m[n])&&void 0!==t?t:0)+1;g.add(n)},STREAM_PREVIEW_FETCH_SUCCESS:function(e){var t=e.streamKey,n=e.previewURL;v[t]={url:n,expires:Date.now()+b};m[t]=0;g.delete(t)},STREAM_PREVIEW_FETCH_FAIL:function(e){var t=e.streamKey,n=e.retryAfter;v[t]={url:null,expires:Date.now()+(null!=n?n:1e4*m[t])};g.delete(t)},VOICE_STATE_UPDATES:function(e){var t=e.voiceStates;return(!o().isEmpty(v)||!o().isEmpty(m))&&t.reduce((function(e,t){var n=t.userId,r=t.guildId,o=t.channelId;if(t.selfStream)return e;var i=(0,u.V9)({streamType:null!=r?c.lo.GUILD:c.lo.CALL,guildId:r,channelId:o,ownerId:n});delete v[i];delete m[i];return!0}),!1)}})},77457:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)} function l(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}var f={toastsEnabledForChannel:{}},d=f;var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function") ;e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=s(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){d=null!=e?e:f};r.getToastsEnabled=function(e){var t;return null===(t=d.toastsEnabledForChannel[e])||void 0===t||t};r.getState=function(){return d};r.__getLocalVars=function(){return{initialState:f,state:d}};return n}(r.ZP.PersistedStore);p.displayName="CallChatToastsStore";p.persistKey="CallChatToasts";const h=new p(o.Z,{CALL_CHAT_TOASTS_SET_ENABLED:function(e){var t=e.channelId,n=e.toastsEnabled;d.toastsEnabledForChannel[t]=n},LOGOUT:function(){d.toastsEnabledForChannel={}}})},82863:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(202351),o=n(744564);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return a(e)} function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){u=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return u(e,t)}var c,s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}!function(e){e.FAILED="failed";e.SUCCEEDED="succeeded"}(c||(c={}));var d={};var p=function(e){!function(e,t){ if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&u(e,t)}(n,e);var t=f(n);function n(){i(this,n);return t.apply(this,arguments)}var r=n.prototype;r.getFollowerStatsForChannel=function(e){return d[e]};r.__getLocalVars=function(){return{ChannelFollowerStatsFetchStates:c,channelIdToFollowerStats:d}};return n}(r.ZP.Store);p.displayName="ChannelFollowerStatsStore";const h=new p(o.Z,{CONNECTION_OPEN:function(){d={}},CHANNEL_FOLLOWER_STATS_FETCH_SUCCESS:function(e){var t=e.channelId,n=e.stats;n=null!=n?n:{};d[t]={loadingStatus:c.SUCCEEDED,lastFetched:Date.now(),channelsFollowing:n.channels_following,guildMembers:n.guild_members,guildsFollowing:n.guilds_following,usersSeenEver:n.users_seen_ever,subscribersGainedSinceLastPost:n.subscribers_gained_since_last_post,subscribersLostSinceLastPost:n.subscribers_lost_since_last_post}}, CHANNEL_FOLLOWER_STATS_FETCH_FAILURE:function(e){var t=e.channelId;d[t]={loadingStatus:c.FAILED,lastFetched:Date.now(),channelsFollowing:0,guildMembers:0,guildsFollowing:0,usersSeenEver:0,subscribersGainedSinceLastPost:0,subscribersLostSinceLastPost:0}}})},780861:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(202351),o=n(744564),i=n(473419);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t){c=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return c(e,t)}var s=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function f(e){var t=function(){ if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}var d=new Set;var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&c(e,t)}(n,e);var t=f(n);function n(){a(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(e){null!=e&&(d=new Set(e.expandedFolders));this.waitFor(i.Z)};r.getState=function(){return{expandedFolders:Array.from(d)}};r.getExpandedFolders=function(){return d};r.isFolderExpanded=function(e){return d.has(e)} ;r.__getLocalVars=function(){return{expandedFolders:d}};return n}(r.ZP.PersistedStore);p.displayName="ExpandedGuildFolderStore";p.persistKey="ExpandedGuildFolderStore";const h=new p(o.Z,{TOGGLE_GUILD_FOLDER_EXPAND:function(e){var t=e.folderId;(d=new Set(d)).has(t)?d.delete(t):d.add(t)},SET_GUILD_FOLDER_EXPANDED:function(e){var t=e.folderId,n=e.expanded;d=new Set(d);n?d.add(t):d.has(t)&&d.delete(t)},USER_SETTINGS_PROTO_UPDATE:function(){var e=i.Z.getGuildFolders();if(null==e)return!1;var t=!1,n=!0,r=!1,o=void 0;try{for(var a,l=function(){var n=a.value;if(!e.some((function(e){return e.folderId===n}))){(d=new Set(d)).delete(n);t=!0}},u=d[Symbol.iterator]();!(n=(a=u.next()).done);n=!0)l()}catch(e){r=!0;o=e}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}return t},GUILD_FOLDER_COLLAPSE:function(){if(0===d.size)return!1;d=new Set}})},3862:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(75509);function u(e,t){ if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function f(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>C});var r=n(202351),o=n(744564),i=n(382060),a=n(295652),l=n(61209),u=n(717091),c=n(715107),s=n(796909);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e){d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return d(e)}function p(e,t){ return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t){h=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return h(e,t)}var y=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}var v=[];function m(){var e=s.Z.getPrivateChannelIds().filter((function(e){return u.ZP.getMentionCount(e)>0}));e.length>20&&(e.length=20);if((0,a.EF)(e,v))return!1;v=e;return!0}function g(){return m()} function O(e){var t=e.channelId,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&h(e,t)}(n,e);var t=b(n);function n(){f(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(s.Z,l.Z,c.Z,u.ZP)};r.getUnreadPrivateChannelIds=function(){return v};r.__getLocalVars=function(){return{MAX_UNREAD_CHANNELS:20,unreadPrivateChannelIds:v}};return n}(r.ZP.Store);E.displayName="PrivateChannelReadStateStore";const C=new E(o.Z,{CONNECTION_OPEN:g,OVERLAY_INITIALIZE:g,MESSAGE_CREATE:O,MESSAGE_ACK:O,CHANNEL_SELECT:function(e){var t=e.channelId,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()},CHANNEL_DELETE:function(e){var t=e.channel.id,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()}, WINDOW_FOCUS:function(){var e=l.Z.getChannel(c.Z.getChannelId());return!(null==e||!(0,i.hv)(e.type))&&m()},CHANNEL_CREATE:function(e){var t=e.channel.id,n=l.Z.getChannel(t);return!(null==n||!(0,i.hv)(n.type))&&m()},CHANNEL_UPDATES:function(e){var t=e.updates,n=!1,r=!0,o=!1,a=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var s=u.value.channel.id,f=l.Z.getChannel(s);null!=f&&(0,i.hv)(f.type)&&(n=!0)}}catch(e){o=!0;a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return!!n&&m()}})},876296:(e,t,n)=>{"use strict";n.d(t,{Z:()=>V});var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(456837),u=n(382060),c=n(421281),s=n(749565),f=n(61209),d=n(213818),p=n(840922),h=n(473903),y=n(2590);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>v}) ;var r=n(496486),o=n.n(r),i=n(202351),a=n(744564),l=n(567403);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return c(e)}function s(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e,t){f=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return f(e,t)}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){ var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}var h=null,y={};var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&f(e,t)}(n,e);var t=p(n);function n(){u(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(l.Z)};r.getOptimalRegion=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.getRegions(t);return null!=n?null!==(e=n.find((function(e){return e.optimal})))&&void 0!==e?e:o().sample(n):null};r.getOptimalRegionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getOptimalRegion(e);return null!=t?t.id:null};r.getRandomRegion=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getRegions(e) ;return null!=t?o().sample(t):null};r.getRandomRegionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getRandomRegion(e);return null!=t?t.id:null};r.getRegions=function(e){return null!=e?y[e]:h};r.__getLocalVars=function(){return{defaultRegions:h,guildRegions:y}};return n}(i.ZP.Store);b.displayName="RegionStore";const v=new b(a.Z,{LOAD_REGIONS:function(e){var t=o().sortBy(e.regions,(function(e){return e.name}));null!=e.guildId?y[e.guildId]=t:h=t},GUILD_DELETE:function(e){delete y[e.guild.id]}})},107218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(110251),o=n.n(r),i=n(441143),a=n.n(i),l=n(896812),u=n(944522),c=n(473419),s=n(295652),f=n(72580),d=n(837067),p=n(567403),h=n(637493),y=n(9430),b=n(473903);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function O(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t){E=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return E(e,t)}function C(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1) ;"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var j=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}var I,_=new l.g8;function w(e){switch(e.type){case l.eD.FOLDER:return{folderId:e.id,folderName:e.name, folderColor:e.color,expanded:e.expanded,guildIds:e.children.map((function(e){return e.id}))};case l.eD.GUILD:return{folderId:void 0,guildIds:[e.id]};default:throw Error("[SortedGuildStore] Unexpected guilds tree node type.")}}function x(e,t){var n=_;_=new l.g8;if(0===e.length&&t.length>0){var r=!0,i=!1,a=void 0;try{for(var c,s=t[Symbol.iterator]();!(r=(c=s.next()).done);r=!0){var f=c.value;_.addNode((0,l.Mg)(f))}}catch(e){i=!0;a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}}else{var h=!0,y=!1,b=void 0;try{for(var v,m=e[Symbol.iterator]();!(h=(v=m.next()).done);h=!0){var g=v.value;if(0!==g.guildIds.length)if(null==g.folderId)_.addNode((0,l.Mg)(g.guildIds[0]));else{var O=(0,l.qQ)(g);_.addNode(O);var E=!0,C=!1,j=void 0;try{for(var S,I=g.guildIds[Symbol.iterator]();!(E=(S=I.next()).done);E=!0){var w=S.value;_.addNode((0,l.Mg)(w),O)}}catch(e){C=!0;j=e}finally{try{E||null==I.return||I.return()}finally{if(C)throw j}}}}}catch(e){y=!0;b=e}finally{try{ h||null==m.return||m.return()}finally{if(y)throw b}}}var x=!0,P=!1,N=void 0;try{for(var A,T=_.allNodes()[Symbol.iterator]();!(x=(A=T.next()).done);x=!0){var Z=A.value;Z.type===l.eD.GUILD&&(u.Z.isLurking(Z.id)||null==p.Z.getGuild(Z.id)&&!d.Z.isUnavailable(Z.id))&&_.removeNode(Z)}}catch(e){P=!0;N=e}finally{try{x||null==T.return||T.return()}finally{if(P)throw N}}var M=!0,R=!1,L=void 0;try{for(var D,k=Object.values(_.nodes)[Symbol.iterator]();!(M=(D=k.next()).done);M=!0){var U=D.value;U.type===l.eD.FOLDER&&0===U.children.length&&_.removeNode(U)}}catch(e){R=!0;L=e}finally{try{M||null==k.return||k.return()}finally{if(R)throw L}}for(var B in p.Z.getGuilds())null!=_.nodes[B]||u.Z.isLurking(B)||_.addNode((0,l.Mg)(B),_.root,!1);return!o()(n,_)}function P(){var e,t,n;return x(null!==(t=c.Z.getGuildFolders())&&void 0!==t?t:[],null!==(n=null===(e=c.Z.settings.guildFolders)||void 0===e?void 0:e.guildPositions)&&void 0!==n?n:[])}function N(){var e,t,n=c.Z.getGuildFolders() ;return(null==I||!o()(I,n))&&x(null!=(I=n)?I:[],null!==(t=null===(e=c.Z.settings.guildFolders)||void 0===e?void 0:e.guildPositions)&&void 0!==t?t:[])}function A(e){var t=e.sourceId,n=e.targetId,r=e.moveToBelow,o=e.combine,i=_.getNode(t),u=_.getNode(n);if(null==i||null==u)return!1;a()(!(o&&i.type===l.eD.FOLDER),"[SORTED GUILDS] Can't combine a folder ".concat(i.id," with another guilds list item"));a()(!(o&&null!=u.parentId),"[SORTED GUILDS] Can't combine with a guild ".concat(u.id," that's already inside of a folder"));a()(!(i.type===l.eD.FOLDER&&null!=u.parentId),"[SORTED GUILDS] Can't move a folder ".concat(i.id," to inside of another folder ").concat(u.parentId));if(o){var c=u.type!==l.eD.FOLDER?_.convertToFolder(u):u;_.moveInto(i,c,r)}else _.moveNextTo(i,u,r)}function T(e){var t=e.sourceIds,n=e.name,r=t.shift();if(null==r)return!1;var o=_.getNode(r);if(null==o)return!1;var i=_.convertToFolder(o);i.name=n;t.forEach((function(e){var t=_.getNode(e);null!=t&&_.moveInto(t,i,!0)}))} function Z(e){var t=e.targetId,n=e.sourceIds,r=g(e,["targetId","sourceIds"]),o=_.getNode(t);if(null==o)return!1;if(o.type!==l.eD.FOLDER)return!1;var i=""===r.name?void 0:r.name;if(i!==o.name){var u=_.cloneNode(o);a()(u.id===o.id,"[SORTED GUILDS] Replacement folder node must have same id.");u.name=i;_.replaceNode(o,u)}var c=_.getNode(t);if(null==c)return!1;var s=c.children.map((function(e){return e.id})).filter(f.lm),d=new Set(s),p=new Set(n),h=new Set(C(s).filter((function(e){return!p.has(e)})));n.filter((function(e){return!d.has(e)})).forEach((function(e){var t=_.getNode(e);null!=t&&_.moveInto(t,c,!0)}));h.forEach((function(e){var t=_.getNode(e);null!=t&&_.moveNextTo(t,c,!0)}))}function M(e){var t=e.targetId,n=_.getNode(t);if(null==n)return!1;if(n.type!==l.eD.FOLDER)return!1;n.children.map((function(e){return e.id})).filter(f.lm).forEach((function(e){var t=_.getNode(e);null!=t&&_.moveNextTo(t,n,!0)}))}function R(e){ var t=e.guildId,n=e.joinedAt,r=e.user,o=b.default.getCurrentUser(),i=p.Z.getGuild(t);if((null==o?void 0:o.id)!==r.id||null==i)return!1;var a="string"==typeof n?new Date(n):n;return a!==i.joinedAt&&null!=a&&P()}var L=(0,s.oH)((function(e,t){return e.sortedGuildNodes().map((function(e){return p.Z.getGuild(e.id)})).filter(f.lm)})),D=(0,s.oH)((function(e,t){return e.sortedGuildNodes().map((function(e){return e.id}))})),k=(0,s.oH)((function(e,t){return e.getRoots().map(w)})),U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&E(e,t)}(n,e);var t=S(n);function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var e;(e=t.call(this)).loadCache=function(){var t=e.readSnapshot(n.LATEST_SNAPSHOT_VERSION),r=null==t?void 0:t.tree ;null!=r&&(_=new l.g8).loadSnapshot(r)};e.registerActionHandlers({CONNECTION_OPEN:P,OVERLAY_INITIALIZE:P,CACHE_LOADED_LAZY:e.loadCache,GUILD_CREATE:P,GUILD_DELETE:P,GUILD_MEMBER_ADD:R,USER_SETTINGS_PROTO_UPDATE:N,GUILD_MOVE_BY_ID:A,GUILD_FOLDER_CREATE_LOCAL:T,GUILD_FOLDER_EDIT_LOCAL:Z,GUILD_FOLDER_DELETE_LOCAL:M});e.waitFor(p.Z,y.Z,c.Z,d.Z,u.Z);return e}var r=n.prototype;r.getGuildsTree=function(){return _};r.getGuildFolders=function(){return k(_,_.version)};r.getFlattenedGuilds=function(){return L(_,_.version)};r.getFlattenedGuildIds=function(){return D(_,_.version)};r.getCompatibleGuildFolders=function(){return _.root.children.map(w)};r.takeSnapshot=function(){return{version:n.LATEST_SNAPSHOT_VERSION,data:{tree:_.getSnapshot()}}};return n}(h.Z);U.displayName="SortedGuildStore";U.LATEST_SNAPSHOT_VERSION=1;const B=new U},191677:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(202351),o=n(630631),i=n(744564),a=n(399663);function l(e,t){ if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return u(e)}function c(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e,t){s=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return s(e,t)}var f=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments) ;return c(this,n)}}var p="SpellcheckStore",h=!0,y=new Set;function b(){o.Z.set(p,{enabled:h,learnedWords:y})}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&s(e,t)}(n,e);var t=d(n);function n(){l(this,n);return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){var e=o.Z.get(p);if(null!=e){h=e.enabled;y=new Set(e.learnedWords);(0,a.gL)(h);(0,a.fG)(y)}};r.isEnabled=function(){return h};r.__getLocalVars=function(){return{STORAGE_KEY:p,enabled:h,learnedWords:y}};return n}(r.ZP.Store);v.displayName="SpellcheckStore";const m=new v(i.Z,{SPELLCHECK_TOGGLE:function(){h=!h;(0,a.gL)(h);b()},SPELLCHECK_LEARN_WORD:function(e){var t=e.word;y.add(t.toLocaleLowerCase());(0,a.fG)(y);b()},I18N_LOAD_SUCCESS:function(e){var t=e.locale;(0,a._2)(t)}})},10712:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g}) ;var r=n(785893),o=(n(667294),n(707961)),i=n(744564),a=n(651921),l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{} ;var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var p,h,y=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop() ;continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>O});var r=n(785893),o=(n(667294),n(707961)),i=n(744564),a=n(584452),l=n(2590);function u(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function s(e,t,n){ t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}var p,h,y=function(e,t){var n,r,o,i,a={label:0,sent:function(){ if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&void 0!==arguments[0]?arguments[0]:null;p=e;o()},applicationId:t,skuId:i,analyticsSource:u,isIAP:e===l.IlC.OVERLAY}))}]}}))})),{onCloseCallback:function(){(0,a.J)(p)}})}const O={init:function(){ i.Z.subscribe("PURCHASE_CONFIRMATION_MODAL_OPEN",(function(e){m();v=e.context;b=e.entitlements;p=e.resolve;h=e.reject;l.e3s===e.context&&g(e.context,e.applicationId,e.skuId,e.analyticsSource)}));i.Z.subscribe("PURCHASE_CONFIRMATION_MODAL_CLOSE",(function(e){var t=e.error;v=null;m(t)}));i.Z.subscribe("OVERLAY_SET_INPUT_LOCKED",(function(e){if(e.locked&&null!=v){v=null;m()}}))}}},412732:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>z,yk:()=>Y});var r=n(940060),o=n(202351),i=n(630631),a=n(744564),l=n(761953),u=n(247250),c=n(327499),s=n(32162),f=n(842629),d=n(773011),p=n(358969),h=n(382840),y=n(996344),b=n(784426),v=n(451458),m=n(915840),g=n(766496),O=n(367406),E=n(61209),C=n(567403),j=n(288263),S=n(682776),I=n(840922),_=n(715107),w=n(436154),x=n(793461),P=n(473903),N=n(407561),A=n(773148),T=n(537079),Z=n(374092),M=n(120415),R=n(716118),L=n(749565),D=n(2590),k=n(3155),U=n(473708);function B(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e){ F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return F(e)}function G(e,t){return!t||"object"!==V(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e,t){H=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return H(e,t)}var V=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return G(this,n)}} var z="message1",Y=.4,K="message3",q="message2",Q="discord_dismissed_notification_shown",X=document.hasFocus(),J=null,$=["FR","GF","PF","TF","RE","GP","MQ","YT","NC","PM","WF"],ee=new(function(){function e(){B(this,e);this._channels={}}var t=e.prototype;t.track=function(e,t){var n=this._channels[e];if(null==n){n=[];this._channels[e]=n}n.push(t);for(;n.length>1;){var r=n.shift();null!=r&&null!=r.close&&r.close()}};t.clearChannel=function(e){var t=this._channels[e];if(null!=t){delete this._channels[e];t.forEach((function(e){return e.close()}))}};return e}());function te(){return j.Z.getDesktopType()===D.qrD.NEVER||w.Z.getStatus()===D.Skl.DND}function ne(e){return null!=N.Z.getVoiceStateForChannel(e)}var re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&H(e,t)}(n,e);var t=W(n);function n(){B(this,n) ;return t.apply(this,arguments)}var r=n.prototype;r.initialize=function(){this.waitFor(P.default,E.Z,j.Z,C.Z,g.Z,I.Z,S.Z,N.Z,y.Z)};r.__getLocalVars=function(){return{MESSAGE_SAME_CHANNEL_SOUND:K,MESSAGE_SAME_CHANNEL_SOUND_VOLUME:.4,ACTIVITY_START_SOUND:q,ACTIVITY_START_SOUND_VOLUME:.4,MAX_PER_CHANNEL:1,DISCORD_DISMISSED_NOTIF_KEY:Q,focused:X,userCountryCode:J,NOTIFY_ON_CLOSE_COUNTRIES:$,notificationTracker:ee}};return n}(o.ZP.Store);re.displayName="NotificationStore";new re(a.Z,__OVERLAY__?{}:{NOTIFICATIONS_SET_PERMISSION_STATE:function(e){e.enabled!==D.$Ab.ENABLED||M.FB||Z.Z.showNotification(n(998634),U.Z.Messages.NOTIFICATION_TITLE_DISCORD,U.Z.Messages.BROWSER_NOTIFICATIONS_ENABLED_BODY,{notif_type:"NOTIFICATIONS_SET_PERMISSION_STATE"},{omitViewTracking:!0,sound:z,volume:Y,tag:"hello",onClick:function(){window.focus()}})},NOTIFICATION_CREATE:function(e){var t=e.icon,n=e.title,r=e.body,o=e.trackingProps,i=e.options;if(te())return!1;Z.Z.showNotification(t,n,r,o,i);return!1}, WINDOW_FOCUS:function(e){if(X=e.focused){var t=_.Z.getChannelId();null!=t&&ee.clearChannel(t)}},MESSAGE_CREATE:function(e){var t=e.channelId,r=e.message;if(e.optimistic)return!1;var o=E.Z.getChannel(t),i=P.default.getUser(r.author.id);if(null==o||null==i)return!1;var l=(0,T.eF)(r,t,!X),c=j.Z.getNotifyMessagesInSelectedChannel()&&(0,T.N_)(r,t);if(!l&&!c)return!1;var f=!j.Z.isSoundDisabled(z);if(c){f&&R.GN(K,.4);if(!X)return!1}if(!l)return!1;var d=n(304275).Z,p=n(674482).Z;if(null!=d.getFocusedPID()&&p.getTextChatNotificationMode()===D.Ypu.ENABLED&&!x.Z.disableNotifications)return!1;var h=(0,T.Xi)(o,r,i),y=h.icon,b=h.title,m=h.body;a.Z.dispatch({type:"RPC_NOTIFICATION_CREATE",channelId:o.id,message:r,icon:y,title:b,body:m});if(j.Z.getDesktopType()===D.qrD.NEVER){f&&R.GN(z,Y);return!1}var g=Z.Z.showNotification(y,b,m,{notif_type:"MESSAGE_CREATE",notif_user_id:r.author.id,message_id:r.id,message_type:r.type,channel_id:o.id,channel_type:o.type,guild_id:o.guild_id},{omitViewTracking:!0, tag:r.id,sound:f?z:void 0,volume:Y,onClick:function(){(0,v.Kh)(o.id);o.type!==D.d4z.GUILD_VOICE&&o.type!==D.d4z.GUILD_STAGE_VOICE||u.Z.updateChatOpen(o.id,!0);s.default.clickedNotification()}});null!=g&&ee.track(o.id,g)},CHANNEL_SELECT:function(e){var t=e.channelId;null!=t&&ee.clearChannel(t);return!1},MESSAGE_ACK:function(e){var t=e.channelId;ee.clearChannel(t);return!1},ACTIVITY_START:function(e){var t=e.userId,n=e.activity;if(te())return!1;if(n.type===D.IIU.PLAYING){var r=P.default.getUser(t);if(null==r)return!1;var o=L.ZP.getName(r),i=n.name,a=r.getAvatarURL(void 0,128),u=U.Z.Messages.NOTIFICATION_TITLE_START_GAME,c=U.Z.Messages.NOTIFICATION_BODY_START_GAME.format({username:o,gameName:i});Z.Z.showNotification(a,u,c,{notif_type:"ACTIVITY_START",activity_type:D.IIU.PLAYING,notif_user_id:t,activity_name:i},{sound:q,playSoundIfDisabled:!1,volume:.4,onClick:function(){l.Z.openPrivateChannel(t)}});return!1}return!1},VOICE_STATE_UPDATES:function(e){var t=e.voiceStates;if(!te()){ var n=P.default.getCurrentUser();if(null!=n){var r=t.find((function(e){return e.userId===n.id}));if(null!=r){var o=r.channelId,i=r.guildId,a=r.suppress,l=r.requestToSpeakTimestamp;if(null!=o&&null!=i&&(!a&&null!=l)){var u=C.Z.getGuild(i),c=E.Z.getChannel(o),s=g.Z.getStageInstanceByChannel(o);null!=u&&null!=c&&null!=s&&Z.Z.showNotification(u.getIconURL(128),c.name,U.Z.Messages.STAGE_SPEAK_INVITE_PUSH_NOTIFICATION.format({channelName:(0,d.F6)(c,P.default,I.Z),channelTopic:null==s?void 0:s.topic}),{notif_type:"Stage Speak Invite"},{})}}}}},STAGE_INSTANCE_UPDATE:function(e){var t=e.instance;if(te())return!1;if(!t.send_start_notification)return!1;if(ne(t.channel_id))return!1;var n=P.default.getCurrentUser(),o=C.Z.getGuild(t.guild_id),i=E.Z.getChannel(t.channel_id),a=P.default.getUser(t.host_id);if(null==n||null==i||null==o||null==a)return!1;if(!(0,T.LL)(n,a,i))return!1;if(!S.Z.can(r.Z.combine(D.Plq.CONNECT,D.Plq.VIEW_CHANNEL),i))return!1 ;Z.Z.showNotification(o.getIconURL(128),U.Z.Messages.STAGE_START_PUSH_NOTIFICATION_TITLE.format({guildName:o.name}),U.Z.Messages.STAGE_START_PUSH_NOTIFICATION_BODY.format({username:A.Z.getName(o.id,i.id,a),topic:t.topic}),{notif_type:"STAGE_INSTANCE_CREATE",guild_id:o.id,channel_id:i.id},{onClick:function(){(0,m.Cq)(i)}})},GUILD_SCHEDULED_EVENT_UPDATE:function(e){var t=e.guildScheduledEvent;if(te())return!1;if(null==t.notification_type)return!1;t.notification_type===k.sy.EVENT_START&&(t.entity_type===k.WX.STAGE_INSTANCE||t.entity_type===k.WX.VOICE?function(e){if(te())return!1;var t=e.channel_id;if(null==t)return!1;if(ne(t))return!1;var n=P.default.getCurrentUser(),o=C.Z.getGuild(e.guild_id),i=E.Z.getChannel(e.channel_id),a=P.default.getUser(e.host_id);if(null==n||null==i||null==o||null==a)return!1;if(!S.Z.can(r.Z.combine(D.Plq.CONNECT,D.Plq.VIEW_CHANNEL),i))return!1;Z.Z.showNotification(o.getIconURL(128),U.Z.Messages.GUILD_SCHEDULED_EVENT_STAGE_START_TITLE.format({guildName:o.name }),U.Z.Messages.GUILD_SCHEDULED_EVENT_STAGE_START_BODY.format({topic:e.name,username:A.Z.getName(o.id,i.id,a)}),{notif_type:"GUILD_SCHEDULED_EVENT_UPDATE",guild_id:o.id,channel_id:i.id},{onClick:function(){e.entity_type===k.WX.STAGE_INSTANCE&&(0,m.Cq)(i);e.entity_type===k.WX.VOICE&&f.default.selectVoiceChannel(i.id)}})}(t):t.entity_type===k.WX.EXTERNAL&&function(e){if(te())return!1;var t=P.default.getCurrentUser(),n=C.Z.getGuild(e.guild_id);if(null==t||null==n)return!1;Z.Z.showNotification(n.getIconURL(128),U.Z.Messages.GUILD_SCHEDULED_EVENT_STAGE_START_TITLE.format({guildName:n.name}),U.Z.Messages.GUILD_SCHEDULED_EVENT_EXTERNAL_START_BODY.format({topic:e.name}),{notif_type:"GUILD_SCHEDULED_EVENT_UPDATE",guild_id:n.id},{onClick:function(){c.Z.transitionToGuildSync(e.guild_id);(0,h.bO)({eventId:e.id})}})}(t))},THREAD_CREATE:function(e){var t=e.channel,n=e.isNewlyCreated;if(te())return!1;var r=E.Z.getChannel(t.parent_id);if(null==r||r.type!==D.d4z.GUILD_FORUM)return!1;if(!n)return!1 ;if(!(0,T.FI)(t,r,!X))return!1;var o=(0,p.MC)(t),i=o.author,a=o.user;if(null==a)return!1;var l=C.Z.getGuild(r.guild_id);if(null==l)return!1;var u,c=U.Z.Messages.FORUM_CHANNEL_THREAD_CREATED_PUSH_TITLE_MOBILE.format({channelName:r.name,guildName:l.name}),s=U.Z.Messages.FORUM_CHANNEL_THREAD_CREATED_PUSH_BODY_MOBILE.format({channelName:t.name,userUsername:null!==(u=null==i?void 0:i.nick)&&void 0!==u?u:null==a?void 0:a.username}),f=a.getAvatarURL(void 0,128);Z.Z.showNotification(f,c,s,{notif_type:"THREAD_CREATE",notif_user_id:a.id},{onClick:function(){(0,O.ok)(t)}})},GENERIC_PUSH_NOTIFICATION_SENT:function(e){var t=e.icon,n=e.title,r=e.body,o=e.route,i=e.trackingType,a=e.tag;if(te())return!1;if(null==n||null==r||null==i)return!1;Z.Z.showNotification(t,n,r,{notif_type:i},{onClick:function(){null!=o&&(0,b.uL)(o)},tag:a});return!1},WINDOW_HIDDEN:function(){var e=(0,M.ED)(),t=(0,M.IJ)();if(!(!i.Z.get(Q,!1)&&M.FB&&(e||t)))return!1;var r=!1;null!=J&&(r=$.includes(J));if(!r)return!1 ;Z.Z.showNotification(n(482773),U.Z.Messages.NOTIFICATION_TITLE_DISCORD,U.Z.Messages.NOTIFICATION_BODY_DISCORD_HIDDEN,{notif_type:"WINDOW_HIDDEN"},{overrideStreamerMode:!0,onClick:function(){(0,b.uL)(D.Z5c.SETTINGS(e?"windows":"linux"))},onShown:function(){i.Z.set(Q,!0)}});return!1},LOGOUT:function(){i.Z.remove(Q);return!1},CONNECTION_OPEN:function(e){var t=e.countryCode;J=t}})},489881:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(785893),o=n(667294),i=n(496486),a=n.n(i),l=n(70145),u=n(473708);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t){d=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e} ;return d(e,t)}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&d(e,t)}(n,e);var t=h(n);function n(){c(this,n);return t.apply(this,arguments)}var o=n.prototype;o.componentDidMount=function(){var e=this,t=this.props,n=t.intervalDuration,r=t.onInterval;this._interval=setInterval((function(){ e.forceUpdate();null==r||r()}),n)};o.componentWillUnmount=function(){null!=this._interval&&clearInterval(this._interval)};o.defaultRender=function(e){var t=this.props,n=t.showDays,o=t.showUnits,i=t.className,l=[e.days,e.hours,e.minutes,e.seconds],c=[u.Z.Messages.COUNTDOWN_UNITS_SECONDS,u.Z.Messages.COUNTDOWN_UNITS_MINUTES,u.Z.Messages.COUNTDOWN_UNITS_HOURS,u.Z.Messages.COUNTDOWN_UNITS_DAYS];if(0===e.days)l.shift();else if(!n){var s=l.shift();l[0]+=24*s}var f=a()(l).map((function(e){return e<10?"0".concat(e):e})).map((function(e,t){return[t>0&&!o?":":" ",(0,r.jsxs)("span",{children:[e,o?c[l.length-t-1]:null]},t)]})).flatten().value();return(0,r.jsx)("span",{className:i,children:f})};o.render=function(){var e=this.props,t=e.deadline,n=e.children,o=e.className,i=e.stopAtOneSec;if(t===1/0)return(0,r.jsx)("span",{className:o,"aria-label":u.Z.Messages.MAX_AGE_NEVER,children:"∞"});var a=(0,l.TD)(Date.now(),t,i);return null!=n?n(a,this.defaultRender.bind(this,a)):this.defaultRender(a)} ;return n}(o.PureComponent);y.defaultProps={showDays:!0,showUnits:!1,stopAtOneSec:!1,intervalDuration:1e3};const b=y},470643:(e,t,n)=>{"use strict";n.d(t,{u:()=>C,Z:()=>j});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(248088),u=n(202351),c=n(707961),s=n(760014),f=n(464187),d=n(990554),p=n(2590),h=n(473708),y=n(244414),b=n.n(y);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{ox:()=>w,OZ:()=>x,ZP:()=>P});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(107364),c=n(2590),s=n(952861),f=n.n(s),d=n(518280),p=n.n(d) ;function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return b(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&E(e,t)}function m(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>m});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(173857),u=n.n(l);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function f(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){ if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t){d=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return d(e,t)}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}var y=Object.freeze({SMALL:1,MEDIUM:2,LARGE:4}),b=20,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0, configurable:!0}});t&&d(e,t)}(n,e);var t=h(n);function n(){c(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderCircle=function(){var e=this.props,t=e.strokeSize,n=e.percent,o=e.colorOverride,i=e.background,l=Math.min(Math.max(n,0),100),c=(b-t)/2,s=c*Math.PI*2;return(0,r.jsxs)("svg",{viewBox:"0 0 ".concat(b," ").concat(b),className:u().circle,children:[(0,r.jsx)("circle",{className:u().circleBackgroundAlt,cx:10,cy:10,r:10}),(0,r.jsx)("circle",{className:a()(u().circleBackground,i),cx:10,cy:10,r:(b-2*t)/2}),(0,r.jsx)("circle",{className:u().circleProgress,cx:10,cy:10,r:c,strokeWidth:"".concat(t,"px"),strokeLinecap:"round",transform:"rotate(-90 ".concat(10," ").concat(10,")"),stroke:null!=o?o:"currentColor",style:{strokeDasharray:s,strokeDashoffset:(1-l/100)*s}})]})};o.render=function(){var e=this.props,t=e.className,n=e.children;return(0,r.jsxs)("div",{className:a()(u().progressCircle,t),children:[this.renderCircle(),null!=n?(0,r.jsx)("div",{className:u().circleOverlay, children:n}):null]})};return n}(o.Component);v.StrokeSizes=y;v.defaultProps={strokeSize:y.MEDIUM};const m=v},26708:(e,t,n)=>{"use strict";n.d(t,{W:()=>N,Z:()=>A});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(457217),u=n(798159),c=n(707961),s=n(107364),f=n(443812),d=n(853925),p=n.n(d);function h(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,l,"next",e)}function l(e){h(i,r,o,a,l,"throw",e)}a(void 0)}))}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function m(e){m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return m(e)}function g(e,t){ if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&S(e,t)}function O(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function j(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e,t){S=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return S(e,t)}var I=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))) ;return!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}var w=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;(r=0,o)&&(i=[2&i[0],o.value]);switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:!1};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{iu:()=>S,cy:()=>I,ZP:()=>P});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(652591),c=n(463473),s=n(107364),f=n(2590),d=n(473708),p=n(280350),h=n.n(p);function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function v(e){v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return v(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&j(e,t)}function g(e){ for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){ var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function C(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e,t){j=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return j(e,t)}var S,I,_=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}!function(e){e.CENTER="center" ;e.LEFT="left"}(S||(S={}));!function(e){e.TOP="top";e.MIDDLE="middle"}(I||(I={}));var x=function(e){m(n,e);var t=w(n);function n(){y(this,n);var e;(e=t.apply(this,arguments)).state={confirmed:!1};e.handleDismiss=function(){var t=e.props.onClickComplete;e.setState({confirmed:!0},(function(){return null==t?void 0:t()}))};return e}var o=n.prototype;o.componentDidMount=function(){var e=this.props.uniqueId;u.default.track(f.rMx.SHOW_TUTORIAL,{tutorial:e})};o.componentWillUnmount=function(){u.default.track(f.rMx.CLOSE_TUTORIAL,{tutorial:this.props.uniqueId,acknowledged:this.state.confirmed})};o.render=function(){var e,t,n=this.props,o=n.renderMedia,i=n.textAlign,u=n.isLongText,c=n.title,p=n.body,y=n.className,v=n.forceTheme,m=n.onClickSkipAll,g="string"==typeof p?"p":"div",O=i===S.LEFT||u,E=i===S.CENTER||!O;return(0,r.jsxs)(l.VqE,{className:a()(h().popoutRoot,y),children:[null!=o&&(0,r.jsx)(s.Z,{className:h().mediaContainer,justify:O?s.Z.Justify.START:s.Z.Justify.CENTER,children:o()}),(0, r.jsx)(l.H,{className:a()((e={},b(e,h().titleCenter,E),b(e,h().titleLeft,O),e)),children:c}),(0,r.jsx)(g,{className:a()((t={},b(t,h().bodyCenter,E),b(t,h().bodyLeft,O),t)),children:p}),(0,r.jsxs)(s.Z,{className:h().buttonContainer,justify:O?s.Z.Justify.BETWEEN:s.Z.Justify.CENTER,children:[(0,r.jsx)(l.zxk,{size:l.PhG.SMALL,onClick:this.handleDismiss,children:d.Z.Messages.TUTORIAL_CLOSE}),(0,r.jsx)(l.zxk,{size:l.PhG.SMALL,look:l.zxk.Looks.BLANK,onClick:m,color:v===f.BRd.LIGHT?l.zxk.Colors.PRIMARY:l.zxk.Colors.WHITE,className:O?h().buttonSkipLeftAlign:h().buttonSkipCenterAlign,children:d.Z.Messages.SKIP_ALL_TIPS})]})]})};return n}(o.PureComponent),P=function(e){m(n,e);var t=w(n);function n(){y(this,n);var e;(e=t.apply(this,arguments)).onClickComplete=function(t){t();e.props.onComplete()};e.onClickSkipAll=function(t){var n=e.props,r=n.onSkipAll,o=n.uniqueId;t();r();u.default.track(f.rMx.DISMISS_ALL_TUTORIALS,{tutorial:o})};e.renderPopoutContent=function(t){ var n,o=t.closePopout,i=t.position,l=e.props,u=l.forceTheme,s=l.isLongText,f=l.arrowAlignment,d=null!=l.renderMedia;return(0,r.jsx)(x,O(g({},e.props),{className:a()((n={},b(n,h().bottom,"bottom"===i),b(n,h().contentNarrowNoMedia,!s&&!d),b(n,h().contentNarrowWithMedia,!s&&d),b(n,h().contentWideNoMedia,s&&!d),b(n,h().contentWideWithMedia,s&&d),b(n,h().right,"right"===i),b(n,h().top,"top"===i),b(n,h().left,"left"===i),b(n,h().arrowAlignmentTop,f===I.TOP),b(n,h().arrowAlignmentMiddle,f===I.MIDDLE),b(n,"force-theme",null!=u),n),(0,c.Q)(u)),onClickComplete:function(){return e.onClickComplete(o)},onClickSkipAll:function(){return e.onClickSkipAll(o)}}))};return e}n.prototype.render=function(){var e=this.props,t=(e.renderMedia,e.textAlign,e.onComplete,e.onSkipAll,e.isLongText,e.title,e.body,e.children),n=e.spacing,o=(e.forceTheme, E(e,["renderMedia","textAlign","onComplete","onSkipAll","isLongText","title","body","children","spacing","forceTheme"])),i="top"===o.position||"bottom"===o.position?"center":"top";return(0,r.jsx)(l.yRy,O(g({},o),{align:i,spacing:null!=n?n:0,renderPopout:this.renderPopoutContent,nudgeAlignIntoViewport:!0,children:t}))};return n}(o.PureComponent);P.TextAlignments=S;P.defaultProps={textAlign:S.LEFT}},633997:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(23279),u=n.n(l),c=n(853158),s=n(199731),f=n(859853),d=n(532975),p=n.n(d);function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function b(e){b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return b(e)}function v(e,t){ if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&O(e,t)}function m(e){for(var t=1;t{"use strict";n.d(t,{L:()=>r,Z:()=>v}) ;var r,o=n(785893),i=n(667294),a=n(294184),l=n.n(a),u=n(707961),c=n(587683),s=n(990554),f=n(993137),d=n(109217),p=n.n(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){ Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?32:t,u=e.height,c=void 0===u?32:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){ if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>l});var r=n(785893),o=(n(667294),n(873308));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable })));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e){return(0,r.jsx)(o.Z,a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e) ;t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=e.background,h=l(e,["width","height","color","foreground","background"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){ t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){ var t=e.width,n=void 0===t?32:t,u=e.height,c=void 0===u?32:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.color,n=void 0===t?"currentColor":t,u=e.height,c=void 0===u?24:u,s=e.width,f=void 0===s?24:s,d=l(e,["color","height","width"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){ return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e) ;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e} function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){ var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?20:t,u=e.height,c=void 0===u?20:u,s=e.className,f=l(e,["width","height","className"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){ t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){ var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){ if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){ var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){ if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0, r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){ var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e){for(var t=1;t=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?24:t,i=e.height,c=void 0===i?24:i,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=u(e,["width","height","color","foreground"]);return 16===n||16===c?(0,r.jsxs)("svg",l(a({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{className:d,fill:f,d:"M14 2H16V3H14V5H13V3H11V2H13V0H14V2Z"}),(0,r.jsx)("path",{className:d,fill:f, d:"M6.5 8.00667C7.88 8.00667 9 6.88667 9 5.50667C9 4.12667 7.88 3.00667 6.5 3.00667C5.12 3.00667 4 4.12667 4 5.50667C4 6.88667 5.12 8.00667 6.5 8.00667Z"}),(0,r.jsx)("path",{className:d,fill:f,d:"M6.5 8.34C3.26 8.34 1 9.98666 1 12.34V13.0067H12V12.34C12 9.98 9.74 8.34 6.5 8.34Z"})]})):(0,r.jsx)("svg",l(a({},(0,o.Z)(p)),{width:n,height:c,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{className:d,fill:f,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3H24V5H21V8H19V5H16V3H19V0H21V3ZM10 12C12.205 12 14 10.205 14 8C14 5.795 12.205 4 10 4C7.795 4 6 5.795 6 8C6 10.205 7.795 12 10 12ZM10 13C5.289 13 2 15.467 2 19V20H18V19C18 15.467 14.711 13 10 13Z"})}))}},467853:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0, r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){ var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?18:t,u=e.height,c=void 0===u?18:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?16:t,u=e.height,c=void 0===u?16:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>o});var r=n(785893);n(667294);function o(e){var t=e.width,n=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.color,l=void 0===a?"currentColor":a,u=e.className,c=e.foreground;return(0,r.jsx)("svg",{className:u,width:n,height:i,viewBox:"0 0 16 16",children:(0,r.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,r.jsx)("rect",{width:"16",height:"16"}),(0,r.jsx)("polygon",{className:c,fill:l,points:"12 2.32 10.513 2 4 13.68 5.487 14"})]})})}},203158:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0, configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){ var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=l(e,["width","height","color"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{} ;Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?12:t,u=e.height,c=void 0===u?12:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0, r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){ return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?10:t,u=e.height,c=void 0===u?10:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.className,p=e.foreground,h=l(e,["width","height","color","className","foreground"]);return(0,r.jsx)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))) ;n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){var t=e.width,n=void 0===t?24:t,u=e.height,c=void 0===u?24:u,s=e.color,f=void 0===s?"currentColor":s,d=e.slashColor,p=e.className,h=e.foreground,y=l(e,["width","height","color","slashColor","className","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>u});var r=n(785893),o=(n(667294),n(633878));function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n, enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function a(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function u(e){ var t=e.width,n=void 0===t?32:t,u=e.height,c=void 0===u?32:u,s=e.color,f=void 0===s?"currentColor":s,d=e.foreground,p=l(e,["width","height","color","foreground"]);return(0,r.jsxs)("svg",a(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(336194)),i=n(633878);function a(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function l(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){ return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function c(e){var t=e.width,n=void 0===t?24:t,c=e.height,s=void 0===c?24:c,f=e.color,d=void 0===f?"currentColor":f,p=e.foregroundColor,h=void 0===p?o.Z.unsafe_rawColors.RED_400.css:p,y=e.foreground,b=e.background,v=u(e,["width","height","color","foregroundColor","foreground","background"]);return(0,r.jsxs)("svg",l(function(e){for(var t=1;t{"use strict";n.d(t,{ZT:()=>y,pk:()=>v,XX:()=>m,iv:()=>g,Pb:()=>O,M9:()=>E,ZP:()=>C});var r=n(785893),o=(n(667294), n(294184)),i=n.n(o),a=n(496486),l=n.n(a),u=n(707961),c=n(67826),s=n.n(c);function f(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function d(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(778613),c=n(2590),s=n(473708),f=n(150814),d=n.n(f),p=n(518280),h=n.n(p);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Z:()=>p});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(211482),u=n(987687),c=n.n(u);function s(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function f(e,t){t=null!=t?t:{};Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,r)}return n }(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n])}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}function p(e){var t=e.tooltipText,n=e.children,o=e.onContextMenu,u=e.onClick,p=e.disabled,h=e.icon,y=e.iconForeground,b=e.innerClassName,v=e.tooltipClassName,m=e.onMouseEnter,g=e.onMouseLeave,O=e["aria-label"],E=e["aria-checked"],C=e.role,j=e.tooltipColor,S=e.tooltipForceOpen,I=(0,r.jsx)(h,{width:20,height:20,foreground:y});return(0,r.jsx)(a.ua7,{tooltipClassName:v,text:t,"aria-label":O,color:j,forceOpen:S,children:function(e){ var t,h=e.onClick,y=e.onMouseEnter,v=e.onMouseLeave,O=d(e,["onClick","onMouseEnter","onMouseLeave"]);return(0,r.jsxs)(a.zxk,f(function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>c}) ;var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(777051),u=n.n(l);function c(e){var t=e.children,n=e.className;return(0,r.jsx)(a.xvT,{color:"none",className:i()(u().subtext,n),variant:"text-xs/normal",children:t})}},984479:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(785893),o=(n(667294),n(294184)),i=n.n(o),a=n(707961),l=n(153806),u=n.n(l);function c(e){var t=e.children,n=e.className;return(0,r.jsx)(a.xvT,{color:"none",className:i()(u().title,n),variant:"text-sm/normal",children:t})}},661782:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(308377),c=n(554647),s=n(211482),f=n(629978),d=n.n(f);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function y(e){y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){ return e.__proto__||Object.getPrototypeOf(e)};return y(e)}function b(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t){v=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return v(e,t)}var m,g=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}!function(e){e[e.OUTGOING=0]="OUTGOING";e[e.INCOMING=1]="INCOMING"}(m||(m={}));var E=function(e){!function(e,t){ if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&v(e,t)}(n,e);var t=O(n);function n(){p(this,n);return t.apply(this,arguments)}var o=n.prototype;o.renderStatus=function(){var e=this.props,t=e.muted,n=e.deafen,o=n?u.Z:c.Z;return t||n?(0,r.jsx)(o,{className:d().status},"status"):null};o.renderBorder=function(){var e=this.props.speaking;return(0,r.jsx)("div",{className:a()(d().border,h({},d().speaking,e))},"border")};o.renderVoiceCallAvatar=function(){var e=this.props,t=e.src,n=e.disabled,o=e.ringing,i=e.ringingType,u=e.avatarClassName,c=e.muted,f=e.deafen,p=e.size,y=e.renderIcon,b=(0,l.pxk)(p),v=(0,r.jsx)("img",{src:t,alt:" ",className:a()(d().voiceAvatar,u,h({},d().ringingOutgoing,o&&i===m.OUTGOING))});if(n)return v;var g=s.QS.AVATAR_DEFAULT ;null!=y?g=p===l.EFr.SIZE_32?s.QS.AVATAR_CALL_ICON_32:s.QS.AVATAR_CALL_ICON:(c||f)&&(g=s.QS.AVATAR_VOICE_CALL_80);return(0,r.jsxs)("div",{className:d().callAvatarMaskContainer,children:[(0,r.jsxs)(s.ZP,{className:d().callAvatarMask,width:b,height:b,mask:g,children:[null==y?void 0:y(),v]}),c||f?this.renderStatus():this.renderBorder()]})};o.render=function(){var e,t=this.props,n=t.size,o=t.onClick,i=t.style,u=t.onContextMenu,c=t.className,s=t.ringingType,f=t.ringing,p=a()(d().wrapper,(h(e={},d().clickable,null!=o),h(e,d().ringingOutgoing,f&&s===m.OUTGOING),h(e,d().ringingIncoming,f&&s===m.INCOMING),e),c),y=(0,l.pxk)(n),b=function(e){for(var t=1;t{"use strict";n.d(t,{e:()=>N,Z:()=>T});var r=n(785893),o=n(667294),i=n(294184),a=n.n(i),l=n(707961),u=n(807801),c=n(542231),s=n(781736),f=n(532378),d=n(308377),p=n(554647),h=n(423871),y=n(753724),b=n(108206),v=n(977005),m=n(2590),g=n(550677),O=n(473708),E=n(754012),C=n.n(E);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function I(e){I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return I(e)}function _(e,t){ return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e,t){w=Object.setPrototypeOf||function(e,t){e.__proto__=t;return e};return w(e,t)}var x=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}var N=function(e){var t=e.children,n=e.collapsed,o=void 0!==n&&n,i=e.className;return(0,r.jsx)("div",{className:a()(i,C().list,o?C().listCollapse:C().listDefault),role:"group",children:t})},A=function(e){ !function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&w(e,t)}(n,e);var t=P(n);function n(){j(this,n);var e;(e=t.apply(this,arguments)).handleClick=function(t){var n=e.props,r=n.onClick,o=n.user;null==r||r(t,o)};e.handleDoubleClick=function(t){var n=e.props,r=n.onDoubleClick,o=n.user;null==r||r(t,o)};e.handleContextMenu=function(t){var n=e.props,r=n.onContextMenu,o=n.user;null==r||r(t,o)};e.handleMouseLeave=function(t){var n=e.props,r=n.onMouseLeave,o=n.user;null==r||r(t,o)};e.handleMouseEnter=function(t){var n=e.props,r=n.onMouseEnter,o=n.user;null==r||r(t,o)};e.handleMouseDown=function(t){var n=e.props,r=n.onMouseDown,o=n.user;null==r||r(t,o)};return e}var o=n.prototype;o.renderPrioritySpeaker=function(){var e=this.props,t=e.speaking,n=e.priority,o=e.collapsed,i=e.mute,u=e.serverMute;return n&&!o?(0,r.jsx)(l.ua7,{ text:O.Z.Messages.PRIORITY_SPEAKER,children:function(e){return(0,r.jsx)("div",function(e){for(var t=1;t{"use strict";n.d(t,{oo:()=>p,I3:()=>h,yp:()=>y,d9:()=>b});var r=n(785893),o=n(667294),i=n(717187),a=n.n(i),l=n(930948);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{LL:()=>P,eF:()=>N,N_:()=>A,FI:()=>T,Xi:()=>R}) ;var r=n(773011),o=n(296602),i=n(944522),a=n(996344),l=n(30027),u=n(435949),c=n(791707),s=n(487685),f=n(665783),d=n(382060),p=n(804185),h=n(61209),y=n(567403),b=n(563367),v=n(840922),m=n(715107),g=n(464187),O=n(436154),E=n(9430),C=n(473903),j=n(661123),S=n(773148),I=n(674301),_=n(2590),w=n(379364),x=n(473708);function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t.hasFlag(_.xW$.SPAMMER))return!1;if(n.isManaged())return!1;var a=n.getGuildId();return(null==a||!i.Z.isLurking(a))&&(t.id!==e.id&&(!v.Z.isBlocked(t.id)&&(!(!r&&O.Z.getStatus()===_.Skl.DND)&&!(!o&&E.Z.allowNoMessages(n)))))}function N(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(null!=e.flags&&(0,j.yE)(e.flags,_.iLy.SUPPRESS_NOTIFICATIONS))return!1;var o=h.Z.getChannel(t);e.type===_.uaV.THREAD_STARTER_MESSAGE&&(o=h.Z.getChannel(null==o?void 0:o.parent_id)) ;var i=C.default.getCurrentUser(),l=C.default.getUser(e.author.id);if(null==o||null==i||null==l)return!1;if(o.type===_.d4z.GROUP_DM&&e.type===_.uaV.RECIPIENT_REMOVE)return!1;if(!P(i,l,o,r))return!1;if(a.Z.isMessageRequest(t))return!1;if(!n){var c=m.Z.getChannelId(g.Z.getGuildId());if(c===o.id)return!1;if(p.ZP.getCurrentSidebarChannelId(c)===o.id)return!1}if(d.Ec.has(o.type)){if(s.Z.isMuted(o.id))return!1;var y=(0,f.J)(o);return y!==w.iN.NO_MESSAGES&&(y===w.iN.ALL_MESSAGES||(0,u.Hl)({rawMessage:e,userId:i.id,suppressEveryone:!1,suppressRoles:!1}))}var v=!d.tx.has(o.type)||b.Z.getChannelId()===o.id;if(E.Z.allowAllMessages(o)&&v)return!0;var O=E.Z.isSuppressEveryoneEnabled(o.getGuildId()),S=E.Z.isSuppressRolesEnabled(o.getGuildId());return(0,u.Hl)({rawMessage:e,userId:i.id,suppressEveryone:O,suppressRoles:S})}function A(e,t){if(m.Z.getChannelId(g.Z.getGuildId())!==t)return!1;var n=h.Z.getChannel(t);e.type===_.uaV.THREAD_STARTER_MESSAGE&&(n=h.Z.getChannel(null==n?void 0:n.parent_id)) ;var r=C.default.getCurrentUser(),o=C.default.getUser(e.author.id);return null!=n&&null!=r&&null!=o&&(!n.isManaged()&&(!o.hasFlag(_.xW$.SPAMMER)&&(!v.Z.isBlocked(o.id)&&(o.id!==r.id&&(O.Z.getStatus()!==_.Skl.DND&&!E.Z.allowNoMessages(n))))))}function T(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=C.default.getCurrentUser(),i=C.default.getUser(e.ownerId);if(null==t||null==o||null==i)return!1;if(!P(o,i,t,r,!0))return!1;if(E.Z.isGuildOrCategoryOrChannelMuted(t.guild_id,t.id))return!1;if(!n){var a=m.Z.getChannelId(g.Z.getGuildId());if(a===t.id)return!1}return E.Z.getNewForumThreadsCreated(t)}var Z=function(e,t,n){return"".concat(e," (").concat((0,r.F6)(t,C.default,v.Z,!0)).concat(null!=n?", ".concat((0,r.F6)(n,C.default,v.Z)):"",")")};function M(e,t,n,r){switch(e.type){case _.d4z.GUILD_ANNOUNCEMENT:case _.d4z.GUILD_TEXT:return t;case _.d4z.GROUP_DM:return n;case _.d4z.DM:default:return r}} function R(e,t,n){var i=S.Z.getName(e.getGuildId(),e.id,n),a=i;switch(e.type){case _.d4z.GUILD_ANNOUNCEMENT:case _.d4z.GUILD_TEXT:case _.d4z.GUILD_VOICE:case _.d4z.ANNOUNCEMENT_THREAD:case _.d4z.PUBLIC_THREAD:case _.d4z.PRIVATE_THREAD:var u=h.Z.getChannel(e.parent_id);if(t.type===_.uaV.THREAD_STARTER_MESSAGE&&null!=u)a=Z(a,u,h.Z.getChannel(u.parent_id));else if((0,c.Z)(t)){null!=y.Z.getGuild(e.getGuildId())&&(a=Z(a,e,u))}else a=Z(a,e,u);break;case _.d4z.GROUP_DM:e.isManaged()&&n.bot&&a===(0,r.F6)(e,C.default,v.Z)||(a="".concat(a," (").concat((0,r.F6)(e,C.default,v.Z,!0),")"))}var s,f=t.content;if((0,c.Z)(t)&&null==(f=I.Z.stringify(t,e))){new o.Z("NotificationTextUtils").warn("SystemMessageUtils.stringify(...) could not convert",t);throw new Error("failed to stringify system message")}var d,p=null!==(s=t.sticker_items)&&void 0!==s?s:t.stickers ;if(null!=t.activity&&null!=t.application)d=t.activity.type===_.mFx.JOIN?M(e,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GUILD_ACTIVITY_JOIN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GROUP_DM_ACTIVITY_JOIN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN).format({user:i,game:t.application.name}):t.activity.type===_.mFx.JOIN_REQUEST?M(e,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_JOIN_REQUEST).format({user:i,game:t.application.name}):"";else if(null!=t.activity&&t.activity.type===_.mFx.LISTEN){d=M(e,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GUILD_ACTIVITY_LISTEN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_GROUP_DM_ACTIVITY_LISTEN,x.Z.Messages.NOTIFICATION_MESSAGE_CREATE_DM_ACTIVITY_LISTEN).format({user:i})}else d=null!=p&&p.length>0?x.Z.Messages.STICKER_NOTIFICATION_BODY.format({stickerName:p[0].name }):t.type===_.uaV.PREMIUM_REFERRAL?x.Z.Messages.SHARE_NITRO_EMBEDDED_MESSAGE_BODY_SHORT.format({username:n.username}):l.ZP.unparse(f,e.id,!0);0===d.length&&(d=function(e){if(e.embeds.length>0){var t=e.embeds[0];if(null!=t.description)return null!=t.title?"".concat(t.title," ").concat(t.description):t.description;if(null!=t.title)return t.title;if(null!=t.fields){var n=t.fields[0];return"".concat(n.name," ").concat(n.value)}}var r;if((0,j.yE)(null!==(r=e.flags)&&void 0!==r?r:0,_.iLy.IS_VOICE_MESSAGE))return x.Z.Messages.VOICE_MESSAGES_SENT_NOTIFICATION;if(e.attachments.length>0){var o=e.attachments[0].filename;return x.Z.Messages.NOTIFICATION_BODY_ATTACHMENT.format({filename:o})}return""}(t));return{icon:n.getAvatarURL(e.guild_id,128),title:a,body:d}}},374092:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});n(895072);const r=n(895072).Z},2255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2590),o=n(473708);const i={getStatus:function(e){ var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e){case r.hes.CONNECTING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_CONNECTING;break;case r.hes.AUTHENTICATING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_AUTHENTICATING;break;case r.hes.AWAITING_ENDPOINT:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_AWAITING_ENDPOINT;break;case r.hes.RTC_CONNECTED:t=r.QKv.CONNECTED;n=i?o.Z.Messages.CONNECTION_STATUS_VIDEO_CONNECTED:o.Z.Messages.CONNECTION_STATUS_VOICE_CONNECTED;break;case r.hes.RTC_CONNECTING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_RTC_CONNECTING;break;case r.hes.ICE_CHECKING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_ICE_CHECKING;break;case r.hes.DTLS_CONNECTING:t=r.QKv.CONNECTING;n=o.Z.Messages.CONNECTION_STATUS_DTLS_CONNECTING;break;case r.hes.NO_ROUTE:t=r.QKv.ERROR;n=o.Z.Messages.CONNECTION_STATUS_NO_ROUTE;break;case r.hes.RTC_DISCONNECTED:t=r.QKv.ERROR;n=o.Z.Messages.CONNECTION_STATUS_RTC_DISCONNECTED;break ;case r.hes.DISCONNECTED:default:t=r.QKv.ERROR;n=o.Z.Messages.CONNECTION_STATUS_DISCONNECTED}return{connectionStatus:t,connectionStatusText:n}},getShortHostname:function(e){return null==e?"":e.split(".")[0]}}},455049:(e,t,n)=>{"use strict";n.r(t);n.d(t,{default:()=>b});var r=n(120637),o=n(496486),i=n.n(o);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)return!1 ;var t=0,n=e.split("\n"),r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;if(u.length>1e3)return!1;null==u.match(/^\s*[/][/]/)&&null!=u.match(/[^/]/)&&(t=0);var c=u.match(/[/]/g);if(null!=c&&(t+=c.length)>30)return!1}}catch(e){o=!0;i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return!0}(t))return null;var o=Date.now(),i=r.Z.highlight(e,t,n);Date.now();0;return i},hasLanguage:function(e){return null!=r.Z.getLanguage(e)}};var v=i().repeat("/",15)},495036:(e,t,n)=>{"use strict";n.r(t);n.d(t,{getSelectionText:()=>f,contextMenuCallbackNative:()=>d,contextMenuCallbackWeb:()=>p});var r=n(785893),o=(n(667294),n(971402));function i(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){i(a,r,o,l,u,"next",e)}function u(e){i(a,r,o,l,u,"throw",e)}l(void 0) }))}}function l(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}function u(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";n.d(t,{Z:()=>Z});var r=n(496486),o=n.n(r),i=n(131795),a=n.n(i),l=n(306472),u=n(288263),c=n(793461),s=n(652591),f=n(120415),d=n(716118),p=n(310126),h=n(2590);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10||parseInt(j)>=15063}var S=m&&O||"Chrome"===a().name&&parseFloat(a().version)<47||"Firefox"===a().name&&parseFloat(a().version)<52,I=o().throttle(d.GN,1e3,{leading:!0});function _(){ p.default.flashFrame(!1)}if(m){window.addEventListener("focus",_);p.default.on("MAIN_WINDOW_FOCUS",_)}var w=window.Notification;if(g){var x,P={};p.default.on("NOTIFICATION_CLICK",(function(e,t){var n=P[t];if(null!=n){n.onclick();n.close()}}));p.default.send("NOTIFICATIONS_CLEAR");w=((x=function(){function e(t,n){var r=n.body,o=n.icon,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);this.id=w._id++;this.onshow=function(){};this.onclick=function(){};this.onclose=function(){};this.title=t;this.body=r;this.icon=o;setImmediate((function(){return i.onshow()}));P[this.id]=this;p.default.send("NOTIFICATION_SHOW",{id:this.id,title:this.title,body:this.body,icon:this.icon})}e.prototype.close=function(){if(null!=P[this.id]){delete P[this.id];p.default.send("NOTIFICATION_CLOSE",this.id);this.onclose()}};e.requestPermission=function(e){e()};return e}()).permission="granted",x._id=0,x)}function N(){return null!=w&&"granted"===w.permission} function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;e.includes("message")?I(e,t):(0,d.GN)(e,t)}function T(e){return c.Z.disableNotifications&&null==e.overrideStreamerMode||!N()||f.FB&&!p.default.shouldDisplayNotifications()}const Z={hasPermission:N,requestPermission:function(e){null!=w&&w.requestPermission((function(){null!=e&&e(N())}))},showNotification:function(e,t,n,r,i){var a;if(!T(i)){if(null!=i.sound){var l;A(i.sound,null!==(l=i.volume)&&void 0!==l?l:1)}var c,d=null!==(c=null==i?void 0:i.tag)&&void 0!==c?c:null;(0,f.IJ)()&&(n=o().escape(n));var y,b={icon:e,body:n,tag:d,silent:!0};m&&u.Z.taskbarFlash&&p.default.flashFrame(!0);try{y=new w(t,b)}catch(e){return null}null===(a=i.onShown)||void 0===a||a.call(i);i.omitViewTracking||s.default.track(h.rMx.NOTIFICATION_VIEWED,r);y.onclick=function(){var e;if(f.FB)p.default.focus();else{window.focus();y.close()}i.omitClickTracking||s.default.track(h.rMx.NOTIFICATION_CLICKED,r) ;null===(e=i.onClick)||void 0===e||e.call(i)};S&&setTimeout((function(){return y.close()}),5e3);return O?y:{close:function(){var e;null==y||null===(e=y.onclose)||void 0===e||e.call(y)}}}if(null!=i.sound&&!1!==i.playSoundIfDisabled){var v;A(i.sound,null!==(v=i.volume)&&void 0!==v?v:1)}},disabled:T}},15084:(e,t,n)=>{"use strict";n.d(t,{G:()=>O,d:()=>E});var r=n(247250),o=n(567867),i=n(268319),a=n(444663),l=n(474717),u=n(396043),c=n(566706),s=n(255592),f=n(473903),d=n(652591),p=n(275374),h=n(850841),y=n(99181),b=n(2590),v=n(493254),m=n(203600),g=n(473708);function O(e,t){var n=f.default.getCurrentUser(),r=e.getGuildId(),o=p.dg(r),i=[],l=0,c=0,s=0,d=[],O=!0,E=!1,C=void 0;try{for(var j,S=t[Symbol.iterator]();!(O=(j=S.next()).done);O=!0){var I=j.value;s+=1;l+=I.size;i.push(I.size);I.size>c&&(c=I.size);null!=I.type?d.push(I.type):d.push("unknown")}}catch(e){E=!0;C=e}finally{try{O||null==S.return||S.return()}finally{if(E)throw C}}if(c>o){(0,u.yw)(b.rMx.FILE_SIZE_LIMIT_EXCEEDED,{ channel_id:e.id,guild_id:r,user_individual_file_size_limit:o,pre_compression_file_sizes:i,pre_compression_aggregate_file_size:l,num_attachments:s,error_type:v.xi.UPLOAD_ATTACHMENT_MAX_SIZE_ERROR,attachment_mimetypes:d});(0,a.openUploadError)({title:g.Z.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:(0,y.BK)(n,r),showPremiumUpsell:!(0,h.M5)(n,m.p9.TIER_2),fileSize:c})}else(0,a.openUploadError)({title:g.Z.Messages.UPLOAD_AREA_TOO_LARGE_TITLE,help:g.Z.Messages.UPLOAD_AREA_REQUEST_LIMIT_HELP.format({maxSize:p.Ng(p.OC())})})}function E(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},f=u.requireConfirm,p=void 0===f||f,h=u.showLargeMessageDialog,v=void 0!==h&&h;if(!(e.length<1)){var m=t.getGuildId();if((0,y.Bf)(e,m))O(t,e);else if(s.Z.getUploadCount(t.id,n)+e.length>b.dN1){(0,a.openUploadError)({title:g.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_TITLE,help:g.Z.Messages.ATTACHMENT_TOO_MANY_ERROR_MESSAGE.format({limit:b.dN1})});d.default.track(b.rMx.UPLOAD_FILE_LIMIT_ERROR,{ existing_count:s.Z.getUploadCount(t.id,n),new_count:e.length})}else{t.type!==b.d4z.GUILD_VOICE&&t.type!==b.d4z.GUILD_STAGE_VOICE||c.Z.getChatOpen(t.id)||r.Z.updateChatOpen(t.id,!0);if(p){var E=Array.from(e).map((function(e){return{file:e,platform:l.ow.WEB}}));o.Z.addFiles({files:E,channelId:t.id,showLargeMessageDialog:v,draftType:n})}else i.Z.instantBatchUpload(t.id,e,n)}}}},99181:(e,t,n)=>{"use strict";n.d(t,{BK:()=>u,Bf:()=>c,KZ:()=>s});var r=n(474717),o=n(275374),i=n(850841),a=n(203600),l=n(473708);function u(e,t){var n=o.Ng(o.dg(t));return i.ZP.isPremium(e,a.p9.TIER_2)?l.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:n}):i.ZP.isPremium(e,a.p9.TIER_1)?l.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP_PREMIUM_TIER_1.format({maxSize:n}):l.Z.Messages.UPLOAD_AREA_TOO_LARGE_HELP.format({maxSize:n})}function c(e,t){return o.nA(e,t)||o.vY(e)}function s(e){return e.reduce((function(e,t){t.item.platform===r.ow.WEB&&e.push(t.item.file);return e}),[])}},962392:(e,t,n)=>{"use strict";n.d(t,{ Z:()=>o});var r=n(304275);function o(){var e=r.Z.getFocusedPID();return null==e||!r.Z.isReady(e)&&!r.Z.isCrashed(e)?null:e}}}]); //# sourceMappingURL=9321e84850c69a25237d.js.map