diff --git a/code/_globalvars/_regexes.dm b/code/_globalvars/_regexes.dm index f8164336759..505628f9732 100644 --- a/code/_globalvars/_regexes.dm +++ b/code/_globalvars/_regexes.dm @@ -1,4 +1,5 @@ GLOBAL_DATUM_INIT(filename_forbidden_chars, /regex, regex(@{""|[\\\n\t/?%*:|<>]|\.\."}, "g")) GLOBAL_DATUM_INIT(is_color, /regex, regex("^#\[0-9a-fA-F]{6}$")) GLOBAL_DATUM_INIT(regex_rgb_text, /regex, regex(@"^#?(([0-9a-fA-F]{8})|([0-9a-fA-F]{6})|([0-9a-fA-F]{3}))$")) +GLOBAL_DATUM_INIT(is_http_protocol, /regex, regex("^https?://")) GLOBAL_PROTECT(filename_forbidden_chars) diff --git a/code/controllers/configuration/sections/system_configuration.dm b/code/controllers/configuration/sections/system_configuration.dm index ea84dd4313d..32a8ce6dd2b 100644 --- a/code/controllers/configuration/sections/system_configuration.dm +++ b/code/controllers/configuration/sections/system_configuration.dm @@ -30,6 +30,8 @@ var/list/region_map = list() /// Send a system toast on init completion? var/toast_on_init_complete = FALSE + /// The URL for a ss13-yt-wrap server (https://github.com/Absolucy/ss13-yt-wrap) to use. + var/ytdlp_url = null /datum/configuration_section/system_configuration/load_data(list/data) // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line @@ -50,6 +52,7 @@ CONFIG_LOAD_STR(internal_ip, data["internal_ip"]) CONFIG_LOAD_STR(override_map, data["override_map"]) + CONFIG_LOAD_STR(ytdlp_url, data["ytdlp_url"]) // Load region overrides if(islist(data["regional_servers"])) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 74c98524134..0789af8ef8b 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -81,7 +81,8 @@ GLOBAL_LIST_INIT(admin_verbs_sounds, list( /client/proc/play_server_sound, /client/proc/play_intercomm_sound, /client/proc/stop_global_admin_sounds, - /client/proc/stop_sounds_global + /client/proc/stop_sounds_global, + /client/proc/play_web_sound )) GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/object_talk, diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 117b8981dba..78784e7028f 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -12,6 +12,8 @@ GLOBAL_LIST_EMPTY(sounds_cache) message_admins("[key_name_admin(src)] stopped admin sounds.", 1) for(var/mob/M in GLOB.player_list) M << awful_sound + var/client/C = M.client + C?.tgui_panel?.stop_music() /client/proc/play_sound(S as sound) set category = "Event" @@ -127,3 +129,108 @@ GLOBAL_LIST_EMPTY(sounds_cache) SEND_SOUND(M, sound(null)) var/client/C = M.client C?.tgui_panel?.stop_music() + +/client/proc/play_web_sound() + set category = "Event" + set name = "Play Internet Sound" + if(!check_rights(R_SOUNDS)) + return + + if(!GLOB.configuration.system.ytdlp_url) + to_chat(src, "yt-dlp was not configured, action unavailable") //Check config + return + + + var/web_sound_input = tgui_input_text(src, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound", null) + if(istext(web_sound_input)) + var/web_sound_url = "" + var/stop_web_sounds = FALSE + var/list/music_extra_data = list() + if(length(web_sound_input)) + web_sound_input = trim(web_sound_input) + if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol)) + to_chat(src, "Non-http(s) URIs are not allowed.") + to_chat(src, "For yt-dlp shortcuts like ytsearch: please use the appropriate full url from the website.") + return + + // Prepare the body + var/list/request_body = list("url" = web_sound_input) + // Send the request off + var/datum/http_request/media_poll_request = new() + // The fact we are using GET with a body offends me + media_poll_request.prepare(RUSTG_HTTP_METHOD_GET, GLOB.configuration.system.ytdlp_url, json_encode(request_body)) + // Start it off and wait + media_poll_request.begin_async() + UNTIL(media_poll_request.is_complete()) + var/datum/http_response/media_poll_response = media_poll_request.into_response() + + if(media_poll_response.status_code == 200) + var/list/data + try + data = json_decode(media_poll_response.body) + catch(var/exception/e) + to_chat(src, "yt-dlp JSON parsing FAILED:") + to_chat(src, "[e]: [media_poll_response.body]") + return + + if(data["sound_url"]) + web_sound_url = data["sound_url"] + var/title = "[data["title"]]" + var/webpage_url = title + if(data["webpage_url"]) + webpage_url = "[title]" + music_extra_data["start"] = data["start"] + music_extra_data["end"] = data["end"] + music_extra_data["link"] = data["webpage_url"] + music_extra_data["title"] = data["title"] + + var/res = tgui_alert(src, "Show the title of and link to this song to the players?\n[title]", "Show Info?", list("Yes", "No", "Cancel")) + switch(res) + if("Yes") + log_admin("[key_name(src)] played web sound: [web_sound_input]") + message_admins("[key_name(src)] played web sound: [web_sound_input]") + to_chat(world, "[src.ckey] played: [webpage_url]") + if("No") + music_extra_data["link"] = "Song Link Hidden" + music_extra_data["title"] = "Song Title Hidden" + music_extra_data["artist"] = "Song Artist Hidden" + log_admin("[key_name(src)] played web sound: [web_sound_input]") + message_admins("[key_name(src)] played web sound: [web_sound_input]") + to_chat(world, "[src.ckey] played an internet sound") + if("Cancel") + return + + SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Internet Sound") + + else + to_chat(src, "yt-dlp URL retrieval FAILED:") + to_chat(src, "[media_poll_response.body]") + + else //pressed ok with blank + log_admin("[key_name(src)] stopped web sound") + message_admins("[key_name(src)] stopped web sound") + web_sound_url = null + stop_web_sounds = TRUE + + if(web_sound_url && !findtext(web_sound_url, GLOB.is_http_protocol)) + to_chat(src, "BLOCKED: Content URL not using http(s) protocol", confidential = TRUE) + to_chat(src, "The media provider returned a content URL that isn't using the HTTP or HTTPS protocol", confidential = TRUE) + return + + if(web_sound_url || stop_web_sounds) + for(var/mob/M in GLOB.player_list) + var/client/C = M.client + var/this_uid = M.client.UID() + if(stop_web_sounds) + C.tgui_panel?.stop_music() + continue + if(C.prefs.sound & SOUND_MIDI) + if(ckey in M.client.prefs.admin_sound_ckey_ignore) + to_chat(C, "But [src.ckey] is muted locally in preferences!") + continue + else + C.tgui_panel?.play_music(web_sound_url, music_extra_data) + to_chat(C, "(SILENCE) (ALWAYS SILENCE THIS ADMIN)") + else + to_chat(C, "But Admin MIDIs are disabled in preferences!") + return diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index ef2df0b49f7..eab2ae63656 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -192,10 +192,12 @@ if("silenceSound") usr.stop_sound_channel(CHANNEL_ADMIN) + tgui_panel?.stop_music() return if("muteAdmin") usr.stop_sound_channel(CHANNEL_ADMIN) + tgui_panel?.stop_music() prefs.admin_sound_ckey_ignore |= href_list["a"] to_chat(usr, "You will no longer hear admin playsounds from [href_list["a"]]. To remove them, go to Preferences --> Manage Admin Sound Mutes.") prefs.save_preferences(src) diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 081f8981d94..698286bece9 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -322,6 +322,7 @@ set category = "Special Verbs" set desc = "Silence the current admin midi playing" usr.stop_sound_channel(CHANNEL_ADMIN) + tgui_panel?.stop_music() to_chat(src, "The current admin midi has been silenced") /datum/preference_toggle/toggle_runechat diff --git a/code/modules/tgui/tgui_panel/audio.dm b/code/modules/tgui/tgui_panel/audio.dm index 1659f336683..b91dc6bd5a7 100644 --- a/code/modules/tgui/tgui_panel/audio.dm +++ b/code/modules/tgui/tgui_panel/audio.dm @@ -22,6 +22,8 @@ /datum/tgui_panel/proc/play_music(url, extra_data) if(!is_ready()) return + if(!findtext(url, GLOB.is_http_protocol)) + return var/list/payload = list() if(length(extra_data) > 0) for(var/key in extra_data) diff --git a/config/example/config.toml b/config/example/config.toml index 99a8033da5e..9c72c8594fe 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -751,6 +751,8 @@ regional_servers = [ ] # Send a toast on server init completion. You probably dont need this on in production toast_on_init_complete = true +# The URL for a ss13-yt-wrap server (https://github.com/Absolucy/ss13-yt-wrap) to use. +#ytdlp_url = "http://ytdlpserverurlhere" ################################################################ diff --git a/tgui/packages/tgui-panel/audio/player.js b/tgui/packages/tgui-panel/audio/player.js deleted file mode 100644 index 3f3209d767a..00000000000 --- a/tgui/packages/tgui-panel/audio/player.js +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @file - * @copyright 2020 Aleksej Komarov - * @license MIT - */ - -import { createLogger } from 'tgui/logging'; - -const logger = createLogger('AudioPlayer'); - -export class AudioPlayer { - constructor() { - // Set up the HTMLAudioElement node - this.node = document.createElement('audio'); - this.node.style.setProperty('display', 'none'); - document.body.appendChild(this.node); - // Set up other properties - this.playing = false; - this.volume = 1; - this.options = {}; - this.onPlaySubscribers = []; - this.onStopSubscribers = []; - // Listen for playback start events - this.node.addEventListener('canplaythrough', () => { - logger.log('canplaythrough'); - this.playing = true; - this.node.playbackRate = this.options.pitch || 1; - this.node.currentTime = this.options.start || 0; - this.node.volume = this.volume; - this.node.play(); - for (let subscriber of this.onPlaySubscribers) { - subscriber(); - } - }); - // Listen for playback stop events - this.node.addEventListener('ended', () => { - logger.log('ended'); - this.stop(); - }); - // Listen for playback errors - this.node.addEventListener('error', (e) => { - if (this.playing) { - logger.log('playback error', e.error); - this.stop(); - } - }); - // Check every second to stop the playback at the right time - this.playbackInterval = setInterval(() => { - if (!this.playing) { - return; - } - const shouldStop = this.options.end > 0 && this.node.currentTime >= this.options.end; - if (shouldStop) { - this.stop(); - } - }, 1000); - } - - destroy() { - if (!this.node) { - return; - } - this.node.stop(); - document.removeChild(this.node); - clearInterval(this.playbackInterval); - } - - play(url, options = {}) { - if (!this.node) { - return; - } - logger.log('playing', url, options); - this.options = options; - this.node.src = url; - } - - stop() { - if (!this.node) { - return; - } - if (this.playing) { - for (let subscriber of this.onStopSubscribers) { - subscriber(); - } - } - logger.log('stopping'); - this.playing = false; - this.node.src = ''; - } - - setVolume(volume) { - if (!this.node) { - return; - } - this.volume = volume; - this.node.volume = volume; - } - - onPlay(subscriber) { - if (!this.node) { - return; - } - this.onPlaySubscribers.push(subscriber); - } - - onStop(subscriber) { - if (!this.node) { - return; - } - this.onStopSubscribers.push(subscriber); - } -} diff --git a/tgui/packages/tgui-panel/audio/player.ts b/tgui/packages/tgui-panel/audio/player.ts new file mode 100644 index 00000000000..a46dc664fb7 --- /dev/null +++ b/tgui/packages/tgui-panel/audio/player.ts @@ -0,0 +1,97 @@ +/** + * @file + * @copyright 2020 Aleksej Komarov + * @license MIT + */ + +import { createLogger } from 'tgui/logging'; + +const logger = createLogger('AudioPlayer'); + +type AudioOptions = { + pitch?: number; + start?: number; + end?: number; +}; + +export class AudioPlayer { + element: HTMLAudioElement | null; + options: AudioOptions; + volume: number; + + onPlaySubscribers: { (): void }[]; + onStopSubscribers: { (): void }[]; + + constructor() { + this.element = null; + + this.onPlaySubscribers = []; + this.onStopSubscribers = []; + } + + destroy() { + this.element = null; + } + + play(url: string, options: AudioOptions = {}) { + if (this.element) { + this.stop(); + } + + this.options = options; + + const audio = (this.element = new Audio(url)); + audio.volume = this.volume; + audio.playbackRate = this.options.pitch || 1; + + logger.log('playing', url, options); + + audio.addEventListener('ended', () => { + logger.log('ended'); + this.stop(); + }); + + audio.addEventListener('error', (error) => { + logger.log('playback error', error); + }); + + if (this.options.end) { + audio.addEventListener('timeupdate', () => { + if (this.options.end && this.options.end > 0 && audio.currentTime >= this.options.end) { + this.stop(); + } + }); + } + + audio.play(); + + this.onPlaySubscribers.forEach((subscriber) => subscriber()); + } + + stop() { + if (!this.element) return; + + logger.log('stopping'); + + this.element.pause(); + this.element = null; + + this.onStopSubscribers.forEach((subscriber) => subscriber()); + } + + setVolume(volume: number): void { + this.volume = volume; + + if (!this.element) return; + + this.element.volume = volume; + } + + onPlay(subscriber: () => void): void { + this.onPlaySubscribers.push(subscriber); + } + + onStop(subscriber: () => void): void { + this.onStopSubscribers.push(subscriber); + } +} diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index 04ca5868242..715361d70b3 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -1,30 +1,30 @@ -(function(){(function(){var xn={96376:function(y,e,t){"use strict";e.__esModule=!0,e.createPopper=void 0,e.popperGenerator=g;var n=i(t(74758)),r=i(t(28811)),o=i(t(98309)),a=i(t(44896)),s=i(t(33118)),u=i(t(10579)),l=i(t(56500)),p=i(t(17633));e.detectOverflow=p.default;var f=t(75573);function i(h){return h&&h.__esModule?h:{default:h}}var d={placement:"bottom",modifiers:[],strategy:"absolute"};function c(){for(var h=arguments.length,m=new Array(h),E=0;E0&&(0,r.round)(i.width)/l.offsetWidth||1,c=l.offsetHeight>0&&(0,r.round)(i.height)/l.offsetHeight||1);var g=(0,n.isElement)(l)?(0,o.default)(l):window,v=g.visualViewport,h=!(0,a.default)()&&f,m=(i.left+(h&&v?v.offsetLeft:0))/d,E=(i.top+(h&&v?v.offsetTop:0))/c,I=i.width/d,O=i.height/c;return{width:I,height:O,top:E,right:m+I,bottom:E+O,left:m,x:m,y:E}}},49035:function(y,e,t){"use strict";e.__esModule=!0,e.default=O;var n=t(46206),r=h(t(87991)),o=h(t(79752)),a=h(t(98309)),s=h(t(44896)),u=h(t(40600)),l=h(t(16599)),p=t(75573),f=h(t(37786)),i=h(t(57819)),d=h(t(4206)),c=h(t(12972)),g=h(t(81666)),v=t(63618);function h(b){return b&&b.__esModule?b:{default:b}}function m(b,S){var T=(0,f.default)(b,!1,S==="fixed");return T.top=T.top+b.clientTop,T.left=T.left+b.clientLeft,T.bottom=T.top+b.clientHeight,T.right=T.left+b.clientWidth,T.width=b.clientWidth,T.height=b.clientHeight,T.x=T.left,T.y=T.top,T}function E(b,S,T){return S===n.viewport?(0,g.default)((0,r.default)(b,T)):(0,p.isElement)(S)?m(S,T):(0,g.default)((0,o.default)((0,u.default)(b)))}function I(b){var S=(0,a.default)((0,i.default)(b)),T=["absolute","fixed"].indexOf((0,l.default)(b).position)>=0,C=T&&(0,p.isHTMLElement)(b)?(0,s.default)(b):b;return(0,p.isElement)(C)?S.filter(function(A){return(0,p.isElement)(A)&&(0,d.default)(A,C)&&(0,c.default)(A)!=="body"}):[]}function O(b,S,T,C){var A=S==="clippingParents"?I(b):[].concat(S),P=[].concat(A,[T]),M=P[0],w=P.reduce(function(V,U){var j=E(b,U,C);return V.top=(0,v.max)(j.top,V.top),V.right=(0,v.min)(j.right,V.right),V.bottom=(0,v.min)(j.bottom,V.bottom),V.left=(0,v.max)(j.left,V.left),V},E(b,M,C));return w.width=w.right-w.left,w.height=w.bottom-w.top,w.x=w.left,w.y=w.top,w}},74758:function(y,e,t){"use strict";e.__esModule=!0,e.default=d;var n=f(t(37786)),r=f(t(13390)),o=f(t(12972)),a=t(75573),s=f(t(79697)),u=f(t(40600)),l=f(t(10798)),p=t(63618);function f(c){return c&&c.__esModule?c:{default:c}}function i(c){var g=c.getBoundingClientRect(),v=(0,p.round)(g.width)/c.offsetWidth||1,h=(0,p.round)(g.height)/c.offsetHeight||1;return v!==1||h!==1}function d(c,g,v){v===void 0&&(v=!1);var h=(0,a.isHTMLElement)(g),m=(0,a.isHTMLElement)(g)&&i(g),E=(0,u.default)(g),I=(0,n.default)(c,m,v),O={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(h||!h&&!v)&&(((0,o.default)(g)!=="body"||(0,l.default)(E))&&(O=(0,r.default)(g)),(0,a.isHTMLElement)(g)?(b=(0,n.default)(g,!0),b.x+=g.clientLeft,b.y+=g.clientTop):E&&(b.x=(0,s.default)(E))),{x:I.left+O.scrollLeft-b.x,y:I.top+O.scrollTop-b.y,width:I.width,height:I.height}}},16599:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(95115));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){return(0,n.default)(a).getComputedStyle(a)}},40600:function(y,e,t){"use strict";e.__esModule=!0,e.default=r;var n=t(75573);function r(o){return(((0,n.isElement)(o)?o.ownerDocument:o.document)||window.document).documentElement}},79752:function(y,e,t){"use strict";e.__esModule=!0,e.default=l;var n=u(t(40600)),r=u(t(16599)),o=u(t(79697)),a=u(t(43750)),s=t(63618);function u(p){return p&&p.__esModule?p:{default:p}}function l(p){var f,i=(0,n.default)(p),d=(0,a.default)(p),c=(f=p.ownerDocument)==null?void 0:f.body,g=(0,s.max)(i.scrollWidth,i.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),v=(0,s.max)(i.scrollHeight,i.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),h=-d.scrollLeft+(0,o.default)(p),m=-d.scrollTop;return(0,r.default)(c||i).direction==="rtl"&&(h+=(0,s.max)(i.clientWidth,c?c.clientWidth:0)-g),{width:g,height:v,x:h,y:m}}},3073:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}},28811:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(37786));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){var s=(0,n.default)(a),u=a.offsetWidth,l=a.offsetHeight;return Math.abs(s.width-u)<=1&&(u=s.width),Math.abs(s.height-l)<=1&&(l=s.height),{x:a.offsetLeft,y:a.offsetTop,width:u,height:l}}},12972:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){return n?(n.nodeName||"").toLowerCase():null}},13390:function(y,e,t){"use strict";e.__esModule=!0,e.default=u;var n=s(t(43750)),r=s(t(95115)),o=t(75573),a=s(t(3073));function s(l){return l&&l.__esModule?l:{default:l}}function u(l){return l===(0,r.default)(l)||!(0,o.isHTMLElement)(l)?(0,n.default)(l):(0,a.default)(l)}},44896:function(y,e,t){"use strict";e.__esModule=!0,e.default=d;var n=p(t(95115)),r=p(t(12972)),o=p(t(16599)),a=t(75573),s=p(t(87031)),u=p(t(57819)),l=p(t(35366));function p(c){return c&&c.__esModule?c:{default:c}}function f(c){return!(0,a.isHTMLElement)(c)||(0,o.default)(c).position==="fixed"?null:c.offsetParent}function i(c){var g=/firefox/i.test((0,l.default)()),v=/Trident/i.test((0,l.default)());if(v&&(0,a.isHTMLElement)(c)){var h=(0,o.default)(c);if(h.position==="fixed")return null}var m=(0,u.default)(c);for((0,a.isShadowRoot)(m)&&(m=m.host);(0,a.isHTMLElement)(m)&&["html","body"].indexOf((0,r.default)(m))<0;){var E=(0,o.default)(m);if(E.transform!=="none"||E.perspective!=="none"||E.contain==="paint"||["transform","perspective"].indexOf(E.willChange)!==-1||g&&E.willChange==="filter"||g&&E.filter&&E.filter!=="none")return m;m=m.parentNode}return null}function d(c){for(var g=(0,n.default)(c),v=f(c);v&&(0,s.default)(v)&&(0,o.default)(v).position==="static";)v=f(v);return v&&((0,r.default)(v)==="html"||(0,r.default)(v)==="body"&&(0,o.default)(v).position==="static")?g:v||i(c)||g}},57819:function(y,e,t){"use strict";e.__esModule=!0,e.default=s;var n=a(t(12972)),r=a(t(40600)),o=t(75573);function a(u){return u&&u.__esModule?u:{default:u}}function s(u){return(0,n.default)(u)==="html"?u:u.assignedSlot||u.parentNode||((0,o.isShadowRoot)(u)?u.host:null)||(0,r.default)(u)}},24426:function(y,e,t){"use strict";e.__esModule=!0,e.default=u;var n=s(t(57819)),r=s(t(10798)),o=s(t(12972)),a=t(75573);function s(l){return l&&l.__esModule?l:{default:l}}function u(l){return["html","body","#document"].indexOf((0,o.default)(l))>=0?l.ownerDocument.body:(0,a.isHTMLElement)(l)&&(0,r.default)(l)?l:u((0,n.default)(l))}},87991:function(y,e,t){"use strict";e.__esModule=!0,e.default=u;var n=s(t(95115)),r=s(t(40600)),o=s(t(79697)),a=s(t(89331));function s(l){return l&&l.__esModule?l:{default:l}}function u(l,p){var f=(0,n.default)(l),i=(0,r.default)(l),d=f.visualViewport,c=i.clientWidth,g=i.clientHeight,v=0,h=0;if(d){c=d.width,g=d.height;var m=(0,a.default)();(m||!m&&p==="fixed")&&(v=d.offsetLeft,h=d.offsetTop)}return{width:c,height:g,x:v+(0,o.default)(l),y:h}}},95115:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var r=n.ownerDocument;return r&&r.defaultView||window}return n}},43750:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(95115));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){var s=(0,n.default)(a),u=s.pageXOffset,l=s.pageYOffset;return{scrollLeft:u,scrollTop:l}}},79697:function(y,e,t){"use strict";e.__esModule=!0,e.default=s;var n=a(t(37786)),r=a(t(40600)),o=a(t(43750));function a(u){return u&&u.__esModule?u:{default:u}}function s(u){return(0,n.default)((0,r.default)(u)).left+(0,o.default)(u).scrollLeft}},75573:function(y,e,t){"use strict";e.__esModule=!0,e.isElement=o,e.isHTMLElement=a,e.isShadowRoot=s;var n=r(t(95115));function r(u){return u&&u.__esModule?u:{default:u}}function o(u){var l=(0,n.default)(u).Element;return u instanceof l||u instanceof Element}function a(u){var l=(0,n.default)(u).HTMLElement;return u instanceof l||u instanceof HTMLElement}function s(u){if(typeof ShadowRoot=="undefined")return!1;var l=(0,n.default)(u).ShadowRoot;return u instanceof l||u instanceof ShadowRoot}},89331:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(35366));function r(a){return a&&a.__esModule?a:{default:a}}function o(){return!/^((?!chrome|android).)*safari/i.test((0,n.default)())}},10798:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(16599));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){var s=(0,n.default)(a),u=s.overflow,l=s.overflowX,p=s.overflowY;return/auto|scroll|overlay|hidden/.test(u+p+l)}},87031:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(12972));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){return["table","td","th"].indexOf((0,n.default)(a))>=0}},98309:function(y,e,t){"use strict";e.__esModule=!0,e.default=u;var n=s(t(24426)),r=s(t(57819)),o=s(t(95115)),a=s(t(10798));function s(l){return l&&l.__esModule?l:{default:l}}function u(l,p){var f;p===void 0&&(p=[]);var i=(0,n.default)(l),d=i===((f=l.ownerDocument)==null?void 0:f.body),c=(0,o.default)(i),g=d?[c].concat(c.visualViewport||[],(0,a.default)(i)?i:[]):i,v=p.concat(g);return d?v:v.concat(u((0,r.default)(g)))}},46206:function(y,e){"use strict";e.__esModule=!0,e.write=e.viewport=e.variationPlacements=e.top=e.start=e.right=e.reference=e.read=e.popper=e.placements=e.modifierPhases=e.main=e.left=e.end=e.clippingParents=e.bottom=e.beforeWrite=e.beforeRead=e.beforeMain=e.basePlacements=e.auto=e.afterWrite=e.afterRead=e.afterMain=void 0;var t=e.top="top",n=e.bottom="bottom",r=e.right="right",o=e.left="left",a=e.auto="auto",s=e.basePlacements=[t,n,r,o],u=e.start="start",l=e.end="end",p=e.clippingParents="clippingParents",f=e.viewport="viewport",i=e.popper="popper",d=e.reference="reference",c=e.variationPlacements=s.reduce(function(A,P){return A.concat([P+"-"+u,P+"-"+l])},[]),g=e.placements=[].concat(s,[a]).reduce(function(A,P){return A.concat([P,P+"-"+u,P+"-"+l])},[]),v=e.beforeRead="beforeRead",h=e.read="read",m=e.afterRead="afterRead",E=e.beforeMain="beforeMain",I=e.main="main",O=e.afterMain="afterMain",b=e.beforeWrite="beforeWrite",S=e.write="write",T=e.afterWrite="afterWrite",C=e.modifierPhases=[v,h,m,E,I,O,b,S,T]},95996:function(y,e,t){"use strict";e.__esModule=!0;var n={popperGenerator:!0,detectOverflow:!0,createPopperBase:!0,createPopper:!0,createPopperLite:!0};e.popperGenerator=e.detectOverflow=e.createPopperLite=e.createPopperBase=e.createPopper=void 0;var r=t(46206);Object.keys(r).forEach(function(l){l==="default"||l==="__esModule"||Object.prototype.hasOwnProperty.call(n,l)||l in e&&e[l]===r[l]||(e[l]=r[l])});var o=t(39805);Object.keys(o).forEach(function(l){l==="default"||l==="__esModule"||Object.prototype.hasOwnProperty.call(n,l)||l in e&&e[l]===o[l]||(e[l]=o[l])});var a=t(96376);e.popperGenerator=a.popperGenerator,e.detectOverflow=a.detectOverflow,e.createPopperBase=a.createPopper;var s=t(83312);e.createPopper=s.createPopper;var u=t(2473);e.createPopperLite=u.createPopper},19975:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=o(t(12972)),r=t(75573);function o(l){return l&&l.__esModule?l:{default:l}}function a(l){var p=l.state;Object.keys(p.elements).forEach(function(f){var i=p.styles[f]||{},d=p.attributes[f]||{},c=p.elements[f];!(0,r.isHTMLElement)(c)||!(0,n.default)(c)||(Object.assign(c.style,i),Object.keys(d).forEach(function(g){var v=d[g];v===!1?c.removeAttribute(g):c.setAttribute(g,v===!0?"":v)}))})}function s(l){var p=l.state,f={popper:{position:p.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(p.elements.popper.style,f.popper),p.styles=f,p.elements.arrow&&Object.assign(p.elements.arrow.style,f.arrow),function(){Object.keys(p.elements).forEach(function(i){var d=p.elements[i],c=p.attributes[i]||{},g=Object.keys(p.styles.hasOwnProperty(i)?p.styles[i]:f[i]),v=g.reduce(function(h,m){return h[m]="",h},{});!(0,r.isHTMLElement)(d)||!(0,n.default)(d)||(Object.assign(d.style,v),Object.keys(c).forEach(function(h){d.removeAttribute(h)}))})}}var u=e.default={name:"applyStyles",enabled:!0,phase:"write",fn:a,effect:s,requires:["computeStyles"]}},52744:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=i(t(83104)),r=i(t(28811)),o=i(t(4206)),a=i(t(44896)),s=i(t(41199)),u=t(28595),l=i(t(43286)),p=i(t(81447)),f=t(46206);function i(h){return h&&h.__esModule?h:{default:h}}var d=function(){function h(m,E){return m=typeof m=="function"?m(Object.assign({},E.rects,{placement:E.placement})):m,(0,l.default)(typeof m!="number"?m:(0,p.default)(m,f.basePlacements))}return h}();function c(h){var m,E=h.state,I=h.name,O=h.options,b=E.elements.arrow,S=E.modifiersData.popperOffsets,T=(0,n.default)(E.placement),C=(0,s.default)(T),A=[f.left,f.right].indexOf(T)>=0,P=A?"height":"width";if(!(!b||!S)){var M=d(O.padding,E),w=(0,r.default)(b),V=C==="y"?f.top:f.left,U=C==="y"?f.bottom:f.right,j=E.rects.reference[P]+E.rects.reference[C]-S[C]-E.rects.popper[P],G=S[C]-E.rects.reference[C],$=(0,a.default)(b),x=$?C==="y"?$.clientHeight||0:$.clientWidth||0:0,B=j/2-G/2,F=M[V],H=x-w[P]-M[U],K=x/2-w[P]/2+B,W=(0,u.within)(F,K,H),q=C;E.modifiersData[I]=(m={},m[q]=W,m.centerOffset=W-K,m)}}function g(h){var m=h.state,E=h.options,I=E.element,O=I===void 0?"[data-popper-arrow]":I;O!=null&&(typeof O=="string"&&(O=m.elements.popper.querySelector(O),!O)||(0,o.default)(m.elements.popper,O)&&(m.elements.arrow=O))}var v=e.default={name:"arrow",enabled:!0,phase:"main",fn:c,effect:g,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},59894:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0,e.mapToStyles=c;var n=t(46206),r=f(t(44896)),o=f(t(95115)),a=f(t(40600)),s=f(t(16599)),u=f(t(83104)),l=f(t(45)),p=t(63618);function f(h){return h&&h.__esModule?h:{default:h}}var i={top:"auto",right:"auto",bottom:"auto",left:"auto"};function d(h,m){var E=h.x,I=h.y,O=m.devicePixelRatio||1;return{x:(0,p.round)(E*O)/O||0,y:(0,p.round)(I*O)/O||0}}function c(h){var m,E=h.popper,I=h.popperRect,O=h.placement,b=h.variation,S=h.offsets,T=h.position,C=h.gpuAcceleration,A=h.adaptive,P=h.roundOffsets,M=h.isFixed,w=S.x,V=w===void 0?0:w,U=S.y,j=U===void 0?0:U,G=typeof P=="function"?P({x:V,y:j}):{x:V,y:j};V=G.x,j=G.y;var $=S.hasOwnProperty("x"),x=S.hasOwnProperty("y"),B=n.left,F=n.top,H=window;if(A){var K=(0,r.default)(E),W="clientHeight",q="clientWidth";if(K===(0,o.default)(E)&&(K=(0,a.default)(E),(0,s.default)(K).position!=="static"&&T==="absolute"&&(W="scrollHeight",q="scrollWidth")),K=K,O===n.top||(O===n.left||O===n.right)&&b===n.end){F=n.bottom;var ut=M&&K===H&&H.visualViewport?H.visualViewport.height:K[W];j-=ut-I.height,j*=C?1:-1}if(O===n.left||(O===n.top||O===n.bottom)&&b===n.end){B=n.right;var ct=M&&K===H&&H.visualViewport?H.visualViewport.width:K[q];V-=ct-I.width,V*=C?1:-1}}var Q=Object.assign({position:T},A&&i),X=P===!0?d({x:V,y:j},(0,o.default)(E)):{x:V,y:j};if(V=X.x,j=X.y,C){var at;return Object.assign({},Q,(at={},at[F]=x?"0":"",at[B]=$?"0":"",at.transform=(H.devicePixelRatio||1)<=1?"translate("+V+"px, "+j+"px)":"translate3d("+V+"px, "+j+"px, 0)",at))}return Object.assign({},Q,(m={},m[F]=x?j+"px":"",m[B]=$?V+"px":"",m.transform="",m))}function g(h){var m=h.state,E=h.options,I=E.gpuAcceleration,O=I===void 0?!0:I,b=E.adaptive,S=b===void 0?!0:b,T=E.roundOffsets,C=T===void 0?!0:T,A={placement:(0,u.default)(m.placement),variation:(0,l.default)(m.placement),popper:m.elements.popper,popperRect:m.rects.popper,gpuAcceleration:O,isFixed:m.options.strategy==="fixed"};m.modifiersData.popperOffsets!=null&&(m.styles.popper=Object.assign({},m.styles.popper,c(Object.assign({},A,{offsets:m.modifiersData.popperOffsets,position:m.options.strategy,adaptive:S,roundOffsets:C})))),m.modifiersData.arrow!=null&&(m.styles.arrow=Object.assign({},m.styles.arrow,c(Object.assign({},A,{offsets:m.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:C})))),m.attributes.popper=Object.assign({},m.attributes.popper,{"data-popper-placement":m.placement})}var v=e.default={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}}},36692:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=r(t(95115));function r(u){return u&&u.__esModule?u:{default:u}}var o={passive:!0};function a(u){var l=u.state,p=u.instance,f=u.options,i=f.scroll,d=i===void 0?!0:i,c=f.resize,g=c===void 0?!0:c,v=(0,n.default)(l.elements.popper),h=[].concat(l.scrollParents.reference,l.scrollParents.popper);return d&&h.forEach(function(m){m.addEventListener("scroll",p.update,o)}),g&&v.addEventListener("resize",p.update,o),function(){d&&h.forEach(function(m){m.removeEventListener("scroll",p.update,o)}),g&&v.removeEventListener("resize",p.update,o)}}var s=e.default={name:"eventListeners",enabled:!0,phase:"write",fn:function(){function u(){}return u}(),effect:a,data:{}}},23798:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=p(t(71376)),r=p(t(83104)),o=p(t(86459)),a=p(t(17633)),s=p(t(9041)),u=t(46206),l=p(t(45));function p(c){return c&&c.__esModule?c:{default:c}}function f(c){if((0,r.default)(c)===u.auto)return[];var g=(0,n.default)(c);return[(0,o.default)(c),g,(0,o.default)(g)]}function i(c){var g=c.state,v=c.options,h=c.name;if(!g.modifiersData[h]._skip){for(var m=v.mainAxis,E=m===void 0?!0:m,I=v.altAxis,O=I===void 0?!0:I,b=v.fallbackPlacements,S=v.padding,T=v.boundary,C=v.rootBoundary,A=v.altBoundary,P=v.flipVariations,M=P===void 0?!0:P,w=v.allowedAutoPlacements,V=g.options.placement,U=(0,r.default)(V),j=U===V,G=b||(j||!M?[(0,n.default)(V)]:f(V)),$=[V].concat(G).reduce(function(et,k){return et.concat((0,r.default)(k)===u.auto?(0,s.default)(g,{placement:k,boundary:T,rootBoundary:C,padding:S,flipVariations:M,allowedAutoPlacements:w}):k)},[]),x=g.rects.reference,B=g.rects.popper,F=new Map,H=!0,K=$[0],W=0;W<$.length;W++){var q=$[W],ut=(0,r.default)(q),ct=(0,l.default)(q)===u.start,Q=[u.top,u.bottom].indexOf(ut)>=0,X=Q?"width":"height",at=(0,a.default)(g,{placement:q,boundary:T,rootBoundary:C,altBoundary:A,padding:S}),ft=Q?ct?u.right:u.left:ct?u.bottom:u.top;x[X]>B[X]&&(ft=(0,n.default)(ft));var dt=(0,n.default)(ft),_=[];if(E&&_.push(at[ut]<=0),O&&_.push(at[ft]<=0,at[dt]<=0),_.every(function(et){return et})){K=q,H=!1;break}F.set(q,_)}if(H)for(var rt=M?3:1,it=function(){function et(k){var tt=$.find(function(nt){var pt=F.get(nt);if(pt)return pt.slice(0,k).every(function(Et){return Et})});if(tt)return K=tt,"break"}return et}(),mt=rt;mt>0;mt--){var ot=it(mt);if(ot==="break")break}g.placement!==K&&(g.modifiersData[h]._skip=!0,g.placement=K,g.reset=!0)}}var d=e.default={name:"flip",enabled:!0,phase:"main",fn:i,requiresIfExists:["offset"],data:{_skip:!1}}},83761:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=t(46206),r=o(t(17633));function o(p){return p&&p.__esModule?p:{default:p}}function a(p,f,i){return i===void 0&&(i={x:0,y:0}),{top:p.top-f.height-i.y,right:p.right-f.width+i.x,bottom:p.bottom-f.height+i.y,left:p.left-f.width-i.x}}function s(p){return[n.top,n.right,n.bottom,n.left].some(function(f){return p[f]>=0})}function u(p){var f=p.state,i=p.name,d=f.rects.reference,c=f.rects.popper,g=f.modifiersData.preventOverflow,v=(0,r.default)(f,{elementContext:"reference"}),h=(0,r.default)(f,{altBoundary:!0}),m=a(v,d),E=a(h,c,g),I=s(m),O=s(E);f.modifiersData[i]={referenceClippingOffsets:m,popperEscapeOffsets:E,isReferenceHidden:I,hasPopperEscaped:O},f.attributes.popper=Object.assign({},f.attributes.popper,{"data-popper-reference-hidden":I,"data-popper-escaped":O})}var l=e.default={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:u}},39805:function(y,e,t){"use strict";e.__esModule=!0,e.preventOverflow=e.popperOffsets=e.offset=e.hide=e.flip=e.eventListeners=e.computeStyles=e.arrow=e.applyStyles=void 0;var n=i(t(19975));e.applyStyles=n.default;var r=i(t(52744));e.arrow=r.default;var o=i(t(59894));e.computeStyles=o.default;var a=i(t(36692));e.eventListeners=a.default;var s=i(t(23798));e.flip=s.default;var u=i(t(83761));e.hide=u.default;var l=i(t(61410));e.offset=l.default;var p=i(t(40107));e.popperOffsets=p.default;var f=i(t(75137));e.preventOverflow=f.default;function i(d){return d&&d.__esModule?d:{default:d}}},61410:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0,e.distanceAndSkiddingToXY=a;var n=o(t(83104)),r=t(46206);function o(l){return l&&l.__esModule?l:{default:l}}function a(l,p,f){var i=(0,n.default)(l),d=[r.left,r.top].indexOf(i)>=0?-1:1,c=typeof f=="function"?f(Object.assign({},p,{placement:l})):f,g=c[0],v=c[1];return g=g||0,v=(v||0)*d,[r.left,r.right].indexOf(i)>=0?{x:v,y:g}:{x:g,y:v}}function s(l){var p=l.state,f=l.options,i=l.name,d=f.offset,c=d===void 0?[0,0]:d,g=r.placements.reduce(function(E,I){return E[I]=a(I,p.rects,c),E},{}),v=g[p.placement],h=v.x,m=v.y;p.modifiersData.popperOffsets!=null&&(p.modifiersData.popperOffsets.x+=h,p.modifiersData.popperOffsets.y+=m),p.modifiersData[i]=g}var u=e.default={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:s}},40107:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=r(t(89951));function r(s){return s&&s.__esModule?s:{default:s}}function o(s){var u=s.state,l=s.name;u.modifiersData[l]=(0,n.default)({reference:u.rects.reference,element:u.rects.popper,strategy:"absolute",placement:u.placement})}var a=e.default={name:"popperOffsets",enabled:!0,phase:"read",fn:o,data:{}}},75137:function(y,e,t){"use strict";e.__esModule=!0,e.default=void 0;var n=t(46206),r=c(t(83104)),o=c(t(41199)),a=c(t(28066)),s=t(28595),u=c(t(28811)),l=c(t(44896)),p=c(t(17633)),f=c(t(45)),i=c(t(34780)),d=t(63618);function c(h){return h&&h.__esModule?h:{default:h}}function g(h){var m=h.state,E=h.options,I=h.name,O=E.mainAxis,b=O===void 0?!0:O,S=E.altAxis,T=S===void 0?!1:S,C=E.boundary,A=E.rootBoundary,P=E.altBoundary,M=E.padding,w=E.tether,V=w===void 0?!0:w,U=E.tetherOffset,j=U===void 0?0:U,G=(0,p.default)(m,{boundary:C,rootBoundary:A,padding:M,altBoundary:P}),$=(0,r.default)(m.placement),x=(0,f.default)(m.placement),B=!x,F=(0,o.default)($),H=(0,a.default)(F),K=m.modifiersData.popperOffsets,W=m.rects.reference,q=m.rects.popper,ut=typeof j=="function"?j(Object.assign({},m.rects,{placement:m.placement})):j,ct=typeof ut=="number"?{mainAxis:ut,altAxis:ut}:Object.assign({mainAxis:0,altAxis:0},ut),Q=m.modifiersData.offset?m.modifiersData.offset[m.placement]:null,X={x:0,y:0};if(K){if(b){var at,ft=F==="y"?n.top:n.left,dt=F==="y"?n.bottom:n.right,_=F==="y"?"height":"width",rt=K[F],it=rt+G[ft],mt=rt-G[dt],ot=V?-q[_]/2:0,et=x===n.start?W[_]:q[_],k=x===n.start?-q[_]:-W[_],tt=m.elements.arrow,nt=V&&tt?(0,u.default)(tt):{width:0,height:0},pt=m.modifiersData["arrow#persistent"]?m.modifiersData["arrow#persistent"].padding:(0,i.default)(),Et=pt[ft],st=pt[dt],yt=(0,s.within)(0,W[_],nt[_]),Pt=B?W[_]/2-ot-yt-Et-ct.mainAxis:et-yt-Et-ct.mainAxis,Ct=B?-W[_]/2+ot+yt+st+ct.mainAxis:k+yt+st+ct.mainAxis,lt=m.elements.arrow&&(0,l.default)(m.elements.arrow),gt=lt?F==="y"?lt.clientTop||0:lt.clientLeft||0:0,It=(at=Q==null?void 0:Q[F])!=null?at:0,Lt=rt+Pt-It-gt,Vt=rt+Ct-It,Ot=(0,s.within)(V?(0,d.min)(it,Lt):it,rt,V?(0,d.max)(mt,Vt):mt);K[F]=Ot,X[F]=Ot-rt}if(T){var vt,St=F==="x"?n.top:n.left,At=F==="x"?n.bottom:n.right,Tt=K[H],Nt=H==="y"?"height":"width",Ft=Tt+G[St],jt=Tt-G[At],Ht=[n.top,n.left].indexOf($)!==-1,Kt=(vt=Q==null?void 0:Q[H])!=null?vt:0,Gt=Ht?Ft:Tt-W[Nt]-q[Nt]-Kt+ct.altAxis,Wt=Ht?Tt+W[Nt]+q[Nt]-Kt-ct.altAxis:jt,te=V&&Ht?(0,s.withinMaxClamp)(Gt,Tt,Wt):(0,s.within)(V?Gt:Ft,Tt,V?Wt:jt);K[H]=te,X[H]=te-Tt}m.modifiersData[I]=X}}var v=e.default={name:"preventOverflow",enabled:!0,phase:"main",fn:g,requiresIfExists:["offset"]}},2473:function(y,e,t){"use strict";e.__esModule=!0,e.defaultModifiers=e.createPopper=void 0;var n=t(96376);e.popperGenerator=n.popperGenerator,e.detectOverflow=n.detectOverflow;var r=u(t(36692)),o=u(t(40107)),a=u(t(59894)),s=u(t(19975));function u(f){return f&&f.__esModule?f:{default:f}}var l=e.defaultModifiers=[r.default,o.default,a.default,s.default],p=e.createPopper=(0,n.popperGenerator)({defaultModifiers:l})},83312:function(y,e,t){"use strict";e.__esModule=!0;var n={createPopper:!0,createPopperLite:!0,defaultModifiers:!0,popperGenerator:!0,detectOverflow:!0};e.defaultModifiers=e.createPopperLite=e.createPopper=void 0;var r=t(96376);e.popperGenerator=r.popperGenerator,e.detectOverflow=r.detectOverflow;var o=v(t(36692)),a=v(t(40107)),s=v(t(59894)),u=v(t(19975)),l=v(t(61410)),p=v(t(23798)),f=v(t(75137)),i=v(t(52744)),d=v(t(83761)),c=t(2473);e.createPopperLite=c.createPopper;var g=t(39805);Object.keys(g).forEach(function(E){E==="default"||E==="__esModule"||Object.prototype.hasOwnProperty.call(n,E)||E in e&&e[E]===g[E]||(e[E]=g[E])});function v(E){return E&&E.__esModule?E:{default:E}}var h=e.defaultModifiers=[o.default,a.default,s.default,u.default,l.default,p.default,f.default,i.default,d.default],m=e.createPopperLite=e.createPopper=(0,r.popperGenerator)({defaultModifiers:h})},9041:function(y,e,t){"use strict";e.__esModule=!0,e.default=u;var n=s(t(45)),r=t(46206),o=s(t(17633)),a=s(t(83104));function s(l){return l&&l.__esModule?l:{default:l}}function u(l,p){p===void 0&&(p={});var f=p,i=f.placement,d=f.boundary,c=f.rootBoundary,g=f.padding,v=f.flipVariations,h=f.allowedAutoPlacements,m=h===void 0?r.placements:h,E=(0,n.default)(i),I=E?v?r.variationPlacements:r.variationPlacements.filter(function(S){return(0,n.default)(S)===E}):r.basePlacements,O=I.filter(function(S){return m.indexOf(S)>=0});O.length===0&&(O=I);var b=O.reduce(function(S,T){return S[T]=(0,o.default)(l,{placement:T,boundary:d,rootBoundary:c,padding:g})[(0,a.default)(T)],S},{});return Object.keys(b).sort(function(S,T){return b[S]-b[T]})}},89951:function(y,e,t){"use strict";e.__esModule=!0,e.default=u;var n=s(t(83104)),r=s(t(45)),o=s(t(41199)),a=t(46206);function s(l){return l&&l.__esModule?l:{default:l}}function u(l){var p=l.reference,f=l.element,i=l.placement,d=i?(0,n.default)(i):null,c=i?(0,r.default)(i):null,g=p.x+p.width/2-f.width/2,v=p.y+p.height/2-f.height/2,h;switch(d){case a.top:h={x:g,y:p.y-f.height};break;case a.bottom:h={x:g,y:p.y+p.height};break;case a.right:h={x:p.x+p.width,y:v};break;case a.left:h={x:p.x-f.width,y:v};break;default:h={x:p.x,y:p.y}}var m=d?(0,o.default)(d):null;if(m!=null){var E=m==="y"?"height":"width";switch(c){case a.start:h[m]=h[m]-(p[E]/2-f[E]/2);break;case a.end:h[m]=h[m]+(p[E]/2-f[E]/2);break;default:}}return h}},10579:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){var r;return function(){return r||(r=new Promise(function(o){Promise.resolve().then(function(){r=void 0,o(n())})})),r}}},17633:function(y,e,t){"use strict";e.__esModule=!0,e.default=d;var n=i(t(49035)),r=i(t(40600)),o=i(t(37786)),a=i(t(89951)),s=i(t(81666)),u=t(46206),l=t(75573),p=i(t(43286)),f=i(t(81447));function i(c){return c&&c.__esModule?c:{default:c}}function d(c,g){g===void 0&&(g={});var v=g,h=v.placement,m=h===void 0?c.placement:h,E=v.strategy,I=E===void 0?c.strategy:E,O=v.boundary,b=O===void 0?u.clippingParents:O,S=v.rootBoundary,T=S===void 0?u.viewport:S,C=v.elementContext,A=C===void 0?u.popper:C,P=v.altBoundary,M=P===void 0?!1:P,w=v.padding,V=w===void 0?0:w,U=(0,p.default)(typeof V!="number"?V:(0,f.default)(V,u.basePlacements)),j=A===u.popper?u.reference:u.popper,G=c.rects.popper,$=c.elements[M?j:A],x=(0,n.default)((0,l.isElement)($)?$:$.contextElement||(0,r.default)(c.elements.popper),b,T,I),B=(0,o.default)(c.elements.reference),F=(0,a.default)({reference:B,element:G,strategy:"absolute",placement:m}),H=(0,s.default)(Object.assign({},G,F)),K=A===u.popper?H:B,W={top:x.top-K.top+U.top,bottom:K.bottom-x.bottom+U.bottom,left:x.left-K.left+U.left,right:K.right-x.right+U.right},q=c.modifiersData.offset;if(A===u.popper&&q){var ut=q[m];Object.keys(W).forEach(function(ct){var Q=[u.right,u.bottom].indexOf(ct)>=0?1:-1,X=[u.top,u.bottom].indexOf(ct)>=0?"y":"x";W[ct]+=ut[X]*Q})}return W}},81447:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n,r){return r.reduce(function(o,a){return o[a]=n,o},{})}},28066:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){return n==="x"?"y":"x"}},83104:function(y,e,t){"use strict";e.__esModule=!0,e.default=r;var n=t(46206);function r(o){return o.split("-")[0]}},34780:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(){return{top:0,right:0,bottom:0,left:0}}},41199:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}},71376:function(y,e){"use strict";e.__esModule=!0,e.default=n;var t={left:"right",right:"left",bottom:"top",top:"bottom"};function n(r){return r.replace(/left|right|bottom|top/g,function(o){return t[o]})}},86459:function(y,e){"use strict";e.__esModule=!0,e.default=n;var t={start:"end",end:"start"};function n(r){return r.replace(/start|end/g,function(o){return t[o]})}},45:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){return n.split("-")[1]}},63618:function(y,e){"use strict";e.__esModule=!0,e.round=e.min=e.max=void 0;var t=e.max=Math.max,n=e.min=Math.min,r=e.round=Math.round},56500:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){var r=n.reduce(function(o,a){var s=o[a.name];return o[a.name]=s?Object.assign({},s,a,{options:Object.assign({},s.options,a.options),data:Object.assign({},s.data,a.data)}):a,o},{});return Object.keys(r).map(function(o){return r[o]})}},43286:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=r(t(34780));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){return Object.assign({},(0,n.default)(),a)}},33118:function(y,e,t){"use strict";e.__esModule=!0,e.default=o;var n=t(46206);function r(a){var s=new Map,u=new Set,l=[];a.forEach(function(f){s.set(f.name,f)});function p(f){u.add(f.name);var i=[].concat(f.requires||[],f.requiresIfExists||[]);i.forEach(function(d){if(!u.has(d)){var c=s.get(d);c&&p(c)}}),l.push(f)}return a.forEach(function(f){u.has(f.name)||p(f)}),l}function o(a){var s=r(a);return n.modifierPhases.reduce(function(u,l){return u.concat(s.filter(function(p){return p.phase===l}))},[])}},81666:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}},35366:function(y,e){"use strict";e.__esModule=!0,e.default=t;function t(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(r){return r.brand+"/"+r.version}).join(" "):navigator.userAgent}},28595:function(y,e,t){"use strict";e.__esModule=!0,e.within=r,e.withinMaxClamp=o;var n=t(63618);function r(a,s,u){return(0,n.max)(a,(0,n.min)(s,u))}function o(a,s,u){var l=r(a,s,u);return l>u?u:l}},22734:function(y){"use strict";/*! @license DOMPurify 2.5.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.4/LICENSE */(function(e,t){y.exports=t()})(void 0,function(){"use strict";function e(lt){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(gt){return typeof gt}:function(gt){return gt&&typeof Symbol=="function"&>.constructor===Symbol&>!==Symbol.prototype?"symbol":typeof gt},e(lt)}function t(lt,gt){return t=Object.setPrototypeOf||function(){function It(Lt,Vt){return Lt.__proto__=Vt,Lt}return It}(),t(lt,gt)}function n(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(lt){return!1}}function r(lt,gt,It){return n()?r=Reflect.construct:r=function(){function Lt(Vt,Ot,vt){var St=[null];St.push.apply(St,Ot);var At=Function.bind.apply(Vt,St),Tt=new At;return vt&&t(Tt,vt.prototype),Tt}return Lt}(),r.apply(null,arguments)}function o(lt){return a(lt)||s(lt)||u(lt)||p()}function a(lt){if(Array.isArray(lt))return l(lt)}function s(lt){if(typeof Symbol!="undefined"&<[Symbol.iterator]!=null||lt["@@iterator"]!=null)return Array.from(lt)}function u(lt,gt){if(lt){if(typeof lt=="string")return l(lt,gt);var It=Object.prototype.toString.call(lt).slice(8,-1);if(It==="Object"&<.constructor&&(It=lt.constructor.name),It==="Map"||It==="Set")return Array.from(lt);if(It==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(It))return l(lt,gt)}}function l(lt,gt){(gt==null||gt>lt.length)&&(gt=lt.length);for(var It=0,Lt=new Array(gt);It1?It-1:0),Vt=1;Vt/gm),mt=h(/\${[\w\W]*}/gm),ot=h(/^data-[\-\w.\u00B7-\uFFFF]/),et=h(/^aria-[\-\w]+$/),k=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=h(/^(?:\w+script|data):/i),nt=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pt=h(/^html$/i),Et=h(/^[a-z][.\w]*(-[.\w]+)+$/i),st=function(){function lt(){return typeof window=="undefined"?null:window}return lt}(),yt=function(){function lt(gt,It){if(e(gt)!=="object"||typeof gt.createPolicy!="function")return null;var Lt=null,Vt="data-tt-policy-suffix";It.currentScript&&It.currentScript.hasAttribute(Vt)&&(Lt=It.currentScript.getAttribute(Vt));var Ot="dompurify"+(Lt?"#"+Lt:"");try{return gt.createPolicy(Ot,{createHTML:function(){function vt(St){return St}return vt}(),createScriptURL:function(){function vt(St){return St}return vt}()})}catch(vt){return null}}return lt}();function Pt(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st(),gt=function(){function D(R){return Pt(R)}return D}();if(gt.version="2.5.4",gt.removed=[],!lt||!lt.document||lt.document.nodeType!==9)return gt.isSupported=!1,gt;var It=lt.document,Lt=lt.document,Vt=lt.DocumentFragment,Ot=lt.HTMLTemplateElement,vt=lt.Node,St=lt.Element,At=lt.NodeFilter,Tt=lt.NamedNodeMap,Nt=Tt===void 0?lt.NamedNodeMap||lt.MozNamedAttrMap:Tt,Ft=lt.HTMLFormElement,jt=lt.DOMParser,Ht=lt.trustedTypes,Kt=St.prototype,Gt=H(Kt,"cloneNode"),Wt=H(Kt,"nextSibling"),te=H(Kt,"childNodes"),be=H(Kt,"parentNode");if(typeof Ot=="function"){var Me=Lt.createElement("template");Me.content&&Me.content.ownerDocument&&(Lt=Me.content.ownerDocument)}var _t=yt(Ht,It),Re=_t?_t.createHTML(""):"",ve=Lt,se=ve.implementation,sn=ve.createNodeIterator,cn=ve.createDocumentFragment,On=ve.getElementsByTagName,ln=It.importNode,fn={};try{fn=F(Lt).documentMode?Lt.documentMode:{}}catch(D){}var ne={};gt.isSupported=typeof be=="function"&&se&&se.createHTMLDocument!==void 0&&fn!==9;var Ke=rt,we=it,Le=mt,An=ot,dn=et,Pn=tt,vn=nt,Be=Et,he=k,$t=null,re=B({},[].concat(o(K),o(W),o(q),o(ct),o(X))),Xt=null,hn=B({},[].concat(o(at),o(ft),o(dt),o(_))),zt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ce=null,De=null,pn=!0,We=!0,gn=!1,mn=!0,le=!1,Fe=!0,fe=!1,xe=!1,Oe=!1,kt=!1,Ve=!1,je=!1,ze=!0,ke=!1,pe="user-content-",Xe=!0,Ae=!1,Ce={},ge=null,Qe=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),yn=null,Ze=B({},["audio","video","img","source","image","track"]),Je=null,oe=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ue="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml",Te=ue,_e=!1,qe=null,tn=B({},[Ue,He,ue],A),me,Sn=["application/xhtml+xml","text/html"],Nn="text/html",Qt,Ie=null,En=255,Mn=Lt.createElement("form"),bn=function(){function D(R){return R instanceof RegExp||R instanceof Function}return D}(),ee=function(){function D(R){Ie&&Ie===R||((!R||e(R)!=="object")&&(R={}),R=F(R),me=Sn.indexOf(R.PARSER_MEDIA_TYPE)===-1?me=Nn:me=R.PARSER_MEDIA_TYPE,Qt=me==="application/xhtml+xml"?A:C,$t="ALLOWED_TAGS"in R?B({},R.ALLOWED_TAGS,Qt):re,Xt="ALLOWED_ATTR"in R?B({},R.ALLOWED_ATTR,Qt):hn,qe="ALLOWED_NAMESPACES"in R?B({},R.ALLOWED_NAMESPACES,A):tn,Je="ADD_URI_SAFE_ATTR"in R?B(F(oe),R.ADD_URI_SAFE_ATTR,Qt):oe,yn="ADD_DATA_URI_TAGS"in R?B(F(Ze),R.ADD_DATA_URI_TAGS,Qt):Ze,ge="FORBID_CONTENTS"in R?B({},R.FORBID_CONTENTS,Qt):Qe,ce="FORBID_TAGS"in R?B({},R.FORBID_TAGS,Qt):{},De="FORBID_ATTR"in R?B({},R.FORBID_ATTR,Qt):{},Ce="USE_PROFILES"in R?R.USE_PROFILES:!1,pn=R.ALLOW_ARIA_ATTR!==!1,We=R.ALLOW_DATA_ATTR!==!1,gn=R.ALLOW_UNKNOWN_PROTOCOLS||!1,mn=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,le=R.SAFE_FOR_TEMPLATES||!1,Fe=R.SAFE_FOR_XML!==!1,fe=R.WHOLE_DOCUMENT||!1,kt=R.RETURN_DOM||!1,Ve=R.RETURN_DOM_FRAGMENT||!1,je=R.RETURN_TRUSTED_TYPE||!1,Oe=R.FORCE_BODY||!1,ze=R.SANITIZE_DOM!==!1,ke=R.SANITIZE_NAMED_PROPS||!1,Xe=R.KEEP_CONTENT!==!1,Ae=R.IN_PLACE||!1,he=R.ALLOWED_URI_REGEXP||he,Te=R.NAMESPACE||ue,zt=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&bn(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(zt.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&bn(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(zt.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(zt.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),le&&(We=!1),Ve&&(kt=!0),Ce&&($t=B({},o(X)),Xt=[],Ce.html===!0&&(B($t,K),B(Xt,at)),Ce.svg===!0&&(B($t,W),B(Xt,ft),B(Xt,_)),Ce.svgFilters===!0&&(B($t,q),B(Xt,ft),B(Xt,_)),Ce.mathMl===!0&&(B($t,ct),B(Xt,dt),B(Xt,_))),R.ADD_TAGS&&($t===re&&($t=F($t)),B($t,R.ADD_TAGS,Qt)),R.ADD_ATTR&&(Xt===hn&&(Xt=F(Xt)),B(Xt,R.ADD_ATTR,Qt)),R.ADD_URI_SAFE_ATTR&&B(Je,R.ADD_URI_SAFE_ATTR,Qt),R.FORBID_CONTENTS&&(ge===Qe&&(ge=F(ge)),B(ge,R.FORBID_CONTENTS,Qt)),Xe&&($t["#text"]=!0),fe&&B($t,["html","head","body"]),$t.table&&(B($t,["tbody"]),delete ce.tbody),v&&v(R),Ie=R)}return D}(),Pe=B({},["mi","mo","mn","ms","mtext"]),en=B({},["foreignobject","annotation-xml"]),Rn=B({},["title","style","font","a","script"]),$e=B({},W);B($e,q),B($e,ut);var Ge=B({},ct);B(Ge,Q);var Cn=function(){function D(R){var Y=be(R);(!Y||!Y.tagName)&&(Y={namespaceURI:Te,tagName:"template"});var z=C(R.tagName),Z=C(Y.tagName);return qe[R.namespaceURI]?R.namespaceURI===He?Y.namespaceURI===ue?z==="svg":Y.namespaceURI===Ue?z==="svg"&&(Z==="annotation-xml"||Pe[Z]):!!$e[z]:R.namespaceURI===Ue?Y.namespaceURI===ue?z==="math":Y.namespaceURI===He?z==="math"&&en[Z]:!!Ge[z]:R.namespaceURI===ue?Y.namespaceURI===He&&!en[Z]||Y.namespaceURI===Ue&&!Pe[Z]?!1:!Ge[z]&&(Rn[z]||!$e[z]):!!(me==="application/xhtml+xml"&&qe[R.namespaceURI]):!1}return D}(),Zt=function(){function D(R){T(gt.removed,{element:R});try{R.parentNode.removeChild(R)}catch(Y){try{R.outerHTML=Re}catch(z){R.remove()}}}return D}(),ye=function(){function D(R,Y){try{T(gt.removed,{attribute:Y.getAttributeNode(R),from:Y})}catch(z){T(gt.removed,{attribute:null,from:Y})}if(Y.removeAttribute(R),R==="is"&&!Xt[R])if(kt||Ve)try{Zt(Y)}catch(z){}else try{Y.setAttribute(R,"")}catch(z){}}return D}(),Tn=function(){function D(R){var Y,z;if(Oe)R=""+R;else{var Z=P(R,/^[\r\n\t ]+/);z=Z&&Z[0]}me==="application/xhtml+xml"&&Te===ue&&(R=''+R+"");var ht=_t?_t.createHTML(R):R;if(Te===ue)try{Y=new jt().parseFromString(ht,me)}catch(Rt){}if(!Y||!Y.documentElement){Y=se.createDocument(Te,"template",null);try{Y.documentElement.innerHTML=_e?Re:ht}catch(Rt){}}var bt=Y.body||Y.documentElement;return R&&z&&bt.insertBefore(Lt.createTextNode(z),bt.childNodes[0]||null),Te===ue?On.call(Y,fe?"html":"body")[0]:fe?Y.documentElement:bt}return D}(),Ye=function(){function D(R){return sn.call(R.ownerDocument||R,R,At.SHOW_ELEMENT|At.SHOW_COMMENT|At.SHOW_TEXT|At.SHOW_PROCESSING_INSTRUCTION|At.SHOW_CDATA_SECTION,null,!1)}return D}(),nn=function(){function D(R){return R instanceof Ft&&(typeof R.__depth!="undefined"&&typeof R.__depth!="number"||typeof R.__removalCount!="undefined"&&typeof R.__removalCount!="number"||typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof Nt)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")}return D}(),Ne=function(){function D(R){return e(vt)==="object"?R instanceof vt:R&&e(R)==="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"}return D}(),ae=function(){function D(R,Y,z){ne[R]&&b(ne[R],function(Z){Z.call(gt,Y,z,Ie)})}return D}(),rn=function(){function D(R){var Y;if(ae("beforeSanitizeElements",R,null),nn(R)||U(/[\u0080-\uFFFF]/,R.nodeName))return Zt(R),!0;var z=Qt(R.nodeName);if(ae("uponSanitizeElement",R,{tagName:z,allowedTags:$t}),R.hasChildNodes()&&!Ne(R.firstElementChild)&&(!Ne(R.content)||!Ne(R.content.firstElementChild))&&U(/<[/\w]/g,R.innerHTML)&&U(/<[/\w]/g,R.textContent)||z==="select"&&U(/