diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 8d4202d421..6a1002792b 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -125,7 +125,7 @@ /obj/machinery/computer/cloning/resleeving/ui_assets(mob/user) return list( - get_asset_datum(/datum/asset/cloning) + get_asset_datum(/datum/asset/simple/cloning) ) /obj/machinery/computer/cloning/tgui_interact(mob/user, datum/tgui/ui = null) @@ -493,4 +493,4 @@ SStgui.update_uis(src) #undef MENU_MAIN -#undef MENU_RECORDS \ No newline at end of file +#undef MENU_RECORDS diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index de961a96af..f896618365 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -426,49 +426,32 @@ // ..() //Pill sprites for UIs -/datum/asset/chem_master - var/assets = list() - var/verify = FALSE +/datum/asset/spritesheet/chem_master + name = "chem_master" -/datum/asset/chem_master/register() +/datum/asset/spritesheet/chem_master/create_spritesheets() for(var/i = 1 to 24) - assets["pill[i].png"] = icon('icons/obj/chemical.dmi', "pill[i]") + Insert("pill[i]", 'icons/obj/chemical.dmi', "pill[i]") for(var/i = 1 to 4) - assets["bottle-[i].png"] = icon('icons/obj/chemical.dmi', "bottle-[i]") + Insert("bottle-[i]", 'icons/obj/chemical.dmi', "bottle-[i]") - for(var/asset_name in assets) - SSassets.transport.register_asset(asset_name, assets[asset_name]) - -/datum/asset/chem_master/send(client) - SSassets.transport.send_assets(client, assets, verify) //Cloning pod sprites for UIs -/datum/asset/cloning - var/assets = list() - var/verify = FALSE - -/datum/asset/cloning/register() - assets["pod_idle.gif"] = icon('icons/obj/cloning.dmi', "pod_idle") - assets["pod_cloning.gif"] = icon('icons/obj/cloning.dmi', "pod_cloning") - assets["pod_mess.gif"] = icon('icons/obj/cloning.dmi', "pod_mess") - for(var/asset_name in assets) - SSassets.transport.register_asset(asset_name, assets[asset_name]) - -/datum/asset/cloning/send(client) - SSassets.transport.send_assets(client, assets, verify) +/datum/asset/simple/cloning + assets = list( + "pod_idle.gif" = 'icons/UI_Icons/synthprinter.gif', + "pod_cloning.gif" = 'icons/UI_Icons/synthprinter_working.gif', + ) // VOREStation Add -/datum/asset/cloning/resleeving -/datum/asset/cloning/resleeving/register() - // This intentionally does not call the parent. Duplicate assets are not allowed. - assets["sleeve_empty.gif"] = icon('icons/obj/machines/implantchair.dmi', "implantchair") - assets["sleeve_occupied.gif"] = icon('icons/obj/machines/implantchair.dmi', "implantchair_on") - assets["synthprinter.gif"] = icon('icons/obj/machines/synthpod.dmi', "pod_0") - assets["synthprinter_working.gif"] = icon('icons/obj/machines/synthpod.dmi', "pod_1") - for(var/asset_name in assets) - SSassets.transport.register_asset(asset_name, assets[asset_name]) -// VOREStation Add End +/datum/asset/simple/cloning/resleeving + assets = list( + "sleeve_empty.gif" = 'icons/UI_Icons/sleeve_empty.gif', + "sleeve_occupied.gif" = 'icons/UI_Icons/sleeve_occupied.gif', + "synthprinter.gif" = 'icons/UI_Icons/synthprinter.gif', + "synthprinter_working.gif" = 'icons/UI_Icons/synthprinter_working.gif', + ) /datum/asset/spritesheet/sheetmaterials name = "sheetmaterials" diff --git a/code/modules/modular_computers/computers/modular_computer/ui.dm b/code/modules/modular_computers/computers/modular_computer/ui.dm index 5166d0d777..6e5aa2e38e 100644 --- a/code/modules/modular_computers/computers/modular_computer/ui.dm +++ b/code/modules/modular_computers/computers/modular_computer/ui.dm @@ -80,7 +80,7 @@ /obj/item/modular_computer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - + switch(action) if("PC_exit") kill_program() diff --git a/code/modules/reagents/machinery/chem_master.dm b/code/modules/reagents/machinery/chem_master.dm index 453aeffefc..b5798262c7 100644 --- a/code/modules/reagents/machinery/chem_master.dm +++ b/code/modules/reagents/machinery/chem_master.dm @@ -83,7 +83,7 @@ /obj/machinery/chem_master/ui_assets(mob/user) return list( - get_asset_datum(/datum/asset/chem_master), + get_asset_datum(/datum/asset/spritesheet/chem_master), ) /obj/machinery/chem_master/tgui_interact(mob/user, datum/tgui/ui = null) @@ -209,8 +209,8 @@ if("change_pill_style") var/list/choices = list() for(var/i = 1 to MAX_PILL_SPRITE) - choices += "pill[i].png" - tgui_modal_bento(src, id, "Please select the new style for pills:", null, arguments, pillsprite, choices) + choices += "chem_master32x32 pill[i]" + tgui_modal_bento_spritesheet(src, id, "Please select the new style for pills:", null, arguments, pillsprite, choices) if("create_patch") if(condi || !reagents.total_volume) return @@ -244,8 +244,8 @@ if("change_bottle_style") var/list/choices = list() for(var/i = 1 to MAX_BOTTLE_SPRITE) - choices += "bottle-[i].png" - tgui_modal_bento(src, id, "Please select the new style for bottles:", null, arguments, bottlesprite, choices) + choices += "chem_master32x32 bottle-[i]" + tgui_modal_bento_spritesheet(src, id, "Please select the new style for bottles:", null, arguments, bottlesprite, choices) else return FALSE if(TGUI_MODAL_ANSWER) diff --git a/code/modules/resleeving/computers.dm b/code/modules/resleeving/computers.dm index 862d463752..d7b0f81cce 100644 --- a/code/modules/resleeving/computers.dm +++ b/code/modules/resleeving/computers.dm @@ -123,8 +123,8 @@ /obj/machinery/computer/transhuman/resleeving/ui_assets(mob/user) return list( - get_asset_datum(/datum/asset/cloning), - get_asset_datum(/datum/asset/cloning/resleeving), + get_asset_datum(/datum/asset/simple/cloning), + get_asset_datum(/datum/asset/simple/cloning/resleeving), ) /obj/machinery/computer/transhuman/resleeving/tgui_interact(mob/user, datum/tgui/ui = null) @@ -139,7 +139,7 @@ /obj/machinery/computer/transhuman/resleeving/tgui_data(mob/user) var/data[0] data["menu"] = menu - + var/list/temppods[0] for(var/obj/machinery/clonepod/transhuman/pod in pods) var/status = "idle" @@ -184,7 +184,7 @@ data["selected_pod"] = "\ref[selected_pod]" data["selected_printer"] = "\ref[selected_printer]" data["selected_sleever"] = "\ref[selected_sleever]" - + var/bodyrecords_list_ui[0] for(var/N in our_db.body_scans) var/datum/transhuman/body_record/BR = our_db.body_scans[N] diff --git a/code/modules/tgui/modal.dm b/code/modules/tgui/modal.dm index 5fb4c4cc74..9cc20202cc 100644 --- a/code/modules/tgui/modal.dm +++ b/code/modules/tgui/modal.dm @@ -146,6 +146,13 @@ GLOBAL_LIST(tgui_modals) var/datum/tgui_modal/input/bento/modal = new(id, text, delegate, arguments, value, choices) return tgui_modal_new(source, modal) +//Bento but spritesheet edition +/datum/proc/tgui_modal_bento_spritesheet(datum/source = src, id, text = "Default modal message", delegate, arguments, value, choices) + ASSERT(length(id)) + + var/datum/tgui_modal/input/bento/spritesheet/modal = new(id, text, delegate, arguments, value, choices) + return tgui_modal_new(source, modal) + /** * Opens a yes/no TGUI modal * @@ -339,6 +346,10 @@ GLOBAL_LIST(tgui_modals) . = ..() .["choices"] = choices +//Bento modal but takes spritesheet classes as choices +/datum/tgui_modal/input/bento/spritesheet + modal_type = "bentospritesheet" + /** * Boolean modal - has yes/no buttons that do different actions depending on which is pressed */ diff --git a/code/modules/tgui/modules/_base.dm b/code/modules/tgui/modules/_base.dm index 52891ab18d..80e49e6543 100644 --- a/code/modules/tgui/modules/_base.dm +++ b/code/modules/tgui/modules/_base.dm @@ -22,6 +22,13 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff /datum/tgui_module/tgui_host() return host ? host.tgui_host() : src +/datum/tgui_module/ui_assets(mob/user) + var/list/data = list() + var/obj/item/modular_computer/host = tgui_host() + if(istype(host)) + data += get_asset_datum(/datum/asset/simple/headers) + return data + /datum/tgui_module/tgui_close(mob/user) if(host) host.tgui_close(user) @@ -56,7 +63,7 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff /datum/tgui_module/tgui_static_data() . = ..() - + var/obj/item/modular_computer/host = tgui_host() if(istype(host)) . += host.get_header_data() diff --git a/code/modules/tgui/modules/atmos_control.dm b/code/modules/tgui/modules/atmos_control.dm index 98f8b89110..2f2b881da1 100644 --- a/code/modules/tgui/modules/atmos_control.dm +++ b/code/modules/tgui/modules/atmos_control.dm @@ -35,9 +35,8 @@ return TRUE /datum/tgui_module/atmos_control/ui_assets(mob/user) - return list( - get_asset_datum(/datum/asset/simple/nanomaps), - ) + . = ..() + . += get_asset_datum(/datum/asset/simple/nanomaps) /datum/tgui_module/atmos_control/tgui_interact(mob/user, datum/tgui/ui = null) ui = SStgui.try_update_ui(user, src, ui) diff --git a/icons/UI_Icons/sleeve_empty.gif b/icons/UI_Icons/sleeve_empty.gif new file mode 100644 index 0000000000..00622face2 Binary files /dev/null and b/icons/UI_Icons/sleeve_empty.gif differ diff --git a/icons/UI_Icons/sleeve_occupied.gif b/icons/UI_Icons/sleeve_occupied.gif new file mode 100644 index 0000000000..2942560d7e Binary files /dev/null and b/icons/UI_Icons/sleeve_occupied.gif differ diff --git a/icons/UI_Icons/synthprinter.gif b/icons/UI_Icons/synthprinter.gif new file mode 100644 index 0000000000..bb93c623fa Binary files /dev/null and b/icons/UI_Icons/synthprinter.gif differ diff --git a/icons/UI_Icons/synthprinter_working.gif b/icons/UI_Icons/synthprinter_working.gif new file mode 100644 index 0000000000..8caaa24244 Binary files /dev/null and b/icons/UI_Icons/synthprinter_working.gif differ diff --git a/tgui/packages/tgui/components/NanoMap.jsx b/tgui/packages/tgui/components/NanoMap.jsx index bd9b747312..75ed55a0bd 100644 --- a/tgui/packages/tgui/components/NanoMap.jsx +++ b/tgui/packages/tgui/components/NanoMap.jsx @@ -1,5 +1,6 @@ import { Component } from 'react'; +import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; import { Box, Button, Icon, LabeledList, Slider, Tooltip } from '.'; @@ -123,7 +124,9 @@ export class NanoMap extends Component { const { dragging, offsetX, offsetY, zoom = 1 } = this.state; const { children } = this.props; - const mapUrl = config.map + '_nanomap_z' + config.mapZLevel + '.png'; + const mapUrl = resolveAsset( + config.map + '_nanomap_z' + config.mapZLevel + '.png', + ); // (x * zoom), x Needs to be double the turf- map size. (for virgo, 140x140) const mapSize = this.props.zoomScale * zoom + 'px'; const newStyle = { diff --git a/tgui/packages/tgui/interfaces/ChemMaster.jsx b/tgui/packages/tgui/interfaces/ChemMaster.jsx index 606b8e71c1..8b3125f765 100644 --- a/tgui/packages/tgui/interfaces/ChemMaster.jsx +++ b/tgui/packages/tgui/interfaces/ChemMaster.jsx @@ -343,14 +343,25 @@ const ChemMasterProductionChemical = (props) => {
+ > + +
Style @@ -388,11 +399,22 @@ const ChemMasterProductionChemical = (props) => { width: '16px', height: '16px', verticalAlign: 'middle', - background: 'url(bottle-' + data.bottlesprite + '.png)', backgroundSize: '200%', backgroundPosition: 'left -10px bottom -6px', }} - /> + > + + Style diff --git a/tgui/packages/tgui/interfaces/CloningConsole.jsx b/tgui/packages/tgui/interfaces/CloningConsole.jsx index 3045d257f1..4d708a2125 100644 --- a/tgui/packages/tgui/interfaces/CloningConsole.jsx +++ b/tgui/packages/tgui/interfaces/CloningConsole.jsx @@ -1,5 +1,6 @@ import { round } from 'common/math'; +import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; import { Box, @@ -307,7 +308,7 @@ const CloningConsoleMain = (props) => { mr="0.5rem" > { mr="0.5rem" > { mr="0.5rem" > { mr="0.5rem" > { ))} ); + } else if (type === 'bentospritesheet') { + modalBody = ( + + {data.modal.choices.map((c, i) => ( + + + + ))} + + ); } else if (type === 'boolean') { modalFooter = ( diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index c16ed307cb..3696c32504 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function r(e,n){return n!=null&&typeof Symbol!="undefined"&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n}function a(e){"@swc/helpers - typeof";return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}var i=t(44583),l=t(7864);function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;on}return!1}function w(e,n,o,c,S,b,V){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=S,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=b,this.removeEmptyString=V}var F={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){F[e]=new w(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];F[n]=new w(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){F[e]=new w(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){F[e]=new w(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){F[e]=new w(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){F[e]=new w(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){F[e]=new w(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){F[e]=new w(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){F[e]=new w(e,5,!1,e.toLowerCase(),null,!1,!1)});var U=/[\-:]([a-z])/g;function M(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(U,M);F[n]=new w(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(U,M);F[n]=new w(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(U,M);F[n]=new w(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){F[e]=new w(e,1,!1,e.toLowerCase(),null,!1,!1)}),F.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){F[e]=new w(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,n,o,c){var S=F.hasOwnProperty(n)?F[n]:null;(S!==null?S.type!==0:c||!(2et||S[V]!==b[et]){var pt="\n"+S[V].replace(" at new "," at ");return e.displayName&&pt.includes("")&&(pt=pt.replace("",e.displayName)),pt}while(1<=V&&0<=et);break}}}finally{wt=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?vt(e):""}function Kt(e){switch(e.tag){case 5:return vt(e.type);case 16:return vt("Lazy");case 13:return vt("Suspense");case 19:return vt("SuspenseList");case 0:case 2:case 15:return e=Lt(e.type,!1),e;case 11:return e=Lt(e.type.render,!1),e;case 1:return e=Lt(e.type,!0),e;default:return""}}function Pt(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case W:return"Portal";case tt:return"Profiler";case k:return"StrictMode";case st:return"Suspense";case Y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case G:return(e._context.displayName||"Context")+".Provider";case q:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return n=e.displayName||null,n!==null?n:Pt(e.type)||"Memo";case $:n=e._payload,e=e._init;try{return Pt(e(n))}catch(o){}}return null}function jt(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pt(n);case 8:return n===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Xt(e){switch(typeof e=="undefined"?"undefined":a(e)){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ee(e){var n=Se(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof o!="undefined"&&typeof o.get=="function"&&typeof o.set=="function"){var S=o.get,b=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return S.call(this)},set:function(et){c=""+et,b.call(this,et)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(et){c=""+et},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function fe(e){e._valueTracker||(e._valueTracker=Ee(e))}function Ct(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),c="";return e&&(c=Se(e)?e.checked?"true":"false":e.value),e=c,e!==o?(n.setValue(e),!0):!1}function Mt(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(n){return e.body}}function Vt(e,n){var o=n.checked;return ot({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o!=null?o:e._wrapperState.initialChecked})}function Ht(e,n){var o=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;o=Xt(n.value!=null?n.value:o),e._wrapperState={initialChecked:c,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function qt(e,n){n=n.checked,n!=null&&B(e,"checked",n,!1)}function xt(e,n){qt(e,n);var o=Xt(n.value),c=n.type;if(o!=null)c==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?gt(e,n.type,o):n.hasOwnProperty("defaultValue")&>(e,n.type,Xt(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Ot(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function gt(e,n,o){(n!=="number"||Mt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var ft=Array.isArray;function Et(e,n,o,c){if(e=e.options,n){n={};for(var S=0;S"+n.valueOf().toString()+"",n=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function ce(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var zt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_t=["Webkit","ms","Moz","O"];Object.keys(zt).forEach(function(e){_t.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),zt[n]=zt[e]})});function Oe(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||zt.hasOwnProperty(e)&&zt[e]?(""+n).trim():n+"px"}function be(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var c=o.indexOf("--")===0,S=Oe(o,n[o],c);o==="float"&&(o="cssFloat"),c?e.setProperty(o,S):e[o]=S}}var We=ot({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(e,n){if(n){if(We[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function Kn(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var An=null;function rt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var St=null,ut=null,ht=null;function Nt(e){if(e=gi(e)){if(typeof St!="function")throw Error(s(280));var n=e.stateNode;n&&(n=ia(n),St(e.stateNode,e.type,n))}}function $t(e){ut?ht?ht.push(e):ht=[e]:ut=e}function oe(){if(ut){var e=ut,n=ht;if(ht=ut=null,Nt(e),n)for(e=0;e>>=0,e===0?32:31-(Hn(e)/hr|0)|0}var fn=64,Qr=4194304;function Gn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dr(e,n){var o=e.pendingLanes;if(o===0)return 0;var c=0,S=e.suspendedLanes,b=e.pingedLanes,V=o&268435455;if(V!==0){var et=V&~S;et!==0?c=Gn(et):(b&=V,b!==0&&(c=Gn(b)))}else V=o&~S,V!==0?c=Gn(V):b!==0&&(c=Gn(b));if(c===0)return 0;if(n!==0&&n!==c&&!(n&S)&&(S=c&-c,b=n&-n,S>=b||S===16&&(b&4194240)!==0))return n;if(c&4&&(c|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=c;0o;o++)n.push(e);return n}function Rr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Pn(n),e[n]=o}function Br(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var c=e.eventTimes;for(e=e.expirationTimes;0=wa),zi=" ",ti=!1;function ms(e,n){switch(e){case"keyup":return hs.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Do=!1;function El(e,n){switch(e){case"compositionend":return hu(n);case"keypress":return n.which!==32?null:(ti=!0,zi);case"textInput":return e=n.data,e===zi&&ti?null:e;default:return null}}function $i(e,n){if(Do)return e==="compositionend"||!_a&&ms(e,n)?(e=Tr(),nn=zr=en=null,Do=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:o,offset:n-e};e=c}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=xs(o)}}function ri(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?ri(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function oi(){for(var e=window,n=Mt();r(n,e.HTMLIFrameElement);){try{var o=typeof n.contentWindow.location.href=="string"}catch(c){o=!1}if(o)e=n.contentWindow;else break;n=Mt(e.document)}return n}function Hi(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Su(e){var n=oi(),o=e.focusedElem,c=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&ri(o.ownerDocument.documentElement,o)){if(c!==null&&Hi(o)){if(n=c.start,e=c.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var S=o.textContent.length,b=Math.min(c.start,S);c=c.end===void 0?b:Math.min(c.end,S),!e.extend&&b>c&&(S=c,c=b,b=S),S=Lo(o,b);var V=Lo(o,c);S&&V&&(e.rangeCount!==1||e.anchorNode!==S.node||e.anchorOffset!==S.offset||e.focusNode!==V.node||e.focusOffset!==V.offset)&&(n=n.createRange(),n.setStart(S.node,S.offset),e.removeAllRanges(),b>c?(e.addRange(n),e.extend(V.node,V.offset)):(n.setEnd(V.node,V.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,Bo=null,Ss=null,ai=null,Ma=!1;function Eu(e,n,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ma||Bo==null||Bo!==Mt(c)||(c=Bo,"selectionStart"in c&&Hi(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ai&&ja(ai,c)||(ai=c,c=fi(Ss,"onSelect"),0Vo||(e.current=yi[Vo],yi[Vo]=null,Vo--)}function rn(e,n){Vo++,yi[Vo]=e.current,e.current=n}var To={},$n=Ko(To),gr=Ko(!1),sa=To;function Vr(e,n){var o=e.type.contextTypes;if(!o)return To;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var S={},b;for(b in o)S[b]=n[b];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=S),S}function cr(e){return e=e.childContextTypes,e!=null}function Ji(){un(gr),un($n)}function qi(e,n,o){if($n.current!==To)throw Error(s(168));rn($n,n),rn(gr,o)}function xi(e,n,o){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var S in c)if(!(S in n))throw Error(s(108,jt(e)||"Unknown",S));return ot({},o,c)}function Si(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||To,sa=$n.current,rn($n,e),rn(gr,gr.current),!0}function js(e,n,o){var c=e.stateNode;if(!c)throw Error(s(169));o?(e=xi(e,n,sa),c.__reactInternalMemoizedMergedChildContext=e,un(gr),un($n),rn($n,e)):un(gr),rn(gr,o)}var Mr=null,Ei=!1,Oi=!1;function Ru(e){Mr===null?Mr=[e]:Mr.push(e)}function Ti(e){Ei=!0,Ru(e)}function ro(){if(!Oi&&Mr!==null){Oi=!0;var e=0,n=Ke;try{var o=Mr;for(Ke=1;e>=V,S-=V,Io=1<<32-Pn(n)+S|o<Be?(Qn=Ne,Ne=null):Qn=Ne.sibling;var qe=kt(It,Ne,At[Be],te);if(qe===null){Ne===null&&(Ne=Qn);break}e&&Ne&&qe.alternate===null&&n(It,Ne),mt=b(qe,mt,Be),Me===null?Te=qe:Me.sibling=qe,Me=qe,Ne=Qn}if(Be===At.length)return o(It,Ne),on&&oo(It,Be),Te;if(Ne===null){for(;BeBe?(Qn=Ne,Ne=null):Qn=Ne.sibling;var xa=kt(It,Ne,qe.value,te);if(xa===null){Ne===null&&(Ne=Qn);break}e&&Ne&&xa.alternate===null&&n(It,Ne),mt=b(xa,mt,Be),Me===null?Te=xa:Me.sibling=xa,Me=xa,Ne=Qn}if(qe.done)return o(It,Ne),on&&oo(It,Be),Te;if(Ne===null){for(;!qe.done;Be++,qe=At.next())qe=Yt(It,qe.value,te),qe!==null&&(mt=b(qe,mt,Be),Me===null?Te=qe:Me.sibling=qe,Me=qe);return on&&oo(It,Be),Te}for(Ne=c(It,Ne);!qe.done;Be++,qe=At.next())qe=le(Ne,It,Be,qe.value,te),qe!==null&&(e&&qe.alternate!==null&&Ne.delete(qe.key===null?Be:qe.key),mt=b(qe,mt,Be),Me===null?Te=qe:Me.sibling=qe,Me=qe);return e&&Ne.forEach(function(gf){return n(It,gf)}),on&&oo(It,Be),Te}function Nn(It,mt,At,te){if(typeof At=="object"&&At!==null&&At.type===H&&At.key===null&&(At=At.props.children),typeof At=="object"&&At!==null){switch(At.$$typeof){case N:t:{for(var Te=At.key,Me=mt;Me!==null;){if(Me.key===Te){if(Te=At.type,Te===H){if(Me.tag===7){o(It,Me.sibling),mt=S(Me,At.props.children),mt.return=It,It=mt;break t}}else if(Me.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===$&&so(Te)===Me.type){o(It,Me.sibling),mt=S(Me,At.props),mt.ref=Co(It,Me,At),mt.return=It,It=mt;break t}o(It,Me);break}else n(It,Me);Me=Me.sibling}At.type===H?(mt=ka(At.props.children,It.mode,te,At.key),mt.return=It,It=mt):(te=Qs(At.type,At.key,At.props,null,It.mode,te),te.ref=Co(It,mt,At),te.return=It,It=te)}return V(It);case W:t:{for(Me=At.key;mt!==null;){if(mt.key===Me)if(mt.tag===4&&mt.stateNode.containerInfo===At.containerInfo&&mt.stateNode.implementation===At.implementation){o(It,mt.sibling),mt=S(mt,At.children||[]),mt.return=It,It=mt;break t}else{o(It,mt);break}else n(It,mt);mt=mt.sibling}mt=fl(At,It.mode,te),mt.return=It,It=mt}return V(It);case $:return Me=At._init,Nn(It,mt,Me(At._payload),te)}if(ft(At))return he(It,mt,At,te);if(K(At))return xe(It,mt,At,te);io(It,At)}return typeof At=="string"&&At!==""||typeof At=="number"?(At=""+At,mt!==null&&mt.tag===6?(o(It,mt.sibling),mt=S(mt,At),mt.return=It,It=mt):(o(It,mt),mt=cl(At,It.mode,te),mt.return=It,It=mt),V(It)):o(It,mt)}return Nn}var uo=ca(!0),Po=ca(!1),Yo={},Gr=Ko(Yo),Xo=Ko(Yo),za=Ko(Yo);function wo(e){if(e===Yo)throw Error(s(174));return e}function _i(e,n){switch(rn(za,n),rn(Xo,e),rn(Gr,Yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ue(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ue(n,e)}un(Gr),rn(Gr,n)}function fa(){un(Gr),un(Xo),un(za)}function ts(e){wo(za.current);var n=wo(Gr.current),o=ue(n,e.type);n!==o&&(rn(Xo,e),rn(Gr,o))}function Ci(e){Xo.current===e&&(un(Gr),un(Xo))}var mn=Ko(0);function Pi(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var lo=[];function da(){for(var e=0;eo?o:4,e(!0);var c=wi.transition;wi.transition={};try{e(!1),n()}finally{Ke=o,wi.transition=c}}function Vl(){return kr().memoizedState}function $c(e,n,o){var c=ma(e);if(o={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null},Kl(e))Hl(n,o);else if(o=Pe(e,n,o,c),o!==null){var S=Sr();po(o,e,c,S),Gl(o,n,c)}}function Wc(e,n,o){var c=ma(e),S={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null};if(Kl(e))Hl(n,S);else{var b=e.alternate;if(e.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var V=n.lastRenderedState,et=b(V,o);if(S.hasEagerState=!0,S.eagerState=et,lr(et,V)){var pt=n.interleaved;pt===null?(S.next=S,se(n)):(S.next=pt.next,pt.next=S),n.interleaved=S;return}}catch(bt){}finally{}o=Pe(e,n,S,c),o!==null&&(S=Sr(),po(o,e,c,S),Gl(o,n,c))}}function Kl(e){var n=e.alternate;return e===vn||n!==null&&n===vn}function Hl(e,n){es=Wa=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function Gl(e,n,o){if(o&4194240){var c=n.lanes;c&=e.pendingLanes,o|=c,n.lanes=o,Jr(e,o)}}var Bs={readContext:ae,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useInsertionEffect:dr,useLayoutEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useMutableSource:dr,useSyncExternalStore:dr,useId:dr,unstable_isNewReconciler:!1},Vc={readContext:ae,useCallback:function(n,o){return bo().memoizedState=[n,o===void 0?null:o],n},useContext:ae,useEffect:Dl,useImperativeHandle:function(n,o,c){return c=c!=null?c.concat([n]):null,Ds(4194308,4,Fl.bind(null,o,n),c)},useLayoutEffect:function(n,o){return Ds(4194308,4,n,o)},useInsertionEffect:function(n,o){return Ds(4,2,n,o)},useMemo:function(n,o){var c=bo();return o=o===void 0?null:o,n=n(),c.memoizedState=[n,o],n},useReducer:function(n,o,c){var S=bo();return o=c!==void 0?c(o):o,S.memoizedState=S.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},S.queue=n,n=n.dispatch=$c.bind(null,vn,n),[S.memoizedState,n]},useRef:function(n){var o=bo();return n={current:n},o.memoizedState=n},useState:Ml,useDebugValue:zu,useDeferredValue:function(n){return bo().memoizedState=n},useTransition:function(){var n=Ml(!1),o=n[0];return n=zc.bind(null,n[1]),bo().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,c){var S=vn,b=bo();if(on){if(c===void 0)throw Error(s(407));c=c()}else{if(c=o(),Xn===null)throw Error(s(349));co&30||Pl(S,o,c)}b.memoizedState=c;var V={value:c,getSnapshot:o};return b.queue=V,Dl(bl.bind(null,S,V,n),[n]),S.flags|=2048,os(9,wl.bind(null,S,V,c,o),void 0,null),c},useId:function(){var n=bo(),o=Xn.identifierPrefix;if(on){var c=Ao,S=Io;c=(S&~(1<<32-Pn(S)-1)).toString(32)+c,o=":"+o+"R"+c,c=ns++,0<\/script>",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=V.createElement(o,{is:c.is}):(e=V.createElement(o),o==="select"&&(V=e,c.multiple?V.multiple=!0:c.size&&(V.size=c.size))):e=V.createElementNS(e,o),e[Wr]=n,e[Wo]=c,uc(e,n,!1,!1),n.stateNode=e;t:{switch(V=Kn(o,c),o){case"dialog":Je("cancel",e),Je("close",e),S=c;break;case"iframe":case"object":case"embed":Je("load",e),S=c;break;case"video":case"audio":for(S=0;SMi&&(n.flags|=128,c=!0,as(b,!1),n.lanes=4194304)}else{if(!c)if(e=Pi(V),e!==null){if(n.flags|=128,c=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),as(b,!0),b.tail===null&&b.tailMode==="hidden"&&!V.alternate&&!on)return vr(n),null}else 2*ze()-b.renderingStartTime>Mi&&o!==1073741824&&(n.flags|=128,c=!0,as(b,!1),n.lanes=4194304);b.isBackwards?(V.sibling=n.child,n.child=V):(o=b.last,o!==null?o.sibling=V:n.child=V,b.last=V)}return b.tail!==null?(n=b.tail,b.rendering=n,b.tail=n.sibling,b.renderingStartTime=ze(),n.sibling=null,o=mn.current,rn(mn,c?o&1|2:o&1),n):(vr(n),null);case 22:case 23:return sl(),c=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(n.flags|=8192),c&&n.mode&1?Nr&1073741824&&(vr(n),n.subtreeFlags&6&&(n.flags|=8192)):vr(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function Zc(e,n){switch(Ns(n),n.tag){case 1:return cr(n.type)&&Ji(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return fa(),un(gr),un($n),da(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Ci(n),null;case 13:if(un(mn),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));Q()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return un(mn),null;case 4:return fa(),null;case 10:return Zt(n.type._context),null;case 22:case 23:return sl(),null;case 24:return null;default:return null}}var zs=!1,pr=!1,Jc=typeof WeakSet=="function"?WeakSet:Set,de=null;function Ri(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(c){bn(e,n,c)}else o.current=null}function Qu(e,n,o){try{o()}catch(c){bn(e,n,c)}}var fc=!1;function qc(e,n){if(Qi=ye,e=oi(),Hi(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else t:{o=(o=e.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var S=c.anchorOffset,b=c.focusNode;c=c.focusOffset;try{o.nodeType,b.nodeType}catch(te){o=null;break t}var V=0,et=-1,pt=-1,bt=0,Ft=0,Yt=e,kt=null;e:for(;;){for(var le;Yt!==o||S!==0&&Yt.nodeType!==3||(et=V+S),Yt!==b||c!==0&&Yt.nodeType!==3||(pt=V+c),Yt.nodeType===3&&(V+=Yt.nodeValue.length),(le=Yt.firstChild)!==null;)kt=Yt,Yt=le;for(;;){if(Yt===e)break e;if(kt===o&&++bt===S&&(et=V),kt===b&&++Ft===c&&(pt=V),(le=Yt.nextSibling)!==null)break;Yt=kt,kt=Yt.parentNode}Yt=le}o=et===-1||pt===-1?null:{start:et,end:pt}}else o=null}o=o||{start:0,end:0}}else o=null;for(ws={focusedElem:e,selectionRange:o},ye=!1,de=n;de!==null;)if(n=de,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,de=e;else for(;de!==null;){n=de;try{var he=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var xe=he.memoizedProps,Nn=he.memoizedState,It=n.stateNode,mt=It.getSnapshotBeforeUpdate(n.elementType===n.type?xe:nt(n.type,xe),Nn);It.__reactInternalSnapshotBeforeUpdate=mt}break;case 3:var At=n.stateNode.containerInfo;At.nodeType===1?At.textContent="":At.nodeType===9&&At.documentElement&&At.removeChild(At.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(te){bn(n,n.return,te)}if(e=n.sibling,e!==null){e.return=n.return,de=e;break}de=n.return}return he=fc,fc=!1,he}function is(e,n,o){var c=n.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var S=c=c.next;do{if((S.tag&e)===e){var b=S.destroy;S.destroy=void 0,b!==void 0&&Qu(n,o,b)}S=S.next}while(S!==c)}}function $s(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var c=o.create;o.destroy=c()}o=o.next}while(o!==n)}}function Zu(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function dc(e){var n=e.alternate;n!==null&&(e.alternate=null,dc(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Wr],delete n[Wo],delete n[Ba],delete n[bu],delete n[Rs])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vc(e){return e.tag===5||e.tag===3||e.tag===4}function pc(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||vc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ju(e,n,o){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=oa));else if(c!==4&&(e=e.child,e!==null))for(Ju(e,n,o),e=e.sibling;e!==null;)Ju(e,n,o),e=e.sibling}function qu(e,n,o){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(qu(e,n,o),e=e.sibling;e!==null;)qu(e,n,o),e=e.sibling}var nr=null,fo=!1;function va(e,n,o){for(o=o.child;o!==null;)hc(e,n,o),o=o.sibling}function hc(e,n,o){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(br,o)}catch(et){}switch(o.tag){case 5:pr||Ri(o,n);case 6:var c=nr,S=fo;nr=null,va(e,n,o),nr=c,fo=S,nr!==null&&(fo?(e=nr,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):nr.removeChild(o.stateNode));break;case 18:nr!==null&&(fo?(e=nr,o=o.stateNode,e.nodeType===8?Zi(e.parentNode,o):e.nodeType===1&&Zi(e,o),yo(e)):Zi(nr,o.stateNode));break;case 4:c=nr,S=fo,nr=o.stateNode.containerInfo,fo=!0,va(e,n,o),nr=c,fo=S;break;case 0:case 11:case 14:case 15:if(!pr&&(c=o.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){S=c=c.next;do{var b=S,V=b.destroy;b=b.tag,V!==void 0&&(b&2||b&4)&&Qu(o,n,V),S=S.next}while(S!==c)}va(e,n,o);break;case 1:if(!pr&&(Ri(o,n),c=o.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=o.memoizedProps,c.state=o.memoizedState,c.componentWillUnmount()}catch(et){bn(o,n,et)}va(e,n,o);break;case 21:va(e,n,o);break;case 22:o.mode&1?(pr=(c=pr)||o.memoizedState!==null,va(e,n,o),pr=c):va(e,n,o);break;default:va(e,n,o)}}function mc(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Jc),n.forEach(function(c){var S=uf.bind(null,e,c);o.has(c)||(o.add(c),c.then(S,S))})}}function vo(e,n){var o=n.deletions;if(o!==null)for(var c=0;cS&&(S=V),c&=~b}if(c=S,c=ze()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*tf(c/1960))-c,10e?16:e,ha===null)var c=!1;else{if(e=ha,ha=null,Gs=0,Ze&6)throw Error(s(331));var S=Ze;for(Ze|=4,de=e.current;de!==null;){var b=de,V=b.child;if(de.flags&16){var et=b.deletions;if(et!==null){for(var pt=0;ptze()-el?Ha(e,0):tl|=o),wr(e,n)}function bc(e,n){n===0&&(e.mode&1?(n=Qr,Qr<<=1,!(Qr&130023424)&&(Qr=4194304)):n=1);var o=Sr();e=Ce(e,n),e!==null&&(Rr(e,n,o),wr(e,o))}function sf(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),bc(e,o)}function uf(e,n){var o=0;switch(e.tag){case 13:var c=e.stateNode,S=e.memoizedState;S!==null&&(o=S.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(s(314))}c!==null&&c.delete(n),bc(e,o)}var Rc;Rc=function(n,o,c){if(n!==null)if(n.memoizedProps!==o.pendingProps||gr.current)Cr=!0;else{if(!(n.lanes&c)&&!(o.flags&128))return Cr=!1,Xc(n,o,c);Cr=!!(n.flags&131072)}else Cr=!1,on&&o.flags&1048576&&ju(o,Ii,o.index);switch(o.lanes=0,o.tag){case 2:var S=o.type;Us(n,o),n=o.pendingProps;var b=Vr(o,$n.current);ne(o,c),b=Du(null,o,S,n,b,c);var V=Lu();return o.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,cr(S)?(V=!0,Si(o)):V=!1,o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,we(o),b.updater=ao,o.stateNode=b,b._reactInternals=o,ko(o,S,n,c),o=Ku(null,o,S,!0,V,c)):(o.tag=0,on&&V&&Ms(o),xr(null,o,b,c),o=o.child),o;case 16:S=o.elementType;t:{switch(Us(n,o),n=o.pendingProps,b=S._init,S=b(S._payload),o.type=S,b=o.tag=cf(S),n=nt(S,n),b){case 0:o=Vu(null,o,S,n,c);break t;case 1:o=nc(null,o,S,n,c);break t;case 11:o=Jl(null,o,S,n,c);break t;case 14:o=ql(null,o,S,nt(S.type,n),c);break t}throw Error(s(306,S,""))}return o;case 0:return S=o.type,b=o.pendingProps,b=o.elementType===S?b:nt(S,b),Vu(n,o,S,b,c);case 1:return S=o.type,b=o.pendingProps,b=o.elementType===S?b:nt(S,b),nc(n,o,S,b,c);case 3:t:{if(rc(o),n===null)throw Error(s(387));S=o.pendingProps,V=o.memoizedState,b=V.element,Xe(n,o),Sn(o,S,null,c);var et=o.memoizedState;if(S=et.element,V.isDehydrated)if(V={element:S,isDehydrated:!1,cache:et.cache,pendingSuspenseBoundaries:et.pendingSuspenseBoundaries,transitions:et.transitions},o.updateQueue.baseState=V,o.memoizedState=V,o.flags&256){b=bi(Error(s(423)),o),o=oc(n,o,S,c,b);break t}else if(S!==b){b=bi(Error(s(424)),o),o=oc(n,o,S,c,b);break t}else for(Ar=eo(o.stateNode.containerInfo.firstChild),Ir=o,on=!0,Kr=null,c=Po(o,null,S,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Q(),S===b){o=Qo(n,o,c);break t}xr(n,o,S,c)}o=o.child}return o;case 5:return ts(o),n===null&&A(o),S=o.type,b=o.pendingProps,V=n!==null?n.memoizedProps:null,et=b.children,vi(S,b)?et=null:V!==null&&vi(S,V)&&(o.flags|=32),ec(n,o),xr(n,o,et,c),o.child;case 6:return n===null&&A(o),null;case 13:return ac(n,o,c);case 4:return _i(o,o.stateNode.containerInfo),S=o.pendingProps,n===null?o.child=uo(o,null,S,c):xr(n,o,S,c),o.child;case 11:return S=o.type,b=o.pendingProps,b=o.elementType===S?b:nt(S,b),Jl(n,o,S,b,c);case 7:return xr(n,o,o.pendingProps,c),o.child;case 8:return xr(n,o,o.pendingProps.children,c),o.child;case 12:return xr(n,o,o.pendingProps.children,c),o.child;case 10:t:{if(S=o.type._context,b=o.pendingProps,V=o.memoizedProps,et=b.value,rn(lt,S._currentValue),S._currentValue=et,V!==null)if(lr(V.value,et)){if(V.children===b.children&&!gr.current){o=Qo(n,o,c);break t}}else for(V=o.child,V!==null&&(V.return=o);V!==null;){var pt=V.dependencies;if(pt!==null){et=V.child;for(var bt=pt.firstContext;bt!==null;){if(bt.context===S){if(V.tag===1){bt=Qe(-1,c&-c),bt.tag=2;var Ft=V.updateQueue;if(Ft!==null){Ft=Ft.shared;var Yt=Ft.pending;Yt===null?bt.next=bt:(bt.next=Yt.next,Yt.next=bt),Ft.pending=bt}}V.lanes|=c,bt=V.alternate,bt!==null&&(bt.lanes|=c),ee(V.return,c,o),pt.lanes|=c;break}bt=bt.next}}else if(V.tag===10)et=V.type===o.type?null:V.child;else if(V.tag===18){if(et=V.return,et===null)throw Error(s(341));et.lanes|=c,pt=et.alternate,pt!==null&&(pt.lanes|=c),ee(et,c,o),et=V.sibling}else et=V.child;if(et!==null)et.return=V;else for(et=V;et!==null;){if(et===o){et=null;break}if(V=et.sibling,V!==null){V.return=et.return,et=V;break}et=et.return}V=et}xr(n,o,b.children,c),o=o.child}return o;case 9:return b=o.type,S=o.pendingProps.children,ne(o,c),b=ae(b),S=S(b),o.flags|=1,xr(n,o,S,c),o.child;case 14:return S=o.type,b=nt(S,o.pendingProps),b=nt(S.type,b),ql(n,o,S,b,c);case 15:return _l(n,o,o.type,o.pendingProps,c);case 17:return S=o.type,b=o.pendingProps,b=o.elementType===S?b:nt(S,b),Us(n,o),o.tag=1,cr(S)?(n=!0,Si(o)):n=!1,ne(o,c),Ua(o,S,b),ko(o,S,b,c),Ku(null,o,S,!0,n,c);case 19:return sc(n,o,c);case 22:return tc(n,o,c)}throw Error(s(156,o.tag))};function jc(e,n){return Dn(e,n)}function lf(e,n,o,c){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(e,n,o,c){return new lf(e,n,o,c)}function ll(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cf(e){if(typeof e=="function")return ll(e)?1:0;if(e!=null){if(e=e.$$typeof,e===q)return 11;if(e===J)return 14}return 2}function ya(e,n){var o=e.alternate;return o===null?(o=Xr(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Qs(e,n,o,c,S,b){var V=2;if(c=e,typeof e=="function")ll(e)&&(V=1);else if(typeof e=="string")V=5;else t:switch(e){case H:return ka(o.children,S,b,n);case k:V=8,S|=8;break;case tt:return e=Xr(12,o,n,S|2),e.elementType=tt,e.lanes=b,e;case st:return e=Xr(13,o,n,S),e.elementType=st,e.lanes=b,e;case Y:return e=Xr(19,o,n,S),e.elementType=Y,e.lanes=b,e;case X:return Zs(o,S,b,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:V=10;break t;case _:V=9;break t;case q:V=11;break t;case J:V=14;break t;case $:V=16,c=null;break t}throw Error(s(130,e==null?e:typeof e=="undefined"?"undefined":a(e),""))}return n=Xr(V,o,n,S),n.elementType=e,n.type=c,n.lanes=b,n}function ka(e,n,o,c){return e=Xr(7,e,c,n),e.lanes=o,e}function Zs(e,n,o,c){return e=Xr(22,e,c,n),e.elementType=X,e.lanes=o,e.stateNode={isHidden:!1},e}function cl(e,n,o){return e=Xr(6,e,null,n),e.lanes=o,e}function fl(e,n,o){return n=Xr(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function ff(e,n,o,c,S){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rn(0),this.expirationTimes=Rn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rn(0),this.identifierPrefix=c,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function dl(e,n,o,c,S,b,V,et,pt){return e=new ff(e,n,o,et,pt),n===1?(n=1,b===!0&&(n|=8)):n=0,b=Xr(3,null,null,n),e.current=b,b.stateNode=e,b.memoizedState={element:c,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},we(b),e}function df(e,n,o){var c=3at.length)&&(ct=at.length);for(var Tt=0,Rt=new Array(ct);Tt1?Tt-1:0),Ut=1;Ut/gm),fe=R(/\${[\w\W]*}/gm),Ct=R(/^data-[\-\w.\u00B7-\uFFFF]/),Mt=R(/^aria-[\-\w]+$/),Vt=R(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ht=R(/^(?:\w+script|data):/i),qt=R(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xt=R(/^html$/i),Ot=function(){return typeof window=="undefined"?null:window},gt=function(ct,Tt){if(t(ct)!=="object"||typeof ct.createPolicy!="function")return null;var Rt=null,Ut="data-tt-policy-suffix";Tt.currentScript&&Tt.currentScript.hasAttribute(Ut)&&(Rt=Tt.currentScript.getAttribute(Ut));var ue="dompurify"+(Rt?"#"+Rt:"");try{return ct.createPolicy(ue,{createHTML:function(Ue){return Ue},createScriptURL:function(Ue){return Ue}})}catch(me){return console.warn("TrustedTypes policy "+ue+" could not be created."),null}};function ft(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ot(),ct=function(yt){return ft(yt)};if(ct.version="2.4.7",ct.removed=[],!at||!at.document||at.document.nodeType!==9)return ct.isSupported=!1,ct;var Tt=at.document,Rt=at.document,Ut=at.DocumentFragment,ue=at.HTMLTemplateElement,me=at.Node,Ue=at.Element,ce=at.NodeFilter,zt=at.NamedNodeMap,_t=zt===void 0?at.NamedNodeMap||at.MozNamedAttrMap:zt,Oe=at.HTMLFormElement,be=at.DOMParser,We=at.trustedTypes,an=Ue.prototype,Kn=X(an,"cloneNode"),An=X(an,"nextSibling"),rt=X(an,"childNodes"),St=X(an,"parentNode");if(typeof ue=="function"){var ut=Rt.createElement("template");ut.content&&ut.content.ownerDocument&&(Rt=ut.content.ownerDocument)}var ht=gt(We,Tt),Nt=ht?ht.createHTML(""):"",$t=Rt,oe=$t.implementation,re=$t.createNodeIterator,ge=$t.createDocumentFragment,Qt=$t.getElementsByTagName,Ge=Tt.importNode,De={};try{De=$(Rt).documentMode?Rt.documentMode:{}}catch(ye){}var je={};ct.isSupported=typeof St=="function"&&oe&&oe.createHTMLDocument!==void 0&&De!==9;var ke=Se,Ve=Ee,$e=fe,Le=Ct,gn=Mt,sn=Ht,Cn=qt,Zn=Vt,ve=null,pn=J({},[].concat(l(z),l(K),l(ot),l(vt),l(Lt))),tn=null,Jn=J({},[].concat(l(Kt),l(Pt),l(jt),l(Xt))),Ye=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}})),yn=null,qn=null,Dn=!0,_n=!0,Ln=!1,Er=!0,ze=!1,cn=!1,Fn=!1,or=!1,xn=!1,tr=!1,_e=!1,br=!0,On=!1,Un="user-content-",Pn=!0,Hn=!1,hr={},mr=null,fn=J({},["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"]),Qr=null,Gn=J({},["audio","video","img","source","image","track"]),Dr=null,Zr=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lr="http://www.w3.org/1998/Math/MathML",ar="http://www.w3.org/2000/svg",ir="http://www.w3.org/1999/xhtml",Rn=ir,Rr=!1,Br=null,Jr=J({},[Lr,ar,ir],W),Ke,ho=["application/xhtml+xml","text/html"],Sa="text/html",hn,qr=null,Ya=Rt.createElement("form"),Ea=function(yt){return m(yt,RegExp)||m(yt,Function)},mo=function(yt){qr&&qr===yt||((!yt||t(yt)!=="object")&&(yt={}),yt=$(yt),Ke=ho.indexOf(yt.PARSER_MEDIA_TYPE)===-1?Ke=Sa:Ke=yt.PARSER_MEDIA_TYPE,hn=Ke==="application/xhtml+xml"?W:N,ve="ALLOWED_TAGS"in yt?J({},yt.ALLOWED_TAGS,hn):pn,tn="ALLOWED_ATTR"in yt?J({},yt.ALLOWED_ATTR,hn):Jn,Br="ALLOWED_NAMESPACES"in yt?J({},yt.ALLOWED_NAMESPACES,W):Jr,Dr="ADD_URI_SAFE_ATTR"in yt?J($(Zr),yt.ADD_URI_SAFE_ATTR,hn):Zr,Qr="ADD_DATA_URI_TAGS"in yt?J($(Gn),yt.ADD_DATA_URI_TAGS,hn):Gn,mr="FORBID_CONTENTS"in yt?J({},yt.FORBID_CONTENTS,hn):fn,yn="FORBID_TAGS"in yt?J({},yt.FORBID_TAGS,hn):{},qn="FORBID_ATTR"in yt?J({},yt.FORBID_ATTR,hn):{},hr="USE_PROFILES"in yt?yt.USE_PROFILES:!1,Dn=yt.ALLOW_ARIA_ATTR!==!1,_n=yt.ALLOW_DATA_ATTR!==!1,Ln=yt.ALLOW_UNKNOWN_PROTOCOLS||!1,Er=yt.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ze=yt.SAFE_FOR_TEMPLATES||!1,cn=yt.WHOLE_DOCUMENT||!1,xn=yt.RETURN_DOM||!1,tr=yt.RETURN_DOM_FRAGMENT||!1,_e=yt.RETURN_TRUSTED_TYPE||!1,or=yt.FORCE_BODY||!1,br=yt.SANITIZE_DOM!==!1,On=yt.SANITIZE_NAMED_PROPS||!1,Pn=yt.KEEP_CONTENT!==!1,Hn=yt.IN_PLACE||!1,Zn=yt.ALLOWED_URI_REGEXP||Zn,Rn=yt.NAMESPACE||ir,Ye=yt.CUSTOM_ELEMENT_HANDLING||{},yt.CUSTOM_ELEMENT_HANDLING&&Ea(yt.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ye.tagNameCheck=yt.CUSTOM_ELEMENT_HANDLING.tagNameCheck),yt.CUSTOM_ELEMENT_HANDLING&&Ea(yt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ye.attributeNameCheck=yt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),yt.CUSTOM_ELEMENT_HANDLING&&typeof yt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ye.allowCustomizedBuiltInElements=yt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ze&&(_n=!1),tr&&(xn=!0),hr&&(ve=J({},l(Lt)),tn=[],hr.html===!0&&(J(ve,z),J(tn,Kt)),hr.svg===!0&&(J(ve,K),J(tn,Pt),J(tn,Xt)),hr.svgFilters===!0&&(J(ve,ot),J(tn,Pt),J(tn,Xt)),hr.mathMl===!0&&(J(ve,vt),J(tn,jt),J(tn,Xt))),yt.ADD_TAGS&&(ve===pn&&(ve=$(ve)),J(ve,yt.ADD_TAGS,hn)),yt.ADD_ATTR&&(tn===Jn&&(tn=$(tn)),J(tn,yt.ADD_ATTR,hn)),yt.ADD_URI_SAFE_ATTR&&J(Dr,yt.ADD_URI_SAFE_ATTR,hn),yt.FORBID_CONTENTS&&(mr===fn&&(mr=$(mr)),J(mr,yt.FORBID_CONTENTS,hn)),Pn&&(ve["#text"]=!0),cn&&J(ve,["html","head","body"]),ve.table&&(J(ve,["tbody"]),delete yn.tbody),P&&P(yt),qr=yt)},_r=J({},["mi","mo","mn","ms","mtext"]),sr=J({},["foreignobject","desc","title","annotation-xml"]),Fr=J({},["title","style","font","a","script"]),er=J({},K);J(er,ot),J(er,dt);var Ur=J({},vt);J(Ur,wt);var jo=function(yt){var Jt=St(yt);(!Jt||!Jt.tagName)&&(Jt={namespaceURI:Rn,tagName:"template"});var ie=N(yt.tagName),He=N(Jt.tagName);return Br[yt.namespaceURI]?yt.namespaceURI===ar?Jt.namespaceURI===ir?ie==="svg":Jt.namespaceURI===Lr?ie==="svg"&&(He==="annotation-xml"||_r[He]):!!er[ie]:yt.namespaceURI===Lr?Jt.namespaceURI===ir?ie==="math":Jt.namespaceURI===ar?ie==="math"&&sr[He]:!!Ur[ie]:yt.namespaceURI===ir?Jt.namespaceURI===ar&&!sr[He]||Jt.namespaceURI===Lr&&!_r[He]?!1:!Ur[ie]&&(Fr[ie]||!er[ie]):!!(Ke==="application/xhtml+xml"&&Br[yt.namespaceURI]):!1},dn=function(yt){j(ct.removed,{element:yt});try{yt.parentNode.removeChild(yt)}catch(Jt){try{yt.outerHTML=Nt}catch(ie){yt.remove()}}},Jo=function(yt,Jt){try{j(ct.removed,{attribute:Jt.getAttributeNode(yt),from:Jt})}catch(ie){j(ct.removed,{attribute:null,from:Jt})}if(Jt.removeAttribute(yt),yt==="is"&&!tn[yt])if(xn||tr)try{dn(Jt)}catch(ie){}else try{Jt.setAttribute(yt,"")}catch(ie){}},qo=function(yt){var Jt,ie;if(or)yt=""+yt;else{var He=H(yt,/^[\r\n\t ]+/);ie=He&&He[0]}Ke==="application/xhtml+xml"&&Rn===ir&&(yt=''+yt+"");var Tn=ht?ht.createHTML(yt):yt;if(Rn===ir)try{Jt=new be().parseFromString(Tn,Ke)}catch(en){}if(!Jt||!Jt.documentElement){Jt=oe.createDocument(Rn,"template",null);try{Jt.documentElement.innerHTML=Rr?Nt:Tn}catch(en){}}var jn=Jt.body||Jt.documentElement;return yt&&ie&&jn.insertBefore(Rt.createTextNode(ie),jn.childNodes[0]||null),Rn===ir?Qt.call(Jt,cn?"html":"body")[0]:cn?Jt.documentElement:jn},ur=function(yt){return re.call(yt.ownerDocument||yt,yt,ce.SHOW_ELEMENT|ce.SHOW_COMMENT|ce.SHOW_TEXT,null,!1)},Oa=function(yt){return m(yt,Oe)&&(typeof yt.nodeName!="string"||typeof yt.textContent!="string"||typeof yt.removeChild!="function"||!m(yt.attributes,_t)||typeof yt.removeAttribute!="function"||typeof yt.setAttribute!="function"||typeof yt.namespaceURI!="string"||typeof yt.insertBefore!="function"||typeof yt.hasChildNodes!="function")},Or=function(yt){return t(me)==="object"?m(yt,me):yt&&t(yt)==="object"&&typeof yt.nodeType=="number"&&typeof yt.nodeName=="string"},kn=function(yt,Jt,ie){je[yt]&&M(je[yt],function(He){He.call(ct,Jt,ie,qr)})},_o=function(yt){var Jt;if(kn("beforeSanitizeElements",yt,null),Oa(yt)||_(/[\u0080-\uFFFF]/,yt.nodeName))return dn(yt),!0;var ie=hn(yt.nodeName);if(kn("uponSanitizeElement",yt,{tagName:ie,allowedTags:ve}),yt.hasChildNodes()&&!Or(yt.firstElementChild)&&(!Or(yt.content)||!Or(yt.content.firstElementChild))&&_(/<[/\w]/g,yt.innerHTML)&&_(/<[/\w]/g,yt.textContent)||ie==="select"&&_(/