diff --git a/docs/public/editor/assets/index-Pd-r9hqm.js b/docs/public/editor/assets/index-Yl3wUbxm.js similarity index 62% rename from docs/public/editor/assets/index-Pd-r9hqm.js rename to docs/public/editor/assets/index-Yl3wUbxm.js index b9d08524d..e36c267e9 100644 --- a/docs/public/editor/assets/index-Pd-r9hqm.js +++ b/docs/public/editor/assets/index-Yl3wUbxm.js @@ -1,4 +1,4 @@ -function QO(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();const eA="modulepreload",tA=function(e){return"/editor/"+e},px={},ow=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link");r=Promise.all(n.map(s=>{if(s=tA(s),s in px)return;px[s]=!0;const a=s.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!o)for(let d=i.length-1;d>=0;d--){const m=i[d];if(m.href===s&&(!a||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":eA,a||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),a)return new Promise((d,m)=>{u.addEventListener("load",d),u.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${s}`)))})}))}return r.then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};async function rw(e){return e==null?await Promise.resolve().then(function(){return jE}):await ow(()=>import(`${e}/dotnet.js`),__vite__mapDeps([]))}async function $E(e){return e==null?await Promise.resolve().then(function(){return gA}):await ow(()=>import(`${e}/dotnet.native.js`),__vite__mapDeps([]))}async function FE(e){return e==null?await Promise.resolve().then(function(){return bA}):await ow(()=>import(`${e}/dotnet.runtime.js`),__vite__mapDeps([]))}var nA={wasm:{name:"dotnet.native.wasm",content:void 0},assemblies:[{name:"Bootsharp.Common.wasm",content:void 0},{name:"Bootsharp.DependencyInjection.wasm",content:void 0},{name:"Bootsharp.Inject.wasm",content:void 0},{name:"Humanizer.wasm",content:void 0},{name:"Microsoft.Extensions.DependencyInjection.Abstractions.wasm",content:void 0},{name:"Microsoft.Extensions.DependencyInjection.wasm",content:void 0},{name:"Naninovel.Common.Bindings.wasm",content:void 0},{name:"Naninovel.Common.wasm",content:void 0},{name:"Naninovel.Common.Modern.wasm",content:void 0},{name:"Naninovel.Editor.wasm",content:void 0},{name:"Naninovel.Editor.WASM.wasm",content:void 0},{name:"System.Collections.Concurrent.wasm",content:void 0},{name:"System.Collections.wasm",content:void 0},{name:"System.ComponentModel.wasm",content:void 0},{name:"System.Linq.wasm",content:void 0},{name:"System.Memory.wasm",content:void 0},{name:"System.Net.Http.wasm",content:void 0},{name:"System.Net.WebSockets.Client.wasm",content:void 0},{name:"System.Net.WebSockets.wasm",content:void 0},{name:"System.Private.CoreLib.wasm",content:void 0},{name:"System.Private.Uri.wasm",content:void 0},{name:"System.Runtime.InteropServices.JavaScript.wasm",content:void 0},{name:"System.Text.Encodings.Web.wasm",content:void 0},{name:"System.Text.Json.wasm",content:void 0},{name:"System.Text.RegularExpressions.wasm",content:void 0}],entryAssemblyName:"Naninovel.Editor.WASM.dll"};const HE=nA,Pi=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51]);function oA(e){if(typeof window=="object")return Uint8Array.from(window.atob(e),l=>l.charCodeAt(0));if(typeof Buffer=="function")return Buffer.from(e,"base64");const t=e.length,n=e[t-2]==="="?2:e[t-1]==="="?1:0,o=t-n&4294967292;let r,i=0,s=0;const a=[];for(;i>16&255,a[s++]=r>>8&255,a[s++]=r&255;return n===1&&(r=Pi[e.charCodeAt(i)]<<10|Pi[e.charCodeAt(i+1)]<<4|Pi[e.charCodeAt(i+2)]>>2,a[s++]=r>>8&255,a[s++]=r&255),n===2&&(r=Pi[e.charCodeAt(i)]<<2|Pi[e.charCodeAt(i+1)]>>4,a[s++]=r&255),new Uint8Array(a)}async function rA(e,t){const n=t==null,o=n?await rw():void 0,r=n?await $E():void 0,i=n?await FE():void 0,s=!n&&(await Promise.resolve().then(function(){return jE})).mt;return{mainAssemblyName:e.entryAssemblyName,assets:[a({name:"dotnet.js"},"js-module-dotnet",o,!1),a({name:"dotnet.native.js"},"js-module-native",r,!1),a({name:"dotnet.runtime.js"},"js-module-runtime",i,!1),a({name:"dotnet.native.worker.js"},"js-module-threads",void 0,!0),a(e.wasm,"dotnetwasm",void 0,!1),...e.assemblies.map(l=>a(l,"assembly"))]};function a(l,c,u,d){const m=`${t}/${l.name}`;return{name:!s||l.content||c==="assembly"?l.name:m,resolvedUrl:l.content||!t?void 0:m,buffer:typeof l.content=="string"?oA(l.content):l.content,moduleExports:u,isOptional:d,behavior:c}}}let qv;async function iA(e,t){qv=(await e.getAssemblyExports(t)).Bootsharp?.Exports}let Ye=class{handlers=new Map;warn;lastArgs;constructor(t){this.warn=t?.warn??console.warn}broadcast(...t){this.lastArgs=t;for(const n of this.handlers.values())n(...this.lastArgs)}subscribe(t){const n=this.getOrDefineId(t);return this.subscribeById(n,t),n}unsubscribe(t){if(t==null)return;const n=this.getOrDefineId(t);this.unsubscribeById(n)}subscribeById(t,n){this.handlers.has(t)?this.warn(`Failed to subscribe event handler with ID '${t}': handler is already subscribed.`):this.handlers.set(t,n)}unsubscribeById(t){this.handlers.has(t)?this.handlers.delete(t):this.warn(`Failed to unsubscribe event handler with ID '${t}': handler is not subscribed.`)}get last(){return this.lastArgs}getOrDefineId(t){const n="bootsharpEventHandlerId";if(t.hasOwnProperty(n))return t[n];const o=crypto.randomUUID();return Object.defineProperty(t,n,{value:o,enumerable:!1,writable:!1}),o}};function oe(){if(qv==null)throw Error("Boot the runtime before invoking C# APIs.");return qv}function Tt(e){return JSON.stringify(e)}function Ht(e){const t=JSON.parse(e);if(t!==null)return t}const ql={onChanged:new Ye,onChangedSerialized:e=>ql.onChanged.broadcast(Ht(e)),openFolder:e=>oe().AssetBrowser_JSAssetBrowser.OpenFolder(e),closeFolder:e=>oe().AssetBrowser_JSAssetBrowser.CloseFolder(e),openFile:e=>oe().AssetBrowser_JSAssetBrowser.OpenFile(e)},VE={get logInfo(){return this.logInfoHandler},set logInfo(e){this.logInfoHandler=e,this.logInfoSerializedHandler=t=>this.logInfoHandler(t)},get logInfoSerialized(){if(typeof this.logInfoHandler!="function")throw Error("Failed to invoke 'Bindings.logInfo' from C#. Make sure to assign function in JavaScript.");return this.logInfoSerializedHandler},get logWarning(){return this.logWarningHandler},set logWarning(e){this.logWarningHandler=e,this.logWarningSerializedHandler=t=>this.logWarningHandler(t)},get logWarningSerialized(){if(typeof this.logWarningHandler!="function")throw Error("Failed to invoke 'Bindings.logWarning' from C#. Make sure to assign function in JavaScript.");return this.logWarningSerializedHandler},get logError(){return this.logErrorHandler},set logError(e){this.logErrorHandler=e,this.logErrorSerializedHandler=t=>this.logErrorHandler(t)},get logErrorSerialized(){if(typeof this.logErrorHandler!="function")throw Error("Failed to invoke 'Bindings.logError' from C#. Make sure to assign function in JavaScript.");return this.logErrorSerializedHandler}},sA={connectToServerInLoop:e=>oe().Naninovel_Bindings_Bridging_Bridging.ConnectToServerInLoop(e),breakConnectionLoop:()=>oe().Naninovel_Bindings_Bridging_Bridging.BreakConnectionLoop(),requestGoto:(e,t)=>oe().Naninovel_Bindings_Bridging_Bridging.RequestGoto(e,t),get onMetadataUpdated(){return this.onMetadataUpdatedHandler},set onMetadataUpdated(e){this.onMetadataUpdatedHandler=e,this.onMetadataUpdatedSerializedHandler=t=>this.onMetadataUpdatedHandler(Ht(t))},get onMetadataUpdatedSerialized(){if(typeof this.onMetadataUpdatedHandler!="function")throw Error("Failed to invoke 'Bridging.onMetadataUpdated' from C#. Make sure to assign function in JavaScript.");return this.onMetadataUpdatedSerializedHandler},get onPlaybackStatusUpdated(){return this.onPlaybackStatusUpdatedHandler},set onPlaybackStatusUpdated(e){this.onPlaybackStatusUpdatedHandler=e,this.onPlaybackStatusUpdatedSerializedHandler=t=>this.onPlaybackStatusUpdatedHandler(Ht(t))},get onPlaybackStatusUpdatedSerialized(){if(typeof this.onPlaybackStatusUpdatedHandler!="function")throw Error("Failed to invoke 'Bridging.onPlaybackStatusUpdated' from C#. Make sure to assign function in JavaScript.");return this.onPlaybackStatusUpdatedSerializedHandler}},Le={onProjectTitleChanged:new Ye,onProjectTitleChangedSerialized:e=>Le.onProjectTitleChanged.broadcast(e),onRecentProjectsChanged:new Ye,onRecentProjectsChangedSerialized:e=>Le.onRecentProjectsChanged.broadcast(Ht(e)),onUserChanged:new Ye,onUserChangedSerialized:e=>Le.onUserChanged.broadcast(e),onUndoChanged:new Ye,onUndoChangedSerialized:()=>Le.onUndoChanged.broadcast(),onDirtyChanged:new Ye,onDirtyChangedSerialized:e=>Le.onDirtyChanged.broadcast(Ht(e)),onBridgingChanged:new Ye,onBridgingChangedSerialized:e=>Le.onBridgingChanged.broadcast(e),onMetadataChanged:new Ye,onMetadataChangedSerialized:e=>Le.onMetadataChanged.broadcast(e),openProject:()=>oe().ControlPanel_JSControlPanel.OpenProject(),openRecentProject:e=>oe().ControlPanel_JSControlPanel.OpenRecentProject(e),renameProject:e=>oe().ControlPanel_JSControlPanel.RenameProject(e),canUndo:()=>oe().ControlPanel_JSControlPanel.CanUndo(),canRedo:()=>oe().ControlPanel_JSControlPanel.CanRedo(),undo:()=>oe().ControlPanel_JSControlPanel.Undo(),redo:()=>oe().ControlPanel_JSControlPanel.Redo(),undoAt:e=>oe().ControlPanel_JSControlPanel.UndoAt(e),redoAt:e=>oe().ControlPanel_JSControlPanel.RedoAt(e),getUndoLength:()=>oe().ControlPanel_JSControlPanel.GetUndoLength(),viewUndo:e=>Ht(oe().ControlPanel_JSControlPanel.ViewUndo(e)),saveDirty:e=>oe().ControlPanel_JSControlPanel.SaveDirty(e),saveAllDirty:()=>oe().ControlPanel_JSControlPanel.SaveAllDirty(),findServers:async()=>Ht(await oe().ControlPanel_JSControlPanel.FindServers()),connect:e=>oe().ControlPanel_JSControlPanel.Connect(e),disconnect:()=>oe().ControlPanel_JSControlPanel.Disconnect(),applyDefaultMetadata:()=>oe().ControlPanel_JSControlPanel.ApplyDefaultMetadata(),hasCachedMetadata:()=>oe().ControlPanel_JSControlPanel.HasCachedMetadata(),deleteCachedMetadata:()=>oe().ControlPanel_JSControlPanel.DeleteCachedMetadata()},kr={setDefaultMetadata:e=>oe().Naninovel_Editor_JSEditor.SetDefaultMetadata(Tt(e)),notifyWindowBlurred:()=>oe().Naninovel_Editor_JSEditor.NotifyWindowBlurred(),hasUnsavedAssets:()=>oe().Naninovel_Editor_JSEditor.HasUnsavedAssets(),UndoContext:{0:"Modify",1:"Add",2:"Delete",Modify:0,Add:1,Delete:2},ConfigurationScope:{0:"User",1:"Project",User:0,Project:1}},jn={get mount(){return this.mountHandler},set mount(e){this.mountHandler=e,this.mountSerializedHandler=async(t,n)=>await this.mountHandler(t,Ht(n))},get mountSerialized(){if(typeof this.mountHandler!="function")throw Error("Failed to invoke 'FileSystem.mount' from C#. Make sure to assign function in JavaScript.");return this.mountSerializedHandler},get unmount(){return this.unmountHandler},set unmount(e){this.unmountHandler=e,this.unmountSerializedHandler=t=>this.unmountHandler(t)},get unmountSerialized(){if(typeof this.unmountHandler!="function")throw Error("Failed to invoke 'FileSystem.unmount' from C#. Make sure to assign function in JavaScript.");return this.unmountSerializedHandler},get pickRoot(){return this.pickRootHandler},set pickRoot(e){this.pickRootHandler=e,this.pickRootSerializedHandler=(t,n)=>this.pickRootHandler(t,n)},get pickRootSerialized(){if(typeof this.pickRootHandler!="function")throw Error("Failed to invoke 'FileSystem.pickRoot' from C#. Make sure to assign function in JavaScript.");return this.pickRootSerializedHandler},get createDirectory(){return this.createDirectoryHandler},set createDirectory(e){this.createDirectoryHandler=e,this.createDirectorySerializedHandler=(t,n)=>this.createDirectoryHandler(t,n)},get createDirectorySerialized(){if(typeof this.createDirectoryHandler!="function")throw Error("Failed to invoke 'FileSystem.createDirectory' from C#. Make sure to assign function in JavaScript.");return this.createDirectorySerializedHandler},get removeDirectory(){return this.removeDirectoryHandler},set removeDirectory(e){this.removeDirectoryHandler=e,this.removeDirectorySerializedHandler=(t,n)=>this.removeDirectoryHandler(t,n)},get removeDirectorySerialized(){if(typeof this.removeDirectoryHandler!="function")throw Error("Failed to invoke 'FileSystem.removeDirectory' from C#. Make sure to assign function in JavaScript.");return this.removeDirectorySerializedHandler},get writeFile(){return this.writeFileHandler},set writeFile(e){this.writeFileHandler=e,this.writeFileSerializedHandler=(t,n,o)=>this.writeFileHandler(t,n,o)},get writeFileSerialized(){if(typeof this.writeFileHandler!="function")throw Error("Failed to invoke 'FileSystem.writeFile' from C#. Make sure to assign function in JavaScript.");return this.writeFileSerializedHandler},get deleteFile(){return this.deleteFileHandler},set deleteFile(e){this.deleteFileHandler=e,this.deleteFileSerializedHandler=(t,n)=>this.deleteFileHandler(t,n)},get deleteFileSerialized(){if(typeof this.deleteFileHandler!="function")throw Error("Failed to invoke 'FileSystem.deleteFile' from C#. Make sure to assign function in JavaScript.");return this.deleteFileSerializedHandler},get readFile(){return this.readFileHandler},set readFile(e){this.readFileHandler=e,this.readFileSerializedHandler=async(t,n)=>Tt(await this.readFileHandler(t,n))},get readFileSerialized(){if(typeof this.readFileHandler!="function")throw Error("Failed to invoke 'FileSystem.readFile' from C#. Make sure to assign function in JavaScript.");return this.readFileSerializedHandler},get getFileInfo(){return this.getFileInfoHandler},set getFileInfo(e){this.getFileInfoHandler=e,this.getFileInfoSerializedHandler=async(t,n)=>Tt(await this.getFileInfoHandler(t,n))},get getFileInfoSerialized(){if(typeof this.getFileInfoHandler!="function")throw Error("Failed to invoke 'FileSystem.getFileInfo' from C#. Make sure to assign function in JavaScript.");return this.getFileInfoSerializedHandler},enqueueFileAdded:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher.EnqueueFileAdded(e,t),enqueueFileModified:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher.EnqueueFileModified(e,t),enqueueFileRemoved:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher.EnqueueFileRemoved(e,t),enqueueDirectoryAdded:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher.EnqueueDirectoryAdded(e,t),enqueueDirectoryRemoved:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher.EnqueueDirectoryRemoved(e,t),notifyEnqueued:e=>oe().Naninovel_Editor_FileSystem_JSFileWatcher.NotifyEnqueued(e)},Xs={onUserAuthorized:new Ye,onUserAuthorizedSerialized:e=>Xs.onUserAuthorized.broadcast(e),getLastUser:()=>oe().LoginScreen_JSLoginScreen.GetLastUser(),authorizeUser:()=>oe().LoginScreen_JSLoginScreen.AuthorizeUser(),authorizeLastUser:()=>oe().LoginScreen_JSLoginScreen.AuthorizeLastUser(),logout:()=>oe().LoginScreen_JSLoginScreen.Logout()},Vi={ValueContainerType:{0:"Single",1:"List",2:"Named",3:"NamedList",Single:0,List:1,Named:2,NamedList:3},ValueType:{0:"String",1:"Integer",2:"Decimal",3:"Boolean",String:0,Integer:1,Decimal:2,Boolean:3},ValueContextType:{0:"Expression",1:"Constant",2:"Resource",3:"Actor",4:"Appearance",5:"Color",6:"Vector",Expression:0,Constant:1,Resource:2,Actor:3,Appearance:4,Color:5,Vector:6}},UE={get mergeMetadata(){return this.mergeMetadataHandler},set mergeMetadata(e){this.mergeMetadataHandler=e,this.mergeMetadataSerializedHandler=t=>Tt(this.mergeMetadataHandler(Ht(t)))},get mergeMetadataSerialized(){if(typeof this.mergeMetadataHandler!="function")throw Error("Failed to invoke 'MetadataMerger.mergeMetadata' from C#. Make sure to assign function in JavaScript.");return this.mergeMetadataSerializedHandler}},Za={LineType:{0:"Comment",1:"Label",2:"Command",3:"Generic",Comment:0,Label:1,Command:2,Generic:3}},sl={onProgressChanged:new Ye,onProgressChangedSerialized:e=>sl.onProgressChanged.broadcast(Ht(e)),onProgressCleared:new Ye,onProgressClearedSerialized:e=>sl.onProgressCleared.broadcast(e)},Ne={onScriptChanged:new Ye,onScriptChangedSerialized:e=>Ne.onScriptChanged.broadcast(e),onLineFocused:new Ye,onLineFocusedSerialized:(e,t)=>Ne.onLineFocused.broadcast(e,t),onCommandOptionsChanged:new Ye,onCommandOptionsChangedSerialized:e=>Ne.onCommandOptionsChanged.broadcast(Ht(e)),isScriptTab:e=>oe().ScenarioEditor_JSScenarioEditor.IsScriptTab(e),getScriptIdFromTab:e=>oe().ScenarioEditor_JSScenarioEditor.GetScriptIdFromTab(e),buildTabIdFromScript:e=>oe().ScenarioEditor_JSScenarioEditor.BuildTabIdFromScript(e),goto:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.Goto(e,t),isScriptLoaded:e=>oe().ScenarioEditor_JSScenarioEditor.IsScriptLoaded(e),loadScript:e=>oe().ScenarioEditor_JSScenarioEditor.LoadScript(e),viewScript:e=>Ht(oe().ScenarioEditor_JSScenarioEditor.ViewScript(e)),getLineType:(e,t)=>Ht(oe().ScenarioEditor_JSScenarioEditor.GetLineType(e,t)),previewLine:(e,t)=>Ht(oe().ScenarioEditor_JSScenarioEditor.PreviewLine(e,t)),viewComment:(e,t)=>Ht(oe().ScenarioEditor_JSScenarioEditor.ViewComment(e,t)),viewLabel:(e,t)=>Ht(oe().ScenarioEditor_JSScenarioEditor.ViewLabel(e,t)),viewCommand:(e,t)=>Ht(oe().ScenarioEditor_JSScenarioEditor.ViewCommand(e,t)),viewGeneric:(e,t)=>Ht(oe().ScenarioEditor_JSScenarioEditor.ViewGeneric(e,t)),insertLine:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.InsertLine(e,Tt(t)),duplicateLine:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.DuplicateLine(e,Tt(t)),removeLine:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.RemoveLine(e,Tt(t)),moveLine:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.MoveLine(e,Tt(t)),moveContent:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.MoveContent(e,Tt(t)),changeLine:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.ChangeLine(e,Tt(t)),editComment:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.EditComment(e,Tt(t)),editLabel:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.EditLabel(e,Tt(t)),editParameter:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.EditParameter(e,Tt(t)),inlineCommand:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.InlineCommand(e,Tt(t)),removeInlined:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.RemoveInlined(e,Tt(t)),editText:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.EditText(e,Tt(t)),editAuthor:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.EditAuthor(e,Tt(t)),editAppearance:(e,t)=>oe().ScenarioEditor_JSScenarioEditor.EditAppearance(e,Tt(t)),saveEdits:e=>oe().ScenarioEditor_JSScenarioEditor.SaveEdits(e)},oh={get read(){return this.readHandler},set read(e){this.readHandler=e,this.readSerializedHandler=t=>this.readHandler(t)},get readSerialized(){if(typeof this.readHandler!="function")throw Error("Failed to invoke 'SessionStorage.read' from C#. Make sure to assign function in JavaScript.");return this.readSerializedHandler},get write(){return this.writeHandler},set write(e){this.writeHandler=e,this.writeSerializedHandler=(t,n)=>this.writeHandler(t,n)},get writeSerialized(){if(typeof this.writeHandler!="function")throw Error("Failed to invoke 'SessionStorage.write' from C#. Make sure to assign function in JavaScript.");return this.writeSerializedHandler},get remove(){return this.removeHandler},set remove(e){this.removeHandler=e,this.removeSerializedHandler=t=>this.removeHandler(t)},get removeSerialized(){if(typeof this.removeHandler!="function")throw Error("Failed to invoke 'SessionStorage.remove' from C#. Make sure to assign function in JavaScript.");return this.removeSerializedHandler}},ie={onChanged:new Ye,onChangedSerialized:e=>ie.onChanged.broadcast(e),openEditor:()=>oe().Settings_JSSettings.OpenEditor(),viewCategories:()=>Ht(oe().Settings_JSSettings.ViewCategories()),viewProperty:e=>Ht(oe().Settings_JSSettings.ViewProperty(Tt(e))),getValueJson:e=>oe().Settings_JSSettings.GetValueJson(Tt(e)),edit:(e,t)=>oe().Settings_JSSettings.Edit(Tt(e),t),reset:e=>oe().Settings_JSSettings.Reset(Tt(e)),saveModified:()=>oe().Settings_JSSettings.SaveModified(),registerExternal:e=>oe().Settings_JSSettings.RegisterExternal(Tt(e)),ValueType:{0:"String",1:"Integer",2:"Decimal",3:"Boolean",4:"Other",String:0,Integer:1,Decimal:2,Boolean:3,Other:4},ContainerType:{0:"Single",1:"Array",Single:0,Array:1}},ut={onTabAdded:new Ye,onTabAddedSerialized:(e,t)=>ut.onTabAdded.broadcast(Ht(e),t),onTabSelected:new Ye,onTabSelectedSerialized:e=>ut.onTabSelected.broadcast(e),onTabRenamed:new Ye,onTabRenamedSerialized:(e,t,n)=>ut.onTabRenamed.broadcast(e,t,n),onTabRemoved:new Ye,onTabRemovedSerialized:e=>ut.onTabRemoved.broadcast(e),get getDefaultLayouts(){return this.getDefaultLayoutsHandler},set getDefaultLayouts(e){this.getDefaultLayoutsHandler=e,this.getDefaultLayoutsSerializedHandler=()=>Tt(this.getDefaultLayoutsHandler())},get getDefaultLayoutsSerialized(){if(typeof this.getDefaultLayoutsHandler!="function")throw Error("Failed to invoke 'Workspace.getDefaultLayouts' from C#. Make sure to assign function in JavaScript.");return this.getDefaultLayoutsSerializedHandler},get getDefaultSetForTab(){return this.getDefaultSetForTabHandler},set getDefaultSetForTab(e){this.getDefaultSetForTabHandler=e,this.getDefaultSetForTabSerializedHandler=t=>this.getDefaultSetForTabHandler(t)},get getDefaultSetForTabSerialized(){if(typeof this.getDefaultSetForTabHandler!="function")throw Error("Failed to invoke 'Workspace.getDefaultSetForTab' from C#. Make sure to assign function in JavaScript.");return this.getDefaultSetForTabSerializedHandler},get getCurrentScheme(){return this.getCurrentSchemeHandler},set getCurrentScheme(e){this.getCurrentSchemeHandler=e,this.getCurrentSchemeSerializedHandler=()=>this.getCurrentSchemeHandler()},get getCurrentSchemeSerialized(){if(typeof this.getCurrentSchemeHandler!="function")throw Error("Failed to invoke 'Workspace.getCurrentScheme' from C#. Make sure to assign function in JavaScript.");return this.getCurrentSchemeSerializedHandler},onAvailableLayoutsChanged:new Ye,onAvailableLayoutsChangedSerialized:e=>ut.onAvailableLayoutsChanged.broadcast(Ht(e)),onSelectedLayoutChanged:new Ye,onSelectedLayoutChangedSerialized:e=>ut.onSelectedLayoutChanged.broadcast(e),onSchemeChanged:new Ye,onSchemeChangedSerialized:e=>ut.onSchemeChanged.broadcast(e),onLayoutCleared:new Ye,onLayoutClearedSerialized:()=>ut.onLayoutCleared.broadcast(),openTab:(e,t)=>oe().Workspace_JSWorkspace.OpenTab(Tt(e),Tt(t)),editTab:e=>oe().Workspace_JSWorkspace.EditTab(Tt(e)),moveTab:(e,t,n)=>oe().Workspace_JSWorkspace.MoveTab(e,t,n),focusTab:e=>oe().Workspace_JSWorkspace.FocusTab(e),closeTab:e=>oe().Workspace_JSWorkspace.CloseTab(e),isTabOpen:e=>oe().Workspace_JSWorkspace.IsTabOpen(e),getOpenTabs:()=>Ht(oe().Workspace_JSWorkspace.GetOpenTabs()),saveCurrentLayout:e=>oe().Workspace_JSWorkspace.SaveCurrentLayout(e),applyLayout:e=>oe().Workspace_JSWorkspace.ApplyLayout(e),deleteLayout:e=>oe().Workspace_JSWorkspace.DeleteLayout(e),TabContext:{0:"User",1:"Project",User:0,Project:1}};var aA=Object.freeze({__proto__:null,AssetBrowser:ql,Bindings:VE,Bridging:sA,ControlPanel:Le,Editor:kr,FileSystem:jn,LoginScreen:Xs,Metadata:Vi,MetadataMerger:UE,Parsing:Za,ProgressObserver:sl,ScenarioEditor:Ne,SessionStorage:oh,Settings:ie,Workspace:ut});function lA(e){e.setModuleImports("Bootsharp",aA)}var bi;(function(e){e[e.Standby=0]="Standby",e[e.Booting=1]="Booting",e[e.Booted=2]="Booted"})(bi||(bi={}));let Fa=bi.Standby,Gv;function cA(){return Fa}async function uA(e){if(Fa===bi.Booted)throw Error("Failed to boot .NET runtime: already booted.");if(Fa===bi.Booting)throw Error("Failed to boot .NET runtime: already booting.");Fa=bi.Booting,Gv=await rw(e?.root);const t=e?.config??await rA(e?.resources??HE,e?.root),n=await e?.create?.(t)||await Gv.dotnet.withConfig(t).create();return n.Module.runtimeKeepalivePush(),await e?.import?.(n)||lA(n),await e?.run?.(n)||await n.runMain(t.mainAssemblyName,[]),await e?.export?.(n)||await iA(n,t.mainAssemblyName),Fa=bi.Booted,n}async function dA(e,t){if(Fa!==bi.Booted)throw Error("Failed to exit .NET runtime: not booted.");Gv.exit(e??0,t),Fa=bi.Standby}var al={boot:uA,exit:dA,getStatus:cA,BootStatus:bi,resources:HE,dotnet:{getMain:rw,getNative:$E,getRuntime:FE}};const fA=!1,pA=!1;var jE=Object.freeze({__proto__:null,embedded:fA,mt:pA});const hA=!1,mA=!1;var gA=Object.freeze({__proto__:null,embedded:hA,mt:mA});const yA=!1,vA=!1;var bA=Object.freeze({__proto__:null,embedded:yA,mt:vA}),wA=Object.getOwnPropertyNames,_A=(e,t)=>function(){return t||(0,e[wA(e)[0]])((t={exports:{}}).exports,t),t.exports},xA=_A({"assets/default-metadata.json"(e,t){t.exports={actors:[],commands:[{id:"AnimateActor",alias:"animate",localizable:!1,summary:"Animate properties of the actors with the specified IDs via key frames. Key frames for the animated parameters are delimited with commas.",remarks:"It's not recommended to use this command for complex animations. Naniscript is a scenario scripting DSL and not suited for complex automation or specification such as animation. Consider using dedicated animation tools instead, such as Unity's [Animator](https://docs.unity3d.com/Manual/AnimationSection.html).

Be aware, that this command searches for actors with the provided IDs over all the actor managers, and in case multiple actors with the same ID exist (eg, a character and a text printer), this will affect only the first found one.

When running the animate commands in parallel (`wait` is set to false) the affected actors state can mutate unpredictably. This could cause unexpected results when rolling back or performing other commands that affect state of the actor. Make sure to reset affected properties of the animated actors (position, tint, appearance, etc) after the command finishes or use `@animate CharacterId` (without any args) to stop the animation prematurely.",examples:`; Animate \`Kohaku\` actor over three animation steps (key frames), +function tA(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();const nA="modulepreload",oA=function(e){return"/editor/"+e},px={},ow=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link");r=Promise.all(n.map(s=>{if(s=oA(s),s in px)return;px[s]=!0;const a=s.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!o)for(let d=i.length-1;d>=0;d--){const m=i[d];if(m.href===s&&(!a||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":nA,a||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),a)return new Promise((d,m)=>{u.addEventListener("load",d),u.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${s}`)))})}))}return r.then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};async function rw(e){return e==null?await Promise.resolve().then(function(){return WC}):await ow(()=>import(`${e}/dotnet.js`),__vite__mapDeps([]))}async function $C(e){return e==null?await Promise.resolve().then(function(){return yA}):await ow(()=>import(`${e}/dotnet.native.js`),__vite__mapDeps([]))}async function FC(e){return e==null?await Promise.resolve().then(function(){return wA}):await ow(()=>import(`${e}/dotnet.runtime.js`),__vite__mapDeps([]))}var rA={wasm:{name:"dotnet.native.wasm",content:void 0},assemblies:[{name:"Bootsharp.Common.wasm",content:void 0},{name:"Bootsharp.Inject.wasm",content:void 0},{name:"Humanizer.wasm",content:void 0},{name:"Microsoft.Extensions.DependencyInjection.Abstractions.wasm",content:void 0},{name:"Microsoft.Extensions.DependencyInjection.wasm",content:void 0},{name:"Naninovel.Common.Bindings.wasm",content:void 0},{name:"Naninovel.Common.Modern.wasm",content:void 0},{name:"Naninovel.Common.wasm",content:void 0},{name:"Naninovel.Editor.wasm",content:void 0},{name:"Naninovel.Editor.WASM.wasm",content:void 0},{name:"System.Collections.Concurrent.wasm",content:void 0},{name:"System.Collections.wasm",content:void 0},{name:"System.ComponentModel.wasm",content:void 0},{name:"System.Linq.wasm",content:void 0},{name:"System.Memory.wasm",content:void 0},{name:"System.Net.Http.wasm",content:void 0},{name:"System.Net.WebSockets.Client.wasm",content:void 0},{name:"System.Net.WebSockets.wasm",content:void 0},{name:"System.Private.CoreLib.wasm",content:void 0},{name:"System.Private.Uri.wasm",content:void 0},{name:"System.Runtime.InteropServices.JavaScript.wasm",content:void 0},{name:"System.Text.Encodings.Web.wasm",content:void 0},{name:"System.Text.Json.wasm",content:void 0},{name:"System.Text.RegularExpressions.wasm",content:void 0}],entryAssemblyName:"Naninovel.Editor.WASM.dll"};const HC=rA,Pi=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51]);function iA(e){if(typeof window=="object")return Uint8Array.from(window.atob(e),l=>l.charCodeAt(0));if(typeof Buffer=="function")return Buffer.from(e,"base64");const t=e.length,n=e[t-2]==="="?2:e[t-1]==="="?1:0,o=t-n&4294967292;let r,i=0,s=0;const a=[];for(;i>16&255,a[s++]=r>>8&255,a[s++]=r&255;return n===1&&(r=Pi[e.charCodeAt(i)]<<10|Pi[e.charCodeAt(i+1)]<<4|Pi[e.charCodeAt(i+2)]>>2,a[s++]=r>>8&255,a[s++]=r&255),n===2&&(r=Pi[e.charCodeAt(i)]<<2|Pi[e.charCodeAt(i+1)]>>4,a[s++]=r&255),new Uint8Array(a)}async function VC(e,t){const n=t==null,o=n?await rw():void 0,r=n?await $C():void 0,i=n?await FC():void 0,s=!n&&(await Promise.resolve().then(function(){return WC})).mt;return{mainAssemblyName:e.entryAssemblyName,assets:[a({name:"dotnet.js"},"js-module-dotnet",o,!1),a({name:"dotnet.native.js"},"js-module-native",r,!1),a({name:"dotnet.runtime.js"},"js-module-runtime",i,!1),a({name:"dotnet.native.worker.js"},"js-module-threads",void 0,!0),a(e.wasm,"dotnetwasm",void 0,!1),...e.assemblies.map(l=>a(l,"assembly"))]};function a(l,c,u,d){const m=`${t}/${l.name}`;return{name:!s||l.content||c==="assembly"?l.name:m,resolvedUrl:l.content||!t?void 0:m,buffer:typeof l.content=="string"?iA(l.content):l.content,moduleExports:u,isOptional:d,behavior:c}}}let qv;async function sA(e,t){qv=(await e.getAssemblyExports(t)).Bootsharp?.Generated.Interop}let Ye=class{handlers=new Map;warn;lastArgs;constructor(t){this.warn=t?.warn??console.warn}broadcast(...t){this.lastArgs=t;for(const n of this.handlers.values())n(...this.lastArgs)}subscribe(t){const n=this.getOrDefineId(t);return this.subscribeById(n,t),n}unsubscribe(t){if(t==null)return;const n=this.getOrDefineId(t);this.unsubscribeById(n)}subscribeById(t,n){this.handlers.has(t)?this.warn(`Failed to subscribe event handler with ID '${t}': handler is already subscribed.`):this.handlers.set(t,n)}unsubscribeById(t){this.handlers.has(t)?this.handlers.delete(t):this.warn(`Failed to unsubscribe event handler with ID '${t}': handler is not subscribed.`)}get last(){return this.lastArgs}getOrDefineId(t){const n="bootsharpEventHandlerId";if(t.hasOwnProperty(n))return t[n];const o=crypto.randomUUID();return Object.defineProperty(t,n,{value:o,enumerable:!1,writable:!1}),o}};function oe(){if(qv==null)throw Error("Boot the runtime before invoking C# APIs.");return qv}function Tt(e){return JSON.stringify(e)}function Ht(e){const t=JSON.parse(e);if(t!==null)return t}const ql={onChanged:new Ye,onChangedSerialized:e=>ql.onChanged.broadcast(Ht(e)),openFolder:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_AssetBrowser_JSAssetBrowser_OpenFolder(e),closeFolder:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_AssetBrowser_JSAssetBrowser_CloseFolder(e),openFile:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_AssetBrowser_JSAssetBrowser_OpenFile(e)},aA={connectToServerInLoop:e=>oe().Naninovel_Bindings_Bridging_Bridging_ConnectToServerInLoop(e),breakConnectionLoop:()=>oe().Naninovel_Bindings_Bridging_Bridging_BreakConnectionLoop(),requestGoto:(e,t)=>oe().Naninovel_Bindings_Bridging_Bridging_RequestGoto(e,t),get onMetadataUpdated(){return this.onMetadataUpdatedHandler},set onMetadataUpdated(e){this.onMetadataUpdatedHandler=e,this.onMetadataUpdatedSerializedHandler=t=>this.onMetadataUpdatedHandler(Ht(t))},get onMetadataUpdatedSerialized(){if(typeof this.onMetadataUpdatedHandler!="function")throw Error("Failed to invoke 'Bridging.onMetadataUpdated' from C#. Make sure to assign function in JavaScript.");return this.onMetadataUpdatedSerializedHandler},get onPlaybackStatusUpdated(){return this.onPlaybackStatusUpdatedHandler},set onPlaybackStatusUpdated(e){this.onPlaybackStatusUpdatedHandler=e,this.onPlaybackStatusUpdatedSerializedHandler=t=>this.onPlaybackStatusUpdatedHandler(Ht(t))},get onPlaybackStatusUpdatedSerialized(){if(typeof this.onPlaybackStatusUpdatedHandler!="function")throw Error("Failed to invoke 'Bridging.onPlaybackStatusUpdated' from C#. Make sure to assign function in JavaScript.");return this.onPlaybackStatusUpdatedSerializedHandler}},Le={onProjectTitleChanged:new Ye,onProjectTitleChangedSerialized:e=>Le.onProjectTitleChanged.broadcast(e),onRecentProjectsChanged:new Ye,onRecentProjectsChangedSerialized:e=>Le.onRecentProjectsChanged.broadcast(Ht(e)),onUserChanged:new Ye,onUserChangedSerialized:e=>Le.onUserChanged.broadcast(e),onUndoChanged:new Ye,onUndoChangedSerialized:()=>Le.onUndoChanged.broadcast(),onDirtyChanged:new Ye,onDirtyChangedSerialized:e=>Le.onDirtyChanged.broadcast(Ht(e)),onBridgingChanged:new Ye,onBridgingChangedSerialized:e=>Le.onBridgingChanged.broadcast(e),onMetadataChanged:new Ye,onMetadataChangedSerialized:e=>Le.onMetadataChanged.broadcast(e),openProject:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_OpenProject(),openRecentProject:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_OpenRecentProject(e),renameProject:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_RenameProject(e),canUndo:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_CanUndo(),canRedo:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_CanRedo(),undo:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_Undo(),redo:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_Redo(),undoAt:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_UndoAt(e),redoAt:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_RedoAt(e),getUndoLength:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_GetUndoLength(),viewUndo:e=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_ViewUndo(e)),saveDirty:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_SaveDirty(e),saveAllDirty:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_SaveAllDirty(),findServers:async()=>Ht(await oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_FindServers()),connect:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_Connect(e),disconnect:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_Disconnect(),applyDefaultMetadata:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_ApplyDefaultMetadata(),hasCachedMetadata:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_HasCachedMetadata(),deleteCachedMetadata:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ControlPanel_JSControlPanel_DeleteCachedMetadata()},kr={setDefaultMetadata:e=>oe().Naninovel_Editor_JSEditor_SetDefaultMetadata(Tt(e)),notifyWindowBlurred:()=>oe().Naninovel_Editor_JSEditor_NotifyWindowBlurred(),hasUnsavedAssets:()=>oe().Naninovel_Editor_JSEditor_HasUnsavedAssets(),UndoContext:{0:"Modify",1:"Add",2:"Delete",Modify:0,Add:1,Delete:2},ConfigurationScope:{0:"User",1:"Project",User:0,Project:1}},jn={get mount(){return this.mountHandler},set mount(e){this.mountHandler=e,this.mountSerializedHandler=async(t,n)=>await this.mountHandler(t,Ht(n))},get mountSerialized(){if(typeof this.mountHandler!="function")throw Error("Failed to invoke 'FileSystem.mount' from C#. Make sure to assign function in JavaScript.");return this.mountSerializedHandler},get unmount(){return this.unmountHandler},set unmount(e){this.unmountHandler=e,this.unmountSerializedHandler=t=>this.unmountHandler(t)},get unmountSerialized(){if(typeof this.unmountHandler!="function")throw Error("Failed to invoke 'FileSystem.unmount' from C#. Make sure to assign function in JavaScript.");return this.unmountSerializedHandler},get pickRoot(){return this.pickRootHandler},set pickRoot(e){this.pickRootHandler=e,this.pickRootSerializedHandler=(t,n)=>this.pickRootHandler(t,n)},get pickRootSerialized(){if(typeof this.pickRootHandler!="function")throw Error("Failed to invoke 'FileSystem.pickRoot' from C#. Make sure to assign function in JavaScript.");return this.pickRootSerializedHandler},get createDirectory(){return this.createDirectoryHandler},set createDirectory(e){this.createDirectoryHandler=e,this.createDirectorySerializedHandler=(t,n)=>this.createDirectoryHandler(t,n)},get createDirectorySerialized(){if(typeof this.createDirectoryHandler!="function")throw Error("Failed to invoke 'FileSystem.createDirectory' from C#. Make sure to assign function in JavaScript.");return this.createDirectorySerializedHandler},get removeDirectory(){return this.removeDirectoryHandler},set removeDirectory(e){this.removeDirectoryHandler=e,this.removeDirectorySerializedHandler=(t,n)=>this.removeDirectoryHandler(t,n)},get removeDirectorySerialized(){if(typeof this.removeDirectoryHandler!="function")throw Error("Failed to invoke 'FileSystem.removeDirectory' from C#. Make sure to assign function in JavaScript.");return this.removeDirectorySerializedHandler},get writeFile(){return this.writeFileHandler},set writeFile(e){this.writeFileHandler=e,this.writeFileSerializedHandler=(t,n,o)=>this.writeFileHandler(t,n,o)},get writeFileSerialized(){if(typeof this.writeFileHandler!="function")throw Error("Failed to invoke 'FileSystem.writeFile' from C#. Make sure to assign function in JavaScript.");return this.writeFileSerializedHandler},get deleteFile(){return this.deleteFileHandler},set deleteFile(e){this.deleteFileHandler=e,this.deleteFileSerializedHandler=(t,n)=>this.deleteFileHandler(t,n)},get deleteFileSerialized(){if(typeof this.deleteFileHandler!="function")throw Error("Failed to invoke 'FileSystem.deleteFile' from C#. Make sure to assign function in JavaScript.");return this.deleteFileSerializedHandler},get readFile(){return this.readFileHandler},set readFile(e){this.readFileHandler=e,this.readFileSerializedHandler=async(t,n)=>Tt(await this.readFileHandler(t,n))},get readFileSerialized(){if(typeof this.readFileHandler!="function")throw Error("Failed to invoke 'FileSystem.readFile' from C#. Make sure to assign function in JavaScript.");return this.readFileSerializedHandler},get getFileInfo(){return this.getFileInfoHandler},set getFileInfo(e){this.getFileInfoHandler=e,this.getFileInfoSerializedHandler=async(t,n)=>Tt(await this.getFileInfoHandler(t,n))},get getFileInfoSerialized(){if(typeof this.getFileInfoHandler!="function")throw Error("Failed to invoke 'FileSystem.getFileInfo' from C#. Make sure to assign function in JavaScript.");return this.getFileInfoSerializedHandler},enqueueFileAdded:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher_EnqueueFileAdded(e,t),enqueueFileModified:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher_EnqueueFileModified(e,t),enqueueFileRemoved:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher_EnqueueFileRemoved(e,t),enqueueDirectoryAdded:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher_EnqueueDirectoryAdded(e,t),enqueueDirectoryRemoved:(e,t)=>oe().Naninovel_Editor_FileSystem_JSFileWatcher_EnqueueDirectoryRemoved(e,t),notifyEnqueued:e=>oe().Naninovel_Editor_FileSystem_JSFileWatcher_NotifyEnqueued(e)},UC={get logInfo(){return this.logInfoHandler},set logInfo(e){this.logInfoHandler=e,this.logInfoSerializedHandler=t=>this.logInfoHandler(t)},get logInfoSerialized(){if(typeof this.logInfoHandler!="function")throw Error("Failed to invoke 'JSLogger.logInfo' from C#. Make sure to assign function in JavaScript.");return this.logInfoSerializedHandler},get logWarning(){return this.logWarningHandler},set logWarning(e){this.logWarningHandler=e,this.logWarningSerializedHandler=t=>this.logWarningHandler(t)},get logWarningSerialized(){if(typeof this.logWarningHandler!="function")throw Error("Failed to invoke 'JSLogger.logWarning' from C#. Make sure to assign function in JavaScript.");return this.logWarningSerializedHandler},get logError(){return this.logErrorHandler},set logError(e){this.logErrorHandler=e,this.logErrorSerializedHandler=t=>this.logErrorHandler(t)},get logErrorSerialized(){if(typeof this.logErrorHandler!="function")throw Error("Failed to invoke 'JSLogger.logError' from C#. Make sure to assign function in JavaScript.");return this.logErrorSerializedHandler}},Xs={onUserAuthorized:new Ye,onUserAuthorizedSerialized:e=>Xs.onUserAuthorized.broadcast(e),getLastUser:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_LoginScreen_JSLoginScreen_GetLastUser(),authorizeUser:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_LoginScreen_JSLoginScreen_AuthorizeUser(),authorizeLastUser:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_LoginScreen_JSLoginScreen_AuthorizeLastUser(),logout:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_LoginScreen_JSLoginScreen_Logout()},Vi={ValueContainerType:{0:"Single",1:"List",2:"Named",3:"NamedList",Single:0,List:1,Named:2,NamedList:3},ValueType:{0:"String",1:"Integer",2:"Decimal",3:"Boolean",String:0,Integer:1,Decimal:2,Boolean:3},ValueContextType:{0:"Expression",1:"Constant",2:"Resource",3:"Actor",4:"Appearance",5:"Color",6:"Vector",Expression:0,Constant:1,Resource:2,Actor:3,Appearance:4,Color:5,Vector:6}},jC={get mergeMetadata(){return this.mergeMetadataHandler},set mergeMetadata(e){this.mergeMetadataHandler=e,this.mergeMetadataSerializedHandler=t=>Tt(this.mergeMetadataHandler(Ht(t)))},get mergeMetadataSerialized(){if(typeof this.mergeMetadataHandler!="function")throw Error("Failed to invoke 'MetadataMerger.mergeMetadata' from C#. Make sure to assign function in JavaScript.");return this.mergeMetadataSerializedHandler}},Za={LineType:{0:"Comment",1:"Label",2:"Command",3:"Generic",Comment:0,Label:1,Command:2,Generic:3}},sl={onProgressChanged:new Ye,onProgressChangedSerialized:e=>sl.onProgressChanged.broadcast(Ht(e)),onProgressCleared:new Ye,onProgressClearedSerialized:e=>sl.onProgressCleared.broadcast(e)},Re={onScriptChanged:new Ye,onScriptChangedSerialized:e=>Re.onScriptChanged.broadcast(e),onLineFocused:new Ye,onLineFocusedSerialized:(e,t)=>Re.onLineFocused.broadcast(e,t),onCommandOptionsChanged:new Ye,onCommandOptionsChangedSerialized:e=>Re.onCommandOptionsChanged.broadcast(Ht(e)),isScriptTab:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_IsScriptTab(e),getScriptIdFromTab:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_GetScriptIdFromTab(e),buildTabIdFromScript:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_BuildTabIdFromScript(e),goto:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_Goto(e,t),isScriptLoaded:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_IsScriptLoaded(e),loadScript:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_LoadScript(e),viewScript:e=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_ViewScript(e)),getLineType:(e,t)=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_GetLineType(e,t)),previewLine:(e,t)=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_PreviewLine(e,t)),viewComment:(e,t)=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_ViewComment(e,t)),viewLabel:(e,t)=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_ViewLabel(e,t)),viewCommand:(e,t)=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_ViewCommand(e,t)),viewGeneric:(e,t)=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_ViewGeneric(e,t)),insertLine:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_InsertLine(e,Tt(t)),duplicateLine:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_DuplicateLine(e,Tt(t)),removeLine:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_RemoveLine(e,Tt(t)),moveLine:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_MoveLine(e,Tt(t)),moveContent:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_MoveContent(e,Tt(t)),changeLine:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_ChangeLine(e,Tt(t)),editComment:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_EditComment(e,Tt(t)),editLabel:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_EditLabel(e,Tt(t)),editParameter:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_EditParameter(e,Tt(t)),inlineCommand:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_InlineCommand(e,Tt(t)),removeInlined:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_RemoveInlined(e,Tt(t)),editText:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_EditText(e,Tt(t)),editAuthor:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_EditAuthor(e,Tt(t)),editAppearance:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_EditAppearance(e,Tt(t)),saveEdits:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_ScenarioEditor_JSScenarioEditor_SaveEdits(e)},oh={get read(){return this.readHandler},set read(e){this.readHandler=e,this.readSerializedHandler=t=>this.readHandler(t)},get readSerialized(){if(typeof this.readHandler!="function")throw Error("Failed to invoke 'SessionStorage.read' from C#. Make sure to assign function in JavaScript.");return this.readSerializedHandler},get write(){return this.writeHandler},set write(e){this.writeHandler=e,this.writeSerializedHandler=(t,n)=>this.writeHandler(t,n)},get writeSerialized(){if(typeof this.writeHandler!="function")throw Error("Failed to invoke 'SessionStorage.write' from C#. Make sure to assign function in JavaScript.");return this.writeSerializedHandler},get remove(){return this.removeHandler},set remove(e){this.removeHandler=e,this.removeSerializedHandler=t=>this.removeHandler(t)},get removeSerialized(){if(typeof this.removeHandler!="function")throw Error("Failed to invoke 'SessionStorage.remove' from C#. Make sure to assign function in JavaScript.");return this.removeSerializedHandler}},ie={onChanged:new Ye,onChangedSerialized:e=>ie.onChanged.broadcast(e),openEditor:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_OpenEditor(),viewCategories:()=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_ViewCategories()),viewProperty:e=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_ViewProperty(Tt(e))),getValueJson:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_GetValueJson(Tt(e)),edit:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_Edit(Tt(e),t),reset:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_Reset(Tt(e)),saveModified:()=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_SaveModified(),registerExternal:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Settings_JSSettings_RegisterExternal(Tt(e)),ValueType:{0:"String",1:"Integer",2:"Decimal",3:"Boolean",4:"Other",String:0,Integer:1,Decimal:2,Boolean:3,Other:4},ContainerType:{0:"Single",1:"Array",Single:0,Array:1}},ut={onTabAdded:new Ye,onTabAddedSerialized:(e,t)=>ut.onTabAdded.broadcast(Ht(e),t),onTabSelected:new Ye,onTabSelectedSerialized:e=>ut.onTabSelected.broadcast(e),onTabRenamed:new Ye,onTabRenamedSerialized:(e,t,n)=>ut.onTabRenamed.broadcast(e,t,n),onTabRemoved:new Ye,onTabRemovedSerialized:e=>ut.onTabRemoved.broadcast(e),get getDefaultLayouts(){return this.getDefaultLayoutsHandler},set getDefaultLayouts(e){this.getDefaultLayoutsHandler=e,this.getDefaultLayoutsSerializedHandler=()=>Tt(this.getDefaultLayoutsHandler())},get getDefaultLayoutsSerialized(){if(typeof this.getDefaultLayoutsHandler!="function")throw Error("Failed to invoke 'Workspace.getDefaultLayouts' from C#. Make sure to assign function in JavaScript.");return this.getDefaultLayoutsSerializedHandler},get getDefaultSetForTab(){return this.getDefaultSetForTabHandler},set getDefaultSetForTab(e){this.getDefaultSetForTabHandler=e,this.getDefaultSetForTabSerializedHandler=t=>this.getDefaultSetForTabHandler(t)},get getDefaultSetForTabSerialized(){if(typeof this.getDefaultSetForTabHandler!="function")throw Error("Failed to invoke 'Workspace.getDefaultSetForTab' from C#. Make sure to assign function in JavaScript.");return this.getDefaultSetForTabSerializedHandler},get getCurrentScheme(){return this.getCurrentSchemeHandler},set getCurrentScheme(e){this.getCurrentSchemeHandler=e,this.getCurrentSchemeSerializedHandler=()=>this.getCurrentSchemeHandler()},get getCurrentSchemeSerialized(){if(typeof this.getCurrentSchemeHandler!="function")throw Error("Failed to invoke 'Workspace.getCurrentScheme' from C#. Make sure to assign function in JavaScript.");return this.getCurrentSchemeSerializedHandler},onAvailableLayoutsChanged:new Ye,onAvailableLayoutsChangedSerialized:e=>ut.onAvailableLayoutsChanged.broadcast(Ht(e)),onSelectedLayoutChanged:new Ye,onSelectedLayoutChangedSerialized:e=>ut.onSelectedLayoutChanged.broadcast(e),onSchemeChanged:new Ye,onSchemeChangedSerialized:e=>ut.onSchemeChanged.broadcast(e),onLayoutCleared:new Ye,onLayoutClearedSerialized:()=>ut.onLayoutCleared.broadcast(),openTab:(e,t)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_OpenTab(Tt(e),Tt(t)),editTab:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_EditTab(Tt(e)),moveTab:(e,t,n)=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_MoveTab(e,t,n),focusTab:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_FocusTab(e),closeTab:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_CloseTab(e),isTabOpen:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_IsTabOpen(e),getOpenTabs:()=>Ht(oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_GetOpenTabs()),saveCurrentLayout:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_SaveCurrentLayout(e),applyLayout:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_ApplyLayout(e),deleteLayout:e=>oe().Bootsharp_Generated_Exports_Naninovel_Editor_Workspace_JSWorkspace_DeleteLayout(e),TabContext:{0:"User",1:"Project",User:0,Project:1}};var lA=Object.freeze({__proto__:null,AssetBrowser:ql,Bridging:aA,ControlPanel:Le,Editor:kr,FileSystem:jn,JSLogger:UC,LoginScreen:Xs,Metadata:Vi,MetadataMerger:jC,Parsing:Za,ProgressObserver:sl,ScenarioEditor:Re,SessionStorage:oh,Settings:ie,Workspace:ut});function cA(e){e.setModuleImports("Bootsharp",lA)}var bi;(function(e){e[e.Standby=0]="Standby",e[e.Booting=1]="Booting",e[e.Booted=2]="Booted"})(bi||(bi={}));let Fa=bi.Standby,Gv;function uA(){return Fa}async function dA(e){if(Fa===bi.Booted)throw Error("Failed to boot .NET runtime: already booted.");if(Fa===bi.Booting)throw Error("Failed to boot .NET runtime: already booting.");Fa=bi.Booting,Gv=await rw(e?.root);const t=e?.config??await VC(e?.resources??HC,e?.root),n=await e?.create?.(t)||await Gv.dotnet.withConfig(t).create();return n.Module.runtimeKeepalivePush(),await e?.import?.(n)||cA(n),await e?.run?.(n)||await n.runMain(t.mainAssemblyName,[]),await e?.export?.(n)||await sA(n,t.mainAssemblyName),Fa=bi.Booted,n}async function fA(e,t){if(Fa!==bi.Booted)throw Error("Failed to exit .NET runtime: not booted.");Gv.exit(e??0,t),Fa=bi.Standby}var al={boot:dA,exit:fA,getStatus:uA,BootStatus:bi,resources:HC,dotnet:{getMain:rw,getNative:$C,getRuntime:FC,buildConfig:VC}};const pA=!1,hA=!1;var WC=Object.freeze({__proto__:null,embedded:pA,mt:hA});const mA=!1,gA=!1;var yA=Object.freeze({__proto__:null,embedded:mA,mt:gA});const vA=!1,bA=!1;var wA=Object.freeze({__proto__:null,embedded:vA,mt:bA}),_A=Object.getOwnPropertyNames,xA=(e,t)=>function(){return t||(0,e[_A(e)[0]])((t={exports:{}}).exports,t),t.exports},SA=xA({"assets/default-metadata.json"(e,t){t.exports={actors:[],commands:[{id:"AnimateActor",alias:"animate",localizable:!1,summary:"Animate properties of the actors with the specified IDs via key frames. Key frames for the animated parameters are delimited with commas.",remarks:"It's not recommended to use this command for complex animations. Naniscript is a scenario scripting DSL and not suited for complex automation or specification such as animation. Consider using dedicated animation tools instead, such as Unity's [Animator](https://docs.unity3d.com/Manual/AnimationSection.html).

Be aware, that this command searches for actors with the provided IDs over all the actor managers, and in case multiple actors with the same ID exist (eg, a character and a text printer), this will affect only the first found one.

When running the animate commands in parallel (`wait` is set to false) the affected actors state can mutate unpredictably. This could cause unexpected results when rolling back or performing other commands that affect state of the actor. Make sure to reset affected properties of the animated actors (position, tint, appearance, etc) after the command finishes or use `@animate CharacterId` (without any args) to stop the animation prematurely.",examples:`; Animate \`Kohaku\` actor over three animation steps (key frames), ; changing positions: first step will take 1, second — 0.5 and third — 3 seconds. @animate Kohaku posX:50,0,85 time:1,0.5,3 @@ -444,21 +444,21 @@ Jeez, what a disgusting noise. Shut it down![wait i5][skipInput] ; The text is printed without delay, as the \`wait\` command is not awaited. ; The thunder effects are played after a random delay of 3 to 8 seconds. @wait {Random(3,8)} do:"@sfx Thunder, @shake Camera" wait:false -The thunder might go off any second...`,parameters:[{id:"WaitMode",alias:"",nameless:!0,required:!0,localizable:!1,valueContainerType:0,valueType:0,summary:"Wait conditions:
- `i` user press continue or skip input key;
- `0.0` timer (seconds);
- `i0.0` timer, that is skip-able by continue or skip input keys.",label:"waitMode",typeLabel:"string"},{id:"OnFinished",alias:"do",nameless:!1,required:!1,localizable:!1,valueContainerType:1,valueType:0,summary:"Script commands to execute when the wait is over. Escape commas inside list values to prevent them being treated as delimiters.",label:"do",typeLabel:"string list"},{id:"Wait",nameless:!1,required:!1,localizable:!1,valueContainerType:0,valueType:3,summary:"Whether the script player should wait for the async command execution before playing next command.",label:"wait",typeLabel:"boolean"},{id:"ConditionalExpression",alias:"if",nameless:!1,required:!1,localizable:!1,valueContainerType:0,valueType:0,valueContext:[{type:0},{type:0}],summary:"A boolean [script expression](https://naninovel.com/guide/script-expressions), controlling whether this command should execute.",label:"if",typeLabel:"string"}],label:"wait"}],resources:[],constants:[{name:"TransitionType",values:["Crossfade","BandedSwirl","Blinds","CircleReveal","CircleStretch","CloudReveal","Crumble","Dissolve","DropFade","LineReveal","Pixelate","RadialBlur","RadialWiggle","RandomCircleReveal","Ripple","RotateCrumble","Saturate","Shrink","SlideIn","SwirlGrid","Swirl","Water","Waterfall","Wave","Custom"]},{name:"EasingType",values:["Linear","SmoothStep","Spring","EaseInQuad","EaseOutQuad","EaseInOutQuad","EaseInCubic","EaseOutCubic","EaseInOutCubic","EaseInQuart","EaseOutQuart","EaseInOutQuart","EaseInQuint","EaseOutQuint","EaseInOutQuint","EaseInSine","EaseOutSine","EaseInOutSine","EaseInExpo","EaseOutExpo","EaseInOutExpo","EaseInCirc","EaseOutCirc","EaseInOutCirc","EaseInBounce","EaseOutBounce","EaseInOutBounce","EaseInBack","EaseOutBack","EaseInOutBack","EaseInElastic","EaseOutElastic","EaseInOutElastic"]},{name:"CharacterLookDirection",values:["Center","Left","Right"]}],variables:[],functions:["Random","CalculateProgress","IsUnlocked","HasPlayed","GetName"]}}});function SA(e,t,n,o){e.logInfo=t,e.logWarning=n??t,e.logError=o??t}function TA(){const e=xA();return typeof e=="string"?JSON.parse(e):e}function CA(...e){const t={};for(const n of e)WE(EA(n),t);return t}function EA(e){return JSON.parse(JSON.stringify(e))}function WE(e,t){for(const n in e)e.hasOwnProperty(n)&&kA(n,e[n],t)}function kA(e,t,n){n.hasOwnProperty(e)?Array.isArray(t)?e==="commands"?n[e]=LA(t,n[e]):n[e]=n[e].concat(t):typeof t=="object"&&WE(t,n[e]):n[e]=t}function LA(e,t){const n=[];for(const o of t){const r=e.find(i=>i.alias!=null&&i.alias===o.alias);r==null?n.push(o):n.push(IA(r,o))}return n.concat(e.filter(o=>!n.includes(o)))}function IA(e,t){return e.summary??=t.summary,e.remarks??=t.remarks,e.examples??=t.examples,e.parameters=RA(e.parameters,t.parameters),e}function RA(e,t){const n=e.length-t.length;for(let o=n;o{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function HA(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const o=iw(n);return(r,i)=>o.then(s=>i(s.transaction(t,r).objectStore(t)))}let ty;function GE(){return ty||(ty=HA("keyval-store","keyval")),ty}function VA(e,t=GE()){return t("readonly",n=>iw(n.get(e)))}function UA(e,t,n=GE()){return n("readwrite",o=>(o.put(t,e),iw(o.transaction)))}const YE="naninovel-file-system-roots",Hh=new Map;async function jA(){const e=await VA(YE);if(e!=null)for(const[t,n]of e)Hh.set(t,n)}async function WA(e){const t=GA(e);return Hh.set(t,e),await UA(YE,Hh),t}async function qA(e){return Hh.get(e)}function GA(e){return`${e.name}-${crypto.randomUUID()}`}const Ld=new Map;async function YA(){XA(),await jA()}function XA(){jn.pickRoot=JA,jn.mount=ZA,jn.unmount=KA,jn.createDirectory=(e,t)=>Ol(e).createDirectory(t),jn.removeDirectory=(e,t)=>Ol(e).removeDirectory(t),jn.writeFile=(e,t,n)=>Ol(e).writeFile(t,n),jn.readFile=(e,t)=>Ol(e).readFile(t),jn.deleteFile=(e,t)=>Ol(e).deleteFile(t),jn.getFileInfo=(e,t)=>Ol(e).getFileInfo(t)}async function JA(e,t){const n=await AA({id:e,mode:"readwrite",startIn:"documents"});if(n==null)return null;return WA(t?await o(n,t):n);async function o(r,i){if(r.name===i)return r;for await(const[s,a]of r)if(a.kind==="directory"&&s===i)return a;return r.getDirectoryHandle(i,{create:!0})}}async function ZA(e,t){const n=await qA(e);if(n==null)throw Error(`Failed to mount file system: unknown root '${e}'.`);if(!await MA(n))throw Error("Failed to mount file system: user denied access.");const o=new FA(t,new zA(e));await o.register(n),Ld.set(e,o)}async function KA(e){if(!Ld.has(e))throw Error(`Failed to unmount file system: unknown root '${e}'.`);Ld.delete(e)}function Ol(e){if(!Ld.has(e))throw Error(`Failed to access file system: unknown root '${e}'.`);return Ld.get(e)}async function QA(){oh.read=e=>localStorage.getItem(e)??null,oh.write=(e,t)=>localStorage.setItem(e,t),oh.remove=e=>localStorage.removeItem(e)}const Sf=new Ye;async function e8(){SA(VE,console.log,console.warn,console.error),await YA(),await QA(),await al.boot({root:"/editor/bin"}),UE.mergeMetadata=e=>CA(...e),kr.setDefaultMetadata(TA()),document.onvisibilitychange=()=>{document.visibilityState==="hidden"&&kr.notifyWindowBlurred()},addEventListener("beforeunload",e=>{if(kr.hasUnsavedAssets())return e.preventDefault(),e.returnValue=!0}),Sf.broadcast(!0)}var op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var XE={exports:{}},Ue={};var Tf=Symbol.for("react.element"),t8=Symbol.for("react.portal"),n8=Symbol.for("react.fragment"),o8=Symbol.for("react.strict_mode"),r8=Symbol.for("react.profiler"),i8=Symbol.for("react.provider"),s8=Symbol.for("react.context"),a8=Symbol.for("react.forward_ref"),l8=Symbol.for("react.suspense"),c8=Symbol.for("react.memo"),u8=Symbol.for("react.lazy"),hx=Symbol.iterator;function d8(e){return e===null||typeof e!="object"?null:(e=hx&&e[hx]||e["@@iterator"],typeof e=="function"?e:null)}var JE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ZE=Object.assign,KE={};function Yc(e,t,n){this.props=e,this.context=t,this.refs=KE,this.updater=n||JE}Yc.prototype.isReactComponent={};Yc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QE(){}QE.prototype=Yc.prototype;function aw(e,t,n){this.props=e,this.context=t,this.refs=KE,this.updater=n||JE}var lw=aw.prototype=new QE;lw.constructor=aw;ZE(lw,Yc.prototype);lw.isPureReactComponent=!0;var mx=Array.isArray,e4=Object.prototype.hasOwnProperty,cw={current:null},t4={key:!0,ref:!0,__self:!0,__source:!0};function n4(e,t,n){var o,r={},i=null,s=null;if(t!=null)for(o in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)e4.call(t,o)&&!t4.hasOwnProperty(o)&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1>>1,H=A[F];if(0>>1;Fr(q,P))Vr(W,q)?(A[F]=W,A[V]=P,F=V):(A[F]=q,A[j]=P,F=j);else if(Vr(W,P))A[F]=W,A[V]=P,F=V;else break e}}return L}function r(A,L){var P=A.sortIndex-L.sortIndex;return P!==0?P:A.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,m=3,h=!1,f=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(A){for(var L=n(c);L!==null;){if(L.callback===null)o(c);else if(L.startTime<=A)o(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function _(A){if(g=!1,w(A),!f)if(n(l)!==null)f=!0,D(S);else{var L=n(c);L!==null&&$(_,L.startTime-A)}}function S(A,L){f=!1,g&&(g=!1,y(C),C=-1),h=!0;var P=m;try{for(w(L),d=n(l);d!==null&&(!(d.expirationTime>L)||A&&!O());){var F=d.callback;if(typeof F=="function"){d.callback=null,m=d.priorityLevel;var H=F(d.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(l)&&o(l),w(L)}else o(l);d=n(l)}if(d!==null)var U=!0;else{var j=n(c);j!==null&&$(_,j.startTime-L),U=!1}return U}finally{d=null,m=P,h=!1}}var x=!1,T=null,C=-1,R=5,I=-1;function O(){return!(e.unstable_now()-IA||125F?(A.sortIndex=P,t(c,A),n(l)===null&&A===n(c)&&(g?(y(C),C=-1):g=!0,$(_,P-F))):(A.sortIndex=H,t(l,A),f||h||(f=!0,D(S))),A},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(A){var L=m;return function(){var P=m;m=L;try{return A.apply(this,arguments)}finally{m=P}}}})(i4);r4.exports=i4;var g8=r4.exports;var s4=p,ar=g8;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yv=Object.prototype.hasOwnProperty,y8=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vx={},bx={};function v8(e){return Yv.call(bx,e)?!0:Yv.call(vx,e)?!1:y8.test(e)?bx[e]=!0:(vx[e]=!0,!1)}function b8(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function w8(e,t,n,o){if(t===null||typeof t>"u"||b8(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function uo(e,t,n,o,r,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Rn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Rn[e]=new uo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Rn[t]=new uo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Rn[e]=new uo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Rn[e]=new uo(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){Rn[e]=new uo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Rn[e]=new uo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Rn[e]=new uo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Rn[e]=new uo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Rn[e]=new uo(e,5,!1,e.toLowerCase(),null,!1,!1)});var dw=/[\-:]([a-z])/g;function fw(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 t=e.replace(dw,fw);Rn[t]=new uo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(dw,fw);Rn[t]=new uo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(dw,fw);Rn[t]=new uo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Rn[e]=new uo(e,1,!1,e.toLowerCase(),null,!1,!1)});Rn.xlinkHref=new uo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Rn[e]=new uo(e,1,!1,e.toLowerCase(),null,!0,!0)});function pw(e,t,n,o){var r=Rn.hasOwnProperty(t)?Rn[t]:null;(r!==null?r.type!==0:o||!(2 - `i` user press continue or skip input key;
- `0.0` timer (seconds);
- `i0.0` timer, that is skip-able by continue or skip input keys.",label:"waitMode",typeLabel:"string"},{id:"OnFinished",alias:"do",nameless:!1,required:!1,localizable:!1,valueContainerType:1,valueType:0,summary:"Script commands to execute when the wait is over. Escape commas inside list values to prevent them being treated as delimiters.",label:"do",typeLabel:"string list"},{id:"Wait",nameless:!1,required:!1,localizable:!1,valueContainerType:0,valueType:3,summary:"Whether the script player should wait for the async command execution before playing next command.",label:"wait",typeLabel:"boolean"},{id:"ConditionalExpression",alias:"if",nameless:!1,required:!1,localizable:!1,valueContainerType:0,valueType:0,valueContext:[{type:0},{type:0}],summary:"A boolean [script expression](https://naninovel.com/guide/script-expressions), controlling whether this command should execute.",label:"if",typeLabel:"string"}],label:"wait"}],resources:[],constants:[{name:"TransitionType",values:["Crossfade","BandedSwirl","Blinds","CircleReveal","CircleStretch","CloudReveal","Crumble","Dissolve","DropFade","LineReveal","Pixelate","RadialBlur","RadialWiggle","RandomCircleReveal","Ripple","RotateCrumble","Saturate","Shrink","SlideIn","SwirlGrid","Swirl","Water","Waterfall","Wave","Custom"]},{name:"EasingType",values:["Linear","SmoothStep","Spring","EaseInQuad","EaseOutQuad","EaseInOutQuad","EaseInCubic","EaseOutCubic","EaseInOutCubic","EaseInQuart","EaseOutQuart","EaseInOutQuart","EaseInQuint","EaseOutQuint","EaseInOutQuint","EaseInSine","EaseOutSine","EaseInOutSine","EaseInExpo","EaseOutExpo","EaseInOutExpo","EaseInCirc","EaseOutCirc","EaseInOutCirc","EaseInBounce","EaseOutBounce","EaseInOutBounce","EaseInBack","EaseOutBack","EaseInOutBack","EaseInElastic","EaseOutElastic","EaseInOutElastic"]},{name:"CharacterLookDirection",values:["Center","Left","Right"]}],variables:[],functions:["Random","CalculateProgress","IsUnlocked","HasPlayed","GetName"]}}});function TA(e,t,n,o){e.logInfo=t,e.logWarning=n??t,e.logError=o??t}function EA(){const e=SA();return typeof e=="string"?JSON.parse(e):e}function CA(...e){const t={};for(const n of e)qC(kA(n),t);return t}function kA(e){return JSON.parse(JSON.stringify(e))}function qC(e,t){for(const n in e)e.hasOwnProperty(n)&&LA(n,e[n],t)}function LA(e,t,n){n.hasOwnProperty(e)?Array.isArray(t)?e==="commands"?n[e]=IA(t,n[e]):n[e]=n[e].concat(t):typeof t=="object"&&qC(t,n[e]):n[e]=t}function IA(e,t){const n=[];for(const o of t){const r=e.find(i=>i.alias!=null&&i.alias===o.alias);r==null?n.push(o):n.push(NA(r,o))}return n.concat(e.filter(o=>!n.includes(o)))}function NA(e,t){return e.summary??=t.summary,e.remarks??=t.remarks,e.examples??=t.examples,e.parameters=RA(e.parameters,t.parameters),e}function RA(e,t){const n=e.length-t.length;for(let o=n;o{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function VA(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const o=iw(n);return(r,i)=>o.then(s=>i(s.transaction(t,r).objectStore(t)))}let ty;function YC(){return ty||(ty=VA("keyval-store","keyval")),ty}function UA(e,t=YC()){return t("readonly",n=>iw(n.get(e)))}function jA(e,t,n=YC()){return n("readwrite",o=>(o.put(t,e),iw(o.transaction)))}const XC="naninovel-file-system-roots",Hh=new Map;async function WA(){const e=await UA(XC);if(e!=null)for(const[t,n]of e)Hh.set(t,n)}async function qA(e){const t=YA(e);return Hh.set(t,e),await jA(XC,Hh),t}async function GA(e){return Hh.get(e)}function YA(e){return`${e.name}-${crypto.randomUUID()}`}const Ld=new Map;async function XA(){JA(),await WA()}function JA(){jn.pickRoot=ZA,jn.mount=KA,jn.unmount=QA,jn.createDirectory=(e,t)=>Ol(e).createDirectory(t),jn.removeDirectory=(e,t)=>Ol(e).removeDirectory(t),jn.writeFile=(e,t,n)=>Ol(e).writeFile(t,n),jn.readFile=(e,t)=>Ol(e).readFile(t),jn.deleteFile=(e,t)=>Ol(e).deleteFile(t),jn.getFileInfo=(e,t)=>Ol(e).getFileInfo(t)}async function ZA(e,t){const n=await MA({id:e,mode:"readwrite",startIn:"documents"});if(n==null)return null;return qA(t?await o(n,t):n);async function o(r,i){if(r.name===i)return r;for await(const[s,a]of r)if(a.kind==="directory"&&s===i)return a;return r.getDirectoryHandle(i,{create:!0})}}async function KA(e,t){const n=await GA(e);if(n==null)throw Error(`Failed to mount file system: unknown root '${e}'.`);if(!await DA(n))throw Error("Failed to mount file system: user denied access.");const o=new HA(t,new PA(e));await o.register(n),Ld.set(e,o)}async function QA(e){if(!Ld.has(e))throw Error(`Failed to unmount file system: unknown root '${e}'.`);Ld.delete(e)}function Ol(e){if(!Ld.has(e))throw Error(`Failed to access file system: unknown root '${e}'.`);return Ld.get(e)}async function e8(){oh.read=e=>localStorage.getItem(e)??null,oh.write=(e,t)=>localStorage.setItem(e,t),oh.remove=e=>localStorage.removeItem(e)}const Sf=new Ye;async function t8(){TA(UC,console.log,console.warn,console.error),await XA(),await e8(),await al.boot({root:"/editor/bin"}),jC.mergeMetadata=e=>CA(...e),kr.setDefaultMetadata(EA()),document.onvisibilitychange=()=>{document.visibilityState==="hidden"&&kr.notifyWindowBlurred()},addEventListener("beforeunload",e=>{if(kr.hasUnsavedAssets())return e.preventDefault(),e.returnValue=!0}),Sf.broadcast(!0)}var op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var JC={exports:{}},Ue={};var Tf=Symbol.for("react.element"),n8=Symbol.for("react.portal"),o8=Symbol.for("react.fragment"),r8=Symbol.for("react.strict_mode"),i8=Symbol.for("react.profiler"),s8=Symbol.for("react.provider"),a8=Symbol.for("react.context"),l8=Symbol.for("react.forward_ref"),c8=Symbol.for("react.suspense"),u8=Symbol.for("react.memo"),d8=Symbol.for("react.lazy"),hx=Symbol.iterator;function f8(e){return e===null||typeof e!="object"?null:(e=hx&&e[hx]||e["@@iterator"],typeof e=="function"?e:null)}var ZC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KC=Object.assign,QC={};function Yc(e,t,n){this.props=e,this.context=t,this.refs=QC,this.updater=n||ZC}Yc.prototype.isReactComponent={};Yc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function e4(){}e4.prototype=Yc.prototype;function aw(e,t,n){this.props=e,this.context=t,this.refs=QC,this.updater=n||ZC}var lw=aw.prototype=new e4;lw.constructor=aw;KC(lw,Yc.prototype);lw.isPureReactComponent=!0;var mx=Array.isArray,t4=Object.prototype.hasOwnProperty,cw={current:null},n4={key:!0,ref:!0,__self:!0,__source:!0};function o4(e,t,n){var o,r={},i=null,s=null;if(t!=null)for(o in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)t4.call(t,o)&&!n4.hasOwnProperty(o)&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1>>1,H=A[F];if(0>>1;Fr(q,P))Vr(W,q)?(A[F]=W,A[V]=P,F=V):(A[F]=q,A[j]=P,F=j);else if(Vr(W,P))A[F]=W,A[V]=P,F=V;else break e}}return L}function r(A,L){var P=A.sortIndex-L.sortIndex;return P!==0?P:A.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,m=3,h=!1,f=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(A){for(var L=n(c);L!==null;){if(L.callback===null)o(c);else if(L.startTime<=A)o(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function _(A){if(g=!1,w(A),!f)if(n(l)!==null)f=!0,D(S);else{var L=n(c);L!==null&&$(_,L.startTime-A)}}function S(A,L){f=!1,g&&(g=!1,y(E),E=-1),h=!0;var P=m;try{for(w(L),d=n(l);d!==null&&(!(d.expirationTime>L)||A&&!O());){var F=d.callback;if(typeof F=="function"){d.callback=null,m=d.priorityLevel;var H=F(d.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(l)&&o(l),w(L)}else o(l);d=n(l)}if(d!==null)var U=!0;else{var j=n(c);j!==null&&$(_,j.startTime-L),U=!1}return U}finally{d=null,m=P,h=!1}}var x=!1,T=null,E=-1,N=5,I=-1;function O(){return!(e.unstable_now()-IA||125F?(A.sortIndex=P,t(c,A),n(l)===null&&A===n(c)&&(g?(y(E),E=-1):g=!0,$(_,P-F))):(A.sortIndex=H,t(l,A),f||h||(f=!0,D(S))),A},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(A){var L=m;return function(){var P=m;m=L;try{return A.apply(this,arguments)}finally{m=P}}}})(s4);i4.exports=s4;var y8=i4.exports;var a4=p,ar=y8;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yv=Object.prototype.hasOwnProperty,v8=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vx={},bx={};function b8(e){return Yv.call(bx,e)?!0:Yv.call(vx,e)?!1:v8.test(e)?bx[e]=!0:(vx[e]=!0,!1)}function w8(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _8(e,t,n,o){if(t===null||typeof t>"u"||w8(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function uo(e,t,n,o,r,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nn[e]=new uo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nn[t]=new uo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nn[e]=new uo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nn[e]=new uo(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){Nn[e]=new uo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nn[e]=new uo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nn[e]=new uo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nn[e]=new uo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nn[e]=new uo(e,5,!1,e.toLowerCase(),null,!1,!1)});var dw=/[\-:]([a-z])/g;function fw(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 t=e.replace(dw,fw);Nn[t]=new uo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(dw,fw);Nn[t]=new uo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(dw,fw);Nn[t]=new uo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nn[e]=new uo(e,1,!1,e.toLowerCase(),null,!1,!1)});Nn.xlinkHref=new uo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nn[e]=new uo(e,1,!1,e.toLowerCase(),null,!0,!0)});function pw(e,t,n,o){var r=Nn.hasOwnProperty(t)?Nn[t]:null;(r!==null?r.type!==0:o||!(2a||r[s]!==i[a]){var l=` -`+r[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{ry=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hu(e):""}function _8(e){switch(e.tag){case 5:return Hu(e.type);case 16:return Hu("Lazy");case 13:return Hu("Suspense");case 19:return Hu("SuspenseList");case 0:case 2:case 15:return e=iy(e.type,!1),e;case 11:return e=iy(e.type.render,!1),e;case 1:return e=iy(e.type,!0),e;default:return""}}function Kv(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 Yl:return"Fragment";case Gl:return"Portal";case Xv:return"Profiler";case hw:return"StrictMode";case Jv:return"Suspense";case Zv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c4:return(e.displayName||"Context")+".Consumer";case l4:return(e._context.displayName||"Context")+".Provider";case mw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gw:return t=e.displayName||null,t!==null?t:Kv(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return Kv(e(t))}catch{}}return null}function x8(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Kv(t);case 8:return t===hw?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ha(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d4(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function S8(e){var t=d4(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){o=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(s){o=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sp(e){e._valueTracker||(e._valueTracker=S8(e))}function f4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=d4(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Vh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qv(e,t){var n=t.checked;return jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _x(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=ha(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function p4(e,t){t=t.checked,t!=null&&pw(e,"checked",t,!1)}function e1(e,t){p4(e,t);var n=ha(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?t1(e,t.type,n):t.hasOwnProperty("defaultValue")&&t1(e,t.type,ha(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function t1(e,t,n){(t!=="number"||Vh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vu=Array.isArray;function lc(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=ap.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rd={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},T8=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){T8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function y4(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function v4(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=y4(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var C8=jt({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 r1(e,t){if(t){if(C8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function i1(e,t){if(e.indexOf("-")===-1)return typeof t.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 s1=null;function yw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var a1=null,cc=null,uc=null;function Cx(e){if(e=kf(e)){if(typeof a1!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=yg(t),a1(e.stateNode,e.type,t))}}function b4(e){cc?uc?uc.push(e):uc=[e]:cc=e}function w4(){if(cc){var e=cc,t=uc;if(uc=cc=null,Cx(e),t)for(e=0;e>>=0,e===0?32:31-(z8(e)/P8|0)|0}var lp=64,cp=4194304;function Uu(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 qh(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~r;a!==0?o=Uu(a):(i&=s,i!==0&&(o=Uu(i)))}else s=n&~r,s!==0?o=Uu(s):i!==0&&(o=Uu(i));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,i=t&-t,r>=i||r===16&&(i&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Cf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Kr(t),e[t]=n}function H8(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=sd),Mx=" ",Dx=!1;function F4(e,t){switch(e){case"keyup":return mM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xl=!1;function yM(e,t){switch(e){case"compositionend":return H4(t);case"keypress":return t.which!==32?null:(Dx=!0,Mx);case"textInput":return e=t.data,e===Mx&&Dx?null:e;default:return null}}function vM(e,t){if(Xl)return e==="compositionend"||!Cw&&F4(e,t)?(e=B4(),ah=xw=Qs=null,Xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$x(n)}}function W4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function q4(){for(var e=window,t=Vh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vh(e.document)}return t}function Ew(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function kM(e){var t=q4(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&W4(n.ownerDocument.documentElement,n)){if(o!==null&&Ew(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,i=Math.min(o.start,r);o=o.end===void 0?i:Math.min(o.end,r),!e.extend&&i>o&&(r=o,o=i,i=r),r=Fx(n,i);var s=Fx(n,o);r&&s&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),i>o?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jl=null,p1=null,ld=null,h1=!1;function Hx(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;h1||Jl==null||Jl!==Vh(o)||(o=Jl,"selectionStart"in o&&Ew(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ld&&zd(ld,o)||(ld=o,o=Xh(p1,"onSelect"),0Ql||(e.current=w1[Ql],w1[Ql]=null,Ql--)}function Rt(e,t){Ql++,w1[Ql]=e.current,e.current=t}var ma={},Xn=Sa(ma),No=Sa(!1),ll=ma;function Lc(e,t){var n=e.type.contextTypes;if(!n)return ma;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},i;for(i in n)r[i]=t[i];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Oo(e){return e=e.childContextTypes,e!=null}function Zh(){Dt(No),Dt(Xn)}function Yx(e,t,n){if(Xn.current!==ma)throw Error(ne(168));Rt(Xn,t),Rt(No,n)}function tk(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(ne(108,x8(e)||"Unknown",r));return jt({},n,o)}function Kh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ma,ll=Xn.current,Rt(Xn,e),Rt(No,No.current),!0}function Xx(e,t,n){var o=e.stateNode;if(!o)throw Error(ne(169));n?(e=tk(e,t,ll),o.__reactInternalMemoizedMergedChildContext=e,Dt(No),Dt(Xn),Rt(Xn,e)):Dt(No),Rt(No,n)}var qi=null,vg=!1,by=!1;function nk(e){qi===null?qi=[e]:qi.push(e)}function $M(e){vg=!0,nk(e)}function Ta(){if(!by&&qi!==null){by=!0;var e=0,t=ht;try{var n=qi;for(ht=1;e>=s,r-=s,Yi=1<<32-Kr(t)+r|n<C?(R=T,T=null):R=T.sibling;var I=m(y,T,w[C],_);if(I===null){T===null&&(T=R);break}e&&T&&I.alternate===null&&t(y,T),v=i(I,v,C),x===null?S=I:x.sibling=I,x=I,T=R}if(C===w.length)return n(y,T),zt&&Aa(y,C),S;if(T===null){for(;CC?(R=T,T=null):R=T.sibling;var O=m(y,T,I.value,_);if(O===null){T===null&&(T=R);break}e&&T&&O.alternate===null&&t(y,T),v=i(O,v,C),x===null?S=O:x.sibling=O,x=O,T=R}if(I.done)return n(y,T),zt&&Aa(y,C),S;if(T===null){for(;!I.done;C++,I=w.next())I=d(y,I.value,_),I!==null&&(v=i(I,v,C),x===null?S=I:x.sibling=I,x=I);return zt&&Aa(y,C),S}for(T=o(y,T);!I.done;C++,I=w.next())I=h(T,y,C,I.value,_),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?C:I.key),v=i(I,v,C),x===null?S=I:x.sibling=I,x=I);return e&&T.forEach(function(N){return t(y,N)}),zt&&Aa(y,C),S}function b(y,v,w,_){if(typeof w=="object"&&w!==null&&w.type===Yl&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ip:e:{for(var S=w.key,x=v;x!==null;){if(x.key===S){if(S=w.type,S===Yl){if(x.tag===7){n(y,x.sibling),v=r(x,w.props.children),v.return=y,y=v;break e}}else if(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Vs&&nS(S)===x.type){n(y,x.sibling),v=r(x,w.props),v.ref=bu(y,x,w),v.return=y,y=v;break e}n(y,x);break}else t(y,x);x=x.sibling}w.type===Yl?(v=Qa(w.props.children,y.mode,_,w.key),v.return=y,y=v):(_=mh(w.type,w.key,w.props,null,y.mode,_),_.ref=bu(y,v,w),_.return=y,y=_)}return s(y);case Gl:e:{for(x=w.key;v!==null;){if(v.key===x)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=r(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=ky(w,y.mode,_),v.return=y,y=v}return s(y);case Vs:return x=w._init,b(y,v,x(w._payload),_)}if(Vu(w))return f(y,v,w,_);if(hu(w))return g(y,v,w,_);gp(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=r(v,w),v.return=y,y=v):(n(y,v),v=Ey(w,y.mode,_),v.return=y,y=v),s(y)):n(y,v)}return b}var Rc=uk(!0),dk=uk(!1),Lf={},Ei=Sa(Lf),Fd=Sa(Lf),Hd=Sa(Lf);function Ua(e){if(e===Lf)throw Error(ne(174));return e}function Dw(e,t){switch(Rt(Hd,t),Rt(Fd,e),Rt(Ei,Lf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:o1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=o1(t,e)}Dt(Ei),Rt(Ei,t)}function Nc(){Dt(Ei),Dt(Fd),Dt(Hd)}function fk(e){Ua(Hd.current);var t=Ua(Ei.current),n=o1(t,e.type);t!==n&&(Rt(Fd,e),Rt(Ei,n))}function zw(e){Fd.current===e&&(Dt(Ei),Dt(Fd))}var Vt=Sa(0);function rm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wy=[];function Pw(){for(var e=0;en?n:4,e(!0);var o=_y.transition;_y.transition={};try{e(!1),t()}finally{ht=n,_y.transition=o}}function Lk(){return Nr().memoizedState}function UM(e,t,n){var o=ua(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},Ik(e))Rk(t,n);else if(n=sk(e,t,n,o),n!==null){var r=ao();Qr(n,e,o,r),Nk(n,t,o)}}function jM(e,t,n){var o=ua(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ik(e))Rk(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(r.hasEagerState=!0,r.eagerState=a,ti(a,s)){var l=t.interleaved;l===null?(r.next=r,Aw(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=sk(e,t,r,o),n!==null&&(r=ao(),Qr(n,e,o,r),Nk(n,t,o))}}function Ik(e){var t=e.alternate;return e===Ut||t!==null&&t===Ut}function Rk(e,t){cd=im=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nk(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,bw(e,n)}}var sm={readContext:Rr,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useInsertionEffect:Bn,useLayoutEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useMutableSource:Bn,useSyncExternalStore:Bn,useId:Bn,unstable_isNewReconciler:!1},WM={readContext:Rr,useCallback:function(e,t){return mi().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:rS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dh(4194308,4,Sk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dh(4194308,4,e,t)},useInsertionEffect:function(e,t){return dh(4,2,e,t)},useMemo:function(e,t){var n=mi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=mi();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=UM.bind(null,Ut,e),[o.memoizedState,e]},useRef:function(e){var t=mi();return e={current:e},t.memoizedState=e},useState:oS,useDebugValue:Vw,useDeferredValue:function(e){return mi().memoizedState=e},useTransition:function(){var e=oS(!1),t=e[0];return e=VM.bind(null,e[1]),mi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Ut,r=mi();if(zt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),gn===null)throw Error(ne(349));ul&30||mk(o,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,rS(yk.bind(null,o,i,e),[e]),o.flags|=2048,jd(9,gk.bind(null,o,i,n,t),void 0,null),n},useId:function(){var e=mi(),t=gn.identifierPrefix;if(zt){var n=Xi,o=Yi;n=(o&~(1<<32-Kr(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vd++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{ry=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hu(e):""}function x8(e){switch(e.tag){case 5:return Hu(e.type);case 16:return Hu("Lazy");case 13:return Hu("Suspense");case 19:return Hu("SuspenseList");case 0:case 2:case 15:return e=iy(e.type,!1),e;case 11:return e=iy(e.type.render,!1),e;case 1:return e=iy(e.type,!0),e;default:return""}}function Kv(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 Yl:return"Fragment";case Gl:return"Portal";case Xv:return"Profiler";case hw:return"StrictMode";case Jv:return"Suspense";case Zv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u4:return(e.displayName||"Context")+".Consumer";case c4:return(e._context.displayName||"Context")+".Provider";case mw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gw:return t=e.displayName||null,t!==null?t:Kv(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return Kv(e(t))}catch{}}return null}function S8(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Kv(t);case 8:return t===hw?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ha(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function f4(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T8(e){var t=f4(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){o=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(s){o=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sp(e){e._valueTracker||(e._valueTracker=T8(e))}function p4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=f4(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Vh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qv(e,t){var n=t.checked;return jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _x(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=ha(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function h4(e,t){t=t.checked,t!=null&&pw(e,"checked",t,!1)}function e1(e,t){h4(e,t);var n=ha(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?t1(e,t.type,n):t.hasOwnProperty("defaultValue")&&t1(e,t.type,ha(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function t1(e,t,n){(t!=="number"||Vh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vu=Array.isArray;function lc(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=ap.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Nd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rd={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},E8=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){E8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function v4(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function b4(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=v4(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var C8=jt({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 r1(e,t){if(t){if(C8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function i1(e,t){if(e.indexOf("-")===-1)return typeof t.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 s1=null;function yw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var a1=null,cc=null,uc=null;function Ex(e){if(e=kf(e)){if(typeof a1!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=yg(t),a1(e.stateNode,e.type,t))}}function w4(e){cc?uc?uc.push(e):uc=[e]:cc=e}function _4(){if(cc){var e=cc,t=uc;if(uc=cc=null,Ex(e),t)for(e=0;e>>=0,e===0?32:31-(P8(e)/B8|0)|0}var lp=64,cp=4194304;function Uu(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 qh(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~r;a!==0?o=Uu(a):(i&=s,i!==0&&(o=Uu(i)))}else s=n&~r,s!==0?o=Uu(s):i!==0&&(o=Uu(i));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,i=t&-t,r>=i||r===16&&(i&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Ef(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Kr(t),e[t]=n}function V8(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=sd),Mx=" ",Dx=!1;function H4(e,t){switch(e){case"keyup":return gM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xl=!1;function vM(e,t){switch(e){case"compositionend":return V4(t);case"keypress":return t.which!==32?null:(Dx=!0,Mx);case"textInput":return e=t.data,e===Mx&&Dx?null:e;default:return null}}function bM(e,t){if(Xl)return e==="compositionend"||!Ew&&H4(e,t)?(e=$4(),ah=xw=Qs=null,Xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$x(n)}}function q4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?q4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function G4(){for(var e=window,t=Vh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vh(e.document)}return t}function Cw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function LM(e){var t=G4(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&q4(n.ownerDocument.documentElement,n)){if(o!==null&&Cw(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,i=Math.min(o.start,r);o=o.end===void 0?i:Math.min(o.end,r),!e.extend&&i>o&&(r=o,o=i,i=r),r=Fx(n,i);var s=Fx(n,o);r&&s&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),i>o?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jl=null,p1=null,ld=null,h1=!1;function Hx(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;h1||Jl==null||Jl!==Vh(o)||(o=Jl,"selectionStart"in o&&Cw(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ld&&zd(ld,o)||(ld=o,o=Xh(p1,"onSelect"),0Ql||(e.current=w1[Ql],w1[Ql]=null,Ql--)}function Nt(e,t){Ql++,w1[Ql]=e.current,e.current=t}var ma={},Xn=Sa(ma),Ro=Sa(!1),ll=ma;function Lc(e,t){var n=e.type.contextTypes;if(!n)return ma;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},i;for(i in n)r[i]=t[i];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Oo(e){return e=e.childContextTypes,e!=null}function Zh(){Dt(Ro),Dt(Xn)}function Yx(e,t,n){if(Xn.current!==ma)throw Error(ne(168));Nt(Xn,t),Nt(Ro,n)}function nk(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(ne(108,S8(e)||"Unknown",r));return jt({},n,o)}function Kh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ma,ll=Xn.current,Nt(Xn,e),Nt(Ro,Ro.current),!0}function Xx(e,t,n){var o=e.stateNode;if(!o)throw Error(ne(169));n?(e=nk(e,t,ll),o.__reactInternalMemoizedMergedChildContext=e,Dt(Ro),Dt(Xn),Nt(Xn,e)):Dt(Ro),Nt(Ro,n)}var qi=null,vg=!1,by=!1;function ok(e){qi===null?qi=[e]:qi.push(e)}function FM(e){vg=!0,ok(e)}function Ta(){if(!by&&qi!==null){by=!0;var e=0,t=ht;try{var n=qi;for(ht=1;e>=s,r-=s,Yi=1<<32-Kr(t)+r|n<E?(N=T,T=null):N=T.sibling;var I=m(y,T,w[E],_);if(I===null){T===null&&(T=N);break}e&&T&&I.alternate===null&&t(y,T),v=i(I,v,E),x===null?S=I:x.sibling=I,x=I,T=N}if(E===w.length)return n(y,T),zt&&Aa(y,E),S;if(T===null){for(;EE?(N=T,T=null):N=T.sibling;var O=m(y,T,I.value,_);if(O===null){T===null&&(T=N);break}e&&T&&O.alternate===null&&t(y,T),v=i(O,v,E),x===null?S=O:x.sibling=O,x=O,T=N}if(I.done)return n(y,T),zt&&Aa(y,E),S;if(T===null){for(;!I.done;E++,I=w.next())I=d(y,I.value,_),I!==null&&(v=i(I,v,E),x===null?S=I:x.sibling=I,x=I);return zt&&Aa(y,E),S}for(T=o(y,T);!I.done;E++,I=w.next())I=h(T,y,E,I.value,_),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?E:I.key),v=i(I,v,E),x===null?S=I:x.sibling=I,x=I);return e&&T.forEach(function(R){return t(y,R)}),zt&&Aa(y,E),S}function b(y,v,w,_){if(typeof w=="object"&&w!==null&&w.type===Yl&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ip:e:{for(var S=w.key,x=v;x!==null;){if(x.key===S){if(S=w.type,S===Yl){if(x.tag===7){n(y,x.sibling),v=r(x,w.props.children),v.return=y,y=v;break e}}else if(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Vs&&nS(S)===x.type){n(y,x.sibling),v=r(x,w.props),v.ref=bu(y,x,w),v.return=y,y=v;break e}n(y,x);break}else t(y,x);x=x.sibling}w.type===Yl?(v=Qa(w.props.children,y.mode,_,w.key),v.return=y,y=v):(_=mh(w.type,w.key,w.props,null,y.mode,_),_.ref=bu(y,v,w),_.return=y,y=_)}return s(y);case Gl:e:{for(x=w.key;v!==null;){if(v.key===x)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=r(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=ky(w,y.mode,_),v.return=y,y=v}return s(y);case Vs:return x=w._init,b(y,v,x(w._payload),_)}if(Vu(w))return f(y,v,w,_);if(hu(w))return g(y,v,w,_);gp(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=r(v,w),v.return=y,y=v):(n(y,v),v=Cy(w,y.mode,_),v.return=y,y=v),s(y)):n(y,v)}return b}var Nc=dk(!0),fk=dk(!1),Lf={},Ci=Sa(Lf),Fd=Sa(Lf),Hd=Sa(Lf);function Ua(e){if(e===Lf)throw Error(ne(174));return e}function Dw(e,t){switch(Nt(Hd,t),Nt(Fd,e),Nt(Ci,Lf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:o1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=o1(t,e)}Dt(Ci),Nt(Ci,t)}function Rc(){Dt(Ci),Dt(Fd),Dt(Hd)}function pk(e){Ua(Hd.current);var t=Ua(Ci.current),n=o1(t,e.type);t!==n&&(Nt(Fd,e),Nt(Ci,n))}function zw(e){Fd.current===e&&(Dt(Ci),Dt(Fd))}var Vt=Sa(0);function rm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wy=[];function Pw(){for(var e=0;en?n:4,e(!0);var o=_y.transition;_y.transition={};try{e(!1),t()}finally{ht=n,_y.transition=o}}function Ik(){return Rr().memoizedState}function jM(e,t,n){var o=ua(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},Nk(e))Rk(t,n);else if(n=ak(e,t,n,o),n!==null){var r=ao();Qr(n,e,o,r),Ok(n,t,o)}}function WM(e,t,n){var o=ua(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nk(e))Rk(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(r.hasEagerState=!0,r.eagerState=a,ti(a,s)){var l=t.interleaved;l===null?(r.next=r,Aw(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=ak(e,t,r,o),n!==null&&(r=ao(),Qr(n,e,o,r),Ok(n,t,o))}}function Nk(e){var t=e.alternate;return e===Ut||t!==null&&t===Ut}function Rk(e,t){cd=im=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ok(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,bw(e,n)}}var sm={readContext:Nr,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useInsertionEffect:Bn,useLayoutEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useMutableSource:Bn,useSyncExternalStore:Bn,useId:Bn,unstable_isNewReconciler:!1},qM={readContext:Nr,useCallback:function(e,t){return mi().memoizedState=[e,t===void 0?null:t],e},useContext:Nr,useEffect:rS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dh(4194308,4,Tk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dh(4194308,4,e,t)},useInsertionEffect:function(e,t){return dh(4,2,e,t)},useMemo:function(e,t){var n=mi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=mi();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=jM.bind(null,Ut,e),[o.memoizedState,e]},useRef:function(e){var t=mi();return e={current:e},t.memoizedState=e},useState:oS,useDebugValue:Vw,useDeferredValue:function(e){return mi().memoizedState=e},useTransition:function(){var e=oS(!1),t=e[0];return e=UM.bind(null,e[1]),mi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=Ut,r=mi();if(zt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),gn===null)throw Error(ne(349));ul&30||gk(o,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,rS(vk.bind(null,o,i,e),[e]),o.flags|=2048,jd(9,yk.bind(null,o,i,n,t),void 0,null),n},useId:function(){var e=mi(),t=gn.identifierPrefix;if(zt){var n=Xi,o=Yi;n=(o&~(1<<32-Kr(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=s.createElement(n,{is:o.is}):(e=s.createElement(n),n==="select"&&(s=e,o.multiple?s.multiple=!0:o.size&&(s.size=o.size))):e=s.createElementNS(e,n),e[vi]=t,e[$d]=o,Fk(e,t,!1,!1),t.stateNode=e;e:{switch(s=i1(n,o),n){case"dialog":At("cancel",e),At("close",e),r=o;break;case"iframe":case"object":case"embed":At("load",e),r=o;break;case"video":case"audio":for(r=0;rAc&&(t.flags|=128,o=!0,wu(i,!1),t.lanes=4194304)}else{if(!o)if(e=rm(s),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!zt)return $n(t),null}else 2*Zt()-i.renderingStartTime>Ac&&n!==1073741824&&(t.flags|=128,o=!0,wu(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Zt(),t.sibling=null,n=Vt.current,Rt(Vt,o?n&1|2:n&1),t):($n(t),null);case 22:case 23:return Yw(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?jo&1073741824&&($n(t),t.subtreeFlags&6&&(t.flags|=8192)):$n(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function QM(e,t){switch(Lw(t),t.tag){case 1:return Oo(t.type)&&Zh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nc(),Dt(No),Dt(Xn),Pw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zw(t),null;case 13:if(Dt(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Ic()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Vt),null;case 4:return Nc(),null;case 10:return Ow(t.type._context),null;case 22:case 23:return Yw(),null;case 24:return null;default:return null}}var vp=!1,qn=!1,eD=typeof WeakSet=="function"?WeakSet:Set,ce=null;function oc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){qt(e,t,o)}else n.current=null}function O1(e,t,n){try{n()}catch(o){qt(e,t,o)}}var pS=!1;function tD(e,t){if(m1=Gh,e=q4(),Ew(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,i=o.focusNode;o=o.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,m=null;t:for(;;){for(var h;d!==n||r!==0&&d.nodeType!==3||(a=s+r),d!==i||o!==0&&d.nodeType!==3||(l=s+o),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)m=d,d=h;for(;;){if(d===e)break t;if(m===n&&++c===r&&(a=s),m===i&&++u===o&&(l=s),(h=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(g1={focusedElem:e,selectionRange:n},Gh=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var f=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var g=f.memoizedProps,b=f.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Hr(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(_){qt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return f=pS,pS=!1,f}function ud(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,i!==void 0&&O1(t,n,i)}r=r.next}while(r!==o)}}function _g(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function A1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Uk(e){var t=e.alternate;t!==null&&(e.alternate=null,Uk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vi],delete t[$d],delete t[b1],delete t[PM],delete t[BM])),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 jk(e){return e.tag===5||e.tag===3||e.tag===4}function hS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jk(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 e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function M1(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jh));else if(o!==4&&(e=e.child,e!==null))for(M1(e,t,n),e=e.sibling;e!==null;)M1(e,t,n),e=e.sibling}function D1(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(D1(e,t,n),e=e.sibling;e!==null;)D1(e,t,n),e=e.sibling}var xn=null,Vr=!1;function Rs(e,t,n){for(n=n.child;n!==null;)Wk(e,t,n),n=n.sibling}function Wk(e,t,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(pg,n)}catch{}switch(n.tag){case 5:qn||oc(n,t);case 6:var o=xn,r=Vr;xn=null,Rs(e,t,n),xn=o,Vr=r,xn!==null&&(Vr?(e=xn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xn.removeChild(n.stateNode));break;case 18:xn!==null&&(Vr?(e=xn,n=n.stateNode,e.nodeType===8?vy(e.parentNode,n):e.nodeType===1&&vy(e,n),Md(e)):vy(xn,n.stateNode));break;case 4:o=xn,r=Vr,xn=n.stateNode.containerInfo,Vr=!0,Rs(e,t,n),xn=o,Vr=r;break;case 0:case 11:case 14:case 15:if(!qn&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var i=r,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&O1(n,t,s),r=r.next}while(r!==o)}Rs(e,t,n);break;case 1:if(!qn&&(oc(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(a){qt(n,t,a)}Rs(e,t,n);break;case 21:Rs(e,t,n);break;case 22:n.mode&1?(qn=(o=qn)||n.memoizedState!==null,Rs(e,t,n),qn=o):Rs(e,t,n);break;default:Rs(e,t,n)}}function mS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new eD),t.forEach(function(o){var r=uD.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function zr(e,t){var n=t.deletions;if(n!==null)for(var o=0;or&&(r=s),o&=~i}if(o=r,o=Zt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*oD(o/1960))-o,10e?16:e,ea===null)var o=!1;else{if(e=ea,ea=null,cm=0,Ze&6)throw Error(ne(331));var r=Ze;for(Ze|=4,ce=e.current;ce!==null;){var i=ce,s=i.child;if(ce.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lZt()-qw?Ka(e,0):Ww|=n),Ao(e,t)}function Qk(e,t){t===0&&(e.mode&1?(t=cp,cp<<=1,!(cp&130023424)&&(cp=4194304)):t=1);var n=ao();e=as(e,t),e!==null&&(Cf(e,t,n),Ao(e,n))}function cD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qk(e,n)}function uD(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(ne(314))}o!==null&&o.delete(t),Qk(e,n)}var e6;e6=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||No.current)Io=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Io=!1,ZM(e,t,n);Io=!!(e.flags&131072)}else Io=!1,zt&&t.flags&1048576&&ok(t,em,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;fh(e,t),e=t.pendingProps;var r=Lc(t,Xn.current);fc(t,n),r=$w(null,t,o,e,r,n);var i=Fw();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(o)?(i=!0,Kh(t)):i=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Mw(t),r.updater=bg,t.stateNode=r,r._reactInternals=t,C1(t,o,e,n),t=L1(null,t,o,!0,i,n)):(t.tag=0,zt&&i&&kw(t),no(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(fh(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=fD(o),e=Hr(o,e),r){case 0:t=k1(null,t,o,e,n);break e;case 1:t=uS(null,t,o,e,n);break e;case 11:t=lS(null,t,o,e,n);break e;case 14:t=cS(null,t,o,Hr(o.type,e),n);break e}throw Error(ne(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),k1(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),uS(e,t,o,r,n);case 3:e:{if(Pk(t),e===null)throw Error(ne(387));o=t.pendingProps,i=t.memoizedState,r=i.element,ak(e,t),om(t,o,null,n);var s=t.memoizedState;if(o=s.element,i.isDehydrated)if(i={element:o,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){r=Oc(Error(ne(423)),t),t=dS(e,t,o,n,r);break e}else if(o!==r){r=Oc(Error(ne(424)),t),t=dS(e,t,o,n,r);break e}else for(Ko=aa(t.stateNode.containerInfo.firstChild),er=t,zt=!0,jr=null,n=dk(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ic(),o===r){t=ls(e,t,n);break e}no(e,t,o,n)}t=t.child}return t;case 5:return fk(t),e===null&&x1(t),o=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,s=r.children,y1(o,r)?s=null:i!==null&&y1(o,i)&&(t.flags|=32),zk(e,t),no(e,t,s,n),t.child;case 6:return e===null&&x1(t),null;case 13:return Bk(e,t,n);case 4:return Dw(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Rc(t,null,o,n):no(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),lS(e,t,o,r,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,i=t.memoizedProps,s=r.value,Rt(tm,o._currentValue),o._currentValue=s,i!==null)if(ti(i.value,s)){if(i.children===r.children&&!No.current){t=ls(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===o){if(i.tag===1){l=Qi(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),S1(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),S1(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}no(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,fc(t,n),r=Rr(r),o=o(r),t.flags|=1,no(e,t,o,n),t.child;case 14:return o=t.type,r=Hr(o,t.pendingProps),r=Hr(o.type,r),cS(e,t,o,r,n);case 15:return Mk(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),fh(e,t),t.tag=1,Oo(o)?(e=!0,Kh(t)):e=!1,fc(t,n),ck(t,o,r),C1(t,o,r,n),L1(null,t,o,!0,e,n);case 19:return $k(e,t,n);case 22:return Dk(e,t,n)}throw Error(ne(156,t.tag))};function t6(e,t){return k4(e,t)}function dD(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(e,t,n,o){return new dD(e,t,n,o)}function Jw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fD(e){if(typeof e=="function")return Jw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mw)return 11;if(e===gw)return 14}return 2}function da(e,t){var n=e.alternate;return n===null?(n=Tr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function mh(e,t,n,o,r,i){var s=2;if(o=e,typeof e=="function")Jw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yl:return Qa(n.children,r,i,t);case hw:s=8,r|=8;break;case Xv:return e=Tr(12,n,t,r|2),e.elementType=Xv,e.lanes=i,e;case Jv:return e=Tr(13,n,t,r),e.elementType=Jv,e.lanes=i,e;case Zv:return e=Tr(19,n,t,r),e.elementType=Zv,e.lanes=i,e;case u4:return Sg(n,r,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l4:s=10;break e;case c4:s=9;break e;case mw:s=11;break e;case gw:s=14;break e;case Vs:s=16,o=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Tr(s,n,t,r),t.elementType=e,t.type=o,t.lanes=i,t}function Qa(e,t,n,o){return e=Tr(7,e,o,t),e.lanes=n,e}function Sg(e,t,n,o){return e=Tr(22,e,o,t),e.elementType=u4,e.lanes=n,e.stateNode={isHidden:!1},e}function Ey(e,t,n){return e=Tr(6,e,null,t),e.lanes=n,e}function ky(e,t,n){return t=Tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pD(e,t,n,o,r){this.tag=t,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=ay(0),this.expirationTimes=ay(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ay(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Zw(e,t,n,o,r,i,s,a,l){return e=new pD(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Tr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mw(i),e}function hD(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i6)}catch(e){console.error(e)}}i6(),o4.exports=ur;var Cn=o4.exports;const bD=sw(Cn);var s6,SS=Cn;s6=SS.createRoot,SS.hydrateRoot;var a6={exports:{}},Lg={};var wD=p,_D=Symbol.for("react.element"),xD=Symbol.for("react.fragment"),SD=Object.prototype.hasOwnProperty,TD=wD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,CD={key:!0,ref:!0,__self:!0,__source:!0};function l6(e,t,n){var o,r={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(o in t)SD.call(t,o)&&!CD.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:_D,type:e,key:i,ref:s,props:r,_owner:TD.current}}Lg.Fragment=xD;Lg.jsx=l6;Lg.jsxs=l6;a6.exports=Lg;var E=a6.exports;const fm=Math.min,el=Math.max,pm=Math.round,_p=Math.floor,ga=e=>({x:e,y:e}),ED={left:"right",right:"left",bottom:"top",top:"bottom"},kD={start:"end",end:"start"};function TS(e,t,n){return el(e,fm(t,n))}function t2(e,t){return typeof e=="function"?e(t):e}function Mc(e){return e.split("-")[0]}function n2(e){return e.split("-")[1]}function c6(e){return e==="x"?"y":"x"}function u6(e){return e==="y"?"height":"width"}function o2(e){return["top","bottom"].includes(Mc(e))?"y":"x"}function d6(e){return c6(o2(e))}function LD(e,t,n){n===void 0&&(n=!1);const o=n2(e),r=d6(e),i=u6(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=hm(s)),[s,hm(s)]}function ID(e){const t=hm(e);return[F1(e),t,F1(t)]}function F1(e){return e.replace(/start|end/g,t=>kD[t])}function RD(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}function ND(e,t,n,o){const r=n2(e);let i=RD(Mc(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(F1)))),i}function hm(e){return e.replace(/left|right|bottom|top/g,t=>ED[t])}function OD(e){return{top:0,right:0,bottom:0,left:0,...e}}function AD(e){return typeof e!="number"?OD(e):{top:e,right:e,bottom:e,left:e}}function mm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function CS(e,t,n){let{reference:o,floating:r}=e;const i=o2(t),s=d6(t),a=u6(s),l=Mc(t),c=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[a]/2-r[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(n2(t)){case"start":h[s]-=m*(n&&c?-1:1);break;case"end":h[s]+=m*(n&&c?-1:1);break}return h}const MD=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=CS(c,o,l),m=o,h={},f=0;for(let g=0;gN<=0)){var R,I;const N=(((R=i.flip)==null?void 0:R.index)||0)+1,z=S[N];if(z)return{data:{index:N,overflows:C},reset:{placement:z}};let k=(I=C.filter(M=>M.overflows[0]<=0).sort((M,D)=>M.overflows[1]-D.overflows[1])[0])==null?void 0:I.placement;if(!k)switch(h){case"bestFit":{var O;const M=(O=C.map(D=>[D.placement,D.overflows.filter($=>$>0).reduce(($,A)=>$+A,0)]).sort((D,$)=>D[1]-$[1])[0])==null?void 0:O[0];M&&(k=M);break}case"initialPlacement":k=a;break}if(r!==k)return{reset:{placement:k}}}return{}}}},zD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:y,y:v}=b;return{x:y,y:v}}},...l}=t2(e,t),c={x:n,y:o},u=await f6(t,l),d=o2(Mc(r)),m=c6(d);let h=c[m],f=c[d];if(i){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=h+u[b],w=h-u[y];h=TS(v,h,w)}if(s){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=f+u[b],w=f-u[y];f=TS(v,f,w)}const g=a.fn({...t,[m]:h,[d]:f});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function ya(e){return p6(e)?(e.nodeName||"").toLowerCase():"#document"}function tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _s(e){var t;return(t=(p6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function p6(e){return e instanceof Node||e instanceof tr(e).Node}function cs(e){return e instanceof Element||e instanceof tr(e).Element}function Ri(e){return e instanceof HTMLElement||e instanceof tr(e).HTMLElement}function ES(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tr(e).ShadowRoot}function If(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function PD(e){return["table","td","th"].includes(ya(e))}function r2(e){const t=i2(),n=Or(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function BD(e){let t=Dc(e);for(;Ri(t)&&!Ig(t);){if(r2(t))return t;t=Dc(t)}return null}function i2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ig(e){return["html","body","#document"].includes(ya(e))}function Or(e){return tr(e).getComputedStyle(e)}function Rg(e){return cs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Dc(e){if(ya(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ES(e)&&e.host||_s(e);return ES(t)?t.host:t}function h6(e){const t=Dc(e);return Ig(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ri(t)&&If(t)?t:h6(t)}function qd(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=h6(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=tr(r);return i?t.concat(s,s.visualViewport||[],If(r)?r:[],s.frameElement&&n?qd(s.frameElement):[]):t.concat(r,qd(r,[],n))}function m6(e){const t=Or(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ri(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=pm(n)!==i||pm(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function s2(e){return cs(e)?e:e.contextElement}function hc(e){const t=s2(e);if(!Ri(t))return ga(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=m6(t);let s=(i?pm(n.width):n.width)/o,a=(i?pm(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const $D=ga(0);function g6(e){const t=tr(e);return!i2()||!t.visualViewport?$D:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tr(e)?!1:t}function pl(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=s2(e);let s=ga(1);t&&(o?cs(o)&&(s=hc(o)):s=hc(e));const a=FD(i,n,o)?g6(i):ga(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const m=tr(i),h=o&&cs(o)?tr(o):o;let f=m.frameElement;for(;f&&o&&h!==m;){const g=hc(f),b=f.getBoundingClientRect(),y=Or(f),v=b.left+(f.clientLeft+parseFloat(y.paddingLeft))*g.x,w=b.top+(f.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=v,c+=w,f=tr(f).frameElement}}return mm({width:u,height:d,x:l,y:c})}function HD(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Ri(n),i=_s(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=ga(1);const l=ga(0);if((r||!r&&o!=="fixed")&&((ya(n)!=="body"||If(i))&&(s=Rg(n)),Ri(n))){const c=pl(n);a=hc(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}}function VD(e){return Array.from(e.getClientRects())}function y6(e){return pl(_s(e)).left+Rg(e).scrollLeft}function UD(e){const t=_s(e),n=Rg(e),o=e.ownerDocument.body,r=el(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=el(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+y6(e);const a=-n.scrollTop;return Or(o).direction==="rtl"&&(s+=el(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}function jD(e,t){const n=tr(e),o=_s(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const c=i2();(!c||c&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}function WD(e,t){const n=pl(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Ri(e)?hc(e):ga(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=r*i.x,c=o*i.y;return{width:s,height:a,x:l,y:c}}function kS(e,t,n){let o;if(t==="viewport")o=jD(e,n);else if(t==="document")o=UD(_s(e));else if(cs(t))o=WD(t,n);else{const r=g6(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return mm(o)}function v6(e,t){const n=Dc(e);return n===t||!cs(n)||Ig(n)?!1:Or(n).position==="fixed"||v6(n,t)}function qD(e,t){const n=t.get(e);if(n)return n;let o=qd(e,[],!1).filter(a=>cs(a)&&ya(a)!=="body"),r=null;const i=Or(e).position==="fixed";let s=i?Dc(e):e;for(;cs(s)&&!Ig(s);){const a=Or(s),l=r2(s);!l&&a.position==="fixed"&&(r=null),(i?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||If(s)&&!l&&v6(e,s))?o=o.filter(u=>u!==s):r=a,s=Dc(s)}return t.set(e,o),o}function GD(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?qD(t,this._c):[].concat(n),o],a=s[0],l=s.reduce((c,u)=>{const d=kS(t,u,r);return c.top=el(d.top,c.top),c.right=fm(d.right,c.right),c.bottom=fm(d.bottom,c.bottom),c.left=el(d.left,c.left),c},kS(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function YD(e){return m6(e)}function XD(e,t,n){const o=Ri(t),r=_s(t),i=n==="fixed",s=pl(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ga(0);if(o||!o&&!i)if((ya(t)!=="body"||If(r))&&(a=Rg(t)),o){const c=pl(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else r&&(l.x=y6(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function LS(e,t){return!Ri(e)||Or(e).position==="fixed"?null:t?t(e):e.offsetParent}function b6(e,t){const n=tr(e);if(!Ri(e))return n;let o=LS(e,t);for(;o&&PD(o)&&Or(o).position==="static";)o=LS(o,t);return o&&(ya(o)==="html"||ya(o)==="body"&&Or(o).position==="static"&&!r2(o))?n:o||BD(e)||n}const JD=async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||b6,i=this.getDimensions;return{reference:XD(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}};function ZD(e){return Or(e).direction==="rtl"}const KD={convertOffsetParentRelativeRectToViewportRelativeRect:HD,getDocumentElement:_s,getClippingRect:GD,getOffsetParent:b6,getElementRects:JD,getClientRects:VD,getDimensions:YD,getScale:hc,isElement:cs,isRTL:ZD};function QD(e,t){let n=null,o;const r=_s(e);function i(){clearTimeout(o),n&&n.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:m}=e.getBoundingClientRect();if(a||t(),!d||!m)return;const h=_p(u),f=_p(r.clientWidth-(c+d)),g=_p(r.clientHeight-(u+m)),b=_p(c),v={rootMargin:-h+"px "+-f+"px "+-g+"px "+-b+"px",threshold:el(0,fm(1,l))||1};let w=!0;function _(S){const x=S[0].intersectionRatio;if(x!==l){if(!w)return s();x?s(!1,x):o=setTimeout(()=>{s(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(_,{...v,root:r.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return s(!0),i}function w6(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=s2(e),u=r||i?[...c?qd(c):[],...qd(t)]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?QD(c,n):null;let m=-1,h=null;s&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let f,g=l?pl(e):null;l&&b();function b(){const y=pl(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,f=requestAnimationFrame(b)}return n(),()=>{u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const ez=(e,t,n)=>{const o=new Map,r={platform:KD,...n},i={...r.platform,_c:o};return MD(e,t,{...r,platform:i})};function _6(){const[e,t]=p.useReducer(n=>n+1,0);return t}function tz(){return lo(Sf)}function Ar(e,t,n,o){p.useEffect(()=>(e.subscribe(t),()=>{e.unsubscribe(t),o?.()}),[e,t,o,...n??[]])}function lo(e,t){const n=e.last===void 0?t:i(e.last),[o,r]=p.useState(n);return Ar(e,(...s)=>r(i(s)),[]),o;function i(s){return s[0]===null?void 0:s[0]}}function nz(e,t){const n=p.useRef(t??null);return p.useEffect(()=>{e&&(typeof e=="function"?e(n.current):e.current=n.current)},[e]),n}function oz(){for(var e=arguments.length,t=new Array(e),n=0;no=>{t.forEach(r=>r(o))},t)}const Ng=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function a2(e){return"nodeType"in e}function fo(e){var t,n;return e?Zc(e)?e:a2(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function l2(e){const{Document:t}=fo(e);return e instanceof t}function Rf(e){return Zc(e)?!1:e instanceof fo(e).HTMLElement}function x6(e){return e instanceof fo(e).SVGElement}function Kc(e){return e?Zc(e)?e.document:a2(e)?l2(e)?e:Rf(e)||x6(e)?e.ownerDocument:document:document:document}const Mr=Ng?p.useLayoutEffect:p.useEffect;function Og(e){const t=p.useRef(e);return Mr(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r{e.current=setInterval(o,r)},[]),n=p.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Gd(e,t){t===void 0&&(t=[e]);const n=p.useRef(e);return Mr(()=>{n.current!==e&&(n.current=e)},t),n}function Nf(e,t){const n=p.useRef();return p.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function gm(e){const t=Og(e),n=p.useRef(null),o=p.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,o]}function ym(e){const t=p.useRef();return p.useEffect(()=>{t.current=e},[e]),t.current}let Ly={};function Of(e,t){return p.useMemo(()=>{if(t)return t;const n=Ly[e]==null?0:Ly[e]+1;return Ly[e]=n,e+"-"+n},[e,t])}function S6(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r{const a=Object.entries(s);for(const[l,c]of a){const u=i[l];u!=null&&(i[l]=u+e*c)}return i},{...t})}}const mc=S6(1),vm=S6(-1);function iz(e){return"clientX"in e&&"clientY"in e}function Ag(e){if(!e)return!1;const{KeyboardEvent:t}=fo(e.target);return t&&e instanceof t}function sz(e){if(!e)return!1;const{TouchEvent:t}=fo(e.target);return t&&e instanceof t}function bm(e){if(sz(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return iz(e)?{x:e.clientX,y:e.clientY}:null}const us=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[us.Translate.toString(e),us.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),IS="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function az(e){return e.matches(IS)?e:e.querySelector(IS)}const lz={display:"none"};function cz(e){let{id:t,value:n}=e;return B.createElement("div",{id:t,style:lz},n)}function uz(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const r={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return B.createElement("div",{id:t,style:r,role:"status","aria-live":o,"aria-atomic":!0},n)}function dz(){const[e,t]=p.useState("");return{announce:p.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const T6=p.createContext(null);function fz(e){const t=p.useContext(T6);p.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function pz(){const[e]=p.useState(()=>new Set),t=p.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[p.useCallback(o=>{let{type:r,event:i}=o;e.forEach(s=>{var a;return(a=s[r])==null?void 0:a.call(s,i)})},[e]),t]}const hz={draggable:` +`+i.stack}return{value:e,source:t,stack:r,digest:null}}function Ty(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function C1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var XM=typeof WeakMap=="function"?WeakMap:Map;function Ak(e,t,n){n=Qi(-1,n),n.tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){lm||(lm=!0,z1=o),C1(e,t)},n}function Mk(e,t,n){n=Qi(-1,n),n.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var r=t.value;n.payload=function(){return o(r)},n.callback=function(){C1(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){C1(e,t),typeof o!="function"&&(ca===null?ca=new Set([this]):ca.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function iS(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new XM;var r=new Set;o.set(t,r)}else r=o.get(t),r===void 0&&(r=new Set,o.set(t,r));r.has(n)||(r.add(n),e=cD.bind(null,e,t,n),t.then(e,e))}function sS(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function aS(e,t,n,o,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Qi(-1,1),t.tag=2,la(n,t,1))),n.lanes|=1),e)}var JM=ws.ReactCurrentOwner,Io=!1;function no(e,t,n,o){t.child=e===null?fk(t,null,n,o):Nc(t,e.child,n,o)}function lS(e,t,n,o,r){n=n.render;var i=t.ref;return fc(t,r),o=$w(e,t,n,o,i,r),n=Fw(),e!==null&&!Io?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,ls(e,t,r)):(zt&&n&&kw(t),t.flags|=1,no(e,t,o,r),t.child)}function cS(e,t,n,o,r){if(e===null){var i=n.type;return typeof i=="function"&&!Jw(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Dk(e,t,i,o,r)):(e=mh(n.type,null,o,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&r)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:zd,n(s,o)&&e.ref===t.ref)return ls(e,t,r)}return t.flags|=1,e=da(i,o),e.ref=t.ref,e.return=t,t.child=e}function Dk(e,t,n,o,r){if(e!==null){var i=e.memoizedProps;if(zd(i,o)&&e.ref===t.ref)if(Io=!1,t.pendingProps=o=i,(e.lanes&r)!==0)e.flags&131072&&(Io=!0);else return t.lanes=e.lanes,ls(e,t,r)}return k1(e,t,n,o,r)}function zk(e,t,n){var o=t.pendingProps,r=o.children,i=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nt(rc,jo),jo|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Nt(rc,jo),jo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=i!==null?i.baseLanes:n,Nt(rc,jo),jo|=o}else i!==null?(o=i.baseLanes|n,t.memoizedState=null):o=n,Nt(rc,jo),jo|=o;return no(e,t,r,n),t.child}function Pk(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function k1(e,t,n,o,r){var i=Oo(n)?ll:Xn.current;return i=Lc(t,i),fc(t,r),n=$w(e,t,n,o,i,r),o=Fw(),e!==null&&!Io?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,ls(e,t,r)):(zt&&o&&kw(t),t.flags|=1,no(e,t,n,r),t.child)}function uS(e,t,n,o,r){if(Oo(n)){var i=!0;Kh(t)}else i=!1;if(fc(t,r),t.stateNode===null)fh(e,t),uk(t,n,o),E1(t,n,o,r),o=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Nr(c):(c=Oo(n)?ll:Xn.current,c=Lc(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==o||l!==c)&&tS(t,s,o,c),Us=!1;var m=t.memoizedState;s.state=m,om(t,o,s,r),l=t.memoizedState,a!==o||m!==l||Ro.current||Us?(typeof u=="function"&&(T1(t,n,u,o),l=t.memoizedState),(a=Us||eS(t,n,a,o,m,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=l),s.props=o,s.state=l,s.context=c,o=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{s=t.stateNode,lk(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Hr(t.type,a),s.props=c,d=t.pendingProps,m=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Nr(l):(l=Oo(n)?ll:Xn.current,l=Lc(t,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||m!==l)&&tS(t,s,o,l),Us=!1,m=t.memoizedState,s.state=m,om(t,o,s,r);var f=t.memoizedState;a!==d||m!==f||Ro.current||Us?(typeof h=="function"&&(T1(t,n,h,o),f=t.memoizedState),(c=Us||eS(t,n,c,o,m,f,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(o,f,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(o,f,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=f),s.props=o,s.state=f,s.context=l,o=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),o=!1)}return L1(e,t,n,o,i,r)}function L1(e,t,n,o,r,i){Pk(e,t);var s=(t.flags&128)!==0;if(!o&&!s)return r&&Xx(t,n,!1),ls(e,t,i);o=t.stateNode,JM.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&s?(t.child=Nc(t,e.child,null,i),t.child=Nc(t,null,a,i)):no(e,t,a,i),t.memoizedState=o.state,r&&Xx(t,n,!0),t.child}function Bk(e){var t=e.stateNode;t.pendingContext?Yx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yx(e,t.context,!1),Dw(e,t.containerInfo)}function dS(e,t,n,o,r){return Ic(),Iw(r),t.flags|=256,no(e,t,n,o),t.child}var I1={dehydrated:null,treeContext:null,retryLane:0};function N1(e){return{baseLanes:e,cachePool:null,transitions:null}}function $k(e,t,n){var o=t.pendingProps,r=Vt.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(r&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),Nt(Vt,r&1),e===null)return x1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},!(o&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Sg(s,o,0,null),e=Qa(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=N1(n),t.memoizedState=I1,e):Uw(t,s));if(r=e.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return ZM(e,t,s,o,a,r,n);if(i){i=o.fallback,s=t.mode,r=e.child,a=r.sibling;var l={mode:"hidden",children:o.children};return!(s&1)&&t.child!==r?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=da(r,l),o.subtreeFlags=r.subtreeFlags&14680064),a!==null?i=da(a,i):(i=Qa(i,s,n,null),i.flags|=2),i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=e.child.memoizedState,s=s===null?N1(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=I1,o}return i=e.child,e=i.sibling,o=da(i,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=n),o.return=t,o.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Uw(e,t){return t=Sg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yp(e,t,n,o){return o!==null&&Iw(o),Nc(t,e.child,null,n),e=Uw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZM(e,t,n,o,r,i,s){if(n)return t.flags&256?(t.flags&=-257,o=Ty(Error(ne(422))),yp(e,t,s,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=o.fallback,r=t.mode,o=Sg({mode:"visible",children:o.children},r,0,null),i=Qa(i,r,s,null),i.flags|=2,o.return=t,i.return=t,o.sibling=i,t.child=o,t.mode&1&&Nc(t,e.child,null,s),t.child.memoizedState=N1(s),t.memoizedState=I1,i);if(!(t.mode&1))return yp(e,t,s,null);if(r.data==="$!"){if(o=r.nextSibling&&r.nextSibling.dataset,o)var a=o.dgst;return o=a,i=Error(ne(419)),o=Ty(i,o,void 0),yp(e,t,s,o)}if(a=(s&e.childLanes)!==0,Io||a){if(o=gn,o!==null){switch(s&-s){case 4:r=2;break;case 16:r=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(o.suspendedLanes|s)?0:r,r!==0&&r!==i.retryLane&&(i.retryLane=r,as(e,r),Qr(o,e,r,-1))}return Xw(),o=Ty(Error(ne(421))),yp(e,t,s,o)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=uD.bind(null,e),r._reactRetry=t,null):(e=i.treeContext,Ko=aa(r.nextSibling),er=t,zt=!0,jr=null,e!==null&&(wr[_r++]=Yi,wr[_r++]=Xi,wr[_r++]=cl,Yi=e.id,Xi=e.overflow,cl=t),t=Uw(t,o.children),t.flags|=4096,t)}function fS(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),S1(e.return,t,n)}function Ey(e,t,n,o,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=o,i.tail=n,i.tailMode=r)}function Fk(e,t,n){var o=t.pendingProps,r=o.revealOrder,i=o.tail;if(no(e,t,o.children,n),o=Vt.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fS(e,n,t);else if(e.tag===19)fS(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Nt(Vt,o),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&rm(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Ey(t,!1,r,n,i);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&rm(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Ey(t,!0,n,null,i);break;case"together":Ey(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ls(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dl|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ne(153));if(t.child!==null){for(e=t.child,n=da(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=da(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KM(e,t,n){switch(t.tag){case 3:Bk(t),Ic();break;case 5:pk(t);break;case 1:Oo(t.type)&&Kh(t);break;case 4:Dw(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,r=t.memoizedProps.value;Nt(tm,o._currentValue),o._currentValue=r;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Nt(Vt,Vt.current&1),t.flags|=128,null):n&t.child.childLanes?$k(e,t,n):(Nt(Vt,Vt.current&1),e=ls(e,t,n),e!==null?e.sibling:null);Nt(Vt,Vt.current&1);break;case 19:if(o=(n&t.childLanes)!==0,e.flags&128){if(o)return Fk(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Nt(Vt,Vt.current),o)break;return null;case 22:case 23:return t.lanes=0,zk(e,t,n)}return ls(e,t,n)}var Hk,R1,Vk,Uk;Hk=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};R1=function(){};Vk=function(e,t,n,o){var r=e.memoizedProps;if(r!==o){e=t.stateNode,Ua(Ci.current);var i=null;switch(n){case"input":r=Qv(e,r),o=Qv(e,o),i=[];break;case"select":r=jt({},r,{value:void 0}),o=jt({},o,{value:void 0}),i=[];break;case"textarea":r=n1(e,r),o=n1(e,o),i=[];break;default:typeof r.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Jh)}r1(n,o);var s;n=null;for(c in r)if(!o.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Id.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in o){var l=o[c];if(a=r?.[c],o.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Id.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&At("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Uk=function(e,t,n,o){n!==o&&(t.flags|=4)};function wu(e,t){if(!zt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function $n(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags&14680064,o|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags,o|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function QM(e,t,n){var o=t.pendingProps;switch(Lw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $n(t),null;case 1:return Oo(t.type)&&Zh(),$n(t),null;case 3:return o=t.stateNode,Rc(),Dt(Ro),Dt(Xn),Pw(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(mp(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jr!==null&&($1(jr),jr=null))),R1(e,t),$n(t),null;case 5:zw(t);var r=Ua(Hd.current);if(n=t.type,e!==null&&t.stateNode!=null)Vk(e,t,n,o,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(ne(166));return $n(t),null}if(e=Ua(Ci.current),mp(t)){o=t.stateNode,n=t.type;var i=t.memoizedProps;switch(o[vi]=t,o[$d]=i,e=(t.mode&1)!==0,n){case"dialog":At("cancel",o),At("close",o);break;case"iframe":case"object":case"embed":At("load",o);break;case"video":case"audio":for(r=0;r<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=s.createElement(n,{is:o.is}):(e=s.createElement(n),n==="select"&&(s=e,o.multiple?s.multiple=!0:o.size&&(s.size=o.size))):e=s.createElementNS(e,n),e[vi]=t,e[$d]=o,Hk(e,t,!1,!1),t.stateNode=e;e:{switch(s=i1(n,o),n){case"dialog":At("cancel",e),At("close",e),r=o;break;case"iframe":case"object":case"embed":At("load",e),r=o;break;case"video":case"audio":for(r=0;rAc&&(t.flags|=128,o=!0,wu(i,!1),t.lanes=4194304)}else{if(!o)if(e=rm(s),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!zt)return $n(t),null}else 2*Zt()-i.renderingStartTime>Ac&&n!==1073741824&&(t.flags|=128,o=!0,wu(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Zt(),t.sibling=null,n=Vt.current,Nt(Vt,o?n&1|2:n&1),t):($n(t),null);case 22:case 23:return Yw(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?jo&1073741824&&($n(t),t.subtreeFlags&6&&(t.flags|=8192)):$n(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function eD(e,t){switch(Lw(t),t.tag){case 1:return Oo(t.type)&&Zh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rc(),Dt(Ro),Dt(Xn),Pw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zw(t),null;case 13:if(Dt(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Ic()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Vt),null;case 4:return Rc(),null;case 10:return Ow(t.type._context),null;case 22:case 23:return Yw(),null;case 24:return null;default:return null}}var vp=!1,qn=!1,tD=typeof WeakSet=="function"?WeakSet:Set,ce=null;function oc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){qt(e,t,o)}else n.current=null}function O1(e,t,n){try{n()}catch(o){qt(e,t,o)}}var pS=!1;function nD(e,t){if(m1=Gh,e=G4(),Cw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,i=o.focusNode;o=o.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,m=null;t:for(;;){for(var h;d!==n||r!==0&&d.nodeType!==3||(a=s+r),d!==i||o!==0&&d.nodeType!==3||(l=s+o),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)m=d,d=h;for(;;){if(d===e)break t;if(m===n&&++c===r&&(a=s),m===i&&++u===o&&(l=s),(h=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(g1={focusedElem:e,selectionRange:n},Gh=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var f=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var g=f.memoizedProps,b=f.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Hr(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(_){qt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return f=pS,pS=!1,f}function ud(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,i!==void 0&&O1(t,n,i)}r=r.next}while(r!==o)}}function _g(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function A1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function jk(e){var t=e.alternate;t!==null&&(e.alternate=null,jk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vi],delete t[$d],delete t[b1],delete t[BM],delete t[$M])),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 Wk(e){return e.tag===5||e.tag===3||e.tag===4}function hS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wk(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 e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function M1(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jh));else if(o!==4&&(e=e.child,e!==null))for(M1(e,t,n),e=e.sibling;e!==null;)M1(e,t,n),e=e.sibling}function D1(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(D1(e,t,n),e=e.sibling;e!==null;)D1(e,t,n),e=e.sibling}var xn=null,Vr=!1;function Ns(e,t,n){for(n=n.child;n!==null;)qk(e,t,n),n=n.sibling}function qk(e,t,n){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(pg,n)}catch{}switch(n.tag){case 5:qn||oc(n,t);case 6:var o=xn,r=Vr;xn=null,Ns(e,t,n),xn=o,Vr=r,xn!==null&&(Vr?(e=xn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xn.removeChild(n.stateNode));break;case 18:xn!==null&&(Vr?(e=xn,n=n.stateNode,e.nodeType===8?vy(e.parentNode,n):e.nodeType===1&&vy(e,n),Md(e)):vy(xn,n.stateNode));break;case 4:o=xn,r=Vr,xn=n.stateNode.containerInfo,Vr=!0,Ns(e,t,n),xn=o,Vr=r;break;case 0:case 11:case 14:case 15:if(!qn&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var i=r,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&O1(n,t,s),r=r.next}while(r!==o)}Ns(e,t,n);break;case 1:if(!qn&&(oc(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(a){qt(n,t,a)}Ns(e,t,n);break;case 21:Ns(e,t,n);break;case 22:n.mode&1?(qn=(o=qn)||n.memoizedState!==null,Ns(e,t,n),qn=o):Ns(e,t,n);break;default:Ns(e,t,n)}}function mS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tD),t.forEach(function(o){var r=dD.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function zr(e,t){var n=t.deletions;if(n!==null)for(var o=0;or&&(r=s),o&=~i}if(o=r,o=Zt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*rD(o/1960))-o,10e?16:e,ea===null)var o=!1;else{if(e=ea,ea=null,cm=0,Ze&6)throw Error(ne(331));var r=Ze;for(Ze|=4,ce=e.current;ce!==null;){var i=ce,s=i.child;if(ce.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lZt()-qw?Ka(e,0):Ww|=n),Ao(e,t)}function e6(e,t){t===0&&(e.mode&1?(t=cp,cp<<=1,!(cp&130023424)&&(cp=4194304)):t=1);var n=ao();e=as(e,t),e!==null&&(Ef(e,t,n),Ao(e,n))}function uD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),e6(e,n)}function dD(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(ne(314))}o!==null&&o.delete(t),e6(e,n)}var t6;t6=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ro.current)Io=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Io=!1,KM(e,t,n);Io=!!(e.flags&131072)}else Io=!1,zt&&t.flags&1048576&&rk(t,em,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;fh(e,t),e=t.pendingProps;var r=Lc(t,Xn.current);fc(t,n),r=$w(null,t,o,e,r,n);var i=Fw();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(o)?(i=!0,Kh(t)):i=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Mw(t),r.updater=bg,t.stateNode=r,r._reactInternals=t,E1(t,o,e,n),t=L1(null,t,o,!0,i,n)):(t.tag=0,zt&&i&&kw(t),no(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(fh(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=pD(o),e=Hr(o,e),r){case 0:t=k1(null,t,o,e,n);break e;case 1:t=uS(null,t,o,e,n);break e;case 11:t=lS(null,t,o,e,n);break e;case 14:t=cS(null,t,o,Hr(o.type,e),n);break e}throw Error(ne(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),k1(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),uS(e,t,o,r,n);case 3:e:{if(Bk(t),e===null)throw Error(ne(387));o=t.pendingProps,i=t.memoizedState,r=i.element,lk(e,t),om(t,o,null,n);var s=t.memoizedState;if(o=s.element,i.isDehydrated)if(i={element:o,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){r=Oc(Error(ne(423)),t),t=dS(e,t,o,n,r);break e}else if(o!==r){r=Oc(Error(ne(424)),t),t=dS(e,t,o,n,r);break e}else for(Ko=aa(t.stateNode.containerInfo.firstChild),er=t,zt=!0,jr=null,n=fk(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ic(),o===r){t=ls(e,t,n);break e}no(e,t,o,n)}t=t.child}return t;case 5:return pk(t),e===null&&x1(t),o=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,s=r.children,y1(o,r)?s=null:i!==null&&y1(o,i)&&(t.flags|=32),Pk(e,t),no(e,t,s,n),t.child;case 6:return e===null&&x1(t),null;case 13:return $k(e,t,n);case 4:return Dw(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Nc(t,null,o,n):no(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),lS(e,t,o,r,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,i=t.memoizedProps,s=r.value,Nt(tm,o._currentValue),o._currentValue=s,i!==null)if(ti(i.value,s)){if(i.children===r.children&&!Ro.current){t=ls(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===o){if(i.tag===1){l=Qi(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),S1(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),S1(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}no(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,fc(t,n),r=Nr(r),o=o(r),t.flags|=1,no(e,t,o,n),t.child;case 14:return o=t.type,r=Hr(o,t.pendingProps),r=Hr(o.type,r),cS(e,t,o,r,n);case 15:return Dk(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:Hr(o,r),fh(e,t),t.tag=1,Oo(o)?(e=!0,Kh(t)):e=!1,fc(t,n),uk(t,o,r),E1(t,o,r,n),L1(null,t,o,!0,e,n);case 19:return Fk(e,t,n);case 22:return zk(e,t,n)}throw Error(ne(156,t.tag))};function n6(e,t){return L4(e,t)}function fD(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(e,t,n,o){return new fD(e,t,n,o)}function Jw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pD(e){if(typeof e=="function")return Jw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mw)return 11;if(e===gw)return 14}return 2}function da(e,t){var n=e.alternate;return n===null?(n=Tr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function mh(e,t,n,o,r,i){var s=2;if(o=e,typeof e=="function")Jw(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yl:return Qa(n.children,r,i,t);case hw:s=8,r|=8;break;case Xv:return e=Tr(12,n,t,r|2),e.elementType=Xv,e.lanes=i,e;case Jv:return e=Tr(13,n,t,r),e.elementType=Jv,e.lanes=i,e;case Zv:return e=Tr(19,n,t,r),e.elementType=Zv,e.lanes=i,e;case d4:return Sg(n,r,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c4:s=10;break e;case u4:s=9;break e;case mw:s=11;break e;case gw:s=14;break e;case Vs:s=16,o=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Tr(s,n,t,r),t.elementType=e,t.type=o,t.lanes=i,t}function Qa(e,t,n,o){return e=Tr(7,e,o,t),e.lanes=n,e}function Sg(e,t,n,o){return e=Tr(22,e,o,t),e.elementType=d4,e.lanes=n,e.stateNode={isHidden:!1},e}function Cy(e,t,n){return e=Tr(6,e,null,t),e.lanes=n,e}function ky(e,t,n){return t=Tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hD(e,t,n,o,r){this.tag=t,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=ay(0),this.expirationTimes=ay(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ay(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Zw(e,t,n,o,r,i,s,a,l){return e=new hD(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Tr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mw(i),e}function mD(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s6)}catch(e){console.error(e)}}s6(),r4.exports=ur;var En=r4.exports;const wD=sw(En);var a6,SS=En;a6=SS.createRoot,SS.hydrateRoot;var l6={exports:{}},Lg={};var _D=p,xD=Symbol.for("react.element"),SD=Symbol.for("react.fragment"),TD=Object.prototype.hasOwnProperty,ED=_D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,CD={key:!0,ref:!0,__self:!0,__source:!0};function c6(e,t,n){var o,r={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(o in t)TD.call(t,o)&&!CD.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:xD,type:e,key:i,ref:s,props:r,_owner:ED.current}}Lg.Fragment=SD;Lg.jsx=c6;Lg.jsxs=c6;l6.exports=Lg;var C=l6.exports;const fm=Math.min,el=Math.max,pm=Math.round,_p=Math.floor,ga=e=>({x:e,y:e}),kD={left:"right",right:"left",bottom:"top",top:"bottom"},LD={start:"end",end:"start"};function TS(e,t,n){return el(e,fm(t,n))}function t_(e,t){return typeof e=="function"?e(t):e}function Mc(e){return e.split("-")[0]}function n_(e){return e.split("-")[1]}function u6(e){return e==="x"?"y":"x"}function d6(e){return e==="y"?"height":"width"}function o_(e){return["top","bottom"].includes(Mc(e))?"y":"x"}function f6(e){return u6(o_(e))}function ID(e,t,n){n===void 0&&(n=!1);const o=n_(e),r=f6(e),i=d6(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=hm(s)),[s,hm(s)]}function ND(e){const t=hm(e);return[F1(e),t,F1(t)]}function F1(e){return e.replace(/start|end/g,t=>LD[t])}function RD(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}function OD(e,t,n,o){const r=n_(e);let i=RD(Mc(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(F1)))),i}function hm(e){return e.replace(/left|right|bottom|top/g,t=>kD[t])}function AD(e){return{top:0,right:0,bottom:0,left:0,...e}}function MD(e){return typeof e!="number"?AD(e):{top:e,right:e,bottom:e,left:e}}function mm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ES(e,t,n){let{reference:o,floating:r}=e;const i=o_(t),s=f6(t),a=d6(s),l=Mc(t),c=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[a]/2-r[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(n_(t)){case"start":h[s]-=m*(n&&c?-1:1);break;case"end":h[s]+=m*(n&&c?-1:1);break}return h}const DD=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=ES(c,o,l),m=o,h={},f=0;for(let g=0;gR<=0)){var N,I;const R=(((N=i.flip)==null?void 0:N.index)||0)+1,z=S[R];if(z)return{data:{index:R,overflows:E},reset:{placement:z}};let k=(I=E.filter(M=>M.overflows[0]<=0).sort((M,D)=>M.overflows[1]-D.overflows[1])[0])==null?void 0:I.placement;if(!k)switch(h){case"bestFit":{var O;const M=(O=E.map(D=>[D.placement,D.overflows.filter($=>$>0).reduce(($,A)=>$+A,0)]).sort((D,$)=>D[1]-$[1])[0])==null?void 0:O[0];M&&(k=M);break}case"initialPlacement":k=a;break}if(r!==k)return{reset:{placement:k}}}return{}}}},PD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:y,y:v}=b;return{x:y,y:v}}},...l}=t_(e,t),c={x:n,y:o},u=await p6(t,l),d=o_(Mc(r)),m=u6(d);let h=c[m],f=c[d];if(i){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=h+u[b],w=h-u[y];h=TS(v,h,w)}if(s){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=f+u[b],w=f-u[y];f=TS(v,f,w)}const g=a.fn({...t,[m]:h,[d]:f});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function ya(e){return h6(e)?(e.nodeName||"").toLowerCase():"#document"}function tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _s(e){var t;return(t=(h6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function h6(e){return e instanceof Node||e instanceof tr(e).Node}function cs(e){return e instanceof Element||e instanceof tr(e).Element}function Ni(e){return e instanceof HTMLElement||e instanceof tr(e).HTMLElement}function CS(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tr(e).ShadowRoot}function If(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function BD(e){return["table","td","th"].includes(ya(e))}function r_(e){const t=i_(),n=Or(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function $D(e){let t=Dc(e);for(;Ni(t)&&!Ig(t);){if(r_(t))return t;t=Dc(t)}return null}function i_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ig(e){return["html","body","#document"].includes(ya(e))}function Or(e){return tr(e).getComputedStyle(e)}function Ng(e){return cs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Dc(e){if(ya(e)==="html")return e;const t=e.assignedSlot||e.parentNode||CS(e)&&e.host||_s(e);return CS(t)?t.host:t}function m6(e){const t=Dc(e);return Ig(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(t)&&If(t)?t:m6(t)}function qd(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=m6(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=tr(r);return i?t.concat(s,s.visualViewport||[],If(r)?r:[],s.frameElement&&n?qd(s.frameElement):[]):t.concat(r,qd(r,[],n))}function g6(e){const t=Or(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ni(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=pm(n)!==i||pm(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function s_(e){return cs(e)?e:e.contextElement}function hc(e){const t=s_(e);if(!Ni(t))return ga(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=g6(t);let s=(i?pm(n.width):n.width)/o,a=(i?pm(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const FD=ga(0);function y6(e){const t=tr(e);return!i_()||!t.visualViewport?FD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tr(e)?!1:t}function pl(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=s_(e);let s=ga(1);t&&(o?cs(o)&&(s=hc(o)):s=hc(e));const a=HD(i,n,o)?y6(i):ga(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const m=tr(i),h=o&&cs(o)?tr(o):o;let f=m.frameElement;for(;f&&o&&h!==m;){const g=hc(f),b=f.getBoundingClientRect(),y=Or(f),v=b.left+(f.clientLeft+parseFloat(y.paddingLeft))*g.x,w=b.top+(f.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=v,c+=w,f=tr(f).frameElement}}return mm({width:u,height:d,x:l,y:c})}function VD(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Ni(n),i=_s(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=ga(1);const l=ga(0);if((r||!r&&o!=="fixed")&&((ya(n)!=="body"||If(i))&&(s=Ng(n)),Ni(n))){const c=pl(n);a=hc(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}}function UD(e){return Array.from(e.getClientRects())}function v6(e){return pl(_s(e)).left+Ng(e).scrollLeft}function jD(e){const t=_s(e),n=Ng(e),o=e.ownerDocument.body,r=el(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=el(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+v6(e);const a=-n.scrollTop;return Or(o).direction==="rtl"&&(s+=el(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}function WD(e,t){const n=tr(e),o=_s(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const c=i_();(!c||c&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}function qD(e,t){const n=pl(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Ni(e)?hc(e):ga(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=r*i.x,c=o*i.y;return{width:s,height:a,x:l,y:c}}function kS(e,t,n){let o;if(t==="viewport")o=WD(e,n);else if(t==="document")o=jD(_s(e));else if(cs(t))o=qD(t,n);else{const r=y6(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return mm(o)}function b6(e,t){const n=Dc(e);return n===t||!cs(n)||Ig(n)?!1:Or(n).position==="fixed"||b6(n,t)}function GD(e,t){const n=t.get(e);if(n)return n;let o=qd(e,[],!1).filter(a=>cs(a)&&ya(a)!=="body"),r=null;const i=Or(e).position==="fixed";let s=i?Dc(e):e;for(;cs(s)&&!Ig(s);){const a=Or(s),l=r_(s);!l&&a.position==="fixed"&&(r=null),(i?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||If(s)&&!l&&b6(e,s))?o=o.filter(u=>u!==s):r=a,s=Dc(s)}return t.set(e,o),o}function YD(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?GD(t,this._c):[].concat(n),o],a=s[0],l=s.reduce((c,u)=>{const d=kS(t,u,r);return c.top=el(d.top,c.top),c.right=fm(d.right,c.right),c.bottom=fm(d.bottom,c.bottom),c.left=el(d.left,c.left),c},kS(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XD(e){const{width:t,height:n}=g6(e);return{width:t,height:n}}function JD(e,t,n){const o=Ni(t),r=_s(t),i=n==="fixed",s=pl(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ga(0);if(o||!o&&!i)if((ya(t)!=="body"||If(r))&&(a=Ng(t)),o){const c=pl(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else r&&(l.x=v6(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function LS(e,t){return!Ni(e)||Or(e).position==="fixed"?null:t?t(e):e.offsetParent}function w6(e,t){const n=tr(e);if(!Ni(e))return n;let o=LS(e,t);for(;o&&BD(o)&&Or(o).position==="static";)o=LS(o,t);return o&&(ya(o)==="html"||ya(o)==="body"&&Or(o).position==="static"&&!r_(o))?n:o||$D(e)||n}const ZD=async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||w6,i=this.getDimensions;return{reference:JD(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}};function KD(e){return Or(e).direction==="rtl"}const QD={convertOffsetParentRelativeRectToViewportRelativeRect:VD,getDocumentElement:_s,getClippingRect:YD,getOffsetParent:w6,getElementRects:ZD,getClientRects:UD,getDimensions:XD,getScale:hc,isElement:cs,isRTL:KD};function ez(e,t){let n=null,o;const r=_s(e);function i(){clearTimeout(o),n&&n.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:m}=e.getBoundingClientRect();if(a||t(),!d||!m)return;const h=_p(u),f=_p(r.clientWidth-(c+d)),g=_p(r.clientHeight-(u+m)),b=_p(c),v={rootMargin:-h+"px "+-f+"px "+-g+"px "+-b+"px",threshold:el(0,fm(1,l))||1};let w=!0;function _(S){const x=S[0].intersectionRatio;if(x!==l){if(!w)return s();x?s(!1,x):o=setTimeout(()=>{s(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(_,{...v,root:r.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return s(!0),i}function _6(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=s_(e),u=r||i?[...c?qd(c):[],...qd(t)]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?ez(c,n):null;let m=-1,h=null;s&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let f,g=l?pl(e):null;l&&b();function b(){const y=pl(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,f=requestAnimationFrame(b)}return n(),()=>{u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const tz=PD,nz=zD,oz=(e,t,n)=>{const o=new Map,r={platform:QD,...n},i={...r.platform,_c:o};return DD(e,t,{...r,platform:i})};function x6(){const[e,t]=p.useReducer(n=>n+1,0);return t}function rz(){return lo(Sf)}function Ar(e,t,n,o){p.useEffect(()=>(e.subscribe(t),()=>{e.unsubscribe(t),o?.()}),[e,t,o,...n??[]])}function lo(e,t){const n=e.last===void 0?t:i(e.last),[o,r]=p.useState(n);return Ar(e,(...s)=>r(i(s)),[]),o;function i(s){return s[0]===null?void 0:s[0]}}function iz(e,t){const n=p.useRef(t??null);return p.useEffect(()=>{e&&(typeof e=="function"?e(n.current):e.current=n.current)},[e]),n}function sz(){for(var e=arguments.length,t=new Array(e),n=0;no=>{t.forEach(r=>r(o))},t)}const Rg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function a_(e){return"nodeType"in e}function fo(e){var t,n;return e?Zc(e)?e:a_(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function l_(e){const{Document:t}=fo(e);return e instanceof t}function Nf(e){return Zc(e)?!1:e instanceof fo(e).HTMLElement}function S6(e){return e instanceof fo(e).SVGElement}function Kc(e){return e?Zc(e)?e.document:a_(e)?l_(e)?e:Nf(e)||S6(e)?e.ownerDocument:document:document:document}const Mr=Rg?p.useLayoutEffect:p.useEffect;function Og(e){const t=p.useRef(e);return Mr(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r{e.current=setInterval(o,r)},[]),n=p.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Gd(e,t){t===void 0&&(t=[e]);const n=p.useRef(e);return Mr(()=>{n.current!==e&&(n.current=e)},t),n}function Rf(e,t){const n=p.useRef();return p.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function gm(e){const t=Og(e),n=p.useRef(null),o=p.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,o]}function ym(e){const t=p.useRef();return p.useEffect(()=>{t.current=e},[e]),t.current}let Ly={};function Of(e,t){return p.useMemo(()=>{if(t)return t;const n=Ly[e]==null?0:Ly[e]+1;return Ly[e]=n,e+"-"+n},[e,t])}function T6(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r{const a=Object.entries(s);for(const[l,c]of a){const u=i[l];u!=null&&(i[l]=u+e*c)}return i},{...t})}}const mc=T6(1),vm=T6(-1);function lz(e){return"clientX"in e&&"clientY"in e}function Ag(e){if(!e)return!1;const{KeyboardEvent:t}=fo(e.target);return t&&e instanceof t}function cz(e){if(!e)return!1;const{TouchEvent:t}=fo(e.target);return t&&e instanceof t}function bm(e){if(cz(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return lz(e)?{x:e.clientX,y:e.clientY}:null}const us=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[us.Translate.toString(e),us.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),IS="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function uz(e){return e.matches(IS)?e:e.querySelector(IS)}const dz={display:"none"};function fz(e){let{id:t,value:n}=e;return B.createElement("div",{id:t,style:dz},n)}function pz(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const r={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return B.createElement("div",{id:t,style:r,role:"status","aria-live":o,"aria-atomic":!0},n)}function hz(){const[e,t]=p.useState("");return{announce:p.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const E6=p.createContext(null);function mz(e){const t=p.useContext(E6);p.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function gz(){const[e]=p.useState(()=>new Set),t=p.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[p.useCallback(o=>{let{type:r,event:i}=o;e.forEach(s=>{var a;return(a=s[r])==null?void 0:a.call(s,i)})},[e]),t]}const yz={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - `},mz={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function gz(e){let{announcements:t=mz,container:n,hiddenTextDescribedById:o,screenReaderInstructions:r=hz}=e;const{announce:i,announcement:s}=dz(),a=Of("DndLiveRegion"),[l,c]=p.useState(!1);if(p.useEffect(()=>{c(!0)},[]),fz(p.useMemo(()=>({onDragStart(d){let{active:m}=d;i(t.onDragStart({active:m}))},onDragMove(d){let{active:m,over:h}=d;t.onDragMove&&i(t.onDragMove({active:m,over:h}))},onDragOver(d){let{active:m,over:h}=d;i(t.onDragOver({active:m,over:h}))},onDragEnd(d){let{active:m,over:h}=d;i(t.onDragEnd({active:m,over:h}))},onDragCancel(d){let{active:m,over:h}=d;i(t.onDragCancel({active:m,over:h}))}}),[i,t])),!l)return null;const u=B.createElement(B.Fragment,null,B.createElement(cz,{id:o,value:r.draggable}),B.createElement(uz,{id:a,announcement:s}));return n?Cn.createPortal(u,n):u}var rn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(rn||(rn={}));function wm(){}function yz(e,t){return p.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function vz(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(o=>o!=null),[...t])}const ni=Object.freeze({x:0,y:0});function bz(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function wz(e,t){const n=bm(e);if(!n)return"0 0";const o={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function _z(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function xz(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Sz(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function RS(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Tz=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=RS(t,t.left,t.top),i=[];for(const s of o){const{id:a}=s,l=n.get(a);if(l){const c=bz(RS(l),r);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(_z)};function Cz(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=r-o,a=i-n;if(o{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const i of o){const{id:s}=i,a=n.get(s);if(a){const l=Cz(a,t);l>0&&r.push({id:s,data:{droppableContainer:i,value:l}})}}return r.sort(xz)};function kz(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function C6(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ni}function Lz(e){return function(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Iz=Lz(1);function E6(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Rz(e,t,n){const o=E6(t);if(!o)return e;const{scaleX:r,scaleY:i,x:s,y:a}=o,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const Nz={ignoreTransform:!1};function Qc(e,t){t===void 0&&(t=Nz);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=fo(e).getComputedStyle(e);c&&(n=Rz(n,c,u))}const{top:o,left:r,width:i,height:s,bottom:a,right:l}=n;return{top:o,left:r,width:i,height:s,bottom:a,right:l}}function NS(e){return Qc(e,{ignoreTransform:!0})}function Oz(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Az(e,t){return t===void 0&&(t=fo(e).getComputedStyle(e)),t.position==="fixed"}function Mz(e,t){t===void 0&&(t=fo(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const i=t[r];return typeof i=="string"?n.test(i):!1})}function c2(e,t){const n=[];function o(r){if(t!=null&&n.length>=t||!r)return n;if(l2(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Rf(r)||x6(r)||n.includes(r))return n;const i=fo(e).getComputedStyle(r);return r!==e&&Mz(r,i)&&n.push(r),Az(r,i)?n:o(r.parentNode)}return e?o(e):n}function k6(e){const[t]=c2(e,1);return t??null}function Iy(e){return!Ng||!e?null:Zc(e)?e:a2(e)?l2(e)||e===Kc(e).scrollingElement?window:Rf(e)?e:null:null}function L6(e){return Zc(e)?e.scrollX:e.scrollLeft}function I6(e){return Zc(e)?e.scrollY:e.scrollTop}function H1(e){return{x:L6(e),y:I6(e)}}var pn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(pn||(pn={}));function R6(e){return!Ng||!e?!1:e===document.scrollingElement}function N6(e){const t={x:0,y:0},n=R6(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},r=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=o.y,a=e.scrollLeft>=o.x;return{isTop:r,isLeft:i,isBottom:s,isRight:a,maxScroll:o,minScroll:t}}const Dz={x:.2,y:.2};function zz(e,t,n,o,r){let{top:i,left:s,right:a,bottom:l}=n;o===void 0&&(o=10),r===void 0&&(r=Dz);const{isTop:c,isBottom:u,isLeft:d,isRight:m}=N6(e),h={x:0,y:0},f={x:0,y:0},g={height:t.height*r.y,width:t.width*r.x};return!c&&i<=t.top+g.height?(h.y=pn.Backward,f.y=o*Math.abs((t.top+g.height-i)/g.height)):!u&&l>=t.bottom-g.height&&(h.y=pn.Forward,f.y=o*Math.abs((t.bottom-g.height-l)/g.height)),!m&&a>=t.right-g.width?(h.x=pn.Forward,f.x=o*Math.abs((t.right-g.width-a)/g.width)):!d&&s<=t.left+g.width&&(h.x=pn.Backward,f.x=o*Math.abs((t.left+g.width-s)/g.width)),{direction:h,speed:f}}function Pz(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function O6(e){return e.reduce((t,n)=>mc(t,H1(n)),ni)}function Bz(e){return e.reduce((t,n)=>t+L6(n),0)}function $z(e){return e.reduce((t,n)=>t+I6(n),0)}function A6(e,t){if(t===void 0&&(t=Qc),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);k6(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Fz=[["x",["left","right"],Bz],["y",["top","bottom"],$z]];let u2=class{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=c2(n),r=O6(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Fz)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(o),u=r[i]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}};class pd{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var r;(r=this.target)==null||r.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function Hz(e){const{EventTarget:t}=fo(e);return e instanceof t?e:Kc(e)}function Ry(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var vr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(vr||(vr={}));function OS(e){e.preventDefault()}function Vz(e){e.stopPropagation()}var at;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(at||(at={}));const M6={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter]},Uz=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case at.Right:return{...n,x:n.x+25};case at.Left:return{...n,x:n.x-25};case at.Down:return{...n,y:n.y+25};case at.Up:return{...n,y:n.y-25}}};class D6{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new pd(Kc(n)),this.windowListeners=new pd(fo(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(vr.Resize,this.handleCancel),this.windowListeners.add(vr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(vr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&A6(o),n(ni)}handleKeyDown(t){if(Ag(t)){const{active:n,context:o,options:r}=this.props,{keyboardCodes:i=M6,coordinateGetter:s=Uz,scrollBehavior:a="smooth"}=r,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=o.current,u=c?{x:c.left,y:c.top}:ni;this.referenceCoordinates||(this.referenceCoordinates=u);const d=s(t,{active:n,context:o.current,currentCoordinates:u});if(d){const m=vm(d,u),h={x:0,y:0},{scrollableAncestors:f}=o.current;for(const g of f){const b=t.code,{isTop:y,isRight:v,isLeft:w,isBottom:_,maxScroll:S,minScroll:x}=N6(g),T=Pz(g),C={x:Math.min(b===at.Right?T.right-T.width/2:T.right,Math.max(b===at.Right?T.left:T.left+T.width/2,d.x)),y:Math.min(b===at.Down?T.bottom-T.height/2:T.bottom,Math.max(b===at.Down?T.top:T.top+T.height/2,d.y))},R=b===at.Right&&!v||b===at.Left&&!w,I=b===at.Down&&!_||b===at.Up&&!y;if(R&&C.x!==d.x){const O=g.scrollLeft+m.x,N=b===at.Right&&O<=S.x||b===at.Left&&O>=x.x;if(N&&!m.y){g.scrollTo({left:O,behavior:a});return}N?h.x=g.scrollLeft-O:h.x=b===at.Right?g.scrollLeft-S.x:g.scrollLeft-x.x,h.x&&g.scrollBy({left:-h.x,behavior:a});break}else if(I&&C.y!==d.y){const O=g.scrollTop+m.y,N=b===at.Down&&O<=S.y||b===at.Up&&O>=x.y;if(N&&!m.x){g.scrollTo({top:O,behavior:a});return}N?h.y=g.scrollTop-O:h.y=b===at.Down?g.scrollTop-S.y:g.scrollTop-x.y,h.y&&g.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,mc(vm(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}D6.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=M6,onActivation:r}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(o.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),r?.({event:e.nativeEvent}),!0)}return!1}}];function AS(e){return!!(e&&"distance"in e)}function MS(e){return!!(e&&"delay"in e)}class d2{constructor(t,n,o){var r;o===void 0&&(o=Hz(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=Kc(s),this.documentListeners=new pd(this.document),this.listeners=new pd(o),this.windowListeners=new pd(fo(s)),this.initialCoordinates=(r=bm(i))!=null?r:ni,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(vr.Resize,this.handleCancel),this.windowListeners.add(vr.DragStart,OS),this.windowListeners.add(vr.VisibilityChange,this.handleCancel),this.windowListeners.add(vr.ContextMenu,OS),this.documentListeners.add(vr.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(MS(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(AS(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(vr.Click,Vz,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(vr.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!r)return;const l=(n=bm(t))!=null?n:ni,c=vm(r,l);if(!o&&a){if(AS(a)){if(a.tolerance!=null&&Ry(c,a.tolerance))return this.handleCancel();if(Ry(c,a.distance))return this.handleStart()}return MS(a)&&Ry(c,a.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===at.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const jz={move:{name:"pointermove"},end:{name:"pointerup"}};class f2 extends d2{constructor(t){const{event:n}=t,o=Kc(n.target);super(t,jz,o)}}f2.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o?.({event:n}),!0)}}];const Wz={move:{name:"mousemove"},end:{name:"mouseup"}};var V1;(function(e){e[e.RightClick=2]="RightClick"})(V1||(V1={}));class qz extends d2{constructor(t){super(t,Wz,Kc(t.event.target))}}qz.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===V1.RightClick?!1:(o?.({event:n}),!0)}}];const Ny={move:{name:"touchmove"},end:{name:"touchend"}};class Gz extends d2{constructor(t){super(t,Ny)}static setup(){return window.addEventListener(Ny.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ny.move.name,t)};function t(){}}}Gz.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return r.length>1?!1:(o?.({event:n}),!0)}}];var hd;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hd||(hd={}));var _m;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_m||(_m={}));function Yz(e){let{acceleration:t,activator:n=hd.Pointer,canScroll:o,draggingRect:r,enabled:i,interval:s=5,order:a=_m.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:m}=e;const h=Jz({delta:d,disabled:!i}),[f,g]=rz(),b=p.useRef({x:0,y:0}),y=p.useRef({x:0,y:0}),v=p.useMemo(()=>{switch(n){case hd.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case hd.DraggableRect:return r}},[n,r,l]),w=p.useRef(null),_=p.useCallback(()=>{const x=w.current;if(!x)return;const T=b.current.x*y.current.x,C=b.current.y*y.current.y;x.scrollBy(T,C)},[]),S=p.useMemo(()=>a===_m.TreeOrder?[...c].reverse():c,[a,c]);p.useEffect(()=>{if(!i||!c.length||!v){g();return}for(const x of S){if(o?.(x)===!1)continue;const T=c.indexOf(x),C=u[T];if(!C)continue;const{direction:R,speed:I}=zz(x,C,v,t,m);for(const O of["x","y"])h[O][R[O]]||(I[O]=0,R[O]=0);if(I.x>0||I.y>0){g(),w.current=x,f(_,s),b.current=I,y.current=R;return}}b.current={x:0,y:0},y.current={x:0,y:0},g()},[t,_,o,g,i,s,JSON.stringify(v),JSON.stringify(h),f,c,S,u,JSON.stringify(m)])}const Xz={x:{[pn.Backward]:!1,[pn.Forward]:!1},y:{[pn.Backward]:!1,[pn.Forward]:!1}};function Jz(e){let{delta:t,disabled:n}=e;const o=ym(t);return Nf(r=>{if(n||!o||!r)return Xz;const i={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[pn.Backward]:r.x[pn.Backward]||i.x===-1,[pn.Forward]:r.x[pn.Forward]||i.x===1},y:{[pn.Backward]:r.y[pn.Backward]||i.y===-1,[pn.Forward]:r.y[pn.Forward]||i.y===1}}},[n,t,o])}function Zz(e,t){const n=t!==null?e.get(t):void 0,o=n?n.node.current:null;return Nf(r=>{var i;return t===null?null:(i=o??r)!=null?i:null},[o,t])}function Kz(e,t){return p.useMemo(()=>e.reduce((n,o)=>{const{sensor:r}=o,i=r.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,o)}));return[...n,...i]},[]),[e,t])}var Yd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Yd||(Yd={}));var U1;(function(e){e.Optimized="optimized"})(U1||(U1={}));const DS=new Map;function Qz(e,t){let{dragging:n,dependencies:o,config:r}=t;const[i,s]=p.useState(null),{frequency:a,measure:l,strategy:c}=r,u=p.useRef(e),d=b(),m=Gd(d),h=p.useCallback(function(y){y===void 0&&(y=[]),!m.current&&s(v=>v===null?y:v.concat(y.filter(w=>!v.includes(w))))},[m]),f=p.useRef(null),g=Nf(y=>{if(d&&!n)return DS;if(!y||y===DS||u.current!==e||i!=null){const v=new Map;for(let w of e){if(!w)continue;if(i&&i.length>0&&!i.includes(w.id)&&w.rect.current){v.set(w.id,w.rect.current);continue}const _=w.node.current,S=_?new u2(l(_),_):null;w.rect.current=S,S&&v.set(w.id,S)}return v}return y},[e,i,n,d,l]);return p.useEffect(()=>{u.current=e},[e]),p.useEffect(()=>{d||h()},[n,d]),p.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),p.useEffect(()=>{d||typeof a!="number"||f.current!==null||(f.current=setTimeout(()=>{h(),f.current=null},a))},[a,d,h,...o]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:i!=null};function b(){switch(c){case Yd.Always:return!1;case Yd.BeforeDragging:return n;default:return!n}}}function p2(e,t){return Nf(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function e7(e,t){return p2(e,t)}function t7(e){let{callback:t,disabled:n}=e;const o=Og(t),r=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(o)},[o,n]);return p.useEffect(()=>()=>r?.disconnect(),[r]),r}function Mg(e){let{callback:t,disabled:n}=e;const o=Og(t),r=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(o)},[n]);return p.useEffect(()=>()=>r?.disconnect(),[r]),r}function n7(e){return new u2(Qc(e),e)}function zS(e,t,n){t===void 0&&(t=n7);const[o,r]=p.useReducer(a,null),i=t7({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){r();break}}}}),s=Mg({callback:r});return Mr(()=>{r(),e?(s?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),i?.disconnect())},[e]),o;function a(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function o7(e){const t=p2(e);return C6(e,t)}const PS=[];function r7(e){const t=p.useRef(e),n=Nf(o=>e?o&&o!==PS&&e&&t.current&&e.parentNode===t.current.parentNode?o:c2(e):PS,[e]);return p.useEffect(()=>{t.current=e},[e]),n}function i7(e){const[t,n]=p.useState(null),o=p.useRef(e),r=p.useCallback(i=>{const s=Iy(i.target);s&&n(a=>a?(a.set(s,H1(s)),new Map(a)):null)},[]);return p.useEffect(()=>{const i=o.current;if(e!==i){s(i);const a=e.map(l=>{const c=Iy(l);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,H1(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),o.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const c=Iy(l);c?.removeEventListener("scroll",r)})}},[r,e]),p.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>mc(i,s),ni):O6(e):ni,[e,t])}function BS(e,t){t===void 0&&(t=[]);const n=p.useRef(null);return p.useEffect(()=>{n.current=null},t),p.useEffect(()=>{const o=e!==ni;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?vm(e,n.current):ni}function s7(e){p.useEffect(()=>{if(!Ng)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function a7(e,t){return p.useMemo(()=>e.reduce((n,o)=>{let{eventName:r,handler:i}=o;return n[r]=s=>{i(s,t)},n},{}),[e,t])}function z6(e){return p.useMemo(()=>e?Oz(e):null,[e])}const Oy=[];function l7(e,t){t===void 0&&(t=Qc);const[n]=e,o=z6(n?fo(n):null),[r,i]=p.useReducer(a,Oy),s=Mg({callback:i});return e.length>0&&r===Oy&&i(),Mr(()=>{e.length?e.forEach(l=>s?.observe(l)):(s?.disconnect(),i())},[e]),r;function a(){return e.length?e.map(l=>R6(l)?o:new u2(t(l),l)):Oy}}function P6(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Rf(t)?t:e}function c7(e){let{measure:t}=e;const[n,o]=p.useState(null),r=p.useCallback(c=>{for(const{target:u}of c)if(Rf(u)){o(d=>{const m=t(u);return d?{...d,width:m.width,height:m.height}:m});break}},[t]),i=Mg({callback:r}),s=p.useCallback(c=>{const u=P6(c);i?.disconnect(),u&&i?.observe(u),o(u?t(u):null)},[t,i]),[a,l]=gm(s);return p.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const u7=[{sensor:f2,options:{}},{sensor:D6,options:{}}],d7={current:{}},gh={draggable:{measure:NS},droppable:{measure:NS,strategy:Yd.WhileDragging,frequency:U1.Optimized},dragOverlay:{measure:Qc}};class md extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const f7={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new md,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:wm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:gh,measureDroppableContainers:wm,windowRect:null,measuringScheduled:!1},B6={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:wm,draggableNodes:new Map,over:null,measureDroppableContainers:wm},Af=p.createContext(B6),$6=p.createContext(f7);function p7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new md}}}function h7(e,t){switch(t.type){case rn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case rn.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case rn.DragEnd:case rn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case rn.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new md(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case rn.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const s=new md(e.droppable.containers);return s.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case rn.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new md(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function m7(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=p.useContext(Af),i=ym(o),s=ym(n?.id);return p.useEffect(()=>{if(!t&&!o&&i&&s!=null){if(!Ag(i)||document.activeElement===i.target)return;const a=r.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=az(u);if(d){d.focus();break}}})}},[o,t,r,s,i]),null}function F6(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((r,i)=>i({transform:r,...o}),n):n}function g7(e){return p.useMemo(()=>({draggable:{...gh.draggable,...e?.draggable},droppable:{...gh.droppable,...e?.droppable},dragOverlay:{...gh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function y7(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=p.useRef(!1),{x:s,y:a}=typeof r=="boolean"?{x:r,y:r}:r;Mr(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!o)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=C6(u,o);if(s||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const m=k6(c);m&&m.scrollBy({top:d.y,left:d.x})}},[t,s,a,o,n])}const Dg=p.createContext({...ni,scaleX:1,scaleY:1});var js;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(js||(js={}));const v7=p.memo(function(t){var n,o,r,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=u7,collisionDetection:d=Ez,measuring:m,modifiers:h,...f}=t;const g=p.useReducer(h7,void 0,p7),[b,y]=g,[v,w]=pz(),[_,S]=p.useState(js.Uninitialized),x=_===js.Initialized,{draggable:{active:T,nodes:C,translate:R},droppable:{containers:I}}=b,O=T?C.get(T):null,N=p.useRef({initial:null,translated:null}),z=p.useMemo(()=>{var Ot;return T!=null?{id:T,data:(Ot=O?.data)!=null?Ot:d7,rect:N}:null},[T,O]),k=p.useRef(null),[M,D]=p.useState(null),[$,A]=p.useState(null),L=Gd(f,Object.values(f)),P=Of("DndDescribedBy",s),F=p.useMemo(()=>I.getEnabled(),[I]),H=g7(m),{droppableRects:U,measureDroppableContainers:j,measuringScheduled:q}=Qz(F,{dragging:x,dependencies:[R.x,R.y],config:H.droppable}),V=Zz(C,T),W=p.useMemo(()=>$?bm($):null,[$]),X=hr(),J=e7(V,H.draggable.measure);y7({activeNode:T?C.get(T):null,config:X.layoutShiftCompensation,initialRect:J,measure:H.draggable.measure});const Y=zS(V,H.draggable.measure,J),Q=zS(V?V.parentElement:null),G=p.useRef({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Z=I.getNodeFor((n=G.current.over)==null?void 0:n.id),K=c7({measure:H.dragOverlay.measure}),ee=(o=K.nodeRef.current)!=null?o:V,se=x?(r=K.rect)!=null?r:Y:null,he=!!(K.nodeRef.current&&K.rect),re=o7(he?null:Y),De=z6(ee?fo(ee):null),$e=r7(x?Z??V:null),ze=l7($e),Xe=F6(h,{transform:{x:R.x-re.x,y:R.y-re.y,scaleX:1,scaleY:1},activatorEvent:$,active:z,activeNodeRect:Y,containerNodeRect:Q,draggingNodeRect:se,over:G.current.over,overlayNodeRect:K.rect,scrollableAncestors:$e,scrollableAncestorRects:ze,windowRect:De}),Re=W?mc(W,R):null,je=i7($e),it=BS(je),xe=BS(je,[Y]),wt=mc(Xe,it),$t=se?Iz(se,Xe):null,Nt=z&&$t?d({active:z,collisionRect:$t,droppableRects:U,droppableContainers:F,pointerCoordinates:Re}):null,st=Sz(Nt,"id"),[Ve,Kt]=p.useState(null),Mn=he?Xe:mc(Xe,xe),Dn=kz(Mn,(i=Ve?.rect)!=null?i:null,Y),Yt=p.useCallback((Ot,fe)=>{let{sensor:Oe,options:yt}=fe;if(k.current==null)return;const We=C.get(k.current);if(!We)return;const Ke=Ot.nativeEvent,kt=new Oe({active:k.current,activeNode:We,event:Ke,options:yt,context:G,onStart(_t){const Kn=k.current;if(Kn==null)return;const go=C.get(Kn);if(!go)return;const{onDragStart:Pn}=L.current,ci={active:{id:Kn,data:go.data,rect:N}};Cn.unstable_batchedUpdates(()=>{Pn?.(ci),S(js.Initializing),y({type:rn.DragStart,initialCoordinates:_t,active:Kn}),v({type:"onDragStart",event:ci})})},onMove(_t){y({type:rn.DragMove,coordinates:_t})},onEnd:_n(rn.DragEnd),onCancel:_n(rn.DragCancel)});Cn.unstable_batchedUpdates(()=>{D(kt),A(Ot.nativeEvent)});function _n(_t){return async function(){const{active:go,collisions:Pn,over:ci,scrollAdjustedTranslate:zi}=G.current;let yo=null;if(go&&zi){const{cancelDrop:mr}=L.current;yo={activatorEvent:Ke,active:go,collisions:Pn,delta:zi,over:ci},_t===rn.DragEnd&&typeof mr=="function"&&await Promise.resolve(mr(yo))&&(_t=rn.DragCancel)}k.current=null,Cn.unstable_batchedUpdates(()=>{y({type:_t}),S(js.Uninitialized),Kt(null),D(null),A(null);const mr=_t===rn.DragEnd?"onDragEnd":"onDragCancel";if(yo){const Is=L.current[mr];Is?.(yo),v({type:mr,event:yo})}})}}},[C]),Zn=p.useCallback((Ot,fe)=>(Oe,yt)=>{const We=Oe.nativeEvent,Ke=C.get(yt);if(k.current!==null||!Ke||We.dndKit||We.defaultPrevented)return;const kt={active:Ke};Ot(Oe,fe.options,kt)===!0&&(We.dndKit={capturedBy:fe.sensor},k.current=yt,Yt(Oe,fe))},[C,Yt]),Fo=Kz(u,Zn);s7(u),Mr(()=>{Y&&_===js.Initializing&&S(js.Initialized)},[Y,_]),p.useEffect(()=>{const{onDragMove:Ot}=L.current,{active:fe,activatorEvent:Oe,collisions:yt,over:We}=G.current;if(!fe||!Oe)return;const Ke={active:fe,activatorEvent:Oe,collisions:yt,delta:{x:wt.x,y:wt.y},over:We};Cn.unstable_batchedUpdates(()=>{Ot?.(Ke),v({type:"onDragMove",event:Ke})})},[wt.x,wt.y]),p.useEffect(()=>{const{active:Ot,activatorEvent:fe,collisions:Oe,droppableContainers:yt,scrollAdjustedTranslate:We}=G.current;if(!Ot||k.current==null||!fe||!We)return;const{onDragOver:Ke}=L.current,kt=yt.get(st),_n=kt&&kt.rect.current?{id:kt.id,rect:kt.rect.current,data:kt.data,disabled:kt.disabled}:null,_t={active:Ot,activatorEvent:fe,collisions:Oe,delta:{x:We.x,y:We.y},over:_n};Cn.unstable_batchedUpdates(()=>{Kt(_n),Ke?.(_t),v({type:"onDragOver",event:_t})})},[st]),Mr(()=>{G.current={activatorEvent:$,active:z,activeNode:V,collisionRect:$t,collisions:Nt,droppableRects:U,draggableNodes:C,draggingNode:ee,draggingNodeRect:se,droppableContainers:I,over:Ve,scrollableAncestors:$e,scrollAdjustedTranslate:wt},N.current={initial:se,translated:$t}},[z,V,Nt,$t,C,ee,se,U,I,Ve,$e,wt]),Yz({...X,delta:R,draggingRect:$t,pointerCoordinates:Re,scrollableAncestors:$e,scrollableAncestorRects:ze});const Xt=p.useMemo(()=>({active:z,activeNode:V,activeNodeRect:Y,activatorEvent:$,collisions:Nt,containerNodeRect:Q,dragOverlay:K,draggableNodes:C,droppableContainers:I,droppableRects:U,over:Ve,measureDroppableContainers:j,scrollableAncestors:$e,scrollableAncestorRects:ze,measuringConfiguration:H,measuringScheduled:q,windowRect:De}),[z,V,Y,$,Nt,Q,K,C,I,U,Ve,j,$e,ze,H,q,De]),zn=p.useMemo(()=>({activatorEvent:$,activators:Fo,active:z,activeNodeRect:Y,ariaDescribedById:{draggable:P},dispatch:y,draggableNodes:C,over:Ve,measureDroppableContainers:j}),[$,Fo,z,Y,y,P,C,Ve,j]);return B.createElement(T6.Provider,{value:w},B.createElement(Af.Provider,{value:zn},B.createElement($6.Provider,{value:Xt},B.createElement(Dg.Provider,{value:Dn},c)),B.createElement(m7,{disabled:a?.restoreFocus===!1})),B.createElement(gz,{...a,hiddenTextDescribedById:P}));function hr(){const Ot=M?.autoScrollEnabled===!1,fe=typeof l=="object"?l.enabled===!1:l===!1,Oe=x&&!Ot&&!fe;return typeof l=="object"?{...l,enabled:Oe}:{enabled:Oe}}}),b7=p.createContext(null),$S="button",w7="Droppable";function _7(e){let{id:t,data:n,disabled:o=!1,attributes:r}=e;const i=Of(w7),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:m}=p.useContext(Af),{role:h=$S,roleDescription:f="draggable",tabIndex:g=0}=r??{},b=l?.id===t,y=p.useContext(b?Dg:b7),[v,w]=gm(),[_,S]=gm(),x=a7(s,t),T=Gd(n);Mr(()=>(d.set(t,{id:t,key:i,node:v,activatorNode:_,data:T}),()=>{const R=d.get(t);R&&R.key===i&&d.delete(t)}),[d,t]);const C=p.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":o,"aria-pressed":b&&h===$S?!0:void 0,"aria-roledescription":f,"aria-describedby":u.draggable}),[o,h,g,b,f,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:C,isDragging:b,listeners:o?void 0:x,node:v,over:m,setNodeRef:w,setActivatorNodeRef:S,transform:y}}function H6(){return p.useContext($6)}const x7="Droppable",S7={timeout:25};function T7(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const i=Of(x7),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=p.useContext(Af),u=p.useRef({disabled:n}),d=p.useRef(!1),m=p.useRef(null),h=p.useRef(null),{disabled:f,updateMeasurementsFor:g,timeout:b}={...S7,...r},y=Gd(g??o),v=p.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),h.current=null},b)},[b]),w=Mg({callback:v,disabled:f||!s}),_=p.useCallback((C,R)=>{w&&(R&&(w.unobserve(R),d.current=!1),C&&w.observe(C))},[w]),[S,x]=gm(_),T=Gd(t);return p.useEffect(()=>{!w||!S.current||(w.disconnect(),d.current=!1,w.observe(S.current))},[S,w]),Mr(()=>(a({type:rn.RegisterDroppable,element:{id:o,key:i,disabled:n,node:S,rect:m,data:T}}),()=>a({type:rn.UnregisterDroppable,key:i,id:o})),[o]),p.useEffect(()=>{n!==u.current.disabled&&(a({type:rn.SetDroppableDisabled,id:o,key:i,disabled:n}),u.current.disabled=n)},[o,i,n,a]),{active:s,rect:m,isOver:l?.id===o,node:S,over:l,setNodeRef:x}}function C7(e){let{animation:t,children:n}=e;const[o,r]=p.useState(null),[i,s]=p.useState(null),a=ym(n);return!n&&!o&&a&&r(a),Mr(()=>{if(!i)return;const l=o?.key,c=o?.props.id;if(l==null||c==null){r(null);return}Promise.resolve(t(c,i)).then(()=>{r(null)})},[t,o,i]),B.createElement(B.Fragment,null,n,o?p.cloneElement(o,{ref:s}):null)}const E7={x:0,y:0,scaleX:1,scaleY:1};function k7(e){let{children:t}=e;return B.createElement(Af.Provider,{value:B6},B.createElement(Dg.Provider,{value:E7},t))}const L7={position:"fixed",touchAction:"none"},I7=e=>Ag(e)?"transform 250ms ease":void 0,R7=p.forwardRef((e,t)=>{let{as:n,activatorEvent:o,adjustScale:r,children:i,className:s,rect:a,style:l,transform:c,transition:u=I7}=e;if(!a)return null;const d=r?c:{...c,scaleX:1,scaleY:1},m={...L7,width:a.width,height:a.height,top:a.top,left:a.left,transform:us.Transform.toString(d),transformOrigin:r&&o?wz(o,a):void 0,transition:typeof u=="function"?u(o):u,...l};return B.createElement(n,{className:s,style:m,ref:t},i)}),N7=e=>t=>{let{active:n,dragOverlay:o}=t;const r={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&o.node.style.setProperty(a,l);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(const[l,c]of Object.entries(r))n.node.style.setProperty(l,c);s!=null&&s.active&&n.node.classList.remove(s.active)}},O7=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:us.Transform.toString(t)},{transform:us.Transform.toString(n)}]},A7={duration:250,easing:"ease",keyframes:O7,sideEffects:N7({styles:{active:{opacity:"0"}}})};function M7(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:r}=e;return Og((i,s)=>{if(t===null)return;const a=n.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=P6(s);if(!c)return;const{transform:u}=fo(s).getComputedStyle(s),d=E6(u);if(!d)return;const m=typeof t=="function"?t:D7(t);return A6(l,r.draggable.measure),m({active:{id:i,data:a.data,node:l,rect:r.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:r.dragOverlay.measure(c)},droppableContainers:o,measuringConfiguration:r,transform:d})})}function D7(e){const{duration:t,easing:n,sideEffects:o,keyframes:r}={...A7,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...c}=i;if(!t)return;const u={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},d={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},m={x:l.x-u.x,y:l.y-u.y,...d},h=r({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[f]=h,g=h[h.length-1];if(JSON.stringify(f)===JSON.stringify(g))return;const b=o?.({active:s,dragOverlay:a,...c}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(v=>{y.onfinish=()=>{b?.(),v()}})}}let FS=0;function z7(e){return p.useMemo(()=>{if(e!=null)return FS++,FS},[e])}const P7=B.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:r,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:u,active:d,activeNodeRect:m,containerNodeRect:h,draggableNodes:f,droppableContainers:g,dragOverlay:b,over:y,measuringConfiguration:v,scrollableAncestors:w,scrollableAncestorRects:_,windowRect:S}=H6(),x=p.useContext(Dg),T=z7(d?.id),C=F6(s,{activatorEvent:u,active:d,activeNodeRect:m,containerNodeRect:h,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:_,transform:x,windowRect:S}),R=p2(m),I=M7({config:o,draggableNodes:f,droppableContainers:g,measuringConfiguration:v}),O=R?b.setRef:void 0;return B.createElement(k7,null,B.createElement(C7,{animation:I},d&&T?B.createElement(R7,{key:T,id:d.id,ref:O,as:a,activatorEvent:u,adjustScale:t,className:l,transition:i,rect:R,style:{zIndex:c,...r},transform:C},n):null))});function h2(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function B7(e,t){return e.reduce((n,o,r)=>{const i=t.get(o);return i&&(n[r]=i),n},Array(e.length))}function xp(e){return e!==null&&e>=0}function $7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=h2(t,o,n),s=t[r],a=i[r];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},Sp={scaleX:1,scaleY:1},H7=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:s}=e;const a=(t=i[n])!=null?t:o;if(!a)return null;if(r===n){const c=i[s];return c?{x:0,y:nn&&r<=s?{x:0,y:-a.height-l,...Sp}:r=s?{x:0,y:a.height+l,...Sp}:{x:0,y:0,...Sp}};function V7(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?no.map(x=>typeof x=="object"&&"id"in x?x.id:x),[o]),f=s!=null,g=s?h.indexOf(s.id):-1,b=c?h.indexOf(c.id):-1,y=p.useRef(h),v=!$7(h,y.current),w=b!==-1&&g===-1||v,_=F7(i);Mr(()=>{v&&f&&u(h)},[v,h,f,u]),p.useEffect(()=>{y.current=h},[h]);const S=p.useMemo(()=>({activeIndex:g,containerId:d,disabled:_,disableTransforms:w,items:h,overIndex:b,useDragOverlay:m,sortedRects:B7(h,l),strategy:r}),[g,d,_.draggable,_.droppable,w,h,b,l,m,r]);return B.createElement(j6.Provider,{value:S},t)}const j7=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return h2(n,o,r).indexOf(t)},W7=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!o||a!==i&&r===s?!1:n?!0:s!==r&&t===l},q7={duration:200,easing:"ease"},W6="transform",G7=us.Transition.toString({property:W6,duration:0,easing:"linear"}),Y7={roleDescription:"sortable"};function X7(e){let{disabled:t,index:n,node:o,rect:r}=e;const[i,s]=p.useState(null),a=p.useRef(n);return Mr(()=>{if(!t&&n!==a.current&&o.current){const l=r.current;if(l){const c=Qc(o.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,o,r]),p.useEffect(()=>{i&&s(null)},[i]),i}function J7(e){let{animateLayoutChanges:t=W7,attributes:n,disabled:o,data:r,getNewIndex:i=j7,id:s,strategy:a,resizeObserverConfig:l,transition:c=q7}=e;const{items:u,containerId:d,activeIndex:m,disabled:h,disableTransforms:f,sortedRects:g,overIndex:b,useDragOverlay:y,strategy:v}=p.useContext(j6),w=Z7(o,h),_=u.indexOf(s),S=p.useMemo(()=>({sortable:{containerId:d,index:_,items:u},...r}),[d,r,_,u]),x=p.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:T,node:C,isOver:R,setNodeRef:I}=T7({id:s,data:S,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:x,...l}}),{active:O,activatorEvent:N,activeNodeRect:z,attributes:k,setNodeRef:M,listeners:D,isDragging:$,over:A,setActivatorNodeRef:L,transform:P}=_7({id:s,data:S,attributes:{...Y7,...n},disabled:w.draggable}),F=oz(I,M),H=!!O,U=H&&!f&&xp(m)&&xp(b),j=!y&&$,q=j&&U?P:null,W=U?q??(a??v)({rects:g,activeNodeRect:z,activeIndex:m,overIndex:b,index:_}):null,X=xp(m)&&xp(b)?i({id:s,items:u,activeIndex:m,overIndex:b}):_,J=O?.id,Y=p.useRef({activeId:J,items:u,newIndex:X,containerId:d}),Q=u!==Y.current.items,G=t({active:O,containerId:d,isDragging:$,isSorting:H,id:s,index:_,items:u,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:c,wasDragging:Y.current.activeId!=null}),Z=X7({disabled:!G,index:_,node:C,rect:T});return p.useEffect(()=>{H&&Y.current.newIndex!==X&&(Y.current.newIndex=X),d!==Y.current.containerId&&(Y.current.containerId=d),u!==Y.current.items&&(Y.current.items=u)},[H,X,d,u]),p.useEffect(()=>{if(J===Y.current.activeId)return;if(J&&!Y.current.activeId){Y.current.activeId=J;return}const ee=setTimeout(()=>{Y.current.activeId=J},50);return()=>clearTimeout(ee)},[J]),{active:O,activeIndex:m,attributes:k,data:S,rect:T,index:_,newIndex:X,items:u,isOver:R,isSorting:H,isDragging:$,listeners:D,node:C,overIndex:b,over:A,setNodeRef:F,setActivatorNodeRef:L,setDroppableNodeRef:I,setDraggableNodeRef:M,transform:Z??W,transition:K()};function K(){if(Z||Q&&Y.current.newIndex===_)return G7;if(!(j&&!Ag(N)||!c)&&(H||G))return us.Transition.toString({...c,property:W6})}}function Z7(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(o=e?.droppable)!=null?o:t.droppable}}at.Down,at.Right,at.Up,at.Left;var zc=(e=>(e[e.Ancestor=0]="Ancestor",e[e.Scrollable=1]="Scrollable",e))(zc||{});function m2(e,t){const{listeners:n,setNodeRef:o,setActivatorNodeRef:r,transform:i,transition:s,isDragging:a,isSorting:l}=J7({id:e.toString(),animateLayoutChanges:()=>!1,disabled:t?.disabled}),c={ref:o,style:{transform:t?.moveOnly?us.Translate.toString(i):us.Transform.toString(i),transition:s,opacity:t?.hidePreview&&a?0:1,pointerEvents:l?"none":void 0},role:t?.disabled?void 0:"sortable-node"},u={ref:r,role:t?.disabled?void 0:"sortable-handle",...n};return{node:c,handle:u,combined:{...c,...n,role:t?.disabled?void 0:"sortable-combined"}}}function K7(e){return new Promise(t=>setTimeout(t,e*1e3))}function an(...e){return e.map(tP).filter(t=>t!=null).join(" ")}function Q7(e){return e?.querySelector("div[data-overlayscrollbars-viewport]")??void 0}function eP(e,t,n){return h2(e,t,n)}function tP(e){return e==null||typeof e=="boolean"?null:typeof e=="string"?e:e[0]?e[1]:null}function ro(e){return e=nP(e),e=e.replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim(),e=e.replace(/(\D)(\d)/g,"$1 $2").replace(/(\d)(\D)/g,"$1 $2").trim(),e=e.split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),e}function nP(e){if(e.length<2)return e;const t="$1_$2";return e.replace(/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu,t).replace(/(\p{Uppercase_Letter})(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu,t)}const zg=0,Ca=1,eu=2,q6=4;function G6(e,t){return n=>e(t(n))}function oP(e,t){return t(e)}function Y6(e,t){return n=>e(t,n)}function HS(e,t){return()=>e(t)}function Pg(e,t){return t(e),e}function Bt(...e){return e}function rP(e){e()}function VS(e){return()=>e}function iP(...e){return()=>{e.map(rP)}}function g2(e){return e!==void 0}function tu(){}function vt(e,t){return e(Ca,t)}function Ae(e,t){e(zg,t)}function y2(e){e(eu)}function Qo(e){return e(q6)}function ye(e,t){return vt(e,Y6(t,zg))}function ds(e,t){const n=e(Ca,o=>{n(),t(o)});return n}function Je(){const e=[];return(t,n)=>{switch(t){case eu:e.splice(0,e.length);return;case Ca:return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)};case zg:e.slice().forEach(o=>{o(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ae(e){let t=e;const n=Je();return(o,r)=>{switch(o){case Ca:r(t);break;case zg:t=r;break;case q6:return t}return n(o,r)}}function sP(e){let t,n;const o=()=>t&&t();return function(r,i){switch(r){case Ca:return i?n===i?void 0:(o(),n=i,t=vt(e,i),t):(o(),tu);case eu:o(),n=null;return;default:throw new Error(`unrecognized action ${r}`)}}}function nr(e){return Pg(Je(),t=>ye(e,t))}function so(e,t){return Pg(ae(t),n=>ye(e,n))}function aP(...e){return t=>e.reduceRight(oP,t)}function te(e,...t){const n=aP(...t);return(o,r)=>{switch(o){case Ca:return vt(e,n(r));case eu:y2(e);return}}}function X6(e,t){return e===t}function Pt(e=X6){let t;return n=>o=>{e(t,o)||(t=o,n(o))}}function Ce(e){return t=>n=>{e(n)&&t(n)}}function ue(e){return t=>G6(t,e)}function Gi(e){return t=>()=>t(e)}function wi(e,t){return n=>o=>n(t=e(t,o))}function Pc(e){return t=>n=>{e>0?e--:t(n)}}function ta(e){let t=null,n;return o=>r=>{t=r,!n&&(n=setTimeout(()=>{n=void 0,o(t)},e))}}function US(e){let t,n;return o=>r=>{t=r,n&&clearTimeout(n),n=setTimeout(()=>{o(t)},e)}}function He(...e){const t=new Array(e.length);let n=0,o=null;const r=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);vt(i,l=>{const c=n;n=n|a,t[s]=l,c!==r&&n===r&&o&&(o(),o=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===r?a():o=a}}function jS(...e){return function(t,n){switch(t){case Ca:return iP(...e.map(o=>vt(o,n)));case eu:return;default:throw new Error(`unrecognized action ${t}`)}}}function Te(e,t=X6){return te(e,Pt(t))}function hn(...e){const t=Je(),n=new Array(e.length);let o=0;const r=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);vt(i,l=>{n[s]=l,o=o|a,o===r&&Ae(t,n)})}),function(i,s){switch(i){case Ca:return o===r&&s(n),vt(t,s);case eu:return y2(t);default:throw new Error(`unrecognized action ${i}`)}}}function mt(e,t=[],{singleton:n}={singleton:!0}){return{id:lP(),constructor:e,dependencies:t,singleton:n}}const lP=()=>Symbol();function cP(e){const t=new Map,n=({id:o,constructor:r,dependencies:i,singleton:s})=>{if(s&&t.has(o))return t.get(o);const a=r(i.map(l=>n(l)));return s&&t.set(o,a),a};return n(e)}function uP(e,t){const n={},o={};let r=0;const i=e.length;for(;r(b[y]=v=>{const w=g[t.methods[y]];Ae(w,v)},b),{})}function u(g){return s.reduce((b,y)=>(b[y]=sP(g[t.events[y]]),b),{})}return{Component:B.forwardRef((g,b)=>{const{children:y,...v}=g,[w]=B.useState(()=>Pg(cP(e),S=>l(S,v))),[_]=B.useState(HS(u,w));return Tp(()=>{for(const S of s)S in v&&vt(_[S],v[S]);return()=>{Object.values(_).map(y2)}},[v,_,w]),Tp(()=>{l(w,v)}),B.useImperativeHandle(b,VS(c(w))),B.createElement(a.Provider,{value:w},n?B.createElement(n,uP([...o,...r,...s],v),y):y)}),usePublisher:g=>B.useCallback(Y6(Ae,B.useContext(a)[g]),[g]),useEmitterValue:g=>{const y=B.useContext(a)[g],[v,w]=B.useState(HS(Qo,y));return Tp(()=>vt(y,_=>{_!==v&&w(VS(_))}),[y,v]),v},useEmitter:(g,b)=>{const v=B.useContext(a)[g];Tp(()=>vt(v,b),[b,v])}}}const dP=typeof document<"u"?B.useLayoutEffect:B.useEffect,fP=dP;var or=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(or||{});const pP={0:"debug",1:"log",2:"warn",3:"error"},hP=()=>typeof globalThis>"u"?window:globalThis,Ea=mt(()=>{const e=ae(3);return{log:ae((n,o,r=1)=>{var i;const s=(i=hP().VIRTUOSO_LOG_LEVEL)!=null?i:Qo(e);r>=s&&console[pP[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:e}},[],{singleton:!0});function v2(e,t=!0){const n=B.useRef(null);let o=r=>{};if(typeof ResizeObserver<"u"){const r=B.useMemo(()=>new ResizeObserver(i=>{const s=i[0].target;s.offsetParent!==null&&e(s)}),[e]);o=i=>{i&&t?(r.observe(i),n.current=i):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Sl(e,t=!0){return v2(e,t).callbackRef}function mP(e,t,n,o,r,i,s){const a=B.useCallback(l=>{const c=gP(l.children,t,"offsetHeight",r);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",m=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,f=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;o({scrollTop:Math.max(m,0),scrollHeight:h,viewportHeight:f}),i?.(yP("row-gap",getComputedStyle(l).rowGap,r)),c!==null&&e(c)},[e,t,r,i,s,o]);return v2(a,n)}function gP(e,t,n,o){const r=e.length;if(r===0)return null;const i=[];for(let s=0;s{const m=d.target,h=m===window||m===document,f=h?window.pageYOffset||document.documentElement.scrollTop:m.scrollTop,g=h?document.documentElement.scrollHeight:m.scrollHeight,b=h?window.innerHeight:m.offsetHeight,y=()=>{e({scrollTop:Math.max(f,0),scrollHeight:g,viewportHeight:b})};d.suppressFlushSync?y():bD.flushSync(y),s.current!==null&&(f===s.current||f<=0||f===g-b)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);B.useEffect(()=>{const d=r||i.current;return o(r||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{o(null),d.removeEventListener("scroll",l)}},[i,l,n,o,r]);function c(d){const m=i.current;if(!m||"offsetHeight"in m&&m.offsetHeight===0)return;const h=d.behavior==="smooth";let f,g,b;m===window?(g=Math.max(va(document.documentElement,"height"),document.documentElement.scrollHeight),f=window.innerHeight,b=document.documentElement.scrollTop):(g=m.scrollHeight,f=va(m,"height"),b=m.scrollTop);const y=g-f;if(d.top=Math.ceil(Math.max(Math.min(y,d.top),0)),Z6(f,g)||d.top===b){e({scrollTop:b,scrollHeight:g,viewportHeight:f}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,m.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const po=mt(()=>{const e=Je(),t=Je(),n=ae(0),o=Je(),r=ae(0),i=Je(),s=Je(),a=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Je(),m=Je(),h=ae(!1);return ye(te(e,ue(({scrollTop:f})=>f)),t),ye(te(e,ue(({scrollHeight:f})=>f)),s),ye(t,r),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:o,scrollTo:d,scrollBy:m,statefulScrollTop:r,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Xd={lvl:0};function Q6(e,t,n,o=Xd,r=Xd){return{k:e,v:t,lvl:n,l:o,r}}function Ct(e){return e===Xd}function gc(){return Xd}function j1(e,t){if(Ct(e))return Xd;const{k:n,l:o,r}=e;if(t===n){if(Ct(o))return r;if(Ct(r))return o;{const[i,s]=e5(o);return yh(on(e,{k:i,v:s,l:t5(o)}))}}else return tt&&(a=a.concat(W1(i,t,n))),o>=t&&o<=n&&a.push({k:o,v:r}),o<=n&&(a=a.concat(W1(s,t,n))),a}function ja(e){return Ct(e)?[]:[...ja(e.l),{k:e.k,v:e.v},...ja(e.r)]}function e5(e){return Ct(e.r)?[e.k,e.v]:e5(e.r)}function t5(e){return Ct(e.r)?e.l:yh(on(e,{r:t5(e.r)}))}function on(e,t){return Q6(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Ay(e){return Ct(e)||e.lvl>e.r.lvl}function WS(e){return q1(o5(e))}function yh(e){const{l:t,r:n,lvl:o}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(Ay(t))return o5(on(e,{lvl:o-1}));if(!Ct(t)&&!Ct(t.r))return on(t.r,{l:on(t,{r:t.r.l}),r:on(e,{l:t.r.r,lvl:o-1}),lvl:o});throw new Error("Unexpected empty nodes")}else{if(Ay(e))return q1(on(e,{lvl:o-1}));if(!Ct(n)&&!Ct(n.l)){const r=n.l,i=Ay(r)?n.lvl-1:n.lvl;return on(r,{l:on(e,{r:r.l,lvl:o-1}),r:q1(on(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Bg(e,t,n){if(Ct(e))return[];const o=oi(e,t)[0];return vP(W1(e,o,n))}function n5(e,t){const n=e.length;if(n===0)return[];let{index:o,value:r}=t(e[0]);const i=[];for(let s=1;s({index:t,value:n}))}function q1(e){const{r:t,lvl:n}=e;return!Ct(t)&&!Ct(t.r)&&t.lvl===n&&t.r.lvl===n?on(t,{l:on(e,{r:t.l}),lvl:n+1}):e}function o5(e){const{l:t}=e;return!Ct(t)&&t.lvl===e.lvl?on(t,{r:on(e,{l:t.r})}):e}function xm(e,t,n,o=0){let r=e.length-1;for(;o<=r;){const i=Math.floor((o+r)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function r5(e,t,n){return e[xm(e,t,n)]}function bP(e,t,n,o){const r=xm(e,t,o),i=xm(e,n,o,r);return e.slice(r,i+1)}const b2=mt(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function wP(e){const{size:t,startIndex:n,endIndex:o}=e;return r=>r.start===n&&(r.end===o||r.end===1/0)&&r.value===t}function qS(e,t){let n=0,o=0;for(;n=u||r===m)&&(e=j1(e,u)):(c=m!==r,l=!0),d>s&&s>=u&&m!==r&&(e=Zo(e,s+1,m));c&&(e=Zo(e,i,r))}return[e,n]}function xP(){return{offsetTree:[],sizeTree:gc(),groupOffsetTree:gc(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function w2({index:e},t){return t===e?0:t0&&(t=Math.max(t,r5(e,o,w2).offset)),n5(bP(e,t,n,SP),TP)}function G1(e,t,n,o){let r=e,i=0,s=0,a=0,l=0;if(t!==0){l=xm(r,t-1,w2),a=r[l].offset;const u=oi(n,t-1);i=u[0],s=u[1],r.length&&r[l].size===oi(n,t)[1]&&(l-=1),r=r.slice(0,l+1)}else r=[];for(const{start:c,value:u}of Bg(n,t,1/0)){const d=c-i,m=d*s+a+d*o;r.push({offset:m,size:u,index:c}),i=c,a=m,s=u}return{offsetTree:r,lastIndex:i,lastOffset:a,lastSize:s}}function EP(e,[t,n,o,r]){t.length>0&&o("received item sizes",t,or.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Ct(i)&&t.length===2){const m=t[0].size,h=t[1].size;s=n.reduce((f,g)=>Zo(Zo(f,g,m),g+1,h),s)}else[s,a]=_P(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=G1(e.offsetTree,a,s,r);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((m,h)=>Zo(m,h,Zd(h,l,r)),gc()),groupIndices:n}}function Zd(e,t,n){if(t.length===0)return 0;const{offset:o,index:r,size:i}=r5(t,e,w2),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function kP(e){return typeof e.groupIndex<"u"}function i5(e,t,n){if(kP(e))return t.groupIndices[e.groupIndex]+1;{const o=e.index==="LAST"?n:e.index;let r=s5(o,t);return r=Math.max(0,r,Math.min(n,r)),r}}function s5(e,t){if(!$g(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function $g(e){return!Ct(e.groupOffsetTree)}function LP(e){return ja(e).map(({k:t,v:n},o,r)=>{const i=r[o+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const IP={offsetHeight:"height",offsetWidth:"width"},Mi=mt(([{log:e},{recalcInProgress:t}])=>{const n=Je(),o=Je(),r=so(o,0),i=Je(),s=Je(),a=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((S,x)=>va(S,IP[x])),m=ae(void 0),h=ae(0),f=xP(),g=so(te(n,He(l,e,h),wi(EP,f),Pt()),f),b=so(te(l,Pt(),wi((S,x)=>({prev:S.current,current:x}),{prev:[],current:[]}),ue(({prev:S})=>S)),[]);ye(te(l,Ce(S=>S.length>0),He(g,h),ue(([S,x,T])=>{const C=S.reduce((R,I,O)=>Zo(R,I,Zd(I,x.offsetTree,T)||O),gc());return{...x,groupIndices:S,groupOffsetTree:C}})),g),ye(te(o,He(g),Ce(([S,{lastIndex:x}])=>S[{startIndex:S,endIndex:x,size:T}])),n),ye(c,u);const y=so(te(c,ue(S=>S===void 0)),!0);ye(te(u,Ce(S=>S!==void 0&&Ct(Qo(g).sizeTree)),ue(S=>[{startIndex:0,endIndex:0,size:S}])),n);const v=nr(te(n,He(g),wi(({sizes:S},[x,T])=>({changed:T!==S,sizes:T}),{changed:!1,sizes:f}),ue(S=>S.changed)));vt(te(a,wi((S,x)=>({diff:S.prev-x,prev:x}),{diff:0,prev:0}),ue(S=>S.diff)),S=>{const{groupIndices:x}=Qo(g);if(S>0)Ae(t,!0),Ae(i,S+qS(S,x));else if(S<0){const T=Qo(b);T.length>0&&(S-=qS(-S,T)),Ae(s,S)}}),vt(te(a,He(e)),([S,x])=>{S<0&&x("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},or.ERROR)});const w=nr(i);ye(te(i,He(g),ue(([S,x])=>{const T=x.groupIndices.length>0,C=[],R=x.lastSize;if(T){const I=Jd(x.sizeTree,0);let O=0,N=0;for(;O{let A=M.ranges;return M.prevSize!==0&&(A=[...M.ranges,{startIndex:M.prevIndex,endIndex:D+S-1,size:M.prevSize}]),{ranges:A,prevIndex:D+S,prevSize:$}},{ranges:C,prevIndex:S,prevSize:0}).ranges}return ja(x.sizeTree).reduce((I,{k:O,v:N})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:O+S-1,size:I.prevSize}],prevIndex:O+S,prevSize:N}),{ranges:[],prevIndex:0,prevSize:R}).ranges})),n);const _=nr(te(s,He(g,h),ue(([S,{offsetTree:x},T])=>{const C=-S;return Zd(C,x,T)})));return ye(te(s,He(g,h),ue(([S,x,T])=>{if(x.groupIndices.length>0){if(Ct(x.sizeTree))return x;let R=gc();const I=Qo(b);let O=0,N=0,z=0;for(;O<-S;){z=I[N];const M=I[N+1]-z-1;N++,O+=M+1}if(R=ja(x.sizeTree).reduce((M,{k:D,v:$})=>Zo(M,Math.max(0,D+S),$),R),O!==-S){const M=Jd(x.sizeTree,z);R=Zo(R,0,M);const D=oi(x.sizeTree,-S+1)[1];R=Zo(R,1,D)}return{...x,sizeTree:R,...G1(x.offsetTree,0,R,T)}}else{const R=ja(x.sizeTree).reduce((I,{k:O,v:N})=>Zo(I,Math.max(0,O+S),N),gc());return{...x,sizeTree:R,...G1(x.offsetTree,0,R,T)}}})),g),{data:m,totalCount:o,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:_,beforeUnshiftWith:w,firstItemIndex:a,gap:h,sizes:g,listRefresh:v,statefulTotalCount:r,trackItemSizes:y,itemSize:d}},Bt(Ea,b2),{singleton:!0}),RP=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function a5(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!RP)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Mf=mt(([{sizes:e,totalCount:t,listRefresh:n,gap:o},{scrollingInProgress:r,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:m}])=>{const h=Je(),f=ae(0);let g=null,b=null,y=null;function v(){g&&(g(),g=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Ae(r,!1)}return ye(te(h,He(e,i,t,f,l,c,m),He(o,u,d),ue(([[w,_,S,x,T,C,R,I],O,N,z])=>{const k=a5(w),{align:M,behavior:D,offset:$}=k,A=x-1,L=i5(k,_,A);let P=Zd(L,_.offsetTree,O)+C;M==="end"?(P+=N+oi(_.sizeTree,L)[1]-S+z,L===A&&(P+=R)):M==="center"?P+=(N+oi(_.sizeTree,L)[1]-S+z)/2:P-=T,$&&(P+=$);const F=H=>{v(),H?(I("retrying to scroll to",{location:w},or.DEBUG),Ae(h,w)):I("list did not change, scroll successful",{},or.DEBUG)};if(v(),D==="smooth"){let H=!1;y=vt(n,U=>{H=H||U}),g=ds(a,()=>{F(H)})}else g=ds(te(n,NP(150)),F);return b=setTimeout(()=>{v()},1200),Ae(r,!0),I("scrolling from index to",{index:L,top:P,behavior:D},or.DEBUG),{top:P,behavior:D}})),s),{scrollToIndex:h,topListHeight:f}},Bt(Mi,po,Ea),{singleton:!0});function NP(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return o=>{o&&(t(!0),clearTimeout(n))}}}const Kd="up",gd="down",OP="none",AP={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},MP=0,Df=mt(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:o,footerHeight:r,scrollBy:i}])=>{const s=ae(!1),a=ae(!0),l=Je(),c=Je(),u=ae(4),d=ae(MP),m=so(te(jS(te(Te(t),Pc(1),Gi(!0)),te(Te(t),Pc(1),Gi(!1),US(100))),Pt()),!1),h=so(te(jS(te(i,Gi(!0)),te(i,Gi(!1),US(200))),Pt()),!1);ye(te(hn(Te(t),Te(d)),ue(([v,w])=>v<=w),Pt()),a),ye(te(a,ta(50)),c);const f=nr(te(hn(e,Te(n),Te(o),Te(r),Te(u)),wi((v,[{scrollTop:w,scrollHeight:_},S,x,T,C])=>{const R=w+S-_>-C,I={viewportHeight:S,scrollTop:w,scrollHeight:_};if(R){let N,z;return w>v.state.scrollTop?(N="SCROLLED_DOWN",z=v.state.scrollTop-w):(N="SIZE_DECREASED",z=v.state.scrollTop-w||v.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:N,scrollTopDelta:z}}let O;return I.scrollHeight>v.state.scrollHeight?O="SIZE_INCREASED":Sv&&v.atBottom===w.atBottom))),g=so(te(e,wi((v,{scrollTop:w,scrollHeight:_,viewportHeight:S})=>{if(Z6(v.scrollHeight,_))return{scrollTop:w,scrollHeight:_,jump:0,changed:!1};{const x=_-(w+S)<1;return v.scrollTop!==w&&x?{scrollHeight:_,scrollTop:w,jump:v.scrollTop-w,changed:!0}:{scrollHeight:_,scrollTop:w,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Ce(v=>v.changed),ue(v=>v.jump)),0);ye(te(f,ue(v=>v.atBottom)),s),ye(te(s,ta(50)),l);const b=ae(gd);ye(te(e,ue(({scrollTop:v})=>v),Pt(),wi((v,w)=>Qo(h)?{direction:v.direction,prevScrollTop:w}:{direction:wv.direction)),b),ye(te(e,ta(50),Gi(OP)),b);const y=ae(0);return ye(te(m,Ce(v=>!v),Gi(0)),y),ye(te(t,ta(100),He(m),Ce(([v,w])=>!!w),wi(([v,w],[_])=>[w,_],[0,0]),ue(([v,w])=>w-v)),y),{isScrolling:m,isAtTop:a,isAtBottom:s,atBottomState:f,atTopStateChange:c,atBottomStateChange:l,scrollDirection:b,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:y,lastJumpDueToItemResize:g}},Bt(po)),ka=mt(([{log:e}])=>{const t=ae(!1),n=nr(te(t,Ce(o=>o),Pt()));return vt(t,o=>{o&&Qo(e)("props updated",{},or.DEBUG)}),{propsReady:t,didMount:n}},Bt(Ea),{singleton:!0});function _2(e,t){e==0?t():requestAnimationFrame(()=>_2(e-1,t))}function x2(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const zf=mt(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:o},{scrollToIndex:r},{didMount:i}])=>{const s=ae(!0),a=ae(0),l=ae(!1);return ye(te(i,He(a),Ce(([c,u])=>!!u),Gi(!1)),s),vt(te(hn(t,i),He(s,e,n,l),Ce(([[,c],u,{sizeTree:d},m,h])=>c&&(!Ct(d)||g2(m))&&!u&&!h),He(a)),([,c])=>{Ae(l,!0),_2(3,()=>{ds(o,()=>Ae(s,!0)),Ae(r,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:a}},Bt(Mi,po,Mf,ka),{singleton:!0});function GS(e){return e?e==="smooth"?"smooth":"auto":!1}const DP=(e,t)=>typeof e=="function"?GS(e(t)):t&&GS(e),zP=mt(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:o},{scrollToIndex:r},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=Je();let m=null;function h(g){Ae(r,{index:"LAST",align:"end",behavior:g})}vt(te(hn(te(Te(e),Pc(1)),a),He(Te(u),n,i,c),ue(([[g,b],y,v,w,_])=>{let S=b&&w,x="auto";return S&&(x=DP(y,v||_),S=S&&!!x),{totalCount:g,shouldFollow:S,followOutputBehavior:x}}),Ce(({shouldFollow:g})=>g)),({totalCount:g,followOutputBehavior:b})=>{m&&(m(),m=null),m=ds(t,()=>{Qo(l)("following output to ",{totalCount:g},or.DEBUG),h(b),m=null})});function f(g){const b=ds(o,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Qo(l)("scrolling to bottom due to increased size",{},or.DEBUG),h("auto"))});setTimeout(b,100)}return vt(te(hn(Te(u),e,s),Ce(([g,,b])=>g&&b),wi(({value:g},[,b])=>({refreshed:g===b,value:b}),{refreshed:!1,value:0}),Ce(({refreshed:g})=>g),He(u,e)),([,g])=>{f(g!==!1)}),vt(d,()=>{f(Qo(u)!==!1)}),vt(hn(Te(u),o),([g,b])=>{g&&!b.atBottom&&b.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Bt(Mi,Df,Mf,zf,ka,Ea,po));function PP(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const l5=mt(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:o,headerHeight:r}])=>{const i=Je(),s=Je(),a=nr(te(i,ue(PP)));return ye(te(a,ue(l=>l.totalCount)),e),ye(te(a,ue(l=>l.groupIndices)),t),ye(te(hn(o,n,r),Ce(([l,c])=>$g(c)),ue(([l,c,u])=>oi(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Pt(),ue(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Bt(Mi,po));function Qd(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function c5(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Sm="top",Tm="bottom",YS="none";function XS(e,t,n){return typeof e=="number"?n===Kd&&t===Sm||n===gd&&t===Tm?e:0:n===Kd?t===Sm?e.main:e.reverse:t===Tm?e.main:e.reverse}function JS(e,t){return typeof e=="number"?e:e[t]||0}const S2=mt(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:o,fixedHeaderHeight:r}])=>{const i=Je(),s=ae(0),a=ae(0),l=ae(0),c=so(te(hn(Te(e),Te(t),Te(o),Te(i,Qd),Te(l),Te(s),Te(r),Te(n),Te(a)),ue(([u,d,m,[h,f],g,b,y,v,w])=>{const _=u-v,S=b+y,x=Math.max(m-_,0);let T=YS;const C=JS(w,Sm),R=JS(w,Tm);return h-=v,h+=m+y,f+=m+y,f-=v,h>u+S-C&&(T=Kd),fu!=null),Pt(Qd)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Bt(po),{singleton:!0});function BP(e,t,n){if($g(t)){const o=s5(e,t);return[{index:oi(t.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const My={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function ZS(e,t,n){if(e.length===0)return[];if(!$g(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const o=e[0].index,r=e[e.length-1].index,i=[],s=Bg(t.groupOffsetTree,o,r);let a,l=0;for(const c of e){(!a||a.end0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-l,m=a+d*s+(d-1)*o,h=c,f=m-u;return{items:ZS(e,r,i),topItems:ZS(t,r,i),topListHeight:t.reduce((g,b)=>b.size+g,0),offsetTop:c,offsetBottom:f,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function u5(e,t,n,o,r,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=x2(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return vh(c,[],a,r,n,o)}const Tl=mt(([{sizes:e,totalCount:t,data:n,firstItemIndex:o,gap:r},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},m,{didMount:h},{recalcInProgress:f}])=>{const g=ae([]),b=ae(0),y=Je();ye(i.topItemsIndexes,g);const v=so(te(hn(h,f,Te(s,Qd),Te(t),Te(e),Te(u),c,Te(g),Te(o),Te(r),n),Ce(([x,T,,C,,,,,,,R])=>{const I=R&&R.length!==C;return x&&!T&&!I}),ue(([,,[x,T],C,R,I,O,N,z,k,M])=>{const D=R,{sizeTree:$,offsetTree:A}=D,L=Qo(b);if(C===0)return{...My,totalCount:C};if(x===0&&T===0)return L===0?{...My,totalCount:C}:u5(L,I,R,z,k,M||[]);if(Ct($))return L>0?null:vh(BP(x2(I,C),D,M),[],C,k,D,z);const P=[];if(N.length>0){const q=N[0],V=N[N.length-1];let W=0;for(const X of Bg($,q,V)){const J=X.value,Y=Math.max(X.start,q),Q=Math.min(X.end,V);for(let G=Y;G<=Q;G++)P.push({index:G,size:J,offset:W,data:M&&M[G]}),W+=J}}if(!O)return vh([],P,C,k,D,z);const F=N.length>0?N[N.length-1]+1:0,H=CP(A,x,T,F);if(H.length===0)return null;const U=C-1,j=Pg([],q=>{for(const V of H){const W=V.value;let X=W.offset,J=V.start;const Y=W.size;if(W.offset=T);G++)q.push({index:G,size:Y,offset:X,data:M&&M[G]}),X+=Y+k}});return vh(j,P,C,k,D,z)}),Ce(x=>x!==null),Pt()),My);ye(te(n,Ce(g2),ue(x=>x?.length)),t),ye(te(v,ue(x=>x.topListHeight)),d),ye(d,l),ye(te(v,ue(x=>[x.top,x.bottom])),a),ye(te(v,ue(x=>x.items)),y);const w=nr(te(v,Ce(({items:x})=>x.length>0),He(t,n),Ce(([{items:x},T])=>x[x.length-1].originalIndex===T-1),ue(([,x,T])=>[x-1,T]),Pt(Qd),ue(([x])=>x))),_=nr(te(v,ta(200),Ce(({items:x,topItems:T})=>x.length>0&&x[0].originalIndex===T.length),ue(({items:x})=>x[0].index),Pt())),S=nr(te(v,Ce(({items:x})=>x.length>0),ue(({items:x})=>{let T=0,C=x.length-1;for(;x[T].type==="group"&&TT;)C--;return{startIndex:x[T].index,endIndex:x[C].index}}),Pt(c5)));return{listState:v,topItemsIndexes:g,endReached:w,startReached:_,rangeChanged:S,itemsRendered:y,initialItemCount:b,...m}},Bt(Mi,l5,S2,zf,Mf,Df,ka,b2),{singleton:!0}),$P=mt(([{sizes:e,firstItemIndex:t,data:n,gap:o},{initialTopMostItemIndex:r},{initialItemCount:i,listState:s},{didMount:a}])=>(ye(te(a,He(i),Ce(([,l])=>l!==0),He(r,e,t,o,n),ue(([[,l],c,u,d,m,h=[]])=>u5(l,c,u,d,m,h))),s),{}),Bt(Mi,zf,Tl,ka),{singleton:!0}),d5=mt(([{scrollVelocity:e}])=>{const t=ae(!1),n=Je(),o=ae(!1);return ye(te(e,He(o,t,n),Ce(([r,i])=>!!i),ue(([r,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(r,a))return!1}else if(c(r,a))return!0;return s}),Pt()),t),vt(te(hn(t,e,n),He(o)),([[r,i,s],a])=>r&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:o,scrollVelocity:e,scrollSeekRangeChanged:n}},Bt(Df),{singleton:!0}),FP=mt(([{topItemsIndexes:e}])=>{const t=ae(0);return ye(te(t,Ce(n=>n>0),ue(n=>Array.from({length:n}).map((o,r)=>r))),e),{topItemCount:t}},Bt(Tl)),f5=mt(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:o},{listState:r}])=>{const i=Je(),s=so(te(hn(e,o,t,n,r),ue(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ye(Te(s),i),{totalListHeight:s,totalListHeightChanged:i}},Bt(po,Tl),{singleton:!0});function p5(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const HP=p5(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),VP=mt(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:o},{isScrolling:r,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:m},{log:h},{recalcInProgress:f}])=>{const g=nr(te(l,He(a),wi(([,y,v,w],[{items:_,totalCount:S,bottom:x,offsetBottom:T},C])=>{const R=x+T;let I=0;return v===S&&y.length>0&&_.length>0&&(_[0].originalIndex===0&&y[0].originalIndex===0||(I=R-w,I!==0&&(I+=C))),[I,_,S,R]},[0,[],0,0]),Ce(([y])=>y!==0),He(t,s,o,i,h,f),Ce(([,y,v,w,,,_])=>!_&&!w&&y!==0&&v===Kd),ue(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},or.DEBUG),y))));function b(y){y>0?(Ae(e,{top:-y,behavior:"auto"}),Ae(n,0)):(Ae(n,0),Ae(e,{top:-y,behavior:"auto"}))}return vt(te(g,He(n,r)),([y,v,w])=>{w&&HP()?Ae(n,v-y):b(-y)}),vt(te(hn(so(r,!1),n,f),Ce(([y,v,w])=>!y&&!w&&v!==0),ue(([y,v])=>v),ta(1)),b),ye(te(u,ue(y=>({top:-y}))),e),vt(te(c,He(d,m),ue(([y,{lastSize:v,groupIndices:w,sizeTree:_},S])=>{function x(T){return T*(v+S)}if(w.length===0)return x(y);{let T=0;const C=Jd(_,0);let R=0,I=0;for(;Ry&&(T-=C,O=y-R+1),R+=O,T+=x(O),I++}return T}})),y=>{Ae(n,y),requestAnimationFrame(()=>{Ae(e,{top:y}),requestAnimationFrame(()=>{Ae(n,0),Ae(f,!1)})})}),{deviation:n}},Bt(po,Df,Tl,Mi,Ea,b2)),UP=mt(([{didMount:e},{scrollTo:t},{listState:n}])=>{const o=ae(0);return vt(te(e,He(o),Ce(([,r])=>r!==0),ue(([,r])=>({top:r}))),r=>{ds(te(n,Pc(1),Ce(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ae(t,r)})})}),{initialScrollTop:o}},Bt(ka,po,Tl),{singleton:!0}),jP=mt(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),o=so(te(hn(n,e,t),Ce(([r])=>r),ue(([,r,i])=>Math.max(0,r-i)),ta(0),Pt()),0);return{alignToBottom:n,paddingTopAddition:o}},Bt(po,f5),{singleton:!0}),T2=mt(([{scrollTo:e,scrollContainerState:t}])=>{const n=Je(),o=Je(),r=Je(),i=ae(!1),s=ae(void 0);return ye(te(hn(n,o),ue(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ye(te(e,He(o),ue(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),r),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:o,windowScrollTo:r}},Bt(po)),WP=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:o,locationParams:{behavior:r,align:i,...s}})=>eo?{...s,behavior:r,align:i??"end"}:null,qP=mt(([{sizes:e,totalCount:t,gap:n},{scrollTop:o,viewportHeight:r,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Je();return ye(te(u,He(e,r,t,i,s,a,o),He(n),ue(([[d,m,h,f,g,b,y,v],w])=>{const{done:_,behavior:S,align:x,calculateViewLocation:T=WP,...C}=d,R=i5(d,m,f-1),I=Zd(R,m.offsetTree,w)+g+b,O=I+oi(m.sizeTree,R)[1],N=v+b,z=v+h-y,k=T({itemTop:I,itemBottom:O,viewportTop:N,viewportBottom:z,locationParams:{behavior:S,align:x,...C}});return k?_&&ds(te(l,Ce(M=>M===!1),Pc(Qo(l)?1:2)),_):_&&_(),k}),Ce(d=>d!==null)),c),{scrollIntoView:u}},Bt(Mi,po,Mf,Tl,Ea),{singleton:!0}),GP=mt(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:o},{didMount:r},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Je(),c=ae(void 0),u=ae(null),d=ae(null);return ye(s,u),ye(a,d),vt(te(l,He(e,n,i,u,d)),([m,h,f,g,b,y])=>{const v=LP(h.sizeTree);g&&b!==null&&y!==null&&(f=b.scrollTop-y.offsetTop),m({ranges:v,scrollTop:f})}),ye(te(c,Ce(g2),ue(YP)),o),ye(te(r,He(c),Ce(([,m])=>m!==void 0),Pt(),ue(([,m])=>m.ranges)),t),{getState:l,restoreStateFrom:c}},Bt(Mi,po,zf,ka,T2));function YP(e){return{offset:e.scrollTop,index:0,align:"start"}}const XP=mt(([e,t,n,o,r,i,s,a,l,c])=>({...e,...t,...n,...o,...r,...i,...s,...a,...l,...c}),Bt(S2,$P,ka,d5,f5,UP,jP,T2,qP,Ea)),JP=mt(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:o,trackItemSizes:r,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:m,scrolledToInitialItem:h},f,g,b,{listState:y,topItemsIndexes:v,...w},{scrollToIndex:_},S,{topItemCount:x},{groupCounts:T},C])=>(ye(w.rangeChanged,C.scrollSeekRangeChanged),ye(te(C.windowViewportRect,ue(R=>R.visibleHeight)),f.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:m,scrolledToInitialItem:h,topItemsIndexes:v,topItemCount:x,groupCounts:T,fixedItemHeight:n,defaultItemHeight:o,gap:u,...b,statefulTotalCount:c,listState:y,scrollToIndex:_,trackItemSizes:r,itemSize:i,groupIndices:l,...w,...C,...f,sizes:d,...g}),Bt(Mi,zf,po,GP,zP,Tl,Mf,VP,FP,l5,XP)),Dy="-webkit-sticky",KS="sticky",h5=p5(()=>{if(typeof document>"u")return KS;const e=document.createElement("div");return e.style.position=Dy,e.style.position===Dy?Dy:KS});function m5(e,t){const n=B.useRef(null),o=B.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const m=t.getBoundingClientRect(),h=l.top-m.top;u=m.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:r,ref:i}=v2(o),s=B.useCallback(()=>{o(i.current)},[o,i]);return B.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(s);return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),r}const g5=B.createContext(void 0),y5=B.createContext(void 0);function v5(e){return e}const ZP=mt(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),o=ae({}),r=ae(v5),i=ae("div"),s=ae(tu),a=(l,c=null)=>so(te(o,ue(u=>u[l]),Pt()),c);return{context:t,itemContent:e,groupContent:n,components:o,computeItemKey:r,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),KP=mt(([e,t])=>({...e,...t}),Bt(JP,ZP)),QP=({height:e})=>B.createElement("div",{style:{height:e}}),e9={position:h5(),zIndex:1,overflowAnchor:"none"},t9={overflowAnchor:"none"},QS=B.memo(function({showTopList:t=!1}){const n=Ge("listState"),o=Cr("sizeRanges"),r=Ge("useWindowScroll"),i=Ge("customScrollParent"),s=Cr("windowScrollContainerState"),a=Cr("scrollContainerState"),l=i||r?s:a,c=Ge("itemContent"),u=Ge("context"),d=Ge("groupContent"),m=Ge("trackItemSizes"),h=Ge("itemSize"),f=Ge("log"),g=Cr("gap"),{callbackRef:b}=mP(o,h,m,t?tu:l,f,g,i),[y,v]=B.useState(0);C2("deviation",k=>{y!==k&&v(k)});const w=Ge("EmptyPlaceholder"),_=Ge("ScrollSeekPlaceholder")||QP,S=Ge("ListComponent"),x=Ge("ItemComponent"),T=Ge("GroupComponent"),C=Ge("computeItemKey"),R=Ge("isSeeking"),I=Ge("groupIndices").length>0,O=Ge("paddingTopAddition"),N=Ge("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+O,paddingBottom:n.offsetBottom,marginTop:y,...N?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&w?B.createElement(w,Lo(w,u)):B.createElement(S,{...Lo(S,u),ref:b,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const M=k.originalIndex,D=C(M+n.firstItemIndex,k.data,u);return R?B.createElement(_,{...Lo(_,u),key:D,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?B.createElement(T,{...Lo(T,u),key:D,"data-index":M,"data-known-size":k.size,"data-item-index":k.index,style:e9},d(k.index,u)):B.createElement(x,{...Lo(x,u),...r9(x,k.data),key:D,"data-index":M,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:t9},I?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),n9={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Fg={width:"100%",height:"100%",position:"absolute",top:0},o9={width:"100%",position:h5(),top:0,zIndex:1};function Lo(e,t){if(typeof e!="string")return{context:t}}function r9(e,t){return{item:typeof e=="string"?void 0:t}}const i9=B.memo(function(){const t=Ge("HeaderComponent"),n=Cr("headerHeight"),o=Ge("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ge("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null}),s9=B.memo(function(){const t=Ge("FooterComponent"),n=Cr("footerHeight"),o=Ge("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ge("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null});function b5({usePublisher:e,useEmitter:t,useEmitterValue:n}){return B.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),m=n("context"),{scrollerRef:h,scrollByCallback:f,scrollToCallback:g}=K6(l,u,c,d);return t("scrollTo",g),t("scrollBy",f),B.createElement(c,{ref:h,style:{...n9,...i},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Lo(c,m)},s)})}function w5({usePublisher:e,useEmitter:t,useEmitterValue:n}){return B.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),m=n("deviation"),h=n("customScrollParent"),f=n("context"),{scrollerRef:g,scrollByCallback:b,scrollToCallback:y}=K6(l,u,c,tu,h);return fP(()=>(g.current=h||window,()=>{g.current=null}),[g,h]),t("windowScrollTo",y),t("scrollBy",b),B.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+m}:{}},"data-virtuoso-scroller":!0,...a,...Lo(c,f)},s)})}const a9=({children:e})=>{const t=B.useContext(g5),n=Cr("viewportHeight"),o=Cr("fixedItemHeight"),r=Sl(G6(n,i=>va(i,"height")));return B.useEffect(()=>{t&&(n(t.viewportHeight),o(t.itemHeight))},[t,n,o]),B.createElement("div",{style:Fg,ref:r,"data-viewport-type":"element"},e)},l9=({children:e})=>{const t=B.useContext(g5),n=Cr("windowViewportRect"),o=Cr("fixedItemHeight"),r=Ge("customScrollParent"),i=m5(n,r);return B.useEffect(()=>{t&&(o(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,o]),B.createElement("div",{ref:i,style:Fg,"data-viewport-type":"window"},e)},c9=({children:e})=>{const t=Ge("TopItemListComponent"),n=Ge("headerHeight"),o={...o9,marginTop:`${n}px`},r=Ge("context");return B.createElement(t||"div",{style:o,context:r},e)},u9=B.memo(function(t){const n=Ge("useWindowScroll"),o=Ge("topItemsIndexes").length>0,r=Ge("customScrollParent"),i=r||n?p9:f9,s=r||n?l9:a9;return B.createElement(i,{...t},o&&B.createElement(c9,null,B.createElement(QS,{showTopList:!0})),B.createElement(s,null,B.createElement(i9,null),B.createElement(QS,null),B.createElement(s9,null)))}),{Component:d9,usePublisher:Cr,useEmitterValue:Ge,useEmitter:C2}=J6(KP,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},u9),f9=b5({usePublisher:Cr,useEmitterValue:Ge,useEmitter:C2}),p9=w5({usePublisher:Cr,useEmitterValue:Ge,useEmitter:C2}),h9=d9,e3={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},m9={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:t3,ceil:n3,floor:Cm,min:zy,max:yd}=Math;function g9(e){return{...m9,items:e}}function o3(e,t,n){return Array.from({length:t-e+1}).map((o,r)=>{const i=n===null?null:n[r+e];return{index:r+e,data:i}})}function y9(e,t){return e&&e.column===t.column&&e.row===t.row}function Cp(e,t){return e&&e.width===t.width&&e.height===t.height}const v9=mt(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:o,viewportHeight:r,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,m,{propsReady:h,didMount:f},{windowViewportRect:g,useWindowScroll:b,customScrollParent:y,windowScrollContainerState:v,windowScrollTo:w},_])=>{const S=ae(0),x=ae(0),T=ae(e3),C=ae({height:0,width:0}),R=ae({height:0,width:0}),I=Je(),O=Je(),N=ae(0),z=ae(null),k=ae({row:0,column:0}),M=Je(),D=Je(),$=ae(!1),A=ae(0),L=ae(!0),P=ae(!1);vt(te(f,He(A),Ce(([V,W])=>!!W)),()=>{Ae(L,!1),Ae(x,0)}),vt(te(hn(f,L,R,C,A,P),Ce(([V,W,X,J,,Y])=>V&&!W&&X.height!==0&&J.height!==0&&!Y)),([,,,,V])=>{Ae(P,!0),_2(1,()=>{Ae(I,V)}),ds(te(o),()=>{Ae(n,[0,0]),Ae(L,!0)})}),ye(te(D,Ce(V=>V!=null&&V.scrollTop>0),Gi(0)),x),vt(te(f,He(D),Ce(([,V])=>V!=null)),([,V])=>{V&&(Ae(C,V.viewport),Ae(R,V?.item),Ae(k,V.gap),V.scrollTop>0&&(Ae($,!0),ds(te(o,Pc(1)),W=>{Ae($,!1)}),Ae(s,{top:V.scrollTop})))}),ye(te(C,ue(({height:V})=>V)),r),ye(te(hn(Te(C,Cp),Te(R,Cp),Te(k,(V,W)=>V&&V.column===W.column&&V.row===W.row),Te(o)),ue(([V,W,X,J])=>({viewport:V,item:W,gap:X,scrollTop:J}))),M),ye(te(hn(Te(S),t,Te(k,y9),Te(R,Cp),Te(C,Cp),Te(z),Te(x),Te($),Te(L),Te(A)),Ce(([,,,,,,,V])=>!V),ue(([V,[W,X],J,Y,Q,G,Z,,K,ee])=>{const{row:se,column:he}=J,{height:re,width:De}=Y,{width:$e}=Q;if(Z===0&&(V===0||$e===0))return e3;if(De===0){const st=x2(ee,V),Ve=st===0?Math.max(Z-1,0):st;return g9(o3(st,Ve,G))}const ze=_5($e,De,he);let Xe,Re;K?W===0&&X===0&&Z>0?(Xe=0,Re=Z-1):(Xe=ze*Cm((W+se)/(re+se)),Re=ze*n3((X+se)/(re+se))-1,Re=zy(V-1,yd(Re,ze-1)),Xe=zy(Re,yd(0,Xe))):(Xe=0,Re=-1);const je=o3(Xe,Re,G),{top:it,bottom:xe}=r3(Q,J,Y,je),wt=n3(V/ze),Nt=wt*re+(wt-1)*se-xe;return{items:je,offsetTop:it,offsetBottom:Nt,top:it,bottom:xe,itemHeight:re,itemWidth:De}})),T),ye(te(z,Ce(V=>V!==null),ue(V=>V.length)),S),ye(te(hn(C,R,T,k),Ce(([V,W,{items:X}])=>X.length>0&&W.height!==0&&V.height!==0),ue(([V,W,{items:X},J])=>{const{top:Y,bottom:Q}=r3(V,J,W,X);return[Y,Q]}),Pt(Qd)),n);const F=ae(!1);ye(te(o,He(F),ue(([V,W])=>W||V!==0)),F);const H=nr(te(Te(T),Ce(({items:V})=>V.length>0),He(S,F),Ce(([{items:V},W,X])=>X&&V[V.length-1].index===W-1),ue(([,V])=>V-1),Pt())),U=nr(te(Te(T),Ce(({items:V})=>V.length>0&&V[0].index===0),Gi(0),Pt())),j=nr(te(Te(T),He($),Ce(([{items:V},W])=>V.length>0&&!W),ue(([{items:V}])=>({startIndex:V[0].index,endIndex:V[V.length-1].index})),Pt(c5),ta(0)));ye(j,m.scrollSeekRangeChanged),ye(te(I,He(C,R,S,k),ue(([V,W,X,J,Y])=>{const Q=a5(V),{align:G,behavior:Z,offset:K}=Q;let ee=Q.index;ee==="LAST"&&(ee=J-1),ee=yd(0,ee,zy(J-1,ee));let se=Y1(W,Y,X,ee);return G==="end"?se=t3(se-W.height+X.height):G==="center"&&(se=t3(se-W.height/2+X.height/2)),K&&(se+=K),{top:se,behavior:Z}})),s);const q=so(te(T,ue(V=>V.offsetBottom+V.bottom)),0);return ye(te(g,ue(V=>({width:V.visibleWidth,height:V.visibleHeight}))),C),{data:z,totalCount:S,viewportDimensions:C,itemDimensions:R,scrollTop:o,scrollHeight:O,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:g,windowScrollTo:w,useWindowScroll:b,customScrollParent:y,windowScrollContainerState:v,deviation:N,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:x,gap:k,restoreStateFrom:D,...m,initialTopMostItemIndex:A,gridState:T,totalListHeight:q,...d,startReached:U,endReached:H,rangeChanged:j,stateChanged:M,propsReady:h,stateRestoreInProgress:$,..._}},Bt(S2,po,Df,d5,ka,T2,Ea));function r3(e,t,n,o){const{height:r}=n;if(r===void 0||o.length===0)return{top:0,bottom:0};const i=Y1(e,t,n,o[0].index),s=Y1(e,t,n,o[o.length-1].index)+r;return{top:i,bottom:s}}function Y1(e,t,n,o){const r=_5(e.width,n.width,t.column),i=Cm(o/r),s=i*n.height+yd(0,i-1)*t.row;return s>0?s+t.row:s}function _5(e,t,n){return yd(1,Cm((e+n)/(Cm(t)+n)))}const b9=mt(()=>{const e=ae(c=>`Item ${c}`),t=ae({}),n=ae(null),o=ae("virtuoso-grid-item"),r=ae("virtuoso-grid-list"),i=ae(v5),s=ae("div"),a=ae(tu),l=(c,u=null)=>so(te(t,ue(d=>d[c]),Pt()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:o,listClassName:r,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),w9=mt(([e,t])=>({...e,...t}),Bt(v9,b9)),_9=B.memo(function(){const t=Ft("gridState"),n=Ft("listClassName"),o=Ft("itemClassName"),r=Ft("itemContent"),i=Ft("computeItemKey"),s=Ft("isSeeking"),a=ei("scrollHeight"),l=Ft("ItemComponent"),c=Ft("ListComponent"),u=Ft("ScrollSeekPlaceholder"),d=Ft("context"),m=ei("itemDimensions"),h=ei("gap"),f=Ft("log"),g=Ft("stateRestoreInProgress"),b=Sl(y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const w=y.firstChild;if(w){const{width:_,height:S}=w.getBoundingClientRect();m({width:_,height:S})}h({row:i3("row-gap",getComputedStyle(y).rowGap,f),column:i3("column-gap",getComputedStyle(y).columnGap,f)})});return g?null:B.createElement(c,{ref:b,className:n,...Lo(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(y=>{const v=i(y.index,y.data,d);return s?B.createElement(u,{key:v,...Lo(u,d),index:y.index,height:t.itemHeight,width:t.itemWidth}):B.createElement(l,{...Lo(l,d),className:o,"data-index":y.index,key:v},r(y.index,y.data,d))}))}),x9=B.memo(function(){const t=Ft("HeaderComponent"),n=ei("headerHeight"),o=Ft("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ft("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null}),S9=B.memo(function(){const t=Ft("FooterComponent"),n=ei("footerHeight"),o=Ft("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ft("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null}),T9=({children:e})=>{const t=B.useContext(y5),n=ei("itemDimensions"),o=ei("viewportDimensions"),r=Sl(i=>{o(i.getBoundingClientRect())});return B.useEffect(()=>{t&&(o({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,o,n]),B.createElement("div",{style:Fg,ref:r},e)},C9=({children:e})=>{const t=B.useContext(y5),n=ei("windowViewportRect"),o=ei("itemDimensions"),r=Ft("customScrollParent"),i=m5(n,r);return B.useEffect(()=>{t&&(o({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,o]),B.createElement("div",{ref:i,style:Fg},e)},E9=B.memo(function({...t}){const n=Ft("useWindowScroll"),o=Ft("customScrollParent"),r=o||n?L9:k9,i=o||n?C9:T9;return B.createElement(r,{...t},B.createElement(i,null,B.createElement(x9,null),B.createElement(_9,null),B.createElement(S9,null)))}),{Component:$le,usePublisher:ei,useEmitterValue:Ft,useEmitter:x5}=J6(w9,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},E9),k9=b5({usePublisher:ei,useEmitterValue:Ft,useEmitter:x5}),L9=w5({usePublisher:ei,useEmitterValue:Ft,useEmitter:x5});function i3(e,t,n){return t!=="normal"&&!t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,or.WARN),t==="normal"?0:parseInt(t??"0",10)}const I9="_lazy-list_1owqy_1",R9="_sortable-overlay_1owqy_5",N9="_scrollable_1owqy_26",O9="_underlay-blur_1owqy_30",A9="_underlay-blur-enabled_1owqy_39",M9="_underlay-blur-disabled_1owqy_41",D9="_underlay-blur-show_1owqy_43",Wa={"lazy-list":"_lazy-list_1owqy_1",lazyList:I9,"sortable-overlay":"_sortable-overlay_1owqy_5",sortableOverlay:R9,scrollable:N9,"underlay-blur":"_underlay-blur_1owqy_30",underlayBlur:O9,"underlay-blur-enabled":"_underlay-blur-enabled_1owqy_39",underlayBlurEnabled:A9,"underlay-blur-disabled":"_underlay-blur-disabled_1owqy_41",underlayBlurDisabled:M9,"underlay-blur-show":"_underlay-blur-show_1owqy_43",underlayBlurShow:D9},S5=({className:e,handleRangeChanged:t,handleScrollDone:n,parent:o,renderItem:r,scrollTo:i,smoothScroll:s,totalCount:a})=>{const l=p.useRef(null),[c,u]=p.useState(),d=p.useCallback(m=>{t?.({firstIndex:m.startIndex,lastIndex:m.endIndex})},[t]);return p.useEffect(()=>{i!==void 0&&l.current?.scrollIntoView({index:i,behavior:s?"smooth":void 0,align:"center",done:n})},[i,n,s]),E.jsx(ru,{container:c,className:e,children:E.jsx(h9,{ref:l,scrollerRef:u,customScrollParent:o??void 0,className:Wa.lazyList,totalCount:a,itemContent:r,rangeChanged:d})})};function z9(){return NA()&&T5()&&P9()}function P9(){return typeof document.body.checkVisibility=="function"}function B9(e){return e?.checkVisibility!=null&&e.checkVisibility()}function T5(){return typeof navigator.userActivation=="object"}function $9(){return T5()&&navigator.userActivation.hasBeenActive}const C5=({children:e,pull:t})=>{const n=p.useRef(null);return p.useEffect(()=>{let o,r;if(n.current!=null)for(const u of n.current.querySelectorAll("[tabindex]"))i(u);return o?.addEventListener("keydown",s),r?.addEventListener("keydown",a),t&&l(),()=>{o?.removeEventListener("keydown",s),r?.removeEventListener("keydown",a),document.removeEventListener("keydown",c)};function i(u){B9(u)&&(o===void 0?o=u:r=u)}function s(u){u.key!=="Tab"||!u.shiftKey||(u.preventDefault(),r?.focus())}function a(u){u.key!=="Tab"||u.shiftKey||(u.preventDefault(),o?.focus())}function l(){o!==void 0?o.focus():document.addEventListener("keydown",c)}function c(u){u.key==="Tab"&&u.preventDefault()}},[e,t]),E.jsx("span",{ref:n,children:e})};function E5(e,t,n){const o={...e};return t.top+e.y<=n.top?o.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(o.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?o.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(o.x=n.left+n.width-t.right),o}const F9=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return!n||!t?o:E5(o,n,t)},H9=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:o}=e;const r=o[0];return!t||!r?n:E5(n,t,r)},V9=e=>{let{transform:t}=e;return{...t,x:0}},E2=({bound:e,children:t,handleSort:n,indexRange:o,renderOverlay:r})=>{const[i,s]=p.useState(),a=p.useCallback(g=>{document.body.style.setProperty("cursor","grabbing","important"),s(parseInt(g.active.id))},[]),l=p.useCallback(g=>{document.body.style.setProperty("cursor",""),s(void 0),g.over!=null&&g.active.id!==g.over.id&&n?.(parseInt(g.active.id),parseInt(g.over.id))},[n]),c=p.useCallback(()=>{const g=Array.isArray(t)?t.length:1;return Array.from({length:g},(b,y)=>y.toString())},[t]),u=p.useCallback(()=>{const g=o.firstIndex,y=o.lastIndex-g+1;return Array.from({length:y},(v,w)=>(g+w).toString())},[o]),d=o===void 0?c():u(),m=vz(yz(f2,{activationConstraint:{distance:0}})),h=[V9];e===zc.Ancestor&&h.push(F9),e===zc.Scrollable&&h.push(H9);const f=p.useMemo(()=>r&&Cn.createPortal(E.jsx(P7,{className:Wa.sortableOverlay,dropAnimation:null,children:i===void 0?null:r(i)}),document.body),[i,r]);return E.jsxs(v7,{accessibility:{container:document.body},onDragStart:a,onDragEnd:l,sensors:m,collisionDetection:Tz,modifiers:h,children:[E.jsx(U7,{items:d,strategy:H7,children:t}),f]})};function k2(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Cl=k2();function k5(e){Cl=e}const L5=/[&<>"']/,U9=new RegExp(L5.source,"g"),I5=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,j9=new RegExp(I5.source,"g"),W9={"&":"&","<":"<",">":">",'"':""","'":"'"},s3=e=>W9[e];function Xo(e,t){if(t){if(L5.test(e))return e.replace(U9,s3)}else if(I5.test(e))return e.replace(j9,s3);return e}const q9=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function G9(e){return e.replace(q9,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Y9=/(^|[^\[])\^/g;function bt(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const o={replace:(r,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Y9,"$1"),n=n.replace(r,s),o},getRegex:()=>new RegExp(n,t)};return o}function a3(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vd={exec:()=>null};function l3(e,t){const n=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),o=n.split(/ \|/);let r=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length{c(!0)},[]),mz(p.useMemo(()=>({onDragStart(d){let{active:m}=d;i(t.onDragStart({active:m}))},onDragMove(d){let{active:m,over:h}=d;t.onDragMove&&i(t.onDragMove({active:m,over:h}))},onDragOver(d){let{active:m,over:h}=d;i(t.onDragOver({active:m,over:h}))},onDragEnd(d){let{active:m,over:h}=d;i(t.onDragEnd({active:m,over:h}))},onDragCancel(d){let{active:m,over:h}=d;i(t.onDragCancel({active:m,over:h}))}}),[i,t])),!l)return null;const u=B.createElement(B.Fragment,null,B.createElement(fz,{id:o,value:r.draggable}),B.createElement(pz,{id:a,announcement:s}));return n?En.createPortal(u,n):u}var rn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(rn||(rn={}));function wm(){}function wz(e,t){return p.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function _z(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(o=>o!=null),[...t])}const ni=Object.freeze({x:0,y:0});function xz(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Sz(e,t){const n=bm(e);if(!n)return"0 0";const o={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function Tz(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Ez(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Cz(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function NS(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const kz=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=NS(t,t.left,t.top),i=[];for(const s of o){const{id:a}=s,l=n.get(a);if(l){const c=xz(NS(l),r);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(Tz)};function Lz(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=r-o,a=i-n;if(o{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const i of o){const{id:s}=i,a=n.get(s);if(a){const l=Lz(a,t);l>0&&r.push({id:s,data:{droppableContainer:i,value:l}})}}return r.sort(Ez)};function Nz(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function C6(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ni}function Rz(e){return function(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Oz=Rz(1);function k6(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Az(e,t,n){const o=k6(t);if(!o)return e;const{scaleX:r,scaleY:i,x:s,y:a}=o,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const Mz={ignoreTransform:!1};function Qc(e,t){t===void 0&&(t=Mz);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=fo(e).getComputedStyle(e);c&&(n=Az(n,c,u))}const{top:o,left:r,width:i,height:s,bottom:a,right:l}=n;return{top:o,left:r,width:i,height:s,bottom:a,right:l}}function RS(e){return Qc(e,{ignoreTransform:!0})}function Dz(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function zz(e,t){return t===void 0&&(t=fo(e).getComputedStyle(e)),t.position==="fixed"}function Pz(e,t){t===void 0&&(t=fo(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const i=t[r];return typeof i=="string"?n.test(i):!1})}function c_(e,t){const n=[];function o(r){if(t!=null&&n.length>=t||!r)return n;if(l_(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Nf(r)||S6(r)||n.includes(r))return n;const i=fo(e).getComputedStyle(r);return r!==e&&Pz(r,i)&&n.push(r),zz(r,i)?n:o(r.parentNode)}return e?o(e):n}function L6(e){const[t]=c_(e,1);return t??null}function Iy(e){return!Rg||!e?null:Zc(e)?e:a_(e)?l_(e)||e===Kc(e).scrollingElement?window:Nf(e)?e:null:null}function I6(e){return Zc(e)?e.scrollX:e.scrollLeft}function N6(e){return Zc(e)?e.scrollY:e.scrollTop}function H1(e){return{x:I6(e),y:N6(e)}}var pn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(pn||(pn={}));function R6(e){return!Rg||!e?!1:e===document.scrollingElement}function O6(e){const t={x:0,y:0},n=R6(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},r=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=o.y,a=e.scrollLeft>=o.x;return{isTop:r,isLeft:i,isBottom:s,isRight:a,maxScroll:o,minScroll:t}}const Bz={x:.2,y:.2};function $z(e,t,n,o,r){let{top:i,left:s,right:a,bottom:l}=n;o===void 0&&(o=10),r===void 0&&(r=Bz);const{isTop:c,isBottom:u,isLeft:d,isRight:m}=O6(e),h={x:0,y:0},f={x:0,y:0},g={height:t.height*r.y,width:t.width*r.x};return!c&&i<=t.top+g.height?(h.y=pn.Backward,f.y=o*Math.abs((t.top+g.height-i)/g.height)):!u&&l>=t.bottom-g.height&&(h.y=pn.Forward,f.y=o*Math.abs((t.bottom-g.height-l)/g.height)),!m&&a>=t.right-g.width?(h.x=pn.Forward,f.x=o*Math.abs((t.right-g.width-a)/g.width)):!d&&s<=t.left+g.width&&(h.x=pn.Backward,f.x=o*Math.abs((t.left+g.width-s)/g.width)),{direction:h,speed:f}}function Fz(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function A6(e){return e.reduce((t,n)=>mc(t,H1(n)),ni)}function Hz(e){return e.reduce((t,n)=>t+I6(n),0)}function Vz(e){return e.reduce((t,n)=>t+N6(n),0)}function M6(e,t){if(t===void 0&&(t=Qc),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);L6(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Uz=[["x",["left","right"],Hz],["y",["top","bottom"],Vz]];let u_=class{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=c_(n),r=A6(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Uz)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(o),u=r[i]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}};class pd{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var r;(r=this.target)==null||r.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function jz(e){const{EventTarget:t}=fo(e);return e instanceof t?e:Kc(e)}function Ny(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var vr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(vr||(vr={}));function OS(e){e.preventDefault()}function Wz(e){e.stopPropagation()}var at;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(at||(at={}));const D6={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter]},qz=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case at.Right:return{...n,x:n.x+25};case at.Left:return{...n,x:n.x-25};case at.Down:return{...n,y:n.y+25};case at.Up:return{...n,y:n.y-25}}};class z6{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new pd(Kc(n)),this.windowListeners=new pd(fo(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(vr.Resize,this.handleCancel),this.windowListeners.add(vr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(vr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&M6(o),n(ni)}handleKeyDown(t){if(Ag(t)){const{active:n,context:o,options:r}=this.props,{keyboardCodes:i=D6,coordinateGetter:s=qz,scrollBehavior:a="smooth"}=r,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=o.current,u=c?{x:c.left,y:c.top}:ni;this.referenceCoordinates||(this.referenceCoordinates=u);const d=s(t,{active:n,context:o.current,currentCoordinates:u});if(d){const m=vm(d,u),h={x:0,y:0},{scrollableAncestors:f}=o.current;for(const g of f){const b=t.code,{isTop:y,isRight:v,isLeft:w,isBottom:_,maxScroll:S,minScroll:x}=O6(g),T=Fz(g),E={x:Math.min(b===at.Right?T.right-T.width/2:T.right,Math.max(b===at.Right?T.left:T.left+T.width/2,d.x)),y:Math.min(b===at.Down?T.bottom-T.height/2:T.bottom,Math.max(b===at.Down?T.top:T.top+T.height/2,d.y))},N=b===at.Right&&!v||b===at.Left&&!w,I=b===at.Down&&!_||b===at.Up&&!y;if(N&&E.x!==d.x){const O=g.scrollLeft+m.x,R=b===at.Right&&O<=S.x||b===at.Left&&O>=x.x;if(R&&!m.y){g.scrollTo({left:O,behavior:a});return}R?h.x=g.scrollLeft-O:h.x=b===at.Right?g.scrollLeft-S.x:g.scrollLeft-x.x,h.x&&g.scrollBy({left:-h.x,behavior:a});break}else if(I&&E.y!==d.y){const O=g.scrollTop+m.y,R=b===at.Down&&O<=S.y||b===at.Up&&O>=x.y;if(R&&!m.x){g.scrollTo({top:O,behavior:a});return}R?h.y=g.scrollTop-O:h.y=b===at.Down?g.scrollTop-S.y:g.scrollTop-x.y,h.y&&g.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,mc(vm(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}z6.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=D6,onActivation:r}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(o.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),r?.({event:e.nativeEvent}),!0)}return!1}}];function AS(e){return!!(e&&"distance"in e)}function MS(e){return!!(e&&"delay"in e)}class d_{constructor(t,n,o){var r;o===void 0&&(o=jz(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=Kc(s),this.documentListeners=new pd(this.document),this.listeners=new pd(o),this.windowListeners=new pd(fo(s)),this.initialCoordinates=(r=bm(i))!=null?r:ni,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(vr.Resize,this.handleCancel),this.windowListeners.add(vr.DragStart,OS),this.windowListeners.add(vr.VisibilityChange,this.handleCancel),this.windowListeners.add(vr.ContextMenu,OS),this.documentListeners.add(vr.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(MS(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(AS(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(vr.Click,Wz,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(vr.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!r)return;const l=(n=bm(t))!=null?n:ni,c=vm(r,l);if(!o&&a){if(AS(a)){if(a.tolerance!=null&&Ny(c,a.tolerance))return this.handleCancel();if(Ny(c,a.distance))return this.handleStart()}return MS(a)&&Ny(c,a.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===at.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Gz={move:{name:"pointermove"},end:{name:"pointerup"}};class f_ extends d_{constructor(t){const{event:n}=t,o=Kc(n.target);super(t,Gz,o)}}f_.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o?.({event:n}),!0)}}];const Yz={move:{name:"mousemove"},end:{name:"mouseup"}};var V1;(function(e){e[e.RightClick=2]="RightClick"})(V1||(V1={}));class Xz extends d_{constructor(t){super(t,Yz,Kc(t.event.target))}}Xz.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===V1.RightClick?!1:(o?.({event:n}),!0)}}];const Ry={move:{name:"touchmove"},end:{name:"touchend"}};class Jz extends d_{constructor(t){super(t,Ry)}static setup(){return window.addEventListener(Ry.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ry.move.name,t)};function t(){}}}Jz.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return r.length>1?!1:(o?.({event:n}),!0)}}];var hd;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hd||(hd={}));var _m;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_m||(_m={}));function Zz(e){let{acceleration:t,activator:n=hd.Pointer,canScroll:o,draggingRect:r,enabled:i,interval:s=5,order:a=_m.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:m}=e;const h=Qz({delta:d,disabled:!i}),[f,g]=az(),b=p.useRef({x:0,y:0}),y=p.useRef({x:0,y:0}),v=p.useMemo(()=>{switch(n){case hd.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case hd.DraggableRect:return r}},[n,r,l]),w=p.useRef(null),_=p.useCallback(()=>{const x=w.current;if(!x)return;const T=b.current.x*y.current.x,E=b.current.y*y.current.y;x.scrollBy(T,E)},[]),S=p.useMemo(()=>a===_m.TreeOrder?[...c].reverse():c,[a,c]);p.useEffect(()=>{if(!i||!c.length||!v){g();return}for(const x of S){if(o?.(x)===!1)continue;const T=c.indexOf(x),E=u[T];if(!E)continue;const{direction:N,speed:I}=$z(x,E,v,t,m);for(const O of["x","y"])h[O][N[O]]||(I[O]=0,N[O]=0);if(I.x>0||I.y>0){g(),w.current=x,f(_,s),b.current=I,y.current=N;return}}b.current={x:0,y:0},y.current={x:0,y:0},g()},[t,_,o,g,i,s,JSON.stringify(v),JSON.stringify(h),f,c,S,u,JSON.stringify(m)])}const Kz={x:{[pn.Backward]:!1,[pn.Forward]:!1},y:{[pn.Backward]:!1,[pn.Forward]:!1}};function Qz(e){let{delta:t,disabled:n}=e;const o=ym(t);return Rf(r=>{if(n||!o||!r)return Kz;const i={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[pn.Backward]:r.x[pn.Backward]||i.x===-1,[pn.Forward]:r.x[pn.Forward]||i.x===1},y:{[pn.Backward]:r.y[pn.Backward]||i.y===-1,[pn.Forward]:r.y[pn.Forward]||i.y===1}}},[n,t,o])}function e7(e,t){const n=t!==null?e.get(t):void 0,o=n?n.node.current:null;return Rf(r=>{var i;return t===null?null:(i=o??r)!=null?i:null},[o,t])}function t7(e,t){return p.useMemo(()=>e.reduce((n,o)=>{const{sensor:r}=o,i=r.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,o)}));return[...n,...i]},[]),[e,t])}var Yd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Yd||(Yd={}));var U1;(function(e){e.Optimized="optimized"})(U1||(U1={}));const DS=new Map;function n7(e,t){let{dragging:n,dependencies:o,config:r}=t;const[i,s]=p.useState(null),{frequency:a,measure:l,strategy:c}=r,u=p.useRef(e),d=b(),m=Gd(d),h=p.useCallback(function(y){y===void 0&&(y=[]),!m.current&&s(v=>v===null?y:v.concat(y.filter(w=>!v.includes(w))))},[m]),f=p.useRef(null),g=Rf(y=>{if(d&&!n)return DS;if(!y||y===DS||u.current!==e||i!=null){const v=new Map;for(let w of e){if(!w)continue;if(i&&i.length>0&&!i.includes(w.id)&&w.rect.current){v.set(w.id,w.rect.current);continue}const _=w.node.current,S=_?new u_(l(_),_):null;w.rect.current=S,S&&v.set(w.id,S)}return v}return y},[e,i,n,d,l]);return p.useEffect(()=>{u.current=e},[e]),p.useEffect(()=>{d||h()},[n,d]),p.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),p.useEffect(()=>{d||typeof a!="number"||f.current!==null||(f.current=setTimeout(()=>{h(),f.current=null},a))},[a,d,h,...o]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:i!=null};function b(){switch(c){case Yd.Always:return!1;case Yd.BeforeDragging:return n;default:return!n}}}function p_(e,t){return Rf(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function o7(e,t){return p_(e,t)}function r7(e){let{callback:t,disabled:n}=e;const o=Og(t),r=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(o)},[o,n]);return p.useEffect(()=>()=>r?.disconnect(),[r]),r}function Mg(e){let{callback:t,disabled:n}=e;const o=Og(t),r=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(o)},[n]);return p.useEffect(()=>()=>r?.disconnect(),[r]),r}function i7(e){return new u_(Qc(e),e)}function zS(e,t,n){t===void 0&&(t=i7);const[o,r]=p.useReducer(a,null),i=r7({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){r();break}}}}),s=Mg({callback:r});return Mr(()=>{r(),e?(s?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),i?.disconnect())},[e]),o;function a(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function s7(e){const t=p_(e);return C6(e,t)}const PS=[];function a7(e){const t=p.useRef(e),n=Rf(o=>e?o&&o!==PS&&e&&t.current&&e.parentNode===t.current.parentNode?o:c_(e):PS,[e]);return p.useEffect(()=>{t.current=e},[e]),n}function l7(e){const[t,n]=p.useState(null),o=p.useRef(e),r=p.useCallback(i=>{const s=Iy(i.target);s&&n(a=>a?(a.set(s,H1(s)),new Map(a)):null)},[]);return p.useEffect(()=>{const i=o.current;if(e!==i){s(i);const a=e.map(l=>{const c=Iy(l);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,H1(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),o.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const c=Iy(l);c?.removeEventListener("scroll",r)})}},[r,e]),p.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>mc(i,s),ni):A6(e):ni,[e,t])}function BS(e,t){t===void 0&&(t=[]);const n=p.useRef(null);return p.useEffect(()=>{n.current=null},t),p.useEffect(()=>{const o=e!==ni;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?vm(e,n.current):ni}function c7(e){p.useEffect(()=>{if(!Rg)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function u7(e,t){return p.useMemo(()=>e.reduce((n,o)=>{let{eventName:r,handler:i}=o;return n[r]=s=>{i(s,t)},n},{}),[e,t])}function P6(e){return p.useMemo(()=>e?Dz(e):null,[e])}const Oy=[];function d7(e,t){t===void 0&&(t=Qc);const[n]=e,o=P6(n?fo(n):null),[r,i]=p.useReducer(a,Oy),s=Mg({callback:i});return e.length>0&&r===Oy&&i(),Mr(()=>{e.length?e.forEach(l=>s?.observe(l)):(s?.disconnect(),i())},[e]),r;function a(){return e.length?e.map(l=>R6(l)?o:new u_(t(l),l)):Oy}}function B6(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Nf(t)?t:e}function f7(e){let{measure:t}=e;const[n,o]=p.useState(null),r=p.useCallback(c=>{for(const{target:u}of c)if(Nf(u)){o(d=>{const m=t(u);return d?{...d,width:m.width,height:m.height}:m});break}},[t]),i=Mg({callback:r}),s=p.useCallback(c=>{const u=B6(c);i?.disconnect(),u&&i?.observe(u),o(u?t(u):null)},[t,i]),[a,l]=gm(s);return p.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const p7=[{sensor:f_,options:{}},{sensor:z6,options:{}}],h7={current:{}},gh={draggable:{measure:RS},droppable:{measure:RS,strategy:Yd.WhileDragging,frequency:U1.Optimized},dragOverlay:{measure:Qc}};class md extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const m7={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new md,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:wm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:gh,measureDroppableContainers:wm,windowRect:null,measuringScheduled:!1},$6={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:wm,draggableNodes:new Map,over:null,measureDroppableContainers:wm},Af=p.createContext($6),F6=p.createContext(m7);function g7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new md}}}function y7(e,t){switch(t.type){case rn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case rn.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case rn.DragEnd:case rn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case rn.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new md(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case rn.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const s=new md(e.droppable.containers);return s.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case rn.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new md(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function v7(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=p.useContext(Af),i=ym(o),s=ym(n?.id);return p.useEffect(()=>{if(!t&&!o&&i&&s!=null){if(!Ag(i)||document.activeElement===i.target)return;const a=r.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=uz(u);if(d){d.focus();break}}})}},[o,t,r,s,i]),null}function H6(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((r,i)=>i({transform:r,...o}),n):n}function b7(e){return p.useMemo(()=>({draggable:{...gh.draggable,...e?.draggable},droppable:{...gh.droppable,...e?.droppable},dragOverlay:{...gh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function w7(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=p.useRef(!1),{x:s,y:a}=typeof r=="boolean"?{x:r,y:r}:r;Mr(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!o)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=C6(u,o);if(s||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const m=L6(c);m&&m.scrollBy({top:d.y,left:d.x})}},[t,s,a,o,n])}const Dg=p.createContext({...ni,scaleX:1,scaleY:1});var js;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(js||(js={}));const _7=p.memo(function(t){var n,o,r,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=p7,collisionDetection:d=Iz,measuring:m,modifiers:h,...f}=t;const g=p.useReducer(y7,void 0,g7),[b,y]=g,[v,w]=gz(),[_,S]=p.useState(js.Uninitialized),x=_===js.Initialized,{draggable:{active:T,nodes:E,translate:N},droppable:{containers:I}}=b,O=T?E.get(T):null,R=p.useRef({initial:null,translated:null}),z=p.useMemo(()=>{var Ot;return T!=null?{id:T,data:(Ot=O?.data)!=null?Ot:h7,rect:R}:null},[T,O]),k=p.useRef(null),[M,D]=p.useState(null),[$,A]=p.useState(null),L=Gd(f,Object.values(f)),P=Of("DndDescribedBy",s),F=p.useMemo(()=>I.getEnabled(),[I]),H=b7(m),{droppableRects:U,measureDroppableContainers:j,measuringScheduled:q}=n7(F,{dragging:x,dependencies:[N.x,N.y],config:H.droppable}),V=e7(E,T),W=p.useMemo(()=>$?bm($):null,[$]),X=hr(),J=o7(V,H.draggable.measure);w7({activeNode:T?E.get(T):null,config:X.layoutShiftCompensation,initialRect:J,measure:H.draggable.measure});const Y=zS(V,H.draggable.measure,J),Q=zS(V?V.parentElement:null),G=p.useRef({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Z=I.getNodeFor((n=G.current.over)==null?void 0:n.id),K=f7({measure:H.dragOverlay.measure}),ee=(o=K.nodeRef.current)!=null?o:V,se=x?(r=K.rect)!=null?r:Y:null,he=!!(K.nodeRef.current&&K.rect),re=s7(he?null:Y),De=P6(ee?fo(ee):null),$e=a7(x?Z??V:null),ze=d7($e),Xe=H6(h,{transform:{x:N.x-re.x,y:N.y-re.y,scaleX:1,scaleY:1},activatorEvent:$,active:z,activeNodeRect:Y,containerNodeRect:Q,draggingNodeRect:se,over:G.current.over,overlayNodeRect:K.rect,scrollableAncestors:$e,scrollableAncestorRects:ze,windowRect:De}),Ne=W?mc(W,N):null,je=l7($e),it=BS(je),xe=BS(je,[Y]),wt=mc(Xe,it),$t=se?Oz(se,Xe):null,Rt=z&&$t?d({active:z,collisionRect:$t,droppableRects:U,droppableContainers:F,pointerCoordinates:Ne}):null,st=Cz(Rt,"id"),[Ve,Kt]=p.useState(null),Mn=he?Xe:mc(Xe,xe),Dn=Nz(Mn,(i=Ve?.rect)!=null?i:null,Y),Yt=p.useCallback((Ot,fe)=>{let{sensor:Oe,options:yt}=fe;if(k.current==null)return;const We=E.get(k.current);if(!We)return;const Ke=Ot.nativeEvent,kt=new Oe({active:k.current,activeNode:We,event:Ke,options:yt,context:G,onStart(_t){const Kn=k.current;if(Kn==null)return;const go=E.get(Kn);if(!go)return;const{onDragStart:Pn}=L.current,ci={active:{id:Kn,data:go.data,rect:R}};En.unstable_batchedUpdates(()=>{Pn?.(ci),S(js.Initializing),y({type:rn.DragStart,initialCoordinates:_t,active:Kn}),v({type:"onDragStart",event:ci})})},onMove(_t){y({type:rn.DragMove,coordinates:_t})},onEnd:_n(rn.DragEnd),onCancel:_n(rn.DragCancel)});En.unstable_batchedUpdates(()=>{D(kt),A(Ot.nativeEvent)});function _n(_t){return async function(){const{active:go,collisions:Pn,over:ci,scrollAdjustedTranslate:zi}=G.current;let yo=null;if(go&&zi){const{cancelDrop:mr}=L.current;yo={activatorEvent:Ke,active:go,collisions:Pn,delta:zi,over:ci},_t===rn.DragEnd&&typeof mr=="function"&&await Promise.resolve(mr(yo))&&(_t=rn.DragCancel)}k.current=null,En.unstable_batchedUpdates(()=>{y({type:_t}),S(js.Uninitialized),Kt(null),D(null),A(null);const mr=_t===rn.DragEnd?"onDragEnd":"onDragCancel";if(yo){const Is=L.current[mr];Is?.(yo),v({type:mr,event:yo})}})}}},[E]),Zn=p.useCallback((Ot,fe)=>(Oe,yt)=>{const We=Oe.nativeEvent,Ke=E.get(yt);if(k.current!==null||!Ke||We.dndKit||We.defaultPrevented)return;const kt={active:Ke};Ot(Oe,fe.options,kt)===!0&&(We.dndKit={capturedBy:fe.sensor},k.current=yt,Yt(Oe,fe))},[E,Yt]),Fo=t7(u,Zn);c7(u),Mr(()=>{Y&&_===js.Initializing&&S(js.Initialized)},[Y,_]),p.useEffect(()=>{const{onDragMove:Ot}=L.current,{active:fe,activatorEvent:Oe,collisions:yt,over:We}=G.current;if(!fe||!Oe)return;const Ke={active:fe,activatorEvent:Oe,collisions:yt,delta:{x:wt.x,y:wt.y},over:We};En.unstable_batchedUpdates(()=>{Ot?.(Ke),v({type:"onDragMove",event:Ke})})},[wt.x,wt.y]),p.useEffect(()=>{const{active:Ot,activatorEvent:fe,collisions:Oe,droppableContainers:yt,scrollAdjustedTranslate:We}=G.current;if(!Ot||k.current==null||!fe||!We)return;const{onDragOver:Ke}=L.current,kt=yt.get(st),_n=kt&&kt.rect.current?{id:kt.id,rect:kt.rect.current,data:kt.data,disabled:kt.disabled}:null,_t={active:Ot,activatorEvent:fe,collisions:Oe,delta:{x:We.x,y:We.y},over:_n};En.unstable_batchedUpdates(()=>{Kt(_n),Ke?.(_t),v({type:"onDragOver",event:_t})})},[st]),Mr(()=>{G.current={activatorEvent:$,active:z,activeNode:V,collisionRect:$t,collisions:Rt,droppableRects:U,draggableNodes:E,draggingNode:ee,draggingNodeRect:se,droppableContainers:I,over:Ve,scrollableAncestors:$e,scrollAdjustedTranslate:wt},R.current={initial:se,translated:$t}},[z,V,Rt,$t,E,ee,se,U,I,Ve,$e,wt]),Zz({...X,delta:N,draggingRect:$t,pointerCoordinates:Ne,scrollableAncestors:$e,scrollableAncestorRects:ze});const Xt=p.useMemo(()=>({active:z,activeNode:V,activeNodeRect:Y,activatorEvent:$,collisions:Rt,containerNodeRect:Q,dragOverlay:K,draggableNodes:E,droppableContainers:I,droppableRects:U,over:Ve,measureDroppableContainers:j,scrollableAncestors:$e,scrollableAncestorRects:ze,measuringConfiguration:H,measuringScheduled:q,windowRect:De}),[z,V,Y,$,Rt,Q,K,E,I,U,Ve,j,$e,ze,H,q,De]),zn=p.useMemo(()=>({activatorEvent:$,activators:Fo,active:z,activeNodeRect:Y,ariaDescribedById:{draggable:P},dispatch:y,draggableNodes:E,over:Ve,measureDroppableContainers:j}),[$,Fo,z,Y,y,P,E,Ve,j]);return B.createElement(E6.Provider,{value:w},B.createElement(Af.Provider,{value:zn},B.createElement(F6.Provider,{value:Xt},B.createElement(Dg.Provider,{value:Dn},c)),B.createElement(v7,{disabled:a?.restoreFocus===!1})),B.createElement(bz,{...a,hiddenTextDescribedById:P}));function hr(){const Ot=M?.autoScrollEnabled===!1,fe=typeof l=="object"?l.enabled===!1:l===!1,Oe=x&&!Ot&&!fe;return typeof l=="object"?{...l,enabled:Oe}:{enabled:Oe}}}),x7=p.createContext(null),$S="button",S7="Droppable";function T7(e){let{id:t,data:n,disabled:o=!1,attributes:r}=e;const i=Of(S7),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:m}=p.useContext(Af),{role:h=$S,roleDescription:f="draggable",tabIndex:g=0}=r??{},b=l?.id===t,y=p.useContext(b?Dg:x7),[v,w]=gm(),[_,S]=gm(),x=u7(s,t),T=Gd(n);Mr(()=>(d.set(t,{id:t,key:i,node:v,activatorNode:_,data:T}),()=>{const N=d.get(t);N&&N.key===i&&d.delete(t)}),[d,t]);const E=p.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":o,"aria-pressed":b&&h===$S?!0:void 0,"aria-roledescription":f,"aria-describedby":u.draggable}),[o,h,g,b,f,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:E,isDragging:b,listeners:o?void 0:x,node:v,over:m,setNodeRef:w,setActivatorNodeRef:S,transform:y}}function V6(){return p.useContext(F6)}const E7="Droppable",C7={timeout:25};function k7(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const i=Of(E7),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=p.useContext(Af),u=p.useRef({disabled:n}),d=p.useRef(!1),m=p.useRef(null),h=p.useRef(null),{disabled:f,updateMeasurementsFor:g,timeout:b}={...C7,...r},y=Gd(g??o),v=p.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),h.current=null},b)},[b]),w=Mg({callback:v,disabled:f||!s}),_=p.useCallback((E,N)=>{w&&(N&&(w.unobserve(N),d.current=!1),E&&w.observe(E))},[w]),[S,x]=gm(_),T=Gd(t);return p.useEffect(()=>{!w||!S.current||(w.disconnect(),d.current=!1,w.observe(S.current))},[S,w]),Mr(()=>(a({type:rn.RegisterDroppable,element:{id:o,key:i,disabled:n,node:S,rect:m,data:T}}),()=>a({type:rn.UnregisterDroppable,key:i,id:o})),[o]),p.useEffect(()=>{n!==u.current.disabled&&(a({type:rn.SetDroppableDisabled,id:o,key:i,disabled:n}),u.current.disabled=n)},[o,i,n,a]),{active:s,rect:m,isOver:l?.id===o,node:S,over:l,setNodeRef:x}}function L7(e){let{animation:t,children:n}=e;const[o,r]=p.useState(null),[i,s]=p.useState(null),a=ym(n);return!n&&!o&&a&&r(a),Mr(()=>{if(!i)return;const l=o?.key,c=o?.props.id;if(l==null||c==null){r(null);return}Promise.resolve(t(c,i)).then(()=>{r(null)})},[t,o,i]),B.createElement(B.Fragment,null,n,o?p.cloneElement(o,{ref:s}):null)}const I7={x:0,y:0,scaleX:1,scaleY:1};function N7(e){let{children:t}=e;return B.createElement(Af.Provider,{value:$6},B.createElement(Dg.Provider,{value:I7},t))}const R7={position:"fixed",touchAction:"none"},O7=e=>Ag(e)?"transform 250ms ease":void 0,A7=p.forwardRef((e,t)=>{let{as:n,activatorEvent:o,adjustScale:r,children:i,className:s,rect:a,style:l,transform:c,transition:u=O7}=e;if(!a)return null;const d=r?c:{...c,scaleX:1,scaleY:1},m={...R7,width:a.width,height:a.height,top:a.top,left:a.left,transform:us.Transform.toString(d),transformOrigin:r&&o?Sz(o,a):void 0,transition:typeof u=="function"?u(o):u,...l};return B.createElement(n,{className:s,style:m,ref:t},i)}),M7=e=>t=>{let{active:n,dragOverlay:o}=t;const r={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&o.node.style.setProperty(a,l);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(const[l,c]of Object.entries(r))n.node.style.setProperty(l,c);s!=null&&s.active&&n.node.classList.remove(s.active)}},D7=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:us.Transform.toString(t)},{transform:us.Transform.toString(n)}]},z7={duration:250,easing:"ease",keyframes:D7,sideEffects:M7({styles:{active:{opacity:"0"}}})};function P7(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:r}=e;return Og((i,s)=>{if(t===null)return;const a=n.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=B6(s);if(!c)return;const{transform:u}=fo(s).getComputedStyle(s),d=k6(u);if(!d)return;const m=typeof t=="function"?t:B7(t);return M6(l,r.draggable.measure),m({active:{id:i,data:a.data,node:l,rect:r.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:r.dragOverlay.measure(c)},droppableContainers:o,measuringConfiguration:r,transform:d})})}function B7(e){const{duration:t,easing:n,sideEffects:o,keyframes:r}={...z7,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...c}=i;if(!t)return;const u={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},d={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},m={x:l.x-u.x,y:l.y-u.y,...d},h=r({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[f]=h,g=h[h.length-1];if(JSON.stringify(f)===JSON.stringify(g))return;const b=o?.({active:s,dragOverlay:a,...c}),y=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(v=>{y.onfinish=()=>{b?.(),v()}})}}let FS=0;function $7(e){return p.useMemo(()=>{if(e!=null)return FS++,FS},[e])}const F7=B.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:r,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:u,active:d,activeNodeRect:m,containerNodeRect:h,draggableNodes:f,droppableContainers:g,dragOverlay:b,over:y,measuringConfiguration:v,scrollableAncestors:w,scrollableAncestorRects:_,windowRect:S}=V6(),x=p.useContext(Dg),T=$7(d?.id),E=H6(s,{activatorEvent:u,active:d,activeNodeRect:m,containerNodeRect:h,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:_,transform:x,windowRect:S}),N=p_(m),I=P7({config:o,draggableNodes:f,droppableContainers:g,measuringConfiguration:v}),O=N?b.setRef:void 0;return B.createElement(N7,null,B.createElement(L7,{animation:I},d&&T?B.createElement(A7,{key:T,id:d.id,ref:O,as:a,activatorEvent:u,adjustScale:t,className:l,transition:i,rect:N,style:{zIndex:c,...r},transform:E},n):null))});function h_(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function H7(e,t){return e.reduce((n,o,r)=>{const i=t.get(o);return i&&(n[r]=i),n},Array(e.length))}function xp(e){return e!==null&&e>=0}function V7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=h_(t,o,n),s=t[r],a=i[r];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},Sp={scaleX:1,scaleY:1},j7=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:s}=e;const a=(t=i[n])!=null?t:o;if(!a)return null;if(r===n){const c=i[s];return c?{x:0,y:nn&&r<=s?{x:0,y:-a.height-l,...Sp}:r=s?{x:0,y:a.height+l,...Sp}:{x:0,y:0,...Sp}};function W7(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?no.map(x=>typeof x=="object"&&"id"in x?x.id:x),[o]),f=s!=null,g=s?h.indexOf(s.id):-1,b=c?h.indexOf(c.id):-1,y=p.useRef(h),v=!V7(h,y.current),w=b!==-1&&g===-1||v,_=U7(i);Mr(()=>{v&&f&&u(h)},[v,h,f,u]),p.useEffect(()=>{y.current=h},[h]);const S=p.useMemo(()=>({activeIndex:g,containerId:d,disabled:_,disableTransforms:w,items:h,overIndex:b,useDragOverlay:m,sortedRects:H7(h,l),strategy:r}),[g,d,_.draggable,_.droppable,w,h,b,l,m,r]);return B.createElement(W6.Provider,{value:S},t)}const G7=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return h_(n,o,r).indexOf(t)},Y7=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!o||a!==i&&r===s?!1:n?!0:s!==r&&t===l},X7={duration:200,easing:"ease"},q6="transform",J7=us.Transition.toString({property:q6,duration:0,easing:"linear"}),Z7={roleDescription:"sortable"};function K7(e){let{disabled:t,index:n,node:o,rect:r}=e;const[i,s]=p.useState(null),a=p.useRef(n);return Mr(()=>{if(!t&&n!==a.current&&o.current){const l=r.current;if(l){const c=Qc(o.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,o,r]),p.useEffect(()=>{i&&s(null)},[i]),i}function Q7(e){let{animateLayoutChanges:t=Y7,attributes:n,disabled:o,data:r,getNewIndex:i=G7,id:s,strategy:a,resizeObserverConfig:l,transition:c=X7}=e;const{items:u,containerId:d,activeIndex:m,disabled:h,disableTransforms:f,sortedRects:g,overIndex:b,useDragOverlay:y,strategy:v}=p.useContext(W6),w=eP(o,h),_=u.indexOf(s),S=p.useMemo(()=>({sortable:{containerId:d,index:_,items:u},...r}),[d,r,_,u]),x=p.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:T,node:E,isOver:N,setNodeRef:I}=k7({id:s,data:S,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:x,...l}}),{active:O,activatorEvent:R,activeNodeRect:z,attributes:k,setNodeRef:M,listeners:D,isDragging:$,over:A,setActivatorNodeRef:L,transform:P}=T7({id:s,data:S,attributes:{...Z7,...n},disabled:w.draggable}),F=sz(I,M),H=!!O,U=H&&!f&&xp(m)&&xp(b),j=!y&&$,q=j&&U?P:null,W=U?q??(a??v)({rects:g,activeNodeRect:z,activeIndex:m,overIndex:b,index:_}):null,X=xp(m)&&xp(b)?i({id:s,items:u,activeIndex:m,overIndex:b}):_,J=O?.id,Y=p.useRef({activeId:J,items:u,newIndex:X,containerId:d}),Q=u!==Y.current.items,G=t({active:O,containerId:d,isDragging:$,isSorting:H,id:s,index:_,items:u,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:c,wasDragging:Y.current.activeId!=null}),Z=K7({disabled:!G,index:_,node:E,rect:T});return p.useEffect(()=>{H&&Y.current.newIndex!==X&&(Y.current.newIndex=X),d!==Y.current.containerId&&(Y.current.containerId=d),u!==Y.current.items&&(Y.current.items=u)},[H,X,d,u]),p.useEffect(()=>{if(J===Y.current.activeId)return;if(J&&!Y.current.activeId){Y.current.activeId=J;return}const ee=setTimeout(()=>{Y.current.activeId=J},50);return()=>clearTimeout(ee)},[J]),{active:O,activeIndex:m,attributes:k,data:S,rect:T,index:_,newIndex:X,items:u,isOver:N,isSorting:H,isDragging:$,listeners:D,node:E,overIndex:b,over:A,setNodeRef:F,setActivatorNodeRef:L,setDroppableNodeRef:I,setDraggableNodeRef:M,transform:Z??W,transition:K()};function K(){if(Z||Q&&Y.current.newIndex===_)return J7;if(!(j&&!Ag(R)||!c)&&(H||G))return us.Transition.toString({...c,property:q6})}}function eP(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(o=e?.droppable)!=null?o:t.droppable}}at.Down,at.Right,at.Up,at.Left;var zc=(e=>(e[e.Ancestor=0]="Ancestor",e[e.Scrollable=1]="Scrollable",e))(zc||{});function m_(e,t){const{listeners:n,setNodeRef:o,setActivatorNodeRef:r,transform:i,transition:s,isDragging:a,isSorting:l}=Q7({id:e.toString(),animateLayoutChanges:()=>!1,disabled:t?.disabled}),c={ref:o,style:{transform:t?.moveOnly?us.Translate.toString(i):us.Transform.toString(i),transition:s,opacity:t?.hidePreview&&a?0:1,pointerEvents:l?"none":void 0},role:t?.disabled?void 0:"sortable-node"},u={ref:r,role:t?.disabled?void 0:"sortable-handle",...n};return{node:c,handle:u,combined:{...c,...n,role:t?.disabled?void 0:"sortable-combined"}}}function tP(e){return new Promise(t=>setTimeout(t,e*1e3))}function an(...e){return e.map(rP).filter(t=>t!=null).join(" ")}function nP(e){return e?.querySelector("div[data-overlayscrollbars-viewport]")??void 0}function oP(e,t,n){return h_(e,t,n)}function rP(e){return e==null||typeof e=="boolean"?null:typeof e=="string"?e:e[0]?e[1]:null}function ro(e){return e=iP(e),e=e.replace(/[_-]+/g," ").replace(/\s{2,}/g," ").trim(),e=e.replace(/(\D)(\d)/g,"$1 $2").replace(/(\d)(\D)/g,"$1 $2").trim(),e=e.split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),e}function iP(e){if(e.length<2)return e;const t="$1_$2";return e.replace(/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu,t).replace(/(\p{Uppercase_Letter})(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu,t)}const zg=0,Ea=1,eu=2,G6=4;function Y6(e,t){return n=>e(t(n))}function sP(e,t){return t(e)}function X6(e,t){return n=>e(t,n)}function HS(e,t){return()=>e(t)}function Pg(e,t){return t(e),e}function Bt(...e){return e}function aP(e){e()}function VS(e){return()=>e}function lP(...e){return()=>{e.map(aP)}}function g_(e){return e!==void 0}function tu(){}function vt(e,t){return e(Ea,t)}function Ae(e,t){e(zg,t)}function y_(e){e(eu)}function Qo(e){return e(G6)}function ye(e,t){return vt(e,X6(t,zg))}function ds(e,t){const n=e(Ea,o=>{n(),t(o)});return n}function Je(){const e=[];return(t,n)=>{switch(t){case eu:e.splice(0,e.length);return;case Ea:return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)};case zg:e.slice().forEach(o=>{o(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ae(e){let t=e;const n=Je();return(o,r)=>{switch(o){case Ea:r(t);break;case zg:t=r;break;case G6:return t}return n(o,r)}}function cP(e){let t,n;const o=()=>t&&t();return function(r,i){switch(r){case Ea:return i?n===i?void 0:(o(),n=i,t=vt(e,i),t):(o(),tu);case eu:o(),n=null;return;default:throw new Error(`unrecognized action ${r}`)}}}function nr(e){return Pg(Je(),t=>ye(e,t))}function so(e,t){return Pg(ae(t),n=>ye(e,n))}function uP(...e){return t=>e.reduceRight(sP,t)}function te(e,...t){const n=uP(...t);return(o,r)=>{switch(o){case Ea:return vt(e,n(r));case eu:y_(e);return}}}function J6(e,t){return e===t}function Pt(e=J6){let t;return n=>o=>{e(t,o)||(t=o,n(o))}}function Ee(e){return t=>n=>{e(n)&&t(n)}}function ue(e){return t=>Y6(t,e)}function Gi(e){return t=>()=>t(e)}function wi(e,t){return n=>o=>n(t=e(t,o))}function Pc(e){return t=>n=>{e>0?e--:t(n)}}function ta(e){let t=null,n;return o=>r=>{t=r,!n&&(n=setTimeout(()=>{n=void 0,o(t)},e))}}function US(e){let t,n;return o=>r=>{t=r,n&&clearTimeout(n),n=setTimeout(()=>{o(t)},e)}}function He(...e){const t=new Array(e.length);let n=0,o=null;const r=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);vt(i,l=>{const c=n;n=n|a,t[s]=l,c!==r&&n===r&&o&&(o(),o=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===r?a():o=a}}function jS(...e){return function(t,n){switch(t){case Ea:return lP(...e.map(o=>vt(o,n)));case eu:return;default:throw new Error(`unrecognized action ${t}`)}}}function Te(e,t=J6){return te(e,Pt(t))}function hn(...e){const t=Je(),n=new Array(e.length);let o=0;const r=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);vt(i,l=>{n[s]=l,o=o|a,o===r&&Ae(t,n)})}),function(i,s){switch(i){case Ea:return o===r&&s(n),vt(t,s);case eu:return y_(t);default:throw new Error(`unrecognized action ${i}`)}}}function mt(e,t=[],{singleton:n}={singleton:!0}){return{id:dP(),constructor:e,dependencies:t,singleton:n}}const dP=()=>Symbol();function fP(e){const t=new Map,n=({id:o,constructor:r,dependencies:i,singleton:s})=>{if(s&&t.has(o))return t.get(o);const a=r(i.map(l=>n(l)));return s&&t.set(o,a),a};return n(e)}function pP(e,t){const n={},o={};let r=0;const i=e.length;for(;r(b[y]=v=>{const w=g[t.methods[y]];Ae(w,v)},b),{})}function u(g){return s.reduce((b,y)=>(b[y]=cP(g[t.events[y]]),b),{})}return{Component:B.forwardRef((g,b)=>{const{children:y,...v}=g,[w]=B.useState(()=>Pg(fP(e),S=>l(S,v))),[_]=B.useState(HS(u,w));return Tp(()=>{for(const S of s)S in v&&vt(_[S],v[S]);return()=>{Object.values(_).map(y_)}},[v,_,w]),Tp(()=>{l(w,v)}),B.useImperativeHandle(b,VS(c(w))),B.createElement(a.Provider,{value:w},n?B.createElement(n,pP([...o,...r,...s],v),y):y)}),usePublisher:g=>B.useCallback(X6(Ae,B.useContext(a)[g]),[g]),useEmitterValue:g=>{const y=B.useContext(a)[g],[v,w]=B.useState(HS(Qo,y));return Tp(()=>vt(y,_=>{_!==v&&w(VS(_))}),[y,v]),v},useEmitter:(g,b)=>{const v=B.useContext(a)[g];Tp(()=>vt(v,b),[b,v])}}}const hP=typeof document<"u"?B.useLayoutEffect:B.useEffect,mP=hP;var or=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(or||{});const gP={0:"debug",1:"log",2:"warn",3:"error"},yP=()=>typeof globalThis>"u"?window:globalThis,Ca=mt(()=>{const e=ae(3);return{log:ae((n,o,r=1)=>{var i;const s=(i=yP().VIRTUOSO_LOG_LEVEL)!=null?i:Qo(e);r>=s&&console[gP[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:e}},[],{singleton:!0});function v_(e,t=!0){const n=B.useRef(null);let o=r=>{};if(typeof ResizeObserver<"u"){const r=B.useMemo(()=>new ResizeObserver(i=>{const s=i[0].target;s.offsetParent!==null&&e(s)}),[e]);o=i=>{i&&t?(r.observe(i),n.current=i):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Sl(e,t=!0){return v_(e,t).callbackRef}function vP(e,t,n,o,r,i,s){const a=B.useCallback(l=>{const c=bP(l.children,t,"offsetHeight",r);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",m=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,f=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;o({scrollTop:Math.max(m,0),scrollHeight:h,viewportHeight:f}),i?.(wP("row-gap",getComputedStyle(l).rowGap,r)),c!==null&&e(c)},[e,t,r,i,s,o]);return v_(a,n)}function bP(e,t,n,o){const r=e.length;if(r===0)return null;const i=[];for(let s=0;s{const m=d.target,h=m===window||m===document,f=h?window.pageYOffset||document.documentElement.scrollTop:m.scrollTop,g=h?document.documentElement.scrollHeight:m.scrollHeight,b=h?window.innerHeight:m.offsetHeight,y=()=>{e({scrollTop:Math.max(f,0),scrollHeight:g,viewportHeight:b})};d.suppressFlushSync?y():wD.flushSync(y),s.current!==null&&(f===s.current||f<=0||f===g-b)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);B.useEffect(()=>{const d=r||i.current;return o(r||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{o(null),d.removeEventListener("scroll",l)}},[i,l,n,o,r]);function c(d){const m=i.current;if(!m||"offsetHeight"in m&&m.offsetHeight===0)return;const h=d.behavior==="smooth";let f,g,b;m===window?(g=Math.max(va(document.documentElement,"height"),document.documentElement.scrollHeight),f=window.innerHeight,b=document.documentElement.scrollTop):(g=m.scrollHeight,f=va(m,"height"),b=m.scrollTop);const y=g-f;if(d.top=Math.ceil(Math.max(Math.min(y,d.top),0)),K6(f,g)||d.top===b){e({scrollTop:b,scrollHeight:g,viewportHeight:f}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,m.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const po=mt(()=>{const e=Je(),t=Je(),n=ae(0),o=Je(),r=ae(0),i=Je(),s=Je(),a=ae(0),l=ae(0),c=ae(0),u=ae(0),d=Je(),m=Je(),h=ae(!1);return ye(te(e,ue(({scrollTop:f})=>f)),t),ye(te(e,ue(({scrollHeight:f})=>f)),s),ye(t,r),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:o,scrollTo:d,scrollBy:m,statefulScrollTop:r,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Xd={lvl:0};function e5(e,t,n,o=Xd,r=Xd){return{k:e,v:t,lvl:n,l:o,r}}function Et(e){return e===Xd}function gc(){return Xd}function j1(e,t){if(Et(e))return Xd;const{k:n,l:o,r}=e;if(t===n){if(Et(o))return r;if(Et(r))return o;{const[i,s]=t5(o);return yh(on(e,{k:i,v:s,l:n5(o)}))}}else return tt&&(a=a.concat(W1(i,t,n))),o>=t&&o<=n&&a.push({k:o,v:r}),o<=n&&(a=a.concat(W1(s,t,n))),a}function ja(e){return Et(e)?[]:[...ja(e.l),{k:e.k,v:e.v},...ja(e.r)]}function t5(e){return Et(e.r)?[e.k,e.v]:t5(e.r)}function n5(e){return Et(e.r)?e.l:yh(on(e,{r:n5(e.r)}))}function on(e,t){return e5(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Ay(e){return Et(e)||e.lvl>e.r.lvl}function WS(e){return q1(r5(e))}function yh(e){const{l:t,r:n,lvl:o}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(Ay(t))return r5(on(e,{lvl:o-1}));if(!Et(t)&&!Et(t.r))return on(t.r,{l:on(t,{r:t.r.l}),r:on(e,{l:t.r.r,lvl:o-1}),lvl:o});throw new Error("Unexpected empty nodes")}else{if(Ay(e))return q1(on(e,{lvl:o-1}));if(!Et(n)&&!Et(n.l)){const r=n.l,i=Ay(r)?n.lvl-1:n.lvl;return on(r,{l:on(e,{r:r.l,lvl:o-1}),r:q1(on(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Bg(e,t,n){if(Et(e))return[];const o=oi(e,t)[0];return _P(W1(e,o,n))}function o5(e,t){const n=e.length;if(n===0)return[];let{index:o,value:r}=t(e[0]);const i=[];for(let s=1;s({index:t,value:n}))}function q1(e){const{r:t,lvl:n}=e;return!Et(t)&&!Et(t.r)&&t.lvl===n&&t.r.lvl===n?on(t,{l:on(e,{r:t.l}),lvl:n+1}):e}function r5(e){const{l:t}=e;return!Et(t)&&t.lvl===e.lvl?on(t,{r:on(e,{l:t.r})}):e}function xm(e,t,n,o=0){let r=e.length-1;for(;o<=r;){const i=Math.floor((o+r)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function i5(e,t,n){return e[xm(e,t,n)]}function xP(e,t,n,o){const r=xm(e,t,o),i=xm(e,n,o,r);return e.slice(r,i+1)}const b_=mt(()=>({recalcInProgress:ae(!1)}),[],{singleton:!0});function SP(e){const{size:t,startIndex:n,endIndex:o}=e;return r=>r.start===n&&(r.end===o||r.end===1/0)&&r.value===t}function qS(e,t){let n=0,o=0;for(;n=u||r===m)&&(e=j1(e,u)):(c=m!==r,l=!0),d>s&&s>=u&&m!==r&&(e=Zo(e,s+1,m));c&&(e=Zo(e,i,r))}return[e,n]}function EP(){return{offsetTree:[],sizeTree:gc(),groupOffsetTree:gc(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function w_({index:e},t){return t===e?0:t0&&(t=Math.max(t,i5(e,o,w_).offset)),o5(xP(e,t,n,CP),kP)}function G1(e,t,n,o){let r=e,i=0,s=0,a=0,l=0;if(t!==0){l=xm(r,t-1,w_),a=r[l].offset;const u=oi(n,t-1);i=u[0],s=u[1],r.length&&r[l].size===oi(n,t)[1]&&(l-=1),r=r.slice(0,l+1)}else r=[];for(const{start:c,value:u}of Bg(n,t,1/0)){const d=c-i,m=d*s+a+d*o;r.push({offset:m,size:u,index:c}),i=c,a=m,s=u}return{offsetTree:r,lastIndex:i,lastOffset:a,lastSize:s}}function IP(e,[t,n,o,r]){t.length>0&&o("received item sizes",t,or.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Et(i)&&t.length===2){const m=t[0].size,h=t[1].size;s=n.reduce((f,g)=>Zo(Zo(f,g,m),g+1,h),s)}else[s,a]=TP(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=G1(e.offsetTree,a,s,r);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((m,h)=>Zo(m,h,Zd(h,l,r)),gc()),groupIndices:n}}function Zd(e,t,n){if(t.length===0)return 0;const{offset:o,index:r,size:i}=i5(t,e,w_),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function NP(e){return typeof e.groupIndex<"u"}function s5(e,t,n){if(NP(e))return t.groupIndices[e.groupIndex]+1;{const o=e.index==="LAST"?n:e.index;let r=a5(o,t);return r=Math.max(0,r,Math.min(n,r)),r}}function a5(e,t){if(!$g(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function $g(e){return!Et(e.groupOffsetTree)}function RP(e){return ja(e).map(({k:t,v:n},o,r)=>{const i=r[o+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const OP={offsetHeight:"height",offsetWidth:"width"},Mi=mt(([{log:e},{recalcInProgress:t}])=>{const n=Je(),o=Je(),r=so(o,0),i=Je(),s=Je(),a=ae(0),l=ae([]),c=ae(void 0),u=ae(void 0),d=ae((S,x)=>va(S,OP[x])),m=ae(void 0),h=ae(0),f=EP(),g=so(te(n,He(l,e,h),wi(IP,f),Pt()),f),b=so(te(l,Pt(),wi((S,x)=>({prev:S.current,current:x}),{prev:[],current:[]}),ue(({prev:S})=>S)),[]);ye(te(l,Ee(S=>S.length>0),He(g,h),ue(([S,x,T])=>{const E=S.reduce((N,I,O)=>Zo(N,I,Zd(I,x.offsetTree,T)||O),gc());return{...x,groupIndices:S,groupOffsetTree:E}})),g),ye(te(o,He(g),Ee(([S,{lastIndex:x}])=>S[{startIndex:S,endIndex:x,size:T}])),n),ye(c,u);const y=so(te(c,ue(S=>S===void 0)),!0);ye(te(u,Ee(S=>S!==void 0&&Et(Qo(g).sizeTree)),ue(S=>[{startIndex:0,endIndex:0,size:S}])),n);const v=nr(te(n,He(g),wi(({sizes:S},[x,T])=>({changed:T!==S,sizes:T}),{changed:!1,sizes:f}),ue(S=>S.changed)));vt(te(a,wi((S,x)=>({diff:S.prev-x,prev:x}),{diff:0,prev:0}),ue(S=>S.diff)),S=>{const{groupIndices:x}=Qo(g);if(S>0)Ae(t,!0),Ae(i,S+qS(S,x));else if(S<0){const T=Qo(b);T.length>0&&(S-=qS(-S,T)),Ae(s,S)}}),vt(te(a,He(e)),([S,x])=>{S<0&&x("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},or.ERROR)});const w=nr(i);ye(te(i,He(g),ue(([S,x])=>{const T=x.groupIndices.length>0,E=[],N=x.lastSize;if(T){const I=Jd(x.sizeTree,0);let O=0,R=0;for(;O{let A=M.ranges;return M.prevSize!==0&&(A=[...M.ranges,{startIndex:M.prevIndex,endIndex:D+S-1,size:M.prevSize}]),{ranges:A,prevIndex:D+S,prevSize:$}},{ranges:E,prevIndex:S,prevSize:0}).ranges}return ja(x.sizeTree).reduce((I,{k:O,v:R})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:O+S-1,size:I.prevSize}],prevIndex:O+S,prevSize:R}),{ranges:[],prevIndex:0,prevSize:N}).ranges})),n);const _=nr(te(s,He(g,h),ue(([S,{offsetTree:x},T])=>{const E=-S;return Zd(E,x,T)})));return ye(te(s,He(g,h),ue(([S,x,T])=>{if(x.groupIndices.length>0){if(Et(x.sizeTree))return x;let N=gc();const I=Qo(b);let O=0,R=0,z=0;for(;O<-S;){z=I[R];const M=I[R+1]-z-1;R++,O+=M+1}if(N=ja(x.sizeTree).reduce((M,{k:D,v:$})=>Zo(M,Math.max(0,D+S),$),N),O!==-S){const M=Jd(x.sizeTree,z);N=Zo(N,0,M);const D=oi(x.sizeTree,-S+1)[1];N=Zo(N,1,D)}return{...x,sizeTree:N,...G1(x.offsetTree,0,N,T)}}else{const N=ja(x.sizeTree).reduce((I,{k:O,v:R})=>Zo(I,Math.max(0,O+S),R),gc());return{...x,sizeTree:N,...G1(x.offsetTree,0,N,T)}}})),g),{data:m,totalCount:o,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:_,beforeUnshiftWith:w,firstItemIndex:a,gap:h,sizes:g,listRefresh:v,statefulTotalCount:r,trackItemSizes:y,itemSize:d}},Bt(Ca,b_),{singleton:!0}),AP=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function l5(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!AP)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Mf=mt(([{sizes:e,totalCount:t,listRefresh:n,gap:o},{scrollingInProgress:r,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:m}])=>{const h=Je(),f=ae(0);let g=null,b=null,y=null;function v(){g&&(g(),g=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Ae(r,!1)}return ye(te(h,He(e,i,t,f,l,c,m),He(o,u,d),ue(([[w,_,S,x,T,E,N,I],O,R,z])=>{const k=l5(w),{align:M,behavior:D,offset:$}=k,A=x-1,L=s5(k,_,A);let P=Zd(L,_.offsetTree,O)+E;M==="end"?(P+=R+oi(_.sizeTree,L)[1]-S+z,L===A&&(P+=N)):M==="center"?P+=(R+oi(_.sizeTree,L)[1]-S+z)/2:P-=T,$&&(P+=$);const F=H=>{v(),H?(I("retrying to scroll to",{location:w},or.DEBUG),Ae(h,w)):I("list did not change, scroll successful",{},or.DEBUG)};if(v(),D==="smooth"){let H=!1;y=vt(n,U=>{H=H||U}),g=ds(a,()=>{F(H)})}else g=ds(te(n,MP(150)),F);return b=setTimeout(()=>{v()},1200),Ae(r,!0),I("scrolling from index to",{index:L,top:P,behavior:D},or.DEBUG),{top:P,behavior:D}})),s),{scrollToIndex:h,topListHeight:f}},Bt(Mi,po,Ca),{singleton:!0});function MP(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return o=>{o&&(t(!0),clearTimeout(n))}}}const Kd="up",gd="down",DP="none",zP={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},PP=0,Df=mt(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:o,footerHeight:r,scrollBy:i}])=>{const s=ae(!1),a=ae(!0),l=Je(),c=Je(),u=ae(4),d=ae(PP),m=so(te(jS(te(Te(t),Pc(1),Gi(!0)),te(Te(t),Pc(1),Gi(!1),US(100))),Pt()),!1),h=so(te(jS(te(i,Gi(!0)),te(i,Gi(!1),US(200))),Pt()),!1);ye(te(hn(Te(t),Te(d)),ue(([v,w])=>v<=w),Pt()),a),ye(te(a,ta(50)),c);const f=nr(te(hn(e,Te(n),Te(o),Te(r),Te(u)),wi((v,[{scrollTop:w,scrollHeight:_},S,x,T,E])=>{const N=w+S-_>-E,I={viewportHeight:S,scrollTop:w,scrollHeight:_};if(N){let R,z;return w>v.state.scrollTop?(R="SCROLLED_DOWN",z=v.state.scrollTop-w):(R="SIZE_DECREASED",z=v.state.scrollTop-w||v.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:R,scrollTopDelta:z}}let O;return I.scrollHeight>v.state.scrollHeight?O="SIZE_INCREASED":Sv&&v.atBottom===w.atBottom))),g=so(te(e,wi((v,{scrollTop:w,scrollHeight:_,viewportHeight:S})=>{if(K6(v.scrollHeight,_))return{scrollTop:w,scrollHeight:_,jump:0,changed:!1};{const x=_-(w+S)<1;return v.scrollTop!==w&&x?{scrollHeight:_,scrollTop:w,jump:v.scrollTop-w,changed:!0}:{scrollHeight:_,scrollTop:w,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),Ee(v=>v.changed),ue(v=>v.jump)),0);ye(te(f,ue(v=>v.atBottom)),s),ye(te(s,ta(50)),l);const b=ae(gd);ye(te(e,ue(({scrollTop:v})=>v),Pt(),wi((v,w)=>Qo(h)?{direction:v.direction,prevScrollTop:w}:{direction:wv.direction)),b),ye(te(e,ta(50),Gi(DP)),b);const y=ae(0);return ye(te(m,Ee(v=>!v),Gi(0)),y),ye(te(t,ta(100),He(m),Ee(([v,w])=>!!w),wi(([v,w],[_])=>[w,_],[0,0]),ue(([v,w])=>w-v)),y),{isScrolling:m,isAtTop:a,isAtBottom:s,atBottomState:f,atTopStateChange:c,atBottomStateChange:l,scrollDirection:b,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:y,lastJumpDueToItemResize:g}},Bt(po)),ka=mt(([{log:e}])=>{const t=ae(!1),n=nr(te(t,Ee(o=>o),Pt()));return vt(t,o=>{o&&Qo(e)("props updated",{},or.DEBUG)}),{propsReady:t,didMount:n}},Bt(Ca),{singleton:!0});function __(e,t){e==0?t():requestAnimationFrame(()=>__(e-1,t))}function x_(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const zf=mt(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:o},{scrollToIndex:r},{didMount:i}])=>{const s=ae(!0),a=ae(0),l=ae(!1);return ye(te(i,He(a),Ee(([c,u])=>!!u),Gi(!1)),s),vt(te(hn(t,i),He(s,e,n,l),Ee(([[,c],u,{sizeTree:d},m,h])=>c&&(!Et(d)||g_(m))&&!u&&!h),He(a)),([,c])=>{Ae(l,!0),__(3,()=>{ds(o,()=>Ae(s,!0)),Ae(r,c)})}),{scrolledToInitialItem:s,initialTopMostItemIndex:a}},Bt(Mi,po,Mf,ka),{singleton:!0});function GS(e){return e?e==="smooth"?"smooth":"auto":!1}const BP=(e,t)=>typeof e=="function"?GS(e(t)):t&&GS(e),$P=mt(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:o},{scrollToIndex:r},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ae(!1),d=Je();let m=null;function h(g){Ae(r,{index:"LAST",align:"end",behavior:g})}vt(te(hn(te(Te(e),Pc(1)),a),He(Te(u),n,i,c),ue(([[g,b],y,v,w,_])=>{let S=b&&w,x="auto";return S&&(x=BP(y,v||_),S=S&&!!x),{totalCount:g,shouldFollow:S,followOutputBehavior:x}}),Ee(({shouldFollow:g})=>g)),({totalCount:g,followOutputBehavior:b})=>{m&&(m(),m=null),m=ds(t,()=>{Qo(l)("following output to ",{totalCount:g},or.DEBUG),h(b),m=null})});function f(g){const b=ds(o,y=>{g&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Qo(l)("scrolling to bottom due to increased size",{},or.DEBUG),h("auto"))});setTimeout(b,100)}return vt(te(hn(Te(u),e,s),Ee(([g,,b])=>g&&b),wi(({value:g},[,b])=>({refreshed:g===b,value:b}),{refreshed:!1,value:0}),Ee(({refreshed:g})=>g),He(u,e)),([,g])=>{f(g!==!1)}),vt(d,()=>{f(Qo(u)!==!1)}),vt(hn(Te(u),o),([g,b])=>{g&&!b.atBottom&&b.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Bt(Mi,Df,Mf,zf,ka,Ca,po));function FP(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const c5=mt(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:o,headerHeight:r}])=>{const i=Je(),s=Je(),a=nr(te(i,ue(FP)));return ye(te(a,ue(l=>l.totalCount)),e),ye(te(a,ue(l=>l.groupIndices)),t),ye(te(hn(o,n,r),Ee(([l,c])=>$g(c)),ue(([l,c,u])=>oi(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Pt(),ue(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Bt(Mi,po));function Qd(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function u5(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Sm="top",Tm="bottom",YS="none";function XS(e,t,n){return typeof e=="number"?n===Kd&&t===Sm||n===gd&&t===Tm?e:0:n===Kd?t===Sm?e.main:e.reverse:t===Tm?e.main:e.reverse}function JS(e,t){return typeof e=="number"?e:e[t]||0}const S_=mt(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:o,fixedHeaderHeight:r}])=>{const i=Je(),s=ae(0),a=ae(0),l=ae(0),c=so(te(hn(Te(e),Te(t),Te(o),Te(i,Qd),Te(l),Te(s),Te(r),Te(n),Te(a)),ue(([u,d,m,[h,f],g,b,y,v,w])=>{const _=u-v,S=b+y,x=Math.max(m-_,0);let T=YS;const E=JS(w,Sm),N=JS(w,Tm);return h-=v,h+=m+y,f+=m+y,f-=v,h>u+S-E&&(T=Kd),fu!=null),Pt(Qd)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Bt(po),{singleton:!0});function HP(e,t,n){if($g(t)){const o=a5(e,t);return[{index:oi(t.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const My={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function ZS(e,t,n){if(e.length===0)return[];if(!$g(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const o=e[0].index,r=e[e.length-1].index,i=[],s=Bg(t.groupOffsetTree,o,r);let a,l=0;for(const c of e){(!a||a.end0){c=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=n-l,m=a+d*s+(d-1)*o,h=c,f=m-u;return{items:ZS(e,r,i),topItems:ZS(t,r,i),topListHeight:t.reduce((g,b)=>b.size+g,0),offsetTop:c,offsetBottom:f,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function d5(e,t,n,o,r,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=x_(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return vh(c,[],a,r,n,o)}const Tl=mt(([{sizes:e,totalCount:t,data:n,firstItemIndex:o,gap:r},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},m,{didMount:h},{recalcInProgress:f}])=>{const g=ae([]),b=ae(0),y=Je();ye(i.topItemsIndexes,g);const v=so(te(hn(h,f,Te(s,Qd),Te(t),Te(e),Te(u),c,Te(g),Te(o),Te(r),n),Ee(([x,T,,E,,,,,,,N])=>{const I=N&&N.length!==E;return x&&!T&&!I}),ue(([,,[x,T],E,N,I,O,R,z,k,M])=>{const D=N,{sizeTree:$,offsetTree:A}=D,L=Qo(b);if(E===0)return{...My,totalCount:E};if(x===0&&T===0)return L===0?{...My,totalCount:E}:d5(L,I,N,z,k,M||[]);if(Et($))return L>0?null:vh(HP(x_(I,E),D,M),[],E,k,D,z);const P=[];if(R.length>0){const q=R[0],V=R[R.length-1];let W=0;for(const X of Bg($,q,V)){const J=X.value,Y=Math.max(X.start,q),Q=Math.min(X.end,V);for(let G=Y;G<=Q;G++)P.push({index:G,size:J,offset:W,data:M&&M[G]}),W+=J}}if(!O)return vh([],P,E,k,D,z);const F=R.length>0?R[R.length-1]+1:0,H=LP(A,x,T,F);if(H.length===0)return null;const U=E-1,j=Pg([],q=>{for(const V of H){const W=V.value;let X=W.offset,J=V.start;const Y=W.size;if(W.offset=T);G++)q.push({index:G,size:Y,offset:X,data:M&&M[G]}),X+=Y+k}});return vh(j,P,E,k,D,z)}),Ee(x=>x!==null),Pt()),My);ye(te(n,Ee(g_),ue(x=>x?.length)),t),ye(te(v,ue(x=>x.topListHeight)),d),ye(d,l),ye(te(v,ue(x=>[x.top,x.bottom])),a),ye(te(v,ue(x=>x.items)),y);const w=nr(te(v,Ee(({items:x})=>x.length>0),He(t,n),Ee(([{items:x},T])=>x[x.length-1].originalIndex===T-1),ue(([,x,T])=>[x-1,T]),Pt(Qd),ue(([x])=>x))),_=nr(te(v,ta(200),Ee(({items:x,topItems:T})=>x.length>0&&x[0].originalIndex===T.length),ue(({items:x})=>x[0].index),Pt())),S=nr(te(v,Ee(({items:x})=>x.length>0),ue(({items:x})=>{let T=0,E=x.length-1;for(;x[T].type==="group"&&TT;)E--;return{startIndex:x[T].index,endIndex:x[E].index}}),Pt(u5)));return{listState:v,topItemsIndexes:g,endReached:w,startReached:_,rangeChanged:S,itemsRendered:y,initialItemCount:b,...m}},Bt(Mi,c5,S_,zf,Mf,Df,ka,b_),{singleton:!0}),VP=mt(([{sizes:e,firstItemIndex:t,data:n,gap:o},{initialTopMostItemIndex:r},{initialItemCount:i,listState:s},{didMount:a}])=>(ye(te(a,He(i),Ee(([,l])=>l!==0),He(r,e,t,o,n),ue(([[,l],c,u,d,m,h=[]])=>d5(l,c,u,d,m,h))),s),{}),Bt(Mi,zf,Tl,ka),{singleton:!0}),f5=mt(([{scrollVelocity:e}])=>{const t=ae(!1),n=Je(),o=ae(!1);return ye(te(e,He(o,t,n),Ee(([r,i])=>!!i),ue(([r,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(r,a))return!1}else if(c(r,a))return!0;return s}),Pt()),t),vt(te(hn(t,e,n),He(o)),([[r,i,s],a])=>r&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:o,scrollVelocity:e,scrollSeekRangeChanged:n}},Bt(Df),{singleton:!0}),UP=mt(([{topItemsIndexes:e}])=>{const t=ae(0);return ye(te(t,Ee(n=>n>0),ue(n=>Array.from({length:n}).map((o,r)=>r))),e),{topItemCount:t}},Bt(Tl)),p5=mt(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:o},{listState:r}])=>{const i=Je(),s=so(te(hn(e,o,t,n,r),ue(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ye(Te(s),i),{totalListHeight:s,totalListHeightChanged:i}},Bt(po,Tl),{singleton:!0});function h5(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const jP=h5(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WP=mt(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:o},{isScrolling:r,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:m},{log:h},{recalcInProgress:f}])=>{const g=nr(te(l,He(a),wi(([,y,v,w],[{items:_,totalCount:S,bottom:x,offsetBottom:T},E])=>{const N=x+T;let I=0;return v===S&&y.length>0&&_.length>0&&(_[0].originalIndex===0&&y[0].originalIndex===0||(I=N-w,I!==0&&(I+=E))),[I,_,S,N]},[0,[],0,0]),Ee(([y])=>y!==0),He(t,s,o,i,h,f),Ee(([,y,v,w,,,_])=>!_&&!w&&y!==0&&v===Kd),ue(([[y],,,,,v])=>(v("Upward scrolling compensation",{amount:y},or.DEBUG),y))));function b(y){y>0?(Ae(e,{top:-y,behavior:"auto"}),Ae(n,0)):(Ae(n,0),Ae(e,{top:-y,behavior:"auto"}))}return vt(te(g,He(n,r)),([y,v,w])=>{w&&jP()?Ae(n,v-y):b(-y)}),vt(te(hn(so(r,!1),n,f),Ee(([y,v,w])=>!y&&!w&&v!==0),ue(([y,v])=>v),ta(1)),b),ye(te(u,ue(y=>({top:-y}))),e),vt(te(c,He(d,m),ue(([y,{lastSize:v,groupIndices:w,sizeTree:_},S])=>{function x(T){return T*(v+S)}if(w.length===0)return x(y);{let T=0;const E=Jd(_,0);let N=0,I=0;for(;Ny&&(T-=E,O=y-N+1),N+=O,T+=x(O),I++}return T}})),y=>{Ae(n,y),requestAnimationFrame(()=>{Ae(e,{top:y}),requestAnimationFrame(()=>{Ae(n,0),Ae(f,!1)})})}),{deviation:n}},Bt(po,Df,Tl,Mi,Ca,b_)),qP=mt(([{didMount:e},{scrollTo:t},{listState:n}])=>{const o=ae(0);return vt(te(e,He(o),Ee(([,r])=>r!==0),ue(([,r])=>({top:r}))),r=>{ds(te(n,Pc(1),Ee(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{Ae(t,r)})})}),{initialScrollTop:o}},Bt(ka,po,Tl),{singleton:!0}),GP=mt(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ae(!1),o=so(te(hn(n,e,t),Ee(([r])=>r),ue(([,r,i])=>Math.max(0,r-i)),ta(0),Pt()),0);return{alignToBottom:n,paddingTopAddition:o}},Bt(po,p5),{singleton:!0}),T_=mt(([{scrollTo:e,scrollContainerState:t}])=>{const n=Je(),o=Je(),r=Je(),i=ae(!1),s=ae(void 0);return ye(te(hn(n,o),ue(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ye(te(e,He(o),ue(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),r),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:o,windowScrollTo:r}},Bt(po)),YP=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:o,locationParams:{behavior:r,align:i,...s}})=>eo?{...s,behavior:r,align:i??"end"}:null,XP=mt(([{sizes:e,totalCount:t,gap:n},{scrollTop:o,viewportHeight:r,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Je();return ye(te(u,He(e,r,t,i,s,a,o),He(n),ue(([[d,m,h,f,g,b,y,v],w])=>{const{done:_,behavior:S,align:x,calculateViewLocation:T=YP,...E}=d,N=s5(d,m,f-1),I=Zd(N,m.offsetTree,w)+g+b,O=I+oi(m.sizeTree,N)[1],R=v+b,z=v+h-y,k=T({itemTop:I,itemBottom:O,viewportTop:R,viewportBottom:z,locationParams:{behavior:S,align:x,...E}});return k?_&&ds(te(l,Ee(M=>M===!1),Pc(Qo(l)?1:2)),_):_&&_(),k}),Ee(d=>d!==null)),c),{scrollIntoView:u}},Bt(Mi,po,Mf,Tl,Ca),{singleton:!0}),JP=mt(([{sizes:e,sizeRanges:t},{scrollTop:n},{initialTopMostItemIndex:o},{didMount:r},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Je(),c=ae(void 0),u=ae(null),d=ae(null);return ye(s,u),ye(a,d),vt(te(l,He(e,n,i,u,d)),([m,h,f,g,b,y])=>{const v=RP(h.sizeTree);g&&b!==null&&y!==null&&(f=b.scrollTop-y.offsetTop),m({ranges:v,scrollTop:f})}),ye(te(c,Ee(g_),ue(ZP)),o),ye(te(r,He(c),Ee(([,m])=>m!==void 0),Pt(),ue(([,m])=>m.ranges)),t),{getState:l,restoreStateFrom:c}},Bt(Mi,po,zf,ka,T_));function ZP(e){return{offset:e.scrollTop,index:0,align:"start"}}const KP=mt(([e,t,n,o,r,i,s,a,l,c])=>({...e,...t,...n,...o,...r,...i,...s,...a,...l,...c}),Bt(S_,VP,ka,f5,p5,qP,GP,T_,XP,Ca)),QP=mt(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:o,trackItemSizes:r,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:m,scrolledToInitialItem:h},f,g,b,{listState:y,topItemsIndexes:v,...w},{scrollToIndex:_},S,{topItemCount:x},{groupCounts:T},E])=>(ye(w.rangeChanged,E.scrollSeekRangeChanged),ye(te(E.windowViewportRect,ue(N=>N.visibleHeight)),f.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:m,scrolledToInitialItem:h,topItemsIndexes:v,topItemCount:x,groupCounts:T,fixedItemHeight:n,defaultItemHeight:o,gap:u,...b,statefulTotalCount:c,listState:y,scrollToIndex:_,trackItemSizes:r,itemSize:i,groupIndices:l,...w,...E,...f,sizes:d,...g}),Bt(Mi,zf,po,JP,$P,Tl,Mf,WP,UP,c5,KP)),Dy="-webkit-sticky",KS="sticky",m5=h5(()=>{if(typeof document>"u")return KS;const e=document.createElement("div");return e.style.position=Dy,e.style.position===Dy?Dy:KS});function g5(e,t){const n=B.useRef(null),o=B.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const m=t.getBoundingClientRect(),h=l.top-m.top;u=m.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:r,ref:i}=v_(o),s=B.useCallback(()=>{o(i.current)},[o,i]);return B.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(s);return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),r}const y5=B.createContext(void 0),v5=B.createContext(void 0);function b5(e){return e}const e9=mt(()=>{const e=ae(l=>`Item ${l}`),t=ae(null),n=ae(l=>`Group ${l}`),o=ae({}),r=ae(b5),i=ae("div"),s=ae(tu),a=(l,c=null)=>so(te(o,ue(u=>u[l]),Pt()),c);return{context:t,itemContent:e,groupContent:n,components:o,computeItemKey:r,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),t9=mt(([e,t])=>({...e,...t}),Bt(QP,e9)),n9=({height:e})=>B.createElement("div",{style:{height:e}}),o9={position:m5(),zIndex:1,overflowAnchor:"none"},r9={overflowAnchor:"none"},QS=B.memo(function({showTopList:t=!1}){const n=Ge("listState"),o=Er("sizeRanges"),r=Ge("useWindowScroll"),i=Ge("customScrollParent"),s=Er("windowScrollContainerState"),a=Er("scrollContainerState"),l=i||r?s:a,c=Ge("itemContent"),u=Ge("context"),d=Ge("groupContent"),m=Ge("trackItemSizes"),h=Ge("itemSize"),f=Ge("log"),g=Er("gap"),{callbackRef:b}=vP(o,h,m,t?tu:l,f,g,i),[y,v]=B.useState(0);E_("deviation",k=>{y!==k&&v(k)});const w=Ge("EmptyPlaceholder"),_=Ge("ScrollSeekPlaceholder")||n9,S=Ge("ListComponent"),x=Ge("ItemComponent"),T=Ge("GroupComponent"),E=Ge("computeItemKey"),N=Ge("isSeeking"),I=Ge("groupIndices").length>0,O=Ge("paddingTopAddition"),R=Ge("scrolledToInitialItem"),z=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop+O,paddingBottom:n.offsetBottom,marginTop:y,...R?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&w?B.createElement(w,Lo(w,u)):B.createElement(S,{...Lo(S,u),ref:b,style:z,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const M=k.originalIndex,D=E(M+n.firstItemIndex,k.data,u);return N?B.createElement(_,{...Lo(_,u),key:D,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?B.createElement(T,{...Lo(T,u),key:D,"data-index":M,"data-known-size":k.size,"data-item-index":k.index,style:o9},d(k.index,u)):B.createElement(x,{...Lo(x,u),...a9(x,k.data),key:D,"data-index":M,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:r9},I?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),i9={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Fg={width:"100%",height:"100%",position:"absolute",top:0},s9={width:"100%",position:m5(),top:0,zIndex:1};function Lo(e,t){if(typeof e!="string")return{context:t}}function a9(e,t){return{item:typeof e=="string"?void 0:t}}const l9=B.memo(function(){const t=Ge("HeaderComponent"),n=Er("headerHeight"),o=Ge("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ge("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null}),c9=B.memo(function(){const t=Ge("FooterComponent"),n=Er("footerHeight"),o=Ge("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ge("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null});function w5({usePublisher:e,useEmitter:t,useEmitterValue:n}){return B.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),m=n("context"),{scrollerRef:h,scrollByCallback:f,scrollToCallback:g}=Q6(l,u,c,d);return t("scrollTo",g),t("scrollBy",f),B.createElement(c,{ref:h,style:{...i9,...i},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Lo(c,m)},s)})}function _5({usePublisher:e,useEmitter:t,useEmitterValue:n}){return B.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),m=n("deviation"),h=n("customScrollParent"),f=n("context"),{scrollerRef:g,scrollByCallback:b,scrollToCallback:y}=Q6(l,u,c,tu,h);return mP(()=>(g.current=h||window,()=>{g.current=null}),[g,h]),t("windowScrollTo",y),t("scrollBy",b),B.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+m}:{}},"data-virtuoso-scroller":!0,...a,...Lo(c,f)},s)})}const u9=({children:e})=>{const t=B.useContext(y5),n=Er("viewportHeight"),o=Er("fixedItemHeight"),r=Sl(Y6(n,i=>va(i,"height")));return B.useEffect(()=>{t&&(n(t.viewportHeight),o(t.itemHeight))},[t,n,o]),B.createElement("div",{style:Fg,ref:r,"data-viewport-type":"element"},e)},d9=({children:e})=>{const t=B.useContext(y5),n=Er("windowViewportRect"),o=Er("fixedItemHeight"),r=Ge("customScrollParent"),i=g5(n,r);return B.useEffect(()=>{t&&(o(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,o]),B.createElement("div",{ref:i,style:Fg,"data-viewport-type":"window"},e)},f9=({children:e})=>{const t=Ge("TopItemListComponent"),n=Ge("headerHeight"),o={...s9,marginTop:`${n}px`},r=Ge("context");return B.createElement(t||"div",{style:o,context:r},e)},p9=B.memo(function(t){const n=Ge("useWindowScroll"),o=Ge("topItemsIndexes").length>0,r=Ge("customScrollParent"),i=r||n?g9:m9,s=r||n?d9:u9;return B.createElement(i,{...t},o&&B.createElement(f9,null,B.createElement(QS,{showTopList:!0})),B.createElement(s,null,B.createElement(l9,null),B.createElement(QS,null),B.createElement(c9,null)))}),{Component:h9,usePublisher:Er,useEmitterValue:Ge,useEmitter:E_}=Z6(t9,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},p9),m9=w5({usePublisher:Er,useEmitterValue:Ge,useEmitter:E_}),g9=_5({usePublisher:Er,useEmitterValue:Ge,useEmitter:E_}),y9=h9,e3={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},v9={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:t3,ceil:n3,floor:Em,min:zy,max:yd}=Math;function b9(e){return{...v9,items:e}}function o3(e,t,n){return Array.from({length:t-e+1}).map((o,r)=>{const i=n===null?null:n[r+e];return{index:r+e,data:i}})}function w9(e,t){return e&&e.column===t.column&&e.row===t.row}function Ep(e,t){return e&&e.width===t.width&&e.height===t.height}const _9=mt(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:o,viewportHeight:r,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,m,{propsReady:h,didMount:f},{windowViewportRect:g,useWindowScroll:b,customScrollParent:y,windowScrollContainerState:v,windowScrollTo:w},_])=>{const S=ae(0),x=ae(0),T=ae(e3),E=ae({height:0,width:0}),N=ae({height:0,width:0}),I=Je(),O=Je(),R=ae(0),z=ae(null),k=ae({row:0,column:0}),M=Je(),D=Je(),$=ae(!1),A=ae(0),L=ae(!0),P=ae(!1);vt(te(f,He(A),Ee(([V,W])=>!!W)),()=>{Ae(L,!1),Ae(x,0)}),vt(te(hn(f,L,N,E,A,P),Ee(([V,W,X,J,,Y])=>V&&!W&&X.height!==0&&J.height!==0&&!Y)),([,,,,V])=>{Ae(P,!0),__(1,()=>{Ae(I,V)}),ds(te(o),()=>{Ae(n,[0,0]),Ae(L,!0)})}),ye(te(D,Ee(V=>V!=null&&V.scrollTop>0),Gi(0)),x),vt(te(f,He(D),Ee(([,V])=>V!=null)),([,V])=>{V&&(Ae(E,V.viewport),Ae(N,V?.item),Ae(k,V.gap),V.scrollTop>0&&(Ae($,!0),ds(te(o,Pc(1)),W=>{Ae($,!1)}),Ae(s,{top:V.scrollTop})))}),ye(te(E,ue(({height:V})=>V)),r),ye(te(hn(Te(E,Ep),Te(N,Ep),Te(k,(V,W)=>V&&V.column===W.column&&V.row===W.row),Te(o)),ue(([V,W,X,J])=>({viewport:V,item:W,gap:X,scrollTop:J}))),M),ye(te(hn(Te(S),t,Te(k,w9),Te(N,Ep),Te(E,Ep),Te(z),Te(x),Te($),Te(L),Te(A)),Ee(([,,,,,,,V])=>!V),ue(([V,[W,X],J,Y,Q,G,Z,,K,ee])=>{const{row:se,column:he}=J,{height:re,width:De}=Y,{width:$e}=Q;if(Z===0&&(V===0||$e===0))return e3;if(De===0){const st=x_(ee,V),Ve=st===0?Math.max(Z-1,0):st;return b9(o3(st,Ve,G))}const ze=x5($e,De,he);let Xe,Ne;K?W===0&&X===0&&Z>0?(Xe=0,Ne=Z-1):(Xe=ze*Em((W+se)/(re+se)),Ne=ze*n3((X+se)/(re+se))-1,Ne=zy(V-1,yd(Ne,ze-1)),Xe=zy(Ne,yd(0,Xe))):(Xe=0,Ne=-1);const je=o3(Xe,Ne,G),{top:it,bottom:xe}=r3(Q,J,Y,je),wt=n3(V/ze),Rt=wt*re+(wt-1)*se-xe;return{items:je,offsetTop:it,offsetBottom:Rt,top:it,bottom:xe,itemHeight:re,itemWidth:De}})),T),ye(te(z,Ee(V=>V!==null),ue(V=>V.length)),S),ye(te(hn(E,N,T,k),Ee(([V,W,{items:X}])=>X.length>0&&W.height!==0&&V.height!==0),ue(([V,W,{items:X},J])=>{const{top:Y,bottom:Q}=r3(V,J,W,X);return[Y,Q]}),Pt(Qd)),n);const F=ae(!1);ye(te(o,He(F),ue(([V,W])=>W||V!==0)),F);const H=nr(te(Te(T),Ee(({items:V})=>V.length>0),He(S,F),Ee(([{items:V},W,X])=>X&&V[V.length-1].index===W-1),ue(([,V])=>V-1),Pt())),U=nr(te(Te(T),Ee(({items:V})=>V.length>0&&V[0].index===0),Gi(0),Pt())),j=nr(te(Te(T),He($),Ee(([{items:V},W])=>V.length>0&&!W),ue(([{items:V}])=>({startIndex:V[0].index,endIndex:V[V.length-1].index})),Pt(u5),ta(0)));ye(j,m.scrollSeekRangeChanged),ye(te(I,He(E,N,S,k),ue(([V,W,X,J,Y])=>{const Q=l5(V),{align:G,behavior:Z,offset:K}=Q;let ee=Q.index;ee==="LAST"&&(ee=J-1),ee=yd(0,ee,zy(J-1,ee));let se=Y1(W,Y,X,ee);return G==="end"?se=t3(se-W.height+X.height):G==="center"&&(se=t3(se-W.height/2+X.height/2)),K&&(se+=K),{top:se,behavior:Z}})),s);const q=so(te(T,ue(V=>V.offsetBottom+V.bottom)),0);return ye(te(g,ue(V=>({width:V.visibleWidth,height:V.visibleHeight}))),E),{data:z,totalCount:S,viewportDimensions:E,itemDimensions:N,scrollTop:o,scrollHeight:O,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:g,windowScrollTo:w,useWindowScroll:b,customScrollParent:y,windowScrollContainerState:v,deviation:R,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:x,gap:k,restoreStateFrom:D,...m,initialTopMostItemIndex:A,gridState:T,totalListHeight:q,...d,startReached:U,endReached:H,rangeChanged:j,stateChanged:M,propsReady:h,stateRestoreInProgress:$,..._}},Bt(S_,po,Df,f5,ka,T_,Ca));function r3(e,t,n,o){const{height:r}=n;if(r===void 0||o.length===0)return{top:0,bottom:0};const i=Y1(e,t,n,o[0].index),s=Y1(e,t,n,o[o.length-1].index)+r;return{top:i,bottom:s}}function Y1(e,t,n,o){const r=x5(e.width,n.width,t.column),i=Em(o/r),s=i*n.height+yd(0,i-1)*t.row;return s>0?s+t.row:s}function x5(e,t,n){return yd(1,Em((e+n)/(Em(t)+n)))}const x9=mt(()=>{const e=ae(c=>`Item ${c}`),t=ae({}),n=ae(null),o=ae("virtuoso-grid-item"),r=ae("virtuoso-grid-list"),i=ae(b5),s=ae("div"),a=ae(tu),l=(c,u=null)=>so(te(t,ue(d=>d[c]),Pt()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:o,listClassName:r,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),S9=mt(([e,t])=>({...e,...t}),Bt(_9,x9)),T9=B.memo(function(){const t=Ft("gridState"),n=Ft("listClassName"),o=Ft("itemClassName"),r=Ft("itemContent"),i=Ft("computeItemKey"),s=Ft("isSeeking"),a=ei("scrollHeight"),l=Ft("ItemComponent"),c=Ft("ListComponent"),u=Ft("ScrollSeekPlaceholder"),d=Ft("context"),m=ei("itemDimensions"),h=ei("gap"),f=Ft("log"),g=Ft("stateRestoreInProgress"),b=Sl(y=>{const v=y.parentElement.parentElement.scrollHeight;a(v);const w=y.firstChild;if(w){const{width:_,height:S}=w.getBoundingClientRect();m({width:_,height:S})}h({row:i3("row-gap",getComputedStyle(y).rowGap,f),column:i3("column-gap",getComputedStyle(y).columnGap,f)})});return g?null:B.createElement(c,{ref:b,className:n,...Lo(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(y=>{const v=i(y.index,y.data,d);return s?B.createElement(u,{key:v,...Lo(u,d),index:y.index,height:t.itemHeight,width:t.itemWidth}):B.createElement(l,{...Lo(l,d),className:o,"data-index":y.index,key:v},r(y.index,y.data,d))}))}),E9=B.memo(function(){const t=Ft("HeaderComponent"),n=ei("headerHeight"),o=Ft("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ft("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null}),C9=B.memo(function(){const t=Ft("FooterComponent"),n=ei("footerHeight"),o=Ft("headerFooterTag"),r=Sl(s=>n(va(s,"height"))),i=Ft("context");return t?B.createElement(o,{ref:r},B.createElement(t,Lo(t,i))):null}),k9=({children:e})=>{const t=B.useContext(v5),n=ei("itemDimensions"),o=ei("viewportDimensions"),r=Sl(i=>{o(i.getBoundingClientRect())});return B.useEffect(()=>{t&&(o({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,o,n]),B.createElement("div",{style:Fg,ref:r},e)},L9=({children:e})=>{const t=B.useContext(v5),n=ei("windowViewportRect"),o=ei("itemDimensions"),r=Ft("customScrollParent"),i=g5(n,r);return B.useEffect(()=>{t&&(o({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,o]),B.createElement("div",{ref:i,style:Fg},e)},I9=B.memo(function({...t}){const n=Ft("useWindowScroll"),o=Ft("customScrollParent"),r=o||n?R9:N9,i=o||n?L9:k9;return B.createElement(r,{...t},B.createElement(i,null,B.createElement(E9,null),B.createElement(T9,null),B.createElement(C9,null)))}),{Component:Hle,usePublisher:ei,useEmitterValue:Ft,useEmitter:S5}=Z6(S9,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},I9),N9=w5({usePublisher:ei,useEmitterValue:Ft,useEmitter:S5}),R9=_5({usePublisher:ei,useEmitterValue:Ft,useEmitter:S5});function i3(e,t,n){return t!=="normal"&&!t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,or.WARN),t==="normal"?0:parseInt(t??"0",10)}const O9="_lazy-list_1owqy_1",A9="_sortable-overlay_1owqy_5",M9="_scrollable_1owqy_26",D9="_underlay-blur_1owqy_30",z9="_underlay-blur-enabled_1owqy_39",P9="_underlay-blur-disabled_1owqy_41",B9="_underlay-blur-show_1owqy_43",Wa={"lazy-list":"_lazy-list_1owqy_1",lazyList:O9,"sortable-overlay":"_sortable-overlay_1owqy_5",sortableOverlay:A9,scrollable:M9,"underlay-blur":"_underlay-blur_1owqy_30",underlayBlur:D9,"underlay-blur-enabled":"_underlay-blur-enabled_1owqy_39",underlayBlurEnabled:z9,"underlay-blur-disabled":"_underlay-blur-disabled_1owqy_41",underlayBlurDisabled:P9,"underlay-blur-show":"_underlay-blur-show_1owqy_43",underlayBlurShow:B9},T5=({className:e,handleRangeChanged:t,handleScrollDone:n,parent:o,renderItem:r,scrollTo:i,smoothScroll:s,totalCount:a})=>{const l=p.useRef(null),[c,u]=p.useState(),d=p.useCallback(m=>{t?.({firstIndex:m.startIndex,lastIndex:m.endIndex})},[t]);return p.useEffect(()=>{i!==void 0&&l.current?.scrollIntoView({index:i,behavior:s?"smooth":void 0,align:"center",done:n})},[i,n,s]),C.jsx(ru,{container:c,className:e,children:C.jsx(y9,{ref:l,scrollerRef:u,customScrollParent:o??void 0,className:Wa.lazyList,totalCount:a,itemContent:r,rangeChanged:d})})};function $9(){return OA()&&E5()&&F9()}function F9(){return typeof document.body.checkVisibility=="function"}function H9(e){return e?.checkVisibility!=null&&e.checkVisibility()}function E5(){return typeof navigator.userActivation=="object"}function V9(){return E5()&&navigator.userActivation.hasBeenActive}const C5=({children:e,pull:t})=>{const n=p.useRef(null);return p.useEffect(()=>{let o,r;if(n.current!=null)for(const u of n.current.querySelectorAll("[tabindex]"))i(u);return o?.addEventListener("keydown",s),r?.addEventListener("keydown",a),t&&l(),()=>{o?.removeEventListener("keydown",s),r?.removeEventListener("keydown",a),document.removeEventListener("keydown",c)};function i(u){H9(u)&&(o===void 0?o=u:r=u)}function s(u){u.key!=="Tab"||!u.shiftKey||(u.preventDefault(),r?.focus())}function a(u){u.key!=="Tab"||u.shiftKey||(u.preventDefault(),o?.focus())}function l(){o!==void 0?o.focus():document.addEventListener("keydown",c)}function c(u){u.key==="Tab"&&u.preventDefault()}},[e,t]),C.jsx("span",{ref:n,children:e})};function k5(e,t,n){const o={...e};return t.top+e.y<=n.top?o.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(o.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?o.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(o.x=n.left+n.width-t.right),o}const U9=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return!n||!t?o:k5(o,n,t)},j9=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:o}=e;const r=o[0];return!t||!r?n:k5(n,t,r)},W9=e=>{let{transform:t}=e;return{...t,x:0}},C_=({bound:e,children:t,handleSort:n,indexRange:o,renderOverlay:r})=>{const[i,s]=p.useState(),a=p.useCallback(g=>{document.body.style.setProperty("cursor","grabbing","important"),s(parseInt(g.active.id))},[]),l=p.useCallback(g=>{document.body.style.setProperty("cursor",""),s(void 0),g.over!=null&&g.active.id!==g.over.id&&n?.(parseInt(g.active.id),parseInt(g.over.id))},[n]),c=p.useCallback(()=>{const g=Array.isArray(t)?t.length:1;return Array.from({length:g},(b,y)=>y.toString())},[t]),u=p.useCallback(()=>{const g=o.firstIndex,y=o.lastIndex-g+1;return Array.from({length:y},(v,w)=>(g+w).toString())},[o]),d=o===void 0?c():u(),m=_z(wz(f_,{activationConstraint:{distance:0}})),h=[W9];e===zc.Ancestor&&h.push(U9),e===zc.Scrollable&&h.push(j9);const f=p.useMemo(()=>r&&En.createPortal(C.jsx(F7,{className:Wa.sortableOverlay,dropAnimation:null,children:i===void 0?null:r(i)}),document.body),[i,r]);return C.jsxs(_7,{accessibility:{container:document.body},onDragStart:a,onDragEnd:l,sensors:m,collisionDetection:kz,modifiers:h,children:[C.jsx(q7,{items:d,strategy:j7,children:t}),f]})};function k_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let El=k_();function L5(e){El=e}const I5=/[&<>"']/,q9=new RegExp(I5.source,"g"),N5=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,G9=new RegExp(N5.source,"g"),Y9={"&":"&","<":"<",">":">",'"':""","'":"'"},s3=e=>Y9[e];function Xo(e,t){if(t){if(I5.test(e))return e.replace(q9,s3)}else if(N5.test(e))return e.replace(G9,s3);return e}const X9=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function J9(e){return e.replace(X9,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Z9=/(^|[^\[])\^/g;function bt(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const o={replace:(r,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Z9,"$1"),n=n.replace(r,s),o},getRegex:()=>new RegExp(n,t)};return o}function a3(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vd={exec:()=>null};function l3(e,t){const n=e.replace(/\|/g,(i,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),o=n.split(/ \|/);let r=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length{const i=r.match(/^\s+/);if(i===null)return r;const[s]=i;return s.length>=o.length?r.slice(o.length):r}).join(` -`)}class Em{options;rules;lexer;constructor(t){this.options=t||Cl}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const o=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Ep(o,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const o=n[0],r=J9(o,n[3]||"");return{type:"code",raw:o,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:r}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let o=n[2].trim();if(/#$/.test(o)){const r=Ep(o,"#");(this.options.pedantic||!r||/ $/.test(r))&&(o=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const o=Ep(n[0].replace(/^ *>[ \t]?/gm,""),` +`)}class Cm{options;rules;lexer;constructor(t){this.options=t||El}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const o=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Cp(o,` +`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const o=n[0],r=Q9(o,n[3]||"");return{type:"code",raw:o,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:r}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let o=n[2].trim();if(/#$/.test(o)){const r=Cp(o,"#");(this.options.pedantic||!r||/ $/.test(r))&&(o=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const o=Cp(n[0].replace(/^ *>[ \t]?/gm,""),` `),r=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(o);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:o}}}list(t){let n=this.rules.block.list.exec(t);if(n){let o=n[1].trim();const r=o.length>1,i={type:"list",raw:"",ordered:r,start:r?+o.slice(0,-1):"",loose:!1,items:[]};o=r?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=r?o:"[*+-]");const s=new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",l="",c=!1;for(;t;){let u=!1;if(!(n=s.exec(t))||this.rules.block.hr.test(t))break;a=n[0],t=t.substring(a.length);let d=n[2].split(` `,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),m=t.split(` `,1)[0],h=0;this.options.pedantic?(h=2,l=d.trimStart()):(h=n[2].search(/[^ ]/),h=h>4?1:h,l=d.slice(h),h+=n[1].length);let f=!1;if(!d&&/^ *$/.test(m)&&(a+=m+` @@ -468,8 +468,8 @@ Error generating stack: `+i.message+` `+m}!f&&!m.trim()&&(f=!0),a+=S+` `,t=t.substring(S.length+1),d=m.slice(h)}}i.loose||(c?i.loose=!0:/\n *\n *$/.test(a)&&(c=!0));let g=null,b;this.options.gfm&&(g=/^\[[ xX]\] /.exec(l),g&&(b=g[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:a,task:!!g,checked:b,loose:!1,text:l,tokens:[]}),i.raw+=a}i.items[i.items.length-1].raw=a.trimEnd(),i.items[i.items.length-1].text=l.trimEnd(),i.raw=i.raw.trimEnd();for(let u=0;uh.type==="space"),m=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));i.loose=m}if(i.loose)for(let u=0;u$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:o,raw:n[0],href:r,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const o=l3(n[1]),r=n[2].replace(/^\||\| *$/g,"").split("|"),i=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` `):[],s={type:"table",raw:n[0],header:[],align:[],rows:[]};if(o.length===r.length){for(const a of r)/^ *-+: *$/.test(a)?s.align.push("right"):/^ *:-+: *$/.test(a)?s.align.push("center"):/^ *:-+ *$/.test(a)?s.align.push("left"):s.align.push(null);for(const a of o)s.header.push({text:a,tokens:this.lexer.inline(a)});for(const a of i)s.rows.push(l3(a,s.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return s}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const o=n[1].charAt(n[1].length-1)===` -`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:o,tokens:this.lexer.inline(o)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:Xo(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const o=n[2].trim();if(!this.options.pedantic&&/^$/.test(o))return;const s=Ep(o.slice(0,-1),"\\");if((o.length-s.length)%2===0)return}else{const s=X9(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let r=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return r=r.trim(),/^$/.test(o)?r=r.slice(1):r=r.slice(1,-1)),c3(n,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(t,n){let o;if((o=this.rules.inline.reflink.exec(t))||(o=this.rules.inline.nolink.exec(t))){const r=(o[2]||o[1]).replace(/\s+/g," "),i=n[r.toLowerCase()];if(!i){const s=o[0].charAt(0);return{type:"text",raw:s,text:s}}return c3(o,i,o[0],this.lexer)}}emStrong(t,n,o=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r||r[3]&&o.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const s=[...r[0]].length-1;let a,l,c=s,u=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(r=d.exec(n))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=[...a].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const m=[...r[0]][0].length,h=t.slice(0,s+r.index+m+l);if(Math.min(s,l)%2){const g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}const f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let o=n[2].replace(/\n/g," ");const r=/[^ ]/.test(o),i=/^ /.test(o)&&/ $/.test(o);return r&&i&&(o=o.substring(1,o.length-1)),o=Xo(o,!0),{type:"codespan",raw:n[0],text:o}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let o,r;return n[2]==="@"?(o=Xo(n[1]),r="mailto:"+o):(o=Xo(n[1]),r=o),{type:"link",raw:n[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let o,r;if(n[2]==="@")o=Xo(n[0]),r="mailto:"+o;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(i!==n[0]);o=Xo(n[0]),n[1]==="www."?r="http://"+n[0]:r=n[0]}return{type:"link",raw:n[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=n[0]:o=Xo(n[0]),{type:"text",raw:n[0],text:o}}}}const Z9=/^(?: *(?:\n|$))+/,K9=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Q9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,eB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,R5=/(?:[*+-]|\d{1,9}[.)])/,N5=bt(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,R5).getRegex(),L2=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tB=/^[^\n]+/,I2=/(?!\s*\])(?:\\.|[^\[\]\\])+/,nB=bt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",I2).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),oB=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,R5).getRegex(),Hg="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",R2=/|$)/,rB=bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",R2).replace("tag",Hg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O5=bt(L2).replace("hr",Pf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex(),iB=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",O5).getRegex(),N2={blockquote:iB,code:K9,def:nB,fences:Q9,heading:eB,hr:Pf,html:rB,lheading:N5,list:oB,newline:Z9,paragraph:O5,table:vd,text:tB},u3=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex(),sB={...N2,table:u3,paragraph:bt(L2).replace("hr",Pf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",u3).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex()},aB={...N2,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",R2).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(L2).replace("hr",Pf).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",N5).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},A5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,lB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,M5=/^( {2,}|\\)\n(?!\s*$)/,cB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~",uB=bt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Bf).getRegex(),dB=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,fB=bt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Bf).getRegex(),pB=bt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Bf).getRegex(),hB=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Bf).getRegex(),mB=bt(/\\([punct])/,"gu").replace(/punct/g,Bf).getRegex(),gB=bt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),yB=bt(R2).replace("(?:-->|$)","-->").getRegex(),vB=bt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",yB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),km=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bB=bt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",km).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),D5=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",km).replace("ref",I2).getRegex(),z5=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",I2).getRegex(),wB=bt("reflink|nolink(?!\\()","g").replace("reflink",D5).replace("nolink",z5).getRegex(),O2={_backpedal:vd,anyPunctuation:mB,autolink:gB,blockSkip:dB,br:M5,code:lB,del:vd,emStrongLDelim:fB,emStrongRDelimAst:pB,emStrongRDelimUnd:hB,escape:A5,link:bB,nolink:z5,punctuation:uB,reflink:D5,reflinkSearch:wB,tag:vB,text:cB,url:vd},_B={...O2,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",km).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",km).getRegex()},X1={...O2,escape:bt(A5).replace("])","~|])").getRegex(),url:bt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const o=n[2].trim();if(!this.options.pedantic&&/^$/.test(o))return;const s=Cp(o.slice(0,-1),"\\");if((o.length-s.length)%2===0)return}else{const s=K9(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let r=n[2],i="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return r=r.trim(),/^$/.test(o)?r=r.slice(1):r=r.slice(1,-1)),c3(n,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(t,n){let o;if((o=this.rules.inline.reflink.exec(t))||(o=this.rules.inline.nolink.exec(t))){const r=(o[2]||o[1]).replace(/\s+/g," "),i=n[r.toLowerCase()];if(!i){const s=o[0].charAt(0);return{type:"text",raw:s,text:s}}return c3(o,i,o[0],this.lexer)}}emStrong(t,n,o=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r||r[3]&&o.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const s=[...r[0]].length-1;let a,l,c=s,u=0;const d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(r=d.exec(n))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=[...a].length,r[3]||r[4]){c+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const m=[...r[0]][0].length,h=t.slice(0,s+r.index+m+l);if(Math.min(s,l)%2){const g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}const f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let o=n[2].replace(/\n/g," ");const r=/[^ ]/.test(o),i=/^ /.test(o)&&/ $/.test(o);return r&&i&&(o=o.substring(1,o.length-1)),o=Xo(o,!0),{type:"codespan",raw:n[0],text:o}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let o,r;return n[2]==="@"?(o=Xo(n[1]),r="mailto:"+o):(o=Xo(n[1]),r=o),{type:"link",raw:n[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let o,r;if(n[2]==="@")o=Xo(n[0]),r="mailto:"+o;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(i!==n[0]);o=Xo(n[0]),n[1]==="www."?r="http://"+n[0]:r=n[0]}return{type:"link",raw:n[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let o;return this.lexer.state.inRawBlock?o=n[0]:o=Xo(n[0]),{type:"text",raw:n[0],text:o}}}}const eB=/^(?: *(?:\n|$))+/,tB=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,nB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,R5=/(?:[*+-]|\d{1,9}[.)])/,O5=bt(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,R5).getRegex(),L_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rB=/^[^\n]+/,I_=/(?!\s*\])(?:\\.|[^\[\]\\])+/,iB=bt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",I_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sB=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,R5).getRegex(),Hg="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",N_=/|$)/,aB=bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",N_).replace("tag",Hg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A5=bt(L_).replace("hr",Pf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex(),lB=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A5).getRegex(),R_={blockquote:lB,code:tB,def:iB,fences:nB,heading:oB,hr:Pf,html:aB,lheading:O5,list:sB,newline:eB,paragraph:A5,table:vd,text:rB},u3=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex(),cB={...R_,table:u3,paragraph:bt(L_).replace("hr",Pf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",u3).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Hg).getRegex()},uB={...R_,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(L_).replace("hr",Pf).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",O5).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,dB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,D5=/^( {2,}|\\)\n(?!\s*$)/,fB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~",pB=bt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Bf).getRegex(),hB=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,mB=bt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Bf).getRegex(),gB=bt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Bf).getRegex(),yB=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Bf).getRegex(),vB=bt(/\\([punct])/,"gu").replace(/punct/g,Bf).getRegex(),bB=bt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wB=bt(N_).replace("(?:-->|$)","-->").getRegex(),_B=bt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",wB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),km=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xB=bt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",km).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),z5=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",km).replace("ref",I_).getRegex(),P5=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",I_).getRegex(),SB=bt("reflink|nolink(?!\\()","g").replace("reflink",z5).replace("nolink",P5).getRegex(),O_={_backpedal:vd,anyPunctuation:vB,autolink:bB,blockSkip:hB,br:D5,code:dB,del:vd,emStrongLDelim:mB,emStrongRDelimAst:gB,emStrongRDelimUnd:yB,escape:M5,link:xB,nolink:P5,punctuation:pB,reflink:z5,reflinkSearch:SB,tag:_B,text:fB,url:vd},TB={...O_,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",km).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",km).getRegex()},X1={...O_,escape:bt(M5).replace("])","~|])").getRegex(),url:bt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let o,r,i,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(o=a.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length),o.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=` `+o.raw,r.text+=` @@ -479,7 +479,7 @@ Error generating stack: `+i.message+` `+o.raw,r.text+=` `+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(o),s=i.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length),r=n[n.length-1],r&&r.type==="text"?(r.raw+=` `+o.raw,r.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(o);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let o,r,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(o=u.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),r=n[n.length-1],r&&o.type==="text"&&r.type==="text"?(r.raw+=o.raw,r.text+=o.text):n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length),r=n[n.length-1],r&&o.type==="text"&&r.type==="text"?(r.raw+=o.raw,r.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,s,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let m;this.options.extensions.startInline.forEach(h=>{m=h.call({lexer:this},d),typeof m=="number"&&m>=0&&(u=Math.min(u,m))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(o=this.tokenizer.inlineText(i)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),l=!0,r=n[n.length-1],r&&r.type==="text"?(r.raw+=o.raw,r.text+=o.text):n.push(o);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}}class hl{options;constructor(t){this.options=t||Cl}code(t,n,o){const r=(n||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+` +`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(o);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let o,r,i,s=t,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(o=u.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),r=n[n.length-1],r&&o.type==="text"&&r.type==="text"?(r.raw+=o.raw,r.text+=o.text):n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length),r=n[n.length-1],r&&o.type==="text"&&r.type==="text"?(r.raw+=o.raw,r.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,s,c)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const d=t.slice(1);let m;this.options.extensions.startInline.forEach(h=>{m=h.call({lexer:this},d),typeof m=="number"&&m>=0&&(u=Math.min(u,m))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(o=this.tokenizer.inlineText(i)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),l=!0,r=n[n.length-1],r&&r.type==="text"?(r.raw+=o.raw,r.text+=o.text):n.push(o);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}}class hl{options;constructor(t){this.options=t||El}code(t,n,o){const r=(n||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+` `,r?'
'+(o?t:Xo(t,!0))+`
`:"
"+(o?t:Xo(t,!0))+`
`}blockquote(t){return`
@@ -497,19 +497,19 @@ ${t}
`}tablerow(t){return` ${t} `}tablecell(t,n){const o=n.header?"th":"td";return(n.align?`<${o} align="${n.align}">`:`<${o}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
"}del(t){return`${t}`}link(t,n,o){const r=a3(t);if(r===null)return o;t=r;let i='
",i}image(t,n,o){const r=a3(t);if(r===null)return o;t=r;let i=`${o}0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b+" "}):g+=b+" "}g+=this.parse(m.tokens,c),u+=this.renderer.listitem(g,f,!!h)}o+=this.renderer.list(u,a,l);continue}case"html":{const s=i;o+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;o+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,a=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1{o=o.concat(this.walkTokens(i[s],n))}):i.tokens&&(o=o.concat(this.walkTokens(i.tokens,n)))}}return o}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(o=>{const r={...o};if(r.async=this.defaults.async||r.async||!1,o.extensions&&(o.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),r.extensions=n),o.renderer){const i=this.defaults.renderer||new hl(this.defaults);for(const s in o.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const a=s,l=o.renderer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d||""}}r.renderer=i}if(o.tokenizer){const i=this.defaults.tokenizer||new Em(this.defaults);for(const s in o.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,l=o.tokenizer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}r.tokenizer=i}if(o.hooks){const i=this.defaults.hooks||new bh;for(const s in o.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const a=s,l=o.hooks[a],c=i[a];bh.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(i,u)).then(m=>c.call(i,m));const d=l.call(i,u);return c.call(i,d)}:i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}r.hooks=i}if(o.walkTokens){const i=this.defaults.walkTokens,s=o.walkTokens;r.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return _i.lex(t,n??this.defaults)}parser(t,n){return xi.parse(t,n??this.defaults)}#e(t,n){return(o,r)=>{const i={...r},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const a=this.#t(!!s.silent,!!s.async);if(typeof o>"u"||o===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(o):o).then(l=>t(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>n(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(a);try{s.hooks&&(o=s.hooks.preprocess(o));let l=t(o,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=n(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(l){return a(l)}}}#t(t,n){return o=>{if(o.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const r="

An error occurred:

"+Xo(o.message+"",!0)+"
";return n?Promise.resolve(r):r}if(n)return Promise.reject(o);throw o}}}const ml=new SB;function pt(e,t){return ml.parse(e,t)}pt.options=pt.setOptions=function(e){return ml.setOptions(e),pt.defaults=ml.defaults,k5(pt.defaults),pt};pt.getDefaults=k2;pt.defaults=Cl;pt.use=function(...e){return ml.use(...e),pt.defaults=ml.defaults,k5(pt.defaults),pt};pt.walkTokens=function(e,t){return ml.walkTokens(e,t)};pt.parseInline=ml.parseInline;pt.Parser=xi;pt.parser=xi.parse;pt.Renderer=hl;pt.TextRenderer=A2;pt.Lexer=_i;pt.lexer=_i.lex;pt.Tokenizer=Em;pt.Hooks=bh;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;xi.parse;_i.lex;const TB="_markdown_kljlj_1",CB={markdown:TB},ef=new hl;ef.link=(e,t,n)=>hl.prototype.link.call(ef,e,t,n).replace("{return hl.prototype.table.call(ef,n()?e:"",t);function n(){return e.replaceAll("","").includes("")}};function EB(e){const t=pt.parse(e,{renderer:ef});return`${t}`}const qr=(e,t)=>{const{o:n,u:o,_:r}=e;let i=n,s;const a=(u,d)=>{const m=i,h=u,f=d||(o?!o(m,h):m!==h);return(f||r)&&(i=h,s=m),[i,f,s]};return[t?u=>a(t(i,s),u):a,u=>[i,!!u,s]]},M2=typeof window<"u",P5=M2&&Node.ELEMENT_NODE,{toString:kB,hasOwnProperty:Py}=Object.prototype,LB=/^\[object (.+)\]$/,El=e=>e===void 0,Vg=e=>e===null,IB=e=>El(e)||Vg(e)?`${e}`:kB.call(e).replace(LB,"$1").toLowerCase(),ki=e=>typeof e=="number",$f=e=>typeof e=="string",B5=e=>typeof e=="boolean",ri=e=>typeof e=="function",Ni=e=>Array.isArray(e),tf=e=>typeof e=="object"&&!Ni(e)&&!Vg(e),Ug=e=>{const t=!!e&&e.length,n=ki(t)&&t>-1&&t%1==0;return Ni(e)||!ri(e)&&n?t>0&&tf(e)?t-1 in e:!0:!1},Lm=e=>{if(!e||!tf(e)||IB(e)!=="object")return!1;let t;const n="constructor",o=e[n],r=o&&o.prototype,i=Py.call(e,n),s=r&&Py.call(r,"isPrototypeOf");if(o&&!i&&!s)return!1;for(t in e);return El(t)||Py.call(e,t)},bd=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===P5:!1},jg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===P5:!1};function et(e,t){if(Ug(e))for(let n=0;nt(e[n],n,e));return e}const Wg=(e,t)=>e.indexOf(t)>=0,Ji=(e,t)=>e.concat(t),dt=(e,t,n)=>(!n&&!$f(t)&&Ug(t)?Array.prototype.push.apply(e,t):e.push(t),e),nu=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(o=>{dt(n,o)}):et(e,o=>{dt(n,o)}),n)},$5=e=>Ni(e)?e:[e],Im=e=>!!e&&!e.length,d3=e=>nu(new Set(e)),Dr=(e,t,n)=>{et(e,r=>r&&r.apply(void 0,t||[])),!n&&(e.length=0)},qg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fs=e=>e?Object.keys(e):[],ot=(e,t,n,o,r,i,s)=>{const a=[t,n,o,r,i,s];return(typeof e!="object"||Vg(e))&&!ri(e)&&(e={}),et(a,l=>{et(l,(c,u)=>{const d=l[u];if(e===d)return!0;const m=Ni(d);if(d&&Lm(d)){const h=e[u];let f=h;m&&!Ni(h)?f=[]:!m&&!Lm(h)&&(f={}),e[u]=ot(f,d)}else e[u]=m?d.slice():d})}),e},F5=(e,t)=>et(ot({},e),(n,o,r)=>{n===void 0?delete r[o]:t&&n&&Lm(n)&&(r[o]=F5(n,t))}),D2=e=>{for(const t in e)return!1;return!0},oo=(e,t,n)=>{if(El(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},H5=(e,t)=>new Set((oo(e,t)||"").split(" ")),_o=(e,t)=>{e&&e.removeAttribute(t)},tl=(e,t,n,o)=>{if(n){const r=H5(e,t);r[o?"add":"delete"](n);const i=nu(r).join(" ").trim();oo(e,t,i)}},RB=(e,t,n)=>H5(e,t).has(n),J1=M2&&Element.prototype,V5=(e,t)=>{const n=[],o=t?jg(t)&&t:document;return o?dt(n,o.querySelectorAll(e)):n},NB=(e,t)=>{const n=t?jg(t)&&t:document;return n?n.querySelector(e):null},Rm=(e,t)=>jg(e)?(J1.matches||J1.msMatchesSelector).call(e,t):!1,Z1=e=>e?nu(e.childNodes):[],es=e=>e&&e.parentElement,ic=(e,t)=>{if(jg(e)){const n=J1.closest;if(n)return n.call(e,t);do{if(Rm(e,t))return e;e=es(e)}while(e)}},OB=(e,t,n)=>{const o=ic(e,t),r=e&&NB(n,o),i=ic(r,t)===o;return o&&r?o===e||r===e||i&&ic(ic(e,n),t)!==o:!1},rr=()=>{},ts=e=>{if(Ug(e))et(nu(e),t=>ts(t));else if(e){const t=es(e);t&&t.removeChild(e)}},z2=(e,t,n)=>{if(n&&e){let o=t,r;return Ug(n)?(r=document.createDocumentFragment(),et(n,i=>{i===o&&(o=i.previousSibling),r.appendChild(i)})):r=n,t&&(o?o!==t&&(o=o.nextSibling):o=e.firstChild),e.insertBefore(r,o||null),()=>ts(n)}return rr},xr=(e,t)=>z2(e,null,t),AB=(e,t)=>z2(es(e),e,t),f3=(e,t)=>z2(es(e),e&&e.nextSibling,t),nl=e=>{const t=document.createElement("div");return oo(t,"class",e),t},U5=e=>{const t=nl();return t.innerHTML=e.trim(),et(Z1(t),n=>ts(n))},lr=M2?window:{},yc=Math.max,MB=Math.min,nf=Math.round,P2=lr.cancelAnimationFrame,B2=lr.requestAnimationFrame,of=lr.setTimeout,K1=lr.clearTimeout,Q1=e=>e.charAt(0).toUpperCase()+e.slice(1),DB=()=>nl().style,zB=["-webkit-","-moz-","-o-","-ms-"],PB=["WebKit","Moz","O","MS","webkit","moz","o","ms"],By={},$y={},BB=e=>{let t=$y[e];if(qg($y,e))return t;const n=Q1(e),o=DB();return et(zB,r=>{const i=r.replace(/-/g,"");return!(t=[e,r+e,i+n,Q1(i)+n].find(a=>o[a]!==void 0))}),$y[e]=t||""},Gg=e=>{let t=By[e]||lr[e];return qg(By,e)||(et(PB,n=>(t=t||lr[n+Q1(e)],!t)),By[e]=t),t},$B=Gg("MutationObserver"),p3=Gg("IntersectionObserver"),Nm=Gg("ResizeObserver"),eb=Gg("ScrollTimeline"),_e=(e,...t)=>e.bind(0,...t),Ws=e=>{let t;const n=e?of:B2,o=e?K1:P2;return[r=>{o(t),t=n(r,ri(e)?e():e)},()=>o(t)]},j5=(e,t)=>{let n,o,r,i=rr;const{v:s,p:a,S:l}=t||{},c=function(f){i(),K1(n),n=o=void 0,i=rr,e.apply(this,f)},u=h=>l&&o?l(o,h):h,d=()=>{i!==rr&&c(u(r)||r)},m=function(){const f=nu(arguments),g=ri(s)?s():s;if(ki(g)&&g>=0){const y=ri(a)?a():a,v=ki(y)&&y>=0,w=g>0?of:B2,_=g>0?K1:P2,x=u(f)||f,T=c.bind(0,x);i();const C=w(T,g);i=()=>_(C),v&&!n&&(n=of(d,y)),o=r=x}else c(f)};return m.m=d,m},FB=/[^\x20\t\r\n\f]+/g,W5=(e,t,n)=>{const o=e&&e.classList;let r,i=0,s=!1;if(o&&t&&$f(t)){const a=t.match(FB)||[];for(s=a.length>0;r=a[i++];)s=!!n(o,r)&&s}return s},$2=(e,t)=>{W5(e,t,(n,o)=>n.remove(o))},ba=(e,t)=>(W5(e,t,(n,o)=>n.add(o)),_e($2,e,t)),HB=/^--/,h3=(e,t)=>e.getPropertyValue(t)||e[t]||"",F2=e=>{const t=e||0;return isFinite(t)?t:0},Lp=e=>F2(parseFloat(e||"")),Ip=e=>`${(F2(e)*100).toFixed(3)}%`,Wu=e=>`${F2(e)}px`;function fa(e,t){e&&et(t,(n,o)=>{try{const r=e.style,i=ki(n)?Wu(n):n+"";HB.test(o)?r.setProperty(o,i):r[o]=i}catch{}})}function ps(e,t,n){const o=$f(t);let r=o?"":{};if(e){const i=lr.getComputedStyle(e,n)||e.style;r=o?h3(i,t):t.reduce((s,a)=>(s[a]=h3(i,a),s),r)}return r}const vc=e=>ps(e,"direction")==="rtl",m3=(e,t,n)=>{const o=t?`${t}-`:"",r=n?`-${n}`:"",i=`${o}top${r}`,s=`${o}right${r}`,a=`${o}bottom${r}`,l=`${o}left${r}`,c=ps(e,[i,s,a,l]);return{t:Lp(c[i]),r:Lp(c[s]),b:Lp(c[a]),l:Lp(c[l])}},Ml=(e,t)=>`translate${tf(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,q5="paddingTop",H2="paddingRight",V2="paddingLeft",Om="paddingBottom",Am="marginLeft",Mm="marginRight",wd="marginBottom",qu="overflowX",Gu="overflowY",hs="width",ms="height",Bc="hidden",VB={w:0,h:0},Yg=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:VB,UB=e=>Yg("inner",e||lr),_d=_e(Yg,"offset"),wh=_e(Yg,"client"),Dm=_e(Yg,"scroll"),zm=e=>{const t=parseFloat(ps(e,hs))||0,n=parseFloat(ps(e,ms))||0;return{w:t-nf(t),h:n-nf(n)}},Si=e=>e.getBoundingClientRect(),tb=e=>!!(e&&(e[ms]||e[hs])),G5=(e,t)=>{const n=tb(e);return!tb(t)&&n},g3=()=>performance.now(),jB=(e,t,n,o,r)=>{let i=0;const s=g3(),a=yc(0,n),l=c=>{const u=g3(),m=u-s>=a,h=c?1:1-(yc(0,s+a-u)/a||0),f=(t-e)*(ri(r)?r(h,h*a,0,1,a):h)+e,g=m||h===1;o&&o(f,h,g),i=g?0:B2(()=>l())};return l(),c=>{P2(i),c&&l(c)}},Xg=(e,t,n,o)=>{if(e&&t){let r=!0;return et(n,i=>{const s=o?o(e[i]):e[i],a=o?o(t[i]):t[i];s!==a&&(r=!1)}),r}return!1},Y5=(e,t)=>Xg(e,t,["w","h"]),X5=(e,t)=>Xg(e,t,["x","y"]),WB=(e,t)=>Xg(e,t,["t","r","b","l"]),y3=(e,t,n)=>Xg(e,t,[hs,ms],n&&(o=>nf(o)));let Rp;const v3="passive",qB=()=>{if(El(Rp)){Rp=!1;try{lr.addEventListener(v3,rr,Object.defineProperty({},v3,{get(){Rp=!0}}))}catch{}}return Rp},J5=e=>e.split(" "),b3=(e,t,n,o)=>{et(J5(t),r=>{e.removeEventListener(r,n,o)})},Wt=(e,t,n,o)=>{var r;const i=qB(),s=(r=i&&o&&o.$)!=null?r:i,a=o&&o.O||!1,l=o&&o.C||!1,c=i?{passive:s,capture:a}:a;return _e(Dr,J5(t).map(u=>{const d=l?m=>{b3(e,u,d,a),n(m)}:n;return e.addEventListener(u,d,c),_e(b3,e,u,d,a)}))},Z5=e=>e.stopPropagation(),w3=e=>e.preventDefault(),GB={x:0,y:0},Fy=e=>{const t=e&&Si(e);return t?{x:t.left+lr.pageYOffset,y:t.top+lr.pageXOffset}:GB},K5=(e,t,n)=>n?n.n?-e:n.i?t-e:e:e,YB=(e,t)=>[t&&t.i?e:0,K5(e,e,t)],wa=(e,t)=>{const{x:n,y:o}=ki(t)?{x:t,y:t}:t||{};ki(n)&&(e.scrollLeft=n),ki(o)&&(e.scrollTop=o)},$c=e=>({x:e.scrollLeft,y:e.scrollTop}),_3=(e,t)=>{et($5(t),e)},nb=e=>{const t=new Map,n=(i,s)=>{if(i){const a=t.get(i);_3(l=>{a&&a[l?"delete":"clear"](l)},s)}else t.forEach(a=>{a.clear()}),t.clear()},o=(i,s)=>{if($f(i)){const c=t.get(i)||new Set;return t.set(i,c),_3(u=>{ri(u)&&c.add(u)},s),_e(n,i,s)}B5(s)&&s&&n();const a=fs(i),l=[];return et(a,c=>{const u=i[c];u&&dt(l,o(c,u))}),_e(Dr,l)},r=(i,s)=>{et(nu(t.get(i)),a=>{s&&!Im(s)?a.apply(0,s):a()})};return o(e||{}),[o,n,r]},x3=e=>JSON.stringify(e,(t,n)=>{if(ri(n))throw 0;return n}),S3=(e,t)=>e?`${t}`.split(".").reduce((n,o)=>n&&qg(n,o)?n[o]:void 0,e):void 0,XB={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},Q5=(e,t)=>{const n={},o=Ji(fs(t),fs(e));return et(o,r=>{const i=e[r],s=t[r];if(tf(i)&&tf(s))ot(n[r]={},Q5(i,s)),D2(n[r])&&delete n[r];else if(qg(t,r)&&s!==i){let a=!0;if(Ni(i)||Ni(s))try{x3(i)===x3(s)&&(a=!1)}catch{}a&&(n[r]=s)}}),n},JB=(e,t,n)=>o=>[S3(e,o),n||S3(t,o)!==void 0],Ff="data-overlayscrollbars",eL="os-environment",tL=`${eL}-flexbox-glue`,ZB=`${tL}-max`,nL="os-scrollbar-hidden",Hy=`${Ff}-initialize`,Gr=Ff,oL=`${Gr}-overflow-x`,rL=`${Gr}-overflow-y`,bc="overflowVisible",KB="scrollbarHidden",T3="scrollbarPressed",Pm="updating",qs=`${Ff}-viewport`,Vy="arrange",iL="scrollbarHidden",wc=bc,ob=`${Ff}-padding`,QB=wc,C3=`${Ff}-content`,U2="os-size-observer",e$=`${U2}-appear`,t$=`${U2}-listener`,n$="os-trinsic-observer",o$="os-no-css-vars",r$="os-theme-none",$o="os-scrollbar",i$=`${$o}-rtl`,s$=`${$o}-horizontal`,a$=`${$o}-vertical`,sL=`${$o}-track`,j2=`${$o}-handle`,l$=`${$o}-visible`,c$=`${$o}-cornerless`,E3=`${$o}-transitionless`,k3=`${$o}-interaction`,L3=`${$o}-unusable`,rb=`${$o}-auto-hide`,I3=`${rb}-hidden`,R3=`${$o}-wheel`,u$=`${sL}-interactive`,d$=`${j2}-interactive`,aL={},lL={},f$=e=>{et(e,t=>et(t,(n,o)=>{aL[o]=t[o]}))},cL=(e,t,n)=>fs(e).map(o=>{const{static:r,instance:i}=e[o],[s,a,l]=n||[],c=n?i:r;if(c){const u=n?c(s,a,t):c(t);return(l||lL)[o]=u}}),ou=e=>lL[e],p$="__osOptionsValidationPlugin",h$="__osSizeObserverPlugin",W2="__osScrollbarsHidingPlugin",uL="__osClickScrollPlugin",m$={[uL]:{static:()=>(e,t,n,o,r)=>{let i=0,s=rr;const a=l=>{s=jB(l,l+o*Math.sign(n),133,(c,u,d)=>{e(c);const m=t(),h=m+o,f=r>=m&&r<=h;if(d&&!f){if(i)a(c);else{const g=of(()=>{a(c)},222);s=()=>{clearTimeout(g)}}i++}})};return a(0),()=>s()}}};let Uy;const N3=(e,t,n,o)=>{xr(e,t);const r=wh(t),i=_d(t),s=zm(n);return o&&ts(t),{x:i.h-r.h+s.h,y:i.w-r.w+s.w}},g$=e=>{let t=!1;const n=ba(e,nL);try{t=ps(e,BB("scrollbar-width"))==="none"||ps(e,"display","::-webkit-scrollbar")==="none"}catch{}return n(),t},y$=(e,t)=>{fa(e,{[qu]:Bc,[Gu]:Bc,direction:"rtl"}),wa(e,{x:0});const n=Fy(e),o=Fy(t);wa(e,{x:-999});const r=Fy(t);return{i:n.x===o.x,n:o.x!==r.x}},v$=(e,t)=>{const n=ba(e,tL),o=Si(e),r=Si(t),i=y3(r,o,!0),s=ba(e,ZB),a=Si(e),l=Si(t),c=y3(l,a,!0);return n(),s(),i&&c},b$=()=>{const{body:e}=document,n=U5(`
`)[0],o=n.firstChild,[r,,i]=nb(),[s,a]=qr({o:N3(e,n,o),u:X5},_e(N3,e,n,o,!0)),[l]=a(),c=g$(n),u={x:l.x===0,y:l.y===0},d={elements:{host:null,padding:!c,viewport:b=>c&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},m=ot({},XB),h=_e(ot,{},m),f=_e(ot,{},d),g={L:l,A:u,I:c,T:ps(n,"zIndex")==="-1",V:!!eb,U:y$(n,o),B:v$(n,o),j:_e(r,"r"),N:f,G:b=>ot(d,b)&&f(),q:h,F:b=>ot(m,b)&&h(),W:ot({},d),X:ot({},m)};return _o(n,"style"),ts(n),lr.addEventListener("resize",()=>{let b;if(!c&&(!u.x||!u.y)){const y=ou(W2);b=!!(y?y.P():rr)(g,s)}i("r",[b])}),g},Po=()=>(Uy||(Uy=b$()),Uy),q2=(e,t)=>ri(t)?t.apply(0,e):t,w$=(e,t,n,o)=>{const r=El(o)?n:o;return q2(e,r)||t.apply(0,e)},dL=(e,t,n,o)=>{const r=El(o)?n:o,i=q2(e,r);return!!i&&(bd(i)?i:t.apply(0,e))},_$=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:o}=t||{},{A:r,I:i,N:s}=Po(),{nativeScrollbarsOverlaid:a,body:l}=s().cancel,c=n??a,u=El(o)?l:o,d=(r.x||r.y)&&c,m=e&&(Vg(u)?!i:u);return!!d||!!m},G2=new WeakMap,x$=(e,t)=>{G2.set(e,t)},S$=e=>{G2.delete(e)},fL=e=>G2.get(e),T$=(e,t,n)=>{let o=!1;const r=n?new WeakMap:!1,i=()=>{o=!0},s=a=>{if(r&&n){const l=n.map(c=>{const[u,d]=c||[];return[d&&u?(a||V5)(u,e):[],d]});et(l,c=>et(c[0],u=>{const d=c[1],m=r.get(u)||[];if(e.contains(u)&&d){const f=Wt(u,d.trim(),g=>{o?(f(),r.delete(u)):t(g)});r.set(u,dt(m,f))}else Dr(m),r.delete(u)}))}};return s(),[i,s]},O3=(e,t,n,o)=>{let r=!1;const{Y:i,K:s,J:a,Z:l,tt:c,nt:u}=o||{},d=j5(()=>r&&n(!0),{v:33,p:99}),[m,h]=T$(e,d,a),f=i||[],g=s||[],b=Ji(f,g),y=(w,_)=>{if(!Im(_)){const S=c||rr,x=u||rr,T=[],C=[];let R=!1,I=!1;if(et(_,O=>{const{attributeName:N,target:z,type:k,oldValue:M,addedNodes:D,removedNodes:$}=O,A=k==="attributes",L=k==="childList",P=e===z,F=A&&N,H=F?oo(z,N||""):null,U=F&&M!==H,j=Wg(g,N)&&U;if(t&&(L||!P)){const q=A&&U,V=q&&l&&Rm(z,l),X=(V?!S(z,N,M,H):!A||q)&&!x(O,!!V,e,o);et(D,J=>dt(T,J)),et($,J=>dt(T,J)),I=I||X}!t&&P&&U&&!S(z,N,M,H)&&(dt(C,N),R=R||j)}),h(O=>d3(T).reduce((N,z)=>(dt(N,V5(O,z)),Rm(z,O)?dt(N,z):N),[])),t)return!w&&I&&n(!1),[!1];if(!Im(C)||R){const O=[d3(C),R];return!w&&n.apply(0,O),O}}},v=new $B(_e(y,!1));return[()=>(v.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:b,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(m(),v.disconnect(),r=!1)}),()=>{if(r)return d.m(),y(!0,v.takeRecords())}]},pL=(e,t,n)=>{const{ot:r,st:i}=n||{},s=ou(h$),{U:a}=Po(),l=_e(vc,e),[c]=qr({o:!1,_:!0});return()=>{const u=[],m=U5(`
`)[0],h=m.firstChild,f=g=>{const b=g instanceof ResizeObserverEntry,y=!b&&Ni(g);let v=!1,w=!1,_=!0;if(b){const[S,,x]=c(g.contentRect),T=tb(S),C=G5(S,x);w=!x||C,v=!w&&!T,_=!v}else y?[,_]=g:w=g===!0;if(r&&_){const S=y?g[0]:vc(m);wa(m,{x:K5(3333333,3333333,S&&a),y:3333333})}v||t({et:y?g:void 0,ct:!y,st:w})};if(Nm){const g=new Nm(b=>f(b.pop()));g.observe(h),dt(u,()=>{g.disconnect()})}else if(s){const[g,b]=s(h,f,i);dt(u,Ji([ba(m,e$),Wt(m,"animationstart",g)],b))}else return rr;if(r){const[g]=qr({o:void 0},l);dt(u,Wt(m,"scroll",b=>{const y=g(),[v,w,_]=y;w&&($2(h,"ltr rtl"),ba(h,v?"rtl":"ltr"),f([!!v,w,_])),Z5(b)}))}return _e(Dr,dt(u,xr(e,m)))}},C$=(e,t)=>{let n;const o=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=nl(n$),[i]=qr({o:!1}),s=(l,c)=>{if(l){const u=i(o(l)),[,d]=u;return d&&!c&&t(u)&&[u]}},a=(l,c)=>s(c.pop(),l);return[()=>{const l=[];if(p3)n=new p3(_e(a,!1),{root:e}),n.observe(r),dt(l,()=>{n.disconnect()});else{const c=()=>{const u=_d(r);s(u)};dt(l,pL(r,c)()),c()}return _e(Dr,dt(l,xr(e,r)))},()=>n&&a(!0,n.takeRecords())]},E$=(e,t)=>{let n,o,r,i,s;const{I:a}=Po(),l=`[${Gr}]`,c=`[${qs}]`,u=["tabindex"],d=["wrap","cols","rows"],m=["id","class","style","open"],h={rt:!1,lt:vc(e.it)},{it:f,ut:g,ft:b,_t:y,dt:v,vt:w,ht:_}=e,{B:S,j:x}=Po(),[T]=qr({u:Y5,o:{w:0,h:0}},()=>{const F=w(wc,bc),H=w(Vy,""),U=H&&$c(g);_(wc,bc),_(Vy,""),_("",Pm,!0);const j=Dm(b),q=Dm(g),V=zm(g);return _(wc,bc,F),_(Vy,"",H),_("",Pm),wa(g,U),{w:q.w+j.w+V.w,h:q.h+j.h+V.h}}),C=y?d:Ji(m,d),R=j5(t,{v:()=>n,p:()=>o,S(F,H){const[U]=F,[j]=H;return[Ji(fs(U),fs(j)).reduce((q,V)=>(q[V]=U[V]||j[V],q),{})]}}),I=F=>{et(F||u,H=>{if(Wg(u,H)){const U=oo(f,H);$f(U)?oo(g,H,U):_o(g,H)}})},O=(F,H)=>{const[U,j]=F,q={gt:j};return ot(h,{rt:U}),!H&&t(q),q},N=({ct:F,et:H,st:U})=>{const q=!(F&&!U&&!H)&&a?R:t,[V,W]=H||[];H&&ot(h,{lt:V}),q({ct:F||U,st:U,bt:W})},z=(F,H)=>{const[,U]=T(),j={wt:U};return U&&!H&&(F?t:R)(j),j},k=(F,H,U)=>{const j={yt:H};return H&&!U?R(j):v||I(F),j},[M,D]=b||!S?C$(f,O):[],$=!v&&pL(f,N,{st:!0,ot:!0}),[A,L]=O3(f,!1,k,{K:m,Y:Ji(m,u)}),P=v&&Nm&&new Nm(F=>{const H=F[F.length-1].contentRect;N({ct:!0,st:G5(H,s)}),s=H});return[()=>{I(),P&&P.observe(f);const F=$&&$(),H=M&&M(),U=A(),j=x(q=>{const[,V]=T();R({St:q,wt:V})});return()=>{P&&P.disconnect(),F&&F(),H&&H(),i&&i(),U(),j()}},({$t:F,xt:H,Ot:U})=>{const j={},[q]=F("update.ignoreMutation"),[V,W]=F("update.attributes"),[X,J]=F("update.elementEvents"),[Y,Q]=F("update.debounce"),G=J||W,Z=H||U,K=ee=>ri(q)&&q(ee);if(G){r&&r(),i&&i();const[ee,se]=O3(b||g,!0,z,{Y:Ji(C,V||[]),J:X,Z:l,nt:(he,re)=>{const{target:De,attributeName:$e}=he;return(!re&&$e&&!v?OB(De,l,c):!1)||!!ic(De,`.${$o}`)||!!K(he)}});i=ee(),r=se}if(Q)if(R.m(),Ni(Y)){const ee=Y[0],se=Y[1];n=ki(ee)&&ee,o=ki(se)&&se}else ki(Y)?(n=Y,o=!1):(n=!1,o=!1);if(Z){const ee=L(),se=D&&D(),he=r&&r();ee&&ot(j,k(ee[0],ee[1],Z)),se&&ot(j,O(se[0],Z)),he&&ot(j,z(he[0],Z))}return j},h]},ib=(e,t,n)=>yc(e,MB(t,n)),k$=(e,t,n)=>{const o=nf(t),[r,i]=YB(o,n),s=(i-e)/i,a=e/r,l=e/i,c=n?n.n?s:n.i?a:l:l;return ib(0,1,c)},hL=(e,t,n)=>{if(n){const l=t?hs:ms,{Ct:c,Ht:u}=n,d=Si(u)[l],m=Si(c)[l];return ib(0,1,d/m)}const o=t?"x":"y",{zt:r,It:i}=e,s=i[o],a=r[o];return ib(0,1,s/(s+a))},A3=(e,t,n,o)=>{const r=hL(e,o,t);return 1/r*(1-r)*n},L$=(e,t,n,o)=>{const{N:r,T:i}=Po(),{scrollbars:s}=r(),{slot:a}=s,{At:l,it:c,ut:u,Et:d,Tt:m,Dt:h,dt:f}=t,{scrollbars:g}=d?{}:e,{slot:b}=g||{},y=new Map,v=W=>eb&&new eb({source:m,axis:W}),w=v("x"),_=v("y"),S=dL([l,c,u],()=>f&&h?l:c,a,b),x=W=>f&&!h&&es(W)===u,T=(W,X,J)=>{const Y=.5*(J?1:-1),Q=X&&J?-1:1;return{transform:[Ml(Wu(0+Y),X),Ml(Wu(W*Q+Y),X)]}},C=(W,X)=>ot(W,X?{clear:["left"]}:{}),R=W=>{y.forEach((X,J)=>{(W?Wg($5(W),J):!0)&&(et(X||[],Q=>{Q&&Q.cancel()}),y.delete(J))})},I=(W,X,J,Y)=>{const Q=y.get(W)||[],G=Q.find(Z=>Z&&Z.timeline===X);G?G.effect=new KeyframeEffect(W,J,{composite:Y}):y.set(W,Ji(Q,[W.animate(J,{timeline:X,composite:Y})]))},O=(W,X,J)=>{const Y=J?ba:$2;et(W,Q=>{Y(Q.kt,X)})},N=(W,X)=>{et(W,J=>{const[Y,Q]=X(J);fa(Y,Q)})},z=(W,X)=>{N(W,J=>{const{Ht:Y}=J;return[Y,{[X?hs:ms]:Ip(hL(n,X))}]})},k=(W,X)=>{w&&_?et(W,J=>{const{kt:Y,Ht:Q}=J,G=_e(A3,n,J),Z=X&&vc(Y),K=G(Z?1:0,X),ee=G(Z?0:1,X);I(Q,X?w:_,C({transform:[Ml(Ip(K),X),Ml(Ip(ee),X)]},Z))}):N(W,J=>{const{Ht:Y,kt:Q}=J,{U:G}=Po(),Z=X?"x":"y",{zt:K}=n,ee=vc(Q),se=A3(n,J,k$($c(m)[Z],K[Z],X&&ee&&G),X);return[Y,{transform:Ml(Ip(se),X)}]})},M=W=>{const{kt:X}=W,J=x(X)&&X,{x:Y,y:Q}=$c(m);return[J,{transform:J?Ml({x:Wu(Y),y:Wu(Q)}):""}]},D=[],$=[],A=[],L=(W,X,J)=>{const Y=B5(J),Q=Y?J:!0,G=Y?!J:!0;Q&&O($,W,X),G&&O(A,W,X)},P=()=>{z($,!0),z(A)},F=()=>{k($,!0),k(A)},H=()=>{if(f)if(w&&_){const{zt:W}=n,X=!!$.find(({kt:Y})=>vc(Y)),J=(Y,Q,G,Z,K)=>I(Y,Q,C(T(G,Z,K),X),"add");et(Ji(A,$),({kt:Y})=>{x(Y)?(J(Y,w,W.x,!0,X),J(Y,_,W.y)):R(Y)})}else N($,M),N(A,M)},U=W=>{const X=W?s$:a$,J=W?$:A,Y=Im(J)?E3:"",Q=nl(`${$o} ${X} ${Y}`),G=nl(sL),Z=nl(j2),K={kt:Q,Ct:G,Ht:Z};return i||ba(Q,o$),dt(J,K),dt(D,[xr(Q,G),xr(G,Z),_e(ts,Q),R,o(K,L,k,W)]),K},j=_e(U,!0),q=_e(U,!1),V=()=>(xr(S,$[0].kt),xr(S,A[0].kt),of(()=>{L(E3)},300),_e(Dr,D));return j(),q(),[{Mt:P,Rt:F,Pt:H,Lt:L,Vt:{V:w,Ut:$,Bt:j,jt:_e(N,$)},Nt:{V:_,Ut:A,Bt:q,jt:_e(N,A)}},V]},I$=(e,t,n)=>{const{it:o,Tt:r,Gt:i}=t;return(s,a,l,c)=>{const{kt:u,Ct:d,Ht:m}=s,[h,f]=Ws(333),[g,b]=Ws(),y=_e(l,[s],c),v=!!r.scrollBy,w=`client${c?"X":"Y"}`,_=c?hs:ms,S=c?"left":"top",x=c?"w":"h",T=c?"x":"y",C=O=>O.propertyName.indexOf(_)>-1,R=()=>{const O="pointerup pointerleave pointercancel lostpointercapture",N=(z,k)=>M=>{const{zt:D}=n,$=_d(d)[x]-_d(m)[x],L=k*M/$*D[T];wa(r,{[T]:z+L})};return Wt(d,"pointerdown",z=>{const k=ic(z.target,`.${j2}`)===m,M=k?m:d,D=e.scrollbars,{button:$,isPrimary:A,pointerType:L}=z,{pointers:P}=D;if($===0&&A&&D[k?"dragScroll":"clickScroll"]&&(P||[]).includes(L)){const H=!k&&z.shiftKey,U=_e(Si,m),j=_e(Si,d),q=(he,re)=>(he||U())[S]-(re||j())[S],V=nf(Si(r)[_])/_d(r)[x]||1,W=N($c(r)[T]||0,1/V),X=z[w],J=U(),Y=j(),Q=J[_],G=q(J,Y)+Q/2,Z=X-Y[S],K=k?0:Z-G,ee=he=>{Dr(se),M.releasePointerCapture(he.pointerId)},se=[_e(tl,o,Gr,T3),Wt(i,O,ee),Wt(i,"selectstart",he=>w3(he),{$:!1}),Wt(d,O,ee),Wt(d,"pointermove",he=>{const re=he[w]-X;(k||H)&&W(K+re)})];if(tl(o,Gr,T3,!0),M.setPointerCapture(z.pointerId),H)W(K);else if(!k){const he=ou(uL);he&&dt(se,he(W,q,K,Q,Z))}}})};let I=!0;return _e(Dr,[Wt(u,"pointerenter",()=>{a(k3,!0)}),Wt(u,"pointerleave pointercancel",()=>{a(k3,!1)}),Wt(u,"wheel",O=>{const{deltaX:N,deltaY:z,deltaMode:k}=O;v&&I&&k===0&&es(u)===o&&r.scrollBy({left:N,top:z,behavior:"smooth"}),I=!1,a(R3,!0),h(()=>{I=!0,a(R3)}),w3(O)},{$:!1,O:!0}),Wt(m,"transitionstart",O=>{if(C(O)){const N=()=>{y(),g(N)};N()}}),Wt(m,"transitionend transitioncancel",O=>{C(O)&&(b(),y())}),Wt(u,"mousedown",_e(Wt,i,"click",Z5,{C:!0,O:!0}),{O:!0}),R(),f,b])}},R$=(e,t,n,o,r,i)=>{let s,a,l,c,u,d=rr,m=0;const[h,f]=Ws(),[g,b]=Ws(),[y,v]=Ws(100),[w,_]=Ws(100),[S,x]=Ws(100),[T,C]=Ws(()=>m),[R,I]=L$(e,r,o,I$(t,r,o)),{it:O,qt:N,Dt:z}=r,{Lt:k,Mt:M,Rt:D,Pt:$}=R,A=U=>{k(rb,U,!0),k(rb,U,!1)},L=(U,j)=>{if(C(),U)k(I3);else{const q=_e(k,I3,!0);m>0&&!j?T(q):q()}},P=U=>U.pointerType==="mouse",F=U=>{P(U)&&(c=a,c&&L(!0))},H=[v,C,_,x,b,f,()=>d(),Wt(O,"pointerover",F,{C:!0}),Wt(O,"pointerenter",F),Wt(O,"pointerleave",U=>{P(U)&&(c=!1,a&&L(!1))}),Wt(O,"pointermove",U=>{P(U)&&s&&h(()=>{v(),L(!0),w(()=>{s&&L(!1)})})}),Wt(N,"scroll",U=>{g(()=>{D(),l&&L(!0),y(()=>{l&&!c&&L(!1)})}),i(U),$()})];return[()=>_e(Dr,dt(H,I())),({$t:U,Ot:j,Ft:q,Wt:V})=>{const{Xt:W,Yt:X,Kt:J}=V||{},{bt:Y,st:Q}=q||{},{lt:G}=n,{A:Z}=Po(),{zt:K,Jt:ee,Zt:se}=o,[he,re]=U("showNativeOverlaidScrollbars"),[De,$e]=U("scrollbars.theme"),[ze,Xe]=U("scrollbars.visibility"),[Re,je]=U("scrollbars.autoHide"),[it,xe]=U("scrollbars.autoHideSuspend"),[wt]=U("scrollbars.autoHideDelay"),[$t,Nt]=U("scrollbars.dragScroll"),[st,Ve]=U("scrollbars.clickScroll"),Kt=Q&&!j,Mn=se.x||se.y,Dn=W||X||Y||j,Yt=J||Xe,Zn=he&&Z.x&&Z.y,Fo=(Xt,zn)=>{const hr=ze==="visible"||ze==="auto"&&Xt==="scroll";return k(l$,hr,zn),hr};if(m=wt,Kt&&(it&&Mn?(A(!1),d(),S(()=>{d=Wt(N,"scroll",_e(A,!0),{C:!0})})):A(!0)),re&&k(r$,Zn),$e&&(k(u),k(De,!0),u=De),xe&&!it&&A(!0),je&&(s=Re==="move",a=Re==="leave",l=Re!=="never",L(!l,!0)),Nt&&k(d$,$t),Ve&&k(u$,st),Yt){const Xt=Fo(ee.x,!0),zn=Fo(ee.y,!1);k(c$,!(Xt&&zn))}Dn&&(M(),D(),$(),k(L3,!K.x,!0),k(L3,!K.y,!1),k(i$,G&&!z))},{},R]},N$=e=>{const t=Po(),{N:n,I:o}=t,r=ou(W2),i=r&&r.H,{elements:s}=n(),{host:a,padding:l,viewport:c,content:u}=s,d=bd(e),m=d?{}:e,{elements:h}=m,{host:f,padding:g,viewport:b,content:y}=h||{},v=d?e:m.target,w=Rm(v,"textarea"),_=v.ownerDocument,S=_.documentElement,x=v===_.body,T=_.defaultView,C=_e(w$,[v]),R=_e(dL,[v]),I=_e(q2,[v]),O=_e(nl,""),N=_e(C,O,c),z=_e(R,O,u),k=N(b),M=k===v,D=M&&x,$=!M&&z(y),A=!M&&bd(k)&&k===$,L=A&&!!I(u),P=L?N():k,F=L?$:z(),U=D?S:A?P:k,j=w?C(O,a,f):v,q=D?U:j,V=A?F:$,W=_.activeElement,X=!M&&T.top===T&&W===v,J={At:v,it:q,ut:U,Qt:!M&&R(O,l,g),ft:V,tn:!M&&!o&&i&&i(t),Tt:D?S:U,qt:D?_:U,nn:T,Gt:_,_t:w,Dt:x,Et:d,dt:M,sn:A,vt:(je,it)=>RB(U,M?Gr:qs,M?it:je),ht:(je,it,xe)=>tl(U,M?Gr:qs,M?it:je,xe)},Y=fs(J).reduce((je,it)=>{const xe=J[it];return dt(je,xe&&bd(xe)&&!es(xe)?xe:!1)},[]),Q=je=>je?Wg(Y,je):null,{At:G,it:Z,Qt:K,ut:ee,ft:se,tn:he}=J,re=[()=>{_o(Z,Gr),_o(Z,Hy),_o(G,Hy),x&&(_o(S,Gr),_o(S,Hy))}],De=w&&Q(Z);let $e=w?G:Z1([se,ee,K,Z,G].find(je=>Q(je)===!1));const ze=D?G:se||ee,Xe=_e(Dr,re);return[J,()=>{oo(Z,Gr,M?"viewport":"host"),oo(K,ob,""),oo(se,C3,""),M||oo(ee,qs,"");const je=x&&!M?ba(es(v),nL):rr,it=xe=>{xr(es(xe),Z1(xe)),ts(xe)};if(De&&(f3(G,Z),dt(re,()=>{f3(Z,G),ts(Z)})),xr(ze,$e),xr(Z,K),xr(K||Z,!M&&ee),xr(ee,se),dt(re,()=>{je(),_o(K,ob),_o(se,C3),_o(ee,oL),_o(ee,rL),_o(ee,qs),Q(se)&&it(se),Q(ee)&&it(ee),Q(K)&&it(K)}),o&&!M&&(tl(ee,qs,iL,!0),dt(re,_e(_o,ee,qs))),he&&(AB(ee,he),dt(re,_e(ts,he))),X){const xe="tabindex",wt=oo(ee,xe);oo(ee,xe,"-1"),ee.focus();const $t=()=>wt?oo(ee,xe,wt):_o(ee,xe),Nt=Wt(_,"pointerdown keydown",()=>{$t(),Nt()});dt(re,[$t,Nt])}else W&&W.focus&&W.focus();return $e=0,Xe},Xe]},O$=({ft:e})=>({Ft:t,en:n,Ot:o})=>{const{B:r}=Po(),{gt:i}=t||{},{rt:s}=n;(e||!r)&&(i||o)&&fa(e,{[ms]:s?"":"100%"})},A$=({it:e,Qt:t,ut:n,dt:o},r)=>{const[i,s]=qr({u:WB,o:m3()},_e(m3,e,"padding",""));return({$t:a,Ft:l,en:c,Ot:u})=>{let[d,m]=s(u);const{I:h,B:f}=Po(),{ct:g,wt:b,bt:y}=l||{},{lt:v}=c,[w,_]=a("paddingAbsolute");(g||m||(u||!f&&b))&&([d,m]=i(u));const x=!o&&(_||y||m);if(x){const T=!w||!t&&!h,C=d.r+d.l,R=d.t+d.b,I={[Mm]:T&&!v?-C:0,[wd]:T?-R:0,[Am]:T&&v?-C:0,top:T?-d.t:0,right:T?v?-d.r:"auto":0,left:T?v?"auto":-d.l:0,[hs]:T?`calc(100% + ${C}px)`:""},O={[q5]:T?d.t:0,[H2]:T?d.r:0,[Om]:T?d.b:0,[V2]:T?d.l:0};fa(t||n,I),fa(n,O),ot(r,{Qt:d,cn:!T,k:t?O:ot({},I,O)})}return{rn:x}}},M$=({it:e,Qt:t,ut:n,tn:o,dt:r,ht:i,Dt:s,nn:a},l)=>{const c=_e(yc,0),u="visible",d=42,m={u:Y5,o:{w:0,h:0}},h={u:X5,o:{x:Bc,y:Bc}},f=(H,U)=>{const j=lr.devicePixelRatio%1!==0?1:0,q={w:c(H.w-U.w),h:c(H.h-U.h)};return{w:q.w>j?q.w:0,h:q.h>j?q.h:0}},g=H=>H.indexOf(u)===0,{L:b,B:y,I:v,A:w}=Po(),_=ou(W2),S=!r&&!v&&(w.x||w.y),x=s&&r,[T,C]=qr(m,_e(zm,n)),[R,I]=qr(m,_e(Dm,n)),[O,N]=qr(m),[z,k]=qr(m),[M]=qr(h),D=(H,U)=>{if(fa(n,{[ms]:""}),U){const{cn:j,Qt:q}=l,{ln:V,M:W}=H,X=zm(e),J=wh(e),Y=ps(n,"boxSizing")==="content-box",Q=j||Y?q.b+q.t:0,G=!(w.x&&Y);fa(n,{[ms]:J.h+X.h+(V.x&&G?W.x:0)-Q})}},$=(H,U)=>{const j=!v&&!H?d:0,q=(K,ee,se)=>{const he=ps(n,K),De=(U?U[K]:he)==="scroll";return[he,De,De&&!v?ee?j:se:0,ee&&!!j]},[V,W,X,J]=q(qu,w.x,b.x),[Y,Q,G,Z]=q(Gu,w.y,b.y);return{Jt:{x:V,y:Y},ln:{x:W,y:Q},M:{x:X,y:G},R:{x:J,y:Z}}},A=(H,U,j,q)=>{const V=(Q,G)=>{const Z=g(Q),K=G&&Z&&Q.replace(`${u}-`,"")||"";return[G&&!Z?Q:"",g(K)?"hidden":K]},[W,X]=V(j.x,U.x),[J,Y]=V(j.y,U.y);return q[qu]=X&&J?X:W,q[Gu]=Y&&W?Y:J,$(H,q)},L=(H,U,j,q)=>{const{M:V,R:W}=H,{x:X,y:J}=W,{x:Y,y:Q}=V,{k:G}=l,Z=U?Am:Mm,K=U?V2:H2,ee=G[Z],se=G[wd],he=G[K],re=G[Om];q[hs]=`calc(100% + ${Q+ee*-1}px)`,q[Z]=-Q+ee,q[wd]=-Y+se,j&&(q[K]=he+(J?Q:0),q[Om]=re+(X?Y:0))},[P,F]=_?_.D(S,y,n,o,l,$,L):[()=>S,()=>[rr]];return({$t:H,Ft:U,en:j,Ot:q},{rn:V})=>{const{ct:W,yt:X,wt:J,gt:Y,bt:Q,St:G}=U||{},{rt:Z,lt:K}=j,[ee,se]=H("showNativeOverlaidScrollbars"),[he,re]=H("overflow"),De=ee&&w.x&&w.y,$e=!r&&!y&&(W||J||X||se||Y),ze=W||V||J||Q||G||se,Xe=g(he.x),Re=g(he.y),je=Xe||Re;let it=C(q),xe=I(q),wt=N(q),$t=k(q),Nt;if(se&&v&&i(iL,KB,!De),$e&&(Nt=$(De),D(Nt,Z)),ze){je&&i(wc,bc,!1);const[Oe,yt]=F(De,K,Nt),[We,Ke]=it=T(q),[kt,_n]=xe=R(q),_t=wh(n);let Kn=kt,go=_t;Oe(),(_n||Ke||se)&&yt&&!De&&P(yt,kt,We,K)&&(go=wh(n),Kn=Dm(n));const Pn=UB(a),ci={w:c(yc(kt.w,Kn.w)+We.w),h:c(yc(kt.h,Kn.h)+We.h)},zi={w:c((x?Pn.w:go.w+c(_t.w-kt.w))+We.w),h:c((x?Pn.h:go.h+c(_t.h-kt.h))+We.h)};$t=z(zi),wt=O(f(ci,zi),q)}const[st,Ve]=$t,[Kt,Mn]=wt,[Dn,Yt]=xe,[Zn,Fo]=it,Xt={x:Kt.w>0,y:Kt.h>0},zn=Xe&&Re&&(Xt.x||Xt.y)||Xe&&Xt.x&&!Xt.y||Re&&Xt.y&&!Xt.x;if(V||Q||G||Fo||Yt||Ve||Mn||re||se||$e||ze){const Oe={[Mm]:0,[wd]:0,[Am]:0,[hs]:"",[qu]:"",[Gu]:""},yt=A(De,Xt,he,Oe),We=P(yt,Dn,Zn,K);r||L(yt,K,We,Oe),$e&&D(yt,Z),r?(oo(e,oL,Oe[qu]),oo(e,rL,Oe[Gu])):fa(n,Oe)}tl(e,Gr,bc,zn),tl(t,ob,QB,zn),r||tl(n,qs,wc,je);const[Ot,fe]=M($(De).Jt);return ot(l,{Jt:Ot,It:{x:st.w,y:st.h},zt:{x:Kt.w,y:Kt.h},Zt:Xt}),{Kt:fe,Xt:Ve,Yt:Mn}}},D$=e=>{const[t,n,o]=N$(e),r={Qt:{t:0,r:0,b:0,l:0},cn:!1,k:{[Mm]:0,[wd]:0,[Am]:0,[q5]:0,[H2]:0,[Om]:0,[V2]:0},It:{x:0,y:0},zt:{x:0,y:0},Jt:{x:Bc,y:Bc},Zt:{x:!1,y:!1}},{At:i,ut:s,ht:a,dt:l}=t,{I:c,A:u,B:d}=Po(),m=!c&&(u.x||u.y),h=[O$(t),A$(t,r),M$(t,r)];return[n,f=>{const g={},y=(m||!d)&&$c(s);return a("",Pm,!0),et(h,v=>{ot(g,v(f,g)||{})}),a("",Pm),wa(s,y),!l&&wa(i,0),g},r,t,o]},z$=(e,t,n,o)=>{const[r,i,s,a,l]=D$(e),[c,u,d]=E$(a,y=>{b({},y)}),[m,h,,f]=R$(e,t,d,s,a,o),g=y=>fs(y).some(v=>!!y[v]),b=(y,v)=>{const{an:w,Ot:_,xt:S,un:x}=y,T=w||{},C=!!_,R={$t:JB(t,T,C),an:T,Ot:C};if(x)return h(R),!1;const I=v||u(ot({},R,{xt:S})),O=i(ot({},R,{en:d,Ft:I}));h(ot({},R,{Ft:I,Wt:O}));const N=g(I),z=g(O),k=N||z||!D2(T)||C;return k&&n(y,{Ft:I,Wt:O}),k};return[()=>{const{At:y,ut:v,Gt:w,Dt:_}=a,S=_?w.documentElement:y,x=$c(S),T=[c(),r(),m()];return wa(v,x),_e(Dr,T)},b,()=>({fn:d,_n:s}),{dn:a,vn:f},l]},Ti=(e,t,n)=>{const{q:o}=Po(),r=bd(e),i=r?e:e.target,s=fL(i);if(t&&!s){let a=!1;const l=[],c={},u=I=>{const O=F5(I,!0),N=ou(p$);return N?N(O,!0):O},d=ot({},o(),u(t)),[m,h,f]=nb(),[g,b,y]=nb(n),v=(I,O)=>{y(I,O),f(I,O)},[w,_,S,x,T]=z$(e,d,({an:I,Ot:O},{Ft:N,Wt:z})=>{const{ct:k,bt:M,gt:D,wt:$,yt:A,st:L}=N,{Xt:P,Yt:F,Kt:H}=z;v("updated",[R,{updateHints:{sizeChanged:!!k,directionChanged:!!M,heightIntrinsicChanged:!!D,overflowEdgeChanged:!!P,overflowAmountChanged:!!F,overflowStyleChanged:!!H,contentMutation:!!$,hostMutation:!!A,appear:!!L},changedOptions:I||{},force:!!O}])},I=>v("scroll",[R,I])),C=I=>{S$(i),Dr(l),a=!0,v("destroyed",[R,I]),h(),b()},R={options(I,O){if(I){const N=O?o():{},z=Q5(d,ot(N,u(I)));D2(z)||(ot(d,z),_({an:z}))}return ot({},d)},on:g,off:(I,O)=>{I&&O&&b(I,O)},state(){const{fn:I,_n:O}=S(),{lt:N}=I,{It:z,zt:k,Jt:M,Zt:D,Qt:$,cn:A}=O;return ot({},{overflowEdge:z,overflowAmount:k,overflowStyle:M,hasOverflow:D,padding:$,paddingAbsolute:A,directionRTL:N,destroyed:a})},elements(){const{At:I,it:O,Qt:N,ut:z,ft:k,Tt:M,qt:D}=x.dn,{Vt:$,Nt:A}=x.vn,L=F=>{const{Ht:H,Ct:U,kt:j}=F;return{scrollbar:j,track:U,handle:H}},P=F=>{const{Ut:H,Bt:U}=F,j=L(H[0]);return ot({},j,{clone:()=>{const q=L(U());return _({un:!0}),q}})};return ot({},{target:I,host:O,padding:N||z,viewport:z,content:k||z,scrollOffsetElement:M,scrollEventElement:D,scrollbarHorizontal:P($),scrollbarVertical:P(A)})},update:I=>_({Ot:I,xt:!0}),destroy:_e(C,!1),plugin:I=>c[fs(I)[0]]};return dt(l,[T]),x$(i,R),cL(aL,Ti,[R,m,c]),_$(x.dn.Dt,!r&&e.cancel)?(C(!0),R):(dt(l,w()),v("initialized",[R]),R.update(!0),R)}return s};Ti.plugin=e=>{const t=Ni(e),n=t?e:[e],o=n.map(r=>cL(r,Ti)[0]);return f$(n),t?o:o[0]};Ti.valid=e=>{const t=e&&e.elements,n=ri(t)&&t();return Lm(n)&&!!fL(n.target)};Ti.env=()=>{const{L:e,A:t,I:n,U:o,B:r,T:i,V:s,W:a,X:l,N:c,G:u,q:d,F:m}=Po();return ot({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:o,flexboxGlue:r,cssCustomProperties:i,scrollTimeline:s,staticDefaultInitialization:a,staticDefaultOptions:l,getDefaultInitialization:c,setDefaultInitialization:u,getDefaultOptions:d,setDefaultOptions:m})};const P$=()=>{if(typeof window>"u"){const c=()=>{};return[c,c]}let e,t;const n=window,o=typeof n.requestIdleCallback=="function",r=n.requestAnimationFrame,i=n.cancelAnimationFrame,s=o?n.requestIdleCallback:r,a=o?n.cancelIdleCallback:i,l=()=>{a(e),i(t)};return[(c,u)=>{l(),e=s(o?()=>{l(),t=r(c)}:c,typeof u=="object"?u:{timeout:2233})},l]},mL=e=>{const{options:t,events:n,defer:o}=e||{},[r,i]=p.useMemo(P$,[]),s=p.useRef(null),a=p.useRef(o),l=p.useRef(t),c=p.useRef(n);return p.useEffect(()=>{a.current=o},[o]),p.useEffect(()=>{const{current:u}=s;l.current=t,Ti.valid(u)&&u.options(t||{},!0)},[t]),p.useEffect(()=>{const{current:u}=s;c.current=n,Ti.valid(u)&&u.on(n||{},!0)},[n]),p.useEffect(()=>()=>{var u;i(),(u=s.current)==null||u.destroy()},[]),p.useMemo(()=>[u=>{const d=s.current;if(Ti.valid(d))return;const m=a.current,h=l.current||{},f=c.current||{},g=()=>s.current=Ti(u,h,f);m?r(g,m):g()},()=>s.current],[])},B$=(e,t)=>{const{element:n="div",options:o,events:r,defer:i,children:s,...a}=e,l=n,c=p.useRef(null),u=p.useRef(null),[d,m]=mL({options:o,events:r,defer:i});return p.useEffect(()=>{const{current:h}=c,{current:f}=u;return h&&f&&d({target:h,elements:{viewport:f,content:f}}),()=>{var g;return(g=m())==null?void 0:g.destroy()}},[d,n]),p.useImperativeHandle(t,()=>({osInstance:m,getElement:()=>c.current}),[]),B.createElement(l,{"data-overlayscrollbars-initialize":"",ref:c,...a},B.createElement("div",{"data-overlayscrollbars-contents":"",ref:u},s))};p.forwardRef(B$);Ti.plugin(m$);const ru=({children:e,className:t,container:n,scrollX:o,scrollY:r})=>{const i=p.useRef(null),[s,a]=mL({options:{overflow:{x:o==null||o?"scroll":"hidden",y:r==null||r?"scroll":"hidden"},scrollbars:{clickScroll:!0}},defer:!1});return p.useEffect(()=>(i.current!=null&&(n==null?s(i.current):s({target:i.current,elements:{viewport:n}})),()=>a()?.destroy()),[n,s,a]),E.jsx("div",{ref:i,children:e,className:an(Wa.scrollable,t),"data-overlayscrollbars":""})},iu=p.forwardRef((e,t)=>{const{show:n,blurAmount:o=e.blurAmount??10,brightness:r=e.brightness??.55,saturation:i=e.saturation??1.8,transition:s,...a}=e,l=nz(t),c=Sn(dn.BlurUnderlay),u=V$(e.transition),d=an(Wa.underlayBlur,c?Wa.underlayBlurEnabled:Wa.underlayBlurDisabled,e.show&&Wa.underlayBlurShow,e.className);return p.useEffect(()=>{l.current&&(l.current.style.setProperty("--blur-amount",`${o}px`),l.current.style.setProperty("--blur-saturate",`${i}`),l.current.style.setProperty("--blur-brightness",`${r}`),l.current.style.setProperty("--blur-transition",u),l.current.style.setProperty("--blur-border-radius",getComputedStyle(l.current).borderRadius),l.current.style.setProperty("--blur-disabled-opacity",$$(o,r)))},[l,e.className,u,o,i,r]),E.jsx("div",{...a,ref:l,className:d})});function $$(e,t){return`${t+e/25}`}function F$(e){al.getStatus()===al.BootStatus.Booted?ie.registerExternal(e):Sf.subscribe(()=>ie.registerExternal(e))}function H$(e){al.getStatus()===al.BootStatus.Booted?ie.registerExternal(e()):Sf.subscribe(()=>ie.registerExternal(e()))}function gL(e,t,n){const[o,r]=p.useState(i());return Ar(ie.onChanged,s=>{s===e&&r(i())},[e,t,n]),o;function i(){if(al.getStatus()!==al.BootStatus.Booted)return;const s=ie.getValueJson({settingsId:e,propertyId:t});if(s!==null)return n?.raw?s:JSON.parse(s)}}var Y2=(e=>(e.Fast="--fast-transition",e.Base="--base-transition",e.Slow="--slow-transition",e))(Y2||{});const _c=new Map;Sf.subscribe(()=>{const e=getComputedStyle(document.body);_c.set("--fast-transition",e.getPropertyValue("--fast-transition")),_c.set("--base-transition",e.getPropertyValue("--base-transition")),_c.set("--slow-transition",e.getPropertyValue("--slow-transition"))});function V$(e){if(!Sn(dn.SmoothTransitions)||!e)return"none";if(!_c.has(e))throw Error("Failed to get transition: invoked before backend is initialized.");return _c.get(e)}var dn=(e=>(e.SmoothTransitions="SmoothTransitions",e.BlurUnderlay="BlurUnderlay",e.UndoListLength="UndoListLength",e.SmoothScroll="SmoothScroll",e.FadeScriptLines="FadeScriptLines",e.GraphControlsPosition="GraphControlsPosition",e.GraphMapPosition="GraphMapPosition",e.GraphBreadcrumbsPosition="GraphBreadcrumbsPosition",e.GraphMinZoom="GraphMinZoom",e.GraphMaxZoom="GraphMaxZoom",e.GraphSelectionMode="GraphSelectionMode",e.GraphEdgeType="GraphEdgeType",e.GraphShowGrid="GraphShowGrid",e.GraphSnapToGrid="GraphSnapToGrid",e.GraphShowSynopsis="GraphShowSynopsis",e.GraphShowCondition="GraphShowCondition",e.GraphAnimateTransition="GraphAnimateTransition",e))(dn||{});const Jg="Appearance",U$=()=>({id:Jg,scope:kr.ConfigurationScope.User,properties:[{id:"SmoothTransitions",label:ro("SmoothTransitions"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to use smooth transitions throughout the editor UI. Disable to improve performance."},{id:"BlurUnderlay",label:ro("BlurUnderlay"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to blur background for some windows, such as modals, context menus, tooltips, dropdown lists, etc. Disable to improve performance."},{id:"UndoListLength",label:ro("UndoListLength"),defaultValueJson:JSON.stringify(10),valueType:ie.ValueType.Integer,containerType:ie.ContainerType.Single,summary:"Determines the maximum height of the undo history list before it starts scrolling."},...z3("Scenario Editor",[{id:"SmoothScroll",label:ro("SmoothScroll"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to use smooth scroll when showing lines in visual scenario editor."},{id:"FadeScriptLines",label:ro("FadeScriptLines"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to use fade-in animation when showing lines in visual scenario editor."}]),...z3("Story Graph",[{id:"GraphControlsPosition",label:"Controls Position",defaultValueJson:JSON.stringify("bottom-left"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["top-left","top-right","bottom-left","bottom-right","hide"],summary:"Position of the control panel on graph pane; selecting 'Hide' will remove the panel."},{id:"GraphMapPosition",label:"Minimap Position",defaultValueJson:JSON.stringify("bottom-right"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["top-left","top-right","bottom-left","bottom-right","hide"],summary:"Position of the minimap on graph pane; selecting 'Hide' will remove the map."},{id:"GraphBreadcrumbsPosition",label:"Breadcrumbs Position",defaultValueJson:JSON.stringify("top-center"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","hide"],summary:"Position of the bar indicating currently expanded nodes hierarchy; select 'Hide' to remove the bar."},{id:"GraphMinZoom",label:"Minimum Zoom",defaultValueJson:JSON.stringify(.3),minValue:.01,maxValue:100,valueType:ie.ValueType.Decimal,containerType:ie.ContainerType.Single,summary:"How far story graph can be zoomed out."},{id:"GraphMaxZoom",label:"Maximum Zoom",defaultValueJson:JSON.stringify(2),minValue:.01,maxValue:100,valueType:ie.ValueType.Decimal,containerType:ie.ContainerType.Single,summary:"How close story graph can be zoomed in."},{id:"GraphSelectionMode",label:"Selection Mode",defaultValueJson:JSON.stringify("partial"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["full","partial"],summary:"Whether partially covering nodes and edges with selection box should select them."},{id:"GraphEdgeType",label:"Edge Type",defaultValueJson:JSON.stringify("bezier"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["bezier","straight","step","smoothstep"],summary:"Controls the way node edges (connections) are drawn."},{id:"GraphShowGrid",label:"Show Grid",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to render grid under the node graph."},{id:"GraphSnapToGrid",label:"Snap To Grid",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to snap nodes to the story graph background grid."},{id:"GraphShowSynopsis",label:"Show Synopsis",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to show first script comment text inside script node; when disabled synopsis is still viewable as tooltip when hovering script node title."},{id:"GraphShowCondition",label:"Show Condition",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to show navigation condition (eg, @goto if:condition) under graph node out ports; when disabled condition is still viewable as tooltip when hovering the ports."},{id:"GraphAnimateTransition",label:"Animate Transition",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to perform zoom in and out animations when entering (expanding) and exiting (collapsing) graph group nodes."}]),...Bi("Font Family",[Ee("BaseFont","--base-font","Font names to use in regular text."),Ee("CodeFont","--code-font","Font names to use in code and scripts text."),Ee("FontLigatures","--font-ligatures","Font ligature variants.")]),...Bi("Font Size",[Ee("TinyFontSize","--tiny-font-size","Minimum font size."),Ee("SmallFontSize","--small-font-size","Smaller font size."),Ee("BaseFontSize","--base-font-size","Normal font size."),Ee("GiantFontSize","--giant-font-size","Maximum font size.")]),...Bi("Font Weight",[Ee("LightCodeWeight","--light-code-weight","Minimum code font weight."),Ee("RegularCodeWeight","--regular-code-weight","Normal code font weight."),Ee("LightBaseWeight","--light-base-weight","Minimum regular font weight."),Ee("RegularBaseWeight","--regular-base-weight","Normal regular font weight."),Ee("BoldBaseWeight","--bold-base-weight","Maximum regular font weight.")]),...Bi("Font Color",[Ee("DarkFontColor","--dark-font-color","Minimum font color."),Ee("DimFontColor","--dim-font-color","Low font color."),Ee("BaseFontColor","--base-font-color","Normal font color."),Ee("LightFontColor","--light-font-color","High font color."),Ee("BrightFontColor","--bright-font-color","Maximum font color."),Ee("ExpressionColor","--expression-color","Font color of script expressions.")]),...Bi("Accent",[Ee("DarkAccentColor","--dark-accent-color","Minimum accent color."),Ee("DimAccentColor","--dim-accent-color","Low accent color."),Ee("BaseAccentColor","--base-accent-color","Normal accent color."),Ee("LightAccentColor","--light-accent-color","High accent color."),Ee("BrightAccentColor","--bright-accent-color","Maximum accent color.")]),...Bi("Background",[Ee("DarkBackgroundColor","--dark-bg-color","Minimum background color."),Ee("DimBackgroundColor","--dim-bg-color","Low background color."),Ee("BaseBackgroundColor","--base-bg-color","Normal background color."),Ee("LightBackgroundColor","--light-bg-color","High background color."),Ee("BrightBackgroundColor","--bright-bg-color","Maximum background color.")]),...Bi("Shadow",[Ee("DarkShadowColor","--dark-shadow-color","Minimum shadow color."),Ee("DimShadowColor","--dim-shadow-color","Low shadow color."),Ee("BaseShadowColor","--base-shadow-color","Normal shadow color."),Ee("LightShadowColor","--light-shadow-color","High shadow color."),Ee("BrightShadowColor","--bright-shadow-color","Maximum Shadow color.")]),...Bi("Button",[Ee("DarkButtonColor","--dark-button-color","Minimum button color."),Ee("DimButtonColor","--dim-button-color","Low button color."),Ee("BaseButtonColor","--base-button-color","Normal button color."),Ee("LightButtonColor","--light-button-color","High button color."),Ee("BrightButtonColor","--bright-button-color","Maximum button color.")]),...Bi("Border Radius",[Ee("BaseBorderRadius","--base-border-radius","Default border radius."),Ee("MajorBorderRadius","--major-border-radius","Border radius for major elements, like windows.")]),Ee("GraphBackground","--graph-background",`Background of the story graph tab. ${M3}`,"Story Graph","Background"),Ee("VisualEditorBackground","--visual-editor-background",`Background of the visual scenario editor tab. ${M3}`,"Scenario Editor","Background")]}),yL=new Map,M3="Any value for [background](https://developer.mozilla.org/en-US/docs/Web/CSS/background) CSS property is supported; eg, you can assign an image url:\n```\ncenter / cover url(https://naninovel.com/miku.jpg)\n```\n";let jy;function Sn(e){return gL(Jg,e)}function D3(e){const t=ie.getValueJson({settingsId:Jg,propertyId:e});return t==null||t.length===0?void 0:JSON.parse(t)}function Bi(e,t){return t.map(n=>({...n,group:e}))}function z3(e,t){return t.map(n=>({...n,category:e}))}function Ee(e,t,n,o,r){return yL.set(t,e),{id:e,label:r??ro(e),summary:n,color:t.endsWith("-color"),category:o??"Appearance",defaultValueJson:JSON.stringify(j$().getPropertyValue(t).trim()),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single}}function j$(){return jy||(jy=getComputedStyle(document.querySelector(":root")))}function P3(e,t){document.body.style.setProperty(e,t)}ie.onChanged.subscribe(e=>{if(e!==Jg)return;for(const[n,o]of yL)P3(n,D3(o));const t=D3("SmoothTransitions");for(const[n,o]of _c)P3(n,t?o:"none")});H$(U$);const X2=new Ye,B3=.3;let sb=0,ab,xd,vL;function ln(e,t){return e==null?{}:{"data-tooltip-anchor":!0,onMouseEnter:n=>G$(n,e,t),onMouseMove:Y$,onMouseLeave:n=>X$(n,t?.doc)}}function W$(){return vL}function q$(e){vL=e,xd=e.anchor,X2.broadcast(!0)}function J2(){xd=void 0,X2.broadcast(!1)}async function G$(e,t,n){sb=Date.now();const o=xd=e.currentTarget;for(ab={x:e.clientX,y:e.clientY};xd===o&&Date.now()-sb{const e=lo(X2)??!1,t=W$(),n=p.useRef(null);p.useEffect(()=>{if(!(!t||n.current==null))return w6(t.anchor,n.current,async()=>{const r=t.options?.doc?t.anchor:rF(t.cursor.x,t.cursor.y),i=await ez(r,n.current,{placement:"bottom-start",middleware:[zD(),DD()]});Object.assign(n.current.style,{left:`${i.x}px`,top:`${i.y}px`})})},[t,e]);const o=p.useCallback(r=>{(t?.anchor==null||r.relatedTarget!==t.anchor)&&J2()},[t?.anchor]);return E.jsx(iu,{ref:n,className:an(Su.tooltip,[t?.options?.doc,Su.tooltipDoc]),show:e,"data-tooltip-window":!0,transition:Y2.Fast,onMouseLeave:o,children:E.jsx(ru,{className:an(Su.content,[e,Su.visible]),"data-tooltip-window":!0,children:E.jsx("div",{className:Su.scrollableContent,"data-tooltip-window":!0,dangerouslySetInnerHTML:{__html:t?.html??""}})})})};function rF(e,t){return e+=10,{getBoundingClientRect:()=>({width:15,height:15,x:e,y:t,top:t,left:e,right:e,bottom:t})}}const Z2=e=>!!e&&e[0]==="o",lb=Cn.unstable_batchedUpdates||(e=>e()),Dl=(e,t,n=1e-4)=>Math.abs(e-t)e===!0||!!(e&&e[t]),Mo=(e,t)=>typeof e=="function"?e(t):e,wL="_szhsinMenu",iF=e=>e[wL],sF=(e,t)=>Object.defineProperty(t,wL,{value:e}),Hf=(e,t)=>(t&&Object.keys(t).forEach(n=>{const o=e[n],r=t[n];typeof r=="function"&&o?e[n]=(...i)=>{r(...i),o(...i)}:e[n]=r}),e),aF=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],o=isNaN(t[1])?n:t[1];return{top:n,right:o,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?o:t[3]}},Wy=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+o+n))return e}};function K2(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function $3(e,t){for(let n=0;np.useMemo(()=>{const r=t?`${e}__${t}`:e;let i=r;n&&Object.keys(n).forEach(a=>{const l=n[a];l&&(i+=` ${r}--${l===!0?a:`${a}-${l}`}`)});let s=typeof o=="function"?o(n):o;return typeof s=="string"&&(s=s.trim(),s&&(i+=` ${s}`)),i},[e,t,n,o]),lF="szh-menu-container",ol="szh-menu",cF="szh-menu-button",uF="arrow",_L="item",dF="divider",fF="submenu",xL=p.createContext(),Q2=p.createContext({}),cb=p.createContext({}),SL=p.createContext({}),pF=p.createContext({}),Zg=p.createContext({}),Gn=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Jt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),sf=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),xc=Object.freeze({FIRST:"first",LAST:"last"}),hF=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),qy="absolute",TL="presentation",e_="menuitem",F3={"aria-hidden":!0,role:e_},mF=sF("MenuButton",p.forwardRef(function({className:t,isOpen:n,disabled:o,children:r,...i},s){const a=p.useMemo(()=>({open:n}),[n]);return E.jsx("button",{"aria-haspopup":!0,"aria-expanded":n,"aria-disabled":o||void 0,type:"button",disabled:o,...i,ref:s,className:_a({block:cF,modifiers:a,className:t}),children:r})})),gF=({className:e,containerRef:t,containerProps:n,children:o,isOpen:r,theming:i,transition:s,onClose:a})=>{const l=rf(s,"item"),c=({key:d})=>{switch(d){case Gn.ESC:Mo(a,{key:d,reason:sf.CANCEL});break}},u=d=>{r&&!d.currentTarget.contains(d.relatedTarget)&&Mo(a,{reason:sf.BLUR})};return E.jsx("div",{...Hf({onKeyDown:c,onBlur:u},n),className:_a({block:lF,modifiers:p.useMemo(()=>({theme:i,itemTransition:l}),[i,l]),className:e}),style:{position:"absolute",...n?.style},ref:t,children:o})},yF=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,o,r)=>{t?e||(e=setTimeout(()=>{e=0,o()},n)):r?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},vF=(e,t)=>{const[n,o]=p.useState(),i=p.useRef({items:[],hoverIndex:-1,sorted:!1}).current,s=p.useCallback((l,c)=>{const{items:u}=i;if(!l)i.items=[];else if(c)u.push(l);else{const d=u.indexOf(l);d>-1&&(u.splice(d,1),l.contains(document.activeElement)&&(t.current.focus(),o()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),a=p.useCallback((l,c,u)=>{const{items:d,hoverIndex:m}=i,h=()=>{if(i.sorted)return;const b=e.current.querySelectorAll(".szh-menu__item");d.sort((y,v)=>$3(b,y)-$3(b,v)),i.sorted=!0};let f=-1,g;switch(l){case Jt.RESET:break;case Jt.SET:g=c;break;case Jt.UNSET:g=b=>b===c?void 0:b;break;case Jt.FIRST:h(),f=0,g=d[f];break;case Jt.LAST:h(),f=d.length-1,g=d[f];break;case Jt.SET_INDEX:h(),f=u,g=d[f];break;case Jt.INCREASE:h(),f=m,f<0&&(f=d.indexOf(c)),f++,f>=d.length&&(f=0),g=d[f];break;case Jt.DECREASE:h(),f=m,f<0&&(f=d.indexOf(c)),f--,f<0&&(f=d.length-1),g=d[f];break}g||(f=-1),o(g),i.hoverIndex=f},[e,i]);return{hoverItem:n,dispatch:a,updateItems:s}},bF=(e,t,n,o)=>{const r=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),a=aF(o),l=f=>f+i.left-s.left-a.left,c=f=>f+i.left+r.width-s.right+a.right,u=f=>f+i.top-s.top-a.top,d=f=>f+i.top+r.height-s.bottom+a.bottom;return{menuRect:r,containerRect:i,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:d,confineHorizontally:f=>{let g=l(f);if(g<0)f-=g;else{const b=c(f);b>0&&(f-=b,g=l(f),g<0&&(f-=g))}return f},confineVertically:f=>{let g=u(f);if(g<0)f-=g;else{const b=d(f);b>0&&(f-=b,g=u(f),g<0&&(f-=g))}return f}}},wF=({arrowRef:e,menuY:t,anchorRect:n,containerRect:o,menuRect:r})=>{let i=n.top-o.top-t+n.height/2;const s=e.current.offsetHeight*1.25;return i=Math.max(s,i),i=Math.min(i,r.height-s),i},_F=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:o,placeLeftX:r,placeRightX:i,getLeftOverflow:s,getRightOverflow:a,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:d,direction:m,position:h})=>{let f=m,g=o;h!=="initial"&&(g=c(g),h==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let b,y,v;return f==="left"?(b=r,h!=="initial"&&(y=s(b),y<0&&(v=a(i),(v<=0||-y>v)&&(b=i,f="right")))):(b=i,h!=="initial"&&(v=a(b),v>0&&(y=s(r),(y>=0||-y{let i=n.left-o.left-t+n.width/2;const s=e.current.offsetWidth*1.25;return i=Math.max(s,i),i=Math.min(i,r.width-s),i},SF=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:o,placeTopY:r,placeBottomY:i,getTopOverflow:s,getBottomOverflow:a,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:d,direction:m,position:h})=>{let f=m==="top"?"top":"bottom",g=o;h!=="initial"&&(g=l(g),h==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let b,y,v;return f==="top"?(b=r,h!=="initial"&&(y=s(b),y<0&&(v=a(i),(v<=0||-y>v)&&(b=i,f="bottom")))):(b=i,h!=="initial"&&(v=a(b),v>0&&(y=s(r),(y>=0||-y{const{menuRect:c,containerRect:u}=l,d=n==="left"||n==="right";let m=d?o:r,h=d?r:o;if(e){const S=a.current;d?m+=S.offsetWidth:h+=S.offsetHeight}const f=s.left-u.left-c.width-m,g=s.right-u.left+m,b=s.top-u.top-c.height-h,y=s.bottom-u.top+h;let v,w;t==="end"?(v=s.right-u.left-c.width,w=s.bottom-u.top-c.height):t==="center"?(v=s.left-u.left-(c.width-s.width)/2,w=s.top-u.top-(c.height-s.height)/2):(v=s.left-u.left,w=s.top-u.top),v+=m,w+=h;const _={...l,anchorRect:s,placeLeftX:f,placeRightX:g,placeLeftorRightY:w,placeTopY:b,placeBottomY:y,placeToporBottomX:v,arrowRef:a,arrow:e,direction:n,position:i};switch(n){case"left":case"right":return _F(_);case"top":case"bottom":default:return SF(_)}},_h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?p.useLayoutEffect:p.useEffect;function H3(e,t){typeof e=="function"?e(t):e.current=t}const Kg=(e,t)=>p.useMemo(()=>e?t?n=>{H3(e,n),H3(t,n)}:e:t,[e,t]),V3=-9999,CL=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:o,arrowProps:r={},anchorPoint:i,anchorRef:s,containerRef:a,containerProps:l,focusProps:c,externalRef:u,parentScrollingRef:d,align:m="start",direction:h="bottom",position:f="auto",overflow:g="visible",setDownOverflow:b,repositionFlag:y,captureFocus:v=!0,state:w,endTransition:_,isDisabled:S,menuItemFocus:x,gap:T=0,shift:C=0,children:R,onClose:I,...O})=>{const[N,z]=p.useState({x:V3,y:V3}),[k,M]=p.useState({}),[D,$]=p.useState(),[A,L]=p.useState(h),[P]=p.useState(yF),[F,H]=p.useReducer(fe=>fe+1,1),{transition:U,boundingBoxRef:j,boundingBoxPadding:q,rootMenuRef:V,rootAnchorRef:W,scrollNodesRef:X,reposition:J,viewScroll:Y,submenuCloseDelay:Q}=p.useContext(Zg),{submenuCtx:G,reposSubmenu:Z=y}=p.useContext(cb),K=p.useRef(null),ee=p.useRef(),se=p.useRef(),he=p.useRef(!1),re=p.useRef({width:0,height:0}),De=p.useRef(()=>{}),{hoverItem:$e,dispatch:ze,updateItems:Xe}=vF(K,ee),Re=Z2(w),je=rf(U,"open"),it=rf(U,"close"),xe=X.current,wt=fe=>{switch(fe.key){case Gn.HOME:ze(Jt.FIRST);break;case Gn.END:ze(Jt.LAST);break;case Gn.UP:ze(Jt.DECREASE,$e);break;case Gn.DOWN:ze(Jt.INCREASE,$e);break;case Gn.SPACE:fe.target&&fe.target.className.indexOf(ol)!==-1&&fe.preventDefault();return;default:return}fe.preventDefault(),fe.stopPropagation()},$t=()=>{w==="closing"&&$(),Mo(_)},Nt=fe=>{fe.stopPropagation(),P.on(Q,()=>{ze(Jt.RESET),ee.current.focus()})},st=fe=>{fe.target===fe.currentTarget&&P.off()},Ve=p.useCallback(fe=>{var Oe;const yt=s?(Oe=s.current)==null?void 0:Oe.getBoundingClientRect():i?{left:i.x,right:i.x,top:i.y,bottom:i.y,width:0,height:0}:null;if(!yt)return;xe.menu||(xe.menu=(j?j.current:Wy(V.current))||window);const We=bF(a,K,xe.menu,q);let{arrowX:Ke,arrowY:kt,x:_n,y:_t,computedDirection:Kn}=TF({arrow:o,align:m,direction:h,gap:T,shift:C,position:f,anchorRect:yt,arrowRef:se,positionHelpers:We});const{menuRect:go}=We;let Pn=go.height;if(!fe&&g!=="visible"){const{getTopOverflow:ci,getBottomOverflow:zi}=We;let yo,mr;const Is=re.current.height,Nl=zi(_t);if(Nl>0||Dl(Nl,0)&&Dl(Pn,Is))yo=Pn-Nl,mr=Nl;else{const Ra=ci(_t);(Ra<0||Dl(Ra,0)&&Dl(Pn,Is))&&(yo=Pn+Ra,mr=0-Ra,yo>=0&&(_t-=Ra))}yo>=0?(Pn=yo,$({height:yo,overflowAmt:mr})):$()}o&&M({x:Ke,y:kt}),z({x:_n,y:_t}),L(Kn),re.current={width:go.width,height:Pn}},[o,m,q,h,T,C,f,g,i,s,a,j,V,xe]);_h(()=>{Re&&(Ve(),he.current&&H()),he.current=Re,De.current=Ve},[Re,Ve,Z]),_h(()=>{D&&!b&&(K.current.scrollTop=0)},[D,b]),_h(()=>Xe,[Xe]),p.useEffect(()=>{let{menu:fe}=xe;if(!Re||!fe)return;if(fe=fe.addEventListener?fe:window,!xe.anchors){xe.anchors=[];let Ke=Wy(W&&W.current);for(;Ke&&Ke!==fe;)xe.anchors.push(Ke),Ke=Wy(Ke)}let Oe=Y;if(xe.anchors.length&&Oe==="initial"&&(Oe="auto"),Oe==="initial")return;const yt=()=>{Oe==="auto"?lb(()=>Ve(!0)):Mo(I,{reason:sf.SCROLL})},We=xe.anchors.concat(Y!=="initial"?fe:[]);return We.forEach(Ke=>Ke.addEventListener("scroll",yt)),()=>We.forEach(Ke=>Ke.removeEventListener("scroll",yt))},[W,xe,Re,I,Y,Ve]);const Kt=!!D&&D.overflowAmt>0;p.useEffect(()=>{if(Kt||!Re||!d)return;const fe=()=>lb(Ve),Oe=d.current;return Oe.addEventListener("scroll",fe),()=>Oe.removeEventListener("scroll",fe)},[Re,Kt,d,Ve]),p.useEffect(()=>{if(typeof ResizeObserver!="function"||J==="initial")return;const fe=new ResizeObserver(([yt])=>{const{borderBoxSize:We,target:Ke}=yt;let kt,_n;if(We){const{inlineSize:_t,blockSize:Kn}=We[0]||We;kt=_t,_n=Kn}else{const _t=Ke.getBoundingClientRect();kt=_t.width,_n=_t.height}kt===0||_n===0||Dl(kt,re.current.width,1)&&Dl(_n,re.current.height,1)||Cn.flushSync(()=>{De.current(),H()})}),Oe=K.current;return fe.observe(Oe,{box:"border-box"}),()=>fe.unobserve(Oe)},[J]),p.useEffect(()=>{if(!Re){ze(Jt.RESET),it||$();return}const{position:fe,alwaysUpdate:Oe}=x||{},yt=()=>{fe===xc.FIRST?ze(Jt.FIRST):fe===xc.LAST?ze(Jt.LAST):fe>=-1&&ze(Jt.SET_INDEX,void 0,fe)};if(Oe)yt();else if(v){const We=setTimeout(()=>{const Ke=K.current;Ke&&!Ke.contains(document.activeElement)&&(ee.current.focus(),yt())},je?170:100);return()=>clearTimeout(We)}},[Re,je,it,v,x,ze]);const Mn=p.useMemo(()=>({isParentOpen:Re,submenuCtx:P,dispatch:ze,updateItems:Xe}),[Re,P,ze,Xe]);let Dn,Yt;D&&(b?Yt=D.overflowAmt:Dn=D.height);const Zn=p.useMemo(()=>({reposSubmenu:F,submenuCtx:P,overflow:g,overflowAmt:Yt,parentMenuRef:K,parentDir:A}),[F,P,g,Yt,A]),Fo=Dn>=0?{maxHeight:Dn,overflow:g}:void 0,Xt=p.useMemo(()=>({state:w,dir:A}),[w,A]),zn=p.useMemo(()=>({dir:A}),[A]),hr=_a({block:ol,element:uF,modifiers:zn,className:r.className}),Ot=E.jsxs("ul",{role:"menu","aria-label":e,...K2(S),...Hf({onPointerEnter:G?.off,onPointerMove:Nt,onPointerLeave:st,onKeyDown:wt,onAnimationEnd:$t},O),ref:Kg(u,K),className:_a({block:ol,modifiers:Xt,className:t}),style:{...n,...Fo,margin:0,display:w==="closed"?"none":void 0,position:qy,left:N.x,top:N.y},children:[E.jsx("li",{tabIndex:-1,style:{position:qy,left:0,top:0,display:"block",outline:"none"},ref:ee,...F3,...c}),o&&E.jsx("li",{...F3,...r,className:hr,style:{display:"block",position:qy,left:k.x,top:k.y,...r.style},ref:se}),E.jsx(cb.Provider,{value:Zn,children:E.jsx(Q2.Provider,{value:Mn,children:E.jsx(xL.Provider,{value:$e,children:Mo(R,Xt)})})})]});return l?E.jsx(gF,{...l,isOpen:Re,children:Ot}):Ot},EL=p.forwardRef(function({"aria-label":t,className:n,containerProps:o,initialMounted:r,unmountOnClose:i,transition:s,transitionTimeout:a,boundingBoxRef:l,boundingBoxPadding:c,reposition:u="auto",submenuOpenDelay:d=300,submenuCloseDelay:m=150,viewScroll:h="initial",portal:f,theming:g,onItemClick:b,...y},v){const w=p.useRef(null),_=p.useRef({}),{anchorRef:S,state:x,onClose:T}=y,C=p.useMemo(()=>({initialMounted:r,unmountOnClose:i,transition:s,transitionTimeout:a,boundingBoxRef:l,boundingBoxPadding:c,rootMenuRef:w,rootAnchorRef:S,scrollNodesRef:_,reposition:u,viewScroll:h,submenuOpenDelay:d,submenuCloseDelay:m}),[r,i,s,a,S,l,c,u,h,d,m]),R=p.useMemo(()=>({handleClick(O,N){O.stopPropagation||Mo(b,O);let z=O.keepOpen;z===void 0&&(z=N&&O.key===Gn.SPACE),z||Mo(T,{value:O.value,key:O.key,reason:sf.CLICK})},handleClose(O){Mo(T,{key:O,reason:sf.CLICK})}}),[b,T]);if(!x)return null;const I=E.jsx(Zg.Provider,{value:C,children:E.jsx(SL.Provider,{value:R,children:E.jsx(CL,{...y,ariaLabel:t||"Menu",externalRef:v,containerRef:w,containerProps:{className:n,containerRef:w,containerProps:o,theming:g,transition:s,onClose:T}})})});return f===!0&&typeof document<"u"?Cn.createPortal(I,document.body):f?f.target?Cn.createPortal(I,f.target):f.stablePosition?null:I:I}),ub=0,db=1,Bm=2,$m=3,Fm=4,CF=5,kL=6,EF=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],LL=e=>({_s:e,status:EF[e],isEnter:e<$m,isMounted:e!==kL,isResolved:e===Bm||e>Fm}),fb=e=>e?kL:CF,kF=(e,t)=>{switch(e){case db:case ub:return Bm;case Fm:case $m:return fb(t)}},LF=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],IF=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),U3=(e,t,n,o,r)=>{clearTimeout(o.current);const i=LL(e);t(i),n.current=i,r&&r({current:i})},RF=({enter:e=!0,exit:t=!0,preEnter:n,preExit:o,timeout:r,initialEntered:i,mountOnEnter:s,unmountOnExit:a,onStateChange:l}={})=>{const[c,u]=p.useState(()=>LL(i?Bm:fb(s))),d=p.useRef(c),m=p.useRef(),[h,f]=LF(r),g=p.useCallback(()=>{const y=kF(d.current._s,a);y&&U3(y,u,d,m,l)},[l,a]),b=p.useCallback(y=>{const v=_=>{switch(U3(_,u,d,m,l),_){case db:h>=0&&(m.current=setTimeout(g,h));break;case Fm:f>=0&&(m.current=setTimeout(g,f));break;case ub:case $m:m.current=IF(v,_);break}},w=d.current.isEnter;typeof y!="boolean"&&(y=!w),y?!w&&v(e?n?ub:db:Bm):w&&v(t?o?$m:Fm:fb(a))},[g,l,e,t,n,o,h,f,a]);return p.useEffect(()=>()=>clearTimeout(m.current),[]),[c,b,g]},IL=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:o,transitionTimeout:r=500}={})=>{const[{status:i},s,a]=RF({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:r,enter:rf(o,"open"),exit:rf(o,"close")});return[{state:hF[i],endTransition:a},s]},RL=e=>{const[t,n]=IL(e),[o,r]=p.useState(),i=(s,a)=>{r({position:s,alwaysUpdate:a}),n(!0)};return[{menuItemFocus:o,...t},n,i]},NF=(e,t)=>{const[n]=p.useState({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:o=>n.v?n.v=!1:t(!0,o)}},NL=(e,t)=>{const n=p.useRef(t);p.useEffect(()=>{n.current!==t&&Mo(e,{open:t}),n.current=t},[e,t])},OF=p.forwardRef(function({"aria-label":t,captureFocus:n,initialOpen:o,menuButton:r,instanceRef:i,onMenuChange:s,...a},l){const[c,u,d]=RL(a),{state:m}=c,h=Z2(m),f=p.useRef(null),g=NF(m,(S,x)=>d(x.detail?void 0:xc.FIRST)),b=p.useCallback(S=>{u(!1),S.key&&f.current.focus()},[u]),y=S=>{switch(S.key){case Gn.UP:d(xc.LAST);break;case Gn.DOWN:d(xc.FIRST);break;default:return}S.preventDefault()},v=Mo(r,{open:h});if(!v||!v.type)throw new Error("Menu requires a menuButton prop.");const w={ref:Kg(v.ref,f),...Hf({onKeyDown:y,...g},v.props)};iF(v.type)==="MenuButton"&&(w.isOpen=h);const _=p.cloneElement(v,w);return NL(s,h),p.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>u(!1)})),E.jsxs(p.Fragment,{children:[_,E.jsx(EL,{...a,...c,"aria-label":t||(typeof v.props.children=="string"?v.props.children:"Menu"),anchorRef:f,ref:l,onClose:b})]})}),OL=(e,t)=>{const n=p.memo(t),o=p.forwardRef((r,i)=>{const s=p.useRef(null);return E.jsx(n,{...r,itemRef:s,externalRef:i,isHovering:p.useContext(xL)===s.current})});return o.displayName=`WithHovering(${e})`,o},AL=(e,t,n)=>{_h(()=>{if(e)return;const o=t.current;return n(o,!0),()=>{n(o)}},[e,t,n])},AF=OL("SubMenu",function({"aria-label":t,className:n,disabled:o,direction:r,label:i,openTrigger:s,onMenuChange:a,isHovering:l,instanceRef:c,itemRef:u,captureFocus:d,repositionFlag:m,itemProps:h={},...f}){const g=p.useContext(Zg),{rootMenuRef:b,submenuOpenDelay:y,submenuCloseDelay:v}=g,{parentMenuRef:w,parentDir:_,overflow:S}=p.useContext(cb),{isParentOpen:x,submenuCtx:T,dispatch:C,updateItems:R}=p.useContext(Q2),I=S!=="visible",[O,N,z]=RL(g),{state:k}=O,M=!!o,D=Z2(k),$=p.useRef(null),[A]=p.useState({v:0}),L=()=>{T.off(),A.v&&(clearTimeout(A.v),A.v=0)},P=(...Z)=>{L(),F(),!M&&z(...Z)},F=()=>!l&&!M&&C(Jt.SET,u.current),H=Z=>{F(),s||(A.v=setTimeout(()=>lb(P),Math.max(Z,0)))},U=Z=>{M||(Z.stopPropagation(),!(A.v||D)&&T.on(v,()=>H(y-v),()=>H(y)))},j=()=>{L(),D||C(Jt.UNSET,u.current)},q=Z=>{if(l)switch(Z.key){case Gn.ENTER:Z.preventDefault();case Gn.SPACE:case Gn.RIGHT:s!=="none"&&P(xc.FIRST)}},V=Z=>{let K=!1;switch(Z.key){case Gn.LEFT:D&&(u.current.focus(),N(!1),K=!0);break;case Gn.RIGHT:D||(K=!0);break}K&&(Z.preventDefault(),Z.stopPropagation())};AL(M,u,R),NL(a,D),p.useEffect(()=>T.toggle(D),[T,D]),p.useEffect(()=>()=>clearTimeout(A.v),[A]),p.useEffect(()=>{l&&x?u.current.focus():N(!1)},[l,x,N,u]),p.useImperativeHandle(c,()=>({openMenu:(...Z)=>{x&&P(...Z)},closeMenu:()=>{D&&(u.current.focus(),N(!1))}}));const W=p.useMemo(()=>({open:D,hover:l,disabled:M,submenu:!0}),[D,l,M]),{ref:X,className:J,...Y}=h,Q=Hf({onPointerEnter:T.off,onPointerMove:U,onPointerLeave:j,onKeyDown:q,onClick:()=>s!=="none"&&P()},Y),G=()=>{const Z=E.jsx(CL,{...f,...O,ariaLabel:t||(typeof i=="string"?i:"Submenu"),anchorRef:u,containerRef:I?b:$,direction:r||(_==="right"||_==="left"?_:"right"),parentScrollingRef:I&&w,isDisabled:M}),K=b.current;return I&&K?Cn.createPortal(Z,K):Z};return E.jsxs("li",{className:_a({block:ol,element:fF,className:n}),style:{position:"relative"},role:TL,ref:$,onKeyDown:V,children:[E.jsx("div",{role:e_,"aria-haspopup":!0,"aria-expanded":D,...K2(M,l),...Q,ref:Kg(X,u),className:_a({block:ol,element:_L,modifiers:W,className:J}),children:p.useMemo(()=>Mo(i,W),[i,W])}),k&&G()]})}),MF=(e,t,n,o)=>{const{submenuCloseDelay:r}=p.useContext(Zg),{isParentOpen:i,submenuCtx:s,dispatch:a,updateItems:l}=p.useContext(Q2),c=()=>{!n&&!o&&a(Jt.SET,e.current)},u=()=>{!o&&a(Jt.UNSET,e.current)},d=f=>{n&&!f.currentTarget.contains(f.relatedTarget)&&u()},m=f=>{o||(f.stopPropagation(),s.on(r,c,c))},h=(f,g)=>{s.off(),!g&&u()};return AL(o,e,l),p.useEffect(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:c,onBlur:d,onPointerMove:m,onPointerLeave:h}},DF=OL("MenuItem",function({className:t,value:n,href:o,type:r,checked:i,disabled:s,children:a,onClick:l,isHovering:c,itemRef:u,externalRef:d,...m}){const h=!!s,{setHover:f,...g}=MF(u,u,c,h),b=p.useContext(SL),y=p.useContext(pF),v=r==="radio",w=r==="checkbox",_=!!o&&!h&&!v&&!w,S=v?y.value===n:w?!!i:!1,x=O=>{if(h){O.stopPropagation(),O.preventDefault();return}const N={value:n,syntheticEvent:O};O.key!==void 0&&(N.key=O.key),w&&(N.checked=!S),v&&(N.name=y.name),Mo(l,N),v&&Mo(y.onRadioChange,N),b.handleClick(N,w||v)},T=O=>{if(c)switch(O.key){case Gn.ENTER:O.preventDefault();case Gn.SPACE:_?u.current.click():x(O)}},C=p.useMemo(()=>({type:r,disabled:h,hover:c,checked:S,anchor:_}),[r,h,c,S,_]),R=Hf({...g,onPointerDown:f,onKeyDown:T,onClick:x},m),I={role:v?"menuitemradio":w?"menuitemcheckbox":e_,"aria-checked":v||w?S:void 0,...K2(h,c),...R,ref:Kg(d,u),className:_a({block:ol,element:_L,modifiers:C,className:t}),children:p.useMemo(()=>Mo(a,C),[a,C])};return _?E.jsx("li",{role:TL,children:E.jsx("a",{href:o,...I})}):E.jsx("li",{...I})}),zF=p.memo(p.forwardRef(function({className:t,...n},o){return E.jsx("li",{role:"separator",...n,ref:o,className:_a({block:ol,element:dF,className:t})})}));var su=(e=>(e[e.Start=0]="Start",e[e.End=1]="End",e))(su||{});const PF="_disabled-menu_1j4o5_3",BF="_disabled-button_1j4o5_7",$F="_menu-icon_1j4o5_11",FF="_menu-label_1j4o5_15",HF="_items-container_1j4o5_19",VF="_item-container_1j4o5_23",UF="_item-icon_1j4o5_28",jF="_item-label_1j4o5_35",WF="_item-hotkey_1j4o5_39",Yr={"disabled-menu":"_disabled-menu_1j4o5_3",disabledMenu:PF,"disabled-button":"_disabled-button_1j4o5_7",disabledButton:BF,"menu-icon":"_menu-icon_1j4o5_11",menuIcon:$F,"menu-label":"_menu-label_1j4o5_15",menuLabel:FF,"items-container":"_items-container_1j4o5_19",itemsContainer:HF,"item-container":"_item-container_1j4o5_23",itemContainer:VF,"item-icon":"_item-icon_1j4o5_28",itemIcon:UF,"item-label":"_item-label_1j4o5_35",itemLabel:jF,"item-hotkey":"_item-hotkey_1j4o5_39",itemHotkey:WF},xs=({align:e,buttonClass:t,children:n,disabled:o,disabledButtonClass:r,handleClose:i,handleOpen:s,icon:a,label:l,openButtonClass:c,tooltip:u})=>{const[d,m]=p.useState(!1),h=p.useRef(null),f=p.useRef(null),g=e===su.End?"end":"start",b=p.useCallback(_=>{o||(m(_.open),_.open?s?.():i?.())},[o,i,s]),y=p.useCallback(_=>{d||f.current?.blur(),_.preventDefault(),_.stopPropagation()},[d]),v=p.useCallback(()=>{const _=a==null?null:E.jsx("span",{className:Yr.menuIcon,children:a}),S=l==null?null:E.jsx("span",{className:Yr.menuLabel,children:l}),x=an(t,[d,c],[o,Yr.disabledButton],[o,r]);return E.jsxs(mF,{...ln(u),className:x,onClick:y,ref:f,children:[_,S]})},[t,o,r,y,a,l,d,c,u]),w=p.useCallback(()=>d&&n&&E.jsx(iu,{show:!0,className:Yr.itemsContainer,children:n}),[n,d]);return p.useLayoutEffect(()=>{h.current?.closeMenu(),m(!1)},[o]),E.jsx(OF,{instanceRef:h,children:w(),menuButton:v(),onMenuChange:b,className:o===!0?Yr.disabledMenu:void 0,align:g,gap:1})},ML=new Ye,DL=new Ye;function Vf(...e){const t=e.filter(n=>n!==!1&&n!=null);if(t.length!==0)return n=>{const o={x:n.clientX,y:n.clientY};ML.broadcast({items:t,point:o})}}function qF(){DL.broadcast()}addEventListener("contextmenu",e=>{!(e.ctrlKey||e.metaKey)&&!t()&&e.preventDefault();function t(){return n()&&e.target===document.activeElement}function n(){return document.activeElement?.attributes.getNamedItem("contenteditable")?.value?.toLowerCase()==="true"}});var pe=(e=>(e.CreateProject="Create Project",e.OpenProject="Open Project",e.OpenSettings="Open Settings",e.Submit="Submit",e.Cancel="Cancel",e.Delete="Delete",e.SaveAll="Save All",e.Duplicate="Duplicate",e.Undo="Undo",e.Redo="Redo",e.InsertLine="Insert Line",e.GotoLine="Goto Line",e.UnassignParameter="Unassign Parameter",e.MixParameter="Mix Parameter",e.InlineCommand="Inline Command",e.InsertExpression="Insert Expression",e.ExitBeforeExpression="Exit Before Expression",e.ExitAfterExpression="Exit After Expression",e.InsertTextId="Insert Text ID",e.ExitBeforeTextId="Exit Before Text ID",e.ExitAfterTextId="Exit After Text ID",e.CreateScript="Create Script",e.EditScript="Edit Script",e.CreateGroup="Create Group",e.EnterGroup="Enter Group",e.ExitGroup="Exit Group",e))(pe||{});const t_=[...Np("General",[{id:"Create Project",keys:"Ctrl+N",summary:"Create a new project."},{id:"Open Project",keys:"Ctrl+O",summary:"Open an existing project."},{id:"Open Settings",keys:"Ctrl+Alt+S",summary:"Open or focus settings tab."}]),...Np("Editing",[{id:"Submit",keys:"Enter",summary:"Confirm a dialogue or submit a form."},{id:"Cancel",keys:"Escape",summary:"Cancel a dialogue or discard a form."},{id:"Delete",keys:"Delete",summary:"Delete selected asset."},{id:"Save All",keys:"Ctrl+S",summary:"Save all modified assets."},{id:"Duplicate",keys:"Ctrl+D",summary:"Duplicate selected asset."},{id:"Undo",keys:"Ctrl+Z",summary:"Undo last action."},{id:"Redo",keys:"Ctrl+Y",summary:"Redo last action."}]),...Np("Story Graph",[{id:"Create Script",keys:"Ctrl+Space",summary:"Create new scenario script asset."},{id:"Edit Script",keys:"Ctrl+E",summary:"Edit selected scenario script asset."},{id:"Create Group",keys:"Ctrl+G",summary:"Create new group to compose scenario scripts."},{id:"Enter Group",keys:"Enter",summary:"Enter selected scenario scripts group."},{id:"Exit Group",keys:"Escape",summary:"When inside a group, exit it."}]),...Np("Visual Editor",[{id:"Insert Line",keys:"Ctrl+Space",summary:"Insert a new line in visual editor."},{id:"Goto Line",keys:"Ctrl+G",summary:"Attempt to play inspected line in Unity editor."},{id:"Unassign Parameter",keys:"Backspace",summary:"Remove inspected command parameter."},{id:"Mix Parameter",keys:"Ctrl+Shift+{",summary:"Convert value of the inspected command parameter to mixed, which allows inserting script expressions and text identifiers."},{id:"Inline Command",keys:"Ctrl+[",summary:"Insert inlined command to the inspected generic text."},{id:"Insert Expression",keys:"{",summary:"When editing mixed value (dynamic parameter value or generic text), inserts new expression at the cursor position. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit Before Expression",keys:"{",summary:"When editing script expression, moves the cursor outside the expression before it starts. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit After Expression",keys:"}",summary:"When editing script expression, moves the cursor outside the expressions after it ends. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Insert Text ID",keys:"|",summary:"When editing mixed value (dynamic parameter value or generic text), inserts new text identifier at the cursor position. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit Before Text ID",keys:"#",summary:"When editing text identifier, moves the cursor outside the identifier before it starts. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit After Text ID",keys:"|",summary:"When editing text identifier, moves the cursor outside the identifier after it ends. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."}])];function Np(e,t){return t.map(n=>({...n,group:e}))}const GF="_modal_iqlml_1",YF="_value-container_iqlml_5",XF="_value_iqlml_5",JF="_readonly-value_iqlml_29",ZF="_unassigned-value_iqlml_38",KF="_labeled-container_iqlml_46",QF="_label_iqlml_46",eH="_label-with-tooltip_iqlml_63",tH="_multiline_iqlml_80",nH="_text-editor_iqlml_88",oH="_toggle_iqlml_115",rH="_named_iqlml_123",iH="_named-name_iqlml_127",sH="_named-value_iqlml_133",aH="_mixed_iqlml_138",lH="_expression_iqlml_142",cH="_text-id_iqlml_168",uH="_vector_iqlml_191",dH="_vector-component_iqlml_198",fH="_vector-component-label_iqlml_206",Qe={modal:GF,"value-container":"_value-container_iqlml_5",valueContainer:YF,value:XF,"readonly-value":"_readonly-value_iqlml_29",readonlyValue:JF,"unassigned-value":"_unassigned-value_iqlml_38",unassignedValue:ZF,"labeled-container":"_labeled-container_iqlml_46",labeledContainer:KF,label:QF,"label-with-tooltip":"_label-with-tooltip_iqlml_63",labelWithTooltip:eH,multiline:tH,"text-editor":"_text-editor_iqlml_88",textEditor:nH,toggle:oH,named:rH,"named-name":"_named-name_iqlml_127",namedName:iH,"named-value":"_named-value_iqlml_133",namedValue:sH,mixed:aH,expression:lH,"text-id":"_text-id_iqlml_168",textId:cH,vector:uH,"vector-component":"_vector-component_iqlml_198",vectorComponent:dH,"vector-component-label":"_vector-component-label_iqlml_206",vectorComponentLabel:fH},kl=({children:e,containerClass:t,label:n,labelAttrs:o,labelClass:r,readonly:i,tooltip:s,value:a})=>{const[l,c]=p.useState(0),u=p.useRef(null),d=p.useRef(null),m=`${n?Qe.labeledContainer:Qe.container} ${t??""}`,h=k0([pe.Cancel,v=>document.activeElement?.blur()]),f=p.useMemo(()=>{if(!n)return null;const v=`${Qe.label} ${s?Qe.labelWithTooltip:""} ${r??""}`;return E.jsx("span",{className:v,...ln(s,{doc:!0}),...o,children:n})},[n,o,r,s]),g=p.useMemo(()=>{let v=Qe.valueContainer;return i===!0&&(v+=` ${Qe.readonlyValue}`),!i&&a==null&&(v+=` ${Qe.unassignedValue}`),E.jsx("span",{className:v,ref:d,children:e})},[e,i,a]),b=p.useCallback(v=>{v.target===u.current&&(d.current?.querySelector(`[tabindex]:not(.${Qe.readonlyValue} *)`)?.focus(),c(-1))},[]),y=p.useCallback(v=>c(0),[]);return E.jsxs("span",{className:m,ref:u,...ln(n?void 0:s),onFocus:b,onBlur:y,onKeyDown:h,tabIndex:l,children:[f,g]})};var au={};var zL=p;function ke(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
",i}image(t,n,o){const r=a3(t);if(r===null)return o;t=r;let i=`${o}0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b+" "}):g+=b+" "}g+=this.parse(m.tokens,c),u+=this.renderer.listitem(g,f,!!h)}o+=this.renderer.list(u,a,l);continue}case"html":{const s=i;o+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=i;o+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=i,a=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1{o=o.concat(this.walkTokens(i[s],n))}):i.tokens&&(o=o.concat(this.walkTokens(i.tokens,n)))}}return o}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(o=>{const r={...o};if(r.async=this.defaults.async||r.async||!1,o.extensions&&(o.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const s=n.renderers[i.name];s?n.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),r.extensions=n),o.renderer){const i=this.defaults.renderer||new hl(this.defaults);for(const s in o.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const a=s,l=o.renderer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d||""}}r.renderer=i}if(o.tokenizer){const i=this.defaults.tokenizer||new Cm(this.defaults);for(const s in o.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,l=o.tokenizer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}r.tokenizer=i}if(o.hooks){const i=this.defaults.hooks||new bh;for(const s in o.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const a=s,l=o.hooks[a],c=i[a];bh.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(i,u)).then(m=>c.call(i,m));const d=l.call(i,u);return c.call(i,d)}:i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}r.hooks=i}if(o.walkTokens){const i=this.defaults.walkTokens,s=o.walkTokens;r.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return _i.lex(t,n??this.defaults)}parser(t,n){return xi.parse(t,n??this.defaults)}#e(t,n){return(o,r)=>{const i={...r},s={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const a=this.#t(!!s.silent,!!s.async);if(typeof o>"u"||o===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(o):o).then(l=>t(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>n(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(a);try{s.hooks&&(o=s.hooks.preprocess(o));let l=t(o,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=n(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(l){return a(l)}}}#t(t,n){return o=>{if(o.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const r="

An error occurred:

"+Xo(o.message+"",!0)+"
";return n?Promise.resolve(r):r}if(n)return Promise.reject(o);throw o}}}const ml=new CB;function pt(e,t){return ml.parse(e,t)}pt.options=pt.setOptions=function(e){return ml.setOptions(e),pt.defaults=ml.defaults,L5(pt.defaults),pt};pt.getDefaults=k_;pt.defaults=El;pt.use=function(...e){return ml.use(...e),pt.defaults=ml.defaults,L5(pt.defaults),pt};pt.walkTokens=function(e,t){return ml.walkTokens(e,t)};pt.parseInline=ml.parseInline;pt.Parser=xi;pt.parser=xi.parse;pt.Renderer=hl;pt.TextRenderer=A_;pt.Lexer=_i;pt.lexer=_i.lex;pt.Tokenizer=Cm;pt.Hooks=bh;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;xi.parse;_i.lex;const kB="_markdown_kljlj_1",LB={markdown:kB},ef=new hl;ef.link=(e,t,n)=>hl.prototype.link.call(ef,e,t,n).replace("{return hl.prototype.table.call(ef,n()?e:"",t);function n(){return e.replaceAll("","").includes("")}};function IB(e){const t=pt.parse(e,{renderer:ef});return`${t}`}const qr=(e,t)=>{const{o:n,u:o,_:r}=e;let i=n,s;const a=(u,d)=>{const m=i,h=u,f=d||(o?!o(m,h):m!==h);return(f||r)&&(i=h,s=m),[i,f,s]};return[t?u=>a(t(i,s),u):a,u=>[i,!!u,s]]},M_=typeof window<"u",B5=M_&&Node.ELEMENT_NODE,{toString:NB,hasOwnProperty:Py}=Object.prototype,RB=/^\[object (.+)\]$/,Cl=e=>e===void 0,Vg=e=>e===null,OB=e=>Cl(e)||Vg(e)?`${e}`:NB.call(e).replace(RB,"$1").toLowerCase(),ki=e=>typeof e=="number",$f=e=>typeof e=="string",$5=e=>typeof e=="boolean",ri=e=>typeof e=="function",Ri=e=>Array.isArray(e),tf=e=>typeof e=="object"&&!Ri(e)&&!Vg(e),Ug=e=>{const t=!!e&&e.length,n=ki(t)&&t>-1&&t%1==0;return Ri(e)||!ri(e)&&n?t>0&&tf(e)?t-1 in e:!0:!1},Lm=e=>{if(!e||!tf(e)||OB(e)!=="object")return!1;let t;const n="constructor",o=e[n],r=o&&o.prototype,i=Py.call(e,n),s=r&&Py.call(r,"isPrototypeOf");if(o&&!i&&!s)return!1;for(t in e);return Cl(t)||Py.call(e,t)},bd=e=>{const t=HTMLElement;return e?t?e instanceof t:e.nodeType===B5:!1},jg=e=>{const t=Element;return e?t?e instanceof t:e.nodeType===B5:!1};function et(e,t){if(Ug(e))for(let n=0;nt(e[n],n,e));return e}const Wg=(e,t)=>e.indexOf(t)>=0,Ji=(e,t)=>e.concat(t),dt=(e,t,n)=>(!n&&!$f(t)&&Ug(t)?Array.prototype.push.apply(e,t):e.push(t),e),nu=e=>{const t=Array.from,n=[];return t&&e?t(e):(e instanceof Set?e.forEach(o=>{dt(n,o)}):et(e,o=>{dt(n,o)}),n)},F5=e=>Ri(e)?e:[e],Im=e=>!!e&&!e.length,d3=e=>nu(new Set(e)),Dr=(e,t,n)=>{et(e,r=>r&&r.apply(void 0,t||[])),!n&&(e.length=0)},qg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fs=e=>e?Object.keys(e):[],ot=(e,t,n,o,r,i,s)=>{const a=[t,n,o,r,i,s];return(typeof e!="object"||Vg(e))&&!ri(e)&&(e={}),et(a,l=>{et(l,(c,u)=>{const d=l[u];if(e===d)return!0;const m=Ri(d);if(d&&Lm(d)){const h=e[u];let f=h;m&&!Ri(h)?f=[]:!m&&!Lm(h)&&(f={}),e[u]=ot(f,d)}else e[u]=m?d.slice():d})}),e},H5=(e,t)=>et(ot({},e),(n,o,r)=>{n===void 0?delete r[o]:t&&n&&Lm(n)&&(r[o]=H5(n,t))}),D_=e=>{for(const t in e)return!1;return!0},oo=(e,t,n)=>{if(Cl(n))return e?e.getAttribute(t):null;e&&e.setAttribute(t,n)},V5=(e,t)=>new Set((oo(e,t)||"").split(" ")),_o=(e,t)=>{e&&e.removeAttribute(t)},tl=(e,t,n,o)=>{if(n){const r=V5(e,t);r[o?"add":"delete"](n);const i=nu(r).join(" ").trim();oo(e,t,i)}},AB=(e,t,n)=>V5(e,t).has(n),J1=M_&&Element.prototype,U5=(e,t)=>{const n=[],o=t?jg(t)&&t:document;return o?dt(n,o.querySelectorAll(e)):n},MB=(e,t)=>{const n=t?jg(t)&&t:document;return n?n.querySelector(e):null},Nm=(e,t)=>jg(e)?(J1.matches||J1.msMatchesSelector).call(e,t):!1,Z1=e=>e?nu(e.childNodes):[],es=e=>e&&e.parentElement,ic=(e,t)=>{if(jg(e)){const n=J1.closest;if(n)return n.call(e,t);do{if(Nm(e,t))return e;e=es(e)}while(e)}},DB=(e,t,n)=>{const o=ic(e,t),r=e&&MB(n,o),i=ic(r,t)===o;return o&&r?o===e||r===e||i&&ic(ic(e,n),t)!==o:!1},rr=()=>{},ts=e=>{if(Ug(e))et(nu(e),t=>ts(t));else if(e){const t=es(e);t&&t.removeChild(e)}},z_=(e,t,n)=>{if(n&&e){let o=t,r;return Ug(n)?(r=document.createDocumentFragment(),et(n,i=>{i===o&&(o=i.previousSibling),r.appendChild(i)})):r=n,t&&(o?o!==t&&(o=o.nextSibling):o=e.firstChild),e.insertBefore(r,o||null),()=>ts(n)}return rr},xr=(e,t)=>z_(e,null,t),zB=(e,t)=>z_(es(e),e,t),f3=(e,t)=>z_(es(e),e&&e.nextSibling,t),nl=e=>{const t=document.createElement("div");return oo(t,"class",e),t},j5=e=>{const t=nl();return t.innerHTML=e.trim(),et(Z1(t),n=>ts(n))},lr=M_?window:{},yc=Math.max,PB=Math.min,nf=Math.round,P_=lr.cancelAnimationFrame,B_=lr.requestAnimationFrame,of=lr.setTimeout,K1=lr.clearTimeout,Q1=e=>e.charAt(0).toUpperCase()+e.slice(1),BB=()=>nl().style,$B=["-webkit-","-moz-","-o-","-ms-"],FB=["WebKit","Moz","O","MS","webkit","moz","o","ms"],By={},$y={},HB=e=>{let t=$y[e];if(qg($y,e))return t;const n=Q1(e),o=BB();return et($B,r=>{const i=r.replace(/-/g,"");return!(t=[e,r+e,i+n,Q1(i)+n].find(a=>o[a]!==void 0))}),$y[e]=t||""},Gg=e=>{let t=By[e]||lr[e];return qg(By,e)||(et(FB,n=>(t=t||lr[n+Q1(e)],!t)),By[e]=t),t},VB=Gg("MutationObserver"),p3=Gg("IntersectionObserver"),Rm=Gg("ResizeObserver"),eb=Gg("ScrollTimeline"),_e=(e,...t)=>e.bind(0,...t),Ws=e=>{let t;const n=e?of:B_,o=e?K1:P_;return[r=>{o(t),t=n(r,ri(e)?e():e)},()=>o(t)]},W5=(e,t)=>{let n,o,r,i=rr;const{v:s,p:a,S:l}=t||{},c=function(f){i(),K1(n),n=o=void 0,i=rr,e.apply(this,f)},u=h=>l&&o?l(o,h):h,d=()=>{i!==rr&&c(u(r)||r)},m=function(){const f=nu(arguments),g=ri(s)?s():s;if(ki(g)&&g>=0){const y=ri(a)?a():a,v=ki(y)&&y>=0,w=g>0?of:B_,_=g>0?K1:P_,x=u(f)||f,T=c.bind(0,x);i();const E=w(T,g);i=()=>_(E),v&&!n&&(n=of(d,y)),o=r=x}else c(f)};return m.m=d,m},UB=/[^\x20\t\r\n\f]+/g,q5=(e,t,n)=>{const o=e&&e.classList;let r,i=0,s=!1;if(o&&t&&$f(t)){const a=t.match(UB)||[];for(s=a.length>0;r=a[i++];)s=!!n(o,r)&&s}return s},$_=(e,t)=>{q5(e,t,(n,o)=>n.remove(o))},ba=(e,t)=>(q5(e,t,(n,o)=>n.add(o)),_e($_,e,t)),jB=/^--/,h3=(e,t)=>e.getPropertyValue(t)||e[t]||"",F_=e=>{const t=e||0;return isFinite(t)?t:0},Lp=e=>F_(parseFloat(e||"")),Ip=e=>`${(F_(e)*100).toFixed(3)}%`,Wu=e=>`${F_(e)}px`;function fa(e,t){e&&et(t,(n,o)=>{try{const r=e.style,i=ki(n)?Wu(n):n+"";jB.test(o)?r.setProperty(o,i):r[o]=i}catch{}})}function ps(e,t,n){const o=$f(t);let r=o?"":{};if(e){const i=lr.getComputedStyle(e,n)||e.style;r=o?h3(i,t):t.reduce((s,a)=>(s[a]=h3(i,a),s),r)}return r}const vc=e=>ps(e,"direction")==="rtl",m3=(e,t,n)=>{const o=t?`${t}-`:"",r=n?`-${n}`:"",i=`${o}top${r}`,s=`${o}right${r}`,a=`${o}bottom${r}`,l=`${o}left${r}`,c=ps(e,[i,s,a,l]);return{t:Lp(c[i]),r:Lp(c[s]),b:Lp(c[a]),l:Lp(c[l])}},Ml=(e,t)=>`translate${tf(e)?`(${e.x},${e.y})`:`${t?"X":"Y"}(${e})`}`,G5="paddingTop",H_="paddingRight",V_="paddingLeft",Om="paddingBottom",Am="marginLeft",Mm="marginRight",wd="marginBottom",qu="overflowX",Gu="overflowY",hs="width",ms="height",Bc="hidden",WB={w:0,h:0},Yg=(e,t)=>t?{w:t[`${e}Width`],h:t[`${e}Height`]}:WB,qB=e=>Yg("inner",e||lr),_d=_e(Yg,"offset"),wh=_e(Yg,"client"),Dm=_e(Yg,"scroll"),zm=e=>{const t=parseFloat(ps(e,hs))||0,n=parseFloat(ps(e,ms))||0;return{w:t-nf(t),h:n-nf(n)}},Si=e=>e.getBoundingClientRect(),tb=e=>!!(e&&(e[ms]||e[hs])),Y5=(e,t)=>{const n=tb(e);return!tb(t)&&n},g3=()=>performance.now(),GB=(e,t,n,o,r)=>{let i=0;const s=g3(),a=yc(0,n),l=c=>{const u=g3(),m=u-s>=a,h=c?1:1-(yc(0,s+a-u)/a||0),f=(t-e)*(ri(r)?r(h,h*a,0,1,a):h)+e,g=m||h===1;o&&o(f,h,g),i=g?0:B_(()=>l())};return l(),c=>{P_(i),c&&l(c)}},Xg=(e,t,n,o)=>{if(e&&t){let r=!0;return et(n,i=>{const s=o?o(e[i]):e[i],a=o?o(t[i]):t[i];s!==a&&(r=!1)}),r}return!1},X5=(e,t)=>Xg(e,t,["w","h"]),J5=(e,t)=>Xg(e,t,["x","y"]),YB=(e,t)=>Xg(e,t,["t","r","b","l"]),y3=(e,t,n)=>Xg(e,t,[hs,ms],n&&(o=>nf(o)));let Np;const v3="passive",XB=()=>{if(Cl(Np)){Np=!1;try{lr.addEventListener(v3,rr,Object.defineProperty({},v3,{get(){Np=!0}}))}catch{}}return Np},Z5=e=>e.split(" "),b3=(e,t,n,o)=>{et(Z5(t),r=>{e.removeEventListener(r,n,o)})},Wt=(e,t,n,o)=>{var r;const i=XB(),s=(r=i&&o&&o.$)!=null?r:i,a=o&&o.O||!1,l=o&&o.C||!1,c=i?{passive:s,capture:a}:a;return _e(Dr,Z5(t).map(u=>{const d=l?m=>{b3(e,u,d,a),n(m)}:n;return e.addEventListener(u,d,c),_e(b3,e,u,d,a)}))},K5=e=>e.stopPropagation(),w3=e=>e.preventDefault(),JB={x:0,y:0},Fy=e=>{const t=e&&Si(e);return t?{x:t.left+lr.pageYOffset,y:t.top+lr.pageXOffset}:JB},Q5=(e,t,n)=>n?n.n?-e:n.i?t-e:e:e,ZB=(e,t)=>[t&&t.i?e:0,Q5(e,e,t)],wa=(e,t)=>{const{x:n,y:o}=ki(t)?{x:t,y:t}:t||{};ki(n)&&(e.scrollLeft=n),ki(o)&&(e.scrollTop=o)},$c=e=>({x:e.scrollLeft,y:e.scrollTop}),_3=(e,t)=>{et(F5(t),e)},nb=e=>{const t=new Map,n=(i,s)=>{if(i){const a=t.get(i);_3(l=>{a&&a[l?"delete":"clear"](l)},s)}else t.forEach(a=>{a.clear()}),t.clear()},o=(i,s)=>{if($f(i)){const c=t.get(i)||new Set;return t.set(i,c),_3(u=>{ri(u)&&c.add(u)},s),_e(n,i,s)}$5(s)&&s&&n();const a=fs(i),l=[];return et(a,c=>{const u=i[c];u&&dt(l,o(c,u))}),_e(Dr,l)},r=(i,s)=>{et(nu(t.get(i)),a=>{s&&!Im(s)?a.apply(0,s):a()})};return o(e||{}),[o,n,r]},x3=e=>JSON.stringify(e,(t,n)=>{if(ri(n))throw 0;return n}),S3=(e,t)=>e?`${t}`.split(".").reduce((n,o)=>n&&qg(n,o)?n[o]:void 0,e):void 0,KB={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:[0,33],attributes:null,ignoreMutation:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},eL=(e,t)=>{const n={},o=Ji(fs(t),fs(e));return et(o,r=>{const i=e[r],s=t[r];if(tf(i)&&tf(s))ot(n[r]={},eL(i,s)),D_(n[r])&&delete n[r];else if(qg(t,r)&&s!==i){let a=!0;if(Ri(i)||Ri(s))try{x3(i)===x3(s)&&(a=!1)}catch{}a&&(n[r]=s)}}),n},QB=(e,t,n)=>o=>[S3(e,o),n||S3(t,o)!==void 0],Ff="data-overlayscrollbars",tL="os-environment",nL=`${tL}-flexbox-glue`,e$=`${nL}-max`,oL="os-scrollbar-hidden",Hy=`${Ff}-initialize`,Gr=Ff,rL=`${Gr}-overflow-x`,iL=`${Gr}-overflow-y`,bc="overflowVisible",t$="scrollbarHidden",T3="scrollbarPressed",Pm="updating",qs=`${Ff}-viewport`,Vy="arrange",sL="scrollbarHidden",wc=bc,ob=`${Ff}-padding`,n$=wc,E3=`${Ff}-content`,U_="os-size-observer",o$=`${U_}-appear`,r$=`${U_}-listener`,i$="os-trinsic-observer",s$="os-no-css-vars",a$="os-theme-none",$o="os-scrollbar",l$=`${$o}-rtl`,c$=`${$o}-horizontal`,u$=`${$o}-vertical`,aL=`${$o}-track`,j_=`${$o}-handle`,d$=`${$o}-visible`,f$=`${$o}-cornerless`,C3=`${$o}-transitionless`,k3=`${$o}-interaction`,L3=`${$o}-unusable`,rb=`${$o}-auto-hide`,I3=`${rb}-hidden`,N3=`${$o}-wheel`,p$=`${aL}-interactive`,h$=`${j_}-interactive`,lL={},cL={},m$=e=>{et(e,t=>et(t,(n,o)=>{lL[o]=t[o]}))},uL=(e,t,n)=>fs(e).map(o=>{const{static:r,instance:i}=e[o],[s,a,l]=n||[],c=n?i:r;if(c){const u=n?c(s,a,t):c(t);return(l||cL)[o]=u}}),ou=e=>cL[e],g$="__osOptionsValidationPlugin",y$="__osSizeObserverPlugin",W_="__osScrollbarsHidingPlugin",dL="__osClickScrollPlugin",v$={[dL]:{static:()=>(e,t,n,o,r)=>{let i=0,s=rr;const a=l=>{s=GB(l,l+o*Math.sign(n),133,(c,u,d)=>{e(c);const m=t(),h=m+o,f=r>=m&&r<=h;if(d&&!f){if(i)a(c);else{const g=of(()=>{a(c)},222);s=()=>{clearTimeout(g)}}i++}})};return a(0),()=>s()}}};let Uy;const R3=(e,t,n,o)=>{xr(e,t);const r=wh(t),i=_d(t),s=zm(n);return o&&ts(t),{x:i.h-r.h+s.h,y:i.w-r.w+s.w}},b$=e=>{let t=!1;const n=ba(e,oL);try{t=ps(e,HB("scrollbar-width"))==="none"||ps(e,"display","::-webkit-scrollbar")==="none"}catch{}return n(),t},w$=(e,t)=>{fa(e,{[qu]:Bc,[Gu]:Bc,direction:"rtl"}),wa(e,{x:0});const n=Fy(e),o=Fy(t);wa(e,{x:-999});const r=Fy(t);return{i:n.x===o.x,n:o.x!==r.x}},_$=(e,t)=>{const n=ba(e,nL),o=Si(e),r=Si(t),i=y3(r,o,!0),s=ba(e,e$),a=Si(e),l=Si(t),c=y3(l,a,!0);return n(),s(),i&&c},x$=()=>{const{body:e}=document,n=j5(`
`)[0],o=n.firstChild,[r,,i]=nb(),[s,a]=qr({o:R3(e,n,o),u:J5},_e(R3,e,n,o,!0)),[l]=a(),c=b$(n),u={x:l.x===0,y:l.y===0},d={elements:{host:null,padding:!c,viewport:b=>c&&b===b.ownerDocument.body&&b,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},m=ot({},KB),h=_e(ot,{},m),f=_e(ot,{},d),g={L:l,A:u,I:c,T:ps(n,"zIndex")==="-1",V:!!eb,U:w$(n,o),B:_$(n,o),j:_e(r,"r"),N:f,G:b=>ot(d,b)&&f(),q:h,F:b=>ot(m,b)&&h(),W:ot({},d),X:ot({},m)};return _o(n,"style"),ts(n),lr.addEventListener("resize",()=>{let b;if(!c&&(!u.x||!u.y)){const y=ou(W_);b=!!(y?y.P():rr)(g,s)}i("r",[b])}),g},Po=()=>(Uy||(Uy=x$()),Uy),q_=(e,t)=>ri(t)?t.apply(0,e):t,S$=(e,t,n,o)=>{const r=Cl(o)?n:o;return q_(e,r)||t.apply(0,e)},fL=(e,t,n,o)=>{const r=Cl(o)?n:o,i=q_(e,r);return!!i&&(bd(i)?i:t.apply(0,e))},T$=(e,t)=>{const{nativeScrollbarsOverlaid:n,body:o}=t||{},{A:r,I:i,N:s}=Po(),{nativeScrollbarsOverlaid:a,body:l}=s().cancel,c=n??a,u=Cl(o)?l:o,d=(r.x||r.y)&&c,m=e&&(Vg(u)?!i:u);return!!d||!!m},G_=new WeakMap,E$=(e,t)=>{G_.set(e,t)},C$=e=>{G_.delete(e)},pL=e=>G_.get(e),k$=(e,t,n)=>{let o=!1;const r=n?new WeakMap:!1,i=()=>{o=!0},s=a=>{if(r&&n){const l=n.map(c=>{const[u,d]=c||[];return[d&&u?(a||U5)(u,e):[],d]});et(l,c=>et(c[0],u=>{const d=c[1],m=r.get(u)||[];if(e.contains(u)&&d){const f=Wt(u,d.trim(),g=>{o?(f(),r.delete(u)):t(g)});r.set(u,dt(m,f))}else Dr(m),r.delete(u)}))}};return s(),[i,s]},O3=(e,t,n,o)=>{let r=!1;const{Y:i,K:s,J:a,Z:l,tt:c,nt:u}=o||{},d=W5(()=>r&&n(!0),{v:33,p:99}),[m,h]=k$(e,d,a),f=i||[],g=s||[],b=Ji(f,g),y=(w,_)=>{if(!Im(_)){const S=c||rr,x=u||rr,T=[],E=[];let N=!1,I=!1;if(et(_,O=>{const{attributeName:R,target:z,type:k,oldValue:M,addedNodes:D,removedNodes:$}=O,A=k==="attributes",L=k==="childList",P=e===z,F=A&&R,H=F?oo(z,R||""):null,U=F&&M!==H,j=Wg(g,R)&&U;if(t&&(L||!P)){const q=A&&U,V=q&&l&&Nm(z,l),X=(V?!S(z,R,M,H):!A||q)&&!x(O,!!V,e,o);et(D,J=>dt(T,J)),et($,J=>dt(T,J)),I=I||X}!t&&P&&U&&!S(z,R,M,H)&&(dt(E,R),N=N||j)}),h(O=>d3(T).reduce((R,z)=>(dt(R,U5(O,z)),Nm(z,O)?dt(R,z):R),[])),t)return!w&&I&&n(!1),[!1];if(!Im(E)||N){const O=[d3(E),N];return!w&&n.apply(0,O),O}}},v=new VB(_e(y,!1));return[()=>(v.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:b,subtree:t,childList:t,characterData:t}),r=!0,()=>{r&&(m(),v.disconnect(),r=!1)}),()=>{if(r)return d.m(),y(!0,v.takeRecords())}]},hL=(e,t,n)=>{const{ot:r,st:i}=n||{},s=ou(y$),{U:a}=Po(),l=_e(vc,e),[c]=qr({o:!1,_:!0});return()=>{const u=[],m=j5(`
`)[0],h=m.firstChild,f=g=>{const b=g instanceof ResizeObserverEntry,y=!b&&Ri(g);let v=!1,w=!1,_=!0;if(b){const[S,,x]=c(g.contentRect),T=tb(S),E=Y5(S,x);w=!x||E,v=!w&&!T,_=!v}else y?[,_]=g:w=g===!0;if(r&&_){const S=y?g[0]:vc(m);wa(m,{x:Q5(3333333,3333333,S&&a),y:3333333})}v||t({et:y?g:void 0,ct:!y,st:w})};if(Rm){const g=new Rm(b=>f(b.pop()));g.observe(h),dt(u,()=>{g.disconnect()})}else if(s){const[g,b]=s(h,f,i);dt(u,Ji([ba(m,o$),Wt(m,"animationstart",g)],b))}else return rr;if(r){const[g]=qr({o:void 0},l);dt(u,Wt(m,"scroll",b=>{const y=g(),[v,w,_]=y;w&&($_(h,"ltr rtl"),ba(h,v?"rtl":"ltr"),f([!!v,w,_])),K5(b)}))}return _e(Dr,dt(u,xr(e,m)))}},L$=(e,t)=>{let n;const o=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,r=nl(i$),[i]=qr({o:!1}),s=(l,c)=>{if(l){const u=i(o(l)),[,d]=u;return d&&!c&&t(u)&&[u]}},a=(l,c)=>s(c.pop(),l);return[()=>{const l=[];if(p3)n=new p3(_e(a,!1),{root:e}),n.observe(r),dt(l,()=>{n.disconnect()});else{const c=()=>{const u=_d(r);s(u)};dt(l,hL(r,c)()),c()}return _e(Dr,dt(l,xr(e,r)))},()=>n&&a(!0,n.takeRecords())]},I$=(e,t)=>{let n,o,r,i,s;const{I:a}=Po(),l=`[${Gr}]`,c=`[${qs}]`,u=["tabindex"],d=["wrap","cols","rows"],m=["id","class","style","open"],h={rt:!1,lt:vc(e.it)},{it:f,ut:g,ft:b,_t:y,dt:v,vt:w,ht:_}=e,{B:S,j:x}=Po(),[T]=qr({u:X5,o:{w:0,h:0}},()=>{const F=w(wc,bc),H=w(Vy,""),U=H&&$c(g);_(wc,bc),_(Vy,""),_("",Pm,!0);const j=Dm(b),q=Dm(g),V=zm(g);return _(wc,bc,F),_(Vy,"",H),_("",Pm),wa(g,U),{w:q.w+j.w+V.w,h:q.h+j.h+V.h}}),E=y?d:Ji(m,d),N=W5(t,{v:()=>n,p:()=>o,S(F,H){const[U]=F,[j]=H;return[Ji(fs(U),fs(j)).reduce((q,V)=>(q[V]=U[V]||j[V],q),{})]}}),I=F=>{et(F||u,H=>{if(Wg(u,H)){const U=oo(f,H);$f(U)?oo(g,H,U):_o(g,H)}})},O=(F,H)=>{const[U,j]=F,q={gt:j};return ot(h,{rt:U}),!H&&t(q),q},R=({ct:F,et:H,st:U})=>{const q=!(F&&!U&&!H)&&a?N:t,[V,W]=H||[];H&&ot(h,{lt:V}),q({ct:F||U,st:U,bt:W})},z=(F,H)=>{const[,U]=T(),j={wt:U};return U&&!H&&(F?t:N)(j),j},k=(F,H,U)=>{const j={yt:H};return H&&!U?N(j):v||I(F),j},[M,D]=b||!S?L$(f,O):[],$=!v&&hL(f,R,{st:!0,ot:!0}),[A,L]=O3(f,!1,k,{K:m,Y:Ji(m,u)}),P=v&&Rm&&new Rm(F=>{const H=F[F.length-1].contentRect;R({ct:!0,st:Y5(H,s)}),s=H});return[()=>{I(),P&&P.observe(f);const F=$&&$(),H=M&&M(),U=A(),j=x(q=>{const[,V]=T();N({St:q,wt:V})});return()=>{P&&P.disconnect(),F&&F(),H&&H(),i&&i(),U(),j()}},({$t:F,xt:H,Ot:U})=>{const j={},[q]=F("update.ignoreMutation"),[V,W]=F("update.attributes"),[X,J]=F("update.elementEvents"),[Y,Q]=F("update.debounce"),G=J||W,Z=H||U,K=ee=>ri(q)&&q(ee);if(G){r&&r(),i&&i();const[ee,se]=O3(b||g,!0,z,{Y:Ji(E,V||[]),J:X,Z:l,nt:(he,re)=>{const{target:De,attributeName:$e}=he;return(!re&&$e&&!v?DB(De,l,c):!1)||!!ic(De,`.${$o}`)||!!K(he)}});i=ee(),r=se}if(Q)if(N.m(),Ri(Y)){const ee=Y[0],se=Y[1];n=ki(ee)&&ee,o=ki(se)&&se}else ki(Y)?(n=Y,o=!1):(n=!1,o=!1);if(Z){const ee=L(),se=D&&D(),he=r&&r();ee&&ot(j,k(ee[0],ee[1],Z)),se&&ot(j,O(se[0],Z)),he&&ot(j,z(he[0],Z))}return j},h]},ib=(e,t,n)=>yc(e,PB(t,n)),N$=(e,t,n)=>{const o=nf(t),[r,i]=ZB(o,n),s=(i-e)/i,a=e/r,l=e/i,c=n?n.n?s:n.i?a:l:l;return ib(0,1,c)},mL=(e,t,n)=>{if(n){const l=t?hs:ms,{Ct:c,Ht:u}=n,d=Si(u)[l],m=Si(c)[l];return ib(0,1,d/m)}const o=t?"x":"y",{zt:r,It:i}=e,s=i[o],a=r[o];return ib(0,1,s/(s+a))},A3=(e,t,n,o)=>{const r=mL(e,o,t);return 1/r*(1-r)*n},R$=(e,t,n,o)=>{const{N:r,T:i}=Po(),{scrollbars:s}=r(),{slot:a}=s,{At:l,it:c,ut:u,Et:d,Tt:m,Dt:h,dt:f}=t,{scrollbars:g}=d?{}:e,{slot:b}=g||{},y=new Map,v=W=>eb&&new eb({source:m,axis:W}),w=v("x"),_=v("y"),S=fL([l,c,u],()=>f&&h?l:c,a,b),x=W=>f&&!h&&es(W)===u,T=(W,X,J)=>{const Y=.5*(J?1:-1),Q=X&&J?-1:1;return{transform:[Ml(Wu(0+Y),X),Ml(Wu(W*Q+Y),X)]}},E=(W,X)=>ot(W,X?{clear:["left"]}:{}),N=W=>{y.forEach((X,J)=>{(W?Wg(F5(W),J):!0)&&(et(X||[],Q=>{Q&&Q.cancel()}),y.delete(J))})},I=(W,X,J,Y)=>{const Q=y.get(W)||[],G=Q.find(Z=>Z&&Z.timeline===X);G?G.effect=new KeyframeEffect(W,J,{composite:Y}):y.set(W,Ji(Q,[W.animate(J,{timeline:X,composite:Y})]))},O=(W,X,J)=>{const Y=J?ba:$_;et(W,Q=>{Y(Q.kt,X)})},R=(W,X)=>{et(W,J=>{const[Y,Q]=X(J);fa(Y,Q)})},z=(W,X)=>{R(W,J=>{const{Ht:Y}=J;return[Y,{[X?hs:ms]:Ip(mL(n,X))}]})},k=(W,X)=>{w&&_?et(W,J=>{const{kt:Y,Ht:Q}=J,G=_e(A3,n,J),Z=X&&vc(Y),K=G(Z?1:0,X),ee=G(Z?0:1,X);I(Q,X?w:_,E({transform:[Ml(Ip(K),X),Ml(Ip(ee),X)]},Z))}):R(W,J=>{const{Ht:Y,kt:Q}=J,{U:G}=Po(),Z=X?"x":"y",{zt:K}=n,ee=vc(Q),se=A3(n,J,N$($c(m)[Z],K[Z],X&&ee&&G),X);return[Y,{transform:Ml(Ip(se),X)}]})},M=W=>{const{kt:X}=W,J=x(X)&&X,{x:Y,y:Q}=$c(m);return[J,{transform:J?Ml({x:Wu(Y),y:Wu(Q)}):""}]},D=[],$=[],A=[],L=(W,X,J)=>{const Y=$5(J),Q=Y?J:!0,G=Y?!J:!0;Q&&O($,W,X),G&&O(A,W,X)},P=()=>{z($,!0),z(A)},F=()=>{k($,!0),k(A)},H=()=>{if(f)if(w&&_){const{zt:W}=n,X=!!$.find(({kt:Y})=>vc(Y)),J=(Y,Q,G,Z,K)=>I(Y,Q,E(T(G,Z,K),X),"add");et(Ji(A,$),({kt:Y})=>{x(Y)?(J(Y,w,W.x,!0,X),J(Y,_,W.y)):N(Y)})}else R($,M),R(A,M)},U=W=>{const X=W?c$:u$,J=W?$:A,Y=Im(J)?C3:"",Q=nl(`${$o} ${X} ${Y}`),G=nl(aL),Z=nl(j_),K={kt:Q,Ct:G,Ht:Z};return i||ba(Q,s$),dt(J,K),dt(D,[xr(Q,G),xr(G,Z),_e(ts,Q),N,o(K,L,k,W)]),K},j=_e(U,!0),q=_e(U,!1),V=()=>(xr(S,$[0].kt),xr(S,A[0].kt),of(()=>{L(C3)},300),_e(Dr,D));return j(),q(),[{Mt:P,Rt:F,Pt:H,Lt:L,Vt:{V:w,Ut:$,Bt:j,jt:_e(R,$)},Nt:{V:_,Ut:A,Bt:q,jt:_e(R,A)}},V]},O$=(e,t,n)=>{const{it:o,Tt:r,Gt:i}=t;return(s,a,l,c)=>{const{kt:u,Ct:d,Ht:m}=s,[h,f]=Ws(333),[g,b]=Ws(),y=_e(l,[s],c),v=!!r.scrollBy,w=`client${c?"X":"Y"}`,_=c?hs:ms,S=c?"left":"top",x=c?"w":"h",T=c?"x":"y",E=O=>O.propertyName.indexOf(_)>-1,N=()=>{const O="pointerup pointerleave pointercancel lostpointercapture",R=(z,k)=>M=>{const{zt:D}=n,$=_d(d)[x]-_d(m)[x],L=k*M/$*D[T];wa(r,{[T]:z+L})};return Wt(d,"pointerdown",z=>{const k=ic(z.target,`.${j_}`)===m,M=k?m:d,D=e.scrollbars,{button:$,isPrimary:A,pointerType:L}=z,{pointers:P}=D;if($===0&&A&&D[k?"dragScroll":"clickScroll"]&&(P||[]).includes(L)){const H=!k&&z.shiftKey,U=_e(Si,m),j=_e(Si,d),q=(he,re)=>(he||U())[S]-(re||j())[S],V=nf(Si(r)[_])/_d(r)[x]||1,W=R($c(r)[T]||0,1/V),X=z[w],J=U(),Y=j(),Q=J[_],G=q(J,Y)+Q/2,Z=X-Y[S],K=k?0:Z-G,ee=he=>{Dr(se),M.releasePointerCapture(he.pointerId)},se=[_e(tl,o,Gr,T3),Wt(i,O,ee),Wt(i,"selectstart",he=>w3(he),{$:!1}),Wt(d,O,ee),Wt(d,"pointermove",he=>{const re=he[w]-X;(k||H)&&W(K+re)})];if(tl(o,Gr,T3,!0),M.setPointerCapture(z.pointerId),H)W(K);else if(!k){const he=ou(dL);he&&dt(se,he(W,q,K,Q,Z))}}})};let I=!0;return _e(Dr,[Wt(u,"pointerenter",()=>{a(k3,!0)}),Wt(u,"pointerleave pointercancel",()=>{a(k3,!1)}),Wt(u,"wheel",O=>{const{deltaX:R,deltaY:z,deltaMode:k}=O;v&&I&&k===0&&es(u)===o&&r.scrollBy({left:R,top:z,behavior:"smooth"}),I=!1,a(N3,!0),h(()=>{I=!0,a(N3)}),w3(O)},{$:!1,O:!0}),Wt(m,"transitionstart",O=>{if(E(O)){const R=()=>{y(),g(R)};R()}}),Wt(m,"transitionend transitioncancel",O=>{E(O)&&(b(),y())}),Wt(u,"mousedown",_e(Wt,i,"click",K5,{C:!0,O:!0}),{O:!0}),N(),f,b])}},A$=(e,t,n,o,r,i)=>{let s,a,l,c,u,d=rr,m=0;const[h,f]=Ws(),[g,b]=Ws(),[y,v]=Ws(100),[w,_]=Ws(100),[S,x]=Ws(100),[T,E]=Ws(()=>m),[N,I]=R$(e,r,o,O$(t,r,o)),{it:O,qt:R,Dt:z}=r,{Lt:k,Mt:M,Rt:D,Pt:$}=N,A=U=>{k(rb,U,!0),k(rb,U,!1)},L=(U,j)=>{if(E(),U)k(I3);else{const q=_e(k,I3,!0);m>0&&!j?T(q):q()}},P=U=>U.pointerType==="mouse",F=U=>{P(U)&&(c=a,c&&L(!0))},H=[v,E,_,x,b,f,()=>d(),Wt(O,"pointerover",F,{C:!0}),Wt(O,"pointerenter",F),Wt(O,"pointerleave",U=>{P(U)&&(c=!1,a&&L(!1))}),Wt(O,"pointermove",U=>{P(U)&&s&&h(()=>{v(),L(!0),w(()=>{s&&L(!1)})})}),Wt(R,"scroll",U=>{g(()=>{D(),l&&L(!0),y(()=>{l&&!c&&L(!1)})}),i(U),$()})];return[()=>_e(Dr,dt(H,I())),({$t:U,Ot:j,Ft:q,Wt:V})=>{const{Xt:W,Yt:X,Kt:J}=V||{},{bt:Y,st:Q}=q||{},{lt:G}=n,{A:Z}=Po(),{zt:K,Jt:ee,Zt:se}=o,[he,re]=U("showNativeOverlaidScrollbars"),[De,$e]=U("scrollbars.theme"),[ze,Xe]=U("scrollbars.visibility"),[Ne,je]=U("scrollbars.autoHide"),[it,xe]=U("scrollbars.autoHideSuspend"),[wt]=U("scrollbars.autoHideDelay"),[$t,Rt]=U("scrollbars.dragScroll"),[st,Ve]=U("scrollbars.clickScroll"),Kt=Q&&!j,Mn=se.x||se.y,Dn=W||X||Y||j,Yt=J||Xe,Zn=he&&Z.x&&Z.y,Fo=(Xt,zn)=>{const hr=ze==="visible"||ze==="auto"&&Xt==="scroll";return k(d$,hr,zn),hr};if(m=wt,Kt&&(it&&Mn?(A(!1),d(),S(()=>{d=Wt(R,"scroll",_e(A,!0),{C:!0})})):A(!0)),re&&k(a$,Zn),$e&&(k(u),k(De,!0),u=De),xe&&!it&&A(!0),je&&(s=Ne==="move",a=Ne==="leave",l=Ne!=="never",L(!l,!0)),Rt&&k(h$,$t),Ve&&k(p$,st),Yt){const Xt=Fo(ee.x,!0),zn=Fo(ee.y,!1);k(f$,!(Xt&&zn))}Dn&&(M(),D(),$(),k(L3,!K.x,!0),k(L3,!K.y,!1),k(l$,G&&!z))},{},N]},M$=e=>{const t=Po(),{N:n,I:o}=t,r=ou(W_),i=r&&r.H,{elements:s}=n(),{host:a,padding:l,viewport:c,content:u}=s,d=bd(e),m=d?{}:e,{elements:h}=m,{host:f,padding:g,viewport:b,content:y}=h||{},v=d?e:m.target,w=Nm(v,"textarea"),_=v.ownerDocument,S=_.documentElement,x=v===_.body,T=_.defaultView,E=_e(S$,[v]),N=_e(fL,[v]),I=_e(q_,[v]),O=_e(nl,""),R=_e(E,O,c),z=_e(N,O,u),k=R(b),M=k===v,D=M&&x,$=!M&&z(y),A=!M&&bd(k)&&k===$,L=A&&!!I(u),P=L?R():k,F=L?$:z(),U=D?S:A?P:k,j=w?E(O,a,f):v,q=D?U:j,V=A?F:$,W=_.activeElement,X=!M&&T.top===T&&W===v,J={At:v,it:q,ut:U,Qt:!M&&N(O,l,g),ft:V,tn:!M&&!o&&i&&i(t),Tt:D?S:U,qt:D?_:U,nn:T,Gt:_,_t:w,Dt:x,Et:d,dt:M,sn:A,vt:(je,it)=>AB(U,M?Gr:qs,M?it:je),ht:(je,it,xe)=>tl(U,M?Gr:qs,M?it:je,xe)},Y=fs(J).reduce((je,it)=>{const xe=J[it];return dt(je,xe&&bd(xe)&&!es(xe)?xe:!1)},[]),Q=je=>je?Wg(Y,je):null,{At:G,it:Z,Qt:K,ut:ee,ft:se,tn:he}=J,re=[()=>{_o(Z,Gr),_o(Z,Hy),_o(G,Hy),x&&(_o(S,Gr),_o(S,Hy))}],De=w&&Q(Z);let $e=w?G:Z1([se,ee,K,Z,G].find(je=>Q(je)===!1));const ze=D?G:se||ee,Xe=_e(Dr,re);return[J,()=>{oo(Z,Gr,M?"viewport":"host"),oo(K,ob,""),oo(se,E3,""),M||oo(ee,qs,"");const je=x&&!M?ba(es(v),oL):rr,it=xe=>{xr(es(xe),Z1(xe)),ts(xe)};if(De&&(f3(G,Z),dt(re,()=>{f3(Z,G),ts(Z)})),xr(ze,$e),xr(Z,K),xr(K||Z,!M&&ee),xr(ee,se),dt(re,()=>{je(),_o(K,ob),_o(se,E3),_o(ee,rL),_o(ee,iL),_o(ee,qs),Q(se)&&it(se),Q(ee)&&it(ee),Q(K)&&it(K)}),o&&!M&&(tl(ee,qs,sL,!0),dt(re,_e(_o,ee,qs))),he&&(zB(ee,he),dt(re,_e(ts,he))),X){const xe="tabindex",wt=oo(ee,xe);oo(ee,xe,"-1"),ee.focus();const $t=()=>wt?oo(ee,xe,wt):_o(ee,xe),Rt=Wt(_,"pointerdown keydown",()=>{$t(),Rt()});dt(re,[$t,Rt])}else W&&W.focus&&W.focus();return $e=0,Xe},Xe]},D$=({ft:e})=>({Ft:t,en:n,Ot:o})=>{const{B:r}=Po(),{gt:i}=t||{},{rt:s}=n;(e||!r)&&(i||o)&&fa(e,{[ms]:s?"":"100%"})},z$=({it:e,Qt:t,ut:n,dt:o},r)=>{const[i,s]=qr({u:YB,o:m3()},_e(m3,e,"padding",""));return({$t:a,Ft:l,en:c,Ot:u})=>{let[d,m]=s(u);const{I:h,B:f}=Po(),{ct:g,wt:b,bt:y}=l||{},{lt:v}=c,[w,_]=a("paddingAbsolute");(g||m||(u||!f&&b))&&([d,m]=i(u));const x=!o&&(_||y||m);if(x){const T=!w||!t&&!h,E=d.r+d.l,N=d.t+d.b,I={[Mm]:T&&!v?-E:0,[wd]:T?-N:0,[Am]:T&&v?-E:0,top:T?-d.t:0,right:T?v?-d.r:"auto":0,left:T?v?"auto":-d.l:0,[hs]:T?`calc(100% + ${E}px)`:""},O={[G5]:T?d.t:0,[H_]:T?d.r:0,[Om]:T?d.b:0,[V_]:T?d.l:0};fa(t||n,I),fa(n,O),ot(r,{Qt:d,cn:!T,k:t?O:ot({},I,O)})}return{rn:x}}},P$=({it:e,Qt:t,ut:n,tn:o,dt:r,ht:i,Dt:s,nn:a},l)=>{const c=_e(yc,0),u="visible",d=42,m={u:X5,o:{w:0,h:0}},h={u:J5,o:{x:Bc,y:Bc}},f=(H,U)=>{const j=lr.devicePixelRatio%1!==0?1:0,q={w:c(H.w-U.w),h:c(H.h-U.h)};return{w:q.w>j?q.w:0,h:q.h>j?q.h:0}},g=H=>H.indexOf(u)===0,{L:b,B:y,I:v,A:w}=Po(),_=ou(W_),S=!r&&!v&&(w.x||w.y),x=s&&r,[T,E]=qr(m,_e(zm,n)),[N,I]=qr(m,_e(Dm,n)),[O,R]=qr(m),[z,k]=qr(m),[M]=qr(h),D=(H,U)=>{if(fa(n,{[ms]:""}),U){const{cn:j,Qt:q}=l,{ln:V,M:W}=H,X=zm(e),J=wh(e),Y=ps(n,"boxSizing")==="content-box",Q=j||Y?q.b+q.t:0,G=!(w.x&&Y);fa(n,{[ms]:J.h+X.h+(V.x&&G?W.x:0)-Q})}},$=(H,U)=>{const j=!v&&!H?d:0,q=(K,ee,se)=>{const he=ps(n,K),De=(U?U[K]:he)==="scroll";return[he,De,De&&!v?ee?j:se:0,ee&&!!j]},[V,W,X,J]=q(qu,w.x,b.x),[Y,Q,G,Z]=q(Gu,w.y,b.y);return{Jt:{x:V,y:Y},ln:{x:W,y:Q},M:{x:X,y:G},R:{x:J,y:Z}}},A=(H,U,j,q)=>{const V=(Q,G)=>{const Z=g(Q),K=G&&Z&&Q.replace(`${u}-`,"")||"";return[G&&!Z?Q:"",g(K)?"hidden":K]},[W,X]=V(j.x,U.x),[J,Y]=V(j.y,U.y);return q[qu]=X&&J?X:W,q[Gu]=Y&&W?Y:J,$(H,q)},L=(H,U,j,q)=>{const{M:V,R:W}=H,{x:X,y:J}=W,{x:Y,y:Q}=V,{k:G}=l,Z=U?Am:Mm,K=U?V_:H_,ee=G[Z],se=G[wd],he=G[K],re=G[Om];q[hs]=`calc(100% + ${Q+ee*-1}px)`,q[Z]=-Q+ee,q[wd]=-Y+se,j&&(q[K]=he+(J?Q:0),q[Om]=re+(X?Y:0))},[P,F]=_?_.D(S,y,n,o,l,$,L):[()=>S,()=>[rr]];return({$t:H,Ft:U,en:j,Ot:q},{rn:V})=>{const{ct:W,yt:X,wt:J,gt:Y,bt:Q,St:G}=U||{},{rt:Z,lt:K}=j,[ee,se]=H("showNativeOverlaidScrollbars"),[he,re]=H("overflow"),De=ee&&w.x&&w.y,$e=!r&&!y&&(W||J||X||se||Y),ze=W||V||J||Q||G||se,Xe=g(he.x),Ne=g(he.y),je=Xe||Ne;let it=E(q),xe=I(q),wt=R(q),$t=k(q),Rt;if(se&&v&&i(sL,t$,!De),$e&&(Rt=$(De),D(Rt,Z)),ze){je&&i(wc,bc,!1);const[Oe,yt]=F(De,K,Rt),[We,Ke]=it=T(q),[kt,_n]=xe=N(q),_t=wh(n);let Kn=kt,go=_t;Oe(),(_n||Ke||se)&&yt&&!De&&P(yt,kt,We,K)&&(go=wh(n),Kn=Dm(n));const Pn=qB(a),ci={w:c(yc(kt.w,Kn.w)+We.w),h:c(yc(kt.h,Kn.h)+We.h)},zi={w:c((x?Pn.w:go.w+c(_t.w-kt.w))+We.w),h:c((x?Pn.h:go.h+c(_t.h-kt.h))+We.h)};$t=z(zi),wt=O(f(ci,zi),q)}const[st,Ve]=$t,[Kt,Mn]=wt,[Dn,Yt]=xe,[Zn,Fo]=it,Xt={x:Kt.w>0,y:Kt.h>0},zn=Xe&&Ne&&(Xt.x||Xt.y)||Xe&&Xt.x&&!Xt.y||Ne&&Xt.y&&!Xt.x;if(V||Q||G||Fo||Yt||Ve||Mn||re||se||$e||ze){const Oe={[Mm]:0,[wd]:0,[Am]:0,[hs]:"",[qu]:"",[Gu]:""},yt=A(De,Xt,he,Oe),We=P(yt,Dn,Zn,K);r||L(yt,K,We,Oe),$e&&D(yt,Z),r?(oo(e,rL,Oe[qu]),oo(e,iL,Oe[Gu])):fa(n,Oe)}tl(e,Gr,bc,zn),tl(t,ob,n$,zn),r||tl(n,qs,wc,je);const[Ot,fe]=M($(De).Jt);return ot(l,{Jt:Ot,It:{x:st.w,y:st.h},zt:{x:Kt.w,y:Kt.h},Zt:Xt}),{Kt:fe,Xt:Ve,Yt:Mn}}},B$=e=>{const[t,n,o]=M$(e),r={Qt:{t:0,r:0,b:0,l:0},cn:!1,k:{[Mm]:0,[wd]:0,[Am]:0,[G5]:0,[H_]:0,[Om]:0,[V_]:0},It:{x:0,y:0},zt:{x:0,y:0},Jt:{x:Bc,y:Bc},Zt:{x:!1,y:!1}},{At:i,ut:s,ht:a,dt:l}=t,{I:c,A:u,B:d}=Po(),m=!c&&(u.x||u.y),h=[D$(t),z$(t,r),P$(t,r)];return[n,f=>{const g={},y=(m||!d)&&$c(s);return a("",Pm,!0),et(h,v=>{ot(g,v(f,g)||{})}),a("",Pm),wa(s,y),!l&&wa(i,0),g},r,t,o]},$$=(e,t,n,o)=>{const[r,i,s,a,l]=B$(e),[c,u,d]=I$(a,y=>{b({},y)}),[m,h,,f]=A$(e,t,d,s,a,o),g=y=>fs(y).some(v=>!!y[v]),b=(y,v)=>{const{an:w,Ot:_,xt:S,un:x}=y,T=w||{},E=!!_,N={$t:QB(t,T,E),an:T,Ot:E};if(x)return h(N),!1;const I=v||u(ot({},N,{xt:S})),O=i(ot({},N,{en:d,Ft:I}));h(ot({},N,{Ft:I,Wt:O}));const R=g(I),z=g(O),k=R||z||!D_(T)||E;return k&&n(y,{Ft:I,Wt:O}),k};return[()=>{const{At:y,ut:v,Gt:w,Dt:_}=a,S=_?w.documentElement:y,x=$c(S),T=[c(),r(),m()];return wa(v,x),_e(Dr,T)},b,()=>({fn:d,_n:s}),{dn:a,vn:f},l]},Ti=(e,t,n)=>{const{q:o}=Po(),r=bd(e),i=r?e:e.target,s=pL(i);if(t&&!s){let a=!1;const l=[],c={},u=I=>{const O=H5(I,!0),R=ou(g$);return R?R(O,!0):O},d=ot({},o(),u(t)),[m,h,f]=nb(),[g,b,y]=nb(n),v=(I,O)=>{y(I,O),f(I,O)},[w,_,S,x,T]=$$(e,d,({an:I,Ot:O},{Ft:R,Wt:z})=>{const{ct:k,bt:M,gt:D,wt:$,yt:A,st:L}=R,{Xt:P,Yt:F,Kt:H}=z;v("updated",[N,{updateHints:{sizeChanged:!!k,directionChanged:!!M,heightIntrinsicChanged:!!D,overflowEdgeChanged:!!P,overflowAmountChanged:!!F,overflowStyleChanged:!!H,contentMutation:!!$,hostMutation:!!A,appear:!!L},changedOptions:I||{},force:!!O}])},I=>v("scroll",[N,I])),E=I=>{C$(i),Dr(l),a=!0,v("destroyed",[N,I]),h(),b()},N={options(I,O){if(I){const R=O?o():{},z=eL(d,ot(R,u(I)));D_(z)||(ot(d,z),_({an:z}))}return ot({},d)},on:g,off:(I,O)=>{I&&O&&b(I,O)},state(){const{fn:I,_n:O}=S(),{lt:R}=I,{It:z,zt:k,Jt:M,Zt:D,Qt:$,cn:A}=O;return ot({},{overflowEdge:z,overflowAmount:k,overflowStyle:M,hasOverflow:D,padding:$,paddingAbsolute:A,directionRTL:R,destroyed:a})},elements(){const{At:I,it:O,Qt:R,ut:z,ft:k,Tt:M,qt:D}=x.dn,{Vt:$,Nt:A}=x.vn,L=F=>{const{Ht:H,Ct:U,kt:j}=F;return{scrollbar:j,track:U,handle:H}},P=F=>{const{Ut:H,Bt:U}=F,j=L(H[0]);return ot({},j,{clone:()=>{const q=L(U());return _({un:!0}),q}})};return ot({},{target:I,host:O,padding:R||z,viewport:z,content:k||z,scrollOffsetElement:M,scrollEventElement:D,scrollbarHorizontal:P($),scrollbarVertical:P(A)})},update:I=>_({Ot:I,xt:!0}),destroy:_e(E,!1),plugin:I=>c[fs(I)[0]]};return dt(l,[T]),E$(i,N),uL(lL,Ti,[N,m,c]),T$(x.dn.Dt,!r&&e.cancel)?(E(!0),N):(dt(l,w()),v("initialized",[N]),N.update(!0),N)}return s};Ti.plugin=e=>{const t=Ri(e),n=t?e:[e],o=n.map(r=>uL(r,Ti)[0]);return m$(n),t?o:o[0]};Ti.valid=e=>{const t=e&&e.elements,n=ri(t)&&t();return Lm(n)&&!!pL(n.target)};Ti.env=()=>{const{L:e,A:t,I:n,U:o,B:r,T:i,V:s,W:a,X:l,N:c,G:u,q:d,F:m}=Po();return ot({},{scrollbarsSize:e,scrollbarsOverlaid:t,scrollbarsHiding:n,rtlScrollBehavior:o,flexboxGlue:r,cssCustomProperties:i,scrollTimeline:s,staticDefaultInitialization:a,staticDefaultOptions:l,getDefaultInitialization:c,setDefaultInitialization:u,getDefaultOptions:d,setDefaultOptions:m})};const F$=()=>{if(typeof window>"u"){const c=()=>{};return[c,c]}let e,t;const n=window,o=typeof n.requestIdleCallback=="function",r=n.requestAnimationFrame,i=n.cancelAnimationFrame,s=o?n.requestIdleCallback:r,a=o?n.cancelIdleCallback:i,l=()=>{a(e),i(t)};return[(c,u)=>{l(),e=s(o?()=>{l(),t=r(c)}:c,typeof u=="object"?u:{timeout:2233})},l]},gL=e=>{const{options:t,events:n,defer:o}=e||{},[r,i]=p.useMemo(F$,[]),s=p.useRef(null),a=p.useRef(o),l=p.useRef(t),c=p.useRef(n);return p.useEffect(()=>{a.current=o},[o]),p.useEffect(()=>{const{current:u}=s;l.current=t,Ti.valid(u)&&u.options(t||{},!0)},[t]),p.useEffect(()=>{const{current:u}=s;c.current=n,Ti.valid(u)&&u.on(n||{},!0)},[n]),p.useEffect(()=>()=>{var u;i(),(u=s.current)==null||u.destroy()},[]),p.useMemo(()=>[u=>{const d=s.current;if(Ti.valid(d))return;const m=a.current,h=l.current||{},f=c.current||{},g=()=>s.current=Ti(u,h,f);m?r(g,m):g()},()=>s.current],[])},H$=(e,t)=>{const{element:n="div",options:o,events:r,defer:i,children:s,...a}=e,l=n,c=p.useRef(null),u=p.useRef(null),[d,m]=gL({options:o,events:r,defer:i});return p.useEffect(()=>{const{current:h}=c,{current:f}=u;return h&&f&&d({target:h,elements:{viewport:f,content:f}}),()=>{var g;return(g=m())==null?void 0:g.destroy()}},[d,n]),p.useImperativeHandle(t,()=>({osInstance:m,getElement:()=>c.current}),[]),B.createElement(l,{"data-overlayscrollbars-initialize":"",ref:c,...a},B.createElement("div",{"data-overlayscrollbars-contents":"",ref:u},s))};p.forwardRef(H$);Ti.plugin(v$);const ru=({children:e,className:t,container:n,scrollX:o,scrollY:r})=>{const i=p.useRef(null),[s,a]=gL({options:{overflow:{x:o==null||o?"scroll":"hidden",y:r==null||r?"scroll":"hidden"},scrollbars:{clickScroll:!0}},defer:!1});return p.useEffect(()=>(i.current!=null&&(n==null?s(i.current):s({target:i.current,elements:{viewport:n}})),()=>a()?.destroy()),[n,s,a]),C.jsx("div",{ref:i,children:e,className:an(Wa.scrollable,t),"data-overlayscrollbars":""})},iu=p.forwardRef((e,t)=>{const{show:n,blurAmount:o=e.blurAmount??10,brightness:r=e.brightness??.55,saturation:i=e.saturation??1.8,transition:s,...a}=e,l=iz(t),c=Sn(dn.BlurUnderlay),u=W$(e.transition),d=an(Wa.underlayBlur,c?Wa.underlayBlurEnabled:Wa.underlayBlurDisabled,e.show&&Wa.underlayBlurShow,e.className);return p.useEffect(()=>{l.current&&(l.current.style.setProperty("--blur-amount",`${o}px`),l.current.style.setProperty("--blur-saturate",`${i}`),l.current.style.setProperty("--blur-brightness",`${r}`),l.current.style.setProperty("--blur-transition",u),l.current.style.setProperty("--blur-border-radius",getComputedStyle(l.current).borderRadius),l.current.style.setProperty("--blur-disabled-opacity",V$(o,r)))},[l,e.className,u,o,i,r]),C.jsx("div",{...a,ref:l,className:d})});function V$(e,t){return`${t+e/25}`}function U$(e){al.getStatus()===al.BootStatus.Booted?ie.registerExternal(e):Sf.subscribe(()=>ie.registerExternal(e))}function j$(e){al.getStatus()===al.BootStatus.Booted?ie.registerExternal(e()):Sf.subscribe(()=>ie.registerExternal(e()))}function yL(e,t,n){const[o,r]=p.useState(i());return Ar(ie.onChanged,s=>{s===e&&r(i())},[e,t,n]),o;function i(){if(al.getStatus()!==al.BootStatus.Booted)return;const s=ie.getValueJson({settingsId:e,propertyId:t});if(s!==null)return n?.raw?s:JSON.parse(s)}}var Y_=(e=>(e.Fast="--fast-transition",e.Base="--base-transition",e.Slow="--slow-transition",e))(Y_||{});const _c=new Map;Sf.subscribe(()=>{const e=getComputedStyle(document.body);_c.set("--fast-transition",e.getPropertyValue("--fast-transition")),_c.set("--base-transition",e.getPropertyValue("--base-transition")),_c.set("--slow-transition",e.getPropertyValue("--slow-transition"))});function W$(e){if(!Sn(dn.SmoothTransitions)||!e)return"none";if(!_c.has(e))throw Error("Failed to get transition: invoked before backend is initialized.");return _c.get(e)}var dn=(e=>(e.SmoothTransitions="SmoothTransitions",e.BlurUnderlay="BlurUnderlay",e.UndoListLength="UndoListLength",e.SmoothScroll="SmoothScroll",e.FadeScriptLines="FadeScriptLines",e.GraphControlsPosition="GraphControlsPosition",e.GraphMapPosition="GraphMapPosition",e.GraphBreadcrumbsPosition="GraphBreadcrumbsPosition",e.GraphMinZoom="GraphMinZoom",e.GraphMaxZoom="GraphMaxZoom",e.GraphSelectionMode="GraphSelectionMode",e.GraphEdgeType="GraphEdgeType",e.GraphShowGrid="GraphShowGrid",e.GraphSnapToGrid="GraphSnapToGrid",e.GraphShowSynopsis="GraphShowSynopsis",e.GraphShowCondition="GraphShowCondition",e.GraphAnimateTransition="GraphAnimateTransition",e))(dn||{});const Jg="Appearance",q$=()=>({id:Jg,scope:kr.ConfigurationScope.User,properties:[{id:"SmoothTransitions",label:ro("SmoothTransitions"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to use smooth transitions throughout the editor UI. Disable to improve performance."},{id:"BlurUnderlay",label:ro("BlurUnderlay"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to blur background for some windows, such as modals, context menus, tooltips, dropdown lists, etc. Disable to improve performance."},{id:"UndoListLength",label:ro("UndoListLength"),defaultValueJson:JSON.stringify(10),valueType:ie.ValueType.Integer,containerType:ie.ContainerType.Single,summary:"Determines the maximum height of the undo history list before it starts scrolling."},...z3("Scenario Editor",[{id:"SmoothScroll",label:ro("SmoothScroll"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to use smooth scroll when showing lines in visual scenario editor."},{id:"FadeScriptLines",label:ro("FadeScriptLines"),defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to use fade-in animation when showing lines in visual scenario editor."}]),...z3("Story Graph",[{id:"GraphControlsPosition",label:"Controls Position",defaultValueJson:JSON.stringify("bottom-left"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["top-left","top-right","bottom-left","bottom-right","hide"],summary:"Position of the control panel on graph pane; selecting 'Hide' will remove the panel."},{id:"GraphMapPosition",label:"Minimap Position",defaultValueJson:JSON.stringify("bottom-right"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["top-left","top-right","bottom-left","bottom-right","hide"],summary:"Position of the minimap on graph pane; selecting 'Hide' will remove the map."},{id:"GraphBreadcrumbsPosition",label:"Breadcrumbs Position",defaultValueJson:JSON.stringify("top-center"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right","hide"],summary:"Position of the bar indicating currently expanded nodes hierarchy; select 'Hide' to remove the bar."},{id:"GraphMinZoom",label:"Minimum Zoom",defaultValueJson:JSON.stringify(.3),minValue:.01,maxValue:100,valueType:ie.ValueType.Decimal,containerType:ie.ContainerType.Single,summary:"How far story graph can be zoomed out."},{id:"GraphMaxZoom",label:"Maximum Zoom",defaultValueJson:JSON.stringify(2),minValue:.01,maxValue:100,valueType:ie.ValueType.Decimal,containerType:ie.ContainerType.Single,summary:"How close story graph can be zoomed in."},{id:"GraphSelectionMode",label:"Selection Mode",defaultValueJson:JSON.stringify("partial"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["full","partial"],summary:"Whether partially covering nodes and edges with selection box should select them."},{id:"GraphEdgeType",label:"Edge Type",defaultValueJson:JSON.stringify("bezier"),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single,options:["bezier","straight","step","smoothstep"],summary:"Controls the way node edges (connections) are drawn."},{id:"GraphShowGrid",label:"Show Grid",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to render grid under the node graph."},{id:"GraphSnapToGrid",label:"Snap To Grid",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to snap nodes to the story graph background grid."},{id:"GraphShowSynopsis",label:"Show Synopsis",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to show first script comment text inside script node; when disabled synopsis is still viewable as tooltip when hovering script node title."},{id:"GraphShowCondition",label:"Show Condition",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to show navigation condition (eg, @goto if:condition) under graph node out ports; when disabled condition is still viewable as tooltip when hovering the ports."},{id:"GraphAnimateTransition",label:"Animate Transition",defaultValueJson:JSON.stringify(!0),valueType:ie.ValueType.Boolean,containerType:ie.ContainerType.Single,summary:"Whether to perform zoom in and out animations when entering (expanding) and exiting (collapsing) graph group nodes."}]),...Bi("Font Family",[Ce("BaseFont","--base-font","Font names to use in regular text."),Ce("CodeFont","--code-font","Font names to use in code and scripts text."),Ce("FontLigatures","--font-ligatures","Font ligature variants.")]),...Bi("Font Size",[Ce("TinyFontSize","--tiny-font-size","Minimum font size."),Ce("SmallFontSize","--small-font-size","Smaller font size."),Ce("BaseFontSize","--base-font-size","Normal font size."),Ce("GiantFontSize","--giant-font-size","Maximum font size.")]),...Bi("Font Weight",[Ce("LightCodeWeight","--light-code-weight","Minimum code font weight."),Ce("RegularCodeWeight","--regular-code-weight","Normal code font weight."),Ce("LightBaseWeight","--light-base-weight","Minimum regular font weight."),Ce("RegularBaseWeight","--regular-base-weight","Normal regular font weight."),Ce("BoldBaseWeight","--bold-base-weight","Maximum regular font weight.")]),...Bi("Font Color",[Ce("DarkFontColor","--dark-font-color","Minimum font color."),Ce("DimFontColor","--dim-font-color","Low font color."),Ce("BaseFontColor","--base-font-color","Normal font color."),Ce("LightFontColor","--light-font-color","High font color."),Ce("BrightFontColor","--bright-font-color","Maximum font color."),Ce("ExpressionColor","--expression-color","Font color of script expressions.")]),...Bi("Accent",[Ce("DarkAccentColor","--dark-accent-color","Minimum accent color."),Ce("DimAccentColor","--dim-accent-color","Low accent color."),Ce("BaseAccentColor","--base-accent-color","Normal accent color."),Ce("LightAccentColor","--light-accent-color","High accent color."),Ce("BrightAccentColor","--bright-accent-color","Maximum accent color.")]),...Bi("Background",[Ce("DarkBackgroundColor","--dark-bg-color","Minimum background color."),Ce("DimBackgroundColor","--dim-bg-color","Low background color."),Ce("BaseBackgroundColor","--base-bg-color","Normal background color."),Ce("LightBackgroundColor","--light-bg-color","High background color."),Ce("BrightBackgroundColor","--bright-bg-color","Maximum background color.")]),...Bi("Shadow",[Ce("DarkShadowColor","--dark-shadow-color","Minimum shadow color."),Ce("DimShadowColor","--dim-shadow-color","Low shadow color."),Ce("BaseShadowColor","--base-shadow-color","Normal shadow color."),Ce("LightShadowColor","--light-shadow-color","High shadow color."),Ce("BrightShadowColor","--bright-shadow-color","Maximum Shadow color.")]),...Bi("Button",[Ce("DarkButtonColor","--dark-button-color","Minimum button color."),Ce("DimButtonColor","--dim-button-color","Low button color."),Ce("BaseButtonColor","--base-button-color","Normal button color."),Ce("LightButtonColor","--light-button-color","High button color."),Ce("BrightButtonColor","--bright-button-color","Maximum button color.")]),...Bi("Border Radius",[Ce("BaseBorderRadius","--base-border-radius","Default border radius."),Ce("MajorBorderRadius","--major-border-radius","Border radius for major elements, like windows.")]),Ce("GraphBackground","--graph-background",`Background of the story graph tab. ${M3}`,"Story Graph","Background"),Ce("VisualEditorBackground","--visual-editor-background",`Background of the visual scenario editor tab. ${M3}`,"Scenario Editor","Background")]}),vL=new Map,M3="Any value for [background](https://developer.mozilla.org/en-US/docs/Web/CSS/background) CSS property is supported; eg, you can assign an image url:\n```\ncenter / cover url(https://naninovel.com/miku.jpg)\n```\n";let jy;function Sn(e){return yL(Jg,e)}function D3(e){const t=ie.getValueJson({settingsId:Jg,propertyId:e});return t==null||t.length===0?void 0:JSON.parse(t)}function Bi(e,t){return t.map(n=>({...n,group:e}))}function z3(e,t){return t.map(n=>({...n,category:e}))}function Ce(e,t,n,o,r){return vL.set(t,e),{id:e,label:r??ro(e),summary:n,color:t.endsWith("-color"),category:o??"Appearance",defaultValueJson:JSON.stringify(G$().getPropertyValue(t).trim()),valueType:ie.ValueType.String,containerType:ie.ContainerType.Single}}function G$(){return jy||(jy=getComputedStyle(document.querySelector(":root")))}function P3(e,t){document.body.style.setProperty(e,t)}ie.onChanged.subscribe(e=>{if(e!==Jg)return;for(const[n,o]of vL)P3(n,D3(o));const t=D3("SmoothTransitions");for(const[n,o]of _c)P3(n,t?o:"none")});j$(q$);const X_=new Ye,B3=.3;let sb=0,ab,xd,bL;function ln(e,t){return e==null?{}:{"data-tooltip-anchor":!0,onMouseEnter:n=>J$(n,e,t),onMouseMove:Z$,onMouseLeave:n=>K$(n,t?.doc)}}function Y$(){return bL}function X$(e){bL=e,xd=e.anchor,X_.broadcast(!0)}function J_(){xd=void 0,X_.broadcast(!1)}async function J$(e,t,n){sb=Date.now();const o=xd=e.currentTarget;for(ab={x:e.clientX,y:e.clientY};xd===o&&Date.now()-sb{const e=lo(X_)??!1,t=Y$(),n=p.useRef(null);p.useEffect(()=>{if(!(!t||n.current==null))return _6(t.anchor,n.current,async()=>{const r=t.options?.doc?t.anchor:aF(t.cursor.x,t.cursor.y),i=await oz(r,n.current,{placement:"bottom-start",middleware:[tz(),nz()]});Object.assign(n.current.style,{left:`${i.x}px`,top:`${i.y}px`})})},[t,e]);const o=p.useCallback(r=>{(t?.anchor==null||r.relatedTarget!==t.anchor)&&J_()},[t?.anchor]);return C.jsx(iu,{ref:n,className:an(Su.tooltip,[t?.options?.doc,Su.tooltipDoc]),show:e,"data-tooltip-window":!0,transition:Y_.Fast,onMouseLeave:o,children:C.jsx(ru,{className:an(Su.content,[e,Su.visible]),"data-tooltip-window":!0,children:C.jsx("div",{className:Su.scrollableContent,"data-tooltip-window":!0,dangerouslySetInnerHTML:{__html:t?.html??""}})})})};function aF(e,t){return e+=10,{getBoundingClientRect:()=>({width:15,height:15,x:e,y:t,top:t,left:e,right:e,bottom:t})}}const Z_=e=>!!e&&e[0]==="o",lb=En.unstable_batchedUpdates||(e=>e()),Dl=(e,t,n=1e-4)=>Math.abs(e-t)e===!0||!!(e&&e[t]),Mo=(e,t)=>typeof e=="function"?e(t):e,_L="_szhsinMenu",lF=e=>e[_L],cF=(e,t)=>Object.defineProperty(t,_L,{value:e}),Hf=(e,t)=>(t&&Object.keys(t).forEach(n=>{const o=e[n],r=t[n];typeof r=="function"&&o?e[n]=(...i)=>{r(...i),o(...i)}:e[n]=r}),e),uF=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],o=isNaN(t[1])?n:t[1];return{top:n,right:o,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?o:t[3]}},Wy=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+o+n))return e}};function K_(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function $3(e,t){for(let n=0;np.useMemo(()=>{const r=t?`${e}__${t}`:e;let i=r;n&&Object.keys(n).forEach(a=>{const l=n[a];l&&(i+=` ${r}--${l===!0?a:`${a}-${l}`}`)});let s=typeof o=="function"?o(n):o;return typeof s=="string"&&(s=s.trim(),s&&(i+=` ${s}`)),i},[e,t,n,o]),dF="szh-menu-container",ol="szh-menu",fF="szh-menu-button",pF="arrow",xL="item",hF="divider",mF="submenu",SL=p.createContext(),Q_=p.createContext({}),cb=p.createContext({}),TL=p.createContext({}),gF=p.createContext({}),Zg=p.createContext({}),Gn=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Jt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),sf=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),xc=Object.freeze({FIRST:"first",LAST:"last"}),yF=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),qy="absolute",EL="presentation",e2="menuitem",F3={"aria-hidden":!0,role:e2},vF=cF("MenuButton",p.forwardRef(function({className:t,isOpen:n,disabled:o,children:r,...i},s){const a=p.useMemo(()=>({open:n}),[n]);return C.jsx("button",{"aria-haspopup":!0,"aria-expanded":n,"aria-disabled":o||void 0,type:"button",disabled:o,...i,ref:s,className:_a({block:fF,modifiers:a,className:t}),children:r})})),bF=({className:e,containerRef:t,containerProps:n,children:o,isOpen:r,theming:i,transition:s,onClose:a})=>{const l=rf(s,"item"),c=({key:d})=>{switch(d){case Gn.ESC:Mo(a,{key:d,reason:sf.CANCEL});break}},u=d=>{r&&!d.currentTarget.contains(d.relatedTarget)&&Mo(a,{reason:sf.BLUR})};return C.jsx("div",{...Hf({onKeyDown:c,onBlur:u},n),className:_a({block:dF,modifiers:p.useMemo(()=>({theme:i,itemTransition:l}),[i,l]),className:e}),style:{position:"absolute",...n?.style},ref:t,children:o})},wF=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,o,r)=>{t?e||(e=setTimeout(()=>{e=0,o()},n)):r?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},_F=(e,t)=>{const[n,o]=p.useState(),i=p.useRef({items:[],hoverIndex:-1,sorted:!1}).current,s=p.useCallback((l,c)=>{const{items:u}=i;if(!l)i.items=[];else if(c)u.push(l);else{const d=u.indexOf(l);d>-1&&(u.splice(d,1),l.contains(document.activeElement)&&(t.current.focus(),o()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),a=p.useCallback((l,c,u)=>{const{items:d,hoverIndex:m}=i,h=()=>{if(i.sorted)return;const b=e.current.querySelectorAll(".szh-menu__item");d.sort((y,v)=>$3(b,y)-$3(b,v)),i.sorted=!0};let f=-1,g;switch(l){case Jt.RESET:break;case Jt.SET:g=c;break;case Jt.UNSET:g=b=>b===c?void 0:b;break;case Jt.FIRST:h(),f=0,g=d[f];break;case Jt.LAST:h(),f=d.length-1,g=d[f];break;case Jt.SET_INDEX:h(),f=u,g=d[f];break;case Jt.INCREASE:h(),f=m,f<0&&(f=d.indexOf(c)),f++,f>=d.length&&(f=0),g=d[f];break;case Jt.DECREASE:h(),f=m,f<0&&(f=d.indexOf(c)),f--,f<0&&(f=d.length-1),g=d[f];break}g||(f=-1),o(g),i.hoverIndex=f},[e,i]);return{hoverItem:n,dispatch:a,updateItems:s}},xF=(e,t,n,o)=>{const r=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),a=uF(o),l=f=>f+i.left-s.left-a.left,c=f=>f+i.left+r.width-s.right+a.right,u=f=>f+i.top-s.top-a.top,d=f=>f+i.top+r.height-s.bottom+a.bottom;return{menuRect:r,containerRect:i,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:d,confineHorizontally:f=>{let g=l(f);if(g<0)f-=g;else{const b=c(f);b>0&&(f-=b,g=l(f),g<0&&(f-=g))}return f},confineVertically:f=>{let g=u(f);if(g<0)f-=g;else{const b=d(f);b>0&&(f-=b,g=u(f),g<0&&(f-=g))}return f}}},SF=({arrowRef:e,menuY:t,anchorRect:n,containerRect:o,menuRect:r})=>{let i=n.top-o.top-t+n.height/2;const s=e.current.offsetHeight*1.25;return i=Math.max(s,i),i=Math.min(i,r.height-s),i},TF=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:o,placeLeftX:r,placeRightX:i,getLeftOverflow:s,getRightOverflow:a,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:d,direction:m,position:h})=>{let f=m,g=o;h!=="initial"&&(g=c(g),h==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let b,y,v;return f==="left"?(b=r,h!=="initial"&&(y=s(b),y<0&&(v=a(i),(v<=0||-y>v)&&(b=i,f="right")))):(b=i,h!=="initial"&&(v=a(b),v>0&&(y=s(r),(y>=0||-y{let i=n.left-o.left-t+n.width/2;const s=e.current.offsetWidth*1.25;return i=Math.max(s,i),i=Math.min(i,r.width-s),i},CF=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:o,placeTopY:r,placeBottomY:i,getTopOverflow:s,getBottomOverflow:a,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:d,direction:m,position:h})=>{let f=m==="top"?"top":"bottom",g=o;h!=="initial"&&(g=l(g),h==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let b,y,v;return f==="top"?(b=r,h!=="initial"&&(y=s(b),y<0&&(v=a(i),(v<=0||-y>v)&&(b=i,f="bottom")))):(b=i,h!=="initial"&&(v=a(b),v>0&&(y=s(r),(y>=0||-y{const{menuRect:c,containerRect:u}=l,d=n==="left"||n==="right";let m=d?o:r,h=d?r:o;if(e){const S=a.current;d?m+=S.offsetWidth:h+=S.offsetHeight}const f=s.left-u.left-c.width-m,g=s.right-u.left+m,b=s.top-u.top-c.height-h,y=s.bottom-u.top+h;let v,w;t==="end"?(v=s.right-u.left-c.width,w=s.bottom-u.top-c.height):t==="center"?(v=s.left-u.left-(c.width-s.width)/2,w=s.top-u.top-(c.height-s.height)/2):(v=s.left-u.left,w=s.top-u.top),v+=m,w+=h;const _={...l,anchorRect:s,placeLeftX:f,placeRightX:g,placeLeftorRightY:w,placeTopY:b,placeBottomY:y,placeToporBottomX:v,arrowRef:a,arrow:e,direction:n,position:i};switch(n){case"left":case"right":return TF(_);case"top":case"bottom":default:return CF(_)}},_h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?p.useLayoutEffect:p.useEffect;function H3(e,t){typeof e=="function"?e(t):e.current=t}const Kg=(e,t)=>p.useMemo(()=>e?t?n=>{H3(e,n),H3(t,n)}:e:t,[e,t]),V3=-9999,CL=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:o,arrowProps:r={},anchorPoint:i,anchorRef:s,containerRef:a,containerProps:l,focusProps:c,externalRef:u,parentScrollingRef:d,align:m="start",direction:h="bottom",position:f="auto",overflow:g="visible",setDownOverflow:b,repositionFlag:y,captureFocus:v=!0,state:w,endTransition:_,isDisabled:S,menuItemFocus:x,gap:T=0,shift:E=0,children:N,onClose:I,...O})=>{const[R,z]=p.useState({x:V3,y:V3}),[k,M]=p.useState({}),[D,$]=p.useState(),[A,L]=p.useState(h),[P]=p.useState(wF),[F,H]=p.useReducer(fe=>fe+1,1),{transition:U,boundingBoxRef:j,boundingBoxPadding:q,rootMenuRef:V,rootAnchorRef:W,scrollNodesRef:X,reposition:J,viewScroll:Y,submenuCloseDelay:Q}=p.useContext(Zg),{submenuCtx:G,reposSubmenu:Z=y}=p.useContext(cb),K=p.useRef(null),ee=p.useRef(),se=p.useRef(),he=p.useRef(!1),re=p.useRef({width:0,height:0}),De=p.useRef(()=>{}),{hoverItem:$e,dispatch:ze,updateItems:Xe}=_F(K,ee),Ne=Z_(w),je=rf(U,"open"),it=rf(U,"close"),xe=X.current,wt=fe=>{switch(fe.key){case Gn.HOME:ze(Jt.FIRST);break;case Gn.END:ze(Jt.LAST);break;case Gn.UP:ze(Jt.DECREASE,$e);break;case Gn.DOWN:ze(Jt.INCREASE,$e);break;case Gn.SPACE:fe.target&&fe.target.className.indexOf(ol)!==-1&&fe.preventDefault();return;default:return}fe.preventDefault(),fe.stopPropagation()},$t=()=>{w==="closing"&&$(),Mo(_)},Rt=fe=>{fe.stopPropagation(),P.on(Q,()=>{ze(Jt.RESET),ee.current.focus()})},st=fe=>{fe.target===fe.currentTarget&&P.off()},Ve=p.useCallback(fe=>{var Oe;const yt=s?(Oe=s.current)==null?void 0:Oe.getBoundingClientRect():i?{left:i.x,right:i.x,top:i.y,bottom:i.y,width:0,height:0}:null;if(!yt)return;xe.menu||(xe.menu=(j?j.current:Wy(V.current))||window);const We=xF(a,K,xe.menu,q);let{arrowX:Ke,arrowY:kt,x:_n,y:_t,computedDirection:Kn}=kF({arrow:o,align:m,direction:h,gap:T,shift:E,position:f,anchorRect:yt,arrowRef:se,positionHelpers:We});const{menuRect:go}=We;let Pn=go.height;if(!fe&&g!=="visible"){const{getTopOverflow:ci,getBottomOverflow:zi}=We;let yo,mr;const Is=re.current.height,Rl=zi(_t);if(Rl>0||Dl(Rl,0)&&Dl(Pn,Is))yo=Pn-Rl,mr=Rl;else{const Na=ci(_t);(Na<0||Dl(Na,0)&&Dl(Pn,Is))&&(yo=Pn+Na,mr=0-Na,yo>=0&&(_t-=Na))}yo>=0?(Pn=yo,$({height:yo,overflowAmt:mr})):$()}o&&M({x:Ke,y:kt}),z({x:_n,y:_t}),L(Kn),re.current={width:go.width,height:Pn}},[o,m,q,h,T,E,f,g,i,s,a,j,V,xe]);_h(()=>{Ne&&(Ve(),he.current&&H()),he.current=Ne,De.current=Ve},[Ne,Ve,Z]),_h(()=>{D&&!b&&(K.current.scrollTop=0)},[D,b]),_h(()=>Xe,[Xe]),p.useEffect(()=>{let{menu:fe}=xe;if(!Ne||!fe)return;if(fe=fe.addEventListener?fe:window,!xe.anchors){xe.anchors=[];let Ke=Wy(W&&W.current);for(;Ke&&Ke!==fe;)xe.anchors.push(Ke),Ke=Wy(Ke)}let Oe=Y;if(xe.anchors.length&&Oe==="initial"&&(Oe="auto"),Oe==="initial")return;const yt=()=>{Oe==="auto"?lb(()=>Ve(!0)):Mo(I,{reason:sf.SCROLL})},We=xe.anchors.concat(Y!=="initial"?fe:[]);return We.forEach(Ke=>Ke.addEventListener("scroll",yt)),()=>We.forEach(Ke=>Ke.removeEventListener("scroll",yt))},[W,xe,Ne,I,Y,Ve]);const Kt=!!D&&D.overflowAmt>0;p.useEffect(()=>{if(Kt||!Ne||!d)return;const fe=()=>lb(Ve),Oe=d.current;return Oe.addEventListener("scroll",fe),()=>Oe.removeEventListener("scroll",fe)},[Ne,Kt,d,Ve]),p.useEffect(()=>{if(typeof ResizeObserver!="function"||J==="initial")return;const fe=new ResizeObserver(([yt])=>{const{borderBoxSize:We,target:Ke}=yt;let kt,_n;if(We){const{inlineSize:_t,blockSize:Kn}=We[0]||We;kt=_t,_n=Kn}else{const _t=Ke.getBoundingClientRect();kt=_t.width,_n=_t.height}kt===0||_n===0||Dl(kt,re.current.width,1)&&Dl(_n,re.current.height,1)||En.flushSync(()=>{De.current(),H()})}),Oe=K.current;return fe.observe(Oe,{box:"border-box"}),()=>fe.unobserve(Oe)},[J]),p.useEffect(()=>{if(!Ne){ze(Jt.RESET),it||$();return}const{position:fe,alwaysUpdate:Oe}=x||{},yt=()=>{fe===xc.FIRST?ze(Jt.FIRST):fe===xc.LAST?ze(Jt.LAST):fe>=-1&&ze(Jt.SET_INDEX,void 0,fe)};if(Oe)yt();else if(v){const We=setTimeout(()=>{const Ke=K.current;Ke&&!Ke.contains(document.activeElement)&&(ee.current.focus(),yt())},je?170:100);return()=>clearTimeout(We)}},[Ne,je,it,v,x,ze]);const Mn=p.useMemo(()=>({isParentOpen:Ne,submenuCtx:P,dispatch:ze,updateItems:Xe}),[Ne,P,ze,Xe]);let Dn,Yt;D&&(b?Yt=D.overflowAmt:Dn=D.height);const Zn=p.useMemo(()=>({reposSubmenu:F,submenuCtx:P,overflow:g,overflowAmt:Yt,parentMenuRef:K,parentDir:A}),[F,P,g,Yt,A]),Fo=Dn>=0?{maxHeight:Dn,overflow:g}:void 0,Xt=p.useMemo(()=>({state:w,dir:A}),[w,A]),zn=p.useMemo(()=>({dir:A}),[A]),hr=_a({block:ol,element:pF,modifiers:zn,className:r.className}),Ot=C.jsxs("ul",{role:"menu","aria-label":e,...K_(S),...Hf({onPointerEnter:G?.off,onPointerMove:Rt,onPointerLeave:st,onKeyDown:wt,onAnimationEnd:$t},O),ref:Kg(u,K),className:_a({block:ol,modifiers:Xt,className:t}),style:{...n,...Fo,margin:0,display:w==="closed"?"none":void 0,position:qy,left:R.x,top:R.y},children:[C.jsx("li",{tabIndex:-1,style:{position:qy,left:0,top:0,display:"block",outline:"none"},ref:ee,...F3,...c}),o&&C.jsx("li",{...F3,...r,className:hr,style:{display:"block",position:qy,left:k.x,top:k.y,...r.style},ref:se}),C.jsx(cb.Provider,{value:Zn,children:C.jsx(Q_.Provider,{value:Mn,children:C.jsx(SL.Provider,{value:$e,children:Mo(N,Xt)})})})]});return l?C.jsx(bF,{...l,isOpen:Ne,children:Ot}):Ot},kL=p.forwardRef(function({"aria-label":t,className:n,containerProps:o,initialMounted:r,unmountOnClose:i,transition:s,transitionTimeout:a,boundingBoxRef:l,boundingBoxPadding:c,reposition:u="auto",submenuOpenDelay:d=300,submenuCloseDelay:m=150,viewScroll:h="initial",portal:f,theming:g,onItemClick:b,...y},v){const w=p.useRef(null),_=p.useRef({}),{anchorRef:S,state:x,onClose:T}=y,E=p.useMemo(()=>({initialMounted:r,unmountOnClose:i,transition:s,transitionTimeout:a,boundingBoxRef:l,boundingBoxPadding:c,rootMenuRef:w,rootAnchorRef:S,scrollNodesRef:_,reposition:u,viewScroll:h,submenuOpenDelay:d,submenuCloseDelay:m}),[r,i,s,a,S,l,c,u,h,d,m]),N=p.useMemo(()=>({handleClick(O,R){O.stopPropagation||Mo(b,O);let z=O.keepOpen;z===void 0&&(z=R&&O.key===Gn.SPACE),z||Mo(T,{value:O.value,key:O.key,reason:sf.CLICK})},handleClose(O){Mo(T,{key:O,reason:sf.CLICK})}}),[b,T]);if(!x)return null;const I=C.jsx(Zg.Provider,{value:E,children:C.jsx(TL.Provider,{value:N,children:C.jsx(CL,{...y,ariaLabel:t||"Menu",externalRef:v,containerRef:w,containerProps:{className:n,containerRef:w,containerProps:o,theming:g,transition:s,onClose:T}})})});return f===!0&&typeof document<"u"?En.createPortal(I,document.body):f?f.target?En.createPortal(I,f.target):f.stablePosition?null:I:I}),ub=0,db=1,Bm=2,$m=3,Fm=4,LF=5,LL=6,IF=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],IL=e=>({_s:e,status:IF[e],isEnter:e<$m,isMounted:e!==LL,isResolved:e===Bm||e>Fm}),fb=e=>e?LL:LF,NF=(e,t)=>{switch(e){case db:case ub:return Bm;case Fm:case $m:return fb(t)}},RF=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],OF=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),U3=(e,t,n,o,r)=>{clearTimeout(o.current);const i=IL(e);t(i),n.current=i,r&&r({current:i})},AF=({enter:e=!0,exit:t=!0,preEnter:n,preExit:o,timeout:r,initialEntered:i,mountOnEnter:s,unmountOnExit:a,onStateChange:l}={})=>{const[c,u]=p.useState(()=>IL(i?Bm:fb(s))),d=p.useRef(c),m=p.useRef(),[h,f]=RF(r),g=p.useCallback(()=>{const y=NF(d.current._s,a);y&&U3(y,u,d,m,l)},[l,a]),b=p.useCallback(y=>{const v=_=>{switch(U3(_,u,d,m,l),_){case db:h>=0&&(m.current=setTimeout(g,h));break;case Fm:f>=0&&(m.current=setTimeout(g,f));break;case ub:case $m:m.current=OF(v,_);break}},w=d.current.isEnter;typeof y!="boolean"&&(y=!w),y?!w&&v(e?n?ub:db:Bm):w&&v(t?o?$m:Fm:fb(a))},[g,l,e,t,n,o,h,f,a]);return p.useEffect(()=>()=>clearTimeout(m.current),[]),[c,b,g]},NL=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:o,transitionTimeout:r=500}={})=>{const[{status:i},s,a]=AF({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:r,enter:rf(o,"open"),exit:rf(o,"close")});return[{state:yF[i],endTransition:a},s]},RL=e=>{const[t,n]=NL(e),[o,r]=p.useState(),i=(s,a)=>{r({position:s,alwaysUpdate:a}),n(!0)};return[{menuItemFocus:o,...t},n,i]},MF=(e,t)=>{const[n]=p.useState({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:o=>n.v?n.v=!1:t(!0,o)}},OL=(e,t)=>{const n=p.useRef(t);p.useEffect(()=>{n.current!==t&&Mo(e,{open:t}),n.current=t},[e,t])},DF=p.forwardRef(function({"aria-label":t,captureFocus:n,initialOpen:o,menuButton:r,instanceRef:i,onMenuChange:s,...a},l){const[c,u,d]=RL(a),{state:m}=c,h=Z_(m),f=p.useRef(null),g=MF(m,(S,x)=>d(x.detail?void 0:xc.FIRST)),b=p.useCallback(S=>{u(!1),S.key&&f.current.focus()},[u]),y=S=>{switch(S.key){case Gn.UP:d(xc.LAST);break;case Gn.DOWN:d(xc.FIRST);break;default:return}S.preventDefault()},v=Mo(r,{open:h});if(!v||!v.type)throw new Error("Menu requires a menuButton prop.");const w={ref:Kg(v.ref,f),...Hf({onKeyDown:y,...g},v.props)};lF(v.type)==="MenuButton"&&(w.isOpen=h);const _=p.cloneElement(v,w);return OL(s,h),p.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>u(!1)})),C.jsxs(p.Fragment,{children:[_,C.jsx(kL,{...a,...c,"aria-label":t||(typeof v.props.children=="string"?v.props.children:"Menu"),anchorRef:f,ref:l,onClose:b})]})}),AL=(e,t)=>{const n=p.memo(t),o=p.forwardRef((r,i)=>{const s=p.useRef(null);return C.jsx(n,{...r,itemRef:s,externalRef:i,isHovering:p.useContext(SL)===s.current})});return o.displayName=`WithHovering(${e})`,o},ML=(e,t,n)=>{_h(()=>{if(e)return;const o=t.current;return n(o,!0),()=>{n(o)}},[e,t,n])},zF=AL("SubMenu",function({"aria-label":t,className:n,disabled:o,direction:r,label:i,openTrigger:s,onMenuChange:a,isHovering:l,instanceRef:c,itemRef:u,captureFocus:d,repositionFlag:m,itemProps:h={},...f}){const g=p.useContext(Zg),{rootMenuRef:b,submenuOpenDelay:y,submenuCloseDelay:v}=g,{parentMenuRef:w,parentDir:_,overflow:S}=p.useContext(cb),{isParentOpen:x,submenuCtx:T,dispatch:E,updateItems:N}=p.useContext(Q_),I=S!=="visible",[O,R,z]=RL(g),{state:k}=O,M=!!o,D=Z_(k),$=p.useRef(null),[A]=p.useState({v:0}),L=()=>{T.off(),A.v&&(clearTimeout(A.v),A.v=0)},P=(...Z)=>{L(),F(),!M&&z(...Z)},F=()=>!l&&!M&&E(Jt.SET,u.current),H=Z=>{F(),s||(A.v=setTimeout(()=>lb(P),Math.max(Z,0)))},U=Z=>{M||(Z.stopPropagation(),!(A.v||D)&&T.on(v,()=>H(y-v),()=>H(y)))},j=()=>{L(),D||E(Jt.UNSET,u.current)},q=Z=>{if(l)switch(Z.key){case Gn.ENTER:Z.preventDefault();case Gn.SPACE:case Gn.RIGHT:s!=="none"&&P(xc.FIRST)}},V=Z=>{let K=!1;switch(Z.key){case Gn.LEFT:D&&(u.current.focus(),R(!1),K=!0);break;case Gn.RIGHT:D||(K=!0);break}K&&(Z.preventDefault(),Z.stopPropagation())};ML(M,u,N),OL(a,D),p.useEffect(()=>T.toggle(D),[T,D]),p.useEffect(()=>()=>clearTimeout(A.v),[A]),p.useEffect(()=>{l&&x?u.current.focus():R(!1)},[l,x,R,u]),p.useImperativeHandle(c,()=>({openMenu:(...Z)=>{x&&P(...Z)},closeMenu:()=>{D&&(u.current.focus(),R(!1))}}));const W=p.useMemo(()=>({open:D,hover:l,disabled:M,submenu:!0}),[D,l,M]),{ref:X,className:J,...Y}=h,Q=Hf({onPointerEnter:T.off,onPointerMove:U,onPointerLeave:j,onKeyDown:q,onClick:()=>s!=="none"&&P()},Y),G=()=>{const Z=C.jsx(CL,{...f,...O,ariaLabel:t||(typeof i=="string"?i:"Submenu"),anchorRef:u,containerRef:I?b:$,direction:r||(_==="right"||_==="left"?_:"right"),parentScrollingRef:I&&w,isDisabled:M}),K=b.current;return I&&K?En.createPortal(Z,K):Z};return C.jsxs("li",{className:_a({block:ol,element:mF,className:n}),style:{position:"relative"},role:EL,ref:$,onKeyDown:V,children:[C.jsx("div",{role:e2,"aria-haspopup":!0,"aria-expanded":D,...K_(M,l),...Q,ref:Kg(X,u),className:_a({block:ol,element:xL,modifiers:W,className:J}),children:p.useMemo(()=>Mo(i,W),[i,W])}),k&&G()]})}),PF=(e,t,n,o)=>{const{submenuCloseDelay:r}=p.useContext(Zg),{isParentOpen:i,submenuCtx:s,dispatch:a,updateItems:l}=p.useContext(Q_),c=()=>{!n&&!o&&a(Jt.SET,e.current)},u=()=>{!o&&a(Jt.UNSET,e.current)},d=f=>{n&&!f.currentTarget.contains(f.relatedTarget)&&u()},m=f=>{o||(f.stopPropagation(),s.on(r,c,c))},h=(f,g)=>{s.off(),!g&&u()};return ML(o,e,l),p.useEffect(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:c,onBlur:d,onPointerMove:m,onPointerLeave:h}},BF=AL("MenuItem",function({className:t,value:n,href:o,type:r,checked:i,disabled:s,children:a,onClick:l,isHovering:c,itemRef:u,externalRef:d,...m}){const h=!!s,{setHover:f,...g}=PF(u,u,c,h),b=p.useContext(TL),y=p.useContext(gF),v=r==="radio",w=r==="checkbox",_=!!o&&!h&&!v&&!w,S=v?y.value===n:w?!!i:!1,x=O=>{if(h){O.stopPropagation(),O.preventDefault();return}const R={value:n,syntheticEvent:O};O.key!==void 0&&(R.key=O.key),w&&(R.checked=!S),v&&(R.name=y.name),Mo(l,R),v&&Mo(y.onRadioChange,R),b.handleClick(R,w||v)},T=O=>{if(c)switch(O.key){case Gn.ENTER:O.preventDefault();case Gn.SPACE:_?u.current.click():x(O)}},E=p.useMemo(()=>({type:r,disabled:h,hover:c,checked:S,anchor:_}),[r,h,c,S,_]),N=Hf({...g,onPointerDown:f,onKeyDown:T,onClick:x},m),I={role:v?"menuitemradio":w?"menuitemcheckbox":e2,"aria-checked":v||w?S:void 0,...K_(h,c),...N,ref:Kg(d,u),className:_a({block:ol,element:xL,modifiers:E,className:t}),children:p.useMemo(()=>Mo(a,E),[a,E])};return _?C.jsx("li",{role:EL,children:C.jsx("a",{href:o,...I})}):C.jsx("li",{...I})}),$F=p.memo(p.forwardRef(function({className:t,...n},o){return C.jsx("li",{role:"separator",...n,ref:o,className:_a({block:ol,element:hF,className:t})})}));var su=(e=>(e[e.Start=0]="Start",e[e.End=1]="End",e))(su||{});const FF="_disabled-menu_1j4o5_3",HF="_disabled-button_1j4o5_7",VF="_menu-icon_1j4o5_11",UF="_menu-label_1j4o5_15",jF="_items-container_1j4o5_19",WF="_item-container_1j4o5_23",qF="_item-icon_1j4o5_28",GF="_item-label_1j4o5_35",YF="_item-hotkey_1j4o5_39",Yr={"disabled-menu":"_disabled-menu_1j4o5_3",disabledMenu:FF,"disabled-button":"_disabled-button_1j4o5_7",disabledButton:HF,"menu-icon":"_menu-icon_1j4o5_11",menuIcon:VF,"menu-label":"_menu-label_1j4o5_15",menuLabel:UF,"items-container":"_items-container_1j4o5_19",itemsContainer:jF,"item-container":"_item-container_1j4o5_23",itemContainer:WF,"item-icon":"_item-icon_1j4o5_28",itemIcon:qF,"item-label":"_item-label_1j4o5_35",itemLabel:GF,"item-hotkey":"_item-hotkey_1j4o5_39",itemHotkey:YF},xs=({align:e,buttonClass:t,children:n,disabled:o,disabledButtonClass:r,handleClose:i,handleOpen:s,icon:a,label:l,openButtonClass:c,tooltip:u})=>{const[d,m]=p.useState(!1),h=p.useRef(null),f=p.useRef(null),g=e===su.End?"end":"start",b=p.useCallback(_=>{o||(m(_.open),_.open?s?.():i?.())},[o,i,s]),y=p.useCallback(_=>{d||f.current?.blur(),_.preventDefault(),_.stopPropagation()},[d]),v=p.useCallback(()=>{const _=a==null?null:C.jsx("span",{className:Yr.menuIcon,children:a}),S=l==null?null:C.jsx("span",{className:Yr.menuLabel,children:l}),x=an(t,[d,c],[o,Yr.disabledButton],[o,r]);return C.jsxs(vF,{...ln(u),className:x,onClick:y,ref:f,children:[_,S]})},[t,o,r,y,a,l,d,c,u]),w=p.useCallback(()=>d&&n&&C.jsx(iu,{show:!0,className:Yr.itemsContainer,children:n}),[n,d]);return p.useLayoutEffect(()=>{h.current?.closeMenu(),m(!1)},[o]),C.jsx(DF,{instanceRef:h,children:w(),menuButton:v(),onMenuChange:b,className:o===!0?Yr.disabledMenu:void 0,align:g,gap:1})},DL=new Ye,zL=new Ye;function Vf(...e){const t=e.filter(n=>n!==!1&&n!=null);if(t.length!==0)return n=>{const o={x:n.clientX,y:n.clientY};DL.broadcast({items:t,point:o})}}function XF(){zL.broadcast()}addEventListener("contextmenu",e=>{!(e.ctrlKey||e.metaKey)&&!t()&&e.preventDefault();function t(){return n()&&e.target===document.activeElement}function n(){return document.activeElement?.attributes.getNamedItem("contenteditable")?.value?.toLowerCase()==="true"}});var pe=(e=>(e.CreateProject="Create Project",e.OpenProject="Open Project",e.OpenSettings="Open Settings",e.Submit="Submit",e.Cancel="Cancel",e.Delete="Delete",e.SaveAll="Save All",e.Duplicate="Duplicate",e.Undo="Undo",e.Redo="Redo",e.InsertLine="Insert Line",e.GotoLine="Goto Line",e.UnassignParameter="Unassign Parameter",e.MixParameter="Mix Parameter",e.InlineCommand="Inline Command",e.InsertExpression="Insert Expression",e.ExitBeforeExpression="Exit Before Expression",e.ExitAfterExpression="Exit After Expression",e.InsertTextId="Insert Text ID",e.ExitBeforeTextId="Exit Before Text ID",e.ExitAfterTextId="Exit After Text ID",e.CreateScript="Create Script",e.EditScript="Edit Script",e.CreateGroup="Create Group",e.EnterGroup="Enter Group",e.ExitGroup="Exit Group",e))(pe||{});const t2=[...Rp("General",[{id:"Create Project",keys:"Ctrl+N",summary:"Create a new project."},{id:"Open Project",keys:"Ctrl+O",summary:"Open an existing project."},{id:"Open Settings",keys:"Ctrl+Alt+S",summary:"Open or focus settings tab."}]),...Rp("Editing",[{id:"Submit",keys:"Enter",summary:"Confirm a dialogue or submit a form."},{id:"Cancel",keys:"Escape",summary:"Cancel a dialogue or discard a form."},{id:"Delete",keys:"Delete",summary:"Delete selected asset."},{id:"Save All",keys:"Ctrl+S",summary:"Save all modified assets."},{id:"Duplicate",keys:"Ctrl+D",summary:"Duplicate selected asset."},{id:"Undo",keys:"Ctrl+Z",summary:"Undo last action."},{id:"Redo",keys:"Ctrl+Y",summary:"Redo last action."}]),...Rp("Story Graph",[{id:"Create Script",keys:"Ctrl+Space",summary:"Create new scenario script asset."},{id:"Edit Script",keys:"Ctrl+E",summary:"Edit selected scenario script asset."},{id:"Create Group",keys:"Ctrl+G",summary:"Create new group to compose scenario scripts."},{id:"Enter Group",keys:"Enter",summary:"Enter selected scenario scripts group."},{id:"Exit Group",keys:"Escape",summary:"When inside a group, exit it."}]),...Rp("Visual Editor",[{id:"Insert Line",keys:"Ctrl+Space",summary:"Insert a new line in visual editor."},{id:"Goto Line",keys:"Ctrl+G",summary:"Attempt to play inspected line in Unity editor."},{id:"Unassign Parameter",keys:"Backspace",summary:"Remove inspected command parameter."},{id:"Mix Parameter",keys:"Ctrl+Shift+{",summary:"Convert value of the inspected command parameter to mixed, which allows inserting script expressions and text identifiers."},{id:"Inline Command",keys:"Ctrl+[",summary:"Insert inlined command to the inspected generic text."},{id:"Insert Expression",keys:"{",summary:"When editing mixed value (dynamic parameter value or generic text), inserts new expression at the cursor position. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit Before Expression",keys:"{",summary:"When editing script expression, moves the cursor outside the expression before it starts. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit After Expression",keys:"}",summary:"When editing script expression, moves the cursor outside the expressions after it ends. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Insert Text ID",keys:"|",summary:"When editing mixed value (dynamic parameter value or generic text), inserts new text identifier at the cursor position. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit Before Text ID",keys:"#",summary:"When editing text identifier, moves the cursor outside the identifier before it starts. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."},{id:"Exit After Text ID",keys:"|",summary:"When editing text identifier, moves the cursor outside the identifier after it ends. Be aware, that this is not a hotkey per se, but a character, that when typed will trigger the action."}])];function Rp(e,t){return t.map(n=>({...n,group:e}))}const JF="_modal_iqlml_1",ZF="_value-container_iqlml_5",KF="_value_iqlml_5",QF="_readonly-value_iqlml_29",eH="_unassigned-value_iqlml_38",tH="_labeled-container_iqlml_46",nH="_label_iqlml_46",oH="_label-with-tooltip_iqlml_63",rH="_multiline_iqlml_80",iH="_text-editor_iqlml_88",sH="_toggle_iqlml_115",aH="_named_iqlml_123",lH="_named-name_iqlml_127",cH="_named-value_iqlml_133",uH="_mixed_iqlml_138",dH="_expression_iqlml_142",fH="_text-id_iqlml_168",pH="_vector_iqlml_191",hH="_vector-component_iqlml_198",mH="_vector-component-label_iqlml_206",Qe={modal:JF,"value-container":"_value-container_iqlml_5",valueContainer:ZF,value:KF,"readonly-value":"_readonly-value_iqlml_29",readonlyValue:QF,"unassigned-value":"_unassigned-value_iqlml_38",unassignedValue:eH,"labeled-container":"_labeled-container_iqlml_46",labeledContainer:tH,label:nH,"label-with-tooltip":"_label-with-tooltip_iqlml_63",labelWithTooltip:oH,multiline:rH,"text-editor":"_text-editor_iqlml_88",textEditor:iH,toggle:sH,named:aH,"named-name":"_named-name_iqlml_127",namedName:lH,"named-value":"_named-value_iqlml_133",namedValue:cH,mixed:uH,expression:dH,"text-id":"_text-id_iqlml_168",textId:fH,vector:pH,"vector-component":"_vector-component_iqlml_198",vectorComponent:hH,"vector-component-label":"_vector-component-label_iqlml_206",vectorComponentLabel:mH},kl=({children:e,containerClass:t,label:n,labelAttrs:o,labelClass:r,readonly:i,tooltip:s,value:a})=>{const[l,c]=p.useState(0),u=p.useRef(null),d=p.useRef(null),m=`${n?Qe.labeledContainer:Qe.container} ${t??""}`,h=k0([pe.Cancel,v=>document.activeElement?.blur()]),f=p.useMemo(()=>{if(!n)return null;const v=`${Qe.label} ${s?Qe.labelWithTooltip:""} ${r??""}`;return C.jsx("span",{className:v,...ln(s,{doc:!0}),...o,children:n})},[n,o,r,s]),g=p.useMemo(()=>{let v=Qe.valueContainer;return i===!0&&(v+=` ${Qe.readonlyValue}`),!i&&a==null&&(v+=` ${Qe.unassignedValue}`),C.jsx("span",{className:v,ref:d,children:e})},[e,i,a]),b=p.useCallback(v=>{v.target===u.current&&(d.current?.querySelector(`[tabindex]:not(.${Qe.readonlyValue} *)`)?.focus(),c(-1))},[]),y=p.useCallback(v=>c(0),[]);return C.jsxs("span",{className:m,ref:u,...ln(n?void 0:s),onFocus:b,onBlur:y,onKeyDown:h,tabIndex:l,children:[f,g]})};var au={};var PL=p;function ke(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n