diff --git a/dist/assets/index.js b/dist/assets/index.js index e3ed9da..a90af17 100644 --- a/dist/assets/index.js +++ b/dist/assets/index.js @@ -1,3 +1,3 @@ -import{r as t,u as us,l as hs,R as Me,j as e,T as D,I as H,d as $e,W as Ae,e as Ee,L as qe,f as fs,H as Z,g as K,M as ms,h as gs,i as xs,k as bs,m as ps,n as Cs,A as _e,o as pe,p as Ge,q as Ce,s as we,t as ye,B as E,D as ws,F as T,v as js,C as Fe,w as Be,x as Ss,y as ys,z as Qe,E as Bs,G as ks,J as Ye,K as Ds,S as vs,V as Fs,N as Pe,O as Is,P as Ke,Q as Je,U as Rs,X as Ns,Y as Ts,Z as Ms,_ as As,$ as Oe,a0 as b,a1 as Ls,a2 as Vs,a3 as ke,a4 as P,a5 as Ie,a6 as ae,a7 as oe,a8 as re,a9 as te,aa as Es,ab as Xe,ac as X,ad as Ps,ae as Os,af as zs,ag as ze,ah as je,ai as Us,aj as Se,ak as ie,al as Re,am as Ne,an as Ws,ao as Hs,ap as Ze,aq as $s,ar as qs,as as _s,at as Gs,au as es,av as ss,aw as xe,ax as ts,ay as be,az as Qs,aA as Te,aB as Ys,aC as Ks,aD as Js,aE as Xs,aF as Zs,aG as et,aH as st,aI as tt,aJ as nt,aK as lt,aL as at,aM as ot,aN as rt}from"./vendor.js";import{_ as G}from"./lodash.js";import{A as de}from"./ag-grid-react.js";import"./ag-grid-community.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function o(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 n(r){if(r.ep)return;r.ep=!0;const i=o(r);fetch(r.href,i)}})();const it="/assets/Titan.png";function ce(s=[]){return(Array.isArray(s)?s:[s]).map(o=>(delete o["Branch Info"],o))}function De(s,a,o){return`${s==""?"Uncategorised":s} ${a==""?"Unversioned":a} ${String(o).split("\\").at(-1)}`}function ct(s){return String(s).split("\\").at(-1)}const dt="http://localhost:4000",ut="40px";function ge(s,a="info",o=3e3,n=!1){return{position:"top",variant:"solid",title:n?"Server Notification":"Client Notification",description:s,status:a,duration:o,isClosable:!0}}const ns=t.createContext({socket:null,toast:null,config:null,updateConfig:s=>{},isDebug:!1,setIsDebug:s=>{},configurableRowData:[],setConfigurableRowData:s=>{},branchInfos:{},setBranchInfos:s=>{},branchTableGridRef:null,selectedBranches:[],setSelectedBranches:s=>{},showSelectedBranchesLog:!1,setShowSelectedBranchesLog:s=>{},isCommitMode:!1,setIsCommitMode:s=>{},selectedBranchStatuses:[],setSelectedBranchStatuses:s=>{},localChangesGridRef:null,untrackedChangesGridRef:null,showCommitView:!1,setShowCommitView:s=>{},sourceBranch:null,setSourceBranch:s=>{},branchOptions:[],issueNumber:{},setIssueNumber:s=>{},commitMessage:"",setCommitMessage:s=>{},selectedLocalChanges:[],setSelectedLocalChanges:s=>{},selectedUntrackedChanges:[],setSelectedUntrackedChanges:s=>{},socketPayload:null,setSocketPayload:s=>{},postCommitData:{},setPostCommitData:s=>{},logData:[],setLogData:s=>{}}),V=()=>t.useContext(ns),ht=({children:s})=>{const[a,o]=t.useState(null),[n,r]=t.useState(null),i=us(),[l,c]=t.useState(()=>localStorage.getItem("isDebug")==="true");t.useEffect(()=>{const w=hs(dt);return r(w),w.on("connect",()=>{w.emit("titan-config-get","fetch"),w.once("titan-config-get",A=>{o(A),A||i(ge("Couldn't load data from the server","error",0))})}),w.on("notification",A=>{i(ge(A.description,A.status,A.duration,!0))}),w.on("disconnect",()=>{i(ge("Server Has Been Disconnected","warning",0,!0))}),w.on("reconnect",()=>{i(ge("Server Has Been Reconnected","success",2e3,!0))}),()=>{w.disconnect()}},[]),t.useEffect(()=>{localStorage.setItem("isDebug",String(l))},[l]);const u=t.useCallback(w=>{w!=null&&(console.debug("Saving config:",w),n==null||n.emit("titan-config-set",w))},[n]),d=t.useCallback(w=>{o(A=>{const M=w(A);return G.isEqual(A,M)?A:(u(M),M)})},[o,u]),[f,p]=t.useState([]),[C,F]=t.useState({}),k=t.useRef(null),[g,m]=t.useState([]),[j,B]=t.useState(!1),[x,S]=t.useState(!1),[v,O]=t.useState([]),$=t.useRef(null),L=t.useRef(null),[N,U]=t.useState(!1),[q,I]=t.useState(null),z=t.useMemo(()=>{let w=a&&a.commitOptions&&a.commitOptions.useFolderOnlySource,A=f.filter(M=>M["Branch Folder"]&&M["Branch Version"]&&M["SVN Branch"]&&M["Branch Folder"]!==""&&M["Branch Version"]!==""&&M["SVN Branch"]!=="");return w&&(A=A.reduce((M,me)=>(M.some(ve=>ve["Branch Folder"]===me["Branch Folder"])||M.push(me),M),[])),A.map(M=>({value:M.id,label:w?M["Branch Folder"]:De(M["Branch Folder"],M["Branch Version"],M["SVN Branch"])}))},[a,g,f]),[W,Y]=t.useState({}),[J,ee]=t.useState(""),[se,he]=t.useState([]),[y,h]=t.useState([]),[R,Q]=t.useState(null),[fe,Ve]=t.useState({}),[le,_]=Me.useState([]);return t.useEffect(()=>{O([]),U(!1)},[f]),t.useEffect(()=>{if(!x||!N)return;const w=setTimeout(()=>{var A;(A=document.getElementById("sectionCommit"))==null||A.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},100);return()=>clearTimeout(w)},[x,N]),t.useEffect(()=>{if(g.length<1||N){g.length<1&&S(!1);return}O([]),Q(null),ce(g).forEach(w=>{console.debug("Emitting svn-status-single for branch:",w),n==null||n.emit("svn-status-single",{selectedBranch:w})})},[n,g,N]),t.useEffect(()=>{const w=()=>{U(!1)};return n==null||n.on("branch-refresh-unseen",w),()=>n==null?void 0:n.off("branch-refresh-unseen",w)},[n]),t.useEffect(()=>{const w=A=>{l&&console.debug("Received branch status data:",A),O(M=>[...M,A])};return n==null||n.on("branch-status-single",w),()=>n==null?void 0:n.off("branch-status-single",w)},[n]),t.useEffect(()=>{_([])},[g]),t.useEffect(()=>{le.length===0&&n&&m(w=>(w.length>0&&n.emit("svn-log-selected",{selectedBranches:g}),w))},[le,n]),t.useEffect(()=>{const w=A=>{console.debug("Received svn-log-result from socket in SectionBranchLog component in background"),_(M=>M.some(ve=>ve.id===A.id)?M:[...M,A])};return n==null||n.on("svn-log-result",w),()=>n==null?void 0:n.off("svn-log-result",w)},[n]),e.jsx(ns.Provider,{value:{socket:n,toast:i,config:a,updateConfig:d,isDebug:l,setIsDebug:c,configurableRowData:f,setConfigurableRowData:p,branchInfos:C,setBranchInfos:F,branchTableGridRef:k,selectedBranches:g,setSelectedBranches:m,showSelectedBranchesLog:j,setShowSelectedBranchesLog:B,isCommitMode:x,setIsCommitMode:S,selectedBranchStatuses:v,setSelectedBranchStatuses:O,localChangesGridRef:$,untrackedChangesGridRef:L,showCommitView:N,setShowCommitView:U,sourceBranch:q,setSourceBranch:I,branchOptions:z,issueNumber:W,setIssueNumber:Y,commitMessage:J,setCommitMessage:ee,selectedLocalChanges:se,setSelectedLocalChanges:he,selectedUntrackedChanges:y,setSelectedUntrackedChanges:h,socketPayload:R,setSocketPayload:Q,postCommitData:fe,setPostCommitData:Ve,logData:le,setLogData:_},children:s})};function ue(){const{socket:s}=V(),a=t.useCallback(()=>{s==null||s.emit("titan-config-open",{})},[s]),o=t.useCallback((d,f,p,C)=>{s==null||s.emit("svn-update-single",{id:d,branch:f,version:p,folder:C})},[s]),n=t.useCallback((d,f,p,C)=>{s==null||s.emit("svn-info-single",{id:d,branch:f,version:p,folder:C})},[s]),r=t.useCallback(d=>{s==null||s.emit("svn-commit",d)},[s]),i=t.useCallback(d=>{s==null||s.emit("svn-files-revert",{filesToProcess:d})},[s]),l=t.useCallback(d=>{s==null||s.emit("svn-files-add-remove",{filesToProcess:d})},[s]),c=t.useCallback((d,f,p,C=null)=>{s==null||s.emit("trello-search-names-card",{key:d,token:f,query:p,limit:C})},[s]),u=t.useCallback((d,f,p,C)=>{s==null||s.emit("trello-update-card",{key:d,token:f,trelloData:p,commitResponses:C})},[s]);return{emitOpenConfig:a,emitUpdateSingle:o,emitInfoSingle:n,emitCommitPayload:r,emitFilesRevert:i,emitFilesAddRemove:l,emitTrelloCardNamesSearch:c,emitTrelloCardUpdate:u}}function ne(){const{toast:s}=V(),a=t.useCallback((o="",n="info",r=3e3,i=null)=>{const l=ge(o,n,r);if(s)return s(l);if(i)return i(l)},[s]);return{toast:s,RaiseClientNotificaiton:a}}function ls(s){const{icon:a,onClick:o,colorScheme:n,label:r,size:i}=s,l=t.useCallback(()=>{o&&o()},[o]);return e.jsx(D,{label:window.electron?r:"Feature must be used in desktop application",children:e.jsx(H,{"aria-label":r,size:i,icon:a,onClick:l,colorScheme:n,isDisabled:!window.electron})})}function ft(){const{config:s,isDebug:a,setIsDebug:o}=V(),{emitOpenConfig:n}=ue(),{RaiseClientNotificaiton:r}=ne(),{colorMode:i,toggleColorMode:l}=$e(),c=t.useCallback(()=>{window.electron.checkForUpdates().then(d=>{console.debug("Check for updates result: ",d)}),window.electron.on("update-not-available",()=>{r("Titan is up to date","info",3e3),window.electron.removeAllListeners("update-not-available")})},[r]),u=t.useCallback(()=>{window.electron&&window.electron.getAppVersion().then(d=>{r(`Application Version: v${d}`,"info",2e3)})},[r]);return e.jsxs(Ae,{my:5,spacingY:5,justify:"space-between",children:[e.jsxs(Ee,{alignItems:"center",children:[e.jsx(qe,{onClick:u,children:e.jsx(fs,{src:it,alt:"Titan Logo",boxSize:"100px",mr:5,borderRadius:"full"})}),e.jsx(Z,{as:"h2",size:"2xl",noOfLines:1,className:"animation-fadein-forward",children:"Welcome back"}),e.jsx(Z,{as:"h2",size:"2xl",noOfLines:1,p:2,className:"animation-handwave",children:"👋"})]}),e.jsxs(Ee,{alignItems:"center",columnGap:2,children:[e.jsx(D,{label:"Toggle Light/Dark Mode",hasArrow:!0,placement:"left",children:e.jsx(H,{"aria-label":"Toggle light/dark mode",colorScheme:"yellow",icon:e.jsx(K,{as:i==="light"?ms:gs}),onClick:l})}),e.jsx(ls,{icon:e.jsx(K,{as:xs}),onClick:c,colorScheme:"yellow",label:"Check For Updates",size:"md"}),e.jsx(D,{label:"Open Config File",hasArrow:!0,placement:"bottom-start",children:e.jsx(H,{"aria-label":"Open configuration file",colorScheme:"yellow",icon:e.jsx(K,{as:bs}),onClick:()=>n()})}),e.jsx(D,{label:`Current Debug Mode: ${a?"on":"off"}`,hasArrow:!0,placement:"right",children:e.jsx(H,{"aria-label":"Toggle Debug Mode",colorScheme:"yellow",icon:a?e.jsx(K,{as:Cs}):e.jsx(K,{as:ps}),onClick:()=>o(d=>!d)})})]})]})}function mt({isAlertOpen:s,onCloseAlert:a,cancelRef:o,removeSelectedRows:n}){return e.jsx(_e,{isOpen:s,leastDestructiveRef:o,onClose:a,children:e.jsx(pe,{children:e.jsxs(Ge,{children:[e.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:"Delete Selected Rows"}),e.jsx(we,{children:"Are you sure you want to delete the selected rows? This action cannot be undone."}),e.jsxs(ye,{children:[e.jsx(E,{ref:o,onClick:a,children:"Cancel"}),e.jsx(E,{colorScheme:"red",onClick:n,ml:3,children:"Delete"})]})]})})})}function Ue(){const{innerWidth:s,innerHeight:a}=window;return{width:s,height:a}}function gt(){const[s,a]=t.useState(Ue());return t.useEffect(()=>{function o(){a(Ue())}return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),s}function xt({rowData:s,onRowValueChanged:a}){const{config:o,branchTableGridRef:n,updateConfig:r,isDebug:i,selectedBranches:l,setSelectedBranches:c,setSelectedBranchStatuses:u,setShowCommitView:d}=V(),f=gt(),[p,C]=t.useState(f.height>768),F=t.useCallback(x=>{const S={...x,id:String(Date.now()),"Branch Info":"Hasn't been refreshed"};r(v=>({...v,branches:ce([...v.branches,S])}))},[r]),k=t.useCallback(x=>{var v,O,$,L;const S=(O=(v=n==null?void 0:n.current)==null?void 0:v.api)==null?void 0:O.getSelectedNodes().map(N=>N.data);if(i&&console.log("SectionBranches.jsx: onSelectionChanged - event",x),i&&console.log("SectionBranches.jsx: onSelectionChanged - selectedBranches",l),(x==null?void 0:x.source)=="rowDataChanged"){const N=l.map(U=>U.id);(L=($=n==null?void 0:n.current)==null?void 0:$.api)==null||L.forEachNode(U=>{N.includes(U.data.id)&&U.setSelected(!0)});return}else["api"].includes(x==null?void 0:x.source)||(c(S),u([]),d(!1))},[i,n,l,c,d]),g=t.useCallback(x=>{const S=[];x.api.forEachNode(v=>S.push(v.data)),i&&console.debug("SectionBranches.jsx: onRowDragEnd - movedRowData",S),r(v=>({...v,branches:ce(S)}))},[r,i]),m=t.useCallback(x=>{const S=o==null?void 0:o.branchFolderColours[x.data["Branch Folder"]];return{backgroundColor:S?`${S}20`:"transparent"}},[o==null?void 0:o.branchFolderColours]),j=t.useMemo(()=>({resizable:!0,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!0,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),B=t.useMemo(()=>{const x=[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:25,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"Branch Folder",resizable:!1,width:130,valueFormatter:S=>S.value.toUpperCase()},{field:"Branch Version",resizable:!1,width:130},{field:"SVN Branch",flex:2},{field:"Branch Info",editable:!1,resizable:!1,width:125},{headerName:"",resizable:!0,sortable:!1,filter:!1,editable:!1,cellRenderer:S=>e.jsxs(T,{columnGap:1,children:[e.jsx(ls,{icon:e.jsx(js,{}),onClick:()=>console.warn("Unused button"),colorScheme:"yellow",label:"Script file name",size:"sm"}),e.jsx(D,{label:"Copy Row",hasArrow:!0,children:e.jsx(H,{colorScheme:"yellow","aria-label":"Copy Row",size:"sm",onClick:()=>F(S.data),icon:e.jsx(Fe,{})})})]})}];return p?[{field:"",rowDrag:!0,resizable:!1,filter:!1,suppressMovable:!1,editable:!1,width:20,cellRenderer:ws,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},...x]:x},[o,p,F]);return t.useEffect(()=>{C(f.height>768)},[f]),e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:p?"auto":"428px",width:"100%"},children:e.jsx(de,{ref:n,rowData:s,defaultColDef:j,columnDefs:B,stopEditingWhenCellsLoseFocus:!0,getRowStyle:m,onRowDragEnd:g,domLayout:p?"autoHeight":"normal",suppressRowClickSelection:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,animateRows:!0,rowDragManaged:!0,onSelectionChanged:k,onRowValueChanged:a,columnMenu:"new",editType:"fullRow",deltaRowDataMode:!0,getRowNodeId:x=>x.id,immutableData:!0,suppressFlash:!0,enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!p,paginationAutoPageSize:!1,paginationPageSizeSelector:!1,paginationPageSize:10})})}function bt(){const{updateConfig:s,isDebug:a,socket:o,configurableRowData:n,setConfigurableRowData:r,branchInfos:i,config:l,setBranchInfos:c,setSelectedBranches:u,setSelectedBranchStatuses:d,showCommitView:f,setShowCommitView:p}=V(),[C,F]=t.useState([]),k=t.useCallback(g=>{a&&console.log("AG Grid: onRowValueChanged - event",g),a&&console.log("AG Grid: onRowValueChanged - rowDataBranches",C),s(m=>({...m,branches:ce(C)}))},[C,s,a]);return t.useEffect(()=>{const g=G.debounce(()=>{const m=n.map(j=>({...j,"Branch Info":i[j.id]||"Hasn't been refreshed"}));F(j=>G.isEqual(m,j)?j:m)},300);return g(),()=>g.cancel()},[n,i]),t.useEffect(()=>{r(g=>l&&l.branches&&!G.isEqual(l.branches,g)?l.branches:g)},[l]),t.useEffect(()=>{const g=m=>{c(j=>{const B={...j,[m.id]:m.info};return console.debug("branch-info-single data received:",m),console.debug("branch-info-single newBranchInfos",B),u(x=>(x.find(v=>v.id===m.id)&&f&&(d([]),p(!1)),x)),B})};return o==null||o.on("branch-info-single",g),()=>o==null?void 0:o.off("branch-info-single")},[o,f]),{rowDataBranches:C,setRowDataBranches:F,onRowValueChanged:k}}function pt(){const{socket:s,updateConfig:a,isDebug:o,setShowSelectedBranchesLog:n,configurableRowData:r,branchTableGridRef:i,selectedBranches:l,setSelectedBranches:c,isCommitMode:u,setIsCommitMode:d,setSelectedBranchStatuses:f,setShowCommitView:p}=V(),{emitUpdateSingle:C,emitInfoSingle:F}=ue(),{RaiseClientNotificaiton:k}=ne(),[g,m]=t.useState(!1),j=t.useRef(),B=()=>m(!1),{rowDataBranches:x,setRowDataBranches:S,onRowValueChanged:v}=bt(),[O,$]=t.useState(0),[L,N]=t.useState([]),U=t.useCallback(()=>{var y,h;o&&console.log("SectionBranches.jsx: clearSelection: START"),(h=(y=i==null?void 0:i.current)==null?void 0:y.api)==null||h.deselectAll(),c([]),d(!1)},[o,i,c]),q=t.useCallback(()=>{var h,R;const y=(R=(h=i==null?void 0:i.current)==null?void 0:h.api)==null?void 0:R.getSelectedNodes().map(Q=>Q.data);c(y),m(!0)},[i,c]),I=t.useCallback(()=>{const y={id:String(Date.now()),"Branch Folder":"","Branch Version":"","SVN Branch":"","Branch Info":""};a(h=>({...h,branches:ce([...h.branches,y])}))},[a]),z=t.useCallback(()=>{l.forEach(y=>{C(y.id,y["SVN Branch"],y["Branch Version"],y["Branch Folder"])})},[l,C]),W=t.useCallback(()=>{L.forEach(y=>{C(y.id,y["SVN Branch"],y["Branch Version"],y["Branch Folder"])})},[L,C]),Y=t.useCallback(()=>{const y=l.map(R=>R.id),h=x.filter(R=>!y.includes(R.id));console.log("SectionBranches.jsx: removeSelectedRows - updatedData",h),a(R=>({...R,branches:ce(h)})),U(),B()},[l,x,a]),J=t.useCallback(()=>{n(!0)},[]),ee=t.useCallback(()=>{S(y=>{const h=[...y];return l.forEach(R=>{const Q=h.findIndex(fe=>fe.id===R.id);h[Q]["Branch Info"]="Refreshing..."}),h}),l.forEach(y=>{F(y.id,y["SVN Branch"],y["Branch Version"],y["Branch Folder"])})},[l,F]),se=t.useCallback(()=>{if(u)return;k("Refreshing all branches. Please wait until this is done!","info",3e3);const y=Date.now();r.forEach(h=>{F(h.id,h["SVN Branch"],h["Branch Version"],h["Branch Folder"])}),$(y)},[r,F,k,u]),he=t.useCallback(()=>{d(y=>!y),p(!1)},[d]);return t.useEffect(()=>{const y=x.filter(h=>String(h["Branch Info"]).toLowerCase().includes("-"));N(y)},[x]),t.useEffect(()=>{const h=Date.now();if(r.length>0){h-O>3e5&&se();const R=setInterval(()=>{se()},3e5);return()=>clearInterval(R)}},[r,O,se]),t.useEffect(()=>{const y=h=>{o&&console.debug("branch-success-single data received:",h),F(h.id,h.branch,h.version,h.folder)};return s==null||s.on("branch-success-single",y),()=>s==null?void 0:s.off("branch-success-single",y)},[o,s,F]),e.jsxs("div",{children:[e.jsxs(Ae,{mb:4,justify:"space-between",children:[e.jsxs(T,{columnGap:2,children:[e.jsx(D,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:ee,leftIcon:e.jsx(Be,{}),colorScheme:"yellow",isDisabled:l.length<1,children:["Refresh ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(D,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:z,leftIcon:e.jsx(K,{as:Ss}),colorScheme:"yellow",isDisabled:l.length<1,children:["Update ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(D,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsx(E,{onClick:he,leftIcon:e.jsx(K,{as:u?ys:Qe}),colorScheme:"yellow",isDisabled:l.length<1,children:u?"Undo Commit":"Commit"})}),e.jsx(D,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsx(E,{onClick:J,leftIcon:e.jsx(Bs,{}),colorScheme:"yellow",isDisabled:l.length<1,children:"View Logs"})})]}),e.jsx(T,{columnGap:2,children:e.jsx(D,{label:"No outdated branches to update",isDisabled:L.length>0,hasArrow:!0,children:e.jsx(E,{onClick:W,leftIcon:e.jsx(ks,{}),colorScheme:"yellow",isDisabled:L.length<1,children:"Update Outdated"})})})]}),e.jsx(xt,{rowData:x,onRowValueChanged:v}),e.jsxs(T,{columnGap:2,mt:4,children:[e.jsx(D,{label:"Please select at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:U,leftIcon:e.jsx(Ye,{}),colorScheme:"red",isDisabled:l.length<1,children:["Deselect ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(D,{label:"Please select at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:q,leftIcon:e.jsx(Ds,{}),colorScheme:"red",isDisabled:l.length<1,children:["Delete ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(E,{onClick:I,leftIcon:e.jsx(vs,{boxSize:8}),colorScheme:"green",children:"New Row"})]}),e.jsx(mt,{isAlertOpen:g,onCloseAlert:B,cancelRef:j,removeSelectedRows:Y})]})}function as(s){const{data:a,onDiffResult:o}=s,n=t.useCallback(async()=>{try{const r=await window.electron.openTortoiseSVNDiff({fullPath:a["Full Path"],branchFolder:a["Branch Folder"],branchVersion:a["Branch Version"]});o(r)}catch(r){o({success:!1,error:r.message})}},[a,o]);return e.jsx(H,{"aria-label":"Diff",size:"sm",icon:e.jsx(Fs,{}),onClick:n,colorScheme:"yellow"})}function os(){const{config:s}=V(),{emitTrelloCardNamesSearch:a,emitTrelloCardUpdate:o}=ue(),n=s==null?void 0:s.trelloIntegration,r=(n==null?void 0:n.key)||null,i=(n==null?void 0:n.token)||null,l=r&&i&&r.trim()!==""&&i.trim()!==""&&r.toUpperCase()!=="TRELLO_API_KEY"&&i.toUpperCase!=="TRELLO_TOKEN";return{key:r,token:i,isTrelloIntegrationEnabled:l,emitTrelloCardNamesSearch:a,emitTrelloCardUpdate:o}}function Ct({isModalOpen:s,closeModal:a}){const{socket:o,setIsCommitMode:n,setSelectedBranchStatuses:r,setShowCommitView:i,socketPayload:l,postCommitData:c,setPostCommitData:u}=V(),{emitUpdateSingle:d,emitCommitPayload:f}=ue(),{key:p,token:C,isTrelloIntegrationEnabled:F,emitTrelloCardUpdate:k}=os(),{RaiseClientNotificaiton:g}=ne(),[m,j]=t.useState([]),{onCopy:B,value:x,setValue:S,hasCopied:v}=Pe(""),{onCopy:O,value:$,setValue:L,hasCopied:N}=Pe(""),U=t.useCallback(h=>{h.success?g("TortoiseSVN diff opened successfully","success",3e3):g(`Error opening TortoiseSVN diff: ${JSON.stringify(h.error,null,4)}`,"error",0)},[g]),q=[{title:"Review",description:"Confirm SVN changes"},{title:"Commit",description:"Commit changes"},{title:"Complete",description:"Process Completed"}],{activeStep:I,setActiveStep:z}=Is({index:1,count:q.length}),W=t.useMemo(()=>({resizable:!1,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),Y=t.useMemo(()=>[{field:"Branch Folder"},{field:"Branch Version",sort:"asc"},{field:"File Path",flex:1},{field:"Local Status",headerTooltip:"Working Copy"},{headerName:"Diff",filter:!1,sortable:!1,cellRenderer:as,cellRendererParams:{onDiffResult:U},width:90}],[]),J=t.useCallback((h,R=!0)=>{const Q="​".repeat(7),fe=h.includes("MarkupSupport")?`\r +import{r as t,u as hs,l as fs,R as Ae,j as e,T as v,I as $,d as qe,W as Le,e as Pe,L as _e,f as ms,H as Z,g as Y,M as gs,h as xs,i as bs,k as ps,m as Cs,n as ws,o as js,A as Ge,p as pe,q as Qe,s as Ce,t as we,v as ke,B as E,D as Ss,F as T,w as ys,C as Ie,x as Be,y as ks,z as Bs,E as Ye,G as Ds,J as vs,K as Ke,N as Fs,S as Is,V as Rs,O as ze,P as Ns,Q as Je,U as Xe,X as Ts,Y as Ms,Z as As,_ as Ls,$ as Vs,a0 as Oe,a1 as C,a2 as Es,a3 as Ps,a4 as De,a5 as P,a6 as Re,a7 as oe,a8 as ae,a9 as re,aa as te,ab as zs,ac as Ze,ad as X,ae as Os,af as Us,ag as Ws,ah as Ue,ai as je,aj as Hs,ak as Se,al as ie,am as Ne,an as Te,ao as $s,ap as qs,aq as es,ar as _s,as as Gs,at as Qs,au as Ys,av as ss,aw as ts,ax as xe,ay as ns,az as be,aA as Ks,aB as Me,aC as Js,aD as Xs,aE as Zs,aF as et,aG as st,aH as tt,aI as nt,aJ as lt,aK as ot,aL as at,aM as rt,aN as it,aO as ct}from"./vendor.js";import{_ as G}from"./lodash.js";import{A as de}from"./ag-grid-react.js";import"./ag-grid-community.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function a(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 n(r){if(r.ep)return;r.ep=!0;const i=a(r);fetch(r.href,i)}})();const dt="/assets/Titan.png";function ce(s=[]){return(Array.isArray(s)?s:[s]).map(a=>(delete a["Branch Info"],a))}function ve(s,o,a){return`${s==""?"Uncategorised":s} ${o==""?"Unversioned":o} ${String(a).split("\\").at(-1)}`}function ut(s){return String(s).split("\\").at(-1)}const ht="http://localhost:4000",ft="40px";function ge(s,o="info",a=3e3,n=!1){return{position:"top",variant:"solid",title:n?"Server Notification":"Client Notification",description:s,status:o,duration:a,isClosable:!0}}const ls=t.createContext({socket:null,toast:null,config:null,updateConfig:s=>{},isDebug:!1,setIsDebug:s=>{},configurableRowData:[],setConfigurableRowData:s=>{},branchInfos:{},setBranchInfos:s=>{},branchTableGridRef:null,selectedBranches:[],setSelectedBranches:s=>{},showSelectedBranchesLog:!1,setShowSelectedBranchesLog:s=>{},isCommitMode:!1,setIsCommitMode:s=>{},selectedBranchStatuses:[],setSelectedBranchStatuses:s=>{},localChangesGridRef:null,untrackedChangesGridRef:null,showCommitView:!1,setShowCommitView:s=>{},sourceBranch:null,setSourceBranch:s=>{},branchOptions:[],issueNumber:{},setIssueNumber:s=>{},commitMessage:"",setCommitMessage:s=>{},selectedLocalChanges:[],setSelectedLocalChanges:s=>{},selectedUntrackedChanges:[],setSelectedUntrackedChanges:s=>{},socketPayload:null,setSocketPayload:s=>{},postCommitData:{},setPostCommitData:s=>{},logData:[],setLogData:s=>{}}),V=()=>t.useContext(ls),mt=({children:s})=>{const[o,a]=t.useState(null),[n,r]=t.useState(null),i=hs(),[l,c]=t.useState(()=>localStorage.getItem("isDebug")==="true");t.useEffect(()=>{const w=fs(ht);return r(w),w.on("connect",()=>{w.emit("titan-config-get","fetch"),w.once("titan-config-get",A=>{a(A),A||i(ge("Couldn't load data from the server","error",0))})}),w.on("notification",A=>{i(ge(A.description,A.status,A.duration,!0))}),w.on("disconnect",()=>{i(ge("Server Has Been Disconnected","warning",0,!0))}),w.on("reconnect",()=>{i(ge("Server Has Been Reconnected","success",2e3,!0))}),()=>{w.disconnect()}},[]),t.useEffect(()=>{localStorage.setItem("isDebug",String(l))},[l]);const d=t.useCallback(w=>{w!=null&&(console.debug("Saving config:",w),n==null||n.emit("titan-config-set",w))},[n]),u=t.useCallback(w=>{a(A=>{const M=w(A);return G.isEqual(A,M)?A:(d(M),M)})},[a,d]),[h,p]=t.useState([]),[x,F]=t.useState({}),B=t.useRef(null),[g,m]=t.useState([]),[j,k]=t.useState(!1),[b,S]=t.useState(!1),[D,z]=t.useState([]),H=t.useRef(null),L=t.useRef(null),[N,U]=t.useState(!1),[q,I]=t.useState(null),O=t.useMemo(()=>{let w=o&&o.commitOptions&&o.commitOptions.useFolderOnlySource,A=h.filter(M=>M["Branch Folder"]&&M["Branch Version"]&&M["SVN Branch"]&&M["Branch Folder"]!==""&&M["Branch Version"]!==""&&M["SVN Branch"]!=="");return w&&(A=A.reduce((M,me)=>(M.some(Fe=>Fe["Branch Folder"]===me["Branch Folder"])||M.push(me),M),[])),A.map(M=>({value:M.id,label:w?M["Branch Folder"]:ve(M["Branch Folder"],M["Branch Version"],M["SVN Branch"])}))},[o,g,h]),[W,K]=t.useState({}),[J,ee]=t.useState(""),[se,he]=t.useState([]),[y,f]=t.useState([]),[R,Q]=t.useState(null),[fe,Ee]=t.useState({}),[le,_]=Ae.useState([]);return t.useEffect(()=>{z([]),U(!1)},[h]),t.useEffect(()=>{if(!b||!N)return;const w=setTimeout(()=>{var A;(A=document.getElementById("sectionCommit"))==null||A.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},100);return()=>clearTimeout(w)},[b,N]),t.useEffect(()=>{if(g.length<1||N){g.length<1&&S(!1);return}z([]),Q(null),ce(g).forEach(w=>{console.debug("Emitting svn-status-single for branch:",w),n==null||n.emit("svn-status-single",{selectedBranch:w})})},[n,g,N]),t.useEffect(()=>{const w=()=>{U(!1)};return n==null||n.on("branch-refresh-unseen",w),()=>n==null?void 0:n.off("branch-refresh-unseen",w)},[n]),t.useEffect(()=>{const w=A=>{l&&console.debug("Received branch status data:",A),z(M=>[...M,A])};return n==null||n.on("branch-status-single",w),()=>n==null?void 0:n.off("branch-status-single",w)},[n]),t.useEffect(()=>{_([])},[g]),t.useEffect(()=>{le.length===0&&n&&m(w=>(w.length>0&&n.emit("svn-log-selected",{selectedBranches:g}),w))},[le,n]),t.useEffect(()=>{const w=A=>{console.debug("Received svn-log-result from socket in SectionBranchLog component in background"),_(M=>M.some(Fe=>Fe.id===A.id)?M:[...M,A])};return n==null||n.on("svn-log-result",w),()=>n==null?void 0:n.off("svn-log-result",w)},[n]),e.jsx(ls.Provider,{value:{socket:n,toast:i,config:o,updateConfig:u,isDebug:l,setIsDebug:c,configurableRowData:h,setConfigurableRowData:p,branchInfos:x,setBranchInfos:F,branchTableGridRef:B,selectedBranches:g,setSelectedBranches:m,showSelectedBranchesLog:j,setShowSelectedBranchesLog:k,isCommitMode:b,setIsCommitMode:S,selectedBranchStatuses:D,setSelectedBranchStatuses:z,localChangesGridRef:H,untrackedChangesGridRef:L,showCommitView:N,setShowCommitView:U,sourceBranch:q,setSourceBranch:I,branchOptions:O,issueNumber:W,setIssueNumber:K,commitMessage:J,setCommitMessage:ee,selectedLocalChanges:se,setSelectedLocalChanges:he,selectedUntrackedChanges:y,setSelectedUntrackedChanges:f,socketPayload:R,setSocketPayload:Q,postCommitData:fe,setPostCommitData:Ee,logData:le,setLogData:_},children:s})};function ue(){const{socket:s}=V(),o=t.useCallback(()=>{s==null||s.emit("titan-config-open",{})},[s]),a=t.useCallback((u,h,p,x)=>{s==null||s.emit("svn-update-single",{id:u,branch:h,version:p,folder:x})},[s]),n=t.useCallback((u,h,p,x)=>{s==null||s.emit("svn-info-single",{id:u,branch:h,version:p,folder:x})},[s]),r=t.useCallback(u=>{s==null||s.emit("svn-commit",u)},[s]),i=t.useCallback(u=>{s==null||s.emit("svn-files-revert",{filesToProcess:u})},[s]),l=t.useCallback(u=>{s==null||s.emit("svn-files-add-remove",{filesToProcess:u})},[s]),c=t.useCallback((u,h,p,x=null)=>{s==null||s.emit("trello-search-names-card",{key:u,token:h,query:p,limit:x})},[s]),d=t.useCallback((u,h,p,x)=>{s==null||s.emit("trello-update-card",{key:u,token:h,trelloData:p,commitResponses:x})},[s]);return{emitOpenConfig:o,emitUpdateSingle:a,emitInfoSingle:n,emitCommitPayload:r,emitFilesRevert:i,emitFilesAddRemove:l,emitTrelloCardNamesSearch:c,emitTrelloCardUpdate:d}}function ne(){const{toast:s}=V(),o=t.useCallback((a="",n="info",r=3e3,i=null)=>{const l=ge(a,n,r);if(s)return s(l);if(i)return i(l)},[s]);return{toast:s,RaiseClientNotificaiton:o}}function os(s){const{icon:o,onClick:a,colorScheme:n,label:r,size:i}=s,l=t.useCallback(()=>{a&&a()},[a]);return e.jsx(v,{label:window.electron?r:"Feature must be used in desktop application",children:e.jsx($,{"aria-label":r,size:i,icon:o,onClick:l,colorScheme:n,isDisabled:!window.electron})})}function ye(s){const{icon:o,onClick:a,colorScheme:n,label:r,size:i,placement:l,isDisabled:c=!1}=s,d=t.useCallback(()=>{a&&a()},[a]);return r&&l?e.jsx(v,{label:r,hasArrow:!0,placement:l,children:e.jsx($,{"aria-label":r,size:i,icon:o,onClick:d,colorScheme:n,isDisabled:c})}):e.jsx($,{"aria-label":r,size:i,icon:o,onClick:d,colorScheme:n,isDisabled:c})}function gt(){const{config:s,isDebug:o,setIsDebug:a}=V(),{emitOpenConfig:n}=ue(),{RaiseClientNotificaiton:r}=ne(),{colorMode:i,toggleColorMode:l}=qe(),c=t.useCallback(()=>{window.electron&&window.electron.getAppVersion().then(x=>{r(`Application Version: v${x}`,"info",2e3)})},[r]),d=t.useCallback(()=>{window.location.reload()},[]),u=t.useCallback(()=>{window.electron.checkForUpdates().then(x=>{console.debug("Check for updates result: ",x)}),window.electron.on("update-not-available",()=>{r("Titan is up to date","info",3e3),window.electron.removeAllListeners("update-not-available")})},[r]),h=t.useCallback(()=>{n()},[n]),p=t.useCallback(()=>{a(x=>!x)},[a]);return e.jsxs(Le,{my:5,spacingY:5,justify:"space-between",children:[e.jsxs(Pe,{alignItems:"center",children:[e.jsx(_e,{onClick:c,children:e.jsx(ms,{src:dt,alt:"Titan Logo",boxSize:"100px",mr:5,borderRadius:"full"})}),e.jsx(Z,{as:"h2",size:"2xl",noOfLines:1,className:"animation-fadein-forward",children:"Welcome back"}),e.jsx(Z,{as:"h2",size:"2xl",noOfLines:1,p:2,className:"animation-handwave",children:"👋"})]}),e.jsxs(Pe,{alignItems:"center",columnGap:2,children:[e.jsx(ye,{icon:e.jsx(Y,{as:i==="light"?gs:xs}),onClick:l,colorScheme:"yellow",label:"Toggle Light/Dark Mode",placement:"bottom-start",size:"md"}),e.jsx(ye,{icon:e.jsx(Y,{as:bs}),onClick:d,colorScheme:"yellow",label:"Reload",placement:"bottom-start",size:"md"}),e.jsx(os,{icon:e.jsx(Y,{as:ps}),onClick:u,colorScheme:"yellow",label:"Check For Updates",size:"md"}),e.jsx(ye,{icon:e.jsx(Y,{as:Cs}),onClick:h,colorScheme:"yellow",label:"Open Config File",placement:"bottom-start",size:"md"}),e.jsx(ye,{icon:o?e.jsx(Y,{as:js}):e.jsx(Y,{as:ws}),onClick:p,colorScheme:"yellow",label:`Current Debug Mode: ${o?"on":"off"}`,placement:"bottom-start",size:"md"})]})]})}function xt({isAlertOpen:s,onCloseAlert:o,cancelRef:a,removeSelectedRows:n}){return e.jsx(Ge,{isOpen:s,leastDestructiveRef:a,onClose:o,children:e.jsx(pe,{children:e.jsxs(Qe,{children:[e.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:"Delete Selected Rows"}),e.jsx(we,{children:"Are you sure you want to delete the selected rows? This action cannot be undone."}),e.jsxs(ke,{children:[e.jsx(E,{ref:a,onClick:o,children:"Cancel"}),e.jsx(E,{colorScheme:"red",onClick:n,ml:3,children:"Delete"})]})]})})})}function We(){const{innerWidth:s,innerHeight:o}=window;return{width:s,height:o}}function bt(){const[s,o]=t.useState(We());return t.useEffect(()=>{function a(){o(We())}return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),s}function pt({rowData:s,onRowValueChanged:o}){const{config:a,branchTableGridRef:n,updateConfig:r,isDebug:i,selectedBranches:l,setSelectedBranches:c,setSelectedBranchStatuses:d,setShowCommitView:u}=V(),h=bt(),[p,x]=t.useState(h.height>768),F=t.useCallback(b=>{const S={...b,id:String(Date.now()),"Branch Info":"Hasn't been refreshed"};r(D=>({...D,branches:ce([...D.branches,S])}))},[r]),B=t.useCallback(b=>{var D,z,H,L;const S=(z=(D=n==null?void 0:n.current)==null?void 0:D.api)==null?void 0:z.getSelectedNodes().map(N=>N.data);if(i&&console.log("SectionBranches.jsx: onSelectionChanged - event",b),i&&console.log("SectionBranches.jsx: onSelectionChanged - selectedBranches",l),(b==null?void 0:b.source)=="rowDataChanged"){const N=l.map(U=>U.id);(L=(H=n==null?void 0:n.current)==null?void 0:H.api)==null||L.forEachNode(U=>{N.includes(U.data.id)&&U.setSelected(!0)});return}else["api"].includes(b==null?void 0:b.source)||(c(S),d([]),u(!1))},[i,n,l,c,u]),g=t.useCallback(b=>{const S=[];b.api.forEachNode(D=>S.push(D.data)),i&&console.debug("SectionBranches.jsx: onRowDragEnd - movedRowData",S),r(D=>({...D,branches:ce(S)}))},[r,i]),m=t.useCallback(b=>{const S=a==null?void 0:a.branchFolderColours[b.data["Branch Folder"]];return{backgroundColor:S?`${S}20`:"transparent"}},[a==null?void 0:a.branchFolderColours]),j=t.useMemo(()=>({resizable:!0,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!0,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),k=t.useMemo(()=>{const b=[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:25,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"Branch Folder",resizable:!1,width:130,valueFormatter:S=>S.value.toUpperCase()},{field:"Branch Version",resizable:!1,width:130},{field:"SVN Branch",flex:2},{field:"Branch Info",editable:!1,resizable:!1,width:125},{headerName:"",resizable:!0,sortable:!1,filter:!1,editable:!1,cellRenderer:S=>e.jsxs(T,{columnGap:1,children:[e.jsx(os,{icon:e.jsx(ys,{}),onClick:()=>console.warn("Unused button"),colorScheme:"yellow",label:"Script file name",size:"sm"}),e.jsx(v,{label:"Copy Row",hasArrow:!0,children:e.jsx($,{colorScheme:"yellow","aria-label":"Copy Row",size:"sm",onClick:()=>F(S.data),icon:e.jsx(Ie,{})})})]})}];return p?[{field:"",rowDrag:!0,resizable:!1,filter:!1,suppressMovable:!1,editable:!1,width:20,cellRenderer:Ss,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},...b]:b},[a,p,F]);return t.useEffect(()=>{x(h.height>768)},[h]),e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:p?"auto":"428px",width:"100%"},children:e.jsx(de,{ref:n,rowData:s,defaultColDef:j,columnDefs:k,stopEditingWhenCellsLoseFocus:!0,getRowStyle:m,onRowDragEnd:g,domLayout:p?"autoHeight":"normal",suppressRowClickSelection:!0,rowSelection:"multiple",rowMultiSelectWithClick:!0,animateRows:!0,rowDragManaged:!0,onSelectionChanged:B,onRowValueChanged:o,columnMenu:"new",editType:"fullRow",deltaRowDataMode:!0,getRowNodeId:b=>b.id,immutableData:!0,suppressFlash:!0,enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!p,paginationAutoPageSize:!1,paginationPageSizeSelector:!1,paginationPageSize:10})})}function Ct(){const{updateConfig:s,isDebug:o,socket:a,configurableRowData:n,setConfigurableRowData:r,branchInfos:i,config:l,setBranchInfos:c,setSelectedBranches:d,setSelectedBranchStatuses:u,showCommitView:h,setShowCommitView:p}=V(),[x,F]=t.useState([]),B=t.useCallback(g=>{o&&console.log("AG Grid: onRowValueChanged - event",g),o&&console.log("AG Grid: onRowValueChanged - rowDataBranches",x),s(m=>({...m,branches:ce(x)}))},[x,s,o]);return t.useEffect(()=>{const g=G.debounce(()=>{const m=n.map(j=>({...j,"Branch Info":i[j.id]||"Hasn't been refreshed"}));F(j=>G.isEqual(m,j)?j:m)},300);return g(),()=>g.cancel()},[n,i]),t.useEffect(()=>{r(g=>l&&l.branches&&!G.isEqual(l.branches,g)?l.branches:g)},[l]),t.useEffect(()=>{const g=m=>{c(j=>{const k={...j,[m.id]:m.info};return console.debug("branch-info-single data received:",m),console.debug("branch-info-single newBranchInfos",k),d(b=>(b.find(D=>D.id===m.id)&&h&&(u([]),p(!1)),b)),k})};return a==null||a.on("branch-info-single",g),()=>a==null?void 0:a.off("branch-info-single")},[a,h]),{rowDataBranches:x,setRowDataBranches:F,onRowValueChanged:B}}function wt(){const{socket:s,updateConfig:o,isDebug:a,setShowSelectedBranchesLog:n,configurableRowData:r,branchTableGridRef:i,selectedBranches:l,setSelectedBranches:c,isCommitMode:d,setIsCommitMode:u,setSelectedBranchStatuses:h,setShowCommitView:p}=V(),{emitUpdateSingle:x,emitInfoSingle:F}=ue(),{RaiseClientNotificaiton:B}=ne(),[g,m]=t.useState(!1),j=t.useRef(),k=()=>m(!1),{rowDataBranches:b,setRowDataBranches:S,onRowValueChanged:D}=Ct(),[z,H]=t.useState(0),[L,N]=t.useState([]),U=t.useCallback(()=>{var y,f;a&&console.log("SectionBranches.jsx: clearSelection: START"),(f=(y=i==null?void 0:i.current)==null?void 0:y.api)==null||f.deselectAll(),c([]),u(!1)},[a,i,c]),q=t.useCallback(()=>{var f,R;const y=(R=(f=i==null?void 0:i.current)==null?void 0:f.api)==null?void 0:R.getSelectedNodes().map(Q=>Q.data);c(y),m(!0)},[i,c]),I=t.useCallback(()=>{const y={id:String(Date.now()),"Branch Folder":"","Branch Version":"","SVN Branch":"","Branch Info":""};o(f=>({...f,branches:ce([...f.branches,y])}))},[o]),O=t.useCallback(()=>{l.forEach(y=>{x(y.id,y["SVN Branch"],y["Branch Version"],y["Branch Folder"])})},[l,x]),W=t.useCallback(()=>{L.forEach(y=>{x(y.id,y["SVN Branch"],y["Branch Version"],y["Branch Folder"])})},[L,x]),K=t.useCallback(()=>{const y=l.map(R=>R.id),f=b.filter(R=>!y.includes(R.id));console.log("SectionBranches.jsx: removeSelectedRows - updatedData",f),o(R=>({...R,branches:ce(f)})),U(),k()},[l,b,o]),J=t.useCallback(()=>{n(!0)},[]),ee=t.useCallback(()=>{S(y=>{const f=[...y];return l.forEach(R=>{const Q=f.findIndex(fe=>fe.id===R.id);f[Q]["Branch Info"]="Refreshing..."}),f}),l.forEach(y=>{F(y.id,y["SVN Branch"],y["Branch Version"],y["Branch Folder"])})},[l,F]),se=t.useCallback(()=>{if(d)return;B("Refreshing all branches. Please wait until this is done!","info",3e3);const y=Date.now();r.forEach(f=>{F(f.id,f["SVN Branch"],f["Branch Version"],f["Branch Folder"])}),H(y)},[r,F,B,d]),he=t.useCallback(()=>{u(y=>!y),p(!1)},[u]);return t.useEffect(()=>{const y=b.filter(f=>String(f["Branch Info"]).toLowerCase().includes("-"));N(y)},[b]),t.useEffect(()=>{const f=Date.now();if(r.length>0){f-z>3e5&&se();const R=setInterval(()=>{se()},3e5);return()=>clearInterval(R)}},[r,z,se]),t.useEffect(()=>{const y=f=>{a&&console.debug("branch-success-single data received:",f),F(f.id,f.branch,f.version,f.folder)};return s==null||s.on("branch-success-single",y),()=>s==null?void 0:s.off("branch-success-single",y)},[a,s,F]),e.jsxs("div",{children:[e.jsxs(Le,{mb:4,justify:"space-between",children:[e.jsxs(T,{columnGap:2,children:[e.jsx(v,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:ee,leftIcon:e.jsx(Be,{}),colorScheme:"yellow",isDisabled:l.length<1,children:["Refresh ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(v,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:O,leftIcon:e.jsx(Y,{as:ks}),colorScheme:"yellow",isDisabled:l.length<1,children:["Update ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(v,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsx(E,{onClick:he,leftIcon:e.jsx(Y,{as:d?Bs:Ye}),colorScheme:"yellow",isDisabled:l.length<1,children:d?"Undo Commit":"Commit"})}),e.jsx(v,{label:"Requires at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsx(E,{onClick:J,leftIcon:e.jsx(Ds,{}),colorScheme:"yellow",isDisabled:l.length<1,children:"View Logs"})})]}),e.jsx(T,{columnGap:2,children:e.jsx(v,{label:"No outdated branches to update",isDisabled:L.length>0,hasArrow:!0,children:e.jsx(E,{onClick:W,leftIcon:e.jsx(vs,{}),colorScheme:"yellow",isDisabled:L.length<1,children:"Update Outdated"})})})]}),e.jsx(pt,{rowData:b,onRowValueChanged:D}),e.jsxs(T,{columnGap:2,mt:4,children:[e.jsx(v,{label:"Please select at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:U,leftIcon:e.jsx(Ke,{}),colorScheme:"red",isDisabled:l.length<1,children:["Deselect ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(v,{label:"Please select at least 1 branch",isDisabled:l.length>0,hasArrow:!0,children:e.jsxs(E,{onClick:q,leftIcon:e.jsx(Fs,{}),colorScheme:"red",isDisabled:l.length<1,children:["Delete ",l.length>0?`${l.length} Branch`:"",l.length>1?"es":""]})}),e.jsx(E,{onClick:I,leftIcon:e.jsx(Is,{boxSize:8}),colorScheme:"green",children:"New Row"})]}),e.jsx(xt,{isAlertOpen:g,onCloseAlert:k,cancelRef:j,removeSelectedRows:K})]})}function as(s){const{data:o,onDiffResult:a}=s,n=t.useCallback(async()=>{try{const r=await window.electron.openTortoiseSVNDiff({fullPath:o["Full Path"],branchFolder:o["Branch Folder"],branchVersion:o["Branch Version"]});a(r)}catch(r){a({success:!1,error:r.message})}},[o,a]);return e.jsx($,{"aria-label":"Diff",size:"sm",icon:e.jsx(Rs,{}),onClick:n,colorScheme:"yellow"})}function rs(){const{config:s}=V(),{emitTrelloCardNamesSearch:o,emitTrelloCardUpdate:a}=ue(),n=s==null?void 0:s.trelloIntegration,r=(n==null?void 0:n.key)||null,i=(n==null?void 0:n.token)||null,l=r&&i&&r.trim()!==""&&i.trim()!==""&&r.toUpperCase()!=="TRELLO_API_KEY"&&i.toUpperCase!=="TRELLO_TOKEN";return{key:r,token:i,isTrelloIntegrationEnabled:l,emitTrelloCardNamesSearch:o,emitTrelloCardUpdate:a}}function jt({isModalOpen:s,closeModal:o}){const{socket:a,setIsCommitMode:n,setSelectedBranchStatuses:r,setShowCommitView:i,socketPayload:l,postCommitData:c,setPostCommitData:d}=V(),{emitUpdateSingle:u,emitCommitPayload:h}=ue(),{key:p,token:x,isTrelloIntegrationEnabled:F,emitTrelloCardUpdate:B}=rs(),{RaiseClientNotificaiton:g}=ne(),[m,j]=t.useState([]),{onCopy:k,value:b,setValue:S,hasCopied:D}=ze(""),{onCopy:z,value:H,setValue:L,hasCopied:N}=ze(""),U=t.useCallback(f=>{f.success?g("TortoiseSVN diff opened successfully","success",3e3):g(`Error opening TortoiseSVN diff: ${JSON.stringify(f.error,null,4)}`,"error",0)},[g]),q=[{title:"Review",description:"Confirm SVN changes"},{title:"Commit",description:"Commit changes"},{title:"Complete",description:"Process Completed"}],{activeStep:I,setActiveStep:O}=Ns({index:1,count:q.length}),W=t.useMemo(()=>({resizable:!1,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),K=t.useMemo(()=>[{field:"Branch Folder"},{field:"Branch Version",sort:"asc"},{field:"File Path",flex:1},{field:"Local Status",headerTooltip:"Working Copy"},{headerName:"Diff",filter:!1,sortable:!1,cellRenderer:as,cellRendererParams:{onDiffResult:U},width:90}],[]),J=t.useCallback((f,R=!0)=>{const Q="​".repeat(7),fe=f.includes("MarkupSupport")?`\r ${Q}`:`\r -`,le=m.sort((_,w)=>_["Branch Version"].localeCompare(w["Branch Version"])).map(_=>{const w=[];h.includes("BranchFolder")&&w.push(_["Branch Folder"]),h.includes("BranchVersion")&&w.push(_["Branch Version"]),h.includes("SVNBranch")&&w.push(_.branchPathFolder);let A=w.join(" ").trim();if(h.includes("IssueNumber")){const me=_.branchIssueNumber;A+=` Issue [${me}]`}const M=_.revision?_.revision:_.errorMessage||"Error";return A+=` Revision [${M}]`,A});return R?le.join(fe):le},[m,l]),ee=t.useCallback(h=>{const R=J(h);S(R)},[J,S]),se=t.useCallback(()=>{z(h=>h-1)},[z]),he=t.useCallback(()=>{if(c.type!=="trello"){g("Trello Autofill is not enabled for this commit","error");return}const h=c.data,R=J(["BranchFolder","BranchVersion","IssueNumber"],!1);k(p,C,h,R),g("Updating Trello card with commit information","info"),u(null)},[c,g,J]),y=t.useCallback(()=>{z(h=>{switch(h){case 1:f(l);case 2:S(""),L("");break;case 3:return B(),g("Updating selected branches! Please wait","info",1500),m.forEach(R=>{d(R.branchId,R["SVN Branch"],R["Branch Version"],R["Branch Folder"])}),n(!1),r([]),i(!1),a(),1}return h+1})},[z,f,l,S,L,B,g,m,d,n,r,i,a]);return t.useEffect(()=>{z(1),j([]),S(""),L("")},[s,j]),t.useEffect(()=>{!s||I!=0||(a(),z(1),j([]),S(""),L(""))},[I,s]),t.useEffect(()=>{!s||I!=3||(g("The commit process has been completed successfully","success",5e3),ee(["BranchFolder","BranchVersion","SVNBranch"]),L(l.commitMessage||""))},[g,I,s,ee]),t.useEffect(()=>{const h=R=>{j(Q=>[...Q,R])};return o==null||o.on("svn-commit-status-live",h),()=>o==null?void 0:o.off("svn-commit-status-live",h)},[o]),t.useEffect(()=>{if(I!=2)return;const h=setTimeout(()=>{m.length>0&&m[0].bulkCommitLength==m.length&&z(3)},3e3);return()=>clearTimeout(h)},[I,m]),t.useEffect(()=>{(v||N)&&g("Copied to Clipboard","success",1500)},[v,N,g]),!s||!l?e.jsx(e.Fragment,{}):e.jsxs(Ke,{isOpen:s,onClose:a,isCentered:!0,motionPreset:"slideInBottom",scrollBehavior:"inside",size:"xl",closeOnOverlayClick:I==1,children:[e.jsx(pe,{}),e.jsxs(Je,{maxH:"85%",maxW:"95%",children:[e.jsxs(Ce,{display:"flex",justifyContent:"space-between",maxWidth:I==1?"94%":"100%",children:[e.jsx(Z,{as:"h2",size:"lg",children:"Commit Selected Files"}),e.jsx(Rs,{index:I-1,mb:0,size:"sm",colorScheme:"yellow",children:q.map((h,R)=>e.jsxs(Ns,{children:[e.jsx(Ts,{children:e.jsx(Ms,{complete:e.jsx(As,{}),incomplete:e.jsx(Oe,{}),active:e.jsx(Oe,{})})}),e.jsx(b,{flexShrink:"0",children:e.jsx(Ls,{children:h.title})}),e.jsx(Vs,{})]},R))})]}),I==1?e.jsx(ke,{size:"lg",py:6}):e.jsx(e.Fragment,{}),e.jsx(we,{children:e.jsxs(b,{children:[I!=1?e.jsx(e.Fragment,{}):e.jsxs(b,{children:[e.jsxs(b,{mb:4,children:[e.jsx(P,{fontWeight:600,children:"Please confirm that the following information is correct before proceeding to commit your files:"}),e.jsxs(Ie,{spacing:3,children:[e.jsxs(ae,{children:[e.jsx(oe,{as:re,color:"yellow.500"}),"Source Branch: ",e.jsx(te,{children:De(l.sourceBranch["Branch Folder"],l.sourceBranch["Branch Version"],l.sourceBranch["SVN Branch"])})]}),e.jsxs(ae,{children:[e.jsx(oe,{as:re,color:"yellow.500"}),"Issue Numbers: ",e.jsx(te,{children:Object.entries(l.issueNumber).map(h=>`${h[1]} (${h[0]})`).join(", ")})]}),e.jsxs(ae,{children:[e.jsx(oe,{as:re,color:"yellow.500"}),"Commit Message: ",e.jsx(te,{children:l.commitMessage})]}),e.jsxs(ae,{children:[e.jsx(oe,{as:re,color:"yellow.500"}),"Example:"," ",e.jsxs(te,{children:["Issue ",l.issueNumber[l.sourceBranch["Branch Folder"]]," (",l.sourceBranch["Branch Folder"]," ",l.sourceBranch["Branch Version"],"): ",l.commitMessage]})]})]})]}),e.jsx(b,{children:e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"350px",width:"100%"},children:e.jsx(de,{rowData:l.filesToProcess,defaultColDef:W,columnDefs:Y,domLayout:"normal",columnMenu:"new",pagination:!0,paginationAutoPageSize:!0})})})]}),I!=2?e.jsx(e.Fragment,{}):e.jsxs(b,{children:[e.jsxs(P,{fontWeight:600,children:["Please wait while the files are being committed to the SVN repository.",e.jsx("br",{}),"Current live status of the commit process:"]}),e.jsx(b,{children:e.jsx(Ie,{spacing:3,children:m.map((h,R)=>e.jsxs(ae,{children:[e.jsx(oe,{as:h.errorMessage?Es:re,color:h.errorMessage?"red.500":"yellow.500"}),h.branchString,": ",e.jsx(te,{children:h.errorMessage||h.revision})]},R))})})]}),I!=3?e.jsx(e.Fragment,{}):e.jsxs(b,{children:[e.jsx(b,{mb:4,children:e.jsxs(P,{fontWeight:600,children:["The commit process has been completed successfully.",e.jsx("br",{}),"Please find your revisions here for view and copy:"]})}),e.jsxs(T,{columnGap:10,alignItems:"center",children:[e.jsxs(b,{children:[e.jsx(Z,{as:"h3",size:"md",children:"SVN Revisions"}),e.jsx(b,{children:e.jsx("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"},children:x})})]}),e.jsx(b,{children:e.jsx(D,{hasArrow:!0,label:"Copy to clipboard",children:e.jsx(H,{"aria-label":"Copy To Clipboard",onClick:B,icon:e.jsx(Fe,{}),colorScheme:"yellow"})})})]}),e.jsxs(b,{my:4,children:[e.jsx(P,{fontWeight:600,children:"Modify the clipboard text to include..."}),e.jsx(Xe,{colorScheme:"yellow",defaultValue:["BranchFolder","BranchVersion"],onChange:ee,children:e.jsxs(Ae,{children:[e.jsx(X,{value:"BranchFolder",children:"Branch Folder"}),e.jsx(X,{value:"BranchVersion",children:"Branch Version"}),e.jsx(X,{value:"SVNBranch",children:"SVN Branch"}),e.jsx(X,{value:"IssueNumber",children:"Issue Number"}),e.jsx(X,{value:"MarkupSupport",children:"Markup Support"})]})})]}),e.jsxs(T,{columnGap:10,alignItems:"center",children:[e.jsxs(b,{children:[e.jsx(P,{fontWeight:600,children:"Here is your SVN commit message for the source branch:"}),l.sourceBranch&&l.sourceBranch["Branch Folder"]&&l.sourceBranch["Branch Version"]?e.jsx(te,{children:`Issue ${l.issueNumber[l.sourceBranch["Branch Folder"]]} (${l.sourceBranch["Branch Folder"]} ${l.sourceBranch["Branch Version"]}): ${$}`}):e.jsx(te,{children:"Source information is undefined. Please check that you have entered the correct details otherwise contact the developer!"})]}),e.jsx(D,{hasArrow:!0,label:"Copy to clipboard",children:e.jsx(H,{"aria-label":"Copy To Clipboard",onClick:O,icon:e.jsx(Fe,{}),colorScheme:"yellow"})})]})]})]})}),e.jsx(ye,{children:e.jsxs(T,{flex:1,justifyContent:"space-between",children:[e.jsx(T,{columnGap:2,children:e.jsx(D,{hasArrow:!0,label:"Cannot undo the commit currently",isDisabled:I<2,children:e.jsx(E,{onClick:se,mr:3,isDisabled:I>=2,children:I==1?"Cancel":"Previous"})})}),e.jsxs(T,{columnGap:2,children:[e.jsx(D,{hasArrow:!0,label:"Requires Trello Autofill",isDisabled:(c==null?void 0:c.type)==="trello"&&F,children:e.jsx(E,{colorScheme:"yellow",leftIcon:e.jsx(K,{as:Ps}),onClick:he,isDisabled:I<3||(c==null?void 0:c.type)!="trello"||!F,children:"Update Card"})}),e.jsx(D,{hasArrow:!0,label:"Cannot undo the commit currently",isDisabled:I!=2,children:e.jsx(E,{colorScheme:"yellow",onClick:y,isDisabled:I==2,children:I==q.length?"Complete":"Next"})})]})]})})]})]})}function wt({fileUpdates:s}){return e.jsx(b,{children:Object.keys(s).length>0?e.jsxs(b,{children:[e.jsx(P,{mb:4,children:"Below are the list of files which have been changed on your machine but there exists a newer version of them in the repository:"}),e.jsx(b,{maxHeight:"200px",overflowY:"auto",children:e.jsxs(Os,{children:[e.jsx(zs,{children:e.jsxs(ze,{children:[e.jsx(je,{children:"Branch"}),e.jsx(je,{children:"Path"}),e.jsx(je,{children:e.jsx(D,{label:"Working Copy",hasArrow:!0,children:"Local Status"})}),e.jsx(je,{children:e.jsx(D,{label:"Repository",hasArrow:!0,children:"Remote Status"})})]})}),e.jsx(Us,{children:Object.keys(s).map(a=>e.jsx(Me.Fragment,{children:s[a].map((o,n)=>e.jsxs(ze,{children:[e.jsx(Se,{children:a}),e.jsx(Se,{children:o.pathDisplay}),e.jsx(Se,{children:o.wcStatus}),e.jsx(Se,{children:o.reposStatus})]},n))},a))})]})}),e.jsx(P,{mt:4,children:"If you wish to commit these files, please update the associated branches!"})]}):e.jsx(b,{children:e.jsx(P,{children:"Your selected branches do not contain any changed files for which a newer version exists in the repository."})})})}function jt({rowDataLocalChanges:s,setRowDataLocalChanges:a,defaultColDefsCommit:o}){const{localChangesGridRef:n,isDebug:r,selectedBranches:i,showCommitView:l,setSelectedLocalChanges:c,selectedLocalChanges:u}=V(),{emitFilesRevert:d}=ue(),{RaiseClientNotificaiton:f}=ne(),[p,C]=t.useState(""),F=t.useCallback(()=>{d(u)},[d,u]),k=t.useCallback(B=>{C(B.target.value)},[C]),g=t.useCallback(B=>{var v,O,$,L;if(console.debug("PanelLocalChanges.jsx: onFileViewSelectionChanged - event",B),String(B==null?void 0:B.source).toLowerCase().includes("api"))return;let x=(O=(v=n==null?void 0:n.current)==null?void 0:v.api)==null?void 0:O.getSelectedNodes().map(N=>N.data);r&&console.debug("PanelLocalChanges.jsx: onFileViewSelectionChanged - selectedBranches",x);const S=x.filter(N=>N["Local Status"].toLowerCase()==="added");(L=($=n==null?void 0:n.current)==null?void 0:$.api)==null||L.forEachNode(N=>{S.some(q=>q["File Path"].includes(N.data["File Path"])&&q["File Path"]!==N.data["File Path"])&&N.data["Local Status"].toLowerCase()==="added"&&!N.isSelected()&&(N.setSelected(!0),x.push(N.data),console.debug("PanelLocalChanges.jsx (onFileViewSelectionChanged): Adding ancestor node: ",N))}),c(x)},[n,r,c]),m=t.useCallback(B=>{B.success?f("TortoiseSVN diff opened successfully","success",3e3):f(`Error opening TortoiseSVN diff: ${JSON.stringify(B.error,null,4)}`,"error",0)},[f]),j=t.useMemo(()=>[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"Branch Folder"},{field:"Branch Version",sort:"asc",sortIndex:0},{field:"File Path",flex:1,sort:"asc",sortIndex:2},{field:"Local Status",headerTooltip:"Working Copy",sort:"asc",sortIndex:1},{headerName:"Diff",filter:!1,sortable:!1,resizable:!1,cellRenderer:as,cellRendererParams:{onDiffResult:m},width:90}],[]);return t.useEffect(()=>{i.length<1||l||(C(""),a([]),c([]))},[i,l]),e.jsx(b,{children:s.length>0?e.jsxs(b,{children:[e.jsxs(T,{mb:4,alignItems:"center",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:k,width:"100%"})]}),e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"480px",width:"100%"},children:e.jsx(de,{ref:n,rowData:s,defaultColDef:o,columnDefs:j,onSelectionChanged:g,quickFilterText:p,domLayout:"normal",rowSelection:"multiple",suppressRowClickSelection:!0,rowMultiSelectWithClick:!0,animateRows:!0,columnMenu:"new",enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationAutoPageSize:!0})}),e.jsx(T,{mt:4,columnGap:2,justifyContent:"flex-end",children:e.jsx(D,{label:"Requires you to select at least 1 file",hasArrow:!0,isDisabled:u.length>0,children:e.jsx(E,{onClick:F,colorScheme:"red",isDisabled:u.length<1,children:"Revert Selected"})})})]}):e.jsx(b,{children:e.jsx(P,{children:"Your selected branches do not contain any files to commit."})})})}function St({rowDataUntrackedChanges:s,setRowDataUntrackedChanges:a,defaultColDefsCommit:o}){const{untrackedChangesGridRef:n,selectedUntrackedChanges:r,setSelectedUntrackedChanges:i,isDebug:l,selectedBranches:c,showCommitView:u}=V(),{emitFilesAddRemove:d,emitFilesRevert:f}=ue(),[p,C]=t.useState(""),F=t.useCallback(B=>{C(B.target.value)},[C]),k=t.useCallback(()=>{var x,S;const B=(S=(x=n==null?void 0:n.current)==null?void 0:x.api)==null?void 0:S.getSelectedNodes().map(v=>v.data);l&&console.debug("PanelUntrackedChanges.jsx (onUnseenFilesSelectionChanged): selectedBranches",B),i(B)},[n,l]),g=t.useCallback(()=>{d(r)},[d,r]),m=t.useCallback(()=>{f(r)},[f,r]),j=t.useMemo(()=>[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"Branch Folder"},{field:"Branch Version",sort:"asc",sortIndex:0},{field:"File Path",flex:1,sort:"asc",sortIndex:1},{field:"Local Status",headerTooltip:"Working Copy"}],[]);return t.useEffect(()=>{c.length<1||u||(C(""),a([]),i([]))},[c,u]),e.jsx(b,{children:s.length>0?e.jsxs(b,{children:[e.jsx(P,{mb:4,children:"Below are the list of files which are either unversioned or missing in the repository:"}),e.jsxs(T,{mb:4,alignItems:"center",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:F,width:"100%"})]}),e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"390px",width:"100%"},children:e.jsx(de,{ref:n,rowData:s,defaultColDef:o,columnDefs:j,onSelectionChanged:k,quickFilterText:p,domLayout:"normal",rowSelection:"multiple",rowMultiSelectWithClick:!0,animateRows:!0,columnMenu:"new",enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationAutoPageSize:!0})}),e.jsxs(T,{mt:4,columnGap:2,justifyContent:"flex-end",children:[e.jsx(D,{label:"Requires you to select at least 1 file",hasArrow:!0,isDisabled:r.length>0,children:e.jsxs(E,{onClick:g,colorScheme:"green",isDisabled:r.length<1,children:["Add/Remove ",r.length," File",r.length>1?"s":""]})}),e.jsx(D,{label:"Requires you to select at least 1 file",hasArrow:!0,isDisabled:r.length>0,children:e.jsxs(E,{onClick:m,colorScheme:"red",isDisabled:r.length<1,children:["Revert ",r.length," File",r.length>1?"s":""]})})]})]}):e.jsx(b,{children:e.jsx(P,{children:"Your selected branches do not contain any unversioned or missing files."})})})}function Le(){const{config:s}=V();return s&&s.commitOptions?s.commitOptions:null}function We({branchFolder:s}){const{issueNumber:a,setIssueNumber:o,selectedBranches:n}=V(),r=Le(),i=t.useCallback(u=>{const d=String(u.target.value||"").trim();/^\d*$/.test(d)&&o(f=>({...f,[s]:d}))},[s,o]),l=!s,c=!s||!(r!=null&&r.useIssuePerFolder)?!0:n==null?void 0:n.map(u=>u["Branch Folder"]).includes(s);return t.useEffect(()=>(s&&o(u=>({...u,[s]:""})),()=>{s&&Object.keys(a).includes(s)&&o(u=>G.omit(u,[s]))}),[s,o]),e.jsx(D,{label:"Please select source branch first!",isDisabled:!l,hasArrow:!0,children:e.jsxs(Re,{isDisabled:l,isRequired:c,children:[e.jsx(Ne,{children:s?`Issue Number For ${s}`:"Issue Number"}),e.jsx(ie,{value:a[s]||"",onInput:i,placeholder:"Enter number"})]},s)})}function rs(){const{configurableRowData:s,sourceBranch:a,selectedBranches:o}=V(),n=t.useCallback(c=>s&&s.length>0?s.find(u=>u.id==c)["Branch Folder"]:"",[s]),r=t.useMemo(()=>{if(!(a!=null&&a.value))return[];const c=n(a.value);return[...new Set(o.filter(u=>u["Branch Folder"]!==c).map(u=>u["Branch Folder"]))]},[a,o,n]),i=t.useCallback(c=>s&&s.length>0?s.find(u=>u.id==c)["Branch Version"]:"",[s]),l=t.useCallback(c=>s&&s.length>0?s.find(u=>u.id==c)["SVN Branch"]:"",[s]);return{getBranchFolderById:n,selectedBranchFolders:r,getBranchVersionById:i,getSvnBranchById:l}}function yt({openMessageAutoFillModal:s}){const{sourceBranch:a,setSourceBranch:o,branchOptions:n,setIssueNumber:r,commitMessage:i,setCommitMessage:l,isCommitMode:c,selectedBranches:u}=V(),d=Le(),{getBranchFolderById:f,selectedBranchFolders:p}=rs(),C=t.useCallback(k=>{o(k)},[o]),F=t.useCallback(k=>{l(String(k.target.value).replace(/["`]/g,"'"))},[l]);return t.useEffect(()=>{c&&(o(null),r({}))},[c]),t.useEffect(()=>{d!=null&&d.reusePreviousCommitMessage||l("")},[d==null?void 0:d.reusePreviousCommitMessage,l,c]),t.useEffect(()=>{r(k=>Object.fromEntries(Object.entries(k).filter(([g])=>u.some(m=>m["Branch Folder"]===g))))},[u]),e.jsx(b,{children:e.jsxs(T,{columnGap:3,children:[e.jsxs(b,{flexGrow:1,children:[e.jsxs(T,{columnGap:2,mb:2,children:[e.jsx(b,{width:"50%",children:e.jsxs(Re,{isRequired:!0,children:[e.jsx(Ne,{children:"Source Branch"}),e.jsx(Ws,{value:a,onChange:C,options:n,placeholder:"SVN Branch you're commiting from",selectedOptionStyle:"check",selectedOptionColorScheme:"yellow",isClearable:!0,classNamePrefix:"chakra-react-select"})]})}),e.jsx(T,{width:"50%",alignItems:"flex-end",columnGap:2,children:e.jsx(We,{branchFolder:a&&a.value?f(a.value):null})})]}),e.jsxs(T,{columnGap:2,height:"auto",children:[e.jsxs(Re,{width:d!=null&&d.useIssuePerFolder?"50%":"100%",isRequired:!0,children:[e.jsx(Ne,{children:"Commit Message"}),e.jsx(Hs,{placeholder:"Enter Commit Message",height:"76%",resize:"none",onInput:F,value:i})]}),d!=null&&d.useIssuePerFolder?a!=null&&a.value?e.jsx(T,{width:"50%",flexDir:"column",rowGap:2,children:p.map(k=>e.jsx(We,{branchFolder:k},k))}):e.jsx(b,{width:"50%",textAlign:"center",m:"auto",children:e.jsx(P,{fontSize:"lg",fontWeight:"600",color:"yellow.500",children:"Please select source branch first!"})}):null]})]}),e.jsx(b,{pt:8,children:e.jsx(D,{label:a!=null&&a.value?"Auto Fill Message":"Please select source branch first!",hasArrow:!0,placement:"bottom-end",children:e.jsx(H,{colorScheme:"yellow","aria-label":"Auto Fill Message",size:"md",onClick:()=>s(),icon:e.jsx(Ze,{}),isDisabled:!(a!=null&&a.value)})})})]})})}function Bt({openCommitModal:s}){const{setShowCommitView:a,selectedLocalChanges:o,sourceBranch:n,issueNumber:r,commitMessage:i,setSocketPayload:l,configurableRowData:c,selectedBranches:u}=V(),{RaiseClientNotificaiton:d}=ne(),f=Le(),{selectedBranchFolders:p}=rs(),C=t.useCallback(()=>{a(!1)},[a]),F=t.useCallback(()=>{if(!n||n.value===""){d("Please select the source branch to proceed!","error");return}const k=c.find(j=>j.id==n.value),g=f!=null&&f.useIssuePerFolder?p.every(j=>r[j]&&r[j]!==""):!0,m=f!=null&&f.useIssuePerFolder&&!u.some(j=>j["Branch Folder"]===k["Branch Folder"])||r[k["Branch Folder"]];if(!r||G.isEmpty(r)||!g||!m){d("Please provide the issue number to proceed!","error");return}if(!i||i.trim()===""){d("Please provide the commit message to proceed!","error");return}l({sourceBranch:k,issueNumber:r,commitMessage:i,filesToProcess:o,commitOptions:f}),s()},[d,n,c,f,p,r,u,i,o]);return e.jsx(b,{children:e.jsxs(T,{columnGap:2,justifyContent:"center",children:[e.jsx(E,{onClick:C,leftIcon:e.jsx(Be,{}),colorScheme:"yellow",children:"Refresh Process"}),e.jsx(D,{label:"Select at least 1 file",hasArrow:!0,isDisabled:o.length>0,children:e.jsxs(E,{onClick:F,leftIcon:e.jsx(K,{as:Qe}),colorScheme:"yellow",isDisabled:o.length<1,children:["Commit ",o.length>0?`${o.length} File`:"",o.length>1?"s":""]})})]})})}function kt(){const{selectedBranches:s,logData:a,setLogData:o}=V(),[n,r]=t.useState([]),[i,l]=t.useState(""),c=t.useCallback(f=>{l(f.target.value)},[l]),u=t.useCallback(()=>{o([])},[o]),d=a.length===s.length;return t.useEffect(()=>{if(a.length===0)return;const f=a.map(p=>p.logs).flat();r(p=>G.isEqual(p,f)?p:f)},[a]),{rowDataLogs:n,quickFilterLogsText:i,setQuickFilterLogsText:l,onQuickFilterLogsInputChanged:c,refreshLogs:u,areLogsFetched:d}}function Dt({rowDataLogs:s,quickFilterLogsText:a,setAutoFillSelection:o=null,isAutofill:n=!1}){const r=t.useMemo(()=>({sortable:!0,resizable:!1,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),i=t.useMemo(()=>{const u=[{field:"revision",headerName:"Revision",sort:"desc",width:130},{field:"date",headerName:"Date",sortable:!1},{field:"branchFolder",headerName:"Branch Folder",width:135},{field:"branchVersion",headerName:"Branch Version",width:125},{field:"author",headerName:"Author"},{field:"message",headerName:"Message",flex:1}];return n?[{checkboxSelection:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},...u]:u},[n]),l=t.useRef(null),c=t.useCallback(()=>{var u,d;if(o){const f=(d=(u=l==null?void 0:l.current)==null?void 0:u.api)==null?void 0:d.getSelectedNodes().map(p=>p.data);o(f[0]||null)}},[o]);return e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:n?"90%":"85%",width:"100%"},children:e.jsx(de,{ref:l,rowData:s,defaultColDef:r,columnDefs:i,onSelectionChanged:c,quickFilterText:a,domLayout:"normal",columnMenu:"new",rowSelection:"single",suppressRowClickSelection:!n,animateRows:!1,immutableData:!0,suppressFlash:!0,enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationAutoPageSize:!0})})}function is({setAutoFillSelection:s=!1,isAutofill:a=!1}){const{selectedBranches:o,logData:n}=V(),{rowDataLogs:r,quickFilterLogsText:i,onQuickFilterLogsInputChanged:l,refreshLogs:c,areLogsFetched:u}=kt();return u?e.jsxs(b,{h:"100%",children:[e.jsxs(T,{mb:4,width:"100%",alignItems:"center",columnGap:4,children:[e.jsxs(T,{alignItems:"center",width:"100%",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:l,width:"100%"})]}),e.jsx(b,{children:e.jsx(D,{label:"Refresh",hasArrow:!0,children:e.jsx(H,{onClick:c,icon:e.jsx(Be,{}),colorScheme:"yellow","aria-label":"Refresh"})})})]}),e.jsx(Dt,{rowDataLogs:r,quickFilterLogsText:i,setAutoFillSelection:s,isAutofill:a})]}):e.jsxs(b,{children:[e.jsxs(b,{mb:4,children:[e.jsx(P,{fontWeight:600,children:"Showing SVN Log for the following branches:"}),e.jsx(Ie,{spacing:3,children:o.map(d=>{const f=n.find(p=>p.id===d.id);return e.jsxs(ae,{display:"flex",alignItems:"center",children:[e.jsx(oe,{w:30,h:30,as:f?re:$s,color:"yellow.500"}),De(d["Branch Folder"],d["Branch Version"],d["SVN Branch"])]},d.branchId)})})]}),e.jsx(T,{justifyContent:"center",children:e.jsx(qs,{value:n.length/o.length*360,color:"yellow.300",size:"100px",children:e.jsxs(_s,{children:[n.length," / ",o.length]})})})]})}function vt(s){const{data:a}=s,o=async()=>{window.open(a.url,"_blank")};return e.jsx(H,{"aria-label":"Diff",size:"sm",icon:e.jsx(Gs,{}),onClick:o,colorScheme:"yellow"})}function Ft({rowDataTrello:s,quickFilterTrelloText:a,setAutoFillSelection:o}){const n=t.useMemo(()=>({sortable:!0,resizable:!1,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),r=t.useMemo(()=>[{checkboxSelection:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"name",headerName:"Name",flex:1},{field:"lastActivityDate",headerName:"Last Activity Date"},{field:"url",headerName:"Goto Trello",filter:!1,sortable:!1,resizable:!1,cellRenderer:vt,width:120}],[]),i=t.useRef(null),l=t.useCallback(()=>{var u,d;const c=(d=(u=i==null?void 0:i.current)==null?void 0:u.api)==null?void 0:d.getSelectedNodes().map(f=>f.data);o(c[0]||null)},[o]);return e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"80%",width:"100%"},children:e.jsx(de,{ref:i,rowData:s,defaultColDef:n,columnDefs:r,onSelectionChanged:l,quickFilterText:a,domLayout:"normal",columnMenu:"new",rowSelection:"single",suppressRowClickSelection:!1,animateRows:!1,enableCellTextSelection:!0,pagination:!0,paginationAutoPageSize:!0})})}function It({setAutoFillSelection:s}){const{socket:a}=V(),{key:o,token:n,isTrelloIntegrationEnabled:r,emitTrelloCardNamesSearch:i}=os(),[l,c]=t.useState(""),[u,d]=t.useState(""),[f,p]=t.useState([]),C=t.useCallback(G.debounce(m=>{m.trim()!==""&&i(o,n,m)},400),[o,n,i]),F=t.useCallback(m=>{c(String(m.target.value).trim())},[c]),k=t.useCallback(()=>{l.trim()!==""&&i(o,n,l)},[l,o,n,i]),g=t.useCallback(m=>{d(m.target.value)},[]);return t.useEffect(()=>(C(l),()=>C.cancel()),[l,C]),t.useEffect(()=>{const m=j=>{p(j&&j.length>0?j:[])};return a==null||a.on("trello-result-search-names-card",m),()=>a==null?void 0:a.off("trello-result-search-names-card",m)},[a]),r?e.jsxs(b,{h:"100%",children:[e.jsxs(T,{mb:4,width:"100%",alignItems:"center",columnGap:4,children:[e.jsxs(T,{alignItems:"center",width:"100%",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Trello Query:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:F,width:"100%"})]}),e.jsx(b,{children:e.jsx(D,{label:"Resubmit Query",hasArrow:!0,children:e.jsx(H,{onClick:k,icon:e.jsx(Be,{}),colorScheme:"yellow","aria-label":"Resubmit"})})})]}),e.jsx(T,{mb:4,width:"100%",alignItems:"center",columnGap:4,children:e.jsxs(T,{alignItems:"center",width:"100%",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:g,width:"100%"})]})}),e.jsx(Ft,{rowDataTrello:f,quickFilterTrelloText:u,setAutoFillSelection:s})]}):e.jsx(b,{h:"100%",p:4,children:e.jsxs(P,{fontSize:"lg",fontWeight:"600",color:"red.500",children:["You need to"," ",e.jsxs(qe,{href:"https://help.merge.dev/en/articles/8757597-trello-how-do-i-link-my-account",isExternal:!0,color:"yellow.500",children:["set up Trello Integration ",e.jsx(Ze,{mx:"2px"})]})," ","in the configuration file to use this feature."]})})}function Rt({isModalOpen:s,closeModal:a}){const{setIssueNumber:o,setCommitMessage:n,setPostCommitData:r}=V(),[i,l]=t.useState(0),[c,u]=t.useState([null,null]),[d,f]=t.useState(!0),p=t.useCallback(g=>{l(g),u(g===0?m=>[m[0],null]:m=>[null,m[1]])},[l]),C=t.useCallback(g=>{u(m=>[g,...m.slice(1)])},[u]),F=t.useCallback(g=>{u(m=>[m[0],g])},[u]),k=t.useCallback(()=>{console.debug("Selected tab index:",i),console.debug("Selected autofill selection:",JSON.stringify(c,null,4));let g=c[i];if(i===0){const m=g.message,j=m.match(/\s*(Issue)*\s*(\d+)\s*/),B=j?j[2]:null,x=m.replace(/\s*(Issue)*\s*(\d+)?\s*(\([^\)]+\))*\s?:?\s*/,"");B&&o(S=>Object.fromEntries(Object.keys(S).map(v=>[v,B]))),x.trim()!==""&&n(x)}else{const m=g.name,j=m.match(/\s*(Issue)*\s*(\d+)\s*/),B=j?j[2]:null,x=m.replace(/\s*(Issue)*\s*(\d+)/,"");B&&o(S=>Object.fromEntries(Object.keys(S).map(v=>[v,B]))),x.trim()!==""&&n(x),r({type:"trello",data:g})}a()},[i,c,o,n,r,a]);return t.useEffect(()=>{f(!(c.length==2&&(c[0]||c[1])))},[c]),t.useEffect(()=>{u([null,null]),l(0)},[s]),e.jsxs(Ke,{isOpen:s,onClose:a,isCentered:!0,motionPreset:"slideInBottom",scrollBehavior:"inside",size:"xl",closeOnOverlayClick:!0,children:[e.jsx(pe,{}),e.jsxs(Je,{maxH:"95%",maxW:"95%",children:[e.jsx(Ce,{children:e.jsx(Z,{as:"h2",size:"lg",children:"Autofill Commit Message"})}),e.jsx(ke,{size:"lg"}),e.jsx(we,{children:e.jsx(b,{height:"70vh",children:e.jsxs(es,{variant:"solid-rounded",colorScheme:"yellow",defaultIndex:0,isLazy:!0,h:"100%",onChange:g=>p(g),children:[e.jsxs(ss,{children:[e.jsx(xe,{children:"SVN Logs"}),e.jsx(xe,{children:"Trello"})]}),e.jsxs(ts,{h:"90%",children:[e.jsx(be,{px:0,pb:0,h:"100%",children:e.jsx(is,{setAutoFillSelection:C,isAutofill:!0})}),e.jsx(be,{px:0,pb:0,h:"100%",children:e.jsx(It,{setAutoFillSelection:F})})]})]})})}),e.jsxs(ye,{children:[e.jsx(E,{mr:3,onClick:()=>a(),children:"Cancel"}),e.jsx(D,{hasArrow:!0,label:"Please select exactly one row!",placement:"top-start",isDisabled:!d,children:e.jsx(E,{colorScheme:"yellow",onClick:k,isDisabled:d,children:"Select"})})]})]})]})}function Nt(){const{config:s,updateConfig:a,setSourceBranch:o,setIssueNumber:n}=V(),[r,i]=t.useState({}),l=t.useCallback((c,u)=>{i(d=>({...d,[c]:u}))},[i]);return t.useEffect(()=>{!s||G.isEmpty(s)||(s.commitOptions?i(s.commitOptions):a(c=>({...c,commitOptions:{useFolderOnlySource:!1,useIssuePerFolder:!1,reusePreviousCommitMessage:!1}})))},[s]),t.useEffect(()=>{G.isEmpty(r)||a(c=>G.isEqual(c.commitOptions,r)?c:{...c,commitOptions:r})},[r]),t.useEffect(()=>{o(null)},[r==null?void 0:r.useFolderOnlySource,o]),t.useEffect(()=>{n({})},[r==null?void 0:r.useIssuePerFolder,n]),e.jsxs(b,{mb:4,children:[e.jsx(Z,{as:"h6",size:"sm",children:"Commit Options"}),e.jsx(Xe,{colorScheme:"yellow",children:e.jsxs(Qs,{direction:"row",spacing:4,mt:2,children:[e.jsx(X,{isChecked:r.useFolderOnlySource,onChange:c=>l("useFolderOnlySource",c.target.checked),children:e.jsx(D,{label:"Removes extra branch details from source branch.",hasArrow:!0,placement:"bottom-start",children:"Use Folder Only Source Branch?"})}),e.jsx(X,{isChecked:r.useIssuePerFolder,onChange:c=>l("useIssuePerFolder",c.target.checked),children:e.jsx(D,{label:"Allows users to input issue number for each branch folder.",hasArrow:!0,placement:"bottom-start",children:"Use 1 Issue Per Folder?"})}),e.jsx(X,{isChecked:r.reusePreviousCommitMessage,onChange:c=>l("reusePreviousCommitMessage",c.target.checked),children:e.jsx(D,{label:"Reuses the commit message from the previous commit made in Titan.",hasArrow:!0,children:"Reuse Previous Commit Message?"})})]})})]})}function Tt(){const{isDebug:s,setIsCommitMode:a,selectedBranchStatuses:o,showCommitView:n,setShowCommitView:r,selectedBranches:i,configurableRowData:l}=V(),[c,u]=t.useState({}),[d,f]=t.useState([]),[p,C]=t.useState([]),{isOpen:F,onOpen:k,onClose:g}=Te(),{isOpen:m,onOpen:j,onClose:B}=Te(),x=t.useMemo(()=>({resizable:!0,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]);t.useEffect(()=>{if(i.length<1||n){i.length<1&&a(!1);return}u({})},[i,n]),t.useEffect(()=>{s&&(console.debug("Branch Status Rows:",o),console.debug("Selected Rows:",i))},[s,o,i]),t.useEffect(()=>{o.length===i.length&&(o.forEach(L=>{let N=L.id,U=L.status.filesToCommit,q=L.status.filesToUpdate;const I=l.find(z=>z.id===N);if(q.length>0){const z=De(I["Branch Folder"],I["Branch Version"],I["SVN Branch"]);u(W=>({...W,[z]:[...W[z]||[],...q]}))}if(U.length>0){const z=U.map(W=>({branchId:N,"Branch Folder":I["Branch Folder"],"Branch Version":I["Branch Version"],"SVN Branch":I["SVN Branch"],"Full Path":W.path,"File Path":`${ct(L.status.branch)}\\${W.pathDisplay}`,"Local Status":W.wcStatus}));f(W=>[...W,...z.filter(Y=>!["unversioned","missing"].includes(Y["Local Status"]))]),C(W=>[...W,...z.filter(Y=>["unversioned","missing"].includes(Y["Local Status"]))])}}),r(!0))},[o,i,l]);const S=Object.keys(c).length>0,v=d.length>0,O=p.length>0,$=S||v||O;return e.jsxs(b,{children:[e.jsx(Nt,{}),e.jsx(b,{mb:6,children:e.jsx(yt,{openMessageAutoFillModal:j})}),e.jsx(Ys,{isLoaded:n&&$,startColor:"yelow.500",endColor:"yellow.500",children:e.jsxs(es,{variant:"solid-rounded",colorScheme:"yellow",defaultIndex:S?0:v?1:2,isLazy:!1,children:[e.jsxs(ss,{children:[e.jsx(xe,{isDisabled:!S,children:e.jsx(D,{label:"No files to update!",hasArrow:!0,isDisabled:S,children:"Files to Update"})}),e.jsx(xe,{isDisabled:!v,children:e.jsx(D,{label:"No files to commit!",hasArrow:!0,isDisabled:v,children:"Local Changes"})}),e.jsx(xe,{isDisabled:!O,children:e.jsx(D,{label:"No unversioned/missing files!",hasArrow:!0,isDisabled:O,children:"Untracked Changes"})})]}),e.jsxs(ts,{children:[e.jsx(be,{px:0,children:e.jsx(wt,{fileUpdates:c})}),e.jsx(be,{px:0,children:e.jsx(jt,{rowDataLocalChanges:d,setRowDataLocalChanges:f,defaultColDefsCommit:x})}),e.jsx(be,{px:0,children:e.jsx(St,{rowDataUntrackedChanges:p,setRowDataUntrackedChanges:C,defaultColDefsCommit:x})})]})]})}),n&&!$?e.jsxs(P,{mt:4,className:"animation-pulse",fontWeight:600,textAlign:"center",children:["No changes have been spotted!",e.jsx("br",{}),"Please use the refresh button 👇 if you have recently made a change"]}):e.jsx(e.Fragment,{}),e.jsx(b,{mt:6,children:e.jsx(Bt,{openCommitModal:k})}),e.jsx(Ct,{isModalOpen:F,closeModal:g}),e.jsx(Rt,{isModalOpen:m,closeModal:B})]})}function Mt(){const{showSelectedBranchesLog:s,setShowSelectedBranchesLog:a}=V();return e.jsxs(Ks,{isOpen:s,onClose:()=>a(!1),placement:"left",size:"full",children:[e.jsx(pe,{}),e.jsxs(Js,{children:[e.jsx(ke,{size:"lg"}),e.jsx(Ce,{children:"Selected Branches: SVN Log"}),e.jsx(we,{children:e.jsx(b,{height:"100%",children:e.jsx(is,{})})})]})]})}function At(){const{toast:s,RaiseClientNotificaiton:a}=ne(),{isOpen:o,onOpen:n,onClose:r}=Te(),i=t.useRef(),[l,c]=t.useState(!1);t.useEffect(()=>{if(!window.electron){a("Electron context is not available. Updates cannot be checked.","warning",5e3);return}return window.electron.on("update-available",()=>{s.closeAll(),n()}),window.electron.on("update-error",f=>{a(`An error occurred while checking for updates: ${f}`,"error",5e3),c(!1)}),()=>{window.electron.removeAllListeners("update-available"),window.electron.removeAllListeners("update-error")}},[s,n]);const u=t.useCallback(()=>{r(),a("You may update the application later by manually triggering an update check or wait until Titan does this","info",5e3)},[r,a]),d=t.useCallback(()=>{if(l){a("Update is already in progress. Please wait.","info",5e3);return}window.electron?(c(!0),window.electron.downloadUpdate().catch(f=>{c(!1),a(`An error occurred while downloading the update: ${f}`,"error",5e3)}),window.electron.on("update-downloaded",()=>{a("Update has been downloaded successfully. Titan will now restart to apply the update.","info",5e3),window.electron.removeAllListeners("update-downloaded"),r()}),window.electron.on("update-not-available",()=>{a("Titan is up to date","info",3e3),window.electron.removeAllListeners("update-not-available"),c(!1),r()})):a("Cannot update Titan in a non-desktop application environment","error",5e3)},[l,a,c,r]);return e.jsx(_e,{isOpen:o,leastDestructiveRef:i,onClose:r,motionPreset:"slideInBottom",closeOnOverlayClick:!l,children:e.jsx(pe,{children:e.jsxs(Ge,{children:[e.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:"Update Available"}),l?e.jsx(e.Fragment,{}):e.jsx(ke,{}),e.jsx(we,{children:"A new version of Titan is available. Would you like to download and install the update?"}),e.jsxs(ye,{children:[e.jsx(E,{colorScheme:"red",ref:i,onClick:u,isDisabled:l,children:"Cancel"}),e.jsx(E,{colorScheme:"yellow",onClick:d,ml:3,isDisabled:l,children:"Confirm"})]})]})})})}function Lt(){if(!window.electron)return e.jsx(e.Fragment,{});const{colorMode:s}=$e(),a=t.useCallback(()=>{window.electron.minimizeWindow()},[]),o=t.useCallback(()=>{window.electron.maximizeWindow()},[]),n=t.useCallback(()=>{window.electron.closeWindow()},[]);return e.jsx(Xs.header,{w:"100%",position:"fixed",bgColor:s==="light"?"white":"#121212",className:"titanHead",zIndex:9999999,top:0,children:e.jsxs(T,{justifyContent:"space-between",alignItems:"center",p:2,position:"static",children:[e.jsx(Z,{as:"h6",size:"sm",noOfLines:1,className:"animation-fadein-left-forward",children:"Titan"}),e.jsxs(T,{alignItems:"center",columnGap:2,flexWrap:"nowrap",wrap:"nowrap",children:[e.jsx(H,{"aria-label":"Minimize",size:"xs",icon:e.jsx(Zs,{}),onClick:a,colorScheme:"gray",_hover:{bg:"#FAF089",color:"#1A202C"}}),e.jsx(H,{"aria-label":"Maximize",size:"xs",icon:e.jsx(et,{}),onClick:o,colorScheme:"gray",_hover:{bg:"#FAF089",color:"#1A202C"}}),e.jsx(H,{"aria-label":"Close",size:"xs",icon:e.jsx(Ye,{}),onClick:n,colorScheme:"gray",_hover:{bg:"#FEB2B2",color:"#1A202C"}})]})]})})}function Vt(){const{isCommitMode:s,selectedBranches:a,configurableRowData:o}=V(),{RaiseClientNotificaiton:n}=ne();return t.useEffect(()=>{if(window.electron)return window.electron.onAppClosing(()=>{n("App is closing, performing cleanup...","info",0),window.electron.closeWindow()}),()=>{window.electron.removeAppClosingListener()};console.warn("Electron specific logic is not available in browser mode.")},[]),e.jsxs(b,{className:"titanBody",children:[e.jsx(Lt,{}),e.jsxs(b,{p:10,children:[e.jsx(ft,{}),e.jsx(At,{}),e.jsxs(T,{rowGap:4,flexDirection:"column",children:[e.jsx(b,{children:e.jsx(pt,{})}),e.jsx(st,{in:s,animateOpacity:!0,children:e.jsxs(b,{id:"sectionCommit",children:[e.jsxs(Z,{as:"h2",size:"lg",noOfLines:1,mb:4,className:"animation-pulse",lineHeight:"1.4",children:["Committing ",a.length==o.length?"All":`${a.length}/${o.length}`," Branch",a.length==1?"":"es"]}),e.jsx(Tt,{})]})})]}),e.jsx(Mt,{})]})]})}const{definePartsStyle:cs,defineMultiStyleConfig:ds}=ot(rt.keys),Et=cs({overlay:{bg:"blackAlpha.900"},dialog:{bg:"gray.900",color:"white",boxShadow:"rgba(255, 255, 255, 0.07) 0px 0px 20px 7px"},header:{bg:"gray.900",color:"white",borderRadius:"20px",p:4},body:{p:4,color:"white"},footer:{bg:"gray.900",p:4,color:"white",borderRadius:"20px"}}),Pt=ds({baseStyle:Et}),Ot=cs({overlay:{bg:"blackAlpha.900"},dialog:{mt:ut,bg:"gray.900",color:"white",boxShadow:"rgba(255, 255, 255, 0.07) 0px 0px 20px 7px"},header:{bg:"gray.900",color:"white",borderRadius:"20px",p:4},body:{p:4,color:"white"},footer:{bg:"gray.900",p:2,color:"white",borderRadius:"20px"}}),zt=ds({baseStyle:Ot}),Ut={initialColorMode:"dark",useSystemColorMode:!1},He=tt({config:Ut,components:{Modal:Pt,Drawer:zt}});nt.createRoot(document.getElementById("root")).render(e.jsx(Me.StrictMode,{children:e.jsxs(lt,{theme:He,children:[e.jsx(at,{initialColorMode:He.config.initialColorMode}),e.jsx(ht,{children:e.jsx(Vt,{})})]})})); +`,le=m.sort((_,w)=>_["Branch Version"].localeCompare(w["Branch Version"])).map(_=>{const w=[];f.includes("BranchFolder")&&w.push(_["Branch Folder"]),f.includes("BranchVersion")&&w.push(_["Branch Version"]),f.includes("SVNBranch")&&w.push(_.branchPathFolder);let A=w.join(" ").trim();if(f.includes("IssueNumber")){const me=_.branchIssueNumber;A+=` Issue [${me}]`}const M=_.revision?_.revision:_.errorMessage||"Error";return A+=` Revision [${M}]`,A});return R?le.join(fe):le},[m,l]),ee=t.useCallback(f=>{const R=J(f);S(R)},[J,S]),se=t.useCallback(()=>{O(f=>f-1)},[O]),he=t.useCallback(()=>{if(c.type!=="trello"){g("Trello Autofill is not enabled for this commit","error");return}const f=c.data,R=J(["BranchFolder","BranchVersion","IssueNumber"],!1);B(p,x,f,R),g("Updating Trello card with commit information","info"),d(null)},[c,g,J]),y=t.useCallback(()=>{O(f=>{switch(f){case 1:h(l);case 2:S(""),L("");break;case 3:return k(),g("Updating selected branches! Please wait","info",1500),m.forEach(R=>{u(R.branchId,R["SVN Branch"],R["Branch Version"],R["Branch Folder"])}),n(!1),r([]),i(!1),o(),1}return f+1})},[O,h,l,S,L,k,g,m,u,n,r,i,o]);return t.useEffect(()=>{O(1),j([]),S(""),L("")},[s,j]),t.useEffect(()=>{!s||I!=0||(o(),O(1),j([]),S(""),L(""))},[I,s]),t.useEffect(()=>{!s||I!=3||(g("The commit process has been completed successfully","success",5e3),ee(["BranchFolder","BranchVersion","SVNBranch"]),L(l.commitMessage||""))},[g,I,s,ee]),t.useEffect(()=>{const f=R=>{j(Q=>[...Q,R])};return a==null||a.on("svn-commit-status-live",f),()=>a==null?void 0:a.off("svn-commit-status-live",f)},[a]),t.useEffect(()=>{if(I!=2)return;const f=setTimeout(()=>{m.length>0&&m[0].bulkCommitLength==m.length&&O(3)},3e3);return()=>clearTimeout(f)},[I,m]),t.useEffect(()=>{(D||N)&&g("Copied to Clipboard","success",1500)},[D,N,g]),!s||!l?e.jsx(e.Fragment,{}):e.jsxs(Je,{isOpen:s,onClose:o,isCentered:!0,motionPreset:"slideInBottom",scrollBehavior:"inside",size:"xl",closeOnOverlayClick:I==1,children:[e.jsx(pe,{}),e.jsxs(Xe,{maxH:"85%",maxW:"95%",children:[e.jsxs(Ce,{display:"flex",justifyContent:"space-between",maxWidth:I==1?"94%":"100%",children:[e.jsx(Z,{as:"h2",size:"lg",children:"Commit Selected Files"}),e.jsx(Ts,{index:I-1,mb:0,size:"sm",colorScheme:"yellow",children:q.map((f,R)=>e.jsxs(Ms,{children:[e.jsx(As,{children:e.jsx(Ls,{complete:e.jsx(Vs,{}),incomplete:e.jsx(Oe,{}),active:e.jsx(Oe,{})})}),e.jsx(C,{flexShrink:"0",children:e.jsx(Es,{children:f.title})}),e.jsx(Ps,{})]},R))})]}),I==1?e.jsx(De,{size:"lg",py:6}):e.jsx(e.Fragment,{}),e.jsx(we,{children:e.jsxs(C,{children:[I!=1?e.jsx(e.Fragment,{}):e.jsxs(C,{children:[e.jsxs(C,{mb:4,children:[e.jsx(P,{fontWeight:600,children:"Please confirm that the following information is correct before proceeding to commit your files:"}),e.jsxs(Re,{spacing:3,children:[e.jsxs(oe,{children:[e.jsx(ae,{as:re,color:"yellow.500"}),"Source Branch: ",e.jsx(te,{children:ve(l.sourceBranch["Branch Folder"],l.sourceBranch["Branch Version"],l.sourceBranch["SVN Branch"])})]}),e.jsxs(oe,{children:[e.jsx(ae,{as:re,color:"yellow.500"}),"Issue Numbers: ",e.jsx(te,{children:Object.entries(l.issueNumber).map(f=>`${f[1]} (${f[0]})`).join(", ")})]}),e.jsxs(oe,{children:[e.jsx(ae,{as:re,color:"yellow.500"}),"Commit Message: ",e.jsx(te,{children:l.commitMessage})]}),e.jsxs(oe,{children:[e.jsx(ae,{as:re,color:"yellow.500"}),"Example:"," ",e.jsxs(te,{children:["Issue ",l.issueNumber[l.sourceBranch["Branch Folder"]]," (",l.sourceBranch["Branch Folder"]," ",l.sourceBranch["Branch Version"],"): ",l.commitMessage]})]})]})]}),e.jsx(C,{children:e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"350px",width:"100%"},children:e.jsx(de,{rowData:l.filesToProcess,defaultColDef:W,columnDefs:K,domLayout:"normal",columnMenu:"new",pagination:!0,paginationAutoPageSize:!0})})})]}),I!=2?e.jsx(e.Fragment,{}):e.jsxs(C,{children:[e.jsxs(P,{fontWeight:600,children:["Please wait while the files are being committed to the SVN repository.",e.jsx("br",{}),"Current live status of the commit process:"]}),e.jsx(C,{children:e.jsx(Re,{spacing:3,children:m.map((f,R)=>e.jsxs(oe,{children:[e.jsx(ae,{as:f.errorMessage?zs:re,color:f.errorMessage?"red.500":"yellow.500"}),f.branchString,": ",e.jsx(te,{children:f.errorMessage||f.revision})]},R))})})]}),I!=3?e.jsx(e.Fragment,{}):e.jsxs(C,{children:[e.jsx(C,{mb:4,children:e.jsxs(P,{fontWeight:600,children:["The commit process has been completed successfully.",e.jsx("br",{}),"Please find your revisions here for view and copy:"]})}),e.jsxs(T,{columnGap:10,alignItems:"center",children:[e.jsxs(C,{children:[e.jsx(Z,{as:"h3",size:"md",children:"SVN Revisions"}),e.jsx(C,{children:e.jsx("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word"},children:b})})]}),e.jsx(C,{children:e.jsx(v,{hasArrow:!0,label:"Copy to clipboard",children:e.jsx($,{"aria-label":"Copy To Clipboard",onClick:k,icon:e.jsx(Ie,{}),colorScheme:"yellow"})})})]}),e.jsxs(C,{my:4,children:[e.jsx(P,{fontWeight:600,children:"Modify the clipboard text to include..."}),e.jsx(Ze,{colorScheme:"yellow",defaultValue:["BranchFolder","BranchVersion"],onChange:ee,children:e.jsxs(Le,{children:[e.jsx(X,{value:"BranchFolder",children:"Branch Folder"}),e.jsx(X,{value:"BranchVersion",children:"Branch Version"}),e.jsx(X,{value:"SVNBranch",children:"SVN Branch"}),e.jsx(X,{value:"IssueNumber",children:"Issue Number"}),e.jsx(X,{value:"MarkupSupport",children:"Markup Support"})]})})]}),e.jsxs(T,{columnGap:10,alignItems:"center",children:[e.jsxs(C,{children:[e.jsx(P,{fontWeight:600,children:"Here is your SVN commit message for the source branch:"}),l.sourceBranch&&l.sourceBranch["Branch Folder"]&&l.sourceBranch["Branch Version"]?e.jsx(te,{children:`Issue ${l.issueNumber[l.sourceBranch["Branch Folder"]]} (${l.sourceBranch["Branch Folder"]} ${l.sourceBranch["Branch Version"]}): ${H}`}):e.jsx(te,{children:"Source information is undefined. Please check that you have entered the correct details otherwise contact the developer!"})]}),e.jsx(v,{hasArrow:!0,label:"Copy to clipboard",children:e.jsx($,{"aria-label":"Copy To Clipboard",onClick:z,icon:e.jsx(Ie,{}),colorScheme:"yellow"})})]})]})]})}),e.jsx(ke,{children:e.jsxs(T,{flex:1,justifyContent:"space-between",children:[e.jsx(T,{columnGap:2,children:e.jsx(v,{hasArrow:!0,label:"Cannot undo the commit currently",isDisabled:I<2,children:e.jsx(E,{onClick:se,mr:3,isDisabled:I>=2,children:I==1?"Cancel":"Previous"})})}),e.jsxs(T,{columnGap:2,children:[e.jsx(v,{hasArrow:!0,label:"Requires Trello Autofill",isDisabled:(c==null?void 0:c.type)==="trello"&&F,children:e.jsx(E,{colorScheme:"yellow",leftIcon:e.jsx(Y,{as:Os}),onClick:he,isDisabled:I<3||(c==null?void 0:c.type)!="trello"||!F,children:"Update Card"})}),e.jsx(v,{hasArrow:!0,label:"Cannot undo the commit currently",isDisabled:I!=2,children:e.jsx(E,{colorScheme:"yellow",onClick:y,isDisabled:I==2,children:I==q.length?"Complete":"Next"})})]})]})})]})]})}function St({fileUpdates:s}){return e.jsx(C,{children:Object.keys(s).length>0?e.jsxs(C,{children:[e.jsx(P,{mb:4,children:"Below are the list of files which have been changed on your machine but there exists a newer version of them in the repository:"}),e.jsx(C,{maxHeight:"200px",overflowY:"auto",children:e.jsxs(Us,{children:[e.jsx(Ws,{children:e.jsxs(Ue,{children:[e.jsx(je,{children:"Branch"}),e.jsx(je,{children:"Path"}),e.jsx(je,{children:e.jsx(v,{label:"Working Copy",hasArrow:!0,children:"Local Status"})}),e.jsx(je,{children:e.jsx(v,{label:"Repository",hasArrow:!0,children:"Remote Status"})})]})}),e.jsx(Hs,{children:Object.keys(s).map(o=>e.jsx(Ae.Fragment,{children:s[o].map((a,n)=>e.jsxs(Ue,{children:[e.jsx(Se,{children:o}),e.jsx(Se,{children:a.pathDisplay}),e.jsx(Se,{children:a.wcStatus}),e.jsx(Se,{children:a.reposStatus})]},n))},o))})]})}),e.jsx(P,{mt:4,children:"If you wish to commit these files, please update the associated branches!"})]}):e.jsx(C,{children:e.jsx(P,{children:"Your selected branches do not contain any changed files for which a newer version exists in the repository."})})})}function yt({rowDataLocalChanges:s,setRowDataLocalChanges:o,defaultColDefsCommit:a}){const{localChangesGridRef:n,isDebug:r,selectedBranches:i,showCommitView:l,setSelectedLocalChanges:c,selectedLocalChanges:d}=V(),{emitFilesRevert:u}=ue(),{RaiseClientNotificaiton:h}=ne(),[p,x]=t.useState(""),F=t.useCallback(()=>{u(d)},[u,d]),B=t.useCallback(k=>{x(k.target.value)},[x]),g=t.useCallback(k=>{var D,z,H,L;if(console.debug("PanelLocalChanges.jsx: onFileViewSelectionChanged - event",k),String(k==null?void 0:k.source).toLowerCase().includes("api"))return;let b=(z=(D=n==null?void 0:n.current)==null?void 0:D.api)==null?void 0:z.getSelectedNodes().map(N=>N.data);r&&console.debug("PanelLocalChanges.jsx: onFileViewSelectionChanged - selectedBranches",b);const S=b.filter(N=>N["Local Status"].toLowerCase()==="added");(L=(H=n==null?void 0:n.current)==null?void 0:H.api)==null||L.forEachNode(N=>{S.some(q=>q["File Path"].includes(N.data["File Path"])&&q["File Path"]!==N.data["File Path"])&&N.data["Local Status"].toLowerCase()==="added"&&!N.isSelected()&&(N.setSelected(!0),b.push(N.data),console.debug("PanelLocalChanges.jsx (onFileViewSelectionChanged): Adding ancestor node: ",N))}),c(b)},[n,r,c]),m=t.useCallback(k=>{k.success?h("TortoiseSVN diff opened successfully","success",3e3):h(`Error opening TortoiseSVN diff: ${JSON.stringify(k.error,null,4)}`,"error",0)},[h]),j=t.useMemo(()=>[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"Branch Folder"},{field:"Branch Version",sort:"asc",sortIndex:0},{field:"File Path",flex:1,sort:"asc",sortIndex:2},{field:"Local Status",headerTooltip:"Working Copy",sort:"asc",sortIndex:1},{headerName:"Diff",filter:!1,sortable:!1,resizable:!1,cellRenderer:as,cellRendererParams:{onDiffResult:m},width:90}],[]);return t.useEffect(()=>{i.length<1||l||(x(""),o([]),c([]))},[i,l]),e.jsx(C,{children:s.length>0?e.jsxs(C,{children:[e.jsxs(T,{mb:4,alignItems:"center",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:B,width:"100%"})]}),e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"480px",width:"100%"},children:e.jsx(de,{ref:n,rowData:s,defaultColDef:a,columnDefs:j,onSelectionChanged:g,quickFilterText:p,domLayout:"normal",rowSelection:"multiple",suppressRowClickSelection:!0,rowMultiSelectWithClick:!0,animateRows:!0,columnMenu:"new",enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationAutoPageSize:!0})}),e.jsx(T,{mt:4,columnGap:2,justifyContent:"flex-end",children:e.jsx(v,{label:"Requires you to select at least 1 file",hasArrow:!0,isDisabled:d.length>0,children:e.jsx(E,{onClick:F,colorScheme:"red",isDisabled:d.length<1,children:"Revert Selected"})})})]}):e.jsx(C,{children:e.jsx(P,{children:"Your selected branches do not contain any files to commit."})})})}function kt({rowDataUntrackedChanges:s,setRowDataUntrackedChanges:o,defaultColDefsCommit:a}){const{untrackedChangesGridRef:n,selectedUntrackedChanges:r,setSelectedUntrackedChanges:i,isDebug:l,selectedBranches:c,showCommitView:d}=V(),{emitFilesAddRemove:u,emitFilesRevert:h}=ue(),[p,x]=t.useState(""),F=t.useCallback(k=>{x(k.target.value)},[x]),B=t.useCallback(()=>{var b,S;const k=(S=(b=n==null?void 0:n.current)==null?void 0:b.api)==null?void 0:S.getSelectedNodes().map(D=>D.data);l&&console.debug("PanelUntrackedChanges.jsx (onUnseenFilesSelectionChanged): selectedBranches",k),i(k)},[n,l]),g=t.useCallback(()=>{u(r)},[u,r]),m=t.useCallback(()=>{h(r)},[h,r]),j=t.useMemo(()=>[{headerCheckboxSelection:!0,checkboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"Branch Folder"},{field:"Branch Version",sort:"asc",sortIndex:0},{field:"File Path",flex:1,sort:"asc",sortIndex:1},{field:"Local Status",headerTooltip:"Working Copy"}],[]);return t.useEffect(()=>{c.length<1||d||(x(""),o([]),i([]))},[c,d]),e.jsx(C,{children:s.length>0?e.jsxs(C,{children:[e.jsx(P,{mb:4,children:"Below are the list of files which are either unversioned or missing in the repository:"}),e.jsxs(T,{mb:4,alignItems:"center",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:F,width:"100%"})]}),e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"390px",width:"100%"},children:e.jsx(de,{ref:n,rowData:s,defaultColDef:a,columnDefs:j,onSelectionChanged:B,quickFilterText:p,domLayout:"normal",rowSelection:"multiple",rowMultiSelectWithClick:!0,animateRows:!0,columnMenu:"new",enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationAutoPageSize:!0})}),e.jsxs(T,{mt:4,columnGap:2,justifyContent:"flex-end",children:[e.jsx(v,{label:"Requires you to select at least 1 file",hasArrow:!0,isDisabled:r.length>0,children:e.jsxs(E,{onClick:g,colorScheme:"green",isDisabled:r.length<1,children:["Add/Remove ",r.length," File",r.length>1?"s":""]})}),e.jsx(v,{label:"Requires you to select at least 1 file",hasArrow:!0,isDisabled:r.length>0,children:e.jsxs(E,{onClick:m,colorScheme:"red",isDisabled:r.length<1,children:["Revert ",r.length," File",r.length>1?"s":""]})})]})]}):e.jsx(C,{children:e.jsx(P,{children:"Your selected branches do not contain any unversioned or missing files."})})})}function Ve(){const{config:s}=V();return s&&s.commitOptions?s.commitOptions:null}function He({branchFolder:s}){const{issueNumber:o,setIssueNumber:a,selectedBranches:n}=V(),r=Ve(),i=t.useCallback(d=>{const u=String(d.target.value||"").trim();/^\d*$/.test(u)&&a(h=>({...h,[s]:u}))},[s,a]),l=!s,c=!s||!(r!=null&&r.useIssuePerFolder)?!0:n==null?void 0:n.map(d=>d["Branch Folder"]).includes(s);return t.useEffect(()=>(s&&a(d=>({...d,[s]:""})),()=>{s&&Object.keys(o).includes(s)&&a(d=>G.omit(d,[s]))}),[s,a]),e.jsx(v,{label:"Please select source branch first!",isDisabled:!l,hasArrow:!0,children:e.jsxs(Ne,{isDisabled:l,isRequired:c,children:[e.jsx(Te,{children:s?`Issue Number For ${s}`:"Issue Number"}),e.jsx(ie,{value:o[s]||"",onInput:i,placeholder:"Enter number"})]},s)})}function is(){const{configurableRowData:s,sourceBranch:o,selectedBranches:a}=V(),n=t.useCallback(c=>s&&s.length>0?s.find(d=>d.id==c)["Branch Folder"]:"",[s]),r=t.useMemo(()=>{if(!(o!=null&&o.value))return[];const c=n(o.value);return[...new Set(a.filter(d=>d["Branch Folder"]!==c).map(d=>d["Branch Folder"]))]},[o,a,n]),i=t.useCallback(c=>s&&s.length>0?s.find(d=>d.id==c)["Branch Version"]:"",[s]),l=t.useCallback(c=>s&&s.length>0?s.find(d=>d.id==c)["SVN Branch"]:"",[s]);return{getBranchFolderById:n,selectedBranchFolders:r,getBranchVersionById:i,getSvnBranchById:l}}function Bt({openMessageAutoFillModal:s}){const{sourceBranch:o,setSourceBranch:a,branchOptions:n,setIssueNumber:r,commitMessage:i,setCommitMessage:l,isCommitMode:c,selectedBranches:d}=V(),u=Ve(),{getBranchFolderById:h,selectedBranchFolders:p}=is(),x=t.useCallback(B=>{a(B)},[a]),F=t.useCallback(B=>{l(String(B.target.value).replace(/["`]/g,"'"))},[l]);return t.useEffect(()=>{c&&(a(null),r({}))},[c]),t.useEffect(()=>{u!=null&&u.reusePreviousCommitMessage||l("")},[u==null?void 0:u.reusePreviousCommitMessage,l,c]),t.useEffect(()=>{r(B=>Object.fromEntries(Object.entries(B).filter(([g])=>d.some(m=>m["Branch Folder"]===g))))},[d]),e.jsx(C,{children:e.jsxs(T,{columnGap:3,children:[e.jsxs(C,{flexGrow:1,children:[e.jsxs(T,{columnGap:2,mb:2,children:[e.jsx(C,{width:"50%",children:e.jsxs(Ne,{isRequired:!0,children:[e.jsx(Te,{children:"Source Branch"}),e.jsx($s,{value:o,onChange:x,options:n,placeholder:"SVN Branch you're commiting from",selectedOptionStyle:"check",selectedOptionColorScheme:"yellow",isClearable:!0,classNamePrefix:"chakra-react-select"})]})}),e.jsx(T,{width:"50%",alignItems:"flex-end",columnGap:2,children:e.jsx(He,{branchFolder:o&&o.value?h(o.value):null})})]}),e.jsxs(T,{columnGap:2,height:"auto",children:[e.jsxs(Ne,{width:u!=null&&u.useIssuePerFolder?"50%":"100%",isRequired:!0,children:[e.jsx(Te,{children:"Commit Message"}),e.jsx(qs,{placeholder:"Enter Commit Message",height:"76%",resize:"none",onInput:F,value:i})]}),u!=null&&u.useIssuePerFolder?o!=null&&o.value?e.jsx(T,{width:"50%",flexDir:"column",rowGap:2,children:p.map(B=>e.jsx(He,{branchFolder:B},B))}):e.jsx(C,{width:"50%",textAlign:"center",m:"auto",children:e.jsx(P,{fontSize:"lg",fontWeight:"600",color:"yellow.500",children:"Please select source branch first!"})}):null]})]}),e.jsx(C,{pt:8,children:e.jsx(v,{label:o!=null&&o.value?"Auto Fill Message":"Please select source branch first!",hasArrow:!0,placement:"bottom-end",children:e.jsx($,{colorScheme:"yellow","aria-label":"Auto Fill Message",size:"md",onClick:()=>s(),icon:e.jsx(es,{}),isDisabled:!(o!=null&&o.value)})})})]})})}function Dt({openCommitModal:s}){const{setShowCommitView:o,selectedLocalChanges:a,sourceBranch:n,issueNumber:r,commitMessage:i,setSocketPayload:l,configurableRowData:c,selectedBranches:d}=V(),{RaiseClientNotificaiton:u}=ne(),h=Ve(),{selectedBranchFolders:p}=is(),x=t.useCallback(()=>{o(!1)},[o]),F=t.useCallback(()=>{if(!n||n.value===""){u("Please select the source branch to proceed!","error");return}const B=c.find(j=>j.id==n.value),g=h!=null&&h.useIssuePerFolder?p.every(j=>r[j]&&r[j]!==""):!0,m=h!=null&&h.useIssuePerFolder&&!d.some(j=>j["Branch Folder"]===B["Branch Folder"])||r[B["Branch Folder"]];if(!r||G.isEmpty(r)||!g||!m){u("Please provide the issue number to proceed!","error");return}if(!i||i.trim()===""){u("Please provide the commit message to proceed!","error");return}l({sourceBranch:B,issueNumber:r,commitMessage:i,filesToProcess:a,commitOptions:h}),s()},[u,n,c,h,p,r,d,i,a]);return e.jsx(C,{children:e.jsxs(T,{columnGap:2,justifyContent:"center",children:[e.jsx(E,{onClick:x,leftIcon:e.jsx(Be,{}),colorScheme:"yellow",children:"Refresh Process"}),e.jsx(v,{label:"Select at least 1 file",hasArrow:!0,isDisabled:a.length>0,children:e.jsxs(E,{onClick:F,leftIcon:e.jsx(Y,{as:Ye}),colorScheme:"yellow",isDisabled:a.length<1,children:["Commit ",a.length>0?`${a.length} File`:"",a.length>1?"s":""]})})]})})}function vt(){const{selectedBranches:s,logData:o,setLogData:a}=V(),[n,r]=t.useState([]),[i,l]=t.useState(""),c=t.useCallback(h=>{l(h.target.value)},[l]),d=t.useCallback(()=>{a([])},[a]),u=o.length===s.length;return t.useEffect(()=>{if(o.length===0)return;const h=o.map(p=>p.logs).flat();r(p=>G.isEqual(p,h)?p:h)},[o]),{rowDataLogs:n,quickFilterLogsText:i,setQuickFilterLogsText:l,onQuickFilterLogsInputChanged:c,refreshLogs:d,areLogsFetched:u}}function Ft({rowDataLogs:s,quickFilterLogsText:o,setAutoFillSelection:a=null,isAutofill:n=!1}){const r=t.useMemo(()=>({sortable:!0,resizable:!1,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),i=t.useMemo(()=>{const d=[{field:"revision",headerName:"Revision",sort:"desc",width:130},{field:"date",headerName:"Date",sortable:!1},{field:"branchFolder",headerName:"Branch Folder",width:135},{field:"branchVersion",headerName:"Branch Version",width:125},{field:"author",headerName:"Author"},{field:"message",headerName:"Message",flex:1}];return n?[{checkboxSelection:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},...d]:d},[n]),l=t.useRef(null),c=t.useCallback(()=>{var d,u;if(a){const h=(u=(d=l==null?void 0:l.current)==null?void 0:d.api)==null?void 0:u.getSelectedNodes().map(p=>p.data);a(h[0]||null)}},[a]);return e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:n?"90%":"85%",width:"100%"},children:e.jsx(de,{ref:l,rowData:s,defaultColDef:r,columnDefs:i,onSelectionChanged:c,quickFilterText:o,domLayout:"normal",columnMenu:"new",rowSelection:"single",suppressRowClickSelection:!n,animateRows:!1,immutableData:!0,suppressFlash:!0,enableCellTextSelection:!0,ensureDomOrder:!0,pagination:!0,paginationAutoPageSize:!0})})}function cs({setAutoFillSelection:s=!1,isAutofill:o=!1}){const{selectedBranches:a,logData:n}=V(),{rowDataLogs:r,quickFilterLogsText:i,onQuickFilterLogsInputChanged:l,refreshLogs:c,areLogsFetched:d}=vt();return d?e.jsxs(C,{h:"100%",children:[e.jsxs(T,{mb:4,width:"100%",alignItems:"center",columnGap:4,children:[e.jsxs(T,{alignItems:"center",width:"100%",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:l,width:"100%"})]}),e.jsx(C,{children:e.jsx(v,{label:"Refresh",hasArrow:!0,children:e.jsx($,{onClick:c,icon:e.jsx(Be,{}),colorScheme:"yellow","aria-label":"Refresh"})})})]}),e.jsx(Ft,{rowDataLogs:r,quickFilterLogsText:i,setAutoFillSelection:s,isAutofill:o})]}):e.jsxs(C,{children:[e.jsxs(C,{mb:4,children:[e.jsx(P,{fontWeight:600,children:"Showing SVN Log for the following branches:"}),e.jsx(Re,{spacing:3,children:a.map(u=>{const h=n.find(p=>p.id===u.id);return e.jsxs(oe,{display:"flex",alignItems:"center",children:[e.jsx(ae,{w:30,h:30,as:h?re:_s,color:"yellow.500"}),ve(u["Branch Folder"],u["Branch Version"],u["SVN Branch"])]},u.branchId)})})]}),e.jsx(T,{justifyContent:"center",children:e.jsx(Gs,{value:n.length/a.length*360,color:"yellow.300",size:"100px",children:e.jsxs(Qs,{children:[n.length," / ",a.length]})})})]})}function It(s){const{data:o}=s,a=async()=>{window.open(o.url,"_blank")};return e.jsx($,{"aria-label":"Diff",size:"sm",icon:e.jsx(Ys,{}),onClick:a,colorScheme:"yellow"})}function Rt({rowDataTrello:s,quickFilterTrelloText:o,setAutoFillSelection:a}){const n=t.useMemo(()=>({sortable:!0,resizable:!1,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]),r=t.useMemo(()=>[{checkboxSelection:!0,width:20,resizable:!1,suppressMovable:!1,filter:!1,editable:!1,headerClass:"branch-table-header-cell",cellClass:"branch-table-body-cell"},{field:"name",headerName:"Name",flex:1},{field:"lastActivityDate",headerName:"Last Activity Date"},{field:"url",headerName:"Goto Trello",filter:!1,sortable:!1,resizable:!1,cellRenderer:It,width:120}],[]),i=t.useRef(null),l=t.useCallback(()=>{var d,u;const c=(u=(d=i==null?void 0:i.current)==null?void 0:d.api)==null?void 0:u.getSelectedNodes().map(h=>h.data);a(c[0]||null)},[a]);return e.jsx("div",{className:"ag-theme-balham-dark compact",style:{height:"80%",width:"100%"},children:e.jsx(de,{ref:i,rowData:s,defaultColDef:n,columnDefs:r,onSelectionChanged:l,quickFilterText:o,domLayout:"normal",columnMenu:"new",rowSelection:"single",suppressRowClickSelection:!1,animateRows:!1,enableCellTextSelection:!0,pagination:!0,paginationAutoPageSize:!0})})}function Nt({setAutoFillSelection:s}){const{socket:o}=V(),{key:a,token:n,isTrelloIntegrationEnabled:r,emitTrelloCardNamesSearch:i}=rs(),[l,c]=t.useState(""),[d,u]=t.useState(""),[h,p]=t.useState([]),x=t.useCallback(G.debounce(m=>{m.trim()!==""&&i(a,n,m)},400),[a,n,i]),F=t.useCallback(m=>{c(String(m.target.value).trim())},[c]),B=t.useCallback(()=>{l.trim()!==""&&i(a,n,l)},[l,a,n,i]),g=t.useCallback(m=>{u(m.target.value)},[]);return t.useEffect(()=>(x(l),()=>x.cancel()),[l,x]),t.useEffect(()=>{const m=j=>{p(j&&j.length>0?j:[])};return o==null||o.on("trello-result-search-names-card",m),()=>o==null?void 0:o.off("trello-result-search-names-card",m)},[o]),r?e.jsxs(C,{h:"100%",children:[e.jsxs(T,{mb:4,width:"100%",alignItems:"center",columnGap:4,children:[e.jsxs(T,{alignItems:"center",width:"100%",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Trello Query:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:F,width:"100%"})]}),e.jsx(C,{children:e.jsx(v,{label:"Resubmit Query",hasArrow:!0,children:e.jsx($,{onClick:B,icon:e.jsx(Be,{}),colorScheme:"yellow","aria-label":"Resubmit"})})})]}),e.jsx(T,{mb:4,width:"100%",alignItems:"center",columnGap:4,children:e.jsxs(T,{alignItems:"center",width:"100%",children:[e.jsx(P,{mr:2,fontWeight:"600",whiteSpace:"nowrap",children:"Quick Filter:"}),e.jsx(ie,{placeholder:"Type to search...",onInput:g,width:"100%"})]})}),e.jsx(Rt,{rowDataTrello:h,quickFilterTrelloText:d,setAutoFillSelection:s})]}):e.jsx(C,{h:"100%",p:4,children:e.jsxs(P,{fontSize:"lg",fontWeight:"600",color:"red.500",children:["You need to"," ",e.jsxs(_e,{href:"https://help.merge.dev/en/articles/8757597-trello-how-do-i-link-my-account",isExternal:!0,color:"yellow.500",children:["set up Trello Integration ",e.jsx(es,{mx:"2px"})]})," ","in the configuration file to use this feature."]})})}function Tt({isModalOpen:s,closeModal:o}){const{setIssueNumber:a,setCommitMessage:n,setPostCommitData:r}=V(),[i,l]=t.useState(0),[c,d]=t.useState([null,null]),[u,h]=t.useState(!0),p=t.useCallback(g=>{l(g),d(g===0?m=>[m[0],null]:m=>[null,m[1]])},[l]),x=t.useCallback(g=>{d(m=>[g,...m.slice(1)])},[d]),F=t.useCallback(g=>{d(m=>[m[0],g])},[d]),B=t.useCallback(()=>{console.debug("Selected tab index:",i),console.debug("Selected autofill selection:",JSON.stringify(c,null,4));let g=c[i];if(i===0){const m=g.message,j=m.match(/\s*(Issue)*\s*(\d+)\s*/),k=j?j[2]:null,b=m.replace(/\s*(Issue)*\s*(\d+)?\s*(\([^\)]+\))*\s?:?\s*/,"");k&&a(S=>Object.fromEntries(Object.keys(S).map(D=>[D,k]))),b.trim()!==""&&n(b)}else{const m=g.name,j=m.match(/\s*(Issue)*\s*(\d+)\s*/),k=j?j[2]:null,b=m.replace(/\s*(Issue)*\s*(\d+)/,"");k&&a(S=>Object.fromEntries(Object.keys(S).map(D=>[D,k]))),b.trim()!==""&&n(b),r({type:"trello",data:g})}o()},[i,c,a,n,r,o]);return t.useEffect(()=>{h(!(c.length==2&&(c[0]||c[1])))},[c]),t.useEffect(()=>{d([null,null]),l(0)},[s]),e.jsxs(Je,{isOpen:s,onClose:o,isCentered:!0,motionPreset:"slideInBottom",scrollBehavior:"inside",size:"xl",closeOnOverlayClick:!0,children:[e.jsx(pe,{}),e.jsxs(Xe,{maxH:"95%",maxW:"95%",children:[e.jsx(Ce,{children:e.jsx(Z,{as:"h2",size:"lg",children:"Autofill Commit Message"})}),e.jsx(De,{size:"lg"}),e.jsx(we,{children:e.jsx(C,{height:"70vh",children:e.jsxs(ss,{variant:"solid-rounded",colorScheme:"yellow",defaultIndex:0,isLazy:!0,h:"100%",onChange:g=>p(g),children:[e.jsxs(ts,{children:[e.jsx(xe,{children:"SVN Logs"}),e.jsx(xe,{children:"Trello"})]}),e.jsxs(ns,{h:"90%",children:[e.jsx(be,{px:0,pb:0,h:"100%",children:e.jsx(cs,{setAutoFillSelection:x,isAutofill:!0})}),e.jsx(be,{px:0,pb:0,h:"100%",children:e.jsx(Nt,{setAutoFillSelection:F})})]})]})})}),e.jsxs(ke,{children:[e.jsx(E,{mr:3,onClick:()=>o(),children:"Cancel"}),e.jsx(v,{hasArrow:!0,label:"Please select exactly one row!",placement:"top-start",isDisabled:!u,children:e.jsx(E,{colorScheme:"yellow",onClick:B,isDisabled:u,children:"Select"})})]})]})]})}function Mt(){const{config:s,updateConfig:o,setSourceBranch:a,setIssueNumber:n}=V(),[r,i]=t.useState({}),l=t.useCallback((c,d)=>{i(u=>({...u,[c]:d}))},[i]);return t.useEffect(()=>{!s||G.isEmpty(s)||(s.commitOptions?i(s.commitOptions):o(c=>({...c,commitOptions:{useFolderOnlySource:!1,useIssuePerFolder:!1,reusePreviousCommitMessage:!1}})))},[s]),t.useEffect(()=>{G.isEmpty(r)||o(c=>G.isEqual(c.commitOptions,r)?c:{...c,commitOptions:r})},[r]),t.useEffect(()=>{a(null)},[r==null?void 0:r.useFolderOnlySource,a]),t.useEffect(()=>{n({})},[r==null?void 0:r.useIssuePerFolder,n]),e.jsxs(C,{mb:4,children:[e.jsx(Z,{as:"h6",size:"sm",children:"Commit Options"}),e.jsx(Ze,{colorScheme:"yellow",children:e.jsxs(Ks,{direction:"row",spacing:4,mt:2,children:[e.jsx(X,{isChecked:r.useFolderOnlySource,onChange:c=>l("useFolderOnlySource",c.target.checked),children:e.jsx(v,{label:"Removes extra branch details from source branch.",hasArrow:!0,placement:"bottom-start",children:"Use Folder Only Source Branch?"})}),e.jsx(X,{isChecked:r.useIssuePerFolder,onChange:c=>l("useIssuePerFolder",c.target.checked),children:e.jsx(v,{label:"Allows users to input issue number for each branch folder.",hasArrow:!0,placement:"bottom-start",children:"Use 1 Issue Per Folder?"})}),e.jsx(X,{isChecked:r.reusePreviousCommitMessage,onChange:c=>l("reusePreviousCommitMessage",c.target.checked),children:e.jsx(v,{label:"Reuses the commit message from the previous commit made in Titan.",hasArrow:!0,children:"Reuse Previous Commit Message?"})})]})})]})}function At(){const{isDebug:s,setIsCommitMode:o,selectedBranchStatuses:a,showCommitView:n,setShowCommitView:r,selectedBranches:i,configurableRowData:l}=V(),[c,d]=t.useState({}),[u,h]=t.useState([]),[p,x]=t.useState([]),{isOpen:F,onOpen:B,onClose:g}=Me(),{isOpen:m,onOpen:j,onClose:k}=Me(),b=t.useMemo(()=>({resizable:!0,wrapText:!0,autoHeight:!0,filter:!0,suppressMovable:!0,editable:!1,wrapHeaderText:!0,autoHeaderHeight:!0}),[]);t.useEffect(()=>{if(i.length<1||n){i.length<1&&o(!1);return}d({})},[i,n]),t.useEffect(()=>{s&&(console.debug("Branch Status Rows:",a),console.debug("Selected Rows:",i))},[s,a,i]),t.useEffect(()=>{a.length===i.length&&(a.forEach(L=>{let N=L.id,U=L.status.filesToCommit,q=L.status.filesToUpdate;const I=l.find(O=>O.id===N);if(q.length>0){const O=ve(I["Branch Folder"],I["Branch Version"],I["SVN Branch"]);d(W=>({...W,[O]:[...W[O]||[],...q]}))}if(U.length>0){const O=U.map(W=>({branchId:N,"Branch Folder":I["Branch Folder"],"Branch Version":I["Branch Version"],"SVN Branch":I["SVN Branch"],"Full Path":W.path,"File Path":`${ut(L.status.branch)}\\${W.pathDisplay}`,"Local Status":W.wcStatus}));h(W=>[...W,...O.filter(K=>!["unversioned","missing"].includes(K["Local Status"]))]),x(W=>[...W,...O.filter(K=>["unversioned","missing"].includes(K["Local Status"]))])}}),r(!0))},[a,i,l]);const S=Object.keys(c).length>0,D=u.length>0,z=p.length>0,H=S||D||z;return e.jsxs(C,{children:[e.jsx(Mt,{}),e.jsx(C,{mb:6,children:e.jsx(Bt,{openMessageAutoFillModal:j})}),e.jsx(Js,{isLoaded:n&&H,startColor:"yelow.500",endColor:"yellow.500",children:e.jsxs(ss,{variant:"solid-rounded",colorScheme:"yellow",defaultIndex:S?0:D?1:2,isLazy:!1,children:[e.jsxs(ts,{children:[e.jsx(xe,{isDisabled:!S,children:e.jsx(v,{label:"No files to update!",hasArrow:!0,isDisabled:S,children:"Files to Update"})}),e.jsx(xe,{isDisabled:!D,children:e.jsx(v,{label:"No files to commit!",hasArrow:!0,isDisabled:D,children:"Local Changes"})}),e.jsx(xe,{isDisabled:!z,children:e.jsx(v,{label:"No unversioned/missing files!",hasArrow:!0,isDisabled:z,children:"Untracked Changes"})})]}),e.jsxs(ns,{children:[e.jsx(be,{px:0,children:e.jsx(St,{fileUpdates:c})}),e.jsx(be,{px:0,children:e.jsx(yt,{rowDataLocalChanges:u,setRowDataLocalChanges:h,defaultColDefsCommit:b})}),e.jsx(be,{px:0,children:e.jsx(kt,{rowDataUntrackedChanges:p,setRowDataUntrackedChanges:x,defaultColDefsCommit:b})})]})]})}),n&&!H?e.jsxs(P,{mt:4,className:"animation-pulse",fontWeight:600,textAlign:"center",children:["No changes have been spotted!",e.jsx("br",{}),"Please use the refresh button 👇 if you have recently made a change"]}):e.jsx(e.Fragment,{}),e.jsx(C,{mt:6,children:e.jsx(Dt,{openCommitModal:B})}),e.jsx(jt,{isModalOpen:F,closeModal:g}),e.jsx(Tt,{isModalOpen:m,closeModal:k})]})}function Lt(){const{showSelectedBranchesLog:s,setShowSelectedBranchesLog:o}=V();return e.jsxs(Xs,{isOpen:s,onClose:()=>o(!1),placement:"left",size:"full",children:[e.jsx(pe,{}),e.jsxs(Zs,{children:[e.jsx(De,{size:"lg"}),e.jsx(Ce,{children:"Selected Branches: SVN Log"}),e.jsx(we,{children:e.jsx(C,{height:"100%",children:e.jsx(cs,{})})})]})]})}function Vt(){const{toast:s,RaiseClientNotificaiton:o}=ne(),{isOpen:a,onOpen:n,onClose:r}=Me(),i=t.useRef(),[l,c]=t.useState(!1);t.useEffect(()=>{if(!window.electron){o("Electron context is not available. Updates cannot be checked.","warning",5e3);return}return window.electron.on("update-available",()=>{s.closeAll(),n()}),window.electron.on("update-error",h=>{o(`An error occurred while checking for updates: ${h}`,"error",5e3),c(!1)}),()=>{window.electron.removeAllListeners("update-available"),window.electron.removeAllListeners("update-error")}},[s,n]);const d=t.useCallback(()=>{r(),o("You may update the application later by manually triggering an update check or wait until Titan does this","info",5e3)},[r,o]),u=t.useCallback(()=>{if(l){o("Update is already in progress. Please wait.","info",5e3);return}window.electron?(c(!0),window.electron.downloadUpdate().catch(h=>{c(!1),o(`An error occurred while downloading the update: ${h}`,"error",5e3)}),window.electron.on("update-downloaded",()=>{o("Update has been downloaded successfully. Titan will now restart to apply the update.","info",5e3),window.electron.removeAllListeners("update-downloaded"),r()}),window.electron.on("update-not-available",()=>{o("Titan is up to date","info",3e3),window.electron.removeAllListeners("update-not-available"),c(!1),r()})):o("Cannot update Titan in a non-desktop application environment","error",5e3)},[l,o,c,r]);return e.jsx(Ge,{isOpen:a,leastDestructiveRef:i,onClose:r,motionPreset:"slideInBottom",closeOnOverlayClick:!l,children:e.jsx(pe,{children:e.jsxs(Qe,{children:[e.jsx(Ce,{fontSize:"lg",fontWeight:"bold",children:"Update Available"}),l?e.jsx(e.Fragment,{}):e.jsx(De,{}),e.jsx(we,{children:"A new version of Titan is available. Would you like to download and install the update?"}),e.jsxs(ke,{children:[e.jsx(E,{colorScheme:"red",ref:i,onClick:d,isDisabled:l,children:"Cancel"}),e.jsx(E,{colorScheme:"yellow",onClick:u,ml:3,isDisabled:l,children:"Confirm"})]})]})})})}function Et(){if(!window.electron)return e.jsx(e.Fragment,{});const{colorMode:s}=qe(),o=t.useCallback(()=>{window.electron.minimizeWindow()},[]),a=t.useCallback(()=>{window.electron.maximizeWindow()},[]),n=t.useCallback(()=>{window.electron.closeWindow()},[]);return e.jsx(et.header,{w:"100%",position:"fixed",bgColor:s==="light"?"white":"#121212",className:"titanHead",zIndex:9999999,top:0,children:e.jsxs(T,{justifyContent:"space-between",alignItems:"center",p:2,position:"static",children:[e.jsx(Z,{as:"h6",size:"sm",noOfLines:1,className:"animation-fadein-left-forward",children:"Titan"}),e.jsxs(T,{alignItems:"center",columnGap:2,flexWrap:"nowrap",wrap:"nowrap",children:[e.jsx($,{"aria-label":"Minimize",size:"xs",icon:e.jsx(st,{}),onClick:o,colorScheme:"gray",_hover:{bg:"#FAF089",color:"#1A202C"}}),e.jsx($,{"aria-label":"Maximize",size:"xs",icon:e.jsx(tt,{}),onClick:a,colorScheme:"gray",_hover:{bg:"#FAF089",color:"#1A202C"}}),e.jsx($,{"aria-label":"Close",size:"xs",icon:e.jsx(Ke,{}),onClick:n,colorScheme:"gray",_hover:{bg:"#FEB2B2",color:"#1A202C"}})]})]})})}function Pt(){const{isCommitMode:s,selectedBranches:o,configurableRowData:a}=V(),{RaiseClientNotificaiton:n}=ne();return t.useEffect(()=>{if(window.electron)return window.electron.onAppClosing(()=>{n("App is closing, performing cleanup...","info",0),window.electron.closeWindow()}),()=>{window.electron.removeAppClosingListener()};console.warn("Electron specific logic is not available in browser mode.")},[]),e.jsxs(C,{className:"titanBody",children:[e.jsx(Et,{}),e.jsxs(C,{p:10,children:[e.jsx(gt,{}),e.jsx(Vt,{}),e.jsxs(T,{rowGap:4,flexDirection:"column",children:[e.jsx(C,{children:e.jsx(wt,{})}),e.jsx(nt,{in:s,animateOpacity:!0,children:e.jsxs(C,{id:"sectionCommit",children:[e.jsxs(Z,{as:"h2",size:"lg",noOfLines:1,mb:4,className:"animation-pulse",lineHeight:"1.4",children:["Committing ",o.length==a.length?"All":`${o.length}/${a.length}`," Branch",o.length==1?"":"es"]}),e.jsx(At,{})]})})]}),e.jsx(Lt,{})]})]})}const{definePartsStyle:ds,defineMultiStyleConfig:us}=it(ct.keys),zt=ds({overlay:{bg:"blackAlpha.900"},dialog:{bg:"gray.900",color:"white",boxShadow:"rgba(255, 255, 255, 0.07) 0px 0px 20px 7px"},header:{bg:"gray.900",color:"white",borderRadius:"20px",p:4},body:{p:4,color:"white"},footer:{bg:"gray.900",p:4,color:"white",borderRadius:"20px"}}),Ot=us({baseStyle:zt}),Ut=ds({overlay:{bg:"blackAlpha.900"},dialog:{mt:ft,bg:"gray.900",color:"white",boxShadow:"rgba(255, 255, 255, 0.07) 0px 0px 20px 7px"},header:{bg:"gray.900",color:"white",borderRadius:"20px",p:4},body:{p:4,color:"white"},footer:{bg:"gray.900",p:2,color:"white",borderRadius:"20px"}}),Wt=us({baseStyle:Ut}),Ht={initialColorMode:"dark",useSystemColorMode:!1},$e=lt({config:Ht,components:{Modal:Ot,Drawer:Wt}});ot.createRoot(document.getElementById("root")).render(e.jsx(Ae.StrictMode,{children:e.jsxs(at,{theme:$e,children:[e.jsx(rt,{initialColorMode:$e.config.initialColorMode}),e.jsx(mt,{children:e.jsx(Pt,{})})]})})); diff --git a/dist/assets/vendor.js b/dist/assets/vendor.js index 8ba6456..6687b34 100644 --- a/dist/assets/vendor.js +++ b/dist/assets/vendor.js @@ -37,7 +37,7 @@ import{g as Kd,m as _n}from"./lodash.js";function I4(e,t){for(var n=0;n")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{op=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ha(e):""}function aO(e){switch(e.tag){case 5:return ha(e.type);case 16:return ha("Lazy");case 13:return ha("Suspense");case 19:return ha("SuspenseList");case 0:case 2:case 15:return e=ip(e.type,!1),e;case 11:return e=ip(e.type.render,!1),e;case 1:return e=ip(e.type,!0),e;default:return""}}function jh(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 Vi:return"Fragment";case Ni:return"Portal";case Vh:return"Profiler";case Qv:return"StrictMode";case zh:return"Suspense";case Bh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vk:return(e.displayName||"Context")+".Consumer";case Nk:return(e._context.displayName||"Context")+".Provider";case Zv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Jv:return t=e.displayName||null,t!==null?t:jh(e.type)||"Memo";case oo:t=e._payload,e=e._init;try{return jh(e(t))}catch{}}return null}function lO(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 jh(t);case 8:return t===Qv?"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 Po(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uO(e){var t=Bk(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function iu(e){e._valueTracker||(e._valueTracker=uO(e))}function jk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bk(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zc(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 Hh(e,t){var n=t.checked;return ze({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Po(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hk(e,t){t=t.checked,t!=null&&Xv(e,"checked",t,!1)}function Wh(e,t){Hk(e,t);var n=Po(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uh(e,t.type,Po(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="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 Uh(e,t,n){(t!=="number"||zc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ma=Array.isArray;function as(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=su.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ma={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},cO=["Webkit","ms","Moz","O"];Object.keys(Ma).forEach(function(e){cO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ma[t]=Ma[e]})});function Kk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ma.hasOwnProperty(e)&&Ma[e]?(""+t).trim():t+"px"}function Gk(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Kk(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var dO=ze({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 Gh(e,t){if(t){if(dO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Yh(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 Xh=null;function eg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qh=null,ls=null,us=null;function Jy(e){if(e=jl(e)){if(typeof Qh!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Jd(t),Qh(e.stateNode,e.type,t))}}function Yk(e){ls?us?us.push(e):us=[e]:ls=e}function Xk(){if(ls){var e=ls,t=us;if(us=ls=null,Jy(e),t)for(e=0;e>>=0,e===0?32:31-(wO(e)/kO|0)|0}var au=64,lu=4194304;function va(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 Wc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=va(a):(i&=s,i!==0&&(r=va(i)))}else s=n&~o,s!==0?r=va(s):i!==0&&(r=va(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qn(t),e[t]=n}function TO(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 r=e.eventTimes;for(e=e.expirationTimes;0=Aa),l1=" ",u1=!1;function vC(e,t){switch(e){case"keyup":return tR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zi=!1;function rR(e,t){switch(e){case"compositionend":return gC(t);case"keypress":return t.which!==32?null:(u1=!0,l1);case"textInput":return e=t.data,e===l1&&u1?null:e;default:return null}}function oR(e,t){if(zi)return e==="compositionend"||!lg&&vC(e,t)?(e=hC(),Qu=ig=co=null,zi=!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=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=p1(n)}}function xC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wC(){for(var e=window,t=zc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zc(e.document)}return t}function ug(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 pR(e){var t=wC(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xC(n.ownerDocument.documentElement,n)){if(r!==null&&ug(n)){if(t=r.start,e=r.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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=h1(n,i);var s=h1(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(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,Bi=null,rm=null,Fa=null,om=!1;function m1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;om||Bi==null||Bi!==zc(r)||(r=Bi,"selectionStart"in r&&ug(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fa&&ll(Fa,r)||(Fa=r,r=Kc(rm,"onSelect"),0Wi||(e.current=cm[Wi],cm[Wi]=null,Wi--)}function $e(e,t){Wi++,cm[Wi]=e.current,e.current=t}var Eo={},Rt=Ro(Eo),Gt=Ro(!1),fi=Eo;function ks(e,t){var n=e.type.contextTypes;if(!n)return Eo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Yt(e){return e=e.childContextTypes,e!=null}function Yc(){Ae(Gt),Ae(Rt)}function w1(e,t,n){if(Rt.current!==Eo)throw Error(I(168));$e(Rt,t),$e(Gt,n)}function RC(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,lO(e)||"Unknown",o));return ze({},n,r)}function Xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,fi=Rt.current,$e(Rt,e),$e(Gt,Gt.current),!0}function k1(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=RC(e,t,fi),r.__reactInternalMemoizedMergedChildContext=e,Ae(Gt),Ae(Rt),$e(Rt,e)):Ae(Gt),$e(Gt,n)}var Pr=null,ef=!1,bp=!1;function MC(e){Pr===null?Pr=[e]:Pr.push(e)}function PR(e){ef=!0,MC(e)}function Mo(){if(!bp&&Pr!==null){bp=!0;var e=0,t=ke;try{var n=Pr;for(ke=1;e>=s,o-=s,_r=1<<32-qn(t)+o|n<E?(_=C,C=null):_=C.sibling;var $=f(v,C,b[E],x);if($===null){C===null&&(C=_);break}e&&C&&$.alternate===null&&t(v,C),y=i($,y,E),P===null?k=$:P.sibling=$,P=$,C=_}if(E===b.length)return n(v,C),Fe&&No(v,E),k;if(C===null){for(;EE?(_=C,C=null):_=C.sibling;var M=f(v,C,$.value,x);if(M===null){C===null&&(C=_);break}e&&C&&M.alternate===null&&t(v,C),y=i(M,y,E),P===null?k=M:P.sibling=M,P=M,C=_}if($.done)return n(v,C),Fe&&No(v,E),k;if(C===null){for(;!$.done;E++,$=b.next())$=d(v,$.value,x),$!==null&&(y=i($,y,E),P===null?k=$:P.sibling=$,P=$);return Fe&&No(v,E),k}for(C=r(v,C);!$.done;E++,$=b.next())$=p(C,v,E,$.value,x),$!==null&&(e&&$.alternate!==null&&C.delete($.key===null?E:$.key),y=i($,y,E),P===null?k=$:P.sibling=$,P=$);return e&&C.forEach(function(F){return t(v,F)}),Fe&&No(v,E),k}function S(v,y,b,x){if(typeof b=="object"&&b!==null&&b.type===Vi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case ou:e:{for(var k=b.key,P=y;P!==null;){if(P.key===k){if(k=b.type,k===Vi){if(P.tag===7){n(v,P.sibling),y=o(P,b.props.children),y.return=v,v=y;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===oo&&E1(k)===P.type){n(v,P.sibling),y=o(P,b.props),y.ref=ta(v,P,b),y.return=v,v=y;break e}n(v,P);break}else t(v,P);P=P.sibling}b.type===Vi?(y=oi(b.props.children,v.mode,x,b.key),y.return=v,v=y):(x=ic(b.type,b.key,b.props,null,v.mode,x),x.ref=ta(v,y,b),x.return=v,v=x)}return s(v);case Ni:e:{for(P=b.key;y!==null;){if(y.key===P)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Tp(b,v.mode,x),y.return=v,v=y}return s(v);case oo:return P=b._init,S(v,y,P(b._payload),x)}if(ma(b))return m(v,y,b,x);if(Xs(b))return h(v,y,b,x);mu(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,b),y.return=v,v=y):(n(v,y),y=Ep(b,v.mode,x),y.return=v,v=y),s(v)):n(v,y)}return S}var Ps=FC(!0),LC=FC(!1),Jc=Ro(null),ed=null,Ki=null,pg=null;function hg(){pg=Ki=ed=null}function mg(e){var t=Jc.current;Ae(Jc),e._currentValue=t}function pm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ds(e,t){ed=e,pg=Ki=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qt=!0),e.firstContext=null)}function In(e){var t=e._currentValue;if(pg!==e)if(e={context:e,memoizedValue:t,next:null},Ki===null){if(ed===null)throw Error(I(308));Ki=e,ed.dependencies={lanes:0,firstContext:e}}else Ki=Ki.next=e;return t}var Yo=null;function vg(e){Yo===null?Yo=[e]:Yo.push(e)}function NC(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,vg(t)):(n.next=o.next,o.next=n),t.interleaved=n,zr(e,r)}function zr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var io=!1;function gg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function VC(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,he&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,zr(e,n)}return o=r.interleaved,o===null?(t.next=t,vg(r)):(t.next=o.next,o.next=t),r.interleaved=t,zr(e,n)}function Ju(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ng(e,n)}}function T1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function td(e,t,n,r){var o=e.updateQueue;io=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,h=a;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=ze({},d,f);break e;case 2:io=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);mi|=s,e.lanes=s,e.memoizedState=d}}function _1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=xp.transition;xp.transition={};try{e(!1),t()}finally{ke=n,xp.transition=r}}function n2(){return An().memoizedState}function $R(e,t,n){var r=xo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},r2(e))o2(t,n);else if(n=NC(e,t,n,r),n!==null){var o=Dt();Kn(n,e,r,o),i2(n,t,r)}}function OR(e,t,n){var r=xo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(r2(e))o2(t,o);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(o.hasEagerState=!0,o.eagerState=a,Yn(a,s)){var l=t.interleaved;l===null?(o.next=o,vg(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=NC(e,t,o,r),n!==null&&(o=Dt(),Kn(n,e,r,o),i2(n,t,r))}}function r2(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function o2(e,t){La=rd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function i2(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ng(e,n)}}var od={readContext:In,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},RR={readContext:In,useCallback:function(e,t){return ir().memoizedState=[e,t===void 0?null:t],e},useContext:In,useEffect:O1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tc(4194308,4,QC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){return tc(4,2,e,t)},useMemo:function(e,t){var n=ir();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ir();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$R.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=ir();return e={current:e},t.memoizedState=e},useState:$1,useDebugValue:Pg,useDeferredValue:function(e){return ir().memoizedState=e},useTransition:function(){var e=$1(!1),t=e[0];return e=_R.bind(null,e[1]),ir().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,o=ir();if(Fe){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),lt===null)throw Error(I(349));hi&30||HC(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,O1(UC.bind(null,r,i,e),[e]),r.flags|=2048,vl(9,WC.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ir(),t=lt.identifierPrefix;if(Fe){var n=$r,r=_r;n=(r&~(1<<32-qn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ur]=t,e[dl]=r,m2(e,t,!1,!1),t.stateNode=e;e:{switch(s=Yh(n,r),n){case"dialog":Re("cancel",e),Re("close",e),o=r;break;case"iframe":case"object":case"embed":Re("load",e),o=r;break;case"video":case"audio":for(o=0;o_s&&(t.flags|=128,r=!0,na(i,!1),t.lanes=4194304)}else{if(!r)if(e=nd(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),na(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Fe)return Ct(t),null}else 2*qe()-i.renderingStartTime>_s&&n!==1073741824&&(t.flags|=128,r=!0,na(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=qe(),t.sibling=null,n=Le.current,$e(Le,r?n&1|2:n&1),t):(Ct(t),null);case 22:case 23:return Rg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?rn&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function VR(e,t){switch(dg(t),t.tag){case 1:return Yt(t.type)&&Yc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Es(),Ae(Gt),Ae(Rt),Sg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bg(t),null;case 13:if(Ae(Le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Le),null;case 4:return Es(),null;case 10:return mg(t.type._context),null;case 22:case 23:return Rg(),null;case 24:return null;default:return null}}var gu=!1,Tt=!1,zR=typeof WeakSet=="function"?WeakSet:Set,z=null;function Gi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){He(e,t,r)}else n.current=null}function wm(e,t,n){try{n()}catch(r){He(e,t,r)}}var B1=!1;function BR(e,t){if(im=Uc,e=wC(),ug(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(sm={focusedElem:e,selectionRange:n},Uc=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,S=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:zn(t.type,h),S);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){He(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return m=B1,B1=!1,m}function Na(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&wm(t,n,i)}o=o.next}while(o!==r)}}function rf(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 r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function km(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 y2(e){var t=e.alternate;t!==null&&(e.alternate=null,y2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[dl],delete t[um],delete t[kR],delete t[CR])),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 b2(e){return e.tag===5||e.tag===3||e.tag===4}function j1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||b2(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 Cm(e,t,n){var r=e.tag;if(r===5||r===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=Gc));else if(r!==4&&(e=e.child,e!==null))for(Cm(e,t,n),e=e.sibling;e!==null;)Cm(e,t,n),e=e.sibling}function Pm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Pm(e,t,n),e=e.sibling;e!==null;)Pm(e,t,n),e=e.sibling}var ft=null,Bn=!1;function Qr(e,t,n){for(n=n.child;n!==null;)S2(e,t,n),n=n.sibling}function S2(e,t,n){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(Yd,n)}catch{}switch(n.tag){case 5:Tt||Gi(n,t);case 6:var r=ft,o=Bn;ft=null,Qr(e,t,n),ft=r,Bn=o,ft!==null&&(Bn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(Bn?(e=ft,n=n.stateNode,e.nodeType===8?yp(e.parentNode,n):e.nodeType===1&&yp(e,n),sl(e)):yp(ft,n.stateNode));break;case 4:r=ft,o=Bn,ft=n.stateNode.containerInfo,Bn=!0,Qr(e,t,n),ft=r,Bn=o;break;case 0:case 11:case 14:case 15:if(!Tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&wm(n,t,s),o=o.next}while(o!==r)}Qr(e,t,n);break;case 1:if(!Tt&&(Gi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){He(n,t,a)}Qr(e,t,n);break;case 21:Qr(e,t,n);break;case 22:n.mode&1?(Tt=(r=Tt)||n.memoizedState!==null,Qr(e,t,n),Tt=r):Qr(e,t,n);break;default:Qr(e,t,n)}}function H1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zR),t.forEach(function(r){var o=XR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*HR(r/1960))-r,10e?16:e,fo===null)var r=!1;else{if(e=fo,fo=null,ad=0,he&6)throw Error(I(331));var o=he;for(he|=4,z=e.current;z!==null;){var i=z,s=i.child;if(z.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lqe()-$g?ri(e,0):_g|=n),Xt(e,t)}function _2(e,t){t===0&&(e.mode&1?(t=lu,lu<<=1,!(lu&130023424)&&(lu=4194304)):t=1);var n=Dt();e=zr(e,t),e!==null&&(zl(e,t,n),Xt(e,n))}function YR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_2(e,n)}function XR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),_2(e,n)}var $2;$2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)qt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qt=!1,LR(e,t,n);qt=!!(e.flags&131072)}else qt=!1,Fe&&t.flags&1048576&&IC(t,Zc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nc(e,t),e=t.pendingProps;var o=ks(t,Rt.current);ds(t,n),o=wg(null,t,r,e,o,n);var i=kg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Yt(r)?(i=!0,Xc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,gg(t),o.updater=nf,t.stateNode=o,o._reactInternals=t,mm(t,r,e,n),t=ym(null,t,r,!0,i,n)):(t.tag=0,Fe&&i&&cg(t),Mt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ZR(r),e=zn(r,e),o){case 0:t=gm(null,t,r,e,n);break e;case 1:t=N1(null,t,r,e,n);break e;case 11:t=F1(null,t,r,e,n);break e;case 14:t=L1(null,t,r,zn(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),gm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),N1(e,t,r,o,n);case 3:e:{if(f2(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,VC(e,t),td(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ts(Error(I(423)),t),t=V1(e,t,r,n,o);break e}else if(r!==o){o=Ts(Error(I(424)),t),t=V1(e,t,r,n,o);break e}else for(un=yo(t.stateNode.containerInfo.firstChild),cn=t,Fe=!0,Hn=null,n=LC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cs(),r===o){t=Br(e,t,n);break e}Mt(e,t,r,n)}t=t.child}return t;case 5:return zC(t),e===null&&fm(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,am(r,o)?s=null:i!==null&&am(r,i)&&(t.flags|=32),d2(e,t),Mt(e,t,s,n),t.child;case 6:return e===null&&fm(t),null;case 13:return p2(e,t,n);case 4:return yg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ps(t,null,r,n):Mt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),F1(e,t,r,o,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,$e(Jc,r._currentValue),r._currentValue=s,i!==null)if(Yn(i.value,s)){if(i.children===o.children&&!Gt.current){t=Br(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===r){if(i.tag===1){l=Mr(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),pm(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(I(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),pm(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}Mt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ds(t,n),o=In(o),r=r(o),t.flags|=1,Mt(e,t,r,n),t.child;case 14:return r=t.type,o=zn(r,t.pendingProps),o=zn(r.type,o),L1(e,t,r,o,n);case 15:return u2(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),nc(e,t),t.tag=1,Yt(r)?(e=!0,Xc(t)):e=!1,ds(t,n),s2(t,r,o),mm(t,r,o,n),ym(null,t,r,!0,e,n);case 19:return h2(e,t,n);case 22:return c2(e,t,n)}throw Error(I(156,t.tag))};function O2(e,t){return rC(e,t)}function QR(e,t,n,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,n,r){return new QR(e,t,n,r)}function Ig(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZR(e){if(typeof e=="function")return Ig(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zv)return 11;if(e===Jv)return 14}return 2}function wo(e,t){var n=e.alternate;return n===null?(n=$n(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 ic(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Ig(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Vi:return oi(n.children,o,i,t);case Qv:s=8,o|=8;break;case Vh:return e=$n(12,n,t,o|2),e.elementType=Vh,e.lanes=i,e;case zh:return e=$n(13,n,t,o),e.elementType=zh,e.lanes=i,e;case Bh:return e=$n(19,n,t,o),e.elementType=Bh,e.lanes=i,e;case zk:return sf(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nk:s=10;break e;case Vk:s=9;break e;case Zv:s=11;break e;case Jv:s=14;break e;case oo:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=$n(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function oi(e,t,n,r){return e=$n(7,e,r,t),e.lanes=n,e}function sf(e,t,n,r){return e=$n(22,e,r,t),e.elementType=zk,e.lanes=n,e.stateNode={isHidden:!1},e}function Ep(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function Tp(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JR(e,t,n,r,o){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=ap(0),this.expirationTimes=ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ap(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ag(e,t,n,r,o,i,s,a,l){return e=new JR(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gg(i),e}function e5(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A2)}catch(e){console.error(e)}}A2(),Ak.exports=gn;var Wl=Ak.exports;const cee=Kd(Wl);var Q1=Wl;Uy.createRoot=Q1.createRoot,Uy.hydrateRoot=Q1.hydrateRoot;function i5(e){if(e.sheet)return e.sheet;for(var t=0;t0?ht(Hs,--Jt):0,$s--,Xe===10&&($s=1,ff--),Xe}function dn(){return Xe=Jt2||bl(Xe)>3?"":" "}function y5(e,t){for(;--t&&dn()&&!(Xe<48||Xe>102||Xe>57&&Xe<65||Xe>70&&Xe<97););return Ul(e,sc()+(t<6&&hr()==32&&dn()==32))}function Rm(e){for(;dn();)switch(Xe){case e:return Jt;case 34:case 39:e!==34&&e!==39&&Rm(Xe);break;case 40:e===41&&Rm(e);break;case 92:dn();break}return Jt}function b5(e,t){for(;dn()&&e+Xe!==57;)if(e+Xe===84&&hr()===47)break;return"/*"+Ul(t,Jt-1)+"*"+df(e===47?e:dn())}function S5(e){for(;!bl(hr());)dn();return Ul(e,Jt)}function x5(e){return z2(lc("",null,null,null,[""],e=V2(e),0,[0],e))}function lc(e,t,n,r,o,i,s,a,l){for(var u=0,c=0,d=s,f=0,p=0,m=0,h=1,S=1,v=1,y=0,b="",x=o,k=i,P=r,C=b;S;)switch(m=y,y=dn()){case 40:if(m!=108&&ht(C,d-1)==58){Om(C+=ge(ac(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=ac(y);break;case 9:case 10:case 13:case 32:C+=g5(m);break;case 92:C+=y5(sc()-1,7);continue;case 47:switch(hr()){case 42:case 47:Su(w5(b5(dn(),sc()),t,n),l);break;default:C+="/"}break;case 123*h:a[u++]=ar(C)*v;case 125*h:case 59:case 0:switch(y){case 0:case 125:S=0;case 59+c:v==-1&&(C=ge(C,/\f/g,"")),p>0&&ar(C)-d&&Su(p>32?J1(C+";",r,n,d-1):J1(ge(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(Su(P=Z1(C,t,n,u,c,o,a,b,x=[],k=[],d),i),y===123)if(c===0)lc(C,t,P,P,x,i,d,a,k);else switch(f===99&&ht(C,3)===110?100:f){case 100:case 108:case 109:case 115:lc(e,P,P,r&&Su(Z1(e,P,P,0,0,o,a,b,o,x=[],d),k),o,k,d,a,r?x:k);break;default:lc(C,P,P,P,[""],k,0,a,k)}}u=c=p=0,h=v=1,b=C="",d=s;break;case 58:d=1+ar(C),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&v5()==125)continue}switch(C+=df(y),y*h){case 38:v=c>0?1:(C+="\f",-1);break;case 44:a[u++]=(ar(C)-1)*v,v=1;break;case 64:hr()===45&&(C+=ac(dn())),f=hr(),c=d=ar(b=C+=S5(sc())),y++;break;case 45:m===45&&ar(C)==2&&(h=0)}}return i}function Z1(e,t,n,r,o,i,s,a,l,u,c){for(var d=o-1,f=o===0?i:[""],p=zg(f),m=0,h=0,S=0;m0?f[v]+" "+y:ge(y,/&\f/g,f[v])))&&(l[S++]=b);return pf(e,t,n,o===0?Ng:a,l,u,c)}function w5(e,t,n){return pf(e,t,n,D2,df(m5()),yl(e,2,-2),0)}function J1(e,t,n,r){return pf(e,t,n,Vg,yl(e,0,r),yl(e,r+1,-1),r)}function ps(e,t){for(var n="",r=zg(e),o=0;o6)switch(ht(e,t+1)){case 109:if(ht(e,t+4)!==45)break;case 102:return ge(e,/(.+:)(.+)-([^]+)/,"$1"+ve+"$2-$3$1"+cd+(ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Om(e,"stretch")?j2(ge(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ht(e,t+1)!==115)break;case 6444:switch(ht(e,ar(e)-3-(~Om(e,"!important")&&10))){case 107:return ge(e,":",":"+ve)+e;case 101:return ge(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ve+(ht(e,14)===45?"inline-":"")+"box$3$1"+ve+"$2$3$1"+Pt+"$2box$3")+e}break;case 5936:switch(ht(e,t+11)){case 114:return ve+e+Pt+ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ve+e+Pt+ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ve+e+Pt+ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ve+e+Pt+e+e}return e}var R5=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Vg:t.return=j2(t.value,t.length);break;case F2:return ps([oa(t,{value:ge(t.value,"@","@"+ve)})],o);case Ng:if(t.length)return h5(t.props,function(i){switch(p5(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ps([oa(t,{props:[ge(i,/:(read-\w+)/,":"+cd+"$1")]})],o);case"::placeholder":return ps([oa(t,{props:[ge(i,/:(plac\w+)/,":"+ve+"input-$1")]}),oa(t,{props:[ge(i,/:(plac\w+)/,":"+cd+"$1")]}),oa(t,{props:[ge(i,/:(plac\w+)/,Pt+"input-$1")]})],o)}return""})}},M5=[R5],I5=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var S=h.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||M5,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var S=h.getAttribute("data-emotion").split(" "),v=1;v<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ur]=t,e[dl]=r,m2(e,t,!1,!1),t.stateNode=e;e:{switch(s=Yh(n,r),n){case"dialog":Re("cancel",e),Re("close",e),o=r;break;case"iframe":case"object":case"embed":Re("load",e),o=r;break;case"video":case"audio":for(o=0;o_s&&(t.flags|=128,r=!0,na(i,!1),t.lanes=4194304)}else{if(!r)if(e=nd(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),na(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Fe)return Ct(t),null}else 2*qe()-i.renderingStartTime>_s&&n!==1073741824&&(t.flags|=128,r=!0,na(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=qe(),t.sibling=null,n=Le.current,$e(Le,r?n&1|2:n&1),t):(Ct(t),null);case 22:case 23:return Rg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?rn&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function VR(e,t){switch(dg(t),t.tag){case 1:return Yt(t.type)&&Yc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Es(),Ae(Gt),Ae(Rt),Sg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bg(t),null;case 13:if(Ae(Le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Le),null;case 4:return Es(),null;case 10:return mg(t.type._context),null;case 22:case 23:return Rg(),null;case 24:return null;default:return null}}var gu=!1,Tt=!1,zR=typeof WeakSet=="function"?WeakSet:Set,z=null;function Gi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){He(e,t,r)}else n.current=null}function wm(e,t,n){try{n()}catch(r){He(e,t,r)}}var B1=!1;function BR(e,t){if(im=Uc,e=wC(),ug(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(sm={focusedElem:e,selectionRange:n},Uc=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,S=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:zn(t.type,h),S);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){He(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return m=B1,B1=!1,m}function Na(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&wm(t,n,i)}o=o.next}while(o!==r)}}function rf(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 r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function km(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 y2(e){var t=e.alternate;t!==null&&(e.alternate=null,y2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[dl],delete t[um],delete t[kR],delete t[CR])),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 b2(e){return e.tag===5||e.tag===3||e.tag===4}function j1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||b2(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 Cm(e,t,n){var r=e.tag;if(r===5||r===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=Gc));else if(r!==4&&(e=e.child,e!==null))for(Cm(e,t,n),e=e.sibling;e!==null;)Cm(e,t,n),e=e.sibling}function Pm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Pm(e,t,n),e=e.sibling;e!==null;)Pm(e,t,n),e=e.sibling}var ft=null,Bn=!1;function Qr(e,t,n){for(n=n.child;n!==null;)S2(e,t,n),n=n.sibling}function S2(e,t,n){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(Yd,n)}catch{}switch(n.tag){case 5:Tt||Gi(n,t);case 6:var r=ft,o=Bn;ft=null,Qr(e,t,n),ft=r,Bn=o,ft!==null&&(Bn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(Bn?(e=ft,n=n.stateNode,e.nodeType===8?yp(e.parentNode,n):e.nodeType===1&&yp(e,n),sl(e)):yp(ft,n.stateNode));break;case 4:r=ft,o=Bn,ft=n.stateNode.containerInfo,Bn=!0,Qr(e,t,n),ft=r,Bn=o;break;case 0:case 11:case 14:case 15:if(!Tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&wm(n,t,s),o=o.next}while(o!==r)}Qr(e,t,n);break;case 1:if(!Tt&&(Gi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){He(n,t,a)}Qr(e,t,n);break;case 21:Qr(e,t,n);break;case 22:n.mode&1?(Tt=(r=Tt)||n.memoizedState!==null,Qr(e,t,n),Tt=r):Qr(e,t,n);break;default:Qr(e,t,n)}}function H1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zR),t.forEach(function(r){var o=XR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*HR(r/1960))-r,10e?16:e,fo===null)var r=!1;else{if(e=fo,fo=null,ad=0,he&6)throw Error(I(331));var o=he;for(he|=4,z=e.current;z!==null;){var i=z,s=i.child;if(z.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lqe()-$g?ri(e,0):_g|=n),Xt(e,t)}function _2(e,t){t===0&&(e.mode&1?(t=lu,lu<<=1,!(lu&130023424)&&(lu=4194304)):t=1);var n=Dt();e=zr(e,t),e!==null&&(zl(e,t,n),Xt(e,n))}function YR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_2(e,n)}function XR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),_2(e,n)}var $2;$2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)qt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qt=!1,LR(e,t,n);qt=!!(e.flags&131072)}else qt=!1,Fe&&t.flags&1048576&&IC(t,Zc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nc(e,t),e=t.pendingProps;var o=ks(t,Rt.current);ds(t,n),o=wg(null,t,r,e,o,n);var i=kg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Yt(r)?(i=!0,Xc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,gg(t),o.updater=nf,t.stateNode=o,o._reactInternals=t,mm(t,r,e,n),t=ym(null,t,r,!0,i,n)):(t.tag=0,Fe&&i&&cg(t),Mt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ZR(r),e=zn(r,e),o){case 0:t=gm(null,t,r,e,n);break e;case 1:t=N1(null,t,r,e,n);break e;case 11:t=F1(null,t,r,e,n);break e;case 14:t=L1(null,t,r,zn(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),gm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),N1(e,t,r,o,n);case 3:e:{if(f2(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,VC(e,t),td(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ts(Error(I(423)),t),t=V1(e,t,r,n,o);break e}else if(r!==o){o=Ts(Error(I(424)),t),t=V1(e,t,r,n,o);break e}else for(un=yo(t.stateNode.containerInfo.firstChild),cn=t,Fe=!0,Hn=null,n=LC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cs(),r===o){t=Br(e,t,n);break e}Mt(e,t,r,n)}t=t.child}return t;case 5:return zC(t),e===null&&fm(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,am(r,o)?s=null:i!==null&&am(r,i)&&(t.flags|=32),d2(e,t),Mt(e,t,s,n),t.child;case 6:return e===null&&fm(t),null;case 13:return p2(e,t,n);case 4:return yg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ps(t,null,r,n):Mt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),F1(e,t,r,o,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,$e(Jc,r._currentValue),r._currentValue=s,i!==null)if(Yn(i.value,s)){if(i.children===o.children&&!Gt.current){t=Br(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===r){if(i.tag===1){l=Mr(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),pm(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(I(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),pm(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}Mt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ds(t,n),o=In(o),r=r(o),t.flags|=1,Mt(e,t,r,n),t.child;case 14:return r=t.type,o=zn(r,t.pendingProps),o=zn(r.type,o),L1(e,t,r,o,n);case 15:return u2(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zn(r,o),nc(e,t),t.tag=1,Yt(r)?(e=!0,Xc(t)):e=!1,ds(t,n),s2(t,r,o),mm(t,r,o,n),ym(null,t,r,!0,e,n);case 19:return h2(e,t,n);case 22:return c2(e,t,n)}throw Error(I(156,t.tag))};function O2(e,t){return rC(e,t)}function QR(e,t,n,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,n,r){return new QR(e,t,n,r)}function Ig(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ZR(e){if(typeof e=="function")return Ig(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zv)return 11;if(e===Jv)return 14}return 2}function wo(e,t){var n=e.alternate;return n===null?(n=$n(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 ic(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Ig(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Vi:return oi(n.children,o,i,t);case Qv:s=8,o|=8;break;case Vh:return e=$n(12,n,t,o|2),e.elementType=Vh,e.lanes=i,e;case zh:return e=$n(13,n,t,o),e.elementType=zh,e.lanes=i,e;case Bh:return e=$n(19,n,t,o),e.elementType=Bh,e.lanes=i,e;case zk:return sf(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nk:s=10;break e;case Vk:s=9;break e;case Zv:s=11;break e;case Jv:s=14;break e;case oo:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=$n(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function oi(e,t,n,r){return e=$n(7,e,r,t),e.lanes=n,e}function sf(e,t,n,r){return e=$n(22,e,r,t),e.elementType=zk,e.lanes=n,e.stateNode={isHidden:!1},e}function Ep(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function Tp(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JR(e,t,n,r,o){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=ap(0),this.expirationTimes=ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ap(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ag(e,t,n,r,o,i,s,a,l){return e=new JR(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gg(i),e}function e5(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A2)}catch(e){console.error(e)}}A2(),Ak.exports=gn;var Wl=Ak.exports;const cee=Kd(Wl);var Q1=Wl;Uy.createRoot=Q1.createRoot,Uy.hydrateRoot=Q1.hydrateRoot;function i5(e){if(e.sheet)return e.sheet;for(var t=0;t0?ht(Hs,--Jt):0,$s--,Qe===10&&($s=1,ff--),Qe}function dn(){return Qe=Jt2||bl(Qe)>3?"":" "}function y5(e,t){for(;--t&&dn()&&!(Qe<48||Qe>102||Qe>57&&Qe<65||Qe>70&&Qe<97););return Ul(e,sc()+(t<6&&hr()==32&&dn()==32))}function Rm(e){for(;dn();)switch(Qe){case e:return Jt;case 34:case 39:e!==34&&e!==39&&Rm(Qe);break;case 40:e===41&&Rm(e);break;case 92:dn();break}return Jt}function b5(e,t){for(;dn()&&e+Qe!==57;)if(e+Qe===84&&hr()===47)break;return"/*"+Ul(t,Jt-1)+"*"+df(e===47?e:dn())}function S5(e){for(;!bl(hr());)dn();return Ul(e,Jt)}function x5(e){return z2(lc("",null,null,null,[""],e=V2(e),0,[0],e))}function lc(e,t,n,r,o,i,s,a,l){for(var u=0,c=0,d=s,f=0,p=0,m=0,h=1,S=1,v=1,y=0,b="",x=o,k=i,P=r,C=b;S;)switch(m=y,y=dn()){case 40:if(m!=108&&ht(C,d-1)==58){Om(C+=ge(ac(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=ac(y);break;case 9:case 10:case 13:case 32:C+=g5(m);break;case 92:C+=y5(sc()-1,7);continue;case 47:switch(hr()){case 42:case 47:Su(w5(b5(dn(),sc()),t,n),l);break;default:C+="/"}break;case 123*h:a[u++]=ar(C)*v;case 125*h:case 59:case 0:switch(y){case 0:case 125:S=0;case 59+c:v==-1&&(C=ge(C,/\f/g,"")),p>0&&ar(C)-d&&Su(p>32?J1(C+";",r,n,d-1):J1(ge(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(Su(P=Z1(C,t,n,u,c,o,a,b,x=[],k=[],d),i),y===123)if(c===0)lc(C,t,P,P,x,i,d,a,k);else switch(f===99&&ht(C,3)===110?100:f){case 100:case 108:case 109:case 115:lc(e,P,P,r&&Su(Z1(e,P,P,0,0,o,a,b,o,x=[],d),k),o,k,d,a,r?x:k);break;default:lc(C,P,P,P,[""],k,0,a,k)}}u=c=p=0,h=v=1,b=C="",d=s;break;case 58:d=1+ar(C),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&v5()==125)continue}switch(C+=df(y),y*h){case 38:v=c>0?1:(C+="\f",-1);break;case 44:a[u++]=(ar(C)-1)*v,v=1;break;case 64:hr()===45&&(C+=ac(dn())),f=hr(),c=d=ar(b=C+=S5(sc())),y++;break;case 45:m===45&&ar(C)==2&&(h=0)}}return i}function Z1(e,t,n,r,o,i,s,a,l,u,c){for(var d=o-1,f=o===0?i:[""],p=zg(f),m=0,h=0,S=0;m0?f[v]+" "+y:ge(y,/&\f/g,f[v])))&&(l[S++]=b);return pf(e,t,n,o===0?Ng:a,l,u,c)}function w5(e,t,n){return pf(e,t,n,D2,df(m5()),yl(e,2,-2),0)}function J1(e,t,n,r){return pf(e,t,n,Vg,yl(e,0,r),yl(e,r+1,-1),r)}function ps(e,t){for(var n="",r=zg(e),o=0;o6)switch(ht(e,t+1)){case 109:if(ht(e,t+4)!==45)break;case 102:return ge(e,/(.+:)(.+)-([^]+)/,"$1"+ve+"$2-$3$1"+cd+(ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Om(e,"stretch")?j2(ge(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ht(e,t+1)!==115)break;case 6444:switch(ht(e,ar(e)-3-(~Om(e,"!important")&&10))){case 107:return ge(e,":",":"+ve)+e;case 101:return ge(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ve+(ht(e,14)===45?"inline-":"")+"box$3$1"+ve+"$2$3$1"+Pt+"$2box$3")+e}break;case 5936:switch(ht(e,t+11)){case 114:return ve+e+Pt+ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ve+e+Pt+ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ve+e+Pt+ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ve+e+Pt+e+e}return e}var R5=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Vg:t.return=j2(t.value,t.length);break;case F2:return ps([oa(t,{value:ge(t.value,"@","@"+ve)})],o);case Ng:if(t.length)return h5(t.props,function(i){switch(p5(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ps([oa(t,{props:[ge(i,/:(read-\w+)/,":"+cd+"$1")]})],o);case"::placeholder":return ps([oa(t,{props:[ge(i,/:(plac\w+)/,":"+ve+"input-$1")]}),oa(t,{props:[ge(i,/:(plac\w+)/,":"+cd+"$1")]}),oa(t,{props:[ge(i,/:(plac\w+)/,Pt+"input-$1")]})],o)}return""})}},M5=[R5],I5=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var S=h.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||M5,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var S=h.getAttribute("data-emotion").split(" "),v=1;v{document.head.removeChild(c)}},[t]),w.jsx(hj,{isPresent:t,childRef:r,sizeRef:o,children:g.cloneElement(e,{ref:r})})}const ah=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=QP(vj),l=g.useId(),u=g.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c=>{a.set(c,!0);for(const d of a.values())if(!d)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),i?[Math.random()]:[n]);return g.useMemo(()=>{a.forEach((c,d)=>a.set(d,!1))},[n]),g.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(mj,{isPresent:n,children:e})),w.jsx(Kl.Provider,{value:u,children:e})};function vj(){return new Map}function gj(e){return g.useEffect(()=>()=>e(),[])}const jo=e=>e.key||"";function yj(e,t){e.forEach(n=>{const r=jo(n);t.set(r,n)})}function bj(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const Do=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{const a=g.useContext(f0).forceRender||pj()[0],l=iT(),u=bj(e);let c=u;const d=g.useRef(new Map).current,f=g.useRef(c),p=g.useRef(new Map).current,m=g.useRef(!0);if(l0(()=>{m.current=!1,yj(u,p),f.current=c}),gj(()=>{m.current=!0,p.clear(),d.clear()}),m.current)return w.jsx(w.Fragment,{children:c.map(y=>w.jsx(ah,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:y},jo(y)))});c=[...c];const h=f.current.map(jo),S=u.map(jo),v=h.length;for(let y=0;y{if(S.indexOf(b)!==-1)return;const x=p.get(b);if(!x)return;const k=h.indexOf(b);let P=y;if(!P){const C=()=>{d.delete(b);const E=Array.from(p.keys()).filter(_=>!S.includes(_));if(E.forEach(_=>p.delete(_)),f.current=u.filter(_=>{const $=jo(_);return $===b||E.includes($)}),!d.size){if(l.current===!1)return;a(),r&&r()}};P=w.jsx(ah,{isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:i,mode:s,children:x},jo(x)),d.set(b,P)}c.splice(k,0,P)}),c=c.map(y=>{const b=y.key;return d.has(b)?y:w.jsx(ah,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:y},jo(y))}),w.jsx(w.Fragment,{children:d.size?c:c.map(y=>g.cloneElement(y))})};var Sj={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},sT=g.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:o,requestClose:i=!1,position:s="bottom",duration:a=5e3,containerStyle:l,motionVariants:u=Sj,toastSpacing:c="0.5rem"}=e,[d,f]=g.useState(a),p=v9();Pl(()=>{p||r==null||r()},[p]),Pl(()=>{f(a)},[a]);const m=()=>f(null),h=()=>f(a),S=()=>{p&&o()};g.useEffect(()=>{p&&i&&o()},[p,i,o]),YN(S,d);const v=g.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),y=g.useMemo(()=>KN(s),[s]);return w.jsx(Xr.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:m,onHoverEnd:h,custom:{position:s},style:y,children:w.jsx(A.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:v,children:Kt(n,{id:t,onClose:S})})})});sT.displayName="ToastComponent";function xj(e,t){var n;const r=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=i==null?void 0:i[t])!=null?n:r}var fx={path:w.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[w.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),w.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),w.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Qn=U((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:s,className:a,__css:l,...u}=e,c=Z("chakra-icon",a),d=en("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...d},p={ref:t,focusable:i,className:c,__css:f},m=r??fx.viewBox;if(n&&typeof n!="string")return w.jsx(A.svg,{as:n,...p,...u});const h=s??fx.path;return w.jsx(A.svg,{verticalAlign:"middle",viewBox:m,...p,...u,children:h})});Qn.displayName="Icon";function ki(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,i=g.Children.toArray(e.path),s=U((a,l)=>w.jsx(Qn,{ref:l,viewBox:t,...o,...a,children:i.length?i:w.jsx("path",{fill:"currentColor",d:n})}));return s.displayName=r,s}function wj(e){return w.jsx(Qn,{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function kj(e){return w.jsx(Qn,{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function px(e){return w.jsx(Qn,{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var Cj=Xn({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Vf=U((e,t)=>{const n=en("Spinner",e),{label:r="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:s="transparent",className:a,...l}=Ye(e),u=Z("chakra-spinner",a),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:s,borderLeftColor:s,animation:`${Cj} ${i} linear infinite`,...n};return w.jsx(A.div,{ref:t,__css:c,className:u,...l,children:r&&w.jsx(A.span,{srOnly:!0,children:r})})});Vf.displayName="Spinner";var[Pj,I0]=Ge({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Ej,A0]=Ge({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),aT={info:{icon:kj,colorScheme:"blue"},warning:{icon:px,colorScheme:"orange"},success:{icon:wj,colorScheme:"green"},error:{icon:px,colorScheme:"red"},loading:{icon:Vf,colorScheme:"blue"}};function Tj(e){return aT[e].colorScheme}function _j(e){return aT[e].icon}var lT=U(function(t,n){const r=A0(),{status:o}=I0(),i={display:"inline",...r.description};return w.jsx(A.div,{ref:n,"data-status":o,...t,className:Z("chakra-alert__desc",t.className),__css:i})});lT.displayName="AlertDescription";function uT(e){const{status:t}=I0(),n=_j(t),r=A0(),o=t==="loading"?r.spinner:r.icon;return w.jsx(A.span,{display:"inherit","data-status":t,...e,className:Z("chakra-alert__icon",e.className),__css:o,children:e.children||w.jsx(n,{h:"100%",w:"100%"})})}uT.displayName="AlertIcon";var cT=U(function(t,n){const r=A0(),{status:o}=I0();return w.jsx(A.div,{ref:n,"data-status":o,...t,className:Z("chakra-alert__title",t.className),__css:r.title})});cT.displayName="AlertTitle";var dT=U(function(t,n){var r;const{status:o="info",addRole:i=!0,...s}=Ye(t),a=(r=t.colorScheme)!=null?r:Tj(o),l=ut("Alert",{...t,colorScheme:a}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return w.jsx(Pj,{value:{status:o},children:w.jsx(Ej,{value:l,children:w.jsx(A.div,{"data-status":o,role:i?"alert":void 0,ref:n,...s,className:Z("chakra-alert",t.className),__css:u})})})});dT.displayName="Alert";function $j(e){return w.jsx(Qn,{focusable:"false","aria-hidden":!0,...e,children:w.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var D0=U(function(t,n){const r=en("CloseButton",t),{children:o,isDisabled:i,__css:s,...a}=Ye(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return w.jsx(A.button,{type:"button","aria-label":"Close",ref:n,disabled:i,__css:{...l,...r,...s},...a,children:o||w.jsx($j,{width:"1em",height:"1em"})})});D0.displayName="CloseButton";var Oj={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},cr=Rj(Oj);function Rj(e){let t=e;const n=new Set,r=o=>{t=o(t),n.forEach(i=>i())};return{getState:()=>t,subscribe:o=>(n.add(o),()=>{r(()=>e),n.delete(o)}),removeToast:(o,i)=>{r(s=>({...s,[i]:s[i].filter(a=>a.id!=o)}))},notify:(o,i)=>{const s=Mj(o,i),{position:a,id:l}=s;return r(u=>{var c,d;const p=a.includes("top")?[s,...(c=u[a])!=null?c:[]]:[...(d=u[a])!=null?d:[],s];return{...u,[a]:p}}),l},update:(o,i)=>{o&&r(s=>{const a={...s},{position:l,index:u}=eS(a,o);return l&&u!==-1&&(a[l][u]={...a[l][u],...i,message:fT(i)}),a})},closeAll:({positions:o}={})=>{r(i=>(o??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=i[u].map(c=>({...c,requestClose:!0})),l),{...i}))},close:o=>{r(i=>{const s=IP(i,o);return s?{...i,[s]:i[s].map(a=>a.id==o?{...a,requestClose:!0}:a)}:i})},isActive:o=>!!eS(cr.getState(),o).position}}var hx=0;function Mj(e,t={}){var n,r;hx+=1;const o=(n=t.id)!=null?n:hx,i=(r=t.position)!=null?r:"bottom";return{id:o,message:e,position:i,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>cr.removeToast(String(o),i),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Ij=e=>{const{status:t,variant:n="solid",id:r,title:o,isClosable:i,onClose:s,description:a,colorScheme:l,icon:u}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return w.jsxs(dT,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[w.jsx(uT,{children:u}),w.jsxs(A.div,{flex:"1",maxWidth:"100%",children:[o&&w.jsx(cT,{id:c==null?void 0:c.title,children:o}),a&&w.jsx(lT,{id:c==null?void 0:c.description,display:"block",children:a})]}),i&&w.jsx(D0,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function fT(e={}){const{render:t,toastComponent:n=Ij}=e;return o=>typeof t=="function"?t({...o,...e}):w.jsx(n,{...o,...e})}function Aj(e,t){const n=o=>{var i;return{...t,...o,position:xj((i=o==null?void 0:o.position)!=null?i:t==null?void 0:t.position,e)}},r=o=>{const i=n(o),s=fT(i);return cr.notify(s,i)};return r.update=(o,i)=>{cr.update(o,n(i))},r.promise=(o,i)=>{const s=r({...i.loading,status:"loading",duration:null});o.then(a=>r.update(s,{status:"success",duration:5e3,...Kt(i.success,a)})).catch(a=>r.update(s,{status:"error",duration:5e3,...Kt(i.error,a)}))},r.closeAll=cr.closeAll,r.close=cr.close,r.isActive=cr.isActive,r}var[Dj,Fj]=Ge({name:"ToastOptionsContext",strict:!1}),Lj=e=>{const t=g.useSyncExternalStore(cr.subscribe,cr.getState,cr.getState),{motionVariants:n,component:r=sT,portalProps:o}=e,s=Object.keys(t).map(a=>{const l=t[a];return w.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${a}`,id:`chakra-toast-manager-${a}`,style:GN(a),children:w.jsx(Do,{initial:!1,children:l.map(u=>w.jsx(r,{motionVariants:n,...u},u.id))})},a)});return w.jsx(Ws,{...o,children:s})};function mee(e){const{theme:t}=rP(),n=Fj();return g.useMemo(()=>Aj(t.direction,{...n,...e}),[e,t.direction,n])}var Nj=e=>function({children:n,theme:r=e,toastOptions:o,...i}){return w.jsxs(UN,{theme:r,...i,children:[w.jsx(Dj,{value:o==null?void 0:o.defaultOptions,children:n}),w.jsx(Lj,{...o})]})},vee=Nj(CP),Vj=Object.defineProperty,zj=(e,t,n)=>t in e?Vj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,je=(e,t,n)=>(zj(e,typeof t!="symbol"?t+"":t,n),n);function mx(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Bj=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function vx(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function gx(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var iv=typeof window<"u"?g.useLayoutEffect:g.useEffect,wd=e=>e,jj=class{constructor(){je(this,"descendants",new Map),je(this,"register",e=>{if(e!=null)return Bj(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),je(this,"unregister",e=>{this.descendants.delete(e);const t=mx(Array.from(this.descendants.keys()));this.assignIndex(t)}),je(this,"destroy",()=>{this.descendants.clear()}),je(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),je(this,"count",()=>this.descendants.size),je(this,"enabledCount",()=>this.enabledValues().length),je(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),je(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),je(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),je(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),je(this,"first",()=>this.item(0)),je(this,"firstEnabled",()=>this.enabledItem(0)),je(this,"last",()=>this.item(this.descendants.size-1)),je(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),je(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),je(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),je(this,"next",(e,t=!0)=>{const n=vx(e,this.count(),t);return this.item(n)}),je(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=vx(r,this.enabledCount(),t);return this.enabledItem(o)}),je(this,"prev",(e,t=!0)=>{const n=gx(e,this.count()-1,t);return this.item(n)}),je(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=gx(r,this.enabledCount()-1,t);return this.enabledItem(o)}),je(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=mx(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function Hj(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function mn(...e){return t=>{e.forEach(n=>{Hj(n,t)})}}function Wj(...e){return g.useMemo(()=>mn(...e),e)}function Uj(){const e=g.useRef(new jj);return iv(()=>()=>e.current.destroy()),e.current}var[qj,pT]=Ge({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Kj(e){const t=pT(),[n,r]=g.useState(-1),o=g.useRef(null);iv(()=>()=>{o.current&&t.unregister(o.current)},[]),iv(()=>{if(!o.current)return;const s=Number(o.current.dataset.index);n!=s&&!Number.isNaN(s)&&r(s)});const i=wd(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:mn(i,o)}}function hT(){return[wd(qj),()=>wd(pT()),()=>Uj(),o=>Kj(o)]}function mT(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(f,p)=>f!==p}=e,i=Rn(r),s=Rn(o),[a,l]=g.useState(n),u=t!==void 0,c=u?t:a,d=Rn(f=>{const m=typeof f=="function"?f(c):f;s(c,m)&&(u||l(m),i(m))},[u,i,c,s]);return[c,d]}var Jo={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},ua={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function sv(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return ua.slideRight;case"left":return ua.slideLeft;case"bottom":return ua.slideDown;case"top":return ua.slideUp;default:return ua.slideRight}}var ui={enter:{duration:.2,ease:Jo.easeOut},exit:{duration:.1,ease:Jo.easeIn}},Gn={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},Gj=e=>e!=null&&parseInt(e.toString(),10)>0,yx={exit:{height:{duration:.2,ease:Jo.ease},opacity:{duration:.3,ease:Jo.ease}},enter:{height:{duration:.3,ease:Jo.ease},opacity:{duration:.4,ease:Jo.ease}}},Yj={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{...e&&{opacity:Gj(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(i=n==null?void 0:n.exit)!=null?i:Gn.exit(yx.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(i=n==null?void 0:n.enter)!=null?i:Gn.enter(yx.enter,o)}}},Xj=g.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:i=0,endingHeight:s="auto",style:a,className:l,transition:u,transitionEnd:c,...d}=e,[f,p]=g.useState(!1);g.useEffect(()=>{const y=setTimeout(()=>{p(!0)});return()=>clearTimeout(y)},[]),k3({condition:Number(i)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const m=parseFloat(i.toString())>0,h={startingHeight:i,endingHeight:s,animateOpacity:o,transition:f?u:{enter:{duration:0}},transitionEnd:{enter:c==null?void 0:c.enter,exit:r?c==null?void 0:c.exit:{...c==null?void 0:c.exit,display:m?"block":"none"}}},S=r?n:!0,v=n||r?"enter":"exit";return w.jsx(Do,{initial:!1,custom:h,children:S&&w.jsx(Xr.div,{ref:t,...d,className:Z("chakra-collapse",l),style:{overflow:"hidden",display:"block",...a},custom:h,variants:Yj,initial:r?"exit":!1,animate:v,exit:"exit"})})});Xj.displayName="Collapse";var Qj={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Gn.enter(ui.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:Gn.exit(ui.exit,n),transitionEnd:t==null?void 0:t.exit}}},vT={initial:"exit",animate:"enter",exit:"exit",variants:Qj},Zj=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:i,transition:s,transitionEnd:a,delay:l,...u}=t,c=o||r?"enter":"exit",d=r?o&&r:!0,f={transition:s,transitionEnd:a,delay:l};return w.jsx(Do,{custom:f,children:d&&w.jsx(Xr.div,{ref:n,className:Z("chakra-fade",i),custom:f,...vT,animate:c,...u})})});Zj.displayName="Fade";var Jj={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(i=n==null?void 0:n.exit)!=null?i:Gn.exit(ui.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Gn.enter(ui.enter,n),transitionEnd:e==null?void 0:e.enter}}},gT={initial:"exit",animate:"enter",exit:"exit",variants:Jj},e8=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:i=!0,initialScale:s=.95,className:a,transition:l,transitionEnd:u,delay:c,...d}=t,f=r?o&&r:!0,p=o||r?"enter":"exit",m={initialScale:s,reverse:i,transition:l,transitionEnd:u,delay:c};return w.jsx(Do,{custom:m,children:f&&w.jsx(Xr.div,{ref:n,className:Z("chakra-offset-slide",a),...gT,animate:p,custom:m,...d})})});e8.displayName="ScaleFade";var t8={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{opacity:0,x:e,y:t,transition:(i=n==null?void 0:n.exit)!=null?i:Gn.exit(ui.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:Gn.enter(ui.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:i})=>{var s;const a={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:Gn.exit(ui.exit,i),...o?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},Pa={initial:"initial",animate:"enter",exit:"exit",variants:t8},n8=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:i=!0,className:s,offsetX:a=0,offsetY:l=8,transition:u,transitionEnd:c,delay:d,...f}=t,p=r?o&&r:!0,m=o||r?"enter":"exit",h={offsetX:a,offsetY:l,reverse:i,transition:u,transitionEnd:c,delay:d};return w.jsx(Do,{custom:h,children:p&&w.jsx(Xr.div,{ref:n,className:Z("chakra-offset-slide",s),custom:h,...Pa,animate:m,...f})})});n8.displayName="SlideFade";var bx={exit:{duration:.15,ease:Jo.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},r8={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:i}=sv({direction:e});return{...i,transition:(o=t==null?void 0:t.exit)!=null?o:Gn.exit(bx.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:i}=sv({direction:e});return{...i,transition:(o=n==null?void 0:n.enter)!=null?o:Gn.enter(bx.enter,r),transitionEnd:t==null?void 0:t.enter}}},yT=g.forwardRef(function(t,n){const{direction:r="right",style:o,unmountOnExit:i,in:s,className:a,transition:l,transitionEnd:u,delay:c,motionProps:d,...f}=t,p=sv({direction:r}),m=Object.assign({position:"fixed"},p.position,o),h=i?s&&i:!0,S=s||i?"enter":"exit",v={transitionEnd:u,transition:l,direction:r,delay:c};return w.jsx(Do,{custom:v,children:h&&w.jsx(Xr.div,{...f,ref:n,initial:"exit",className:Z("chakra-slide",a),animate:S,exit:"exit",custom:v,variants:r8,style:m,...d})})});yT.displayName="Slide";var av=U(function(t,n){const{htmlWidth:r,htmlHeight:o,alt:i,...s}=t;return w.jsx("img",{width:r,height:o,ref:n,alt:i,...s})});av.displayName="NativeImage";function o8(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:i,crossOrigin:s,sizes:a,ignoreFallback:l}=e,[u,c]=g.useState("pending");g.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=g.useRef(),f=g.useCallback(()=>{if(!n)return;p();const m=new Image;m.src=n,s&&(m.crossOrigin=s),r&&(m.srcset=r),a&&(m.sizes=a),t&&(m.loading=t),m.onload=h=>{p(),c("loaded"),o==null||o(h)},m.onerror=h=>{p(),c("failed"),i==null||i(h)},d.current=m},[n,s,r,a,o,i,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return Ir(()=>{if(!l)return u==="loading"&&f(),()=>{p()}},[u,f,l]),l?"loaded":u}var i8=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function s8(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var a8=U(function(t,n){const{fallbackSrc:r,fallback:o,src:i,srcSet:s,align:a,fit:l,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:p,...m}=t,h=r!==void 0||o!==void 0,S=u!=null||c||!h,v=o8({...t,crossOrigin:d,ignoreFallback:S}),y=i8(v,f),b={ref:n,objectFit:l,objectPosition:a,...S?m:s8(m,["onError","onLoad"])};return y?o||w.jsx(A.img,{as:av,className:"chakra-image__placeholder",src:r,...b}):w.jsx(A.img,{as:av,src:i,srcSet:s,crossOrigin:d,loading:u,referrerPolicy:p,className:"chakra-image",...b})});a8.displayName="Image";function F0(e){return g.Children.toArray(e).filter(t=>g.isValidElement(t))}var[gee,l8]=Ge({strict:!1,name:"ButtonGroupContext"});function u8(e){const[t,n]=g.useState(!e);return{ref:g.useCallback(i=>{i&&n(i.tagName==="BUTTON")},[]),type:t?"button":void 0}}function lv(e){const{children:t,className:n,...r}=e,o=g.isValidElement(t)?g.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,i=Z("chakra-button__icon",n);return w.jsx(A.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:i,children:o})}lv.displayName="ButtonIcon";function uv(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=w.jsx(Vf,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:s,...a}=e,l=Z("chakra-button__spinner",i),u=n==="start"?"marginEnd":"marginStart",c=g.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...s}),[s,t,u,r]);return w.jsx(A.div,{className:l,...a,__css:c,children:o})}uv.displayName="ButtonSpinner";var bT=U((e,t)=>{const n=l8(),r=en("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:i,isActive:s,children:a,leftIcon:l,rightIcon:u,loadingText:c,iconSpacing:d="0.5rem",type:f,spinner:p,spinnerPlacement:m="start",className:h,as:S,...v}=Ye(e),y=g.useMemo(()=>{const P={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:P}}},[r,n]),{ref:b,type:x}=u8(S),k={rightIcon:u,leftIcon:l,iconSpacing:d,children:a};return w.jsxs(A.button,{ref:Wj(t,b),as:S,type:f??x,"data-active":ce(s),"data-loading":ce(i),__css:y,className:Z("chakra-button",h),...v,disabled:o||i,children:[i&&m==="start"&&w.jsx(uv,{className:"chakra-button__spinner--start",label:c,placement:"start",spacing:d,children:p}),i?c||w.jsx(A.span,{opacity:0,children:w.jsx(Sx,{...k})}):w.jsx(Sx,{...k}),i&&m==="end"&&w.jsx(uv,{className:"chakra-button__spinner--end",label:c,placement:"end",spacing:d,children:p})]})});bT.displayName="Button";function Sx(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return w.jsxs(w.Fragment,{children:[t&&w.jsx(lv,{marginEnd:o,children:t}),r,n&&w.jsx(lv,{marginStart:o,children:n})]})}var c8=U((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":i,...s}=e,a=n||r,l=g.isValidElement(a)?g.cloneElement(a,{"aria-hidden":!0,focusable:!1}):null;return w.jsx(bT,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":i,...s,children:l})});c8.displayName="IconButton";var[d8,f8]=Ge({name:"CheckboxGroupContext",strict:!1});function xx(e){return e&&$t(e)&&$t(e.target)}function p8(e={}){const{defaultValue:t,value:n,onChange:r,isDisabled:o,isNative:i}=e,s=Rn(r),[a,l]=mT({value:n,defaultValue:t||[],onChange:s}),u=g.useCallback(d=>{if(!a)return;const f=xx(d)?d.target.checked:!a.includes(d),p=xx(d)?d.target.value:d,m=f?[...a,p]:a.filter(h=>String(h)!==String(p));l(m)},[l,a]),c=g.useCallback((d={})=>({...d,[i?"checked":"isChecked"]:a.some(p=>String(d.value)===String(p)),onChange:u}),[u,i,a]);return{value:a,isDisabled:o,onChange:u,setValue:l,getCheckboxProps:c}}function h8(e){const{colorScheme:t,size:n,variant:r,children:o,isDisabled:i}=e,{value:s,onChange:a}=p8(e),l=g.useMemo(()=>({size:n,onChange:a,colorScheme:t,value:s,variant:r,isDisabled:i}),[n,a,t,s,r,i]);return w.jsx(d8,{value:l,children:o})}h8.displayName="CheckboxGroup";function m8(e){const[t,n]=g.useState(e),[r,o]=g.useState(!1);return e!==t&&(o(!0),n(e)),r}function v8(e){return w.jsx(A.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:w.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function g8(e){return w.jsx(A.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:w.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function y8(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?g8:v8;return n||t?w.jsx(A.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:w.jsx(o,{...r})}):null}var[b8,ST]=Ge({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[S8,zf]=Ge({strict:!1,name:"FormControlContext"});function x8(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:i,...s}=e,a=g.useId(),l=t||`field-${a}`,u=`${l}-label`,c=`${l}-feedback`,d=`${l}-helptext`,[f,p]=g.useState(!1),[m,h]=g.useState(!1),[S,v]=g.useState(!1),y=g.useCallback((C={},E=null)=>({id:d,...C,ref:mn(E,_=>{_&&h(!0)})}),[d]),b=g.useCallback((C={},E=null)=>({...C,ref:E,"data-focus":ce(S),"data-disabled":ce(o),"data-invalid":ce(r),"data-readonly":ce(i),id:C.id!==void 0?C.id:u,htmlFor:C.htmlFor!==void 0?C.htmlFor:l}),[l,o,S,r,i,u]),x=g.useCallback((C={},E=null)=>({id:c,...C,ref:mn(E,_=>{_&&p(!0)}),"aria-live":"polite"}),[c]),k=g.useCallback((C={},E=null)=>({...C,...s,ref:E,role:"group","data-focus":ce(S),"data-disabled":ce(o),"data-invalid":ce(r),"data-readonly":ce(i)}),[s,o,S,r,i]),P=g.useCallback((C={},E=null)=>({...C,ref:E,role:"presentation","aria-hidden":!0,children:C.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!i,isDisabled:!!o,isFocused:!!S,onFocus:()=>v(!0),onBlur:()=>v(!1),hasFeedbackText:f,setHasFeedbackText:p,hasHelpText:m,setHasHelpText:h,id:l,labelId:u,feedbackId:c,helpTextId:d,htmlProps:s,getHelpTextProps:y,getErrorMessageProps:x,getRootProps:k,getLabelProps:b,getRequiredIndicatorProps:P}}var w8=U(function(t,n){const r=ut("Form",t),o=Ye(t),{getRootProps:i,htmlProps:s,...a}=x8(o),l=Z("chakra-form-control",t.className);return w.jsx(S8,{value:a,children:w.jsx(b8,{value:r,children:w.jsx(A.div,{...i({},n),className:l,__css:r.container})})})});w8.displayName="FormControl";var k8=U(function(t,n){const r=zf(),o=ST(),i=Z("chakra-form__helper-text",t.className);return w.jsx(A.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:i})});k8.displayName="FormHelperText";var C8=U(function(t,n){var r;const o=en("FormLabel",t),i=Ye(t),{className:s,children:a,requiredIndicator:l=w.jsx(xT,{}),optionalIndicator:u=null,...c}=i,d=zf(),f=(r=d==null?void 0:d.getLabelProps(c,n))!=null?r:{ref:n,...c};return w.jsxs(A.label,{...f,className:Z("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...o},children:[a,d!=null&&d.isRequired?l:u]})});C8.displayName="FormLabel";var xT=U(function(t,n){const r=zf(),o=ST();if(!(r!=null&&r.isRequired))return null;const i=Z("chakra-form__required-indicator",t.className);return w.jsx(A.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:i})});xT.displayName="RequiredIndicator";function L0(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...i}=wT(e);return{...i,disabled:t,readOnly:r,required:o,"aria-invalid":$p(n),"aria-required":$p(o),"aria-readonly":$p(r)}}function wT(e){var t,n,r;const o=zf(),{id:i,disabled:s,readOnly:a,required:l,isRequired:u,isInvalid:c,isReadOnly:d,isDisabled:f,onFocus:p,onBlur:m,...h}=e,S=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&S.push(o.feedbackId),o!=null&&o.hasHelpText&&S.push(o.helpTextId),{...h,"aria-describedby":S.join(" ")||void 0,id:i??(o==null?void 0:o.id),isDisabled:(t=s??f)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=a??d)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=l??u)!=null?r:o==null?void 0:o.isRequired,isInvalid:c??(o==null?void 0:o.isInvalid),onFocus:Ee(o==null?void 0:o.onFocus,p),onBlur:Ee(o==null?void 0:o.onBlur,m)}}var P8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},E8=()=>typeof document<"u",wx=!1,Zl=null,gi=!1,cv=!1,dv=new Set;function N0(e,t){dv.forEach(n=>n(e,t))}var T8=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function _8(e){return!(e.metaKey||!T8&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function kx(e){gi=!0,_8(e)&&(Zl="keyboard",N0("keyboard",e))}function Oi(e){if(Zl="pointer",e.type==="mousedown"||e.type==="pointerdown"){gi=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;N0("pointer",e)}}function $8(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function O8(e){$8(e)&&(gi=!0,Zl="virtual")}function R8(e){e.target===window||e.target===document||(!gi&&!cv&&(Zl="virtual",N0("virtual",e)),gi=!1,cv=!1)}function M8(){gi=!1,cv=!0}function Cx(){return Zl!=="pointer"}function I8(){if(!E8()||wx)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){gi=!0,e.apply(this,n)},document.addEventListener("keydown",kx,!0),document.addEventListener("keyup",kx,!0),document.addEventListener("click",O8,!0),window.addEventListener("focus",R8,!0),window.addEventListener("blur",M8,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Oi,!0),document.addEventListener("pointermove",Oi,!0),document.addEventListener("pointerup",Oi,!0)):(document.addEventListener("mousedown",Oi,!0),document.addEventListener("mousemove",Oi,!0),document.addEventListener("mouseup",Oi,!0)),wx=!0}function A8(e){I8(),e(Cx());const t=()=>e(Cx());return dv.add(t),()=>{dv.delete(t)}}function D8(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function F8(e={}){const t=wT(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:i,id:s,onBlur:a,onFocus:l,"aria-describedby":u}=t,{defaultChecked:c,isChecked:d,isFocusable:f,onChange:p,isIndeterminate:m,name:h,value:S,tabIndex:v=void 0,"aria-label":y,"aria-labelledby":b,"aria-invalid":x,...k}=e,P=D8(k,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),C=Rn(p),E=Rn(a),_=Rn(l),[$,M]=g.useState(!1),[F,W]=g.useState(!1),[re,H]=g.useState(!1),[N,R]=g.useState(!1);g.useEffect(()=>A8(M),[]);const O=g.useRef(null),[D,V]=g.useState(!0),[oe,B]=g.useState(!!c),ee=d!==void 0,j=ee?d:oe,te=g.useCallback(ne=>{if(r||n){ne.preventDefault();return}ee||B(j?ne.target.checked:m?!0:ne.target.checked),C==null||C(ne)},[r,n,j,ee,m,C]);Ir(()=>{O.current&&(O.current.indeterminate=!!m)},[m]),Pl(()=>{n&&W(!1)},[n,W]),Ir(()=>{const ne=O.current;if(!(ne!=null&&ne.form))return;const Pe=()=>{B(!!c)};return ne.form.addEventListener("reset",Pe),()=>{var Be;return(Be=ne.form)==null?void 0:Be.removeEventListener("reset",Pe)}},[]);const ae=n&&!f,we=g.useCallback(ne=>{ne.key===" "&&R(!0)},[R]),Se=g.useCallback(ne=>{ne.key===" "&&R(!1)},[R]);Ir(()=>{if(!O.current)return;O.current.checked!==j&&B(O.current.checked)},[O.current]);const xt=g.useCallback((ne={},Pe=null)=>{const Be=nt=>{F&&nt.preventDefault(),R(!0)};return{...ne,ref:Pe,"data-active":ce(N),"data-hover":ce(re),"data-checked":ce(j),"data-focus":ce(F),"data-focus-visible":ce(F&&$),"data-indeterminate":ce(m),"data-disabled":ce(n),"data-invalid":ce(i),"data-readonly":ce(r),"aria-hidden":!0,onMouseDown:Ee(ne.onMouseDown,Be),onMouseUp:Ee(ne.onMouseUp,()=>R(!1)),onMouseEnter:Ee(ne.onMouseEnter,()=>H(!0)),onMouseLeave:Ee(ne.onMouseLeave,()=>H(!1))}},[N,j,n,F,$,re,m,i,r]),Ln=g.useCallback((ne={},Pe=null)=>({...ne,ref:Pe,"data-active":ce(N),"data-hover":ce(re),"data-checked":ce(j),"data-focus":ce(F),"data-focus-visible":ce(F&&$),"data-indeterminate":ce(m),"data-disabled":ce(n),"data-invalid":ce(i),"data-readonly":ce(r)}),[N,j,n,F,$,re,m,i,r]),Bt=g.useCallback((ne={},Pe=null)=>({...P,...ne,ref:mn(Pe,Be=>{Be&&V(Be.tagName==="LABEL")}),onClick:Ee(ne.onClick,()=>{var Be;D||((Be=O.current)==null||Be.click(),requestAnimationFrame(()=>{var nt;(nt=O.current)==null||nt.focus({preventScroll:!0})}))}),"data-disabled":ce(n),"data-checked":ce(j),"data-invalid":ce(i)}),[P,n,j,i,D]),pe=g.useCallback((ne={},Pe=null)=>({...ne,ref:mn(O,Pe),type:"checkbox",name:h,value:S,id:s,tabIndex:v,onChange:Ee(ne.onChange,te),onBlur:Ee(ne.onBlur,E,()=>W(!1)),onFocus:Ee(ne.onFocus,_,()=>W(!0)),onKeyDown:Ee(ne.onKeyDown,we),onKeyUp:Ee(ne.onKeyUp,Se),required:o,checked:j,disabled:ae,readOnly:r,"aria-label":y,"aria-labelledby":b,"aria-invalid":x?!!x:i,"aria-describedby":u,"aria-disabled":n,style:P8}),[h,S,s,te,E,_,we,Se,o,j,ae,r,y,b,x,i,u,n,v]),tt=g.useCallback((ne={},Pe=null)=>({...ne,ref:Pe,onMouseDown:Ee(ne.onMouseDown,L8),"data-disabled":ce(n),"data-checked":ce(j),"data-invalid":ce(i)}),[j,n,i]);return{state:{isInvalid:i,isFocused:F,isChecked:j,isActive:N,isHovered:re,isIndeterminate:m,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:Bt,getCheckboxProps:xt,getIndicatorProps:Ln,getInputProps:pe,getLabelProps:tt,htmlProps:P}}function L8(e){e.preventDefault(),e.stopPropagation()}var N8={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},V8={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},z8=Xn({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),B8=Xn({from:{opacity:0},to:{opacity:1}}),j8=Xn({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),H8=U(function(t,n){const r=f8(),o={...r,...t},i=ut("Checkbox",o),s=Ye(t),{spacing:a="0.5rem",className:l,children:u,iconColor:c,iconSize:d,icon:f=w.jsx(y8,{}),isChecked:p,isDisabled:m=r==null?void 0:r.isDisabled,onChange:h,inputProps:S,...v}=s;let y=p;r!=null&&r.value&&s.value&&(y=r.value.includes(s.value));let b=h;r!=null&&r.onChange&&s.value&&(b=P3(r.onChange,h));const{state:x,getInputProps:k,getCheckboxProps:P,getLabelProps:C,getRootProps:E}=F8({...v,isDisabled:m,isChecked:y,onChange:b}),_=m8(x.isChecked),$=g.useMemo(()=>({animation:_?x.isIndeterminate?`${B8} 20ms linear, ${j8} 200ms linear`:`${z8} 200ms linear`:void 0,fontSize:d,color:c,...i.icon}),[c,d,_,x.isIndeterminate,i.icon]),M=g.cloneElement(f,{__css:$,isIndeterminate:x.isIndeterminate,isChecked:x.isChecked});return w.jsxs(A.label,{__css:{...V8,...i.container},className:Z("chakra-checkbox",l),...E(),children:[w.jsx("input",{className:"chakra-checkbox__input",...k(S,n)}),w.jsx(A.span,{__css:{...N8,...i.control},className:"chakra-checkbox__control",...P(),children:M}),u&&w.jsx(A.span,{className:"chakra-checkbox__label",...C(),__css:{marginStart:a,...i.label},children:u})]})});H8.displayName="Checkbox";function wc(e,t,n,r){const o=Rn(n);return g.useEffect(()=>{const i=typeof e=="function"?e():e??document;if(!(!n||!i))return i.addEventListener(t,o,r),()=>{i.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const i=typeof e=="function"?e():e??document;i==null||i.removeEventListener(t,o,r)}}function kT(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fv="data-focus-lock",CT="data-focus-lock-disabled",W8="data-no-focus-lock",U8="data-autofocus-inside",q8="data-no-autofocus";function lh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function K8(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var G8=typeof window<"u"?g.useLayoutEffect:g.useEffect,Px=new WeakMap;function PT(e,t){var n=K8(null,function(r){return e.forEach(function(o){return lh(o,r)})});return G8(function(){var r=Px.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||lh(a,null)}),i.forEach(function(a){o.has(a)||lh(a,s)})}Px.set(n,e)},[e]),n}var uh={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},dr=function(){return dr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0}).sort(f7)},h7=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],H0=h7.join(","),m7="".concat(H0,", [data-focus-guard]"),jT=function(e,t){return xr((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?m7:H0)?[r]:[],jT(r))},[])},v7=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Ds([e.contentDocument.body],t):[e]},Ds=function(e,t){return e.reduce(function(n,r){var o,i=jT(r,t),s=(o=[]).concat.apply(o,i.map(function(a){return v7(a,t)}));return n.concat(s,r.parentNode?xr(r.parentNode.querySelectorAll(H0)).filter(function(a){return a===r}):[])},[])},g7=function(e){var t=e.querySelectorAll("[".concat(U8,"]"));return xr(t).map(function(n){return Ds([n])}).reduce(function(n,r){return n.concat(r)},[])},W0=function(e,t){return xr(e).filter(function(n){return LT(t,n)}).filter(function(n){return u7(n)})},Ex=function(e,t){return t===void 0&&(t=new Map),xr(e).filter(function(n){return NT(t,n)})},U0=function(e,t,n){return j0(W0(Ds(e,n),t),!0,n)},Cd=function(e,t){return j0(W0(Ds(e),t),!1)},y7=function(e,t){return W0(g7(e),t)},ci=function(e,t){return e.shadowRoot?ci(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:xr(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?ci(o,t):!1}return ci(n,t)})},b7=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(s,a){return!t.has(a)})},HT=function(e){return e.parentNode?HT(e.parentNode):e},q0=function(e){var t=bi(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(fv);return n.push.apply(n,o?b7(xr(HT(r).querySelectorAll("[".concat(fv,'="').concat(o,'"]:not([').concat(CT,'="disabled"])')))):[r]),n},[])},S7=function(e){try{return e()}catch{return}},Rl=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Rl(t.shadowRoot):t instanceof HTMLIFrameElement&&S7(function(){return t.contentWindow.document})?Rl(t.contentWindow.document):t}},x7=function(e,t){return e===t},w7=function(e,t){return!!xr(e.querySelectorAll("iframe")).some(function(n){return x7(n,t)})},WT=function(e,t){return t===void 0&&(t=Rl(AT(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:q0(e).some(function(n){return ci(n,t)||w7(n,t)})},k7=function(e){e===void 0&&(e=document);var t=Rl(e);return t?xr(e.querySelectorAll("[".concat(W8,"]"))).some(function(n){return ci(n,t)}):!1},C7=function(e,t){return t.filter(BT).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},K0=function(e,t){return BT(e)&&e.name?C7(e,t):e},P7=function(e){var t=new Set;return e.forEach(function(n){return t.add(K0(n,e))}),e.filter(function(n){return t.has(n)})},Tx=function(e){return e[0]&&e.length>1?K0(e[0],e):e[0]},_x=function(e,t){return e.indexOf(K0(t,e))},hv="NEW_FOCUS",E7=function(e,t,n,r,o){var i=e.length,s=e[0],a=e[i-1],l=B0(r);if(!(r&&e.indexOf(r)>=0)){var u=r!==void 0?n.indexOf(r):-1,c=o?n.indexOf(o):u,d=o?e.indexOf(o):-1;if(u===-1)return d!==-1?d:hv;if(d===-1)return hv;var f=u-c,p=n.indexOf(s),m=n.indexOf(a),h=P7(n),S=r!==void 0?h.indexOf(r):-1,v=S-(o?h.indexOf(o):u);if(!f&&d>=0||t.length===0)return d;var y=_x(e,t[0]),b=_x(e,t[t.length-1]);if(u<=p&&l&&Math.abs(f)>1)return b;if(u>=m&&l&&Math.abs(f)>1)return y;if(f&&Math.abs(v)>1)return d;if(u<=p)return b;if(u>m)return y;if(f)return Math.abs(f)>1?d:(i+d+f)%i}},T7=function(e){return function(t){var n,r=(n=VT(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},$x=function(e,t,n){var r=e.map(function(i){var s=i.node;return s}),o=Ex(r.filter(T7(n)));return o&&o.length?Tx(o):Tx(Ex(t))},mv=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&mv(e.parentNode.host||e.parentNode,t),t},ch=function(e,t){for(var n=mv(e),r=mv(t),o=0;o=0)return i}return!1},UT=function(e,t,n){var r=bi(e),o=bi(t),i=r[0],s=!1;return o.filter(Boolean).forEach(function(a){s=ch(s||a,a)||s,n.filter(Boolean).forEach(function(l){var u=ch(i,l);u&&(!s||ci(u,s)?s=u:s=ch(u,s))})}),s},Ox=function(e,t){return e.reduce(function(n,r){return n.concat(y7(r,t))},[])},_7=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(d7)},$7=function(e,t){var n=Rl(bi(e).length>0?document:AT(e).ownerDocument),r=q0(e).filter(pv),o=UT(n||e,e,r),i=new Map,s=Cd(r,i),a=s.filter(function(m){var h=m.node;return pv(h)});if(a[0]){var l=Cd([o],i).map(function(m){var h=m.node;return h}),u=_7(l,a),c=u.map(function(m){var h=m.node;return h}),d=u.filter(function(m){var h=m.tabIndex;return h>=0}).map(function(m){var h=m.node;return h}),f=E7(c,d,l,n,t);if(f===hv){var p=$x(s,d,Ox(r,i))||$x(s,c,Ox(r,i));if(p)return{node:p};console.warn("focus-lock: cannot find any node to move focus into");return}return f===void 0?f:u[f]}},O7=function(e){var t=q0(e).filter(pv),n=UT(e,e,t),r=j0(Ds([n],!0),!0,!0),o=Ds(t,!1);return r.map(function(i){var s=i.node,a=i.index;return{node:s,index:a,lockItem:o.indexOf(s)>=0,guard:B0(s)}})},G0=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},dh=0,fh=!1,qT=function(e,t,n){n===void 0&&(n={});var r=$7(e,t);if(!fh&&r){if(dh>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),fh=!0,setTimeout(function(){fh=!1},1);return}dh++,G0(r.node,n.focusOptions),dh--}};function ca(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var R7=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ca(n),parent:ca(n.parentElement),left:ca(n.previousElementSibling),right:ca(n.nextElementSibling)}),n=n.parentElement;return{element:ca(e),stack:t,ownerDocument:e.ownerDocument}},M7=function(e){var t,n,r,o,i;if(e)for(var s=e.stack,a=e.ownerDocument,l=new Map,u=0,c=s;u-1&&(p.filter(function(h){var S=h.guard,v=h.node;return S&&v.dataset.focusAutoGuard}).forEach(function(h){var S=h.node;return S.removeAttribute("tabIndex")}),Rx(m,p.length,1,p),Rx(m,-1,-1,p))}}}return t},YT=function(t){Pd()&&t&&(t.stopPropagation(),t.preventDefault())},X0=function(){return Y0(Pd)},Q7=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q7(r,n)},Z7=function(){return null},XT=function(){Ml="just",Y0(function(){Ml="meanwhile"})},J7=function(){document.addEventListener("focusin",YT),document.addEventListener("focusout",X0),window.addEventListener("blur",XT)},eH=function(){document.removeEventListener("focusin",YT),document.removeEventListener("focusout",X0),window.removeEventListener("blur",XT)};function tH(e){return e.filter(function(t){var n=t.disabled;return!n})}var QT={moveFocusInside:qT,focusInside:WT,focusNextElement:L7,focusPrevElement:N7,focusFirstElement:V7,focusLastElement:z7,captureFocusRestore:I7};function nH(e){var t=e.slice(-1)[0];t&&!ys&&J7();var n=ys,r=n&&t&&t.id===n.id;ys=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var i=o.id;return i===n.id}).length||n.returnFocus(!t)),t?(ss=null,(!r||n.observed!==t.observed)&&t.onActivation(QT),Pd(),Y0(Pd)):(eH(),ss=null)}RT.assignSyncMedium(Q7);MT.assignMedium(X0);Q8.assignMedium(function(e){return e(QT)});const rH=r7(tH,nH)(Z7);var vv=g.forwardRef(function(t,n){return g.createElement(z0,K({sideCar:rH,ref:n},t))}),ZT=z0.propTypes||{};ZT.sideCar;kT(ZT,["sideCar"]);vv.propTypes={};function JT(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Q0(e){var t;if(!JT(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function oH(e){var t,n;return(n=(t=e_(e))==null?void 0:t.defaultView)!=null?n:window}function e_(e){return JT(e)?e.ownerDocument:document}function iH(e){return e_(e).activeElement}function sH(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function aH(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function t_(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:Q0(e)&&sH(e)?e:t_(aH(e))}var n_=e=>e.hasAttribute("tabindex"),lH=e=>n_(e)&&e.tabIndex===-1;function uH(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function r_(e){return e.parentElement&&r_(e.parentElement)?!0:e.hidden}function cH(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function o_(e){if(!Q0(e)||r_(e)||uH(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():cH(e)?!0:n_(e)}function dH(e){return e?Q0(e)&&o_(e)&&!lH(e):!1}var fH=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],pH=fH.join(),hH=e=>e.offsetWidth>0&&e.offsetHeight>0;function mH(e){const t=Array.from(e.querySelectorAll(pH));return t.unshift(e),t.filter(n=>o_(n)&&hH(n))}var Mx,vH=(Mx=vv.default)!=null?Mx:vv,i_=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:i,isDisabled:s,autoFocus:a,persistentFocus:l,lockFocusAcrossFrames:u}=e,c=g.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&mH(r.current).length===0&&requestAnimationFrame(()=>{var m;(m=r.current)==null||m.focus()})},[t,r]),d=g.useCallback(()=>{var p;(p=n==null?void 0:n.current)==null||p.focus()},[n]),f=o&&!n;return w.jsx(vH,{crossFrame:u,persistentFocus:l,autoFocus:a,disabled:s,onActivation:c,onDeactivation:d,returnFocus:f,children:i})};i_.displayName="FocusLock";var gH=pN?g.useLayoutEffect:g.useEffect;function Ix(e,t=[]){const n=g.useRef(e);return gH(()=>{n.current=e}),g.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function yH(e,t){const n=g.useId();return g.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function bH(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function yee(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,i=Ix(n),s=Ix(t),[a,l]=g.useState(e.defaultIsOpen||!1),[u,c]=bH(r,a),d=yH(o,"disclosure"),f=g.useCallback(()=>{u||l(!1),s==null||s()},[u,s]),p=g.useCallback(()=>{u||l(!0),i==null||i()},[u,i]),m=g.useCallback(()=>{(c?f:p)()},[c,p,f]);return{isOpen:!!c,onOpen:p,onClose:f,onToggle:m,isControlled:u,getButtonProps:(h={})=>({...h,"aria-expanded":c,"aria-controls":d,onClick:yN(h.onClick,m)}),getDisclosureProps:(h={})=>({...h,hidden:!c,id:d})}}var SH=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=Ax[t.format]||Ax.default;window.clipboardData.setData(d,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");l=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=kH("message"in t?t.message:wH),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}var PH=CH;const EH=Kd(PH);function bee(e,t={}){const[n,r]=g.useState(!1),[o,i]=g.useState(e);g.useEffect(()=>i(e),[e]);const{timeout:s=1500,...a}=typeof t=="number"?{timeout:t}:t,l=g.useCallback(()=>{const u=EH(o,a);r(u)},[o,a]);return g.useEffect(()=>{let u=null;return n&&(u=window.setTimeout(()=>{r(!1)},s)),()=>{u&&window.clearTimeout(u)}},[s,n]),{value:o,setValue:i,onCopy:l,hasCopied:n}}var s_=U(function(t,n){const{htmlSize:r,...o}=t,i=ut("Input",o),s=Ye(o),a=L0(s),l=Z("chakra-input",t.className);return w.jsx(A.input,{size:r,...a,__css:i.field,ref:n,className:l})});s_.displayName="Input";s_.id="Input";var TH=U(function(t,n){const r=en("Link",t),{className:o,isExternal:i,...s}=Ye(t);return w.jsx(A.a,{target:i?"_blank":void 0,rel:i?"noopener":void 0,ref:n,className:Z("chakra-link",o),...s,__css:r})});TH.displayName="Link";var[_H,a_]=Ge({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Z0=U(function(t,n){const r=ut("List",t),{children:o,styleType:i="none",stylePosition:s,spacing:a,...l}=Ye(t),u=F0(o),d=a?{["& > *:not(style) ~ *:not(style)"]:{mt:a}}:{};return w.jsx(_H,{value:r,children:w.jsx(A.ul,{ref:n,listStyleType:i,listStylePosition:s,role:"list",__css:{...r.container,...d},...l,children:u})})});Z0.displayName="List";var $H=U((e,t)=>{const{as:n,...r}=e;return w.jsx(Z0,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});$H.displayName="OrderedList";var OH=U(function(t,n){const{as:r,...o}=t;return w.jsx(Z0,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});OH.displayName="UnorderedList";var RH=U(function(t,n){const r=a_();return w.jsx(A.li,{ref:n,...t,__css:r.item})});RH.displayName="ListItem";var MH=U(function(t,n){const r=a_();return w.jsx(Qn,{ref:n,role:"presentation",...t,__css:r.icon})});MH.displayName="ListIcon";var l_=Object.freeze(["base","sm","md","lg","xl","2xl"]);function IH(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):$t(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}function AH(e,t=l_){const n={};return e.forEach((r,o)=>{const i=t[o];r!=null&&(n[i]=r)}),n}var DH=U(function(t,n){const r=en("Text",t),{className:o,align:i,decoration:s,casing:a,...l}=Ye(t),u=$N({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return w.jsx(A.p,{ref:n,className:Z("chakra-text",t.className),...u,...l,__css:r})});DH.displayName="Text";var FH=U(function(t,n){const{spacing:r="0.5rem",spacingX:o,spacingY:i,children:s,justify:a,direction:l,align:u,className:c,shouldWrapChildren:d,...f}=t,p=g.useMemo(()=>d?g.Children.map(s,(m,h)=>w.jsx(u_,{children:m},h)):s,[s,d]);return w.jsx(A.div,{ref:n,className:Z("chakra-wrap",c),...f,children:w.jsx(A.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:u,flexDirection:l,listStyleType:"none",gap:r,columnGap:o,rowGap:i,padding:"0"},children:p})})});FH.displayName="Wrap";var u_=U(function(t,n){const{className:r,...o}=t;return w.jsx(A.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Z("chakra-wrap__listitem",r),...o})});u_.displayName="WrapItem";var c_=e=>w.jsx(A.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});c_.displayName="StackItem";function LH(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":IH(n,o=>r[o])}}var NH=U((e,t)=>{const{isInline:n,direction:r,align:o,justify:i,spacing:s="0.5rem",wrap:a,children:l,divider:u,className:c,shouldWrapChildren:d,...f}=e,p=n?"row":r??"column",m=g.useMemo(()=>LH({spacing:s,direction:p}),[s,p]),h=!!u,S=!d&&!h,v=g.useMemo(()=>{const b=F0(l);return S?b:b.map((x,k)=>{const P=typeof x.key<"u"?x.key:k,C=k+1===b.length,_=d?w.jsx(c_,{children:x},P):x;if(!h)return _;const $=g.cloneElement(u,{__css:m}),M=C?null:$;return w.jsxs(g.Fragment,{children:[_,M]},P)})},[u,m,h,S,d,l]),y=Z("chakra-stack",c);return w.jsx(A.div,{ref:t,display:"flex",alignItems:o,justifyContent:i,flexDirection:p,flexWrap:a,gap:h?void 0:s,className:y,...f,children:v})});NH.displayName="Stack";var VH=U(function(t,n){const r=en("Heading",t),{className:o,...i}=Ye(t);return w.jsx(A.h2,{ref:n,className:Z("chakra-heading",t.className),...i,__css:r})});VH.displayName="Heading";var Je=A("div");Je.displayName="Box";var d_=U(function(t,n){const{size:r,centerContent:o=!0,...i}=t,s=o?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return w.jsx(Je,{ref:n,boxSize:r,__css:{...s,flexShrink:0,flexGrow:0},...i})});d_.displayName="Square";var zH=U(function(t,n){const{size:r,...o}=t;return w.jsx(d_,{size:r,ref:n,borderRadius:"9999px",...o})});zH.displayName="Circle";var BH=U(function(t,n){const r=en("Code",t),{className:o,...i}=Ye(t);return w.jsx(A.code,{ref:n,className:Z("chakra-code",t.className),...i,__css:{display:"inline-block",...r}})});BH.displayName="Code";var f_=U(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:i,borderRightWidth:s,borderWidth:a,borderStyle:l,borderColor:u,...c}=en("Divider",t),{className:d,orientation:f="horizontal",__css:p,...m}=Ye(t),h={vertical:{borderLeftWidth:r||s||a||"1px",height:"100%"},horizontal:{borderBottomWidth:o||i||a||"1px",width:"100%"}};return w.jsx(A.hr,{ref:n,"aria-orientation":f,...m,__css:{...c,border:"0",borderColor:u,borderStyle:l,...h[f],...p},className:Z("chakra-divider",d)})});f_.displayName="Divider";var jH=U(function(t,n){const{direction:r,align:o,justify:i,wrap:s,basis:a,grow:l,shrink:u,...c}=t,d={display:"flex",flexDirection:r,alignItems:o,justifyContent:i,flexWrap:s,flexBasis:a,flexGrow:l,flexShrink:u};return w.jsx(A.div,{ref:n,__css:d,...c})});jH.displayName="Flex";function HH(e,t={}){const{ssr:n=!0,fallback:r}=t,{getWindow:o}=WN(),i=Array.isArray(e)?e:[e];let s=Array.isArray(r)?r:[r];s=s.filter(u=>u!=null);const[a,l]=g.useState(()=>i.map((u,c)=>({media:u,matches:n?!!s[c]:o().matchMedia(u).matches})));return g.useEffect(()=>{const u=o();l(i.map(f=>({media:f,matches:u.matchMedia(f).matches})));const c=i.map(f=>u.matchMedia(f)),d=f=>{l(p=>p.slice().map(m=>m.media===f.media?{...m,matches:f.matches}:m))};return c.forEach(f=>{typeof f.addListener=="function"?f.addListener(d):f.addEventListener("change",d)}),()=>{c.forEach(f=>{typeof f.removeListener=="function"?f.removeListener(d):f.removeEventListener("change",d)})}},[o]),a.map(u=>u.matches)}function WH(e,t,n=l_){let r=Object.keys(e).indexOf(t);if(r!==-1)return e[t];let o=n.indexOf(t);for(;o>=0;){const i=n[o];if(e.hasOwnProperty(i)){r=o;break}o-=1}if(r!==-1){const i=n[r];return e[i]}}function UH(e){var t,n;const r=$t(e)?e:{fallback:e??"base"},i=Yr().__breakpoints.details.map(({minMaxQuery:u,breakpoint:c})=>({breakpoint:c,query:u.replace("@media screen and ","")})),s=i.map(u=>u.breakpoint===r.fallback),l=HH(i.map(u=>u.query),{fallback:s,ssr:r.ssr}).findIndex(u=>u==!0);return(n=(t=i[l])==null?void 0:t.breakpoint)!=null?n:r.fallback}function qH(e,t){var n;const r=$t(t)?t:{fallback:t??"base"},o=UH(r),i=Yr();if(!o)return;const s=Array.from(((n=i.__breakpoints)==null?void 0:n.keys)||[]),a=Array.isArray(e)?Object.fromEntries(Object.entries(AH(e,s)).map(([l,u])=>[l,u])):e;return WH(a,o,s)}function KH(){const e=g.useRef(new Map),t=e.current,n=g.useCallback((o,i,s,a)=>{e.current.set(s,{type:i,el:o,options:a}),o.addEventListener(i,s,a)},[]),r=g.useCallback((o,i,s,a)=>{o.removeEventListener(i,s,a),e.current.delete(s)},[]);return g.useEffect(()=>()=>{t.forEach((o,i)=>{r(o.el,o.type,i,o.options)})},[r,t]),{add:n,remove:r}}function ph(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function GH(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:i=!0,onMouseDown:s,onMouseUp:a,onClick:l,onKeyDown:u,onKeyUp:c,tabIndex:d,onMouseOver:f,onMouseLeave:p,...m}=e,[h,S]=g.useState(!0),[v,y]=g.useState(!1),b=KH(),x=R=>{R&&R.tagName!=="BUTTON"&&S(!1)},k=h?d:d||0,P=n&&!r,C=g.useCallback(R=>{if(n){R.stopPropagation(),R.preventDefault();return}R.currentTarget.focus(),l==null||l(R)},[n,l]),E=g.useCallback(R=>{v&&ph(R)&&(R.preventDefault(),R.stopPropagation(),y(!1),b.remove(document,"keyup",E,!1))},[v,b]),_=g.useCallback(R=>{if(u==null||u(R),n||R.defaultPrevented||R.metaKey||!ph(R.nativeEvent)||h)return;const O=o&&R.key==="Enter";i&&R.key===" "&&(R.preventDefault(),y(!0)),O&&(R.preventDefault(),R.currentTarget.click()),b.add(document,"keyup",E,!1)},[n,h,u,o,i,b,E]),$=g.useCallback(R=>{if(c==null||c(R),n||R.defaultPrevented||R.metaKey||!ph(R.nativeEvent)||h)return;i&&R.key===" "&&(R.preventDefault(),y(!1),R.currentTarget.click())},[i,h,n,c]),M=g.useCallback(R=>{R.button===0&&(y(!1),b.remove(document,"mouseup",M,!1))},[b]),F=g.useCallback(R=>{if(R.button!==0)return;if(n){R.stopPropagation(),R.preventDefault();return}h||y(!0),R.currentTarget.focus({preventScroll:!0}),b.add(document,"mouseup",M,!1),s==null||s(R)},[n,h,s,b,M]),W=g.useCallback(R=>{R.button===0&&(h||y(!1),a==null||a(R))},[a,h]),re=g.useCallback(R=>{if(n){R.preventDefault();return}f==null||f(R)},[n,f]),H=g.useCallback(R=>{v&&(R.preventDefault(),y(!1)),p==null||p(R)},[v,p]),N=mn(t,x);return h?{...m,ref:N,type:"button","aria-disabled":P?void 0:n,disabled:P,onClick:C,onMouseDown:s,onMouseUp:a,onKeyUp:c,onKeyDown:u,onMouseOver:f,onMouseLeave:p}:{...m,ref:N,role:"button","data-active":ce(v),"aria-disabled":n?"true":void 0,tabIndex:P?void 0:k,onClick:C,onMouseDown:F,onMouseUp:W,onKeyUp:$,onKeyDown:_,onMouseOver:re,onMouseLeave:H}}function YH(e){const t=e.current;if(!t)return!1;const n=iH(t);return!n||t.contains(n)?!1:!!dH(n)}function XH(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,i=n&&!r;Pl(()=>{if(!i||YH(e))return;const s=(o==null?void 0:o.current)||e.current;let a;if(s)return a=requestAnimationFrame(()=>{s.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(a)}},[i,e,o])}var Ri=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),mt={arrowShadowColor:Ri("--popper-arrow-shadow-color"),arrowSize:Ri("--popper-arrow-size","8px"),arrowSizeHalf:Ri("--popper-arrow-size-half"),arrowBg:Ri("--popper-arrow-bg"),transformOrigin:Ri("--popper-transform-origin"),arrowOffset:Ri("--popper-arrow-offset")};function QH(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var ZH={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},JH=e=>ZH[e],Dx={scroll:!0,resize:!0};function eW(e){let t;return typeof e=="object"?t={enabled:!0,options:{...Dx,...e}}:t={enabled:e,options:Dx},t}var tW={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},nW={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{Fx(e)},effect:({state:e})=>()=>{Fx(e)}},Fx=e=>{e.elements.popper.style.setProperty(mt.transformOrigin.var,JH(e.placement))},rW={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{oW(e)}},oW=e=>{var t;if(!e.placement)return;const n=iW(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:mt.arrowSize.varRef,height:mt.arrowSize.varRef,zIndex:-1});const r={[mt.arrowSizeHalf.var]:`calc(${mt.arrowSize.varRef} / 2 - 1px)`,[mt.arrowOffset.var]:`calc(${mt.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},iW=e=>{if(e.startsWith("top"))return{property:"bottom",value:mt.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:mt.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:mt.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:mt.arrowOffset.varRef}},sW={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{Lx(e)},effect:({state:e})=>()=>{Lx(e)}},Lx=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=QH(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:mt.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},aW={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},lW={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function uW(e,t="ltr"){var n,r;const o=((n=aW[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=lW[e])!=null?r:o}var Qt="top",Dn="bottom",Fn="right",Zt="left",J0="auto",Jl=[Qt,Dn,Fn,Zt],Fs="start",Il="end",cW="clippingParents",p_="viewport",da="popper",dW="reference",Nx=Jl.reduce(function(e,t){return e.concat([t+"-"+Fs,t+"-"+Il])},[]),h_=[].concat(Jl,[J0]).reduce(function(e,t){return e.concat([t,t+"-"+Fs,t+"-"+Il])},[]),fW="beforeRead",pW="read",hW="afterRead",mW="beforeMain",vW="main",gW="afterMain",yW="beforeWrite",bW="write",SW="afterWrite",xW=[fW,pW,hW,mW,vW,gW,yW,bW,SW];function br(e){return e?(e.nodeName||"").toLowerCase():null}function vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Si(e){var t=vn(e).Element;return e instanceof t||e instanceof Element}function Mn(e){var t=vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ey(e){if(typeof ShadowRoot>"u")return!1;var t=vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function wW(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Mn(i)||!br(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function kW(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!Mn(o)||!br(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const CW={name:"applyStyles",enabled:!0,phase:"write",fn:wW,effect:kW,requires:["computeStyles"]};function gr(e){return e.split("-")[0]}var di=Math.max,Ed=Math.min,Ls=Math.round;function gv(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function m_(){return!/^((?!chrome|android).)*safari/i.test(gv())}function Ns(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Mn(e)&&(o=e.offsetWidth>0&&Ls(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ls(r.height)/e.offsetHeight||1);var s=Si(e)?vn(e):window,a=s.visualViewport,l=!m_()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,c=(r.top+(l&&a?a.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function ty(e){var t=Ns(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function v_(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ey(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wr(e){return vn(e).getComputedStyle(e)}function PW(e){return["table","td","th"].indexOf(br(e))>=0}function Fo(e){return((Si(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bf(e){return br(e)==="html"?e:e.assignedSlot||e.parentNode||(ey(e)?e.host:null)||Fo(e)}function Vx(e){return!Mn(e)||Wr(e).position==="fixed"?null:e.offsetParent}function EW(e){var t=/firefox/i.test(gv()),n=/Trident/i.test(gv());if(n&&Mn(e)){var r=Wr(e);if(r.position==="fixed")return null}var o=Bf(e);for(ey(o)&&(o=o.host);Mn(o)&&["html","body"].indexOf(br(o))<0;){var i=Wr(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function eu(e){for(var t=vn(e),n=Vx(e);n&&PW(n)&&Wr(n).position==="static";)n=Vx(n);return n&&(br(n)==="html"||br(n)==="body"&&Wr(n).position==="static")?t:n||EW(e)||t}function ny(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Qa(e,t,n){return di(e,Ed(t,n))}function TW(e,t,n){var r=Qa(e,t,n);return r>n?n:r}function g_(){return{top:0,right:0,bottom:0,left:0}}function y_(e){return Object.assign({},g_(),e)}function b_(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var _W=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,y_(typeof t!="number"?t:b_(t,Jl))};function $W(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=gr(n.placement),l=ny(a),u=[Zt,Fn].indexOf(a)>=0,c=u?"height":"width";if(!(!i||!s)){var d=_W(o.padding,n),f=ty(i),p=l==="y"?Qt:Zt,m=l==="y"?Dn:Fn,h=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],S=s[l]-n.rects.reference[l],v=eu(i),y=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,b=h/2-S/2,x=d[p],k=y-f[c]-d[m],P=y/2-f[c]/2+b,C=Qa(x,P,k),E=l;n.modifiersData[r]=(t={},t[E]=C,t.centerOffset=C-P,t)}}function OW(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||v_(t.elements.popper,o)&&(t.elements.arrow=o))}const RW={name:"arrow",enabled:!0,phase:"main",fn:$W,effect:OW,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vs(e){return e.split("-")[1]}var MW={top:"auto",right:"auto",bottom:"auto",left:"auto"};function IW(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ls(n*o)/o||0,y:Ls(r*o)/o||0}}function zx(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=s.x,p=f===void 0?0:f,m=s.y,h=m===void 0?0:m,S=typeof c=="function"?c({x:p,y:h}):{x:p,y:h};p=S.x,h=S.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Zt,x=Qt,k=window;if(u){var P=eu(n),C="clientHeight",E="clientWidth";if(P===vn(n)&&(P=Fo(n),Wr(P).position!=="static"&&a==="absolute"&&(C="scrollHeight",E="scrollWidth")),P=P,o===Qt||(o===Zt||o===Fn)&&i===Il){x=Dn;var _=d&&P===k&&k.visualViewport?k.visualViewport.height:P[C];h-=_-r.height,h*=l?1:-1}if(o===Zt||(o===Qt||o===Dn)&&i===Il){b=Fn;var $=d&&P===k&&k.visualViewport?k.visualViewport.width:P[E];p-=$-r.width,p*=l?1:-1}}var M=Object.assign({position:a},u&&MW),F=c===!0?IW({x:p,y:h},vn(n)):{x:p,y:h};if(p=F.x,h=F.y,l){var W;return Object.assign({},M,(W={},W[x]=y?"0":"",W[b]=v?"0":"",W.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",W))}return Object.assign({},M,(t={},t[x]=y?h+"px":"",t[b]=v?p+"px":"",t.transform="",t))}function AW(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:gr(t.placement),variation:Vs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,zx(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,zx(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const DW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:AW,data:{}};var Mu={passive:!0};function FW(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=vn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Mu)}),a&&l.addEventListener("resize",n.update,Mu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Mu)}),a&&l.removeEventListener("resize",n.update,Mu)}}const LW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:FW,data:{}};var NW={left:"right",right:"left",bottom:"top",top:"bottom"};function kc(e){return e.replace(/left|right|bottom|top/g,function(t){return NW[t]})}var VW={start:"end",end:"start"};function Bx(e){return e.replace(/start|end/g,function(t){return VW[t]})}function ry(e){var t=vn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function oy(e){return Ns(Fo(e)).left+ry(e).scrollLeft}function zW(e,t){var n=vn(e),r=Fo(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=m_();(u||!u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+oy(e),y:l}}function BW(e){var t,n=Fo(e),r=ry(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=di(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=di(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+oy(e),l=-r.scrollTop;return Wr(o||n).direction==="rtl"&&(a+=di(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function iy(e){var t=Wr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function S_(e){return["html","body","#document"].indexOf(br(e))>=0?e.ownerDocument.body:Mn(e)&&iy(e)?e:S_(Bf(e))}function Za(e,t){var n;t===void 0&&(t=[]);var r=S_(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vn(r),s=o?[i].concat(i.visualViewport||[],iy(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(Za(Bf(s)))}function yv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jW(e,t){var n=Ns(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function jx(e,t,n){return t===p_?yv(zW(e,n)):Si(t)?jW(t,n):yv(BW(Fo(e)))}function HW(e){var t=Za(Bf(e)),n=["absolute","fixed"].indexOf(Wr(e).position)>=0,r=n&&Mn(e)?eu(e):e;return Si(r)?t.filter(function(o){return Si(o)&&v_(o,r)&&br(o)!=="body"}):[]}function WW(e,t,n,r){var o=t==="clippingParents"?HW(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var c=jx(e,u,r);return l.top=di(c.top,l.top),l.right=Ed(c.right,l.right),l.bottom=Ed(c.bottom,l.bottom),l.left=di(c.left,l.left),l},jx(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function x_(e){var t=e.reference,n=e.element,r=e.placement,o=r?gr(r):null,i=r?Vs(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case Qt:l={x:s,y:t.y-n.height};break;case Dn:l={x:s,y:t.y+t.height};break;case Fn:l={x:t.x+t.width,y:a};break;case Zt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=o?ny(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Fs:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Il:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function Al(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,s=i===void 0?e.strategy:i,a=n.boundary,l=a===void 0?cW:a,u=n.rootBoundary,c=u===void 0?p_:u,d=n.elementContext,f=d===void 0?da:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,S=h===void 0?0:h,v=y_(typeof S!="number"?S:b_(S,Jl)),y=f===da?dW:da,b=e.rects.popper,x=e.elements[m?y:f],k=WW(Si(x)?x:x.contextElement||Fo(e.elements.popper),l,c,s),P=Ns(e.elements.reference),C=x_({reference:P,element:b,strategy:"absolute",placement:o}),E=yv(Object.assign({},b,C)),_=f===da?E:P,$={top:k.top-_.top+v.top,bottom:_.bottom-k.bottom+v.bottom,left:k.left-_.left+v.left,right:_.right-k.right+v.right},M=e.modifiersData.offset;if(f===da&&M){var F=M[o];Object.keys($).forEach(function(W){var re=[Fn,Dn].indexOf(W)>=0?1:-1,H=[Qt,Dn].indexOf(W)>=0?"y":"x";$[W]+=F[H]*re})}return $}function UW(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?h_:l,c=Vs(r),d=c?a?Nx:Nx.filter(function(m){return Vs(m)===c}):Jl,f=d.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=Al(e,{placement:h,boundary:o,rootBoundary:i,padding:s})[gr(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function qW(e){if(gr(e)===J0)return[];var t=kc(e);return[Bx(e),t,Bx(t)]}function KW(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,S=t.options.placement,v=gr(S),y=v===S,b=l||(y||!m?[kc(S)]:qW(S)),x=[S].concat(b).reduce(function(j,te){return j.concat(gr(te)===J0?UW(t,{placement:te,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:h}):te)},[]),k=t.rects.reference,P=t.rects.popper,C=new Map,E=!0,_=x[0],$=0;$=0,H=re?"width":"height",N=Al(t,{placement:M,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),R=re?W?Fn:Zt:W?Dn:Qt;k[H]>P[H]&&(R=kc(R));var O=kc(R),D=[];if(i&&D.push(N[F]<=0),a&&D.push(N[R]<=0,N[O]<=0),D.every(function(j){return j})){_=M,E=!1;break}C.set(M,D)}if(E)for(var V=m?3:1,oe=function(te){var ae=x.find(function(we){var Se=C.get(we);if(Se)return Se.slice(0,te).every(function(xt){return xt})});if(ae)return _=ae,"break"},B=V;B>0;B--){var ee=oe(B);if(ee==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}const GW={name:"flip",enabled:!0,phase:"main",fn:KW,requiresIfExists:["offset"],data:{_skip:!1}};function Hx(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wx(e){return[Qt,Fn,Dn,Zt].some(function(t){return e[t]>=0})}function YW(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Al(t,{elementContext:"reference"}),a=Al(t,{altBoundary:!0}),l=Hx(s,r),u=Hx(a,o,i),c=Wx(l),d=Wx(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const XW={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:YW};function QW(e,t,n){var r=gr(e),o=[Zt,Qt].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Zt,Fn].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function ZW(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,s=h_.reduce(function(c,d){return c[d]=QW(d,t.rects,i),c},{}),a=s[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const JW={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ZW};function eU(e){var t=e.state,n=e.name;t.modifiersData[n]=x_({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const tU={name:"popperOffsets",enabled:!0,phase:"read",fn:eU,data:{}};function nU(e){return e==="x"?"y":"x"}function rU(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,S=Al(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=gr(t.placement),y=Vs(t.placement),b=!y,x=ny(v),k=nU(x),P=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,_=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,$=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(P){if(i){var W,re=x==="y"?Qt:Zt,H=x==="y"?Dn:Fn,N=x==="y"?"height":"width",R=P[x],O=R+S[re],D=R-S[H],V=p?-E[N]/2:0,oe=y===Fs?C[N]:E[N],B=y===Fs?-E[N]:-C[N],ee=t.elements.arrow,j=p&&ee?ty(ee):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:g_(),ae=te[re],we=te[H],Se=Qa(0,C[N],j[N]),xt=b?C[N]/2-V-Se-ae-$.mainAxis:oe-Se-ae-$.mainAxis,Ln=b?-C[N]/2+V+Se+we+$.mainAxis:B+Se+we+$.mainAxis,Bt=t.elements.arrow&&eu(t.elements.arrow),pe=Bt?x==="y"?Bt.clientTop||0:Bt.clientLeft||0:0,tt=(W=M==null?void 0:M[x])!=null?W:0,Sn=R+xt-tt-pe,ne=R+Ln-tt,Pe=Qa(p?Ed(O,Sn):O,R,p?di(D,ne):D);P[x]=Pe,F[x]=Pe-R}if(a){var Be,nt=x==="x"?Qt:Zt,wt=x==="x"?Dn:Fn,De=P[k],Ei=k==="y"?"height":"width",Ti=De+S[nt],Fy=De-S[wt],tp=[Qt,Zt].indexOf(v)!==-1,Ly=(Be=M==null?void 0:M[k])!=null?Be:0,Ny=tp?Ti:De-C[Ei]-E[Ei]-Ly+$.altAxis,Vy=tp?De+C[Ei]+E[Ei]-Ly-$.altAxis:Fy,zy=p&&tp?TW(Ny,De,Vy):Qa(p?Ny:Ti,De,p?Vy:Fy);P[k]=zy,F[k]=zy-De}t.modifiersData[r]=F}}const oU={name:"preventOverflow",enabled:!0,phase:"main",fn:rU,requiresIfExists:["offset"]};function iU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function sU(e){return e===vn(e)||!Mn(e)?ry(e):iU(e)}function aU(e){var t=e.getBoundingClientRect(),n=Ls(t.width)/e.offsetWidth||1,r=Ls(t.height)/e.offsetHeight||1;return n!==1||r!==1}function lU(e,t,n){n===void 0&&(n=!1);var r=Mn(t),o=Mn(t)&&aU(t),i=Fo(t),s=Ns(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((br(t)!=="body"||iy(i))&&(a=sU(t)),Mn(t)?(l=Ns(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=oy(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function uU(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function cU(e){var t=uU(e);return xW.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function dU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fU(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ux={placement:"bottom",modifiers:[],strategy:"absolute"};function qx(){for(var e=arguments.length,t=new Array(e),n=0;n{}),b=g.useCallback(()=>{var $;!t||!m.current||!h.current||(($=y.current)==null||$.call(y),S.current=mU(m.current,h.current,{placement:v,modifiers:[sW,rW,nW,{...tW,enabled:!!f},{name:"eventListeners",...eW(s)},{name:"arrow",options:{padding:i}},{name:"offset",options:{offset:a??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:c}},...n??[]],strategy:o}),S.current.forceUpdate(),y.current=S.current.destroy)},[v,t,n,f,s,i,a,l,u,d,c,o]);g.useEffect(()=>()=>{var $;!m.current&&!h.current&&(($=S.current)==null||$.destroy(),S.current=null)},[]);const x=g.useCallback($=>{m.current=$,b()},[b]),k=g.useCallback(($={},M=null)=>({...$,ref:mn(x,M)}),[x]),P=g.useCallback($=>{h.current=$,b()},[b]),C=g.useCallback(($={},M=null)=>({...$,ref:mn(P,M),style:{...$.style,position:o,minWidth:f?void 0:"max-content",inset:"0 auto auto 0"}}),[o,P,f]),E=g.useCallback(($={},M=null)=>{const{size:F,shadowColor:W,bg:re,style:H,...N}=$;return{...N,ref:M,"data-popper-arrow":"",style:vU($)}},[]),_=g.useCallback(($={},M=null)=>({...$,ref:M,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=S.current)==null||$.update()},forceUpdate(){var $;($=S.current)==null||$.forceUpdate()},transformOrigin:mt.transformOrigin.varRef,referenceRef:x,popperRef:P,getPopperProps:C,getArrowProps:E,getArrowInnerProps:_,getReferenceProps:k}}function vU(e){const{size:t,shadowColor:n,bg:r,style:o}=e,i={...o,position:"absolute"};return t&&(i["--popper-arrow-size"]=t),n&&(i["--popper-arrow-shadow-color"]=n),r&&(i["--popper-arrow-bg"]=r),i}function k_(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,i=Rn(n),s=Rn(t),[a,l]=g.useState(e.defaultIsOpen||!1),u=r!==void 0?r:a,c=r!==void 0,d=g.useId(),f=o??`disclosure-${d}`,p=g.useCallback(()=>{c||l(!1),s==null||s()},[c,s]),m=g.useCallback(()=>{c||l(!0),i==null||i()},[c,i]),h=g.useCallback(()=>{u?p():m()},[u,m,p]);function S(y={}){return{...y,"aria-expanded":u,"aria-controls":f,onClick(b){var x;(x=y.onClick)==null||x.call(y,b),h()}}}function v(y={}){return{...y,hidden:!u,id:f}}return{isOpen:u,onOpen:m,onClose:p,onToggle:h,isControlled:c,getButtonProps:S,getDisclosureProps:v}}function gU(e){const{ref:t,handler:n,enabled:r=!0}=e,o=Rn(n),s=g.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;g.useEffect(()=>{if(!r)return;const a=d=>{hh(d,t)&&(s.isPointerDown=!0)},l=d=>{if(s.ignoreEmulatedMouseEvents){s.ignoreEmulatedMouseEvents=!1;return}s.isPointerDown&&n&&hh(d,t)&&(s.isPointerDown=!1,o(d))},u=d=>{s.ignoreEmulatedMouseEvents=!0,n&&s.isPointerDown&&hh(d,t)&&(s.isPointerDown=!1,o(d))},c=C_(t.current);return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",l,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",u,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",l,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",u,!0)}},[n,t,o,s,r])}function hh(e,t){var n;const r=e.target;return r&&!C_(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function C_(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function yU(e){const{isOpen:t,ref:n}=e,[r,o]=g.useState(t),[i,s]=g.useState(!1);return g.useEffect(()=>{i||(o(t),s(!0))},[t,i,r]),wc(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=oH(n.current),c=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(c)}}}function bU(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[SU,See,xU,xee]=hT(),[wU,wee]=Ge({strict:!1,name:"MenuContext"});function kU(e,...t){const n=g.useId(),r=e||n;return g.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function CU(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function PU(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:i=!0,isLazy:s,isOpen:a,defaultIsOpen:l,onClose:u,onOpen:c,placement:d="bottom-start",lazyBehavior:f="unmount",direction:p,computePositionOnMount:m=!1,...h}=e,S=g.useRef(null),v=g.useRef(null),y=xU(),b=g.useCallback(()=>{requestAnimationFrame(()=>{var ee;(ee=S.current)==null||ee.focus({preventScroll:!1})})},[]),x=g.useCallback(()=>{const ee=setTimeout(()=>{var j;if(o)(j=o.current)==null||j.focus();else{const te=y.firstEnabled();te&&W(te.index)}});O.current.add(ee)},[y,o]),k=g.useCallback(()=>{const ee=setTimeout(()=>{const j=y.lastEnabled();j&&W(j.index)});O.current.add(ee)},[y]),P=g.useCallback(()=>{c==null||c(),i?x():b()},[i,x,b,c]),{isOpen:C,onOpen:E,onClose:_,onToggle:$}=k_({isOpen:a,defaultIsOpen:l,onClose:u,onOpen:P});gU({enabled:C&&r,ref:S,handler:ee=>{var j;(j=v.current)!=null&&j.contains(ee.target)||_()}});const M=w_({...h,enabled:C||m,placement:d,direction:p}),[F,W]=g.useState(-1);Pl(()=>{C||W(-1)},[C]),XH(S,{focusRef:v,visible:C,shouldFocus:!0});const re=yU({isOpen:C,ref:S}),[H,N]=kU(t,"menu-button","menu-list"),R=g.useCallback(()=>{E(),b()},[E,b]),O=g.useRef(new Set([]));g.useEffect(()=>{const ee=O.current;return()=>{ee.forEach(j=>clearTimeout(j)),ee.clear()}},[]);const D=g.useCallback(()=>{E(),x()},[x,E]),V=g.useCallback(()=>{E(),k()},[E,k]),oe=g.useCallback(()=>{var ee,j;const te=CU(S.current),ae=(ee=S.current)==null?void 0:ee.contains(te.activeElement);if(!(C&&!ae))return;const Se=(j=y.item(F))==null?void 0:j.node;Se==null||Se.focus({preventScroll:!0})},[C,F,y]),B=g.useRef(null);return{openAndFocusMenu:R,openAndFocusFirstItem:D,openAndFocusLastItem:V,onTransitionEnd:oe,unstable__animationState:re,descendants:y,popper:M,buttonId:H,menuId:N,forceUpdate:M.forceUpdate,orientation:"vertical",isOpen:C,onToggle:$,onOpen:E,onClose:_,menuRef:S,buttonRef:v,focusedIndex:F,closeOnSelect:n,closeOnBlur:r,autoSelect:i,setFocusedIndex:W,isLazy:s,lazyBehavior:f,initialFocusRef:o,rafId:B}}var[EU,TU]=Ge({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P_=e=>{const{children:t}=e,n=ut("Menu",e),r=Ye(e),{direction:o}=Yr(),{descendants:i,...s}=PU({...r,direction:o}),a=g.useMemo(()=>s,[s]),{isOpen:l,onClose:u,forceUpdate:c}=a;return w.jsx(SU,{value:i,children:w.jsx(wU,{value:a,children:w.jsx(EU,{value:n,children:Kt(t,{isOpen:l,onClose:u,forceUpdate:c})})})})};P_.displayName="Menu";var E_=e=>{const{className:t,children:n,...r}=e,o=TU(),i=g.Children.only(n),s=g.isValidElement(i)?g.cloneElement(i,{focusable:"false","aria-hidden":!0,className:Z("chakra-menu__icon",i.props.className)}):null,a=Z("chakra-menu__icon-wrapper",t);return w.jsx(A.span,{className:a,...r,__css:o.icon,children:s})};E_.displayName="MenuIcon";var _U={slideInBottom:{...Pa,custom:{offsetY:16,reverse:!0}},slideInRight:{...Pa,custom:{offsetX:16,reverse:!0}},slideInTop:{...Pa,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...Pa,custom:{offsetX:-16,reverse:!0}},scale:{...gT,custom:{initialScale:.95,reverse:!0}},none:{}},$U=A(Xr.section),OU=e=>_U[e||"none"],T_=g.forwardRef((e,t)=>{const{preset:n,motionProps:r=OU(n),...o}=e;return w.jsx($U,{ref:t,...r,...o})});T_.displayName="ModalTransition";var RU=Object.defineProperty,MU=(e,t,n)=>t in e?RU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IU=(e,t,n)=>(MU(e,t+"",n),n),AU=class{constructor(){IU(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},bv=new AU;function __(e,t){const[n,r]=g.useState(0);return g.useEffect(()=>{const o=e.current;if(o){if(t){const i=bv.add(o);r(i)}return()=>{bv.remove(o),r(0)}}},[t,e]),n}var DU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mi=new WeakMap,Iu=new WeakMap,Au={},mh=0,$_=function(e){return e&&(e.host||$_(e.parentNode))},FU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$_(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},LU=function(e,t,n,r){var o=FU(t,Array.isArray(e)?e:[e]);Au[n]||(Au[n]=new WeakMap);var i=Au[n],s=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",h=(Mi.get(f)||0)+1,S=(i.get(f)||0)+1;Mi.set(f,h),i.set(f,S),s.push(f),h===1&&m&&Iu.set(f,!0),S===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),a.clear(),mh++,function(){s.forEach(function(d){var f=Mi.get(d)-1,p=i.get(d)-1;Mi.set(d,f),i.set(d,p),f||(Iu.has(d)||d.removeAttribute(r),Iu.delete(d)),p||d.removeAttribute(n)}),mh--,mh||(Mi=new WeakMap,Mi=new WeakMap,Iu=new WeakMap,Au={})}},NU=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=DU(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),LU(r,o,n,"aria-hidden")):function(){return null}};function VU(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:i=!0,useInert:s=!0,onOverlayClick:a,onEsc:l}=e,u=g.useRef(null),c=g.useRef(null),[d,f,p]=BU(r,"chakra-modal","chakra-modal--header","chakra-modal--body");zU(u,t&&s);const m=__(u,t),h=g.useRef(null),S=g.useCallback(_=>{h.current=_.target},[]),v=g.useCallback(_=>{_.key==="Escape"&&(_.stopPropagation(),i&&(n==null||n()),l==null||l())},[i,n,l]),[y,b]=g.useState(!1),[x,k]=g.useState(!1),P=g.useCallback((_={},$=null)=>({role:"dialog",..._,ref:mn($,u),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":y?f:void 0,"aria-describedby":x?p:void 0,onClick:Ee(_.onClick,M=>M.stopPropagation())}),[p,x,d,f,y]),C=g.useCallback(_=>{_.stopPropagation(),h.current===_.target&&bv.isTopModal(u.current)&&(o&&(n==null||n()),a==null||a())},[n,o,a]),E=g.useCallback((_={},$=null)=>({..._,ref:mn($,c),onClick:Ee(_.onClick,C),onKeyDown:Ee(_.onKeyDown,v),onMouseDown:Ee(_.onMouseDown,S)}),[v,S,C]);return{isOpen:t,onClose:n,headerId:f,bodyId:p,setBodyMounted:k,setHeaderMounted:b,dialogRef:u,overlayRef:c,getDialogProps:P,getDialogContainerProps:E,index:m}}function zU(e,t){const n=e.current;g.useEffect(()=>{if(!(!e.current||!t))return NU(e.current)},[t,e,n])}function BU(e,...t){const n=g.useId(),r=e||n;return g.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[jU,Ci]=Ge({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[HU,$o]=Ge({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),sy=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:i,initialFocusRef:s,finalFocusRef:a,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:p,onCloseComplete:m}=t,h=ut("Modal",t),v={...VU(t),autoFocus:o,trapFocus:i,initialFocusRef:s,finalFocusRef:a,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:p};return w.jsx(HU,{value:v,children:w.jsx(jU,{value:h,children:w.jsx(Do,{onExitComplete:m,children:v.isOpen&&w.jsx(Ws,{...n,children:r})})})})};sy.displayName="Modal";var Cc="right-scroll-bar-position",Pc="width-before-scroll-bar",WU="with-scroll-bars-hidden",UU="--removed-body-scroll-bar-size",O_=$T(),vh=function(){},jf=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:vh,onWheelCapture:vh,onTouchMoveCapture:vh}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,S=e.as,v=S===void 0?"div":S,y=e.gapMode,b=ET(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,k=PT([n,t]),P=dr(dr({},b),o);return g.createElement(g.Fragment,null,c&&g.createElement(x,{sideCar:O_,removeScrollBar:u,shards:d,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:y}),s?g.cloneElement(g.Children.only(a),dr(dr({},P),{ref:k})):g.createElement(v,dr({},P,{className:l,ref:k}),a))});jf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jf.classNames={fullWidth:Pc,zeroRight:Cc};var qU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qU();return t&&e.setAttribute("nonce",t),e}function GU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function YU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var XU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KU())&&(GU(t,n),YU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QU=function(){var e=XU();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},R_=function(){var e=QU(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ZU={left:0,top:0,right:0,gap:0},gh=function(e){return parseInt(e||"",10)||0},JU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[gh(n),gh(r),gh(o)]},eq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ZU;var t=JU(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tq=R_(),Ss="data-scroll-locked",nq=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + `),()=>{document.head.removeChild(c)}},[t]),w.jsx(hj,{isPresent:t,childRef:r,sizeRef:o,children:g.cloneElement(e,{ref:r})})}const ah=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=QP(vj),l=g.useId(),u=g.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c=>{a.set(c,!0);for(const d of a.values())if(!d)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),i?[Math.random()]:[n]);return g.useMemo(()=>{a.forEach((c,d)=>a.set(d,!1))},[n]),g.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(mj,{isPresent:n,children:e})),w.jsx(Kl.Provider,{value:u,children:e})};function vj(){return new Map}function gj(e){return g.useEffect(()=>()=>e(),[])}const jo=e=>e.key||"";function yj(e,t){e.forEach(n=>{const r=jo(n);t.set(r,n)})}function bj(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const Do=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{const a=g.useContext(f0).forceRender||pj()[0],l=iT(),u=bj(e);let c=u;const d=g.useRef(new Map).current,f=g.useRef(c),p=g.useRef(new Map).current,m=g.useRef(!0);if(l0(()=>{m.current=!1,yj(u,p),f.current=c}),gj(()=>{m.current=!0,p.clear(),d.clear()}),m.current)return w.jsx(w.Fragment,{children:c.map(y=>w.jsx(ah,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:y},jo(y)))});c=[...c];const h=f.current.map(jo),S=u.map(jo),v=h.length;for(let y=0;y{if(S.indexOf(b)!==-1)return;const x=p.get(b);if(!x)return;const k=h.indexOf(b);let P=y;if(!P){const C=()=>{d.delete(b);const E=Array.from(p.keys()).filter(_=>!S.includes(_));if(E.forEach(_=>p.delete(_)),f.current=u.filter(_=>{const $=jo(_);return $===b||E.includes($)}),!d.size){if(l.current===!1)return;a(),r&&r()}};P=w.jsx(ah,{isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:i,mode:s,children:x},jo(x)),d.set(b,P)}c.splice(k,0,P)}),c=c.map(y=>{const b=y.key;return d.has(b)?y:w.jsx(ah,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:y},jo(y))}),w.jsx(w.Fragment,{children:d.size?c:c.map(y=>g.cloneElement(y))})};var Sj={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},sT=g.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:o,requestClose:i=!1,position:s="bottom",duration:a=5e3,containerStyle:l,motionVariants:u=Sj,toastSpacing:c="0.5rem"}=e,[d,f]=g.useState(a),p=v9();Pl(()=>{p||r==null||r()},[p]),Pl(()=>{f(a)},[a]);const m=()=>f(null),h=()=>f(a),S=()=>{p&&o()};g.useEffect(()=>{p&&i&&o()},[p,i,o]),YN(S,d);const v=g.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),y=g.useMemo(()=>KN(s),[s]);return w.jsx(Xr.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:m,onHoverEnd:h,custom:{position:s},style:y,children:w.jsx(A.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:v,children:Kt(n,{id:t,onClose:S})})})});sT.displayName="ToastComponent";function xj(e,t){var n;const r=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=i==null?void 0:i[t])!=null?n:r}var fx={path:w.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[w.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),w.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),w.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Qn=U((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:s,className:a,__css:l,...u}=e,c=Z("chakra-icon",a),d=en("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...d},p={ref:t,focusable:i,className:c,__css:f},m=r??fx.viewBox;if(n&&typeof n!="string")return w.jsx(A.svg,{as:n,...p,...u});const h=s??fx.path;return w.jsx(A.svg,{verticalAlign:"middle",viewBox:m,...p,...u,children:h})});Qn.displayName="Icon";function ki(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:o={}}=e,i=g.Children.toArray(e.path),s=U((a,l)=>w.jsx(Qn,{ref:l,viewBox:t,...o,...a,children:i.length?i:w.jsx("path",{fill:"currentColor",d:n})}));return s.displayName=r,s}function wj(e){return w.jsx(Qn,{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function kj(e){return w.jsx(Qn,{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function px(e){return w.jsx(Qn,{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var Cj=Xn({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Vf=U((e,t)=>{const n=en("Spinner",e),{label:r="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:s="transparent",className:a,...l}=Ye(e),u=Z("chakra-spinner",a),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:s,borderLeftColor:s,animation:`${Cj} ${i} linear infinite`,...n};return w.jsx(A.div,{ref:t,__css:c,className:u,...l,children:r&&w.jsx(A.span,{srOnly:!0,children:r})})});Vf.displayName="Spinner";var[Pj,I0]=Ge({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Ej,A0]=Ge({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),aT={info:{icon:kj,colorScheme:"blue"},warning:{icon:px,colorScheme:"orange"},success:{icon:wj,colorScheme:"green"},error:{icon:px,colorScheme:"red"},loading:{icon:Vf,colorScheme:"blue"}};function Tj(e){return aT[e].colorScheme}function _j(e){return aT[e].icon}var lT=U(function(t,n){const r=A0(),{status:o}=I0(),i={display:"inline",...r.description};return w.jsx(A.div,{ref:n,"data-status":o,...t,className:Z("chakra-alert__desc",t.className),__css:i})});lT.displayName="AlertDescription";function uT(e){const{status:t}=I0(),n=_j(t),r=A0(),o=t==="loading"?r.spinner:r.icon;return w.jsx(A.span,{display:"inherit","data-status":t,...e,className:Z("chakra-alert__icon",e.className),__css:o,children:e.children||w.jsx(n,{h:"100%",w:"100%"})})}uT.displayName="AlertIcon";var cT=U(function(t,n){const r=A0(),{status:o}=I0();return w.jsx(A.div,{ref:n,"data-status":o,...t,className:Z("chakra-alert__title",t.className),__css:r.title})});cT.displayName="AlertTitle";var dT=U(function(t,n){var r;const{status:o="info",addRole:i=!0,...s}=Ye(t),a=(r=t.colorScheme)!=null?r:Tj(o),l=ut("Alert",{...t,colorScheme:a}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return w.jsx(Pj,{value:{status:o},children:w.jsx(Ej,{value:l,children:w.jsx(A.div,{"data-status":o,role:i?"alert":void 0,ref:n,...s,className:Z("chakra-alert",t.className),__css:u})})})});dT.displayName="Alert";function $j(e){return w.jsx(Qn,{focusable:"false","aria-hidden":!0,...e,children:w.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var D0=U(function(t,n){const r=en("CloseButton",t),{children:o,isDisabled:i,__css:s,...a}=Ye(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return w.jsx(A.button,{type:"button","aria-label":"Close",ref:n,disabled:i,__css:{...l,...r,...s},...a,children:o||w.jsx($j,{width:"1em",height:"1em"})})});D0.displayName="CloseButton";var Oj={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},cr=Rj(Oj);function Rj(e){let t=e;const n=new Set,r=o=>{t=o(t),n.forEach(i=>i())};return{getState:()=>t,subscribe:o=>(n.add(o),()=>{r(()=>e),n.delete(o)}),removeToast:(o,i)=>{r(s=>({...s,[i]:s[i].filter(a=>a.id!=o)}))},notify:(o,i)=>{const s=Mj(o,i),{position:a,id:l}=s;return r(u=>{var c,d;const p=a.includes("top")?[s,...(c=u[a])!=null?c:[]]:[...(d=u[a])!=null?d:[],s];return{...u,[a]:p}}),l},update:(o,i)=>{o&&r(s=>{const a={...s},{position:l,index:u}=eS(a,o);return l&&u!==-1&&(a[l][u]={...a[l][u],...i,message:fT(i)}),a})},closeAll:({positions:o}={})=>{r(i=>(o??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=i[u].map(c=>({...c,requestClose:!0})),l),{...i}))},close:o=>{r(i=>{const s=IP(i,o);return s?{...i,[s]:i[s].map(a=>a.id==o?{...a,requestClose:!0}:a)}:i})},isActive:o=>!!eS(cr.getState(),o).position}}var hx=0;function Mj(e,t={}){var n,r;hx+=1;const o=(n=t.id)!=null?n:hx,i=(r=t.position)!=null?r:"bottom";return{id:o,message:e,position:i,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>cr.removeToast(String(o),i),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Ij=e=>{const{status:t,variant:n="solid",id:r,title:o,isClosable:i,onClose:s,description:a,colorScheme:l,icon:u}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return w.jsxs(dT,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[w.jsx(uT,{children:u}),w.jsxs(A.div,{flex:"1",maxWidth:"100%",children:[o&&w.jsx(cT,{id:c==null?void 0:c.title,children:o}),a&&w.jsx(lT,{id:c==null?void 0:c.description,display:"block",children:a})]}),i&&w.jsx(D0,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function fT(e={}){const{render:t,toastComponent:n=Ij}=e;return o=>typeof t=="function"?t({...o,...e}):w.jsx(n,{...o,...e})}function Aj(e,t){const n=o=>{var i;return{...t,...o,position:xj((i=o==null?void 0:o.position)!=null?i:t==null?void 0:t.position,e)}},r=o=>{const i=n(o),s=fT(i);return cr.notify(s,i)};return r.update=(o,i)=>{cr.update(o,n(i))},r.promise=(o,i)=>{const s=r({...i.loading,status:"loading",duration:null});o.then(a=>r.update(s,{status:"success",duration:5e3,...Kt(i.success,a)})).catch(a=>r.update(s,{status:"error",duration:5e3,...Kt(i.error,a)}))},r.closeAll=cr.closeAll,r.close=cr.close,r.isActive=cr.isActive,r}var[Dj,Fj]=Ge({name:"ToastOptionsContext",strict:!1}),Lj=e=>{const t=g.useSyncExternalStore(cr.subscribe,cr.getState,cr.getState),{motionVariants:n,component:r=sT,portalProps:o}=e,s=Object.keys(t).map(a=>{const l=t[a];return w.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${a}`,id:`chakra-toast-manager-${a}`,style:GN(a),children:w.jsx(Do,{initial:!1,children:l.map(u=>w.jsx(r,{motionVariants:n,...u},u.id))})},a)});return w.jsx(Ws,{...o,children:s})};function mee(e){const{theme:t}=rP(),n=Fj();return g.useMemo(()=>Aj(t.direction,{...n,...e}),[e,t.direction,n])}var Nj=e=>function({children:n,theme:r=e,toastOptions:o,...i}){return w.jsxs(UN,{theme:r,...i,children:[w.jsx(Dj,{value:o==null?void 0:o.defaultOptions,children:n}),w.jsx(Lj,{...o})]})},vee=Nj(CP),Vj=Object.defineProperty,zj=(e,t,n)=>t in e?Vj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,je=(e,t,n)=>(zj(e,typeof t!="symbol"?t+"":t,n),n);function mx(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var Bj=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function vx(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function gx(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var iv=typeof window<"u"?g.useLayoutEffect:g.useEffect,wd=e=>e,jj=class{constructor(){je(this,"descendants",new Map),je(this,"register",e=>{if(e!=null)return Bj(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),je(this,"unregister",e=>{this.descendants.delete(e);const t=mx(Array.from(this.descendants.keys()));this.assignIndex(t)}),je(this,"destroy",()=>{this.descendants.clear()}),je(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),je(this,"count",()=>this.descendants.size),je(this,"enabledCount",()=>this.enabledValues().length),je(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),je(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),je(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),je(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),je(this,"first",()=>this.item(0)),je(this,"firstEnabled",()=>this.enabledItem(0)),je(this,"last",()=>this.item(this.descendants.size-1)),je(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),je(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),je(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),je(this,"next",(e,t=!0)=>{const n=vx(e,this.count(),t);return this.item(n)}),je(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=vx(r,this.enabledCount(),t);return this.enabledItem(o)}),je(this,"prev",(e,t=!0)=>{const n=gx(e,this.count()-1,t);return this.item(n)}),je(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=gx(r,this.enabledCount()-1,t);return this.enabledItem(o)}),je(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=mx(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function Hj(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function mn(...e){return t=>{e.forEach(n=>{Hj(n,t)})}}function Wj(...e){return g.useMemo(()=>mn(...e),e)}function Uj(){const e=g.useRef(new jj);return iv(()=>()=>e.current.destroy()),e.current}var[qj,pT]=Ge({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Kj(e){const t=pT(),[n,r]=g.useState(-1),o=g.useRef(null);iv(()=>()=>{o.current&&t.unregister(o.current)},[]),iv(()=>{if(!o.current)return;const s=Number(o.current.dataset.index);n!=s&&!Number.isNaN(s)&&r(s)});const i=wd(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:mn(i,o)}}function hT(){return[wd(qj),()=>wd(pT()),()=>Uj(),o=>Kj(o)]}function mT(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(f,p)=>f!==p}=e,i=Rn(r),s=Rn(o),[a,l]=g.useState(n),u=t!==void 0,c=u?t:a,d=Rn(f=>{const m=typeof f=="function"?f(c):f;s(c,m)&&(u||l(m),i(m))},[u,i,c,s]);return[c,d]}var Jo={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},ua={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function sv(e){var t;switch((t=e==null?void 0:e.direction)!=null?t:"right"){case"right":return ua.slideRight;case"left":return ua.slideLeft;case"bottom":return ua.slideDown;case"top":return ua.slideUp;default:return ua.slideRight}}var ui={enter:{duration:.2,ease:Jo.easeOut},exit:{duration:.1,ease:Jo.easeIn}},Gn={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},Gj=e=>e!=null&&parseInt(e.toString(),10)>0,yx={exit:{height:{duration:.2,ease:Jo.ease},opacity:{duration:.3,ease:Jo.ease}},enter:{height:{duration:.3,ease:Jo.ease},opacity:{duration:.4,ease:Jo.ease}}},Yj={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{...e&&{opacity:Gj(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(i=n==null?void 0:n.exit)!=null?i:Gn.exit(yx.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(i=n==null?void 0:n.enter)!=null?i:Gn.enter(yx.enter,o)}}},Xj=g.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:i=0,endingHeight:s="auto",style:a,className:l,transition:u,transitionEnd:c,...d}=e,[f,p]=g.useState(!1);g.useEffect(()=>{const y=setTimeout(()=>{p(!0)});return()=>clearTimeout(y)},[]),k3({condition:Number(i)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const m=parseFloat(i.toString())>0,h={startingHeight:i,endingHeight:s,animateOpacity:o,transition:f?u:{enter:{duration:0}},transitionEnd:{enter:c==null?void 0:c.enter,exit:r?c==null?void 0:c.exit:{...c==null?void 0:c.exit,display:m?"block":"none"}}},S=r?n:!0,v=n||r?"enter":"exit";return w.jsx(Do,{initial:!1,custom:h,children:S&&w.jsx(Xr.div,{ref:t,...d,className:Z("chakra-collapse",l),style:{overflow:"hidden",display:"block",...a},custom:h,variants:Yj,initial:r?"exit":!1,animate:v,exit:"exit"})})});Xj.displayName="Collapse";var Qj={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Gn.enter(ui.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:Gn.exit(ui.exit,n),transitionEnd:t==null?void 0:t.exit}}},vT={initial:"exit",animate:"enter",exit:"exit",variants:Qj},Zj=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:i,transition:s,transitionEnd:a,delay:l,...u}=t,c=o||r?"enter":"exit",d=r?o&&r:!0,f={transition:s,transitionEnd:a,delay:l};return w.jsx(Do,{custom:f,children:d&&w.jsx(Xr.div,{ref:n,className:Z("chakra-fade",i),custom:f,...vT,animate:c,...u})})});Zj.displayName="Fade";var Jj={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(i=n==null?void 0:n.exit)!=null?i:Gn.exit(ui.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Gn.enter(ui.enter,n),transitionEnd:e==null?void 0:e.enter}}},gT={initial:"exit",animate:"enter",exit:"exit",variants:Jj},e8=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:i=!0,initialScale:s=.95,className:a,transition:l,transitionEnd:u,delay:c,...d}=t,f=r?o&&r:!0,p=o||r?"enter":"exit",m={initialScale:s,reverse:i,transition:l,transitionEnd:u,delay:c};return w.jsx(Do,{custom:m,children:f&&w.jsx(Xr.div,{ref:n,className:Z("chakra-offset-slide",a),...gT,animate:p,custom:m,...d})})});e8.displayName="ScaleFade";var t8={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{opacity:0,x:e,y:t,transition:(i=n==null?void 0:n.exit)!=null?i:Gn.exit(ui.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:Gn.enter(ui.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:i})=>{var s;const a={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:Gn.exit(ui.exit,i),...o?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},Pa={initial:"initial",animate:"enter",exit:"exit",variants:t8},n8=g.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:i=!0,className:s,offsetX:a=0,offsetY:l=8,transition:u,transitionEnd:c,delay:d,...f}=t,p=r?o&&r:!0,m=o||r?"enter":"exit",h={offsetX:a,offsetY:l,reverse:i,transition:u,transitionEnd:c,delay:d};return w.jsx(Do,{custom:h,children:p&&w.jsx(Xr.div,{ref:n,className:Z("chakra-offset-slide",s),custom:h,...Pa,animate:m,...f})})});n8.displayName="SlideFade";var bx={exit:{duration:.15,ease:Jo.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},r8={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:i}=sv({direction:e});return{...i,transition:(o=t==null?void 0:t.exit)!=null?o:Gn.exit(bx.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:i}=sv({direction:e});return{...i,transition:(o=n==null?void 0:n.enter)!=null?o:Gn.enter(bx.enter,r),transitionEnd:t==null?void 0:t.enter}}},yT=g.forwardRef(function(t,n){const{direction:r="right",style:o,unmountOnExit:i,in:s,className:a,transition:l,transitionEnd:u,delay:c,motionProps:d,...f}=t,p=sv({direction:r}),m=Object.assign({position:"fixed"},p.position,o),h=i?s&&i:!0,S=s||i?"enter":"exit",v={transitionEnd:u,transition:l,direction:r,delay:c};return w.jsx(Do,{custom:v,children:h&&w.jsx(Xr.div,{...f,ref:n,initial:"exit",className:Z("chakra-slide",a),animate:S,exit:"exit",custom:v,variants:r8,style:m,...d})})});yT.displayName="Slide";var av=U(function(t,n){const{htmlWidth:r,htmlHeight:o,alt:i,...s}=t;return w.jsx("img",{width:r,height:o,ref:n,alt:i,...s})});av.displayName="NativeImage";function o8(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:i,crossOrigin:s,sizes:a,ignoreFallback:l}=e,[u,c]=g.useState("pending");g.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=g.useRef(),f=g.useCallback(()=>{if(!n)return;p();const m=new Image;m.src=n,s&&(m.crossOrigin=s),r&&(m.srcset=r),a&&(m.sizes=a),t&&(m.loading=t),m.onload=h=>{p(),c("loaded"),o==null||o(h)},m.onerror=h=>{p(),c("failed"),i==null||i(h)},d.current=m},[n,s,r,a,o,i,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return Ir(()=>{if(!l)return u==="loading"&&f(),()=>{p()}},[u,f,l]),l?"loaded":u}var i8=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function s8(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var a8=U(function(t,n){const{fallbackSrc:r,fallback:o,src:i,srcSet:s,align:a,fit:l,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:p,...m}=t,h=r!==void 0||o!==void 0,S=u!=null||c||!h,v=o8({...t,crossOrigin:d,ignoreFallback:S}),y=i8(v,f),b={ref:n,objectFit:l,objectPosition:a,...S?m:s8(m,["onError","onLoad"])};return y?o||w.jsx(A.img,{as:av,className:"chakra-image__placeholder",src:r,...b}):w.jsx(A.img,{as:av,src:i,srcSet:s,crossOrigin:d,loading:u,referrerPolicy:p,className:"chakra-image",...b})});a8.displayName="Image";function F0(e){return g.Children.toArray(e).filter(t=>g.isValidElement(t))}var[gee,l8]=Ge({strict:!1,name:"ButtonGroupContext"});function u8(e){const[t,n]=g.useState(!e);return{ref:g.useCallback(i=>{i&&n(i.tagName==="BUTTON")},[]),type:t?"button":void 0}}function lv(e){const{children:t,className:n,...r}=e,o=g.isValidElement(t)?g.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,i=Z("chakra-button__icon",n);return w.jsx(A.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:i,children:o})}lv.displayName="ButtonIcon";function uv(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=w.jsx(Vf,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:s,...a}=e,l=Z("chakra-button__spinner",i),u=n==="start"?"marginEnd":"marginStart",c=g.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...s}),[s,t,u,r]);return w.jsx(A.div,{className:l,...a,__css:c,children:o})}uv.displayName="ButtonSpinner";var bT=U((e,t)=>{const n=l8(),r=en("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:i,isActive:s,children:a,leftIcon:l,rightIcon:u,loadingText:c,iconSpacing:d="0.5rem",type:f,spinner:p,spinnerPlacement:m="start",className:h,as:S,...v}=Ye(e),y=g.useMemo(()=>{const P={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:P}}},[r,n]),{ref:b,type:x}=u8(S),k={rightIcon:u,leftIcon:l,iconSpacing:d,children:a};return w.jsxs(A.button,{ref:Wj(t,b),as:S,type:f??x,"data-active":ce(s),"data-loading":ce(i),__css:y,className:Z("chakra-button",h),...v,disabled:o||i,children:[i&&m==="start"&&w.jsx(uv,{className:"chakra-button__spinner--start",label:c,placement:"start",spacing:d,children:p}),i?c||w.jsx(A.span,{opacity:0,children:w.jsx(Sx,{...k})}):w.jsx(Sx,{...k}),i&&m==="end"&&w.jsx(uv,{className:"chakra-button__spinner--end",label:c,placement:"end",spacing:d,children:p})]})});bT.displayName="Button";function Sx(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return w.jsxs(w.Fragment,{children:[t&&w.jsx(lv,{marginEnd:o,children:t}),r,n&&w.jsx(lv,{marginStart:o,children:n})]})}var c8=U((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":i,...s}=e,a=n||r,l=g.isValidElement(a)?g.cloneElement(a,{"aria-hidden":!0,focusable:!1}):null;return w.jsx(bT,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":i,...s,children:l})});c8.displayName="IconButton";var[d8,f8]=Ge({name:"CheckboxGroupContext",strict:!1});function xx(e){return e&&$t(e)&&$t(e.target)}function p8(e={}){const{defaultValue:t,value:n,onChange:r,isDisabled:o,isNative:i}=e,s=Rn(r),[a,l]=mT({value:n,defaultValue:t||[],onChange:s}),u=g.useCallback(d=>{if(!a)return;const f=xx(d)?d.target.checked:!a.includes(d),p=xx(d)?d.target.value:d,m=f?[...a,p]:a.filter(h=>String(h)!==String(p));l(m)},[l,a]),c=g.useCallback((d={})=>({...d,[i?"checked":"isChecked"]:a.some(p=>String(d.value)===String(p)),onChange:u}),[u,i,a]);return{value:a,isDisabled:o,onChange:u,setValue:l,getCheckboxProps:c}}function h8(e){const{colorScheme:t,size:n,variant:r,children:o,isDisabled:i}=e,{value:s,onChange:a}=p8(e),l=g.useMemo(()=>({size:n,onChange:a,colorScheme:t,value:s,variant:r,isDisabled:i}),[n,a,t,s,r,i]);return w.jsx(d8,{value:l,children:o})}h8.displayName="CheckboxGroup";function m8(e){const[t,n]=g.useState(e),[r,o]=g.useState(!1);return e!==t&&(o(!0),n(e)),r}function v8(e){return w.jsx(A.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:w.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function g8(e){return w.jsx(A.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:w.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function y8(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?g8:v8;return n||t?w.jsx(A.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:w.jsx(o,{...r})}):null}var[b8,ST]=Ge({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[S8,zf]=Ge({strict:!1,name:"FormControlContext"});function x8(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:i,...s}=e,a=g.useId(),l=t||`field-${a}`,u=`${l}-label`,c=`${l}-feedback`,d=`${l}-helptext`,[f,p]=g.useState(!1),[m,h]=g.useState(!1),[S,v]=g.useState(!1),y=g.useCallback((C={},E=null)=>({id:d,...C,ref:mn(E,_=>{_&&h(!0)})}),[d]),b=g.useCallback((C={},E=null)=>({...C,ref:E,"data-focus":ce(S),"data-disabled":ce(o),"data-invalid":ce(r),"data-readonly":ce(i),id:C.id!==void 0?C.id:u,htmlFor:C.htmlFor!==void 0?C.htmlFor:l}),[l,o,S,r,i,u]),x=g.useCallback((C={},E=null)=>({id:c,...C,ref:mn(E,_=>{_&&p(!0)}),"aria-live":"polite"}),[c]),k=g.useCallback((C={},E=null)=>({...C,...s,ref:E,role:"group","data-focus":ce(S),"data-disabled":ce(o),"data-invalid":ce(r),"data-readonly":ce(i)}),[s,o,S,r,i]),P=g.useCallback((C={},E=null)=>({...C,ref:E,role:"presentation","aria-hidden":!0,children:C.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!i,isDisabled:!!o,isFocused:!!S,onFocus:()=>v(!0),onBlur:()=>v(!1),hasFeedbackText:f,setHasFeedbackText:p,hasHelpText:m,setHasHelpText:h,id:l,labelId:u,feedbackId:c,helpTextId:d,htmlProps:s,getHelpTextProps:y,getErrorMessageProps:x,getRootProps:k,getLabelProps:b,getRequiredIndicatorProps:P}}var w8=U(function(t,n){const r=ut("Form",t),o=Ye(t),{getRootProps:i,htmlProps:s,...a}=x8(o),l=Z("chakra-form-control",t.className);return w.jsx(S8,{value:a,children:w.jsx(b8,{value:r,children:w.jsx(A.div,{...i({},n),className:l,__css:r.container})})})});w8.displayName="FormControl";var k8=U(function(t,n){const r=zf(),o=ST(),i=Z("chakra-form__helper-text",t.className);return w.jsx(A.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:i})});k8.displayName="FormHelperText";var C8=U(function(t,n){var r;const o=en("FormLabel",t),i=Ye(t),{className:s,children:a,requiredIndicator:l=w.jsx(xT,{}),optionalIndicator:u=null,...c}=i,d=zf(),f=(r=d==null?void 0:d.getLabelProps(c,n))!=null?r:{ref:n,...c};return w.jsxs(A.label,{...f,className:Z("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...o},children:[a,d!=null&&d.isRequired?l:u]})});C8.displayName="FormLabel";var xT=U(function(t,n){const r=zf(),o=ST();if(!(r!=null&&r.isRequired))return null;const i=Z("chakra-form__required-indicator",t.className);return w.jsx(A.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:i})});xT.displayName="RequiredIndicator";function L0(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...i}=wT(e);return{...i,disabled:t,readOnly:r,required:o,"aria-invalid":$p(n),"aria-required":$p(o),"aria-readonly":$p(r)}}function wT(e){var t,n,r;const o=zf(),{id:i,disabled:s,readOnly:a,required:l,isRequired:u,isInvalid:c,isReadOnly:d,isDisabled:f,onFocus:p,onBlur:m,...h}=e,S=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&S.push(o.feedbackId),o!=null&&o.hasHelpText&&S.push(o.helpTextId),{...h,"aria-describedby":S.join(" ")||void 0,id:i??(o==null?void 0:o.id),isDisabled:(t=s??f)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=a??d)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=l??u)!=null?r:o==null?void 0:o.isRequired,isInvalid:c??(o==null?void 0:o.isInvalid),onFocus:Ee(o==null?void 0:o.onFocus,p),onBlur:Ee(o==null?void 0:o.onBlur,m)}}var P8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},E8=()=>typeof document<"u",wx=!1,Zl=null,gi=!1,cv=!1,dv=new Set;function N0(e,t){dv.forEach(n=>n(e,t))}var T8=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function _8(e){return!(e.metaKey||!T8&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function kx(e){gi=!0,_8(e)&&(Zl="keyboard",N0("keyboard",e))}function Oi(e){if(Zl="pointer",e.type==="mousedown"||e.type==="pointerdown"){gi=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;N0("pointer",e)}}function $8(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function O8(e){$8(e)&&(gi=!0,Zl="virtual")}function R8(e){e.target===window||e.target===document||(!gi&&!cv&&(Zl="virtual",N0("virtual",e)),gi=!1,cv=!1)}function M8(){gi=!1,cv=!0}function Cx(){return Zl!=="pointer"}function I8(){if(!E8()||wx)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){gi=!0,e.apply(this,n)},document.addEventListener("keydown",kx,!0),document.addEventListener("keyup",kx,!0),document.addEventListener("click",O8,!0),window.addEventListener("focus",R8,!0),window.addEventListener("blur",M8,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Oi,!0),document.addEventListener("pointermove",Oi,!0),document.addEventListener("pointerup",Oi,!0)):(document.addEventListener("mousedown",Oi,!0),document.addEventListener("mousemove",Oi,!0),document.addEventListener("mouseup",Oi,!0)),wx=!0}function A8(e){I8(),e(Cx());const t=()=>e(Cx());return dv.add(t),()=>{dv.delete(t)}}function D8(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function F8(e={}){const t=wT(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:i,id:s,onBlur:a,onFocus:l,"aria-describedby":u}=t,{defaultChecked:c,isChecked:d,isFocusable:f,onChange:p,isIndeterminate:m,name:h,value:S,tabIndex:v=void 0,"aria-label":y,"aria-labelledby":b,"aria-invalid":x,...k}=e,P=D8(k,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),C=Rn(p),E=Rn(a),_=Rn(l),[$,M]=g.useState(!1),[F,W]=g.useState(!1),[re,H]=g.useState(!1),[N,R]=g.useState(!1);g.useEffect(()=>A8(M),[]);const O=g.useRef(null),[D,V]=g.useState(!0),[oe,B]=g.useState(!!c),ee=d!==void 0,j=ee?d:oe,te=g.useCallback(ne=>{if(r||n){ne.preventDefault();return}ee||B(j?ne.target.checked:m?!0:ne.target.checked),C==null||C(ne)},[r,n,j,ee,m,C]);Ir(()=>{O.current&&(O.current.indeterminate=!!m)},[m]),Pl(()=>{n&&W(!1)},[n,W]),Ir(()=>{const ne=O.current;if(!(ne!=null&&ne.form))return;const Pe=()=>{B(!!c)};return ne.form.addEventListener("reset",Pe),()=>{var Be;return(Be=ne.form)==null?void 0:Be.removeEventListener("reset",Pe)}},[]);const ae=n&&!f,we=g.useCallback(ne=>{ne.key===" "&&R(!0)},[R]),Se=g.useCallback(ne=>{ne.key===" "&&R(!1)},[R]);Ir(()=>{if(!O.current)return;O.current.checked!==j&&B(O.current.checked)},[O.current]);const xt=g.useCallback((ne={},Pe=null)=>{const Be=nt=>{F&&nt.preventDefault(),R(!0)};return{...ne,ref:Pe,"data-active":ce(N),"data-hover":ce(re),"data-checked":ce(j),"data-focus":ce(F),"data-focus-visible":ce(F&&$),"data-indeterminate":ce(m),"data-disabled":ce(n),"data-invalid":ce(i),"data-readonly":ce(r),"aria-hidden":!0,onMouseDown:Ee(ne.onMouseDown,Be),onMouseUp:Ee(ne.onMouseUp,()=>R(!1)),onMouseEnter:Ee(ne.onMouseEnter,()=>H(!0)),onMouseLeave:Ee(ne.onMouseLeave,()=>H(!1))}},[N,j,n,F,$,re,m,i,r]),Ln=g.useCallback((ne={},Pe=null)=>({...ne,ref:Pe,"data-active":ce(N),"data-hover":ce(re),"data-checked":ce(j),"data-focus":ce(F),"data-focus-visible":ce(F&&$),"data-indeterminate":ce(m),"data-disabled":ce(n),"data-invalid":ce(i),"data-readonly":ce(r)}),[N,j,n,F,$,re,m,i,r]),Bt=g.useCallback((ne={},Pe=null)=>({...P,...ne,ref:mn(Pe,Be=>{Be&&V(Be.tagName==="LABEL")}),onClick:Ee(ne.onClick,()=>{var Be;D||((Be=O.current)==null||Be.click(),requestAnimationFrame(()=>{var nt;(nt=O.current)==null||nt.focus({preventScroll:!0})}))}),"data-disabled":ce(n),"data-checked":ce(j),"data-invalid":ce(i)}),[P,n,j,i,D]),pe=g.useCallback((ne={},Pe=null)=>({...ne,ref:mn(O,Pe),type:"checkbox",name:h,value:S,id:s,tabIndex:v,onChange:Ee(ne.onChange,te),onBlur:Ee(ne.onBlur,E,()=>W(!1)),onFocus:Ee(ne.onFocus,_,()=>W(!0)),onKeyDown:Ee(ne.onKeyDown,we),onKeyUp:Ee(ne.onKeyUp,Se),required:o,checked:j,disabled:ae,readOnly:r,"aria-label":y,"aria-labelledby":b,"aria-invalid":x?!!x:i,"aria-describedby":u,"aria-disabled":n,style:P8}),[h,S,s,te,E,_,we,Se,o,j,ae,r,y,b,x,i,u,n,v]),tt=g.useCallback((ne={},Pe=null)=>({...ne,ref:Pe,onMouseDown:Ee(ne.onMouseDown,L8),"data-disabled":ce(n),"data-checked":ce(j),"data-invalid":ce(i)}),[j,n,i]);return{state:{isInvalid:i,isFocused:F,isChecked:j,isActive:N,isHovered:re,isIndeterminate:m,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:Bt,getCheckboxProps:xt,getIndicatorProps:Ln,getInputProps:pe,getLabelProps:tt,htmlProps:P}}function L8(e){e.preventDefault(),e.stopPropagation()}var N8={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},V8={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},z8=Xn({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),B8=Xn({from:{opacity:0},to:{opacity:1}}),j8=Xn({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),H8=U(function(t,n){const r=f8(),o={...r,...t},i=ut("Checkbox",o),s=Ye(t),{spacing:a="0.5rem",className:l,children:u,iconColor:c,iconSize:d,icon:f=w.jsx(y8,{}),isChecked:p,isDisabled:m=r==null?void 0:r.isDisabled,onChange:h,inputProps:S,...v}=s;let y=p;r!=null&&r.value&&s.value&&(y=r.value.includes(s.value));let b=h;r!=null&&r.onChange&&s.value&&(b=P3(r.onChange,h));const{state:x,getInputProps:k,getCheckboxProps:P,getLabelProps:C,getRootProps:E}=F8({...v,isDisabled:m,isChecked:y,onChange:b}),_=m8(x.isChecked),$=g.useMemo(()=>({animation:_?x.isIndeterminate?`${B8} 20ms linear, ${j8} 200ms linear`:`${z8} 200ms linear`:void 0,fontSize:d,color:c,...i.icon}),[c,d,_,x.isIndeterminate,i.icon]),M=g.cloneElement(f,{__css:$,isIndeterminate:x.isIndeterminate,isChecked:x.isChecked});return w.jsxs(A.label,{__css:{...V8,...i.container},className:Z("chakra-checkbox",l),...E(),children:[w.jsx("input",{className:"chakra-checkbox__input",...k(S,n)}),w.jsx(A.span,{__css:{...N8,...i.control},className:"chakra-checkbox__control",...P(),children:M}),u&&w.jsx(A.span,{className:"chakra-checkbox__label",...C(),__css:{marginStart:a,...i.label},children:u})]})});H8.displayName="Checkbox";function wc(e,t,n,r){const o=Rn(n);return g.useEffect(()=>{const i=typeof e=="function"?e():e??document;if(!(!n||!i))return i.addEventListener(t,o,r),()=>{i.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const i=typeof e=="function"?e():e??document;i==null||i.removeEventListener(t,o,r)}}function kT(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fv="data-focus-lock",CT="data-focus-lock-disabled",W8="data-no-focus-lock",U8="data-autofocus-inside",q8="data-no-autofocus";function lh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function K8(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var G8=typeof window<"u"?g.useLayoutEffect:g.useEffect,Px=new WeakMap;function PT(e,t){var n=K8(null,function(r){return e.forEach(function(o){return lh(o,r)})});return G8(function(){var r=Px.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||lh(a,null)}),i.forEach(function(a){o.has(a)||lh(a,s)})}Px.set(n,e)},[e]),n}var uh={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},dr=function(){return dr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0}).sort(f7)},h7=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],H0=h7.join(","),m7="".concat(H0,", [data-focus-guard]"),jT=function(e,t){return xr((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?m7:H0)?[r]:[],jT(r))},[])},v7=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Ds([e.contentDocument.body],t):[e]},Ds=function(e,t){return e.reduce(function(n,r){var o,i=jT(r,t),s=(o=[]).concat.apply(o,i.map(function(a){return v7(a,t)}));return n.concat(s,r.parentNode?xr(r.parentNode.querySelectorAll(H0)).filter(function(a){return a===r}):[])},[])},g7=function(e){var t=e.querySelectorAll("[".concat(U8,"]"));return xr(t).map(function(n){return Ds([n])}).reduce(function(n,r){return n.concat(r)},[])},W0=function(e,t){return xr(e).filter(function(n){return LT(t,n)}).filter(function(n){return u7(n)})},Ex=function(e,t){return t===void 0&&(t=new Map),xr(e).filter(function(n){return NT(t,n)})},U0=function(e,t,n){return j0(W0(Ds(e,n),t),!0,n)},Cd=function(e,t){return j0(W0(Ds(e),t),!1)},y7=function(e,t){return W0(g7(e),t)},ci=function(e,t){return e.shadowRoot?ci(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:xr(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?ci(o,t):!1}return ci(n,t)})},b7=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(s,a){return!t.has(a)})},HT=function(e){return e.parentNode?HT(e.parentNode):e},q0=function(e){var t=bi(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(fv);return n.push.apply(n,o?b7(xr(HT(r).querySelectorAll("[".concat(fv,'="').concat(o,'"]:not([').concat(CT,'="disabled"])')))):[r]),n},[])},S7=function(e){try{return e()}catch{return}},Rl=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Rl(t.shadowRoot):t instanceof HTMLIFrameElement&&S7(function(){return t.contentWindow.document})?Rl(t.contentWindow.document):t}},x7=function(e,t){return e===t},w7=function(e,t){return!!xr(e.querySelectorAll("iframe")).some(function(n){return x7(n,t)})},WT=function(e,t){return t===void 0&&(t=Rl(AT(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:q0(e).some(function(n){return ci(n,t)||w7(n,t)})},k7=function(e){e===void 0&&(e=document);var t=Rl(e);return t?xr(e.querySelectorAll("[".concat(W8,"]"))).some(function(n){return ci(n,t)}):!1},C7=function(e,t){return t.filter(BT).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},K0=function(e,t){return BT(e)&&e.name?C7(e,t):e},P7=function(e){var t=new Set;return e.forEach(function(n){return t.add(K0(n,e))}),e.filter(function(n){return t.has(n)})},Tx=function(e){return e[0]&&e.length>1?K0(e[0],e):e[0]},_x=function(e,t){return e.indexOf(K0(t,e))},hv="NEW_FOCUS",E7=function(e,t,n,r,o){var i=e.length,s=e[0],a=e[i-1],l=B0(r);if(!(r&&e.indexOf(r)>=0)){var u=r!==void 0?n.indexOf(r):-1,c=o?n.indexOf(o):u,d=o?e.indexOf(o):-1;if(u===-1)return d!==-1?d:hv;if(d===-1)return hv;var f=u-c,p=n.indexOf(s),m=n.indexOf(a),h=P7(n),S=r!==void 0?h.indexOf(r):-1,v=S-(o?h.indexOf(o):u);if(!f&&d>=0||t.length===0)return d;var y=_x(e,t[0]),b=_x(e,t[t.length-1]);if(u<=p&&l&&Math.abs(f)>1)return b;if(u>=m&&l&&Math.abs(f)>1)return y;if(f&&Math.abs(v)>1)return d;if(u<=p)return b;if(u>m)return y;if(f)return Math.abs(f)>1?d:(i+d+f)%i}},T7=function(e){return function(t){var n,r=(n=VT(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},$x=function(e,t,n){var r=e.map(function(i){var s=i.node;return s}),o=Ex(r.filter(T7(n)));return o&&o.length?Tx(o):Tx(Ex(t))},mv=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&mv(e.parentNode.host||e.parentNode,t),t},ch=function(e,t){for(var n=mv(e),r=mv(t),o=0;o=0)return i}return!1},UT=function(e,t,n){var r=bi(e),o=bi(t),i=r[0],s=!1;return o.filter(Boolean).forEach(function(a){s=ch(s||a,a)||s,n.filter(Boolean).forEach(function(l){var u=ch(i,l);u&&(!s||ci(u,s)?s=u:s=ch(u,s))})}),s},Ox=function(e,t){return e.reduce(function(n,r){return n.concat(y7(r,t))},[])},_7=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(d7)},$7=function(e,t){var n=Rl(bi(e).length>0?document:AT(e).ownerDocument),r=q0(e).filter(pv),o=UT(n||e,e,r),i=new Map,s=Cd(r,i),a=s.filter(function(m){var h=m.node;return pv(h)});if(a[0]){var l=Cd([o],i).map(function(m){var h=m.node;return h}),u=_7(l,a),c=u.map(function(m){var h=m.node;return h}),d=u.filter(function(m){var h=m.tabIndex;return h>=0}).map(function(m){var h=m.node;return h}),f=E7(c,d,l,n,t);if(f===hv){var p=$x(s,d,Ox(r,i))||$x(s,c,Ox(r,i));if(p)return{node:p};console.warn("focus-lock: cannot find any node to move focus into");return}return f===void 0?f:u[f]}},O7=function(e){var t=q0(e).filter(pv),n=UT(e,e,t),r=j0(Ds([n],!0),!0,!0),o=Ds(t,!1);return r.map(function(i){var s=i.node,a=i.index;return{node:s,index:a,lockItem:o.indexOf(s)>=0,guard:B0(s)}})},G0=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},dh=0,fh=!1,qT=function(e,t,n){n===void 0&&(n={});var r=$7(e,t);if(!fh&&r){if(dh>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),fh=!0,setTimeout(function(){fh=!1},1);return}dh++,G0(r.node,n.focusOptions),dh--}};function ca(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var R7=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ca(n),parent:ca(n.parentElement),left:ca(n.previousElementSibling),right:ca(n.nextElementSibling)}),n=n.parentElement;return{element:ca(e),stack:t,ownerDocument:e.ownerDocument}},M7=function(e){var t,n,r,o,i;if(e)for(var s=e.stack,a=e.ownerDocument,l=new Map,u=0,c=s;u-1&&(p.filter(function(h){var S=h.guard,v=h.node;return S&&v.dataset.focusAutoGuard}).forEach(function(h){var S=h.node;return S.removeAttribute("tabIndex")}),Rx(m,p.length,1,p),Rx(m,-1,-1,p))}}}return t},YT=function(t){Pd()&&t&&(t.stopPropagation(),t.preventDefault())},X0=function(){return Y0(Pd)},Q7=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q7(r,n)},Z7=function(){return null},XT=function(){Ml="just",Y0(function(){Ml="meanwhile"})},J7=function(){document.addEventListener("focusin",YT),document.addEventListener("focusout",X0),window.addEventListener("blur",XT)},eH=function(){document.removeEventListener("focusin",YT),document.removeEventListener("focusout",X0),window.removeEventListener("blur",XT)};function tH(e){return e.filter(function(t){var n=t.disabled;return!n})}var QT={moveFocusInside:qT,focusInside:WT,focusNextElement:L7,focusPrevElement:N7,focusFirstElement:V7,focusLastElement:z7,captureFocusRestore:I7};function nH(e){var t=e.slice(-1)[0];t&&!ys&&J7();var n=ys,r=n&&t&&t.id===n.id;ys=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var i=o.id;return i===n.id}).length||n.returnFocus(!t)),t?(ss=null,(!r||n.observed!==t.observed)&&t.onActivation(QT),Pd(),Y0(Pd)):(eH(),ss=null)}RT.assignSyncMedium(Q7);MT.assignMedium(X0);Q8.assignMedium(function(e){return e(QT)});const rH=r7(tH,nH)(Z7);var vv=g.forwardRef(function(t,n){return g.createElement(z0,K({sideCar:rH,ref:n},t))}),ZT=z0.propTypes||{};ZT.sideCar;kT(ZT,["sideCar"]);vv.propTypes={};function JT(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Q0(e){var t;if(!JT(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function oH(e){var t,n;return(n=(t=e_(e))==null?void 0:t.defaultView)!=null?n:window}function e_(e){return JT(e)?e.ownerDocument:document}function iH(e){return e_(e).activeElement}function sH(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function aH(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function t_(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:Q0(e)&&sH(e)?e:t_(aH(e))}var n_=e=>e.hasAttribute("tabindex"),lH=e=>n_(e)&&e.tabIndex===-1;function uH(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function r_(e){return e.parentElement&&r_(e.parentElement)?!0:e.hidden}function cH(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function o_(e){if(!Q0(e)||r_(e)||uH(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():cH(e)?!0:n_(e)}function dH(e){return e?Q0(e)&&o_(e)&&!lH(e):!1}var fH=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],pH=fH.join(),hH=e=>e.offsetWidth>0&&e.offsetHeight>0;function mH(e){const t=Array.from(e.querySelectorAll(pH));return t.unshift(e),t.filter(n=>o_(n)&&hH(n))}var Mx,vH=(Mx=vv.default)!=null?Mx:vv,i_=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:i,isDisabled:s,autoFocus:a,persistentFocus:l,lockFocusAcrossFrames:u}=e,c=g.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&mH(r.current).length===0&&requestAnimationFrame(()=>{var m;(m=r.current)==null||m.focus()})},[t,r]),d=g.useCallback(()=>{var p;(p=n==null?void 0:n.current)==null||p.focus()},[n]),f=o&&!n;return w.jsx(vH,{crossFrame:u,persistentFocus:l,autoFocus:a,disabled:s,onActivation:c,onDeactivation:d,returnFocus:f,children:i})};i_.displayName="FocusLock";var gH=pN?g.useLayoutEffect:g.useEffect;function Ix(e,t=[]){const n=g.useRef(e);return gH(()=>{n.current=e}),g.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function yH(e,t){const n=g.useId();return g.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function bH(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function yee(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,i=Ix(n),s=Ix(t),[a,l]=g.useState(e.defaultIsOpen||!1),[u,c]=bH(r,a),d=yH(o,"disclosure"),f=g.useCallback(()=>{u||l(!1),s==null||s()},[u,s]),p=g.useCallback(()=>{u||l(!0),i==null||i()},[u,i]),m=g.useCallback(()=>{(c?f:p)()},[c,p,f]);return{isOpen:!!c,onOpen:p,onClose:f,onToggle:m,isControlled:u,getButtonProps:(h={})=>({...h,"aria-expanded":c,"aria-controls":d,onClick:yN(h.onClick,m)}),getDisclosureProps:(h={})=>({...h,hidden:!c,id:d})}}var SH=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=Ax[t.format]||Ax.default;window.clipboardData.setData(d,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");l=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=kH("message"in t?t.message:wH),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}var PH=CH;const EH=Kd(PH);function bee(e,t={}){const[n,r]=g.useState(!1),[o,i]=g.useState(e);g.useEffect(()=>i(e),[e]);const{timeout:s=1500,...a}=typeof t=="number"?{timeout:t}:t,l=g.useCallback(()=>{const u=EH(o,a);r(u)},[o,a]);return g.useEffect(()=>{let u=null;return n&&(u=window.setTimeout(()=>{r(!1)},s)),()=>{u&&window.clearTimeout(u)}},[s,n]),{value:o,setValue:i,onCopy:l,hasCopied:n}}var s_=U(function(t,n){const{htmlSize:r,...o}=t,i=ut("Input",o),s=Ye(o),a=L0(s),l=Z("chakra-input",t.className);return w.jsx(A.input,{size:r,...a,__css:i.field,ref:n,className:l})});s_.displayName="Input";s_.id="Input";var TH=U(function(t,n){const r=en("Link",t),{className:o,isExternal:i,...s}=Ye(t);return w.jsx(A.a,{target:i?"_blank":void 0,rel:i?"noopener":void 0,ref:n,className:Z("chakra-link",o),...s,__css:r})});TH.displayName="Link";var[_H,a_]=Ge({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Z0=U(function(t,n){const r=ut("List",t),{children:o,styleType:i="none",stylePosition:s,spacing:a,...l}=Ye(t),u=F0(o),d=a?{["& > *:not(style) ~ *:not(style)"]:{mt:a}}:{};return w.jsx(_H,{value:r,children:w.jsx(A.ul,{ref:n,listStyleType:i,listStylePosition:s,role:"list",__css:{...r.container,...d},...l,children:u})})});Z0.displayName="List";var $H=U((e,t)=>{const{as:n,...r}=e;return w.jsx(Z0,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});$H.displayName="OrderedList";var OH=U(function(t,n){const{as:r,...o}=t;return w.jsx(Z0,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});OH.displayName="UnorderedList";var RH=U(function(t,n){const r=a_();return w.jsx(A.li,{ref:n,...t,__css:r.item})});RH.displayName="ListItem";var MH=U(function(t,n){const r=a_();return w.jsx(Qn,{ref:n,role:"presentation",...t,__css:r.icon})});MH.displayName="ListIcon";var l_=Object.freeze(["base","sm","md","lg","xl","2xl"]);function IH(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):$t(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}function AH(e,t=l_){const n={};return e.forEach((r,o)=>{const i=t[o];r!=null&&(n[i]=r)}),n}var DH=U(function(t,n){const r=en("Text",t),{className:o,align:i,decoration:s,casing:a,...l}=Ye(t),u=$N({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return w.jsx(A.p,{ref:n,className:Z("chakra-text",t.className),...u,...l,__css:r})});DH.displayName="Text";var FH=U(function(t,n){const{spacing:r="0.5rem",spacingX:o,spacingY:i,children:s,justify:a,direction:l,align:u,className:c,shouldWrapChildren:d,...f}=t,p=g.useMemo(()=>d?g.Children.map(s,(m,h)=>w.jsx(u_,{children:m},h)):s,[s,d]);return w.jsx(A.div,{ref:n,className:Z("chakra-wrap",c),...f,children:w.jsx(A.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:u,flexDirection:l,listStyleType:"none",gap:r,columnGap:o,rowGap:i,padding:"0"},children:p})})});FH.displayName="Wrap";var u_=U(function(t,n){const{className:r,...o}=t;return w.jsx(A.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Z("chakra-wrap__listitem",r),...o})});u_.displayName="WrapItem";var c_=e=>w.jsx(A.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});c_.displayName="StackItem";function LH(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":IH(n,o=>r[o])}}var NH=U((e,t)=>{const{isInline:n,direction:r,align:o,justify:i,spacing:s="0.5rem",wrap:a,children:l,divider:u,className:c,shouldWrapChildren:d,...f}=e,p=n?"row":r??"column",m=g.useMemo(()=>LH({spacing:s,direction:p}),[s,p]),h=!!u,S=!d&&!h,v=g.useMemo(()=>{const b=F0(l);return S?b:b.map((x,k)=>{const P=typeof x.key<"u"?x.key:k,C=k+1===b.length,_=d?w.jsx(c_,{children:x},P):x;if(!h)return _;const $=g.cloneElement(u,{__css:m}),M=C?null:$;return w.jsxs(g.Fragment,{children:[_,M]},P)})},[u,m,h,S,d,l]),y=Z("chakra-stack",c);return w.jsx(A.div,{ref:t,display:"flex",alignItems:o,justifyContent:i,flexDirection:p,flexWrap:a,gap:h?void 0:s,className:y,...f,children:v})});NH.displayName="Stack";var VH=U(function(t,n){const r=en("Heading",t),{className:o,...i}=Ye(t);return w.jsx(A.h2,{ref:n,className:Z("chakra-heading",t.className),...i,__css:r})});VH.displayName="Heading";var et=A("div");et.displayName="Box";var d_=U(function(t,n){const{size:r,centerContent:o=!0,...i}=t,s=o?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return w.jsx(et,{ref:n,boxSize:r,__css:{...s,flexShrink:0,flexGrow:0},...i})});d_.displayName="Square";var zH=U(function(t,n){const{size:r,...o}=t;return w.jsx(d_,{size:r,ref:n,borderRadius:"9999px",...o})});zH.displayName="Circle";var BH=U(function(t,n){const r=en("Code",t),{className:o,...i}=Ye(t);return w.jsx(A.code,{ref:n,className:Z("chakra-code",t.className),...i,__css:{display:"inline-block",...r}})});BH.displayName="Code";var f_=U(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:i,borderRightWidth:s,borderWidth:a,borderStyle:l,borderColor:u,...c}=en("Divider",t),{className:d,orientation:f="horizontal",__css:p,...m}=Ye(t),h={vertical:{borderLeftWidth:r||s||a||"1px",height:"100%"},horizontal:{borderBottomWidth:o||i||a||"1px",width:"100%"}};return w.jsx(A.hr,{ref:n,"aria-orientation":f,...m,__css:{...c,border:"0",borderColor:u,borderStyle:l,...h[f],...p},className:Z("chakra-divider",d)})});f_.displayName="Divider";var jH=U(function(t,n){const{direction:r,align:o,justify:i,wrap:s,basis:a,grow:l,shrink:u,...c}=t,d={display:"flex",flexDirection:r,alignItems:o,justifyContent:i,flexWrap:s,flexBasis:a,flexGrow:l,flexShrink:u};return w.jsx(A.div,{ref:n,__css:d,...c})});jH.displayName="Flex";function HH(e,t={}){const{ssr:n=!0,fallback:r}=t,{getWindow:o}=WN(),i=Array.isArray(e)?e:[e];let s=Array.isArray(r)?r:[r];s=s.filter(u=>u!=null);const[a,l]=g.useState(()=>i.map((u,c)=>({media:u,matches:n?!!s[c]:o().matchMedia(u).matches})));return g.useEffect(()=>{const u=o();l(i.map(f=>({media:f,matches:u.matchMedia(f).matches})));const c=i.map(f=>u.matchMedia(f)),d=f=>{l(p=>p.slice().map(m=>m.media===f.media?{...m,matches:f.matches}:m))};return c.forEach(f=>{typeof f.addListener=="function"?f.addListener(d):f.addEventListener("change",d)}),()=>{c.forEach(f=>{typeof f.removeListener=="function"?f.removeListener(d):f.removeEventListener("change",d)})}},[o]),a.map(u=>u.matches)}function WH(e,t,n=l_){let r=Object.keys(e).indexOf(t);if(r!==-1)return e[t];let o=n.indexOf(t);for(;o>=0;){const i=n[o];if(e.hasOwnProperty(i)){r=o;break}o-=1}if(r!==-1){const i=n[r];return e[i]}}function UH(e){var t,n;const r=$t(e)?e:{fallback:e??"base"},i=Yr().__breakpoints.details.map(({minMaxQuery:u,breakpoint:c})=>({breakpoint:c,query:u.replace("@media screen and ","")})),s=i.map(u=>u.breakpoint===r.fallback),l=HH(i.map(u=>u.query),{fallback:s,ssr:r.ssr}).findIndex(u=>u==!0);return(n=(t=i[l])==null?void 0:t.breakpoint)!=null?n:r.fallback}function qH(e,t){var n;const r=$t(t)?t:{fallback:t??"base"},o=UH(r),i=Yr();if(!o)return;const s=Array.from(((n=i.__breakpoints)==null?void 0:n.keys)||[]),a=Array.isArray(e)?Object.fromEntries(Object.entries(AH(e,s)).map(([l,u])=>[l,u])):e;return WH(a,o,s)}function KH(){const e=g.useRef(new Map),t=e.current,n=g.useCallback((o,i,s,a)=>{e.current.set(s,{type:i,el:o,options:a}),o.addEventListener(i,s,a)},[]),r=g.useCallback((o,i,s,a)=>{o.removeEventListener(i,s,a),e.current.delete(s)},[]);return g.useEffect(()=>()=>{t.forEach((o,i)=>{r(o.el,o.type,i,o.options)})},[r,t]),{add:n,remove:r}}function ph(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function GH(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:i=!0,onMouseDown:s,onMouseUp:a,onClick:l,onKeyDown:u,onKeyUp:c,tabIndex:d,onMouseOver:f,onMouseLeave:p,...m}=e,[h,S]=g.useState(!0),[v,y]=g.useState(!1),b=KH(),x=R=>{R&&R.tagName!=="BUTTON"&&S(!1)},k=h?d:d||0,P=n&&!r,C=g.useCallback(R=>{if(n){R.stopPropagation(),R.preventDefault();return}R.currentTarget.focus(),l==null||l(R)},[n,l]),E=g.useCallback(R=>{v&&ph(R)&&(R.preventDefault(),R.stopPropagation(),y(!1),b.remove(document,"keyup",E,!1))},[v,b]),_=g.useCallback(R=>{if(u==null||u(R),n||R.defaultPrevented||R.metaKey||!ph(R.nativeEvent)||h)return;const O=o&&R.key==="Enter";i&&R.key===" "&&(R.preventDefault(),y(!0)),O&&(R.preventDefault(),R.currentTarget.click()),b.add(document,"keyup",E,!1)},[n,h,u,o,i,b,E]),$=g.useCallback(R=>{if(c==null||c(R),n||R.defaultPrevented||R.metaKey||!ph(R.nativeEvent)||h)return;i&&R.key===" "&&(R.preventDefault(),y(!1),R.currentTarget.click())},[i,h,n,c]),M=g.useCallback(R=>{R.button===0&&(y(!1),b.remove(document,"mouseup",M,!1))},[b]),F=g.useCallback(R=>{if(R.button!==0)return;if(n){R.stopPropagation(),R.preventDefault();return}h||y(!0),R.currentTarget.focus({preventScroll:!0}),b.add(document,"mouseup",M,!1),s==null||s(R)},[n,h,s,b,M]),W=g.useCallback(R=>{R.button===0&&(h||y(!1),a==null||a(R))},[a,h]),re=g.useCallback(R=>{if(n){R.preventDefault();return}f==null||f(R)},[n,f]),H=g.useCallback(R=>{v&&(R.preventDefault(),y(!1)),p==null||p(R)},[v,p]),N=mn(t,x);return h?{...m,ref:N,type:"button","aria-disabled":P?void 0:n,disabled:P,onClick:C,onMouseDown:s,onMouseUp:a,onKeyUp:c,onKeyDown:u,onMouseOver:f,onMouseLeave:p}:{...m,ref:N,role:"button","data-active":ce(v),"aria-disabled":n?"true":void 0,tabIndex:P?void 0:k,onClick:C,onMouseDown:F,onMouseUp:W,onKeyUp:$,onKeyDown:_,onMouseOver:re,onMouseLeave:H}}function YH(e){const t=e.current;if(!t)return!1;const n=iH(t);return!n||t.contains(n)?!1:!!dH(n)}function XH(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,i=n&&!r;Pl(()=>{if(!i||YH(e))return;const s=(o==null?void 0:o.current)||e.current;let a;if(s)return a=requestAnimationFrame(()=>{s.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(a)}},[i,e,o])}var Ri=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),mt={arrowShadowColor:Ri("--popper-arrow-shadow-color"),arrowSize:Ri("--popper-arrow-size","8px"),arrowSizeHalf:Ri("--popper-arrow-size-half"),arrowBg:Ri("--popper-arrow-bg"),transformOrigin:Ri("--popper-transform-origin"),arrowOffset:Ri("--popper-arrow-offset")};function QH(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var ZH={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},JH=e=>ZH[e],Dx={scroll:!0,resize:!0};function eW(e){let t;return typeof e=="object"?t={enabled:!0,options:{...Dx,...e}}:t={enabled:e,options:Dx},t}var tW={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},nW={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{Fx(e)},effect:({state:e})=>()=>{Fx(e)}},Fx=e=>{e.elements.popper.style.setProperty(mt.transformOrigin.var,JH(e.placement))},rW={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{oW(e)}},oW=e=>{var t;if(!e.placement)return;const n=iW(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:mt.arrowSize.varRef,height:mt.arrowSize.varRef,zIndex:-1});const r={[mt.arrowSizeHalf.var]:`calc(${mt.arrowSize.varRef} / 2 - 1px)`,[mt.arrowOffset.var]:`calc(${mt.arrowSizeHalf.varRef} * -1)`};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},iW=e=>{if(e.startsWith("top"))return{property:"bottom",value:mt.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:mt.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:mt.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:mt.arrowOffset.varRef}},sW={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{Lx(e)},effect:({state:e})=>()=>{Lx(e)}},Lx=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=QH(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:mt.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},aW={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},lW={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function uW(e,t="ltr"){var n,r;const o=((n=aW[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=lW[e])!=null?r:o}var Qt="top",Dn="bottom",Fn="right",Zt="left",J0="auto",Jl=[Qt,Dn,Fn,Zt],Fs="start",Il="end",cW="clippingParents",p_="viewport",da="popper",dW="reference",Nx=Jl.reduce(function(e,t){return e.concat([t+"-"+Fs,t+"-"+Il])},[]),h_=[].concat(Jl,[J0]).reduce(function(e,t){return e.concat([t,t+"-"+Fs,t+"-"+Il])},[]),fW="beforeRead",pW="read",hW="afterRead",mW="beforeMain",vW="main",gW="afterMain",yW="beforeWrite",bW="write",SW="afterWrite",xW=[fW,pW,hW,mW,vW,gW,yW,bW,SW];function br(e){return e?(e.nodeName||"").toLowerCase():null}function vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Si(e){var t=vn(e).Element;return e instanceof t||e instanceof Element}function Mn(e){var t=vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ey(e){if(typeof ShadowRoot>"u")return!1;var t=vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function wW(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Mn(i)||!br(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function kW(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!Mn(o)||!br(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const CW={name:"applyStyles",enabled:!0,phase:"write",fn:wW,effect:kW,requires:["computeStyles"]};function gr(e){return e.split("-")[0]}var di=Math.max,Ed=Math.min,Ls=Math.round;function gv(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function m_(){return!/^((?!chrome|android).)*safari/i.test(gv())}function Ns(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Mn(e)&&(o=e.offsetWidth>0&&Ls(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ls(r.height)/e.offsetHeight||1);var s=Si(e)?vn(e):window,a=s.visualViewport,l=!m_()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,c=(r.top+(l&&a?a.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function ty(e){var t=Ns(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function v_(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ey(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wr(e){return vn(e).getComputedStyle(e)}function PW(e){return["table","td","th"].indexOf(br(e))>=0}function Fo(e){return((Si(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bf(e){return br(e)==="html"?e:e.assignedSlot||e.parentNode||(ey(e)?e.host:null)||Fo(e)}function Vx(e){return!Mn(e)||Wr(e).position==="fixed"?null:e.offsetParent}function EW(e){var t=/firefox/i.test(gv()),n=/Trident/i.test(gv());if(n&&Mn(e)){var r=Wr(e);if(r.position==="fixed")return null}var o=Bf(e);for(ey(o)&&(o=o.host);Mn(o)&&["html","body"].indexOf(br(o))<0;){var i=Wr(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function eu(e){for(var t=vn(e),n=Vx(e);n&&PW(n)&&Wr(n).position==="static";)n=Vx(n);return n&&(br(n)==="html"||br(n)==="body"&&Wr(n).position==="static")?t:n||EW(e)||t}function ny(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Qa(e,t,n){return di(e,Ed(t,n))}function TW(e,t,n){var r=Qa(e,t,n);return r>n?n:r}function g_(){return{top:0,right:0,bottom:0,left:0}}function y_(e){return Object.assign({},g_(),e)}function b_(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var _W=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,y_(typeof t!="number"?t:b_(t,Jl))};function $W(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=gr(n.placement),l=ny(a),u=[Zt,Fn].indexOf(a)>=0,c=u?"height":"width";if(!(!i||!s)){var d=_W(o.padding,n),f=ty(i),p=l==="y"?Qt:Zt,m=l==="y"?Dn:Fn,h=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],S=s[l]-n.rects.reference[l],v=eu(i),y=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,b=h/2-S/2,x=d[p],k=y-f[c]-d[m],P=y/2-f[c]/2+b,C=Qa(x,P,k),E=l;n.modifiersData[r]=(t={},t[E]=C,t.centerOffset=C-P,t)}}function OW(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||v_(t.elements.popper,o)&&(t.elements.arrow=o))}const RW={name:"arrow",enabled:!0,phase:"main",fn:$W,effect:OW,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vs(e){return e.split("-")[1]}var MW={top:"auto",right:"auto",bottom:"auto",left:"auto"};function IW(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ls(n*o)/o||0,y:Ls(r*o)/o||0}}function zx(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=s.x,p=f===void 0?0:f,m=s.y,h=m===void 0?0:m,S=typeof c=="function"?c({x:p,y:h}):{x:p,y:h};p=S.x,h=S.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Zt,x=Qt,k=window;if(u){var P=eu(n),C="clientHeight",E="clientWidth";if(P===vn(n)&&(P=Fo(n),Wr(P).position!=="static"&&a==="absolute"&&(C="scrollHeight",E="scrollWidth")),P=P,o===Qt||(o===Zt||o===Fn)&&i===Il){x=Dn;var _=d&&P===k&&k.visualViewport?k.visualViewport.height:P[C];h-=_-r.height,h*=l?1:-1}if(o===Zt||(o===Qt||o===Dn)&&i===Il){b=Fn;var $=d&&P===k&&k.visualViewport?k.visualViewport.width:P[E];p-=$-r.width,p*=l?1:-1}}var M=Object.assign({position:a},u&&MW),F=c===!0?IW({x:p,y:h},vn(n)):{x:p,y:h};if(p=F.x,h=F.y,l){var W;return Object.assign({},M,(W={},W[x]=y?"0":"",W[b]=v?"0":"",W.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",W))}return Object.assign({},M,(t={},t[x]=y?h+"px":"",t[b]=v?p+"px":"",t.transform="",t))}function AW(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:gr(t.placement),variation:Vs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,zx(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,zx(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const DW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:AW,data:{}};var Mu={passive:!0};function FW(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=vn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Mu)}),a&&l.addEventListener("resize",n.update,Mu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Mu)}),a&&l.removeEventListener("resize",n.update,Mu)}}const LW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:FW,data:{}};var NW={left:"right",right:"left",bottom:"top",top:"bottom"};function kc(e){return e.replace(/left|right|bottom|top/g,function(t){return NW[t]})}var VW={start:"end",end:"start"};function Bx(e){return e.replace(/start|end/g,function(t){return VW[t]})}function ry(e){var t=vn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function oy(e){return Ns(Fo(e)).left+ry(e).scrollLeft}function zW(e,t){var n=vn(e),r=Fo(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=m_();(u||!u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+oy(e),y:l}}function BW(e){var t,n=Fo(e),r=ry(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=di(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=di(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+oy(e),l=-r.scrollTop;return Wr(o||n).direction==="rtl"&&(a+=di(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function iy(e){var t=Wr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function S_(e){return["html","body","#document"].indexOf(br(e))>=0?e.ownerDocument.body:Mn(e)&&iy(e)?e:S_(Bf(e))}function Za(e,t){var n;t===void 0&&(t=[]);var r=S_(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vn(r),s=o?[i].concat(i.visualViewport||[],iy(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(Za(Bf(s)))}function yv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jW(e,t){var n=Ns(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function jx(e,t,n){return t===p_?yv(zW(e,n)):Si(t)?jW(t,n):yv(BW(Fo(e)))}function HW(e){var t=Za(Bf(e)),n=["absolute","fixed"].indexOf(Wr(e).position)>=0,r=n&&Mn(e)?eu(e):e;return Si(r)?t.filter(function(o){return Si(o)&&v_(o,r)&&br(o)!=="body"}):[]}function WW(e,t,n,r){var o=t==="clippingParents"?HW(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var c=jx(e,u,r);return l.top=di(c.top,l.top),l.right=Ed(c.right,l.right),l.bottom=Ed(c.bottom,l.bottom),l.left=di(c.left,l.left),l},jx(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function x_(e){var t=e.reference,n=e.element,r=e.placement,o=r?gr(r):null,i=r?Vs(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case Qt:l={x:s,y:t.y-n.height};break;case Dn:l={x:s,y:t.y+t.height};break;case Fn:l={x:t.x+t.width,y:a};break;case Zt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=o?ny(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Fs:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Il:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function Al(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,s=i===void 0?e.strategy:i,a=n.boundary,l=a===void 0?cW:a,u=n.rootBoundary,c=u===void 0?p_:u,d=n.elementContext,f=d===void 0?da:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,S=h===void 0?0:h,v=y_(typeof S!="number"?S:b_(S,Jl)),y=f===da?dW:da,b=e.rects.popper,x=e.elements[m?y:f],k=WW(Si(x)?x:x.contextElement||Fo(e.elements.popper),l,c,s),P=Ns(e.elements.reference),C=x_({reference:P,element:b,strategy:"absolute",placement:o}),E=yv(Object.assign({},b,C)),_=f===da?E:P,$={top:k.top-_.top+v.top,bottom:_.bottom-k.bottom+v.bottom,left:k.left-_.left+v.left,right:_.right-k.right+v.right},M=e.modifiersData.offset;if(f===da&&M){var F=M[o];Object.keys($).forEach(function(W){var re=[Fn,Dn].indexOf(W)>=0?1:-1,H=[Qt,Dn].indexOf(W)>=0?"y":"x";$[W]+=F[H]*re})}return $}function UW(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?h_:l,c=Vs(r),d=c?a?Nx:Nx.filter(function(m){return Vs(m)===c}):Jl,f=d.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=Al(e,{placement:h,boundary:o,rootBoundary:i,padding:s})[gr(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function qW(e){if(gr(e)===J0)return[];var t=kc(e);return[Bx(e),t,Bx(t)]}function KW(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,S=t.options.placement,v=gr(S),y=v===S,b=l||(y||!m?[kc(S)]:qW(S)),x=[S].concat(b).reduce(function(j,te){return j.concat(gr(te)===J0?UW(t,{placement:te,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:h}):te)},[]),k=t.rects.reference,P=t.rects.popper,C=new Map,E=!0,_=x[0],$=0;$=0,H=re?"width":"height",N=Al(t,{placement:M,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),R=re?W?Fn:Zt:W?Dn:Qt;k[H]>P[H]&&(R=kc(R));var O=kc(R),D=[];if(i&&D.push(N[F]<=0),a&&D.push(N[R]<=0,N[O]<=0),D.every(function(j){return j})){_=M,E=!1;break}C.set(M,D)}if(E)for(var V=m?3:1,oe=function(te){var ae=x.find(function(we){var Se=C.get(we);if(Se)return Se.slice(0,te).every(function(xt){return xt})});if(ae)return _=ae,"break"},B=V;B>0;B--){var ee=oe(B);if(ee==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}const GW={name:"flip",enabled:!0,phase:"main",fn:KW,requiresIfExists:["offset"],data:{_skip:!1}};function Hx(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wx(e){return[Qt,Fn,Dn,Zt].some(function(t){return e[t]>=0})}function YW(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Al(t,{elementContext:"reference"}),a=Al(t,{altBoundary:!0}),l=Hx(s,r),u=Hx(a,o,i),c=Wx(l),d=Wx(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const XW={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:YW};function QW(e,t,n){var r=gr(e),o=[Zt,Qt].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Zt,Fn].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function ZW(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,s=h_.reduce(function(c,d){return c[d]=QW(d,t.rects,i),c},{}),a=s[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}const JW={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ZW};function eU(e){var t=e.state,n=e.name;t.modifiersData[n]=x_({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const tU={name:"popperOffsets",enabled:!0,phase:"read",fn:eU,data:{}};function nU(e){return e==="x"?"y":"x"}function rU(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,S=Al(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=gr(t.placement),y=Vs(t.placement),b=!y,x=ny(v),k=nU(x),P=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,_=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,$=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(P){if(i){var W,re=x==="y"?Qt:Zt,H=x==="y"?Dn:Fn,N=x==="y"?"height":"width",R=P[x],O=R+S[re],D=R-S[H],V=p?-E[N]/2:0,oe=y===Fs?C[N]:E[N],B=y===Fs?-E[N]:-C[N],ee=t.elements.arrow,j=p&&ee?ty(ee):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:g_(),ae=te[re],we=te[H],Se=Qa(0,C[N],j[N]),xt=b?C[N]/2-V-Se-ae-$.mainAxis:oe-Se-ae-$.mainAxis,Ln=b?-C[N]/2+V+Se+we+$.mainAxis:B+Se+we+$.mainAxis,Bt=t.elements.arrow&&eu(t.elements.arrow),pe=Bt?x==="y"?Bt.clientTop||0:Bt.clientLeft||0:0,tt=(W=M==null?void 0:M[x])!=null?W:0,Sn=R+xt-tt-pe,ne=R+Ln-tt,Pe=Qa(p?Ed(O,Sn):O,R,p?di(D,ne):D);P[x]=Pe,F[x]=Pe-R}if(a){var Be,nt=x==="x"?Qt:Zt,wt=x==="x"?Dn:Fn,De=P[k],Ei=k==="y"?"height":"width",Ti=De+S[nt],Fy=De-S[wt],tp=[Qt,Zt].indexOf(v)!==-1,Ly=(Be=M==null?void 0:M[k])!=null?Be:0,Ny=tp?Ti:De-C[Ei]-E[Ei]-Ly+$.altAxis,Vy=tp?De+C[Ei]+E[Ei]-Ly-$.altAxis:Fy,zy=p&&tp?TW(Ny,De,Vy):Qa(p?Ny:Ti,De,p?Vy:Fy);P[k]=zy,F[k]=zy-De}t.modifiersData[r]=F}}const oU={name:"preventOverflow",enabled:!0,phase:"main",fn:rU,requiresIfExists:["offset"]};function iU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function sU(e){return e===vn(e)||!Mn(e)?ry(e):iU(e)}function aU(e){var t=e.getBoundingClientRect(),n=Ls(t.width)/e.offsetWidth||1,r=Ls(t.height)/e.offsetHeight||1;return n!==1||r!==1}function lU(e,t,n){n===void 0&&(n=!1);var r=Mn(t),o=Mn(t)&&aU(t),i=Fo(t),s=Ns(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((br(t)!=="body"||iy(i))&&(a=sU(t)),Mn(t)?(l=Ns(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=oy(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function uU(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function cU(e){var t=uU(e);return xW.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function dU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fU(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ux={placement:"bottom",modifiers:[],strategy:"absolute"};function qx(){for(var e=arguments.length,t=new Array(e),n=0;n{}),b=g.useCallback(()=>{var $;!t||!m.current||!h.current||(($=y.current)==null||$.call(y),S.current=mU(m.current,h.current,{placement:v,modifiers:[sW,rW,nW,{...tW,enabled:!!f},{name:"eventListeners",...eW(s)},{name:"arrow",options:{padding:i}},{name:"offset",options:{offset:a??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:c}},...n??[]],strategy:o}),S.current.forceUpdate(),y.current=S.current.destroy)},[v,t,n,f,s,i,a,l,u,d,c,o]);g.useEffect(()=>()=>{var $;!m.current&&!h.current&&(($=S.current)==null||$.destroy(),S.current=null)},[]);const x=g.useCallback($=>{m.current=$,b()},[b]),k=g.useCallback(($={},M=null)=>({...$,ref:mn(x,M)}),[x]),P=g.useCallback($=>{h.current=$,b()},[b]),C=g.useCallback(($={},M=null)=>({...$,ref:mn(P,M),style:{...$.style,position:o,minWidth:f?void 0:"max-content",inset:"0 auto auto 0"}}),[o,P,f]),E=g.useCallback(($={},M=null)=>{const{size:F,shadowColor:W,bg:re,style:H,...N}=$;return{...N,ref:M,"data-popper-arrow":"",style:vU($)}},[]),_=g.useCallback(($={},M=null)=>({...$,ref:M,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=S.current)==null||$.update()},forceUpdate(){var $;($=S.current)==null||$.forceUpdate()},transformOrigin:mt.transformOrigin.varRef,referenceRef:x,popperRef:P,getPopperProps:C,getArrowProps:E,getArrowInnerProps:_,getReferenceProps:k}}function vU(e){const{size:t,shadowColor:n,bg:r,style:o}=e,i={...o,position:"absolute"};return t&&(i["--popper-arrow-size"]=t),n&&(i["--popper-arrow-shadow-color"]=n),r&&(i["--popper-arrow-bg"]=r),i}function k_(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,i=Rn(n),s=Rn(t),[a,l]=g.useState(e.defaultIsOpen||!1),u=r!==void 0?r:a,c=r!==void 0,d=g.useId(),f=o??`disclosure-${d}`,p=g.useCallback(()=>{c||l(!1),s==null||s()},[c,s]),m=g.useCallback(()=>{c||l(!0),i==null||i()},[c,i]),h=g.useCallback(()=>{u?p():m()},[u,m,p]);function S(y={}){return{...y,"aria-expanded":u,"aria-controls":f,onClick(b){var x;(x=y.onClick)==null||x.call(y,b),h()}}}function v(y={}){return{...y,hidden:!u,id:f}}return{isOpen:u,onOpen:m,onClose:p,onToggle:h,isControlled:c,getButtonProps:S,getDisclosureProps:v}}function gU(e){const{ref:t,handler:n,enabled:r=!0}=e,o=Rn(n),s=g.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;g.useEffect(()=>{if(!r)return;const a=d=>{hh(d,t)&&(s.isPointerDown=!0)},l=d=>{if(s.ignoreEmulatedMouseEvents){s.ignoreEmulatedMouseEvents=!1;return}s.isPointerDown&&n&&hh(d,t)&&(s.isPointerDown=!1,o(d))},u=d=>{s.ignoreEmulatedMouseEvents=!0,n&&s.isPointerDown&&hh(d,t)&&(s.isPointerDown=!1,o(d))},c=C_(t.current);return c.addEventListener("mousedown",a,!0),c.addEventListener("mouseup",l,!0),c.addEventListener("touchstart",a,!0),c.addEventListener("touchend",u,!0),()=>{c.removeEventListener("mousedown",a,!0),c.removeEventListener("mouseup",l,!0),c.removeEventListener("touchstart",a,!0),c.removeEventListener("touchend",u,!0)}},[n,t,o,s,r])}function hh(e,t){var n;const r=e.target;return r&&!C_(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function C_(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function yU(e){const{isOpen:t,ref:n}=e,[r,o]=g.useState(t),[i,s]=g.useState(!1);return g.useEffect(()=>{i||(o(t),s(!0))},[t,i,r]),wc(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=oH(n.current),c=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(c)}}}function bU(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[SU,See,xU,xee]=hT(),[wU,wee]=Ge({strict:!1,name:"MenuContext"});function kU(e,...t){const n=g.useId(),r=e||n;return g.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}function CU(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function PU(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:i=!0,isLazy:s,isOpen:a,defaultIsOpen:l,onClose:u,onOpen:c,placement:d="bottom-start",lazyBehavior:f="unmount",direction:p,computePositionOnMount:m=!1,...h}=e,S=g.useRef(null),v=g.useRef(null),y=xU(),b=g.useCallback(()=>{requestAnimationFrame(()=>{var ee;(ee=S.current)==null||ee.focus({preventScroll:!1})})},[]),x=g.useCallback(()=>{const ee=setTimeout(()=>{var j;if(o)(j=o.current)==null||j.focus();else{const te=y.firstEnabled();te&&W(te.index)}});O.current.add(ee)},[y,o]),k=g.useCallback(()=>{const ee=setTimeout(()=>{const j=y.lastEnabled();j&&W(j.index)});O.current.add(ee)},[y]),P=g.useCallback(()=>{c==null||c(),i?x():b()},[i,x,b,c]),{isOpen:C,onOpen:E,onClose:_,onToggle:$}=k_({isOpen:a,defaultIsOpen:l,onClose:u,onOpen:P});gU({enabled:C&&r,ref:S,handler:ee=>{var j;(j=v.current)!=null&&j.contains(ee.target)||_()}});const M=w_({...h,enabled:C||m,placement:d,direction:p}),[F,W]=g.useState(-1);Pl(()=>{C||W(-1)},[C]),XH(S,{focusRef:v,visible:C,shouldFocus:!0});const re=yU({isOpen:C,ref:S}),[H,N]=kU(t,"menu-button","menu-list"),R=g.useCallback(()=>{E(),b()},[E,b]),O=g.useRef(new Set([]));g.useEffect(()=>{const ee=O.current;return()=>{ee.forEach(j=>clearTimeout(j)),ee.clear()}},[]);const D=g.useCallback(()=>{E(),x()},[x,E]),V=g.useCallback(()=>{E(),k()},[E,k]),oe=g.useCallback(()=>{var ee,j;const te=CU(S.current),ae=(ee=S.current)==null?void 0:ee.contains(te.activeElement);if(!(C&&!ae))return;const Se=(j=y.item(F))==null?void 0:j.node;Se==null||Se.focus({preventScroll:!0})},[C,F,y]),B=g.useRef(null);return{openAndFocusMenu:R,openAndFocusFirstItem:D,openAndFocusLastItem:V,onTransitionEnd:oe,unstable__animationState:re,descendants:y,popper:M,buttonId:H,menuId:N,forceUpdate:M.forceUpdate,orientation:"vertical",isOpen:C,onToggle:$,onOpen:E,onClose:_,menuRef:S,buttonRef:v,focusedIndex:F,closeOnSelect:n,closeOnBlur:r,autoSelect:i,setFocusedIndex:W,isLazy:s,lazyBehavior:f,initialFocusRef:o,rafId:B}}var[EU,TU]=Ge({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P_=e=>{const{children:t}=e,n=ut("Menu",e),r=Ye(e),{direction:o}=Yr(),{descendants:i,...s}=PU({...r,direction:o}),a=g.useMemo(()=>s,[s]),{isOpen:l,onClose:u,forceUpdate:c}=a;return w.jsx(SU,{value:i,children:w.jsx(wU,{value:a,children:w.jsx(EU,{value:n,children:Kt(t,{isOpen:l,onClose:u,forceUpdate:c})})})})};P_.displayName="Menu";var E_=e=>{const{className:t,children:n,...r}=e,o=TU(),i=g.Children.only(n),s=g.isValidElement(i)?g.cloneElement(i,{focusable:"false","aria-hidden":!0,className:Z("chakra-menu__icon",i.props.className)}):null,a=Z("chakra-menu__icon-wrapper",t);return w.jsx(A.span,{className:a,...r,__css:o.icon,children:s})};E_.displayName="MenuIcon";var _U={slideInBottom:{...Pa,custom:{offsetY:16,reverse:!0}},slideInRight:{...Pa,custom:{offsetX:16,reverse:!0}},slideInTop:{...Pa,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...Pa,custom:{offsetX:-16,reverse:!0}},scale:{...gT,custom:{initialScale:.95,reverse:!0}},none:{}},$U=A(Xr.section),OU=e=>_U[e||"none"],T_=g.forwardRef((e,t)=>{const{preset:n,motionProps:r=OU(n),...o}=e;return w.jsx($U,{ref:t,...r,...o})});T_.displayName="ModalTransition";var RU=Object.defineProperty,MU=(e,t,n)=>t in e?RU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IU=(e,t,n)=>(MU(e,t+"",n),n),AU=class{constructor(){IU(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},bv=new AU;function __(e,t){const[n,r]=g.useState(0);return g.useEffect(()=>{const o=e.current;if(o){if(t){const i=bv.add(o);r(i)}return()=>{bv.remove(o),r(0)}}},[t,e]),n}var DU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mi=new WeakMap,Iu=new WeakMap,Au={},mh=0,$_=function(e){return e&&(e.host||$_(e.parentNode))},FU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$_(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},LU=function(e,t,n,r){var o=FU(t,Array.isArray(e)?e:[e]);Au[n]||(Au[n]=new WeakMap);var i=Au[n],s=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",h=(Mi.get(f)||0)+1,S=(i.get(f)||0)+1;Mi.set(f,h),i.set(f,S),s.push(f),h===1&&m&&Iu.set(f,!0),S===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),a.clear(),mh++,function(){s.forEach(function(d){var f=Mi.get(d)-1,p=i.get(d)-1;Mi.set(d,f),i.set(d,p),f||(Iu.has(d)||d.removeAttribute(r),Iu.delete(d)),p||d.removeAttribute(n)}),mh--,mh||(Mi=new WeakMap,Mi=new WeakMap,Iu=new WeakMap,Au={})}},NU=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=DU(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),LU(r,o,n,"aria-hidden")):function(){return null}};function VU(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:i=!0,useInert:s=!0,onOverlayClick:a,onEsc:l}=e,u=g.useRef(null),c=g.useRef(null),[d,f,p]=BU(r,"chakra-modal","chakra-modal--header","chakra-modal--body");zU(u,t&&s);const m=__(u,t),h=g.useRef(null),S=g.useCallback(_=>{h.current=_.target},[]),v=g.useCallback(_=>{_.key==="Escape"&&(_.stopPropagation(),i&&(n==null||n()),l==null||l())},[i,n,l]),[y,b]=g.useState(!1),[x,k]=g.useState(!1),P=g.useCallback((_={},$=null)=>({role:"dialog",..._,ref:mn($,u),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":y?f:void 0,"aria-describedby":x?p:void 0,onClick:Ee(_.onClick,M=>M.stopPropagation())}),[p,x,d,f,y]),C=g.useCallback(_=>{_.stopPropagation(),h.current===_.target&&bv.isTopModal(u.current)&&(o&&(n==null||n()),a==null||a())},[n,o,a]),E=g.useCallback((_={},$=null)=>({..._,ref:mn($,c),onClick:Ee(_.onClick,C),onKeyDown:Ee(_.onKeyDown,v),onMouseDown:Ee(_.onMouseDown,S)}),[v,S,C]);return{isOpen:t,onClose:n,headerId:f,bodyId:p,setBodyMounted:k,setHeaderMounted:b,dialogRef:u,overlayRef:c,getDialogProps:P,getDialogContainerProps:E,index:m}}function zU(e,t){const n=e.current;g.useEffect(()=>{if(!(!e.current||!t))return NU(e.current)},[t,e,n])}function BU(e,...t){const n=g.useId(),r=e||n;return g.useMemo(()=>t.map(o=>`${o}-${r}`),[r,t])}var[jU,Ci]=Ge({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[HU,$o]=Ge({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),sy=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:i,initialFocusRef:s,finalFocusRef:a,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:p,onCloseComplete:m}=t,h=ut("Modal",t),v={...VU(t),autoFocus:o,trapFocus:i,initialFocusRef:s,finalFocusRef:a,returnFocusOnClose:l,blockScrollOnMount:u,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:f,lockFocusAcrossFrames:p};return w.jsx(HU,{value:v,children:w.jsx(jU,{value:h,children:w.jsx(Do,{onExitComplete:m,children:v.isOpen&&w.jsx(Ws,{...n,children:r})})})})};sy.displayName="Modal";var Cc="right-scroll-bar-position",Pc="width-before-scroll-bar",WU="with-scroll-bars-hidden",UU="--removed-body-scroll-bar-size",O_=$T(),vh=function(){},jf=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:vh,onWheelCapture:vh,onTouchMoveCapture:vh}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,S=e.as,v=S===void 0?"div":S,y=e.gapMode,b=ET(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,k=PT([n,t]),P=dr(dr({},b),o);return g.createElement(g.Fragment,null,c&&g.createElement(x,{sideCar:O_,removeScrollBar:u,shards:d,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:y}),s?g.cloneElement(g.Children.only(a),dr(dr({},P),{ref:k})):g.createElement(v,dr({},P,{className:l,ref:k}),a))});jf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jf.classNames={fullWidth:Pc,zeroRight:Cc};var qU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qU();return t&&e.setAttribute("nonce",t),e}function GU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function YU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var XU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KU())&&(GU(t,n),YU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QU=function(){var e=XU();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},R_=function(){var e=QU(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ZU={left:0,top:0,right:0,gap:0},gh=function(e){return parseInt(e||"",10)||0},JU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[gh(n),gh(r),gh(o)]},eq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ZU;var t=JU(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tq=R_(),Ss="data-scroll-locked",nq=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(WU,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; @@ -387,7 +387,7 @@ Error generating stack: `+i.message+` `)},Kx=function(){var e=parseInt(document.body.getAttribute(Ss)||"0",10);return isFinite(e)?e:0},rq=function(){g.useEffect(function(){return document.body.setAttribute(Ss,(Kx()+1).toString()),function(){var e=Kx()-1;e<=0?document.body.removeAttribute(Ss):document.body.setAttribute(Ss,e.toString())}},[])},oq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;rq();var i=g.useMemo(function(){return eq(o)},[o]);return g.createElement(tq,{styles:nq(i,!t,o,n?"":"!important")})},Sv=!1;if(typeof window<"u")try{var Du=Object.defineProperty({},"passive",{get:function(){return Sv=!0,!0}});window.addEventListener("test",Du,Du),window.removeEventListener("test",Du,Du)}catch{Sv=!1}var Ii=Sv?{passive:!1}:!1,iq=function(e){return e.tagName==="TEXTAREA"},M_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!iq(e)&&n[t]==="visible")},sq=function(e){return M_(e,"overflowY")},aq=function(e){return M_(e,"overflowX")},Gx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=I_(e,r);if(o){var i=A_(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},I_=function(e,t){return e==="v"?sq(t):aq(t)},A_=function(e,t){return e==="v"?lq(t):uq(t)},cq=function(e,t){return e==="h"&&t==="rtl"?-1:1},dq=function(e,t,n,r,o){var i=cq(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,c=s>0,d=0,f=0;do{var p=A_(e,a),m=p[0],h=p[1],S=p[2],v=h-S-i*m;(m||v)&&I_(e,a)&&(d+=v,f+=m),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(u=!0),u},Fu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yx=function(e){return[e.deltaX,e.deltaY]},Xx=function(e){return e&&"current"in e?e.current:e},fq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pq=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},hq=0,Ai=[];function mq(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(hq++)[0],i=g.useState(R_)[0],s=g.useRef(e);g.useEffect(function(){s.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Y8([e.lockRef.current],(e.shards||[]).map(Xx),!0).filter(Boolean);return h.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(h,S){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var v=Fu(h),y=n.current,b="deltaX"in h?h.deltaX:y[0]-v[0],x="deltaY"in h?h.deltaY:y[1]-v[1],k,P=h.target,C=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in h&&C==="h"&&P.type==="range")return!1;var E=Gx(C,P);if(!E)return!0;if(E?k=C:(k=C==="v"?"h":"v",E=Gx(C,P)),!E)return!1;if(!r.current&&"changedTouches"in h&&(b||x)&&(r.current=k),!k)return!0;var _=r.current||k;return dq(_,S,h,_==="h"?b:x,!0)},[]),l=g.useCallback(function(h){var S=h;if(!(!Ai.length||Ai[Ai.length-1]!==i)){var v="deltaY"in S?Yx(S):Fu(S),y=t.current.filter(function(k){return k.name===S.type&&(k.target===S.target||S.target===k.shadowParent)&&fq(k.delta,v)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var b=(s.current.shards||[]).map(Xx).filter(Boolean).filter(function(k){return k.contains(S.target)}),x=b.length>0?a(S,b[0]):!s.current.noIsolation;x&&S.cancelable&&S.preventDefault()}}},[]),u=g.useCallback(function(h,S,v,y){var b={name:h,delta:S,target:v,should:y,shadowParent:vq(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),c=g.useCallback(function(h){n.current=Fu(h),r.current=void 0},[]),d=g.useCallback(function(h){u(h.type,Yx(h),h.target,a(h,e.lockRef.current))},[]),f=g.useCallback(function(h){u(h.type,Fu(h),h.target,a(h,e.lockRef.current))},[]);g.useEffect(function(){return Ai.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ii),document.addEventListener("touchmove",l,Ii),document.addEventListener("touchstart",c,Ii),function(){Ai=Ai.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Ii),document.removeEventListener("touchmove",l,Ii),document.removeEventListener("touchstart",c,Ii)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(i,{styles:pq(o)}):null,p?g.createElement(oq,{gapMode:e.gapMode}):null)}function vq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gq=X8(O_,mq);var D_=g.forwardRef(function(e,t){return g.createElement(jf,dr({},e,{ref:t,sideCar:gq}))});D_.classNames=jf.classNames;function F_(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:i,allowPinchZoom:s,finalFocusRef:a,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:c,isOpen:d}=$o(),[f,p]=KE();g.useEffect(()=>{!f&&p&&setTimeout(p)},[f,p]);const m=__(r,d);return w.jsx(i_,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:a,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:c,children:w.jsx(D_,{removeScrollBar:!u,allowPinchZoom:s,enabled:m===1&&i,forwardProps:!0,children:e.children})})}var L_=U((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:i,...s}=e,{getDialogProps:a,getDialogContainerProps:l}=$o(),u=a(s,t),c=l(o),d=Z("chakra-modal__content",n),f=Ci(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},m={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{motionPreset:h}=$o();return w.jsx(F_,{children:w.jsx(A.div,{...c,className:"chakra-modal__content-container",tabIndex:-1,__css:m,children:w.jsx(T_,{preset:h,motionProps:i,className:d,...u,__css:p,children:r})})})});L_.displayName="ModalContent";function kee(e){const{leastDestructiveRef:t,...n}=e;return w.jsx(sy,{...n,initialFocusRef:t})}var Cee=U((e,t)=>w.jsx(L_,{ref:t,role:"alertdialog",...e})),[yq,bq]=Ge(),Sq={start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}};function xq(e,t){var n,r;if(e)return(r=(n=Sq[e])==null?void 0:n[t])!=null?r:e}function Pee(e){var t;const{isOpen:n,onClose:r,placement:o="right",children:i,...s}=e,a=Yr(),l=(t=a.components)==null?void 0:t.Drawer,u=xq(o,a.direction);return w.jsx(yq,{value:{placement:u},children:w.jsx(sy,{isOpen:n,onClose:r,styleConfig:l,...s,children:i})})}var wq=A(yT),kq=U((e,t)=>{const{className:n,children:r,motionProps:o,containerProps:i,...s}=e,{getDialogProps:a,getDialogContainerProps:l,isOpen:u}=$o(),c=a(s,t),d=l(i),f=Z("chakra-modal__content",n),p=Ci(),m={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...p.dialog},h={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...p.dialogContainer},{placement:S}=bq();return w.jsx(F_,{children:w.jsx(A.div,{...d,className:"chakra-modal__content-container",__css:h,children:w.jsx(wq,{motionProps:o,direction:S,in:u,className:f,...c,__css:m,children:r})})})});kq.displayName="DrawerContent";var Cq=U((e,t)=>{const{className:n,...r}=e,o=Z("chakra-modal__footer",n),s={display:"flex",alignItems:"center",justifyContent:"flex-end",...Ci().footer};return w.jsx(A.footer,{ref:t,...r,__css:s,className:o})});Cq.displayName="ModalFooter";var Pq=U((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:i}=$o();g.useEffect(()=>(i(!0),()=>i(!1)),[i]);const s=Z("chakra-modal__header",n),l={flex:0,...Ci().header};return w.jsx(A.header,{ref:t,className:s,id:o,...r,__css:l})});Pq.displayName="ModalHeader";var Eq=A(Xr.div),Tq=U((e,t)=>{const{className:n,transition:r,motionProps:o,...i}=e,s=Z("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Ci().overlay},{motionPreset:u}=$o(),d=o||(u==="none"?{}:vT);return w.jsx(Eq,{...d,__css:l,ref:t,className:s,...i})});Tq.displayName="ModalOverlay";var _q=U((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:i}=$o();g.useEffect(()=>(i(!0),()=>i(!1)),[i]);const s=Z("chakra-modal__body",n),a=Ci();return w.jsx(A.div,{ref:t,className:s,id:o,...r,__css:a.body})});_q.displayName="ModalBody";var $q=U((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:i}=$o(),s=Z("chakra-modal__close-btn",r),a=Ci();return w.jsx(D0,{ref:t,__css:a.closeButton,className:s,onClick:Ee(n,l=>{l.stopPropagation(),i()}),...o})});$q.displayName="ModalCloseButton";var Oq=A("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Oq.displayName="CircularProgressLabel";var xv=e=>w.jsx(A.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});xv.displayName="Circle";function Rq(e,t,n){return(e-t)*100/(n-t)}var Mq=Xn({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Iq=Xn({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});Xn({"0%":{left:"-40%"},"100%":{left:"100%"}});Xn({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function Aq(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:i,isIndeterminate:s,role:a="progressbar"}=e,l=Rq(t,n,r);return{bind:{"data-indeterminate":s?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":s?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof i=="function"?i(t,l):o})(),role:a},percent:l,value:t}}var N_=e=>{const{size:t,isIndeterminate:n,...r}=e;return w.jsx(A.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Iq} 2s linear infinite`:void 0},...r})};N_.displayName="Shape";var Dq=U((e,t)=>{var n;const{size:r="48px",max:o=100,min:i=0,valueText:s,getValueText:a,value:l,capIsRound:u,children:c,thickness:d="10px",color:f="#0078d4",trackColor:p="#edebe9",isIndeterminate:m,...h}=e,S=Aq({min:i,max:o,value:l,valueText:s,getValueText:a,isIndeterminate:m}),v=m?void 0:((n=S.percent)!=null?n:0)*2.64,y=v==null?void 0:`${v} ${264-v}`,b=m?{css:{animation:`${Mq} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:y,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},x={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:r};return w.jsxs(A.div,{ref:t,className:"chakra-progress",...S.bind,...h,__css:x,children:[w.jsxs(N_,{size:r,isIndeterminate:m,children:[w.jsx(xv,{stroke:p,strokeWidth:d,className:"chakra-progress__track"}),w.jsx(xv,{stroke:f,strokeWidth:d,className:"chakra-progress__indicator",strokeLinecap:u?"round":void 0,opacity:S.value===0&&!m?0:void 0,...b})]}),c]})});Dq.displayName="CircularProgress";function Fq(){const e=g.useRef(!0);return g.useEffect(()=>{e.current=!1},[]),e.current}function Lq(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var Nq=A("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),wv=Y("skeleton-start-color"),kv=Y("skeleton-end-color"),Vq=Xn({from:{opacity:0},to:{opacity:1}}),zq=Xn({from:{borderColor:wv.reference,background:wv.reference},to:{borderColor:kv.reference,background:kv.reference}}),Bq=U((e,t)=>{const n={...e,fadeDuration:typeof e.fadeDuration=="number"?e.fadeDuration:.4,speed:typeof e.speed=="number"?e.speed:.8},r=en("Skeleton",n),o=Fq(),{startColor:i="",endColor:s="",isLoaded:a,fadeDuration:l,speed:u,className:c,fitContent:d,...f}=Ye(n),[p,m]=S3("colors",[i,s]),h=Lq(a),S=Z("chakra-skeleton",c),v={...p&&{[wv.variable]:p},...m&&{[kv.variable]:m}};if(a){const y=o||h?"none":`${Vq} ${l}s`;return w.jsx(A.div,{ref:t,className:S,__css:{animation:y},...f})}return w.jsx(Nq,{ref:t,className:S,...f,__css:{width:d?"fit-content":void 0,...r,...v,_dark:{...r._dark,...v},animation:`${u}s linear infinite alternate ${zq}`}})});Bq.displayName="Skeleton";var[jq,Pi]=Ge({name:"StepContext"}),[Hq,qs]=jN("Stepper"),Eee=U(function(t,n){const{status:r}=Pi(),o=qs();return w.jsx(A.h3,{ref:n,"data-status":r,...t,__css:o.title,className:Z("chakra-step__title",t.className)})}),Tee=U(function(t,n){const{orientation:r,status:o,showLastSeparator:i}=Pi(),s=qs();return w.jsx(A.div,{ref:n,"data-status":o,"data-orientation":r,"data-stretch":ce(i),__css:s.step,...t,className:Z("chakra-step",t.className)})}),_ee=U(function(t,n){const r=ut("Stepper",t),{children:o,index:i,orientation:s="horizontal",showLastSeparator:a=!1,...l}=Ye(t),u=g.Children.toArray(o),c=u.length;function d(f){return fi?"incomplete":"active"}return w.jsx(A.div,{ref:n,"aria-label":"Progress","data-orientation":s,...l,__css:r.stepper,className:Z("chakra-stepper",t.className),children:w.jsx(Hq,{value:r,children:u.map((f,p)=>w.jsx(jq,{value:{index:p,status:d(p),orientation:s,showLastSeparator:a,count:c,isFirst:p===0,isLast:p===c-1},children:f},p))})})});function $ee(e={}){const{index:t=0,count:n}=e,[r,o]=g.useState(t),i=typeof n=="number"?n-1:0,s=r/i;return{activeStep:r,setActiveStep:o,activeStepPercent:s,isActiveStep(a){return a===r},isCompleteStep(a){return ar},getStatus(a){return ar?"incomplete":"active"},goToNext(){o(a=>typeof n=="number"?Math.min(n,a+1):a+1)},goToPrevious(){o(a=>Math.max(0,a-1))}}}function Oee(e){const{complete:t,incomplete:n,active:r}=e,o=Pi();let i=null;switch(o.status){case"complete":i=Kt(t,o);break;case"incomplete":i=Kt(n,o);break;case"active":i=Kt(r,o);break}return i?w.jsx(w.Fragment,{children:i}):null}function Wq(e){return w.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1em",width:"1em",...e,children:w.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}function Ree(e){const{status:t}=Pi(),n=qs(),r=t==="complete"?Wq:void 0;return w.jsx(Qn,{as:r,__css:n.icon,...e,className:Z("chakra-step__icon",e.className)})}var Mee=U(function(t,n){const{children:r,...o}=t,{status:i,index:s}=Pi(),a=qs();return w.jsx(A.div,{ref:n,"data-status":i,__css:a.number,...o,className:Z("chakra-step__number",t.className),children:r||s+1})});function Iee(e){const{status:t}=Pi(),n=qs();return w.jsx(A.div,{"data-status":t,...e,__css:n.indicator,className:Z("chakra-step__indicator",e.className)})}var Aee=U(function(t,n){const{orientation:r,status:o,isLast:i,showLastSeparator:s}=Pi(),a=qs();return i&&!s?null:w.jsx(A.div,{ref:n,role:"separator","data-orientation":r,"data-status":o,__css:a.separator,...t,className:Z("chakra-step__separator",t.className)})}),[Uq,tu]=Ge({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),qq=U((e,t)=>{const n=ut("Table",e),{className:r,layout:o,...i}=Ye(e);return w.jsx(Uq,{value:n,children:w.jsx(A.table,{ref:t,__css:{tableLayout:o,...n.table},className:Z("chakra-table",r),...i})})});qq.displayName="Table";var Dee=U((e,t)=>{const n=tu();return w.jsx(A.thead,{...e,ref:t,__css:n.thead})}),Fee=U((e,t)=>{const n=tu();return w.jsx(A.tr,{...e,ref:t,__css:n.tr})}),Lee=U((e,t)=>{const n=tu();return w.jsx(A.tbody,{...e,ref:t,__css:n.tbody})}),Nee=U(({isNumeric:e,...t},n)=>{const r=tu();return w.jsx(A.td,{...t,ref:n,__css:r.td,"data-is-numeric":e})}),Vee=U(({isNumeric:e,...t},n)=>{const r=tu();return w.jsx(A.th,{...t,ref:n,__css:r.th,"data-is-numeric":e})}),[Kq,Gq,Yq,Xq]=hT();function Qq(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:i,isLazy:s,lazyBehavior:a="unmount",orientation:l="horizontal",direction:u="ltr",...c}=e,[d,f]=g.useState(n??0),[p,m]=mT({defaultValue:n??0,value:o,onChange:r});g.useEffect(()=>{o!=null&&f(o)},[o]);const h=Yq(),S=g.useId();return{id:`tabs-${(t=e.id)!=null?t:S}`,selectedIndex:p,focusedIndex:d,setSelectedIndex:m,setFocusedIndex:f,isManual:i,isLazy:s,lazyBehavior:a,orientation:l,descendants:h,direction:u,htmlProps:c}}var[Zq,Hf]=Ge({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Jq(e){const{focusedIndex:t,orientation:n,direction:r}=Hf(),o=Gq(),i=g.useCallback(s=>{const a=()=>{var y;const b=o.nextEnabled(t);b&&((y=b.node)==null||y.focus())},l=()=>{var y;const b=o.prevEnabled(t);b&&((y=b.node)==null||y.focus())},u=()=>{var y;const b=o.firstEnabled();b&&((y=b.node)==null||y.focus())},c=()=>{var y;const b=o.lastEnabled();b&&((y=b.node)==null||y.focus())},d=n==="horizontal",f=n==="vertical",p=s.key,m=r==="ltr"?"ArrowLeft":"ArrowRight",h=r==="ltr"?"ArrowRight":"ArrowLeft",v={[m]:()=>d&&l(),[h]:()=>d&&a(),ArrowDown:()=>f&&a(),ArrowUp:()=>f&&l(),Home:u,End:c}[p];v&&(s.preventDefault(),v(s))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:Ee(e.onKeyDown,i)}}function eK(e){const{isDisabled:t=!1,isFocusable:n=!1,...r}=e,{setSelectedIndex:o,isManual:i,id:s,setFocusedIndex:a,selectedIndex:l}=Hf(),{index:u,register:c}=Xq({disabled:t&&!n}),d=u===l,f=()=>{o(u)},p=()=>{a(u),!i&&!(t&&n)&&o(u)};return{...GH({...r,ref:mn(c,e.ref),isDisabled:t,isFocusable:n,onClick:Ee(e.onClick,f)}),id:V_(s,u),role:"tab",tabIndex:d?0:-1,type:"button","aria-selected":d,"aria-controls":z_(s,u),onFocus:t?void 0:Ee(e.onFocus,p)}}var[tK,nK]=Ge({});function rK(e){const t=Hf(),{id:n,selectedIndex:r}=t,i=F0(e.children).map((s,a)=>g.createElement(tK,{key:a,value:{isSelected:a===r,id:z_(n,a),tabId:V_(n,a),selectedIndex:r}},s));return{...e,children:i}}function oK(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=Hf(),{isSelected:i,id:s,tabId:a}=nK(),l=g.useRef(!1);i&&(l.current=!0);const u=bU({wasSelected:l.current,isSelected:i,enabled:r,mode:o});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":a,hidden:!i,id:s}}function V_(e,t){return`${e}--tab-${t}`}function z_(e,t){return`${e}--tabpanel-${t}`}var[iK,Wf]=Ge({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),sK=U(function(t,n){const r=ut("Tabs",t),{children:o,className:i,...s}=Ye(t),{htmlProps:a,descendants:l,...u}=Qq(s),c=g.useMemo(()=>u,[u]),{isFitted:d,...f}=a,p={position:"relative",...r.root};return w.jsx(Kq,{value:l,children:w.jsx(Zq,{value:c,children:w.jsx(iK,{value:r,children:w.jsx(A.div,{className:Z("chakra-tabs",i),ref:n,...f,__css:p,children:o})})})})});sK.displayName="Tabs";var aK=U(function(t,n){const r=Jq({...t,ref:n}),i={display:"flex",...Wf().tablist};return w.jsx(A.div,{...r,className:Z("chakra-tabs__tablist",t.className),__css:i})});aK.displayName="TabList";var lK=U(function(t,n){const r=oK({...t,ref:n}),o=Wf();return w.jsx(A.div,{outline:"0",...r,className:Z("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});lK.displayName="TabPanel";var uK=U(function(t,n){const r=rK(t),o=Wf();return w.jsx(A.div,{...r,width:"100%",ref:n,className:Z("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});uK.displayName="TabPanels";var cK=U(function(t,n){const r=Wf(),o=eK({...t,ref:n}),i={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return w.jsx(A.button,{...o,className:Z("chakra-tabs__tab",t.className),__css:i})});cK.displayName="Tab";function dK(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var fK=["h","minH","height","minHeight"],pK=U((e,t)=>{const n=en("Textarea",e),{className:r,rows:o,...i}=Ye(e),s=L0(i),a=o?dK(n,fK):n;return w.jsx(A.textarea,{ref:t,rows:o,...s,className:Z("chakra-textarea",r),__css:a})});pK.displayName="Textarea";var hK={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Cv=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Ec=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function mK(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:i,closeOnPointerDown:s=o,closeOnEsc:a=!0,onOpen:l,onClose:u,placement:c,id:d,isOpen:f,defaultIsOpen:p,arrowSize:m=10,arrowShadowColor:h,arrowPadding:S,modifiers:v,isDisabled:y,gutter:b,offset:x,direction:k,...P}=e,{isOpen:C,onOpen:E,onClose:_}=k_({isOpen:f,defaultIsOpen:p,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:M,getArrowInnerProps:F,getArrowProps:W}=w_({enabled:C,placement:c,arrowPadding:S,modifiers:v,gutter:b,offset:x,direction:k}),re=g.useId(),N=`tooltip-${d??re}`,R=g.useRef(null),O=g.useRef(),D=g.useCallback(()=>{O.current&&(clearTimeout(O.current),O.current=void 0)},[]),V=g.useRef(),oe=g.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0)},[]),B=g.useCallback(()=>{oe(),_()},[_,oe]),ee=vK(R,B),j=g.useCallback(()=>{if(!y&&!O.current){C&&ee();const pe=Ec(R);O.current=pe.setTimeout(E,t)}},[ee,y,C,E,t]),te=g.useCallback(()=>{D();const pe=Ec(R);V.current=pe.setTimeout(B,n)},[n,B,D]),ae=g.useCallback(()=>{C&&r&&te()},[r,te,C]),we=g.useCallback(()=>{C&&s&&te()},[s,te,C]),Se=g.useCallback(pe=>{C&&pe.key==="Escape"&&te()},[C,te]);wc(()=>Cv(R),"keydown",a?Se:void 0),wc(()=>{if(!i)return null;const pe=R.current;if(!pe)return null;const tt=t_(pe);return tt.localName==="body"?Ec(R):tt},"scroll",()=>{C&&i&&B()},{passive:!0,capture:!0}),g.useEffect(()=>{y&&(D(),C&&_())},[y,C,_,D]),g.useEffect(()=>()=>{D(),oe()},[D,oe]),wc(()=>R.current,"pointerleave",te);const xt=g.useCallback((pe={},tt=null)=>({...pe,ref:mn(R,tt,$),onPointerEnter:Ee(pe.onPointerEnter,ne=>{ne.pointerType!=="touch"&&j()}),onClick:Ee(pe.onClick,ae),onPointerDown:Ee(pe.onPointerDown,we),onFocus:Ee(pe.onFocus,j),onBlur:Ee(pe.onBlur,te),"aria-describedby":C?N:void 0}),[j,te,we,C,N,ae,$]),Ln=g.useCallback((pe={},tt=null)=>M({...pe,style:{...pe.style,[mt.arrowSize.var]:m?`${m}px`:void 0,[mt.arrowShadowColor.var]:h}},tt),[M,m,h]),Bt=g.useCallback((pe={},tt=null)=>{const Sn={...pe.style,position:"relative",transformOrigin:mt.transformOrigin.varRef};return{ref:tt,...P,...pe,id:N,role:"tooltip",style:Sn}},[P,N]);return{isOpen:C,show:j,hide:te,getTriggerProps:xt,getTooltipProps:Bt,getTooltipPositionerProps:Ln,getArrowProps:W,getArrowInnerProps:F}}var yh="chakra-ui:close-tooltip";function vK(e,t){return g.useEffect(()=>{const n=Cv(e);return n.addEventListener(yh,t),()=>n.removeEventListener(yh,t)},[t,e]),()=>{const n=Cv(e),r=Ec(e);n.dispatchEvent(new r.CustomEvent(yh))}}function gK(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function yK(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var bK=A(Xr.div),SK=U((e,t)=>{var n,r;const o=en("Tooltip",e),i=Ye(e),s=Yr(),{children:a,label:l,shouldWrapChildren:u,"aria-label":c,hasArrow:d,bg:f,portalProps:p,background:m,backgroundColor:h,bgColor:S,motionProps:v,...y}=i,b=(r=(n=m??h)!=null?n:f)!=null?r:S;if(b){o.bg=b;const M=zM(s,"colors",b);o[mt.arrowBg.var]=M}const x=mK({...y,direction:s.direction}),k=typeof a=="string"||u;let P;if(k)P=w.jsx(A.span,{display:"inline-block",tabIndex:0,...x.getTriggerProps(),children:a});else{const M=g.Children.only(a);P=g.cloneElement(M,x.getTriggerProps(M.props,M.ref))}const C=!!c,E=x.getTooltipProps({},t),_=C?gK(E,["role","id"]):E,$=yK(E,["role","id"]);return l?w.jsxs(w.Fragment,{children:[P,w.jsx(Do,{children:x.isOpen&&w.jsx(Ws,{...p,children:w.jsx(A.div,{...x.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:w.jsxs(bK,{variants:hK,initial:"exit",animate:"enter",exit:"exit",...v,..._,__css:o,children:[l,C&&w.jsx(A.span,{srOnly:!0,...$,children:c}),d&&w.jsx(A.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:w.jsx(A.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):w.jsx(w.Fragment,{children:a})});SK.displayName="Tooltip";const Sr=Object.create(null);Sr.open="0";Sr.close="1";Sr.ping="2";Sr.pong="3";Sr.message="4";Sr.upgrade="5";Sr.noop="6";const Tc=Object.create(null);Object.keys(Sr).forEach(e=>{Tc[Sr[e]]=e});const Pv={type:"error",data:"parser error"},B_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",j_=typeof ArrayBuffer=="function",H_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ay=({type:e,data:t},n,r)=>B_&&t instanceof Blob?n?r(t):Qx(t,r):j_&&(t instanceof ArrayBuffer||H_(t))?n?r(t):Qx(new Blob([t]),r):r(Sr[e]+(t||"")),Qx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Zx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let bh;function xK(e,t){if(B_&&e.data instanceof Blob)return e.data.arrayBuffer().then(Zx).then(t);if(j_&&(e.data instanceof ArrayBuffer||H_(e.data)))return t(Zx(e.data));ay(e,!1,n=>{bh||(bh=new TextEncoder),t(bh.encode(n))})}const Jx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ea=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,o=0,i,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[o++]=(s&15)<<4|a>>2,c[o++]=(a&3)<<6|l&63;return u},kK=typeof ArrayBuffer=="function",ly=(e,t)=>{if(typeof e!="string")return{type:"message",data:W_(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CK(e.substring(1),t)}:Tc[n]?e.length>1?{type:Tc[n],data:e.substring(1)}:{type:Tc[n]}:Pv},CK=(e,t)=>{if(kK){const n=wK(e);return W_(n,t)}else return{base64:!0,data:e}},W_=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},U_="",PK=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((i,s)=>{ay(i,!1,a=>{r[s]=a,++o===n&&t(r.join(U_))})})},EK=(e,t)=>{const n=e.split(U_),r=[];for(let o=0;o{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Sh;function Lu(e){return e.reduce((t,n)=>t+n.length,0)}function Nu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;oMath.pow(2,21)-1){a.enqueue(Pv);break}o=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Lu(n)e){a.enqueue(Pv);break}}}})}const q_=4;function Ze(e){if(e)return $K(e)}function $K(e){for(var t in Ze.prototype)e[t]=Ze.prototype[t];return e}Ze.prototype.on=Ze.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ze.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ze.prototype.off=Ze.prototype.removeListener=Ze.prototype.removeAllListeners=Ze.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const OK=Tn.setTimeout,RK=Tn.clearTimeout;function Uf(e,t){t.useNativeTimers?(e.setTimeoutFn=OK.bind(Tn),e.clearTimeoutFn=RK.bind(Tn)):(e.setTimeoutFn=Tn.setTimeout.bind(Tn),e.clearTimeoutFn=Tn.clearTimeout.bind(Tn))}const MK=1.33;function IK(e){return typeof e=="string"?AK(e):Math.ceil((e.byteLength||e.size)*MK)}function AK(e){let t=0,n=0;for(let r=0,o=e.length;r=57344?n+=3:(r++,n+=4);return n}function DK(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function FK(e){let t={},n=e.split("&");for(let r=0,o=n.length;r0);return t}function Y_(){const e=nw(+new Date);return e!==tw?(ew=0,tw=e):e+"."+nw(ew++)}for(;Vu{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};EK(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,PK(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Y_()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new yr(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class yr extends Ze{constructor(t,n){super(),Uf(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=K_(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Q_(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=yr.requestsCount++,yr.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=zK,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete yr.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}yr.requestsCount=0;yr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rw);else if(typeof addEventListener=="function"){const e="onpagehide"in Tn?"pagehide":"unload";addEventListener(e,rw,!1)}}function rw(){for(let e in yr.requests)yr.requests.hasOwnProperty(e)&&yr.requests[e].abort()}const cy=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),zu=Tn.WebSocket||Tn.MozWebSocket,ow=!0,HK="arraybuffer",iw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WK extends uy{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=iw?{}:K_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ow&&!iw?n?new zu(t,n):new zu(t):new zu(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{ow&&this.ws.send(i)}catch{}o&&cy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Y_()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!zu}}class UK extends uy{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=_K(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=TK();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{o&&cy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const qK={websocket:WK,webtransport:UK,polling:jK},KK=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,GK=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Tv(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=KK.exec(e||""),i={},s=14;for(;s--;)i[GK[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=YK(i,i.path),i.queryKey=XK(i,i.query),i}function YK(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function XK(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}let Z_=class Fi extends Ze{constructor(t,n={}){super(),this.binaryType=HK,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Tv(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=Tv(n.host).host),Uf(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FK(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=q_,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new qK[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fi.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const s=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){s("transport closed")}function l(){s("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",o),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Fi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fi.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const o=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,J_=Object.prototype.toString,eG=typeof Blob=="function"||typeof Blob<"u"&&J_.call(Blob)==="[object BlobConstructor]",tG=typeof File=="function"||typeof File<"u"&&J_.call(File)==="[object FileConstructor]";function dy(e){return ZK&&(e instanceof ArrayBuffer||JK(e))||eG&&e instanceof Blob||tG&&e instanceof File}function _c(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(i),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,o)=>{const i=(s,a)=>s?o(s):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:de.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case de.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case de.EVENT:case de.BINARY_EVENT:this.onevent(t);break;case de.ACK:case de.BINARY_ACK:this.onack(t);break;case de.DISCONNECT:this.ondisconnect();break;case de.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:de.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:de.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ks.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Ks.prototype.reset=function(){this.attempts=0};Ks.prototype.setMin=function(e){this.ms=e};Ks.prototype.setMax=function(e){this.max=e};Ks.prototype.setJitter=function(e){this.jitter=e};class Ov extends Ze{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Uf(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||lG;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Z_(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=jn(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=jn(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(jn(t,"ping",this.onping.bind(this)),jn(t,"data",this.ondata.bind(this)),jn(t,"error",this.onerror.bind(this)),jn(t,"close",this.onclose.bind(this)),jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){cy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new e$(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fa={};function xh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=QK(e,t.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=fa[o]&&i in fa[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Ov(r,t):(fa[o]||(fa[o]=new Ov(r,t)),l=fa[o]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(xh,{Manager:Ov,Socket:e$,io:xh,connect:xh});var t$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},aw=Un.createContext&&Un.createContext(t$),cG=["attr","size","title"];function dG(e,t){if(e==null)return{};var n=fG(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Td(){return Td=Object.assign?Object.assign.bind():function(e){for(var t=1;tUn.createElement(t.tag,_d({key:n},t.attr),n$(t.child)))}function et(e){return t=>Un.createElement(vG,Td({attr:_d({},e.attr)},t),n$(e.child))}function vG(e){var t=n=>{var{attr:r,size:o,title:i}=e,s=dG(e,cG),a=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),Un.createElement("svg",Td({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:_d(_d({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&Un.createElement("title",null,i),e.children)};return aw!==void 0?Un.createElement(aw.Consumer,null,n=>t(n)):t(t$)}function zee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"},child:[]}]})(e)}function Bee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m19.17 12-4.58-4.59L16 6l6 6-3.59 3.59L17 14.17 19.17 12zM1.39 4.22l4.19 4.19L2 12l6 6 1.41-1.41L4.83 12 7 9.83l12.78 12.78 1.41-1.41L2.81 2.81 1.39 4.22z"},child:[]}]})(e)}function jee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(e)}function Hee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(e)}function Wee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(e)}function Uee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"},child:[]}]})(e)}function qee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"},child:[]}]})(e)}function Kee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 13v3c0 1.1-.9 2-2 2h-3l1 1v2H6v-2l1-1H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8v2H4v11h16v-3h2zm-7 2-5-5h4V3h2v7h4l-5 5z"},child:[]}]})(e)}function Gee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 4V2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1s-1-.45-1-1zm7.36 3.05 1.41-1.42a.996.996 0 1 0-1.41-1.41l-1.41 1.42a.996.996 0 1 0 1.41 1.41zM22 11h-2c-.55 0-1 .45-1 1s.45 1 1 1h2c.55 0 1-.45 1-1s-.45-1-1-1zm-10 8c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1zM5.64 7.05 4.22 5.64c-.39-.39-.39-1.03 0-1.41s1.03-.39 1.41 0l1.41 1.41c.39.39.39 1.03 0 1.41s-1.02.39-1.4 0zm11.31 9.9a.996.996 0 0 0 0 1.41l1.41 1.41c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.41-1.41a.996.996 0 0 0-1.41 0zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm3.64 6.78 1.41-1.41c.39-.39.39-1.03 0-1.41s-1.03-.39-1.41 0l-1.41 1.41a.996.996 0 0 0 0 1.41c.38.39 1.02.39 1.41 0zM12 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z"},child:[]}]})(e)}function Yee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9 1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"},child:[]}]})(e)}function Xee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.06 8.94 5 8l2.06-.94L8 5l.94 2.06L11 8l-2.06.94L8 11l-.94-2.06zM8 21l.94-2.06L11 18l-2.06-.94L8 15l-.94 2.06L5 18l2.06.94L8 21zm-3.63-8.63L3 13l1.37.63L5 15l.63-1.37L7 13l-1.37-.63L5 11l-.63 1.37zM12 12c0-3.09 1.38-5.94 3.44-8H12V2h7v7h-2V5.28c-1.8 1.74-3 4.2-3 6.72 0 3.32 2.1 6.36 5 7.82V22c-4.09-1.59-7-5.65-7-10z"},child:[]}]})(e)}function Qee(e){return et({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 6V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2H4"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"circle",attr:{cx:"6",cy:"14",r:"3"},child:[]},{tag:"path",attr:{d:"M6 10v1"},child:[]},{tag:"path",attr:{d:"M6 17v1"},child:[]},{tag:"path",attr:{d:"M10 14H9"},child:[]},{tag:"path",attr:{d:"M3 14H2"},child:[]},{tag:"path",attr:{d:"m9 11-.88.88"},child:[]},{tag:"path",attr:{d:"M3.88 16.12 3 17"},child:[]},{tag:"path",attr:{d:"m9 17-.88-.88"},child:[]},{tag:"path",attr:{d:"M3.88 11.88 3 11"},child:[]}]})(e)}var Zee=ki({displayName:"TimeIcon",path:w.jsxs("g",{fill:"currentColor",children:[w.jsx("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),w.jsx("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})}),Jee=ki({displayName:"RepeatIcon",path:w.jsxs("g",{fill:"currentColor",children:[w.jsx("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),w.jsx("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})}),ete=ki({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:w.jsx("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})}),tte=ki({displayName:"ExternalLinkIcon",path:w.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[w.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),w.jsx("path",{d:"M15 3h6v6"}),w.jsx("path",{d:"M10 14L21 3"})]})}),nte=ki({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),rte=ki({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),ote=ki({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});function ite(e){return et({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},child:[]}]})(e)}function ste(e){return et({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"},child:[]}]})(e)}function ate(e){return et({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"},child:[]}]})(e)}var Gs={};/** +`)},hq=0,Ai=[];function mq(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(hq++)[0],i=g.useState(R_)[0],s=g.useRef(e);g.useEffect(function(){s.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Y8([e.lockRef.current],(e.shards||[]).map(Xx),!0).filter(Boolean);return h.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(h,S){if("touches"in h&&h.touches.length===2)return!s.current.allowPinchZoom;var v=Fu(h),y=n.current,b="deltaX"in h?h.deltaX:y[0]-v[0],x="deltaY"in h?h.deltaY:y[1]-v[1],k,P=h.target,C=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in h&&C==="h"&&P.type==="range")return!1;var E=Gx(C,P);if(!E)return!0;if(E?k=C:(k=C==="v"?"h":"v",E=Gx(C,P)),!E)return!1;if(!r.current&&"changedTouches"in h&&(b||x)&&(r.current=k),!k)return!0;var _=r.current||k;return dq(_,S,h,_==="h"?b:x,!0)},[]),l=g.useCallback(function(h){var S=h;if(!(!Ai.length||Ai[Ai.length-1]!==i)){var v="deltaY"in S?Yx(S):Fu(S),y=t.current.filter(function(k){return k.name===S.type&&(k.target===S.target||S.target===k.shadowParent)&&fq(k.delta,v)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var b=(s.current.shards||[]).map(Xx).filter(Boolean).filter(function(k){return k.contains(S.target)}),x=b.length>0?a(S,b[0]):!s.current.noIsolation;x&&S.cancelable&&S.preventDefault()}}},[]),u=g.useCallback(function(h,S,v,y){var b={name:h,delta:S,target:v,should:y,shadowParent:vq(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),c=g.useCallback(function(h){n.current=Fu(h),r.current=void 0},[]),d=g.useCallback(function(h){u(h.type,Yx(h),h.target,a(h,e.lockRef.current))},[]),f=g.useCallback(function(h){u(h.type,Fu(h),h.target,a(h,e.lockRef.current))},[]);g.useEffect(function(){return Ai.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ii),document.addEventListener("touchmove",l,Ii),document.addEventListener("touchstart",c,Ii),function(){Ai=Ai.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Ii),document.removeEventListener("touchmove",l,Ii),document.removeEventListener("touchstart",c,Ii)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(i,{styles:pq(o)}):null,p?g.createElement(oq,{gapMode:e.gapMode}):null)}function vq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gq=X8(O_,mq);var D_=g.forwardRef(function(e,t){return g.createElement(jf,dr({},e,{ref:t,sideCar:gq}))});D_.classNames=jf.classNames;function F_(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:i,allowPinchZoom:s,finalFocusRef:a,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:c,isOpen:d}=$o(),[f,p]=KE();g.useEffect(()=>{!f&&p&&setTimeout(p)},[f,p]);const m=__(r,d);return w.jsx(i_,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:a,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:c,children:w.jsx(D_,{removeScrollBar:!u,allowPinchZoom:s,enabled:m===1&&i,forwardProps:!0,children:e.children})})}var L_=U((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:i,...s}=e,{getDialogProps:a,getDialogContainerProps:l}=$o(),u=a(s,t),c=l(o),d=Z("chakra-modal__content",n),f=Ci(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},m={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{motionPreset:h}=$o();return w.jsx(F_,{children:w.jsx(A.div,{...c,className:"chakra-modal__content-container",tabIndex:-1,__css:m,children:w.jsx(T_,{preset:h,motionProps:i,className:d,...u,__css:p,children:r})})})});L_.displayName="ModalContent";function kee(e){const{leastDestructiveRef:t,...n}=e;return w.jsx(sy,{...n,initialFocusRef:t})}var Cee=U((e,t)=>w.jsx(L_,{ref:t,role:"alertdialog",...e})),[yq,bq]=Ge(),Sq={start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}};function xq(e,t){var n,r;if(e)return(r=(n=Sq[e])==null?void 0:n[t])!=null?r:e}function Pee(e){var t;const{isOpen:n,onClose:r,placement:o="right",children:i,...s}=e,a=Yr(),l=(t=a.components)==null?void 0:t.Drawer,u=xq(o,a.direction);return w.jsx(yq,{value:{placement:u},children:w.jsx(sy,{isOpen:n,onClose:r,styleConfig:l,...s,children:i})})}var wq=A(yT),kq=U((e,t)=>{const{className:n,children:r,motionProps:o,containerProps:i,...s}=e,{getDialogProps:a,getDialogContainerProps:l,isOpen:u}=$o(),c=a(s,t),d=l(i),f=Z("chakra-modal__content",n),p=Ci(),m={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...p.dialog},h={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...p.dialogContainer},{placement:S}=bq();return w.jsx(F_,{children:w.jsx(A.div,{...d,className:"chakra-modal__content-container",__css:h,children:w.jsx(wq,{motionProps:o,direction:S,in:u,className:f,...c,__css:m,children:r})})})});kq.displayName="DrawerContent";var Cq=U((e,t)=>{const{className:n,...r}=e,o=Z("chakra-modal__footer",n),s={display:"flex",alignItems:"center",justifyContent:"flex-end",...Ci().footer};return w.jsx(A.footer,{ref:t,...r,__css:s,className:o})});Cq.displayName="ModalFooter";var Pq=U((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:i}=$o();g.useEffect(()=>(i(!0),()=>i(!1)),[i]);const s=Z("chakra-modal__header",n),l={flex:0,...Ci().header};return w.jsx(A.header,{ref:t,className:s,id:o,...r,__css:l})});Pq.displayName="ModalHeader";var Eq=A(Xr.div),Tq=U((e,t)=>{const{className:n,transition:r,motionProps:o,...i}=e,s=Z("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Ci().overlay},{motionPreset:u}=$o(),d=o||(u==="none"?{}:vT);return w.jsx(Eq,{...d,__css:l,ref:t,className:s,...i})});Tq.displayName="ModalOverlay";var _q=U((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:i}=$o();g.useEffect(()=>(i(!0),()=>i(!1)),[i]);const s=Z("chakra-modal__body",n),a=Ci();return w.jsx(A.div,{ref:t,className:s,id:o,...r,__css:a.body})});_q.displayName="ModalBody";var $q=U((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:i}=$o(),s=Z("chakra-modal__close-btn",r),a=Ci();return w.jsx(D0,{ref:t,__css:a.closeButton,className:s,onClick:Ee(n,l=>{l.stopPropagation(),i()}),...o})});$q.displayName="ModalCloseButton";var Oq=A("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Oq.displayName="CircularProgressLabel";var xv=e=>w.jsx(A.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});xv.displayName="Circle";function Rq(e,t,n){return(e-t)*100/(n-t)}var Mq=Xn({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Iq=Xn({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});Xn({"0%":{left:"-40%"},"100%":{left:"100%"}});Xn({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function Aq(e){const{value:t=0,min:n,max:r,valueText:o,getValueText:i,isIndeterminate:s,role:a="progressbar"}=e,l=Rq(t,n,r);return{bind:{"data-indeterminate":s?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":s?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof i=="function"?i(t,l):o})(),role:a},percent:l,value:t}}var N_=e=>{const{size:t,isIndeterminate:n,...r}=e;return w.jsx(A.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Iq} 2s linear infinite`:void 0},...r})};N_.displayName="Shape";var Dq=U((e,t)=>{var n;const{size:r="48px",max:o=100,min:i=0,valueText:s,getValueText:a,value:l,capIsRound:u,children:c,thickness:d="10px",color:f="#0078d4",trackColor:p="#edebe9",isIndeterminate:m,...h}=e,S=Aq({min:i,max:o,value:l,valueText:s,getValueText:a,isIndeterminate:m}),v=m?void 0:((n=S.percent)!=null?n:0)*2.64,y=v==null?void 0:`${v} ${264-v}`,b=m?{css:{animation:`${Mq} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:y,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},x={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:r};return w.jsxs(A.div,{ref:t,className:"chakra-progress",...S.bind,...h,__css:x,children:[w.jsxs(N_,{size:r,isIndeterminate:m,children:[w.jsx(xv,{stroke:p,strokeWidth:d,className:"chakra-progress__track"}),w.jsx(xv,{stroke:f,strokeWidth:d,className:"chakra-progress__indicator",strokeLinecap:u?"round":void 0,opacity:S.value===0&&!m?0:void 0,...b})]}),c]})});Dq.displayName="CircularProgress";function Fq(){const e=g.useRef(!0);return g.useEffect(()=>{e.current=!1},[]),e.current}function Lq(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var Nq=A("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),wv=Y("skeleton-start-color"),kv=Y("skeleton-end-color"),Vq=Xn({from:{opacity:0},to:{opacity:1}}),zq=Xn({from:{borderColor:wv.reference,background:wv.reference},to:{borderColor:kv.reference,background:kv.reference}}),Bq=U((e,t)=>{const n={...e,fadeDuration:typeof e.fadeDuration=="number"?e.fadeDuration:.4,speed:typeof e.speed=="number"?e.speed:.8},r=en("Skeleton",n),o=Fq(),{startColor:i="",endColor:s="",isLoaded:a,fadeDuration:l,speed:u,className:c,fitContent:d,...f}=Ye(n),[p,m]=S3("colors",[i,s]),h=Lq(a),S=Z("chakra-skeleton",c),v={...p&&{[wv.variable]:p},...m&&{[kv.variable]:m}};if(a){const y=o||h?"none":`${Vq} ${l}s`;return w.jsx(A.div,{ref:t,className:S,__css:{animation:y},...f})}return w.jsx(Nq,{ref:t,className:S,...f,__css:{width:d?"fit-content":void 0,...r,...v,_dark:{...r._dark,...v},animation:`${u}s linear infinite alternate ${zq}`}})});Bq.displayName="Skeleton";var[jq,Pi]=Ge({name:"StepContext"}),[Hq,qs]=jN("Stepper"),Eee=U(function(t,n){const{status:r}=Pi(),o=qs();return w.jsx(A.h3,{ref:n,"data-status":r,...t,__css:o.title,className:Z("chakra-step__title",t.className)})}),Tee=U(function(t,n){const{orientation:r,status:o,showLastSeparator:i}=Pi(),s=qs();return w.jsx(A.div,{ref:n,"data-status":o,"data-orientation":r,"data-stretch":ce(i),__css:s.step,...t,className:Z("chakra-step",t.className)})}),_ee=U(function(t,n){const r=ut("Stepper",t),{children:o,index:i,orientation:s="horizontal",showLastSeparator:a=!1,...l}=Ye(t),u=g.Children.toArray(o),c=u.length;function d(f){return fi?"incomplete":"active"}return w.jsx(A.div,{ref:n,"aria-label":"Progress","data-orientation":s,...l,__css:r.stepper,className:Z("chakra-stepper",t.className),children:w.jsx(Hq,{value:r,children:u.map((f,p)=>w.jsx(jq,{value:{index:p,status:d(p),orientation:s,showLastSeparator:a,count:c,isFirst:p===0,isLast:p===c-1},children:f},p))})})});function $ee(e={}){const{index:t=0,count:n}=e,[r,o]=g.useState(t),i=typeof n=="number"?n-1:0,s=r/i;return{activeStep:r,setActiveStep:o,activeStepPercent:s,isActiveStep(a){return a===r},isCompleteStep(a){return ar},getStatus(a){return ar?"incomplete":"active"},goToNext(){o(a=>typeof n=="number"?Math.min(n,a+1):a+1)},goToPrevious(){o(a=>Math.max(0,a-1))}}}function Oee(e){const{complete:t,incomplete:n,active:r}=e,o=Pi();let i=null;switch(o.status){case"complete":i=Kt(t,o);break;case"incomplete":i=Kt(n,o);break;case"active":i=Kt(r,o);break}return i?w.jsx(w.Fragment,{children:i}):null}function Wq(e){return w.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 20 20","aria-hidden":"true",height:"1em",width:"1em",...e,children:w.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}function Ree(e){const{status:t}=Pi(),n=qs(),r=t==="complete"?Wq:void 0;return w.jsx(Qn,{as:r,__css:n.icon,...e,className:Z("chakra-step__icon",e.className)})}var Mee=U(function(t,n){const{children:r,...o}=t,{status:i,index:s}=Pi(),a=qs();return w.jsx(A.div,{ref:n,"data-status":i,__css:a.number,...o,className:Z("chakra-step__number",t.className),children:r||s+1})});function Iee(e){const{status:t}=Pi(),n=qs();return w.jsx(A.div,{"data-status":t,...e,__css:n.indicator,className:Z("chakra-step__indicator",e.className)})}var Aee=U(function(t,n){const{orientation:r,status:o,isLast:i,showLastSeparator:s}=Pi(),a=qs();return i&&!s?null:w.jsx(A.div,{ref:n,role:"separator","data-orientation":r,"data-status":o,__css:a.separator,...t,className:Z("chakra-step__separator",t.className)})}),[Uq,tu]=Ge({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "
" `}),qq=U((e,t)=>{const n=ut("Table",e),{className:r,layout:o,...i}=Ye(e);return w.jsx(Uq,{value:n,children:w.jsx(A.table,{ref:t,__css:{tableLayout:o,...n.table},className:Z("chakra-table",r),...i})})});qq.displayName="Table";var Dee=U((e,t)=>{const n=tu();return w.jsx(A.thead,{...e,ref:t,__css:n.thead})}),Fee=U((e,t)=>{const n=tu();return w.jsx(A.tr,{...e,ref:t,__css:n.tr})}),Lee=U((e,t)=>{const n=tu();return w.jsx(A.tbody,{...e,ref:t,__css:n.tbody})}),Nee=U(({isNumeric:e,...t},n)=>{const r=tu();return w.jsx(A.td,{...t,ref:n,__css:r.td,"data-is-numeric":e})}),Vee=U(({isNumeric:e,...t},n)=>{const r=tu();return w.jsx(A.th,{...t,ref:n,__css:r.th,"data-is-numeric":e})}),[Kq,Gq,Yq,Xq]=hT();function Qq(e){var t;const{defaultIndex:n,onChange:r,index:o,isManual:i,isLazy:s,lazyBehavior:a="unmount",orientation:l="horizontal",direction:u="ltr",...c}=e,[d,f]=g.useState(n??0),[p,m]=mT({defaultValue:n??0,value:o,onChange:r});g.useEffect(()=>{o!=null&&f(o)},[o]);const h=Yq(),S=g.useId();return{id:`tabs-${(t=e.id)!=null?t:S}`,selectedIndex:p,focusedIndex:d,setSelectedIndex:m,setFocusedIndex:f,isManual:i,isLazy:s,lazyBehavior:a,orientation:l,descendants:h,direction:u,htmlProps:c}}var[Zq,Hf]=Ge({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function Jq(e){const{focusedIndex:t,orientation:n,direction:r}=Hf(),o=Gq(),i=g.useCallback(s=>{const a=()=>{var y;const b=o.nextEnabled(t);b&&((y=b.node)==null||y.focus())},l=()=>{var y;const b=o.prevEnabled(t);b&&((y=b.node)==null||y.focus())},u=()=>{var y;const b=o.firstEnabled();b&&((y=b.node)==null||y.focus())},c=()=>{var y;const b=o.lastEnabled();b&&((y=b.node)==null||y.focus())},d=n==="horizontal",f=n==="vertical",p=s.key,m=r==="ltr"?"ArrowLeft":"ArrowRight",h=r==="ltr"?"ArrowRight":"ArrowLeft",v={[m]:()=>d&&l(),[h]:()=>d&&a(),ArrowDown:()=>f&&a(),ArrowUp:()=>f&&l(),Home:u,End:c}[p];v&&(s.preventDefault(),v(s))},[o,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:Ee(e.onKeyDown,i)}}function eK(e){const{isDisabled:t=!1,isFocusable:n=!1,...r}=e,{setSelectedIndex:o,isManual:i,id:s,setFocusedIndex:a,selectedIndex:l}=Hf(),{index:u,register:c}=Xq({disabled:t&&!n}),d=u===l,f=()=>{o(u)},p=()=>{a(u),!i&&!(t&&n)&&o(u)};return{...GH({...r,ref:mn(c,e.ref),isDisabled:t,isFocusable:n,onClick:Ee(e.onClick,f)}),id:V_(s,u),role:"tab",tabIndex:d?0:-1,type:"button","aria-selected":d,"aria-controls":z_(s,u),onFocus:t?void 0:Ee(e.onFocus,p)}}var[tK,nK]=Ge({});function rK(e){const t=Hf(),{id:n,selectedIndex:r}=t,i=F0(e.children).map((s,a)=>g.createElement(tK,{key:a,value:{isSelected:a===r,id:z_(n,a),tabId:V_(n,a),selectedIndex:r}},s));return{...e,children:i}}function oK(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:o}=Hf(),{isSelected:i,id:s,tabId:a}=nK(),l=g.useRef(!1);i&&(l.current=!0);const u=bU({wasSelected:l.current,isSelected:i,enabled:r,mode:o});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":a,hidden:!i,id:s}}function V_(e,t){return`${e}--tab-${t}`}function z_(e,t){return`${e}--tabpanel-${t}`}var[iK,Wf]=Ge({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),sK=U(function(t,n){const r=ut("Tabs",t),{children:o,className:i,...s}=Ye(t),{htmlProps:a,descendants:l,...u}=Qq(s),c=g.useMemo(()=>u,[u]),{isFitted:d,...f}=a,p={position:"relative",...r.root};return w.jsx(Kq,{value:l,children:w.jsx(Zq,{value:c,children:w.jsx(iK,{value:r,children:w.jsx(A.div,{className:Z("chakra-tabs",i),ref:n,...f,__css:p,children:o})})})})});sK.displayName="Tabs";var aK=U(function(t,n){const r=Jq({...t,ref:n}),i={display:"flex",...Wf().tablist};return w.jsx(A.div,{...r,className:Z("chakra-tabs__tablist",t.className),__css:i})});aK.displayName="TabList";var lK=U(function(t,n){const r=oK({...t,ref:n}),o=Wf();return w.jsx(A.div,{outline:"0",...r,className:Z("chakra-tabs__tab-panel",t.className),__css:o.tabpanel})});lK.displayName="TabPanel";var uK=U(function(t,n){const r=rK(t),o=Wf();return w.jsx(A.div,{...r,width:"100%",ref:n,className:Z("chakra-tabs__tab-panels",t.className),__css:o.tabpanels})});uK.displayName="TabPanels";var cK=U(function(t,n){const r=Wf(),o=eK({...t,ref:n}),i={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return w.jsx(A.button,{...o,className:Z("chakra-tabs__tab",t.className),__css:i})});cK.displayName="Tab";function dK(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var fK=["h","minH","height","minHeight"],pK=U((e,t)=>{const n=en("Textarea",e),{className:r,rows:o,...i}=Ye(e),s=L0(i),a=o?dK(n,fK):n;return w.jsx(A.textarea,{ref:t,rows:o,...s,className:Z("chakra-textarea",r),__css:a})});pK.displayName="Textarea";var hK={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Cv=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},Ec=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function mK(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:i,closeOnPointerDown:s=o,closeOnEsc:a=!0,onOpen:l,onClose:u,placement:c,id:d,isOpen:f,defaultIsOpen:p,arrowSize:m=10,arrowShadowColor:h,arrowPadding:S,modifiers:v,isDisabled:y,gutter:b,offset:x,direction:k,...P}=e,{isOpen:C,onOpen:E,onClose:_}=k_({isOpen:f,defaultIsOpen:p,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:M,getArrowInnerProps:F,getArrowProps:W}=w_({enabled:C,placement:c,arrowPadding:S,modifiers:v,gutter:b,offset:x,direction:k}),re=g.useId(),N=`tooltip-${d??re}`,R=g.useRef(null),O=g.useRef(),D=g.useCallback(()=>{O.current&&(clearTimeout(O.current),O.current=void 0)},[]),V=g.useRef(),oe=g.useCallback(()=>{V.current&&(clearTimeout(V.current),V.current=void 0)},[]),B=g.useCallback(()=>{oe(),_()},[_,oe]),ee=vK(R,B),j=g.useCallback(()=>{if(!y&&!O.current){C&&ee();const pe=Ec(R);O.current=pe.setTimeout(E,t)}},[ee,y,C,E,t]),te=g.useCallback(()=>{D();const pe=Ec(R);V.current=pe.setTimeout(B,n)},[n,B,D]),ae=g.useCallback(()=>{C&&r&&te()},[r,te,C]),we=g.useCallback(()=>{C&&s&&te()},[s,te,C]),Se=g.useCallback(pe=>{C&&pe.key==="Escape"&&te()},[C,te]);wc(()=>Cv(R),"keydown",a?Se:void 0),wc(()=>{if(!i)return null;const pe=R.current;if(!pe)return null;const tt=t_(pe);return tt.localName==="body"?Ec(R):tt},"scroll",()=>{C&&i&&B()},{passive:!0,capture:!0}),g.useEffect(()=>{y&&(D(),C&&_())},[y,C,_,D]),g.useEffect(()=>()=>{D(),oe()},[D,oe]),wc(()=>R.current,"pointerleave",te);const xt=g.useCallback((pe={},tt=null)=>({...pe,ref:mn(R,tt,$),onPointerEnter:Ee(pe.onPointerEnter,ne=>{ne.pointerType!=="touch"&&j()}),onClick:Ee(pe.onClick,ae),onPointerDown:Ee(pe.onPointerDown,we),onFocus:Ee(pe.onFocus,j),onBlur:Ee(pe.onBlur,te),"aria-describedby":C?N:void 0}),[j,te,we,C,N,ae,$]),Ln=g.useCallback((pe={},tt=null)=>M({...pe,style:{...pe.style,[mt.arrowSize.var]:m?`${m}px`:void 0,[mt.arrowShadowColor.var]:h}},tt),[M,m,h]),Bt=g.useCallback((pe={},tt=null)=>{const Sn={...pe.style,position:"relative",transformOrigin:mt.transformOrigin.varRef};return{ref:tt,...P,...pe,id:N,role:"tooltip",style:Sn}},[P,N]);return{isOpen:C,show:j,hide:te,getTriggerProps:xt,getTooltipProps:Bt,getTooltipPositionerProps:Ln,getArrowProps:W,getArrowInnerProps:F}}var yh="chakra-ui:close-tooltip";function vK(e,t){return g.useEffect(()=>{const n=Cv(e);return n.addEventListener(yh,t),()=>n.removeEventListener(yh,t)},[t,e]),()=>{const n=Cv(e),r=Ec(e);n.dispatchEvent(new r.CustomEvent(yh))}}function gK(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function yK(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var bK=A(Xr.div),SK=U((e,t)=>{var n,r;const o=en("Tooltip",e),i=Ye(e),s=Yr(),{children:a,label:l,shouldWrapChildren:u,"aria-label":c,hasArrow:d,bg:f,portalProps:p,background:m,backgroundColor:h,bgColor:S,motionProps:v,...y}=i,b=(r=(n=m??h)!=null?n:f)!=null?r:S;if(b){o.bg=b;const M=zM(s,"colors",b);o[mt.arrowBg.var]=M}const x=mK({...y,direction:s.direction}),k=typeof a=="string"||u;let P;if(k)P=w.jsx(A.span,{display:"inline-block",tabIndex:0,...x.getTriggerProps(),children:a});else{const M=g.Children.only(a);P=g.cloneElement(M,x.getTriggerProps(M.props,M.ref))}const C=!!c,E=x.getTooltipProps({},t),_=C?gK(E,["role","id"]):E,$=yK(E,["role","id"]);return l?w.jsxs(w.Fragment,{children:[P,w.jsx(Do,{children:x.isOpen&&w.jsx(Ws,{...p,children:w.jsx(A.div,{...x.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:w.jsxs(bK,{variants:hK,initial:"exit",animate:"enter",exit:"exit",...v,..._,__css:o,children:[l,C&&w.jsx(A.span,{srOnly:!0,...$,children:c}),d&&w.jsx(A.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:w.jsx(A.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):w.jsx(w.Fragment,{children:a})});SK.displayName="Tooltip";const Sr=Object.create(null);Sr.open="0";Sr.close="1";Sr.ping="2";Sr.pong="3";Sr.message="4";Sr.upgrade="5";Sr.noop="6";const Tc=Object.create(null);Object.keys(Sr).forEach(e=>{Tc[Sr[e]]=e});const Pv={type:"error",data:"parser error"},B_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",j_=typeof ArrayBuffer=="function",H_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ay=({type:e,data:t},n,r)=>B_&&t instanceof Blob?n?r(t):Qx(t,r):j_&&(t instanceof ArrayBuffer||H_(t))?n?r(t):Qx(new Blob([t]),r):r(Sr[e]+(t||"")),Qx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Zx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let bh;function xK(e,t){if(B_&&e.data instanceof Blob)return e.data.arrayBuffer().then(Zx).then(t);if(j_&&(e.data instanceof ArrayBuffer||H_(e.data)))return t(Zx(e.data));ay(e,!1,n=>{bh||(bh=new TextEncoder),t(bh.encode(n))})}const Jx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ea=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,o=0,i,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[o++]=(s&15)<<4|a>>2,c[o++]=(a&3)<<6|l&63;return u},kK=typeof ArrayBuffer=="function",ly=(e,t)=>{if(typeof e!="string")return{type:"message",data:W_(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CK(e.substring(1),t)}:Tc[n]?e.length>1?{type:Tc[n],data:e.substring(1)}:{type:Tc[n]}:Pv},CK=(e,t)=>{if(kK){const n=wK(e);return W_(n,t)}else return{base64:!0,data:e}},W_=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},U_="",PK=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((i,s)=>{ay(i,!1,a=>{r[s]=a,++o===n&&t(r.join(U_))})})},EK=(e,t)=>{const n=e.split(U_),r=[];for(let o=0;o{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Sh;function Lu(e){return e.reduce((t,n)=>t+n.length,0)}function Nu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;oMath.pow(2,21)-1){a.enqueue(Pv);break}o=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Lu(n)e){a.enqueue(Pv);break}}}})}const q_=4;function Je(e){if(e)return $K(e)}function $K(e){for(var t in Je.prototype)e[t]=Je.prototype[t];return e}Je.prototype.on=Je.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Je.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Je.prototype.off=Je.prototype.removeListener=Je.prototype.removeAllListeners=Je.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const OK=Tn.setTimeout,RK=Tn.clearTimeout;function Uf(e,t){t.useNativeTimers?(e.setTimeoutFn=OK.bind(Tn),e.clearTimeoutFn=RK.bind(Tn)):(e.setTimeoutFn=Tn.setTimeout.bind(Tn),e.clearTimeoutFn=Tn.clearTimeout.bind(Tn))}const MK=1.33;function IK(e){return typeof e=="string"?AK(e):Math.ceil((e.byteLength||e.size)*MK)}function AK(e){let t=0,n=0;for(let r=0,o=e.length;r=57344?n+=3:(r++,n+=4);return n}function DK(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function FK(e){let t={},n=e.split("&");for(let r=0,o=n.length;r0);return t}function Y_(){const e=nw(+new Date);return e!==tw?(ew=0,tw=e):e+"."+nw(ew++)}for(;Vu{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};EK(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,PK(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Y_()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new yr(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class yr extends Je{constructor(t,n){super(),Uf(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=K_(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Q_(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=yr.requestsCount++,yr.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=zK,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete yr.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}yr.requestsCount=0;yr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rw);else if(typeof addEventListener=="function"){const e="onpagehide"in Tn?"pagehide":"unload";addEventListener(e,rw,!1)}}function rw(){for(let e in yr.requests)yr.requests.hasOwnProperty(e)&&yr.requests[e].abort()}const cy=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),zu=Tn.WebSocket||Tn.MozWebSocket,ow=!0,HK="arraybuffer",iw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WK extends uy{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=iw?{}:K_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ow&&!iw?n?new zu(t,n):new zu(t):new zu(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{ow&&this.ws.send(i)}catch{}o&&cy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Y_()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!zu}}class UK extends uy{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=_K(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=TK();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{o&&cy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const qK={websocket:WK,webtransport:UK,polling:jK},KK=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,GK=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Tv(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=KK.exec(e||""),i={},s=14;for(;s--;)i[GK[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=YK(i,i.path),i.queryKey=XK(i,i.query),i}function YK(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function XK(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}let Z_=class Fi extends Je{constructor(t,n={}){super(),this.binaryType=HK,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Tv(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=Tv(n.host).host),Uf(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FK(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=q_,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new qK[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Fi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Fi.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const s=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){s("transport closed")}function l(){s("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",o),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Fi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Fi.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const o=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,J_=Object.prototype.toString,eG=typeof Blob=="function"||typeof Blob<"u"&&J_.call(Blob)==="[object BlobConstructor]",tG=typeof File=="function"||typeof File<"u"&&J_.call(File)==="[object FileConstructor]";function dy(e){return ZK&&(e instanceof ArrayBuffer||JK(e))||eG&&e instanceof Blob||tG&&e instanceof File}function _c(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(i),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,o)=>{const i=(s,a)=>s?o(s):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:de.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case de.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case de.EVENT:case de.BINARY_EVENT:this.onevent(t);break;case de.ACK:case de.BINARY_ACK:this.onack(t);break;case de.DISCONNECT:this.ondisconnect();break;case de.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:de.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:de.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ks.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Ks.prototype.reset=function(){this.attempts=0};Ks.prototype.setMin=function(e){this.ms=e};Ks.prototype.setMax=function(e){this.max=e};Ks.prototype.setJitter=function(e){this.jitter=e};class Ov extends Je{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Uf(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||lG;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Z_(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=jn(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=jn(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(jn(t,"ping",this.onping.bind(this)),jn(t,"data",this.ondata.bind(this)),jn(t,"error",this.onerror.bind(this)),jn(t,"close",this.onclose.bind(this)),jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){cy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new e$(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fa={};function xh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=QK(e,t.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=fa[o]&&i in fa[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Ov(r,t):(fa[o]||(fa[o]=new Ov(r,t)),l=fa[o]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(xh,{Manager:Ov,Socket:e$,io:xh,connect:xh});var t$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},aw=Un.createContext&&Un.createContext(t$),cG=["attr","size","title"];function dG(e,t){if(e==null)return{};var n=fG(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Td(){return Td=Object.assign?Object.assign.bind():function(e){for(var t=1;tUn.createElement(t.tag,_d({key:n},t.attr),n$(t.child)))}function Xe(e){return t=>Un.createElement(vG,Td({attr:_d({},e.attr)},t),n$(e.child))}function vG(e){var t=n=>{var{attr:r,size:o,title:i}=e,s=dG(e,cG),a=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),Un.createElement("svg",Td({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:_d(_d({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&Un.createElement("title",null,i),e.children)};return aw!==void 0?Un.createElement(aw.Consumer,null,n=>t(n)):t(t$)}function zee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"},child:[]}]})(e)}function Bee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m19.17 12-4.58-4.59L16 6l6 6-3.59 3.59L17 14.17 19.17 12zM1.39 4.22l4.19 4.19L2 12l6 6 1.41-1.41L4.83 12 7 9.83l12.78 12.78 1.41-1.41L2.81 2.81 1.39 4.22z"},child:[]}]})(e)}function jee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(e)}function Hee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(e)}function Wee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(e)}function Uee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"},child:[]}]})(e)}function qee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"},child:[]}]})(e)}function Kee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 13v3c0 1.1-.9 2-2 2h-3l1 1v2H6v-2l1-1H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8v2H4v11h16v-3h2zm-7 2-5-5h4V3h2v7h4l-5 5z"},child:[]}]})(e)}function Gee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 4V2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1s-1-.45-1-1zm7.36 3.05 1.41-1.42a.996.996 0 1 0-1.41-1.41l-1.41 1.42a.996.996 0 1 0 1.41 1.41zM22 11h-2c-.55 0-1 .45-1 1s.45 1 1 1h2c.55 0 1-.45 1-1s-.45-1-1-1zm-10 8c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1zM5.64 7.05 4.22 5.64c-.39-.39-.39-1.03 0-1.41s1.03-.39 1.41 0l1.41 1.41c.39.39.39 1.03 0 1.41s-1.02.39-1.4 0zm11.31 9.9a.996.996 0 0 0 0 1.41l1.41 1.41c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.41-1.41a.996.996 0 0 0-1.41 0zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm3.64 6.78 1.41-1.41c.39-.39.39-1.03 0-1.41s-1.03-.39-1.41 0l-1.41 1.41a.996.996 0 0 0 0 1.41c.38.39 1.02.39 1.41 0zM12 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z"},child:[]}]})(e)}function Yee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9 1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"},child:[]}]})(e)}function Xee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.06 8.94 5 8l2.06-.94L8 5l.94 2.06L11 8l-2.06.94L8 11l-.94-2.06zM8 21l.94-2.06L11 18l-2.06-.94L8 15l-.94 2.06L5 18l2.06.94L8 21zm-3.63-8.63L3 13l1.37.63L5 15l.63-1.37L7 13l-1.37-.63L5 11l-.63 1.37zM12 12c0-3.09 1.38-5.94 3.44-8H12V2h7v7h-2V5.28c-1.8 1.74-3 4.2-3 6.72 0 3.32 2.1 6.36 5 7.82V22c-4.09-1.59-7-5.65-7-10z"},child:[]}]})(e)}function Qee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"m400 148-21.12-24.57A191.43 191.43 0 0 0 240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 0 0 181.07-128"},child:[]},{tag:"path",attr:{d:"M464 97.42V208a16 16 0 0 1-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"},child:[]}]})(e)}function Zee(e){return Xe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 6V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2H4"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"circle",attr:{cx:"6",cy:"14",r:"3"},child:[]},{tag:"path",attr:{d:"M6 10v1"},child:[]},{tag:"path",attr:{d:"M6 17v1"},child:[]},{tag:"path",attr:{d:"M10 14H9"},child:[]},{tag:"path",attr:{d:"M3 14H2"},child:[]},{tag:"path",attr:{d:"m9 11-.88.88"},child:[]},{tag:"path",attr:{d:"M3.88 16.12 3 17"},child:[]},{tag:"path",attr:{d:"m9 17-.88-.88"},child:[]},{tag:"path",attr:{d:"M3.88 11.88 3 11"},child:[]}]})(e)}var Jee=ki({displayName:"TimeIcon",path:w.jsxs("g",{fill:"currentColor",children:[w.jsx("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),w.jsx("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})}),ete=ki({displayName:"RepeatIcon",path:w.jsxs("g",{fill:"currentColor",children:[w.jsx("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),w.jsx("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})}),tte=ki({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:w.jsx("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})}),nte=ki({displayName:"ExternalLinkIcon",path:w.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[w.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),w.jsx("path",{d:"M15 3h6v6"}),w.jsx("path",{d:"M10 14L21 3"})]})}),rte=ki({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),ote=ki({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),ite=ki({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});function ste(e){return Xe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},child:[]}]})(e)}function ate(e){return Xe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"},child:[]}]})(e)}function lte(e){return Xe({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"},child:[]}]})(e)}var Gs={};/** * @license React * react-dom-server-legacy.browser.production.min.js * @@ -413,9 +413,9 @@ Error generating stack: `+i.message+` `),dY=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Nw=new Map;function or(e){var t=Nw.get(e);if(t===void 0){if(!dY.test(e))throw Error(se(65,e));t=L("<"+e),Nw.set(e,t)}return t}var fY=L("");function pY(e,t,n,r,o){switch(t){case"select":e.push(or("select"));var i=null,s=null;for(c in n)if(Ht.call(n,c)){var a=n[c];if(a!=null)switch(c){case"children":i=a;break;case"dangerouslySetInnerHTML":s=a;break;case"defaultValue":case"value":break;default:nn(e,r,c,a)}}return e.push(ro),Dc(e,s,i),i;case"option":s=o.selectedValue,e.push(or("option"));var l=a=null,u=null,c=null;for(i in n)if(Ht.call(n,i)){var d=n[i];if(d!=null)switch(i){case"children":a=d;break;case"selected":u=d;break;case"dangerouslySetInnerHTML":c=d;break;case"value":l=d;default:nn(e,r,i,d)}}if(s!=null)if(n=l!==null?""+l:cY(a),Fv(s)){for(r=0;r"),vY=L(''),yY=L(""),bY=L(''),xY=L(""),wY=L(""),kY=L("");function Vw(e,t,n){if(q(e,bY),n===null)throw Error(se(395));return q(e,n),Ie(e,SY)}var TY=L('"),OY=L('"),IY=L('"),FY=L('
'),NY=L(""),VY=L(''),BY=L(""),jY=L(''),WY=L(""),UY=L(''),KY=L("");function GY(e,t,n,r){switch(n.insertionMode){case 0:case 1:return q(e,TY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,_Y);case 2:return q(e,OY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,RY);case 3:return q(e,IY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,AY);case 4:return q(e,FY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,LY);case 5:return q(e,VY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,zY);case 6:return q(e,jY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,HY);case 7:return q(e,UY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,qY);default:throw Error(se(397))}}function YY(e,t){switch(t.insertionMode){case 0:case 1:return Ie(e,$Y);case 2:return Ie(e,MY);case 3:return Ie(e,DY);case 4:return Ie(e,NY);case 5:return Ie(e,BY);case 6:return Ie(e,WY);case 7:return Ie(e,KY);default:throw Error(se(397))}}var XY=L('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),QY=L('$RS("'),ZY=L('","'),JY=L('")<\/script>'),eX=L('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),tX=L('$RC("'),nX=L('","'),rX=L('")<\/script>'),oX=L('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),iX=L('$RX("'),sX=L('"'),aX=L(")<\/script>"),_h=L(","),lX=/[<\u2028\u2029]/g;function $h(e){return JSON.stringify(e).replace(lX,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var el=Object.assign,uX=Symbol.for("react.element"),M$=Symbol.for("react.portal"),I$=Symbol.for("react.fragment"),A$=Symbol.for("react.strict_mode"),D$=Symbol.for("react.profiler"),F$=Symbol.for("react.provider"),L$=Symbol.for("react.context"),N$=Symbol.for("react.forward_ref"),V$=Symbol.for("react.suspense"),z$=Symbol.for("react.suspense_list"),B$=Symbol.for("react.memo"),Py=Symbol.for("react.lazy"),cX=Symbol.for("react.scope"),dX=Symbol.for("react.debug_trace_mode"),fX=Symbol.for("react.legacy_hidden"),pX=Symbol.for("react.default_value"),zw=Symbol.iterator;function Lv(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 I$:return"Fragment";case M$:return"Portal";case D$:return"Profiler";case A$:return"StrictMode";case V$:return"Suspense";case z$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L$:return(e.displayName||"Context")+".Consumer";case F$:return(e._context.displayName||"Context")+".Provider";case N$:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B$:return t=e.displayName||null,t!==null?t:Lv(e.type)||"Memo";case Py:t=e._payload,e=e._init;try{return Lv(e(t))}catch{}}return null}var j$={};function Bw(e,t){if(e=e.contextTypes,!e)return j$;var n={},r;for(r in e)n[r]=t[r];return n}var ni=null;function Yf(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(se(401))}else{if(n===null)throw Error(se(401));Yf(e,n)}t.context._currentValue=t.value}}function H$(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&H$(e)}function W$(e){var t=e.parent;t!==null&&W$(t),e.context._currentValue=e.value}function U$(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(se(402));e.depth===t.depth?Yf(e,t):U$(e,t)}function q$(e,t){var n=t.parent;if(n===null)throw Error(se(402));e.depth===n.depth?Yf(e,n):q$(e,n),t.context._currentValue=t.value}function Ad(e){var t=ni;t!==e&&(t===null?W$(e):e===null?H$(t):t.depth===e.depth?Yf(t,e):t.depth>e.depth?U$(t,e):q$(t,e),ni=e)}var jw={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Hw(e,t,n,r){var o=e.state!==void 0?e.state:null;e.updater=jw,e.props=n,e.state=o;var i={queue:[],replace:!1};e._reactInternals=i;var s=t.contextType;if(e.context=typeof s=="object"&&s!==null?s._currentValue:r,s=t.getDerivedStateFromProps,typeof s=="function"&&(s=s(n,o),o=s==null?o:el({},o,s),e.state=o),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&jw.enqueueReplaceState(e,e.state,null),i.queue!==null&&0>=s,o-=s,{id:1<<32-Fc(t)+o|n<>>=0,e===0?32:31-(mX(e)/vX|0)|0}function yX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bX=typeof Object.is=="function"?Object.is:yX,qr=null,Ey=null,Lc=null,_e=null,$a=!1,Dd=!1,Ll=0,ho=null,Xf=0;function Ko(){if(qr===null)throw Error(se(321));return qr}function Ww(){if(0e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),Vw(t,e.responseState,r.id),Wu(e,t,n);else{if(Ie(t,yY),n=r.completedSegments,n.length!==1)throw Error(se(391));Qf(e,t,n[0])}return Ie(t,wY)}function Zw(e,t,n){return GY(t,e.responseState,n.formatContext,n.id),Qf(e,t,n),YY(t,n.formatContext)}function Jw(e,t,n){for(var r=n.completedSegments,o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n"),vY=L(''),yY=L(""),bY=L(''),xY=L(""),wY=L(""),kY=L("");function Vw(e,t,n){if(q(e,bY),n===null)throw Error(se(395));return q(e,n),Ie(e,SY)}var TY=L('"),OY=L('"),IY=L('"),FY=L(''),NY=L(""),VY=L(''),BY=L(""),jY=L(''),WY=L(""),UY=L(''),KY=L("");function GY(e,t,n,r){switch(n.insertionMode){case 0:case 1:return q(e,TY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,_Y);case 2:return q(e,OY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,RY);case 3:return q(e,IY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,AY);case 4:return q(e,FY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,LY);case 5:return q(e,VY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,zY);case 6:return q(e,jY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,HY);case 7:return q(e,UY),q(e,t.segmentPrefix),q(e,le(r.toString(16))),Ie(e,qY);default:throw Error(se(397))}}function YY(e,t){switch(t.insertionMode){case 0:case 1:return Ie(e,$Y);case 2:return Ie(e,MY);case 3:return Ie(e,DY);case 4:return Ie(e,NY);case 5:return Ie(e,BY);case 6:return Ie(e,WY);case 7:return Ie(e,KY);default:throw Error(se(397))}}var XY=L('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),QY=L('$RS("'),ZY=L('","'),JY=L('")<\/script>'),eX=L('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),tX=L('$RC("'),nX=L('","'),rX=L('")<\/script>'),oX=L('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),iX=L('$RX("'),sX=L('"'),aX=L(")<\/script>"),_h=L(","),lX=/[<\u2028\u2029]/g;function $h(e){return JSON.stringify(e).replace(lX,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var el=Object.assign,uX=Symbol.for("react.element"),M$=Symbol.for("react.portal"),I$=Symbol.for("react.fragment"),A$=Symbol.for("react.strict_mode"),D$=Symbol.for("react.profiler"),F$=Symbol.for("react.provider"),L$=Symbol.for("react.context"),N$=Symbol.for("react.forward_ref"),V$=Symbol.for("react.suspense"),z$=Symbol.for("react.suspense_list"),B$=Symbol.for("react.memo"),Py=Symbol.for("react.lazy"),cX=Symbol.for("react.scope"),dX=Symbol.for("react.debug_trace_mode"),fX=Symbol.for("react.legacy_hidden"),pX=Symbol.for("react.default_value"),zw=Symbol.iterator;function Lv(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 I$:return"Fragment";case M$:return"Portal";case D$:return"Profiler";case A$:return"StrictMode";case V$:return"Suspense";case z$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L$:return(e.displayName||"Context")+".Consumer";case F$:return(e._context.displayName||"Context")+".Provider";case N$:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B$:return t=e.displayName||null,t!==null?t:Lv(e.type)||"Memo";case Py:t=e._payload,e=e._init;try{return Lv(e(t))}catch{}}return null}var j$={};function Bw(e,t){if(e=e.contextTypes,!e)return j$;var n={},r;for(r in e)n[r]=t[r];return n}var ni=null;function Yf(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(se(401))}else{if(n===null)throw Error(se(401));Yf(e,n)}t.context._currentValue=t.value}}function H$(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&H$(e)}function W$(e){var t=e.parent;t!==null&&W$(t),e.context._currentValue=e.value}function U$(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(se(402));e.depth===t.depth?Yf(e,t):U$(e,t)}function q$(e,t){var n=t.parent;if(n===null)throw Error(se(402));e.depth===n.depth?Yf(e,n):q$(e,n),t.context._currentValue=t.value}function Ad(e){var t=ni;t!==e&&(t===null?W$(e):e===null?H$(t):t.depth===e.depth?Yf(t,e):t.depth>e.depth?U$(t,e):q$(t,e),ni=e)}var jw={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Hw(e,t,n,r){var o=e.state!==void 0?e.state:null;e.updater=jw,e.props=n,e.state=o;var i={queue:[],replace:!1};e._reactInternals=i;var s=t.contextType;if(e.context=typeof s=="object"&&s!==null?s._currentValue:r,s=t.getDerivedStateFromProps,typeof s=="function"&&(s=s(n,o),o=s==null?o:el({},o,s),e.state=o),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&jw.enqueueReplaceState(e,e.state,null),i.queue!==null&&0>=s,o-=s,{id:1<<32-Fc(t)+o|n<>>=0,e===0?32:31-(mX(e)/vX|0)|0}function yX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bX=typeof Object.is=="function"?Object.is:yX,qr=null,Ey=null,Lc=null,_e=null,$a=!1,Dd=!1,Ll=0,ho=null,Xf=0;function Ko(){if(qr===null)throw Error(se(321));return qr}function Ww(){if(0e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),Vw(t,e.responseState,r.id),Wu(e,t,n);else{if(Ie(t,yY),n=r.completedSegments,n.length!==1)throw Error(se(391));Qf(e,t,n[0])}return Ie(t,wY)}function Zw(e,t,n){return GY(t,e.responseState,n.formatContext,n.id),Qf(e,t,n),YY(t,n.formatContext)}function Jw(e,t,n){for(var r=n.completedSegments,o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _X=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Zf(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,i=e.defaultValue,s=i===void 0?null:i,a=e.inputValue,l=e.menuIsOpen,u=e.onChange,c=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,p=e.value,m=Zn(e,_X),h=g.useState(a!==void 0?a:n),S=st(h,2),v=S[0],y=S[1],b=g.useState(l!==void 0?l:o),x=st(b,2),k=x[0],P=x[1],C=g.useState(p!==void 0?p:s),E=st(C,2),_=E[0],$=E[1],M=g.useCallback(function(O,D){typeof u=="function"&&u(O,D),$(O)},[u]),F=g.useCallback(function(O,D){var V;typeof c=="function"&&(V=c(O,D)),y(V!==void 0?V:O)},[c]),W=g.useCallback(function(){typeof f=="function"&&f(),P(!0)},[f]),re=g.useCallback(function(){typeof d=="function"&&d(),P(!1)},[d]),H=a!==void 0?a:v,N=l!==void 0?l:k,R=p!==void 0?p:_;return G(G({},m),{},{inputValue:H,menuIsOpen:N,onChange:M,onInputChange:F,onMenuClose:re,onMenuOpen:W,value:R})}function $X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nk(e,t){for(var n=0;n({x:e,y:e});function BX(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function t4(e){return r4(e)?(e.nodeName||"").toLowerCase():"#document"}function Kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function n4(e){var t;return(t=(r4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r4(e){return e instanceof Node||e instanceof Kr(e).Node}function jX(e){return e instanceof Element||e instanceof Kr(e).Element}function Ry(e){return e instanceof HTMLElement||e instanceof Kr(e).HTMLElement}function rk(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kr(e).ShadowRoot}function o4(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=My(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function HX(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function WX(e){return["html","body","#document"].includes(t4(e))}function My(e){return Kr(e).getComputedStyle(e)}function UX(e){if(t4(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rk(e)&&e.host||n4(e);return rk(t)?t.host:t}function i4(e){const t=UX(e);return WX(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ry(t)&&o4(t)?t:i4(t)}function jd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=i4(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Kr(o);return i?t.concat(s,s.visualViewport||[],o4(o)?o:[],s.frameElement&&n?jd(s.frameElement):[]):t.concat(o,jd(o,[],n))}function qX(e){const t=My(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ry(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=zd(n)!==i||zd(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Iy(e){return jX(e)?e:e.contextElement}function ok(e){const t=Iy(e);if(!Ry(t))return Bd(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=qX(t);let s=(i?zd(n.width):n.width)/r,a=(i?zd(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const KX=Bd(0);function GX(e){const t=Kr(e);return!HX()||!t.visualViewport?KX:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function YX(e,t,n){return!1}function ik(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),i=Iy(e);let s=Bd(1);t&&(s=ok(e));const a=YX()?GX(i):Bd(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const f=Kr(i),p=r;let m=f,h=m.frameElement;for(;h&&r&&p!==m;){const S=ok(h),v=h.getBoundingClientRect(),y=My(h),b=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*S.x,x=v.top+(h.clientTop+parseFloat(y.paddingTop))*S.y;l*=S.x,u*=S.y,c*=S.x,d*=S.y,l+=b,u+=x,m=Kr(h),h=m.frameElement}}return BX({width:c,height:d,x:l,y:u})}function XX(e,t){let n=null,r;const o=n4(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p=Uu(c),m=Uu(o.clientWidth-(u+d)),h=Uu(o.clientHeight-(c+f)),S=Uu(u),y={rootMargin:-p+"px "+-m+"px "+-h+"px "+-S+"px",threshold:zX(0,VX(1,l))||1};let b=!0;function x(k){const P=k[0].intersectionRatio;if(P!==l){if(!b)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return s(!0),i}function QX(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Iy(e),c=o||i?[...u?jd(u):[],...jd(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&a?XX(u,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let m,h=l?ik(e):null;l&&S();function S(){const v=ik(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(S)}return n(),()=>{var v;c.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var jv=g.useLayoutEffect,ZX=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Hd=function(){};function JX(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function eQ(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function nQ(e){return Jf(e)?window.innerHeight:e.clientHeight}function a4(e){return Jf(e)?window.pageYOffset:e.scrollTop}function Ud(e,t){if(Jf(e)){window.scrollTo(0,t);return}e.scrollTop=t}function rQ(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function oQ(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function qu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Hd,o=a4(e),i=t-o,s=10,a=0;function l(){a+=s;var u=oQ(a,o,i,n);Ud(e,u),an.bottom?Ud(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o1?n-1:0),o=1;o=m)return{placement:"bottom",maxHeight:t};if(_>=m&&!s)return i&&qu(l,$,F),{placement:"bottom",maxHeight:t};if(!s&&_>=r||s&&C>=r){i&&qu(l,$,F);var W=s?C-x:_-x;return{placement:"bottom",maxHeight:W}}if(o==="auto"||s){var re=t,H=s?P:E;return H>=r&&(re=Math.min(H-x-a,t)),{placement:"top",maxHeight:re}}if(o==="bottom")return i&&Ud(l,$),{placement:"bottom",maxHeight:t};break;case"top":if(P>=m)return{placement:"top",maxHeight:t};if(E>=m&&!s)return i&&qu(l,M,F),{placement:"top",maxHeight:t};if(!s&&E>=r||s&&P>=r){var N=t;return(!s&&E>=r||s&&P>=r)&&(N=s?P-k:E-k),i&&qu(l,M,F),{placement:"top",maxHeight:N}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function mQ(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var u4=function(t){return t==="auto"?"bottom":t},vQ=function(t,n){var r,o=t.placement,i=t.theme,s=i.borderRadius,a=i.spacing,l=i.colors;return G((r={label:"menu"},ei(r,mQ(o),"100%"),ei(r,"position","absolute"),ei(r,"width","100%"),ei(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},c4=g.createContext(null),gQ=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,u=g.useContext(c4)||{},c=u.setPortalPlacement,d=g.useRef(null),f=g.useState(o),p=st(f,2),m=p[0],h=p[1],S=g.useState(null),v=st(S,2),y=v[0],b=v[1],x=l.spacing.controlHeight;return jv(function(){var k=d.current;if(k){var P=s==="fixed",C=a&&!P,E=hQ({maxHeight:o,menuEl:k,minHeight:r,placement:i,shouldScroll:C,isFixedPosition:P,controlHeight:x});h(E.maxHeight),b(E.placement),c==null||c(E.placement)}},[o,i,s,a,r,c,x]),n({ref:d,placerProps:G(G({},t),{},{placement:y||u4(i),maxHeight:m})})},yQ=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return X("div",K({},We(t,"menu",{menu:!0}),{ref:r},o),n)},bQ=yQ,SQ=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return G({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},xQ=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,i=t.isMulti;return X("div",K({},We(t,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:o},r),n)},d4=function(t,n){var r=t.theme,o=r.spacing.baseUnit,i=r.colors;return G({textAlign:"center"},n?{}:{color:i.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},wQ=d4,kQ=d4,CQ=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,i=Zn(t,fQ);return X("div",K({},We(G(G({},i),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},PQ=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,i=Zn(t,pQ);return X("div",K({},We(G(G({},i),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},EQ=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},TQ=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,i=t.innerProps,s=t.menuPlacement,a=t.menuPosition,l=g.useRef(null),u=g.useRef(null),c=g.useState(u4(s)),d=st(c,2),f=d[0],p=d[1],m=g.useMemo(function(){return{setPortalPlacement:p}},[]),h=g.useState(null),S=st(h,2),v=S[0],y=S[1],b=g.useCallback(function(){if(o){var C=iQ(o),E=a==="fixed"?0:window.pageYOffset,_=C[f]+E;(_!==(v==null?void 0:v.offset)||C.left!==(v==null?void 0:v.rect.left)||C.width!==(v==null?void 0:v.rect.width))&&y({offset:_,rect:C})}},[o,a,f,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);jv(function(){b()},[b]);var x=g.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&l.current&&(u.current=QX(o,l.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);jv(function(){x()},[x]);var k=g.useCallback(function(C){l.current=C,x()},[x]);if(!n&&a!=="fixed"||!v)return null;var P=X("div",K({ref:k},We(G(G({},t),{},{offset:v.offset,position:a,rect:v.rect}),"menuPortal",{"menu-portal":!0}),i),r);return X(c4.Provider,{value:m},n?Wl.createPortal(P,n):P)},_Q=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},$Q=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,i=t.isRtl;return X("div",K({},We(t,"container",{"--is-disabled":o,"--is-rtl":i}),r),n)},OQ=function(t,n){var r=t.theme.spacing,o=t.isMulti,i=t.hasValue,s=t.selectProps.controlShouldRenderValue;return G({alignItems:"center",display:o&&i&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},RQ=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,i=t.hasValue;return X("div",K({},We(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i}),r),n)},MQ=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},IQ=function(t){var n=t.children,r=t.innerProps;return X("div",K({},We(t,"indicatorsContainer",{indicators:!0}),r),n)},lk,AQ=["size"],DQ=["innerProps","isRtl","size"],FQ={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},f4=function(t){var n=t.size,r=Zn(t,AQ);return X("svg",K({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:FQ},r))},Ay=function(t){return X(f4,K({size:20},t),X("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},p4=function(t){return X(f4,K({size:20},t),X("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},h4=function(t,n){var r=t.isFocused,o=t.theme,i=o.spacing.baseUnit,s=o.colors;return G({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:i*2,":hover":{color:r?s.neutral80:s.neutral40}})},LQ=h4,NQ=function(t){var n=t.children,r=t.innerProps;return X("div",K({},We(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||X(p4,null))},VQ=h4,zQ=function(t){var n=t.children,r=t.innerProps;return X("div",K({},We(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||X(Ay,null))},BQ=function(t,n){var r=t.isDisabled,o=t.theme,i=o.spacing.baseUnit,s=o.colors;return G({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:i*2,marginTop:i*2})},jQ=function(t){var n=t.innerProps;return X("span",K({},n,We(t,"indicatorSeparator",{"indicator-separator":!0})))},HQ=Xn(lk||(lk=NX([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } -`]))),WQ=function(t,n){var r=t.isFocused,o=t.size,i=t.theme,s=i.colors,a=i.spacing.baseUnit;return G({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Rh=function(t){var n=t.delay,r=t.offset;return X("span",{css:Gg({animation:"".concat(HQ," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},UQ=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,i=o===void 0?4:o,s=Zn(t,DQ);return X("div",K({},We(G(G({},s),{},{innerProps:n,isRtl:r,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),X(Rh,{delay:0,offset:r}),X(Rh,{delay:160,offset:!0}),X(Rh,{delay:320,offset:!r}))},qQ=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.theme,s=i.colors,a=i.borderRadius,l=i.spacing;return G({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:o?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:o?s.primary:s.neutral30}})},KQ=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return X("div",K({ref:i},We(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},GQ=KQ,YQ=["data"],XQ=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},QQ=function(t){var n=t.children,r=t.cx,o=t.getStyles,i=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return X("div",K({},We(t,"group",{group:!0}),l),X(s,K({},a,{selectProps:d,theme:c,getStyles:o,getClassNames:i,cx:r}),u),X("div",null,n))},ZQ=function(t,n){var r=t.theme,o=r.colors,i=r.spacing;return G({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},JQ=function(t){var n=s4(t);n.data;var r=Zn(n,YQ);return X("div",K({},We(t,"groupHeading",{"group-heading":!0}),r))},eZ=QQ,tZ=["innerRef","isDisabled","isHidden","inputClassName"],nZ=function(t,n){var r=t.isDisabled,o=t.value,i=t.theme,s=i.spacing,a=i.colors;return G(G({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},rZ),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},m4={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},rZ={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":G({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},m4)},oZ=function(t){return G({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},m4)},iZ=function(t){var n=t.cx,r=t.value,o=s4(t),i=o.innerRef,s=o.isDisabled,a=o.isHidden,l=o.inputClassName,u=Zn(o,tZ);return X("div",K({},We(t,"input",{"input-container":!0}),{"data-value":r||""}),X("input",K({className:n({input:!0},l),ref:i,style:oZ(a),disabled:s},u)))},sZ=iZ,aZ=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors;return G({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:i/2,margin:o.baseUnit/2})},lZ=function(t,n){var r=t.theme,o=r.borderRadius,i=r.colors,s=t.cropWithEllipsis;return G({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},uZ=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors,a=t.isFocused;return G({alignItems:"center",display:"flex"},n?{}:{borderRadius:i/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},v4=function(t){var n=t.children,r=t.innerProps;return X("div",r,n)},cZ=v4,dZ=v4;function fZ(e){var t=e.children,n=e.innerProps;return X("div",K({role:"button"},n),t||X(Ay,{size:14}))}var pZ=function(t){var n=t.children,r=t.components,o=t.data,i=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return X(u,{data:o,innerProps:G(G({},We(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),i),selectProps:l},X(c,{data:o,innerProps:G({},We(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),X(d,{data:o,innerProps:G(G({},We(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},hZ=pZ,mZ=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return G({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:i?l.primary:o?l.primary25:"transparent",color:r?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:i?l.primary:l.primary50}})},vZ=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.innerRef,a=t.innerProps;return X("div",K({},We(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":i}),{ref:s,"aria-disabled":r},a),n)},gZ=vZ,yZ=function(t,n){var r=t.theme,o=r.spacing,i=r.colors;return G({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:i.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},bZ=function(t){var n=t.children,r=t.innerProps;return X("div",K({},We(t,"placeholder",{placeholder:!0}),r),n)},SZ=bZ,xZ=function(t,n){var r=t.isDisabled,o=t.theme,i=o.spacing,s=o.colors;return G({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},wZ=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return X("div",K({},We(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},kZ=wZ,CZ={ClearIndicator:zQ,Control:GQ,DropdownIndicator:NQ,DownChevron:p4,CrossIcon:Ay,Group:eZ,GroupHeading:JQ,IndicatorsContainer:IQ,IndicatorSeparator:jQ,Input:sZ,LoadingIndicator:UQ,Menu:bQ,MenuList:xQ,MenuPortal:TQ,LoadingMessage:PQ,NoOptionsMessage:CQ,MultiValue:hZ,MultiValueContainer:cZ,MultiValueLabel:dZ,MultiValueRemove:fZ,Option:gZ,Placeholder:SZ,SelectContainer:$Q,SingleValue:kZ,ValueContainer:RQ},PZ=function(t){return G(G({},CZ),t.components)},uk=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function EZ(e,t){return!!(e===t||uk(e)&&uk(t))}function TZ(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return s?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,i=t.label,s=i===void 0?"":i,a=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(h,S){return h&&h.length?"".concat(h.indexOf(S)+1," of ").concat(h.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(d(a,r),".");if(n==="menu"&&c){var f=l?" disabled":"",p="".concat(u?" selected":"").concat(f);return"".concat(s).concat(p,", ").concat(d(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},MZ=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,m=l.isMulti,h=l.isOptionDisabled,S=l.isSearchable,v=l.menuIsOpen,y=l.options,b=l.screenReaderStatus,x=l.tabSelectsValue,k=l.isLoading,P=l["aria-label"],C=l["aria-live"],E=g.useMemo(function(){return G(G({},RZ),d||{})},[d]),_=g.useMemo(function(){var H="";if(n&&E.onChange){var N=n.option,R=n.options,O=n.removedValue,D=n.removedValues,V=n.value,oe=function(Se){return Array.isArray(Se)?null:Se},B=O||N||oe(V),ee=B?f(B):"",j=R||D||void 0,te=j?j.map(f):[],ae=G({isDisabled:B&&h(B,a),label:ee,labels:te},n);H=E.onChange(ae)}return H},[n,E,h,a,f]),$=g.useMemo(function(){var H="",N=r||o,R=!!(r&&a&&a.includes(r));if(N&&E.onFocus){var O={focused:N,label:f(N),isDisabled:h(N,a),isSelected:R,options:i,context:N===r?"menu":"value",selectValue:a,isAppleDevice:c};H=E.onFocus(O)}return H},[r,o,f,h,E,i,a,c]),M=g.useMemo(function(){var H="";if(v&&y.length&&!k&&E.onFilter){var N=b({count:i.length});H=E.onFilter({inputValue:p,resultsMessage:N})}return H},[i,p,v,E,y,b,k]),F=(n==null?void 0:n.action)==="initial-input-focus",W=g.useMemo(function(){var H="";if(E.guidance){var N=o?"value":v?"menu":"input";H=E.guidance({"aria-label":P,context:N,isDisabled:r&&h(r,a),isMulti:m,isSearchable:S,tabSelectsValue:x,isInitialFocus:F})}return H},[P,r,o,m,h,S,v,E,a,x,F]),re=X(g.Fragment,null,X("span",{id:"aria-selection"},_),X("span",{id:"aria-focused"},$),X("span",{id:"aria-results"},M),X("span",{id:"aria-guidance"},W));return X(g.Fragment,null,X(ck,{id:u},F&&re),X(ck,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!F&&re))},IZ=MZ,Hv=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],AZ=new RegExp("["+Hv.map(function(e){return e.letters}).join("")+"]","g"),g4={};for(var Mh=0;Mh-1}},NZ=["innerRef"];function VZ(e){var t=e.innerRef,n=Zn(e,NZ),r=dQ(n,"onExited","in","enter","exit","appear");return X("input",K({ref:t},r,{css:Gg({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zZ=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function BZ(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,s=g.useRef(!1),a=g.useRef(!1),l=g.useRef(0),u=g.useRef(null),c=g.useCallback(function(S,v){if(u.current!==null){var y=u.current,b=y.scrollTop,x=y.scrollHeight,k=y.clientHeight,P=u.current,C=v>0,E=x-k-b,_=!1;E>v&&s.current&&(r&&r(S),s.current=!1),C&&a.current&&(i&&i(S),a.current=!1),C&&v>E?(n&&!s.current&&n(S),P.scrollTop=x,_=!0,s.current=!0):!C&&-v>b&&(o&&!a.current&&o(S),P.scrollTop=0,_=!0,a.current=!0),_&&zZ(S)}},[n,r,o,i]),d=g.useCallback(function(S){c(S,S.deltaY)},[c]),f=g.useCallback(function(S){l.current=S.changedTouches[0].clientY},[]),p=g.useCallback(function(S){var v=l.current-S.changedTouches[0].clientY;c(S,v)},[c]),m=g.useCallback(function(S){if(S){var v=lQ?{passive:!1}:!1;S.addEventListener("wheel",d,v),S.addEventListener("touchstart",f,v),S.addEventListener("touchmove",p,v)}},[p,f,d]),h=g.useCallback(function(S){S&&(S.removeEventListener("wheel",d,!1),S.removeEventListener("touchstart",f,!1),S.removeEventListener("touchmove",p,!1))},[p,f,d]);return g.useEffect(function(){if(t){var S=u.current;return m(S),function(){h(S)}}},[t,m,h]),function(S){u.current=S}}var fk=["boxSizing","height","overflow","paddingRight","position"],pk={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function hk(e){e.preventDefault()}function mk(e){e.stopPropagation()}function vk(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function gk(){return"ontouchstart"in window||navigator.maxTouchPoints}var yk=!!(typeof window<"u"&&window.document&&window.document.createElement),pa=0,Di={capture:!1,passive:!1};function jZ(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=g.useRef({}),i=g.useRef(null),s=g.useCallback(function(l){if(yk){var u=document.body,c=u&&u.style;if(r&&fk.forEach(function(m){var h=c&&c[m];o.current[m]=h}),r&&pa<1){var d=parseInt(o.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+d||0;Object.keys(pk).forEach(function(m){var h=pk[m];c&&(c[m]=h)}),c&&(c.paddingRight="".concat(p,"px"))}u&&gk()&&(u.addEventListener("touchmove",hk,Di),l&&(l.addEventListener("touchstart",vk,Di),l.addEventListener("touchmove",mk,Di))),pa+=1}},[r]),a=g.useCallback(function(l){if(yk){var u=document.body,c=u&&u.style;pa=Math.max(pa-1,0),r&&pa<1&&fk.forEach(function(d){var f=o.current[d];c&&(c[d]=f)}),u&&gk()&&(u.removeEventListener("touchmove",hk,Di),l&&(l.removeEventListener("touchstart",vk,Di),l.removeEventListener("touchmove",mk,Di)))}},[r]);return g.useEffect(function(){if(t){var l=i.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){i.current=l}}var HZ=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},WZ={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function UZ(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,i=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,u=BZ({isEnabled:o,onBottomArrive:i,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),c=jZ({isEnabled:n}),d=function(p){u(p),c(p)};return X(g.Fragment,null,n&&X("div",{onClick:HZ,css:WZ}),t(d))}var qZ={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},KZ=function(t){var n=t.name,r=t.onFocus;return X("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:qZ,value:"",onChange:function(){}})},GZ=KZ;function Dy(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function YZ(){return Dy(/^iPhone/i)}function b4(){return Dy(/^Mac/i)}function XZ(){return Dy(/^iPad/i)||b4()&&navigator.maxTouchPoints>1}function QZ(){return YZ()||XZ()}function ZZ(){return b4()||QZ()}var JZ=function(t){return t.label},S4=function(t){return t.label},x4=function(t){return t.value},eJ=function(t){return!!t.isDisabled},tJ={clearIndicator:VQ,container:_Q,control:qQ,dropdownIndicator:LQ,group:XQ,groupHeading:ZQ,indicatorsContainer:MQ,indicatorSeparator:BQ,input:nZ,loadingIndicator:WQ,loadingMessage:kQ,menu:vQ,menuList:SQ,menuPortal:EQ,multiValue:aZ,multiValueLabel:lZ,multiValueRemove:uZ,noOptionsMessage:wQ,option:mZ,placeholder:yZ,singleValue:xZ,valueContainer:OQ},nJ={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},rJ=4,w4=4,oJ=38,iJ=w4*2,sJ={baseUnit:w4,controlHeight:oJ,menuGutter:iJ},Dh={borderRadius:rJ,colors:nJ,spacing:sJ},aJ={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ak(),captureMenuScroll:!ak(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:LZ(),formatGroupLabel:JZ,getOptionLabel:S4,getOptionValue:x4,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:eJ,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!sQ(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function bk(e,t,n,r){var o=P4(e,t,n),i=E4(e,t,n),s=C4(e,t),a=qd(e,t);return{type:"option",data:t,isDisabled:o,isSelected:i,label:s,value:a,index:r}}function Vc(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(s,a){return bk(e,s,t,a)}).filter(function(s){return xk(e,s)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=bk(e,n,t,r);return xk(e,i)?i:void 0}).filter(uQ)}function k4(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,xs(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Sk(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,xs(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function lJ(e,t){return k4(Vc(e,t))}function xk(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!_4(e)||!i)&&T4(e,{label:s,value:a,data:o},r)}function uJ(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var i=t.indexOf(n);if(i>-1)return n;if(o-1?n:t[0]}var Fh=function(t,n){var r,o=(r=t.find(function(i){return i.data===n}))===null||r===void 0?void 0:r.id;return o||null},C4=function(t,n){return t.getOptionLabel(n)},qd=function(t,n){return t.getOptionValue(n)};function P4(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function E4(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=qd(e,t);return n.some(function(o){return qd(e,o)===r})}function T4(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var _4=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},dJ=1,nu=function(e){RX(n,e);var t=AX(n);function n(r){var o;if($X(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=ZZ(),o.controlRef=null,o.getControlRef=function(l){o.controlRef=l},o.focusedOptionRef=null,o.getFocusedOptionRef=function(l){o.focusedOptionRef=l},o.menuListRef=null,o.getMenuListRef=function(l){o.menuListRef=l},o.inputRef=null,o.getInputRef=function(l){o.inputRef=l},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(l,u){var c=o.props,d=c.onChange,f=c.name;u.name=f,o.ariaOnChange(l,u),d(l,u)},o.setValue=function(l,u,c){var d=o.props,f=d.closeMenuOnSelect,p=d.isMulti,m=d.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),f&&(o.setState({inputIsHiddenAfterUpdate:!p}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(l,{action:u,option:c})},o.selectOption=function(l){var u=o.props,c=u.blurInputOnSelect,d=u.isMulti,f=u.name,p=o.state.selectValue,m=d&&o.isOptionSelected(l,p),h=o.isOptionDisabled(l,p);if(m){var S=o.getOptionValue(l);o.setValue(p.filter(function(v){return o.getOptionValue(v)!==S}),"deselect-option",l)}else if(!h)d?o.setValue([].concat(xs(p),[l]),"select-option",l):o.setValue(l,"select-option");else{o.ariaOnChange(l,{action:"select-option",option:l,name:f});return}c&&o.blurInput()},o.removeValue=function(l){var u=o.props.isMulti,c=o.state.selectValue,d=o.getOptionValue(l),f=c.filter(function(m){return o.getOptionValue(m)!==d}),p=Ra(u,f,f[0]||null);o.onChange(p,{action:"remove-value",removedValue:l}),o.focusInput()},o.clearValue=function(){var l=o.state.selectValue;o.onChange(Ra(o.props.isMulti,[],null),{action:"clear",removedValues:l})},o.popValue=function(){var l=o.props.isMulti,u=o.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),f=Ra(l,d,d[0]||null);o.onChange(f,{action:"pop-value",removedValue:c})},o.getFocusedOptionId=function(l){return Fh(o.state.focusableOptionsWithIds,l)},o.getFocusableOptionsWithIds=function(){return Sk(Vc(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;cp||f>p}},o.onTouchEnd=function(l){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(l.target)&&o.menuListRef&&!o.menuListRef.contains(l.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(l){o.userIsDragging||o.onControlMouseDown(l)},o.onClearIndicatorTouchEnd=function(l){o.userIsDragging||o.onClearIndicatorMouseDown(l)},o.onDropdownIndicatorTouchEnd=function(l){o.userIsDragging||o.onDropdownIndicatorMouseDown(l)},o.handleInputChange=function(l){var u=o.props.inputValue,c=l.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(c,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(l){o.props.onFocus&&o.props.onFocus(l),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(l){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(l),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(l){if(!(o.blockOptionHover||o.state.focusedOption===l)){var u=o.getFocusableOptions(),c=u.indexOf(l);o.setState({focusedOption:l,focusedOptionId:c>-1?o.getFocusedOptionId(l):null})}},o.shouldHideSelectedOptions=function(){return _4(o.props)},o.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),o.focus()},o.onKeyDown=function(l){var u=o.props,c=u.isMulti,d=u.backspaceRemovesValue,f=u.escapeClearsValue,p=u.inputValue,m=u.isClearable,h=u.isDisabled,S=u.menuIsOpen,v=u.onKeyDown,y=u.tabSelectsValue,b=u.openMenuOnFocus,x=o.state,k=x.focusedOption,P=x.focusedValue,C=x.selectValue;if(!h&&!(typeof v=="function"&&(v(l),l.defaultPrevented))){switch(o.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||p)return;o.focusValue("previous");break;case"ArrowRight":if(!c||p)return;o.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(P)o.removeValue(P);else{if(!d)return;c?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||l.shiftKey||!S||!y||!k||b&&o.isOptionSelected(k,C))return;o.selectOption(k);break;case"Enter":if(l.keyCode===229)break;if(S){if(!k||o.isComposing)return;o.selectOption(k);break}return;case"Escape":S?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:p}),o.onMenuClose()):m&&f&&o.clearValue();break;case" ":if(p)return;if(!S){o.openMenu("first");break}if(!k)return;o.selectOption(k);break;case"ArrowUp":S?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":S?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!S)return;o.focusOption("pageup");break;case"PageDown":if(!S)return;o.focusOption("pagedown");break;case"Home":if(!S)return;o.focusOption("first");break;case"End":if(!S)return;o.focusOption("last");break;default:return}l.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++dJ),o.state.selectValue=Wd(r.value),r.menuIsOpen&&o.state.selectValue.length){var i=o.getFocusableOptionsWithIds(),s=o.buildFocusableOptions(),a=s.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=i,o.state.focusedOption=s[a],o.state.focusedOptionId=Fh(i,s[a])}return o}return OX(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sk(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var i=this.props,s=i.isDisabled,a=i.menuIsOpen,l=this.state.isFocused;(l&&!s&&o.isDisabled||l&&a&&!o.menuIsOpen)&&this.focusInput(),l&&s&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sk(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,i){this.props.onInputChange(o,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var i=this,s=this.state,a=s.selectValue,l=s.isFocused,u=this.buildFocusableOptions(),c=o==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(a[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(o){var i=this.state,s=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var u=s.length-1,c=-1;if(s.length){switch(o){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,u=a.indexOf(s);s||(u=-1),o==="up"?l=u>0?u-1:a.length-1:o==="down"?l=(u+1)%a.length:o==="pageup"?(l=u-i,l<0&&(l=0)):o==="pagedown"?(l=u+i,l>a.length-1&&(l=a.length-1)):o==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Dh):G(G({},Dh),this.props.theme):Dh}},{key:"getCommonProps",value:function(){var o=this.clearValue,i=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,f=d.isMulti,p=d.isRtl,m=d.options,h=this.hasValue();return{clearValue:o,cx:i,getStyles:s,getClassNames:a,getValue:l,hasValue:h,isMulti:f,isRtl:p,options:m,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,i=o.isClearable,s=o.isMulti;return i===void 0?s:i}},{key:"isOptionDisabled",value:function(o,i){return P4(this.props,o,i)}},{key:"isOptionSelected",value:function(o,i){return E4(this.props,o,i)}},{key:"filterOption",value:function(o,i){return T4(this.props,o,i)}},{key:"formatOptionLabel",value:function(o,i){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(o,{context:i,inputValue:s,selectValue:a})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,i=o.isDisabled,s=o.isSearchable,a=o.inputId,l=o.inputValue,u=o.tabIndex,c=o.form,d=o.menuIsOpen,f=o.required,p=this.getComponents(),m=p.Input,h=this.state,S=h.inputIsHidden,v=h.ariaSelection,y=this.commonProps,b=a||this.getElementId("input"),x=G(G(G({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?g.createElement(m,K({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:i,isHidden:S,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},x)):g.createElement(VZ,K({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Hd,onFocus:this.onInputFocus,disabled:i,tabIndex:u,inputMode:"none",form:c,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,i=this.getComponents(),s=i.MultiValue,a=i.MultiValueContainer,l=i.MultiValueLabel,u=i.MultiValueRemove,c=i.SingleValue,d=i.Placeholder,f=this.commonProps,p=this.props,m=p.controlShouldRenderValue,h=p.isDisabled,S=p.isMulti,v=p.inputValue,y=p.placeholder,b=this.state,x=b.selectValue,k=b.focusedValue,P=b.isFocused;if(!this.hasValue()||!m)return v?null:g.createElement(d,K({},f,{key:"placeholder",isDisabled:h,isFocused:P,innerProps:{id:this.getElementId("placeholder")}}),y);if(S)return x.map(function(E,_){var $=E===k,M="".concat(o.getOptionLabel(E),"-").concat(o.getOptionValue(E));return g.createElement(s,K({},f,{components:{Container:a,Label:l,Remove:u},isFocused:$,isDisabled:h,key:M,index:_,removeProps:{onClick:function(){return o.removeValue(E)},onTouchEnd:function(){return o.removeValue(E)},onMouseDown:function(W){W.preventDefault()}},data:E}),o.formatOptionLabel(E,"value"))});if(v)return null;var C=x[0];return g.createElement(c,K({},f,{data:C,isDisabled:h}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),i=o.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(i,K({},s,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),i=o.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!i||!u)return null;var d={"aria-hidden":"true"};return g.createElement(i,K({},s,{innerProps:d,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator,s=o.IndicatorSeparator;if(!i||!s)return null;var a=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return g.createElement(s,K({},a,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator;if(!i)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(i,K({},s,{innerProps:u,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,i=this.getComponents(),s=i.Group,a=i.GroupHeading,l=i.Menu,u=i.MenuList,c=i.MenuPortal,d=i.LoadingMessage,f=i.NoOptionsMessage,p=i.Option,m=this.commonProps,h=this.state.focusedOption,S=this.props,v=S.captureMenuScroll,y=S.inputValue,b=S.isLoading,x=S.loadingMessage,k=S.minMenuHeight,P=S.maxMenuHeight,C=S.menuIsOpen,E=S.menuPlacement,_=S.menuPosition,$=S.menuPortalTarget,M=S.menuShouldBlockScroll,F=S.menuShouldScrollIntoView,W=S.noOptionsMessage,re=S.onMenuScrollToTop,H=S.onMenuScrollToBottom;if(!C)return null;var N=function(ee,j){var te=ee.type,ae=ee.data,we=ee.isDisabled,Se=ee.isSelected,xt=ee.label,Ln=ee.value,Bt=h===ae,pe=we?void 0:function(){return o.onOptionHover(ae)},tt=we?void 0:function(){return o.selectOption(ae)},Sn="".concat(o.getElementId("option"),"-").concat(j),ne={id:Sn,onClick:tt,onMouseMove:pe,onMouseOver:pe,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:Se};return g.createElement(p,K({},m,{innerProps:ne,data:ae,isDisabled:we,isSelected:Se,key:Sn,label:xt,type:te,value:Ln,isFocused:Bt,innerRef:Bt?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(ee.data,"menu"))},R;if(this.hasOptions())R=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var ee=B.data,j=B.options,te=B.index,ae="".concat(o.getElementId("group"),"-").concat(te),we="".concat(ae,"-heading");return g.createElement(s,K({},m,{key:ae,data:ee,options:j,Heading:a,headingProps:{id:we,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(Se){return N(Se,"".concat(te,"-").concat(Se.index))}))}else if(B.type==="option")return N(B,"".concat(B.index))});else if(b){var O=x({inputValue:y});if(O===null)return null;R=g.createElement(d,m,O)}else{var D=W({inputValue:y});if(D===null)return null;R=g.createElement(f,m,D)}var V={minMenuHeight:k,maxMenuHeight:P,menuPlacement:E,menuPosition:_,menuShouldScrollIntoView:F},oe=g.createElement(gQ,K({},m,V),function(B){var ee=B.ref,j=B.placerProps,te=j.placement,ae=j.maxHeight;return g.createElement(l,K({},m,V,{innerRef:ee,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:te}),g.createElement(UZ,{captureEnabled:v,onTopArrive:re,onBottomArrive:H,lockEnabled:M},function(we){return g.createElement(u,K({},m,{innerRef:function(xt){o.getMenuListRef(xt),we(xt)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:ae,focusedOption:h}),R)}))});return $||_==="fixed"?g.createElement(c,K({},m,{appendTo:$,controlElement:this.controlRef,menuPlacement:E,menuPosition:_}),oe):oe}},{key:"renderFormField",value:function(){var o=this,i=this.props,s=i.delimiter,a=i.isDisabled,l=i.isMulti,u=i.name,c=i.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!a)return g.createElement(GZ,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(l)if(s){var f=d.map(function(h){return o.getOptionValue(h)}).join(s);return g.createElement("input",{name:u,type:"hidden",value:f})}else{var p=d.length>0?d.map(function(h,S){return g.createElement("input",{key:"i-".concat(S),name:u,type:"hidden",value:o.getOptionValue(h)})}):g.createElement("input",{name:u,type:"hidden",value:""});return g.createElement("div",null,p)}else{var m=d[0]?this.getOptionValue(d[0]):"";return g.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,i=this.state,s=i.ariaSelection,a=i.focusedOption,l=i.focusedValue,u=i.isFocused,c=i.selectValue,d=this.getFocusableOptions();return g.createElement(IZ,K({},o,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),i=o.Control,s=o.IndicatorsContainer,a=o.SelectContainer,l=o.ValueContainer,u=this.props,c=u.className,d=u.id,f=u.isDisabled,p=u.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return g.createElement(a,K({},h,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:m}),this.renderLiveRegion(),g.createElement(i,K({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:m,menuIsOpen:p}),g.createElement(l,K({},h,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),g.createElement(s,K({},h,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,i){var s=i.prevProps,a=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,u=i.ariaSelection,c=i.isFocused,d=i.prevWasFocused,f=i.instancePrefix,p=o.options,m=o.value,h=o.menuIsOpen,S=o.inputValue,v=o.isMulti,y=Wd(m),b={};if(s&&(m!==s.value||p!==s.options||h!==s.menuIsOpen||S!==s.inputValue)){var x=h?lJ(o,y):[],k=h?Sk(Vc(o,y),"".concat(f,"-option")):[],P=a?uJ(i,y):null,C=cJ(i,x),E=Fh(k,C);b={selectValue:y,focusedOption:C,focusedOptionId:E,focusableOptionsWithIds:k,focusedValue:P,clearFocusValueOnUpdate:!1}}var _=l!=null&&o!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},$=u,M=c&&d;return c&&!M&&($={value:Ra(v,y,y[0]||null),options:y,action:"initial-input-focus"},M=!d),(u==null?void 0:u.action)==="initial-input-focus"&&($=null),G(G(G({},b),_),{},{prevProps:o,ariaSelection:$,prevWasFocused:M})}}]),n}(g.Component);nu.defaultProps=aJ;var fJ=g.forwardRef(function(e,t){var n=Zf(e);return g.createElement(nu,K({ref:t},n))}),pJ=fJ,hJ=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],wk=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),i=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return i===o||s===o},Lh={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(i){return wk(t,i,o)})||r.some(function(i){return wk(t,i,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function $4(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,i=e.formatCreateLabel,s=i===void 0?Lh.formatCreateLabel:i,a=e.isValidNewOption,l=a===void 0?Lh.isValidNewOption:a,u=e.getNewOptionData,c=u===void 0?Lh.getNewOptionData:u,d=e.onCreateOption,f=e.options,p=f===void 0?[]:f,m=e.onChange,h=Zn(e,hJ),S=h.getOptionValue,v=S===void 0?x4:S,y=h.getOptionLabel,b=y===void 0?S4:y,x=h.inputValue,k=h.isLoading,P=h.isMulti,C=h.value,E=h.name,_=g.useMemo(function(){return l(x,Wd(C),p,{getOptionValue:v,getOptionLabel:b})?c(x,s(x)):void 0},[s,c,b,v,x,l,p,C]),$=g.useMemo(function(){return(n||!k)&&_?o==="first"?[_].concat(xs(p)):[].concat(xs(p),[_]):p},[n,o,k,_,p]),M=g.useCallback(function(F,W){if(W.action!=="select-option")return m(F,W);var re=Array.isArray(F)?F:[F];if(re[re.length-1]===_){if(d)d(x);else{var H=c(x,x),N={action:"create-option",name:E,option:H};m(Ra(P,[].concat(xs(Wd(C)),[H]),H),N)}return}m(F,W)},[c,x,P,E,_,d,m,C]);return G(G({},h),{},{options:$,onChange:M})}var mJ=g.forwardRef(function(e,t){var n=Zf(e),r=$4(n);return g.createElement(nu,K({ref:t},r))}),vJ=mJ,gJ=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function O4(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,i=e.loadOptions;e.options;var s=e.isLoading,a=s===void 0?!1:s,l=e.onInputChange,u=e.filterOption,c=u===void 0?null:u,d=Zn(e,gJ),f=d.inputValue,p=g.useRef(void 0),m=g.useRef(!1),h=g.useState(Array.isArray(n)?n:void 0),S=st(h,2),v=S[0],y=S[1],b=g.useState(typeof f<"u"?f:""),x=st(b,2),k=x[0],P=x[1],C=g.useState(n===!0),E=st(C,2),_=E[0],$=E[1],M=g.useState(void 0),F=st(M,2),W=F[0],re=F[1],H=g.useState([]),N=st(H,2),R=N[0],O=N[1],D=g.useState(!1),V=st(D,2),oe=V[0],B=V[1],ee=g.useState({}),j=st(ee,2),te=j[0],ae=j[1],we=g.useState(void 0),Se=st(we,2),xt=Se[0],Ln=Se[1],Bt=g.useState(void 0),pe=st(Bt,2),tt=pe[0],Sn=pe[1];o!==tt&&(ae({}),Sn(o)),n!==xt&&(y(Array.isArray(n)?n:void 0),Ln(n)),g.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var ne=g.useCallback(function(nt,wt){if(!i)return wt();var De=i(nt,wt);De&&typeof De.then=="function"&&De.then(wt,function(){return wt()})},[i]);g.useEffect(function(){n===!0&&ne(k,function(nt){m.current&&(y(nt||[]),$(!!p.current))})},[]);var Pe=g.useCallback(function(nt,wt){var De=tQ(nt,wt,l);if(!De){p.current=void 0,P(""),re(""),O([]),$(!1),B(!1);return}if(o&&te[De])P(De),re(De),O(te[De]),$(!1),B(!1);else{var Ei=p.current={};P(De),$(!0),B(!W),ne(De,function(Ti){m&&Ei===p.current&&(p.current=void 0,$(!1),re(De),O(Ti||[]),B(!1),ae(Ti?G(G({},te),{},ei({},De,Ti)):te))})}},[o,ne,W,te,l]),Be=oe?[]:k&&W?R:v||[];return G(G({},d),{},{options:Be,isLoading:_||a,onInputChange:Pe,filterOption:c})}var yJ=g.forwardRef(function(e,t){var n=O4(e),r=Zf(n);return g.createElement(nu,K({ref:t},r))}),bJ=yJ,SJ=g.forwardRef(function(e,t){var n=O4(e),r=Zf(n),o=$4(r);return g.createElement(nu,K({ref:t},o))}),xJ=SJ,R4=e=>{let{className:t,clearValue:n,cx:r,getStyles:o,getClassNames:i,getValue:s,hasValue:a,isMulti:l,isRtl:u,options:c,selectOption:d,selectProps:f,setValue:p,theme:m,...h}=e;return{...h}},wJ=e=>typeof e=="string"&&["sm","md","lg"].includes(e),kJ=e=>wJ(e)?e:e==="xs"?"sm":e==="xl"?"lg":"md",Jn=e=>{let t=Yr(),n=kJ(t.components.Input.defaultProps.size),r=e??n;return qH(typeof r=="string"?[r]:r,{fallback:"md"})||n},CJ=e=>{let{children:t,className:n,cx:r,innerProps:o,isDisabled:i,isRtl:s,hasValue:a,selectProps:{chakraStyles:l}}=e,u={position:"relative",direction:s?"rtl":void 0,...i?{cursor:"not-allowed"}:{}},c=l!=null&&l.container?l.container(u,e):u;return w.jsx(Je,{...o,className:r({"--is-disabled":i,"--is-rtl":s,"--has-value":a},n),sx:c,children:t})},PJ=e=>{let{children:t,className:n,cx:r,isMulti:o,hasValue:i,innerProps:s,selectProps:{chakraStyles:a,size:l,variant:u,focusBorderColor:c,errorBorderColor:d,controlShouldRenderValue:f}}=e,p=Jn(l),m=ut("Input",{size:p,variant:u,focusBorderColor:c,errorBorderColor:d}),h={display:o&&i&&f?"flex":"grid",alignItems:"center",flex:1,paddingY:"2px",paddingX:m.field.px,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},S=a!=null&&a.valueContainer?a.valueContainer(h,e):h;return w.jsx(Je,{...s,className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n),sx:S,children:t})},EJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i}}=e,s={display:"flex",alignItems:"center",alignSelf:"stretch",flexShrink:0},a=i!=null&&i.indicatorsContainer?i.indicatorsContainer(s,e):s;return w.jsx(Je,{...o,className:r({indicators:!0},n),sx:a,children:t})},TJ=e=>{let{className:t,cx:n,children:r,innerRef:o,innerProps:i,isDisabled:s,isFocused:a,menuIsOpen:l,selectProps:{chakraStyles:u,size:c,variant:d,focusBorderColor:f,errorBorderColor:p,isInvalid:m,isReadOnly:h}}=e,S=Jn(c),{field:{height:v,h:y,...b}}=ut("Input",{size:S,variant:d,focusBorderColor:f,errorBorderColor:p}),x={...b,position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",padding:0,overflow:"hidden",height:"auto",minH:v||y,...s?{pointerEvents:"none"}:{}},k=u!=null&&u.control?u.control(x,e):x;return w.jsx(Je,{ref:o,className:n({control:!0,"control--is-disabled":s,"control--is-focused":a,"control--menu-is-open":l},t),sx:k,...i,"data-focus":a?!0:void 0,"data-focus-visible":a?!0:void 0,"data-invalid":m?!0:void 0,"data-disabled":s?!0:void 0,"data-readonly":h?!0:void 0,children:r})},_J=e=>{let{className:t,cx:n,selectProps:{chakraStyles:r,useBasicStyles:o,variant:i}}=e,s={opacity:1,...o||i!=="outline"?{display:"none"}:{}},a=r!=null&&r.indicatorSeparator?r.indicatorSeparator(s,e):s;return w.jsx(f_,{className:n({"indicator-separator":!0},t),sx:a,orientation:"vertical"})},$J=e=>w.jsx(Qn,{role:"presentation",focusable:"false","aria-hidden":"true",...e,children:w.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),OJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,useBasicStyles:s,size:a,focusBorderColor:l,errorBorderColor:u,variant:c}}=e,d=Jn(a),f=ut("Input",{size:d,variant:c,focusBorderColor:l,errorBorderColor:u}),p={sm:"16px",md:"20px",lg:"24px"}[d],m={...f.addon,display:"flex",alignItems:"center",justifyContent:"center",height:"100%",borderRadius:0,borderWidth:0,fontSize:p,...s&&{background:"transparent",padding:0,width:6,marginRight:2,marginLeft:1,cursor:"inherit"}},h=i!=null&&i.dropdownIndicator?i.dropdownIndicator(m,e):m,S={height:"1em",width:"1em"},v=i!=null&&i.downChevron?i.downChevron(S,e):S;return w.jsx(Je,{...o,className:r({indicator:!0,"dropdown-indicator":!0},n),sx:h,children:t||w.jsx($J,{sx:v})})},RJ=e=>w.jsx(Qn,{focusable:"false","aria-hidden":!0,...e,children:w.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}),MJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,size:s}}=e,a=Jn(s),l={...en("CloseButton",{size:a}),marginX:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:"pointer"},u=i!=null&&i.clearIndicator?i.clearIndicator(l,e):l,c={width:"1em",height:"1em"},d=i!=null&&i.crossIcon?i.crossIcon(c,e):c;return w.jsx(Je,{role:"button",className:r({indicator:!0,"clear-indicator":!0},n),sx:u,"aria-label":"Clear selected options",...o,children:t||w.jsx(RJ,{sx:d})})},IJ=e=>{let{className:t,cx:n,innerProps:r,selectProps:{chakraStyles:o,size:i},color:s,emptyColor:a,speed:l,thickness:u,spinnerSize:c}=e,d=Jn(i),f={sm:"xs",md:"sm",lg:"md"}[d],p={marginRight:3},m=o!=null&&o.loadingIndicator?o.loadingIndicator(p,e):p;return w.jsx(Vf,{className:n({indicator:!0,"loading-indicator":!0},t),sx:m,...r,size:c||f,color:s,emptyColor:a,speed:l,thickness:u})},AJ=TJ,DJ=e=>{let{className:t,cx:n,value:r,selectProps:{chakraStyles:o,isReadOnly:i}}=e,{innerRef:s,isDisabled:a,isHidden:l,inputClassName:u,...c}=R4(e),d={gridArea:"1 / 2",minW:"2px",border:0,margin:0,outline:0,padding:0},f={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",visibility:a?"hidden":"visible",transform:r?"translateZ(0)":"",_after:{content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0,...d}},p=o!=null&&o.inputContainer?o.inputContainer(f,e):f,m={background:0,opacity:l?0:1,width:"100%",...d},h=o!=null&&o.input?o.input(m,e):m;return w.jsx(Je,{className:n({"input-container":!0},t),"data-value":r||"",sx:p,children:w.jsx(A.input,{className:n({input:!0},u),ref:s,sx:h,disabled:a,readOnly:i?!0:void 0,...c})})},FJ=DJ,LJ=e=>e?{bottom:"top",top:"bottom"}[e]:"top",NJ=e=>{let{className:t,cx:n,children:r,innerProps:o,innerRef:i,placement:s,selectProps:{chakraStyles:a}}=e,l={position:"absolute",[LJ(s)]:"100%",marginY:"8px",width:"100%",zIndex:1},u=a!=null&&a.menu?a.menu(l,e):l;return w.jsx(P_,{children:w.jsx(Je,{...o,ref:i,className:n({menu:!0},t),sx:u,children:r})})},VJ=NJ,zJ=e=>{var t;let{className:n,cx:r,innerRef:o,children:i,maxHeight:s,isMulti:a,innerProps:l,selectProps:{chakraStyles:u,size:c,variant:d,focusBorderColor:f,errorBorderColor:p}}=e,m=ut("Menu"),h=Jn(c),S=ut("Input",{size:h,variant:d,focusBorderColor:f,errorBorderColor:p}).field,v={...m.list,minW:"100%",maxHeight:`${s}px`,overflowY:"auto","--input-border-radius":S==null?void 0:S["--input-border-radius"],borderRadius:(S==null?void 0:S.borderRadius)||((t=m.list)==null?void 0:t.borderRadius),position:"relative",WebkitOverflowScrolling:"touch"},y=u!=null&&u.menuList?u.menuList(v,e):v;return w.jsx(Je,{...l,className:r({"menu-list":!0,"menu-list--is-multi":a},n),sx:y,ref:o,children:i})},BJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,size:s}}=e,a=Jn(s),l={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[a],fontSize:a},u=i!=null&&i.loadingMessage?i.loadingMessage(l,e):l;return w.jsx(Je,{...o,className:r({"menu-notice":!0,"menu-notice--loading":!0},n),sx:u,children:t})},jJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,size:s}}=e,a=Jn(s),l={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[a],fontSize:a},u=i!=null&&i.noOptionsMessage?i.noOptionsMessage(l,e):l;return w.jsx(Je,{...o,className:r({"menu-notice":!0,"menu-notice--no-options":!0},n),sx:u,children:t})},HJ=e=>{let{children:t,className:n,cx:r,theme:o,getStyles:i,Heading:s,headingProps:a,label:l,selectProps:u,innerProps:c,getClassNames:d}=e,{chakraStyles:f}=u,p={},m=f!=null&&f.group?f.group(p,e):p;return w.jsxs(Je,{...c,className:r({group:!0},n),sx:m,children:[w.jsx(s,{...a,selectProps:u,cx:r,theme:o,getStyles:i,getClassNames:d,children:l}),w.jsx(Je,{children:t})]})},WJ=e=>{let{cx:t,className:n,selectProps:{chakraStyles:r,size:o,hasStickyGroupHeaders:i}}=e,{data:s,...a}=R4(e),l=ut("Menu"),u=Jn(o),c={sm:"xs",md:"sm",lg:"md"},d={sm:"0.4rem 0.8rem",md:"0.5rem 1rem",lg:"0.6rem 1.2rem"},f={...l.groupTitle,fontSize:c[u],padding:d[u],margin:0,borderBottomWidth:i?"1px":0,position:i?"sticky":"static",top:-2,bg:l.list.bg,zIndex:1},p=r!=null&&r.groupHeading?r.groupHeading(f,e):f;return w.jsx(Je,{...a,className:t({"group-heading":!0},n),sx:p})},UJ=e=>w.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e,children:w.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),qJ=e=>{let{className:t,cx:n,innerRef:r,innerProps:o,children:i,isFocused:s,isDisabled:a,isSelected:l,selectProps:{chakraStyles:u,size:c,isMulti:d,hideSelectedOptions:f,selectedOptionStyle:p,selectedOptionColorScheme:m}}=e,h=ut("Menu").item,S=Jn(c),v={sm:"0.6rem",md:"0.8rem",lg:"1rem"},y={sm:"0.3rem",md:"0.4rem",lg:"0.5rem"},b=sb(`${m}.500`,`${m}.300`),x=sb("white","black"),k=p==="check"&&(!d||f===!1),P=p==="color",C={...h,cursor:"pointer",display:"flex",alignItems:"center",width:"100%",textAlign:"start",fontSize:S,paddingX:v[S],paddingY:y[S],...P&&{_selected:{bg:b,color:x,_active:{bg:b}}}},E=u!=null&&u.option?u.option(C,e):C;return w.jsxs(Je,{...o,className:n({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":l},t),sx:E,ref:r,"data-focus":s?!0:void 0,"aria-disabled":a?!0:void 0,"aria-selected":l,children:[k&&w.jsx(E_,{fontSize:"0.8em",marginEnd:"0.75rem",opacity:l?1:0,children:w.jsx(UJ,{})}),i]})},KJ=e=>typeof e=="object"&&e!==null&&"colorScheme"in e&&typeof e.colorScheme=="string",GJ=e=>typeof e=="object"&&e!==null&&"variant"in e&&typeof e.variant=="string",M4=e=>typeof e=="object"&&e!==null&&"isFixed"in e&&typeof e.isFixed=="boolean",YJ=e=>{let{children:t,className:n,components:r,cx:o,data:i,innerProps:s,isDisabled:a,isFocused:l,removeProps:u,selectProps:c,cropWithEllipsis:d}=e,{Container:f,Label:p,Remove:m}=r,{chakraStyles:h,colorScheme:S,tagVariant:v,size:y}=c,b=Jn(y),x="",k="",P=!1;KJ(i)&&(x=i.colorScheme),GJ(i)&&(k=i.variant),M4(i)&&(P=i.isFixed);let C=ut("Tag",{size:b,colorScheme:x||S,variant:k||v||(P?"solid":"subtle")}),E={...C.container,display:"flex",alignItems:"center",minWidth:0,margin:"0.125rem"},_=h!=null&&h.multiValue?h.multiValue(E,e):E,$={...C.label,overflow:"hidden",textOverflow:d||d===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},M=h!=null&&h.multiValueLabel?h.multiValueLabel($,e):$,F={...C.closeButton,display:"flex",alignItems:"center",justifyContent:"center"},W=h!=null&&h.multiValueRemove?h.multiValueRemove(F,e):F;return w.jsxs(f,{data:i,innerProps:{className:o({"multi-value":!0,"multi-value--is-disabled":a},n),...s},sx:_,selectProps:c,children:[w.jsx(p,{data:i,innerProps:{className:o({"multi-value__label":!0},n)},sx:M,selectProps:c,children:t}),w.jsx(m,{data:i,innerProps:{className:o({"multi-value__remove":!0},n),"aria-label":`Remove ${t||"option"}`,...u},sx:W,selectProps:c,isFocused:l})]})},XJ=e=>{let{children:t,innerProps:n,sx:r}=e;return w.jsx(A.span,{...n,sx:r,children:t})},QJ=e=>{let{children:t,innerProps:n,sx:r}=e;return w.jsx(A.span,{...n,sx:r,children:t})},ZJ=e=>w.jsx(Qn,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:w.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})}),JJ=e=>{let{children:t,innerProps:n,isFocused:r,data:o,sx:i}=e;return M4(o)&&o.isFixed?null:w.jsx(Je,{...n,role:"button",sx:i,"data-focus":r?!0:void 0,"data-focus-visible":r?!0:void 0,children:t||w.jsx(ZJ,{})})},eee=YJ,tee=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i}}=e,s={gridArea:"1 / 1 / 2 / 3",color:"chakra-placeholder-color",mx:"0.125rem",userSelect:"none"},a=i!=null&&i.placeholder?i.placeholder(s,e):s;return w.jsx(Je,{...o,className:r({placeholder:!0},n),sx:a,children:t})},nee=tee,ree=e=>{let{children:t,className:n,cx:r,isDisabled:o,innerProps:i,selectProps:{chakraStyles:s}}=e,a={gridArea:"1 / 1 / 2 / 3",mx:"0.125rem",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},l=s!=null&&s.singleValue?s.singleValue(a,e):a;return w.jsx(Je,{className:r({"single-value":!0,"single-value--is-disabled":o},n),sx:l,...i,children:t})},oee=ree,iee={ClearIndicator:MJ,Control:AJ,DropdownIndicator:OJ,Group:HJ,GroupHeading:WJ,IndicatorSeparator:_J,IndicatorsContainer:EJ,Input:FJ,LoadingIndicator:IJ,LoadingMessage:BJ,Menu:VJ,MenuList:zJ,MultiValue:eee,MultiValueContainer:XJ,MultiValueLabel:QJ,MultiValueRemove:JJ,NoOptionsMessage:jJ,Option:qJ,Placeholder:nee,SelectContainer:CJ,SingleValue:oee,ValueContainer:PJ},see=iee,aee=({components:e={},theme:t,size:n,colorScheme:r="gray",isDisabled:o,isInvalid:i,isReadOnly:s,required:a,isRequired:l,inputId:u,tagVariant:c,selectedOptionStyle:d="color",selectedOptionColorScheme:f,selectedOptionColor:p,variant:m,focusBorderColor:h,errorBorderColor:S,chakraStyles:v={},onFocus:y,onBlur:b,menuIsOpen:x,...k})=>{var P;let C=Yr(),{variant:E}=C.components.Input.defaultProps,_=L0({id:u,isDisabled:o,isInvalid:i,isRequired:l,isReadOnly:s,onFocus:y,onBlur:b}),$=x??(_.readOnly?!1:void 0),M=d;["color","check"].includes(d)||(M="color");let F=f||p||"blue";return typeof F!="string"&&(F="blue"),{components:{...see,...e},colorScheme:r,size:n,tagVariant:c,selectedOptionStyle:M,selectedOptionColorScheme:F,variant:m??E,chakraStyles:v,focusBorderColor:h,errorBorderColor:S,onFocus:_.onFocus,onBlur:_.onBlur,isDisabled:_.disabled,isInvalid:!!_["aria-invalid"],inputId:_.id,isReadOnly:_.readOnly,required:a??_.required,menuIsOpen:$,...k,"aria-invalid":(P=k["aria-invalid"])!=null?P:_["aria-invalid"]}},ep=aee,lee=g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(pJ,{ref:t,...n})}),hte=lee;g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(vJ,{ref:t,...n})});g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(bJ,{ref:t,...n})});g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(xJ,{ref:t,...n})});export{Mee as $,kee as A,bT as B,rte as C,ote as D,Zee as E,jH as F,Xee as G,VH as H,c8 as I,nte as J,ate as K,TH as L,Gee as M,bee as N,$ee as O,sy as P,L_ as Q,Un as R,ete as S,SK as T,_ee as U,ute as V,FH as W,Tee as X,Iee as Y,Oee as Z,Ree as _,cee as a,Je as a0,Eee as a1,Aee as a2,$q as a3,DH as a4,Z0 as a5,RH as a6,MH as a7,zee as a8,BH as a9,yee as aA,Bq as aB,Pee as aC,kq as aD,A as aE,dte as aF,fte as aG,Xj as aH,fee as aI,Uy as aJ,vee as aK,dee as aL,Oe as aM,_I as aN,Hee as aa,h8 as ab,H8 as ac,cte as ad,qq as ae,Dee as af,Fee as ag,Vee as ah,Lee as ai,Nee as aj,s_ as ak,w8 as al,C8 as am,hte as an,pK as ao,tte as ap,Yee as aq,Dq as ar,Oq as as,ite as at,sK as au,aK as av,cK as aw,uK as ax,lK as ay,NH as az,Wl as b,lte as c,Ef as d,u_ as e,a8 as f,Qn as g,Wee as h,Kee as i,w as j,Qee as k,xh as l,Bee as m,jee as n,Tq as o,Cee as p,Pq as q,g as r,_q as s,Cq as t,mee as u,pte as v,Jee as w,Uee as x,ste as y,qee as z}; +`]))),WQ=function(t,n){var r=t.isFocused,o=t.size,i=t.theme,s=i.colors,a=i.spacing.baseUnit;return G({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},Rh=function(t){var n=t.delay,r=t.offset;return X("span",{css:Gg({animation:"".concat(HQ," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},UQ=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,i=o===void 0?4:o,s=Zn(t,DQ);return X("div",K({},We(G(G({},s),{},{innerProps:n,isRtl:r,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),X(Rh,{delay:0,offset:r}),X(Rh,{delay:160,offset:!0}),X(Rh,{delay:320,offset:!r}))},qQ=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.theme,s=i.colors,a=i.borderRadius,l=i.spacing;return G({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:o?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:o?s.primary:s.neutral30}})},KQ=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return X("div",K({ref:i},We(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},GQ=KQ,YQ=["data"],XQ=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},QQ=function(t){var n=t.children,r=t.cx,o=t.getStyles,i=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return X("div",K({},We(t,"group",{group:!0}),l),X(s,K({},a,{selectProps:d,theme:c,getStyles:o,getClassNames:i,cx:r}),u),X("div",null,n))},ZQ=function(t,n){var r=t.theme,o=r.colors,i=r.spacing;return G({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},JQ=function(t){var n=s4(t);n.data;var r=Zn(n,YQ);return X("div",K({},We(t,"groupHeading",{"group-heading":!0}),r))},eZ=QQ,tZ=["innerRef","isDisabled","isHidden","inputClassName"],nZ=function(t,n){var r=t.isDisabled,o=t.value,i=t.theme,s=i.spacing,a=i.colors;return G(G({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},rZ),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},m4={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},rZ={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":G({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},m4)},oZ=function(t){return G({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},m4)},iZ=function(t){var n=t.cx,r=t.value,o=s4(t),i=o.innerRef,s=o.isDisabled,a=o.isHidden,l=o.inputClassName,u=Zn(o,tZ);return X("div",K({},We(t,"input",{"input-container":!0}),{"data-value":r||""}),X("input",K({className:n({input:!0},l),ref:i,style:oZ(a),disabled:s},u)))},sZ=iZ,aZ=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors;return G({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:i/2,margin:o.baseUnit/2})},lZ=function(t,n){var r=t.theme,o=r.borderRadius,i=r.colors,s=t.cropWithEllipsis;return G({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},uZ=function(t,n){var r=t.theme,o=r.spacing,i=r.borderRadius,s=r.colors,a=t.isFocused;return G({alignItems:"center",display:"flex"},n?{}:{borderRadius:i/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},v4=function(t){var n=t.children,r=t.innerProps;return X("div",r,n)},cZ=v4,dZ=v4;function fZ(e){var t=e.children,n=e.innerProps;return X("div",K({role:"button"},n),t||X(Ay,{size:14}))}var pZ=function(t){var n=t.children,r=t.components,o=t.data,i=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return X(u,{data:o,innerProps:G(G({},We(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),i),selectProps:l},X(c,{data:o,innerProps:G({},We(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),X(d,{data:o,innerProps:G(G({},We(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},hZ=pZ,mZ=function(t,n){var r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return G({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:i?l.primary:o?l.primary25:"transparent",color:r?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:i?l.primary:l.primary50}})},vZ=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,i=t.isSelected,s=t.innerRef,a=t.innerProps;return X("div",K({},We(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":i}),{ref:s,"aria-disabled":r},a),n)},gZ=vZ,yZ=function(t,n){var r=t.theme,o=r.spacing,i=r.colors;return G({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:i.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},bZ=function(t){var n=t.children,r=t.innerProps;return X("div",K({},We(t,"placeholder",{placeholder:!0}),r),n)},SZ=bZ,xZ=function(t,n){var r=t.isDisabled,o=t.theme,i=o.spacing,s=o.colors;return G({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},wZ=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return X("div",K({},We(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},kZ=wZ,CZ={ClearIndicator:zQ,Control:GQ,DropdownIndicator:NQ,DownChevron:p4,CrossIcon:Ay,Group:eZ,GroupHeading:JQ,IndicatorsContainer:IQ,IndicatorSeparator:jQ,Input:sZ,LoadingIndicator:UQ,Menu:bQ,MenuList:xQ,MenuPortal:TQ,LoadingMessage:PQ,NoOptionsMessage:CQ,MultiValue:hZ,MultiValueContainer:cZ,MultiValueLabel:dZ,MultiValueRemove:fZ,Option:gZ,Placeholder:SZ,SelectContainer:$Q,SingleValue:kZ,ValueContainer:RQ},PZ=function(t){return G(G({},CZ),t.components)},uk=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function EZ(e,t){return!!(e===t||uk(e)&&uk(t))}function TZ(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return s?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,i=t.label,s=i===void 0?"":i,a=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(h,S){return h&&h.length?"".concat(h.indexOf(S)+1," of ").concat(h.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(d(a,r),".");if(n==="menu"&&c){var f=l?" disabled":"",p="".concat(u?" selected":"").concat(f);return"".concat(s).concat(p,", ").concat(d(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},MZ=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,m=l.isMulti,h=l.isOptionDisabled,S=l.isSearchable,v=l.menuIsOpen,y=l.options,b=l.screenReaderStatus,x=l.tabSelectsValue,k=l.isLoading,P=l["aria-label"],C=l["aria-live"],E=g.useMemo(function(){return G(G({},RZ),d||{})},[d]),_=g.useMemo(function(){var H="";if(n&&E.onChange){var N=n.option,R=n.options,O=n.removedValue,D=n.removedValues,V=n.value,oe=function(Se){return Array.isArray(Se)?null:Se},B=O||N||oe(V),ee=B?f(B):"",j=R||D||void 0,te=j?j.map(f):[],ae=G({isDisabled:B&&h(B,a),label:ee,labels:te},n);H=E.onChange(ae)}return H},[n,E,h,a,f]),$=g.useMemo(function(){var H="",N=r||o,R=!!(r&&a&&a.includes(r));if(N&&E.onFocus){var O={focused:N,label:f(N),isDisabled:h(N,a),isSelected:R,options:i,context:N===r?"menu":"value",selectValue:a,isAppleDevice:c};H=E.onFocus(O)}return H},[r,o,f,h,E,i,a,c]),M=g.useMemo(function(){var H="";if(v&&y.length&&!k&&E.onFilter){var N=b({count:i.length});H=E.onFilter({inputValue:p,resultsMessage:N})}return H},[i,p,v,E,y,b,k]),F=(n==null?void 0:n.action)==="initial-input-focus",W=g.useMemo(function(){var H="";if(E.guidance){var N=o?"value":v?"menu":"input";H=E.guidance({"aria-label":P,context:N,isDisabled:r&&h(r,a),isMulti:m,isSearchable:S,tabSelectsValue:x,isInitialFocus:F})}return H},[P,r,o,m,h,S,v,E,a,x,F]),re=X(g.Fragment,null,X("span",{id:"aria-selection"},_),X("span",{id:"aria-focused"},$),X("span",{id:"aria-results"},M),X("span",{id:"aria-guidance"},W));return X(g.Fragment,null,X(ck,{id:u},F&&re),X(ck,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!F&&re))},IZ=MZ,Hv=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],AZ=new RegExp("["+Hv.map(function(e){return e.letters}).join("")+"]","g"),g4={};for(var Mh=0;Mh-1}},NZ=["innerRef"];function VZ(e){var t=e.innerRef,n=Zn(e,NZ),r=dQ(n,"onExited","in","enter","exit","appear");return X("input",K({ref:t},r,{css:Gg({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zZ=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function BZ(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,s=g.useRef(!1),a=g.useRef(!1),l=g.useRef(0),u=g.useRef(null),c=g.useCallback(function(S,v){if(u.current!==null){var y=u.current,b=y.scrollTop,x=y.scrollHeight,k=y.clientHeight,P=u.current,C=v>0,E=x-k-b,_=!1;E>v&&s.current&&(r&&r(S),s.current=!1),C&&a.current&&(i&&i(S),a.current=!1),C&&v>E?(n&&!s.current&&n(S),P.scrollTop=x,_=!0,s.current=!0):!C&&-v>b&&(o&&!a.current&&o(S),P.scrollTop=0,_=!0,a.current=!0),_&&zZ(S)}},[n,r,o,i]),d=g.useCallback(function(S){c(S,S.deltaY)},[c]),f=g.useCallback(function(S){l.current=S.changedTouches[0].clientY},[]),p=g.useCallback(function(S){var v=l.current-S.changedTouches[0].clientY;c(S,v)},[c]),m=g.useCallback(function(S){if(S){var v=lQ?{passive:!1}:!1;S.addEventListener("wheel",d,v),S.addEventListener("touchstart",f,v),S.addEventListener("touchmove",p,v)}},[p,f,d]),h=g.useCallback(function(S){S&&(S.removeEventListener("wheel",d,!1),S.removeEventListener("touchstart",f,!1),S.removeEventListener("touchmove",p,!1))},[p,f,d]);return g.useEffect(function(){if(t){var S=u.current;return m(S),function(){h(S)}}},[t,m,h]),function(S){u.current=S}}var fk=["boxSizing","height","overflow","paddingRight","position"],pk={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function hk(e){e.preventDefault()}function mk(e){e.stopPropagation()}function vk(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function gk(){return"ontouchstart"in window||navigator.maxTouchPoints}var yk=!!(typeof window<"u"&&window.document&&window.document.createElement),pa=0,Di={capture:!1,passive:!1};function jZ(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=g.useRef({}),i=g.useRef(null),s=g.useCallback(function(l){if(yk){var u=document.body,c=u&&u.style;if(r&&fk.forEach(function(m){var h=c&&c[m];o.current[m]=h}),r&&pa<1){var d=parseInt(o.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+d||0;Object.keys(pk).forEach(function(m){var h=pk[m];c&&(c[m]=h)}),c&&(c.paddingRight="".concat(p,"px"))}u&&gk()&&(u.addEventListener("touchmove",hk,Di),l&&(l.addEventListener("touchstart",vk,Di),l.addEventListener("touchmove",mk,Di))),pa+=1}},[r]),a=g.useCallback(function(l){if(yk){var u=document.body,c=u&&u.style;pa=Math.max(pa-1,0),r&&pa<1&&fk.forEach(function(d){var f=o.current[d];c&&(c[d]=f)}),u&&gk()&&(u.removeEventListener("touchmove",hk,Di),l&&(l.removeEventListener("touchstart",vk,Di),l.removeEventListener("touchmove",mk,Di)))}},[r]);return g.useEffect(function(){if(t){var l=i.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){i.current=l}}var HZ=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},WZ={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function UZ(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,i=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,u=BZ({isEnabled:o,onBottomArrive:i,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),c=jZ({isEnabled:n}),d=function(p){u(p),c(p)};return X(g.Fragment,null,n&&X("div",{onClick:HZ,css:WZ}),t(d))}var qZ={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},KZ=function(t){var n=t.name,r=t.onFocus;return X("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:qZ,value:"",onChange:function(){}})},GZ=KZ;function Dy(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function YZ(){return Dy(/^iPhone/i)}function b4(){return Dy(/^Mac/i)}function XZ(){return Dy(/^iPad/i)||b4()&&navigator.maxTouchPoints>1}function QZ(){return YZ()||XZ()}function ZZ(){return b4()||QZ()}var JZ=function(t){return t.label},S4=function(t){return t.label},x4=function(t){return t.value},eJ=function(t){return!!t.isDisabled},tJ={clearIndicator:VQ,container:_Q,control:qQ,dropdownIndicator:LQ,group:XQ,groupHeading:ZQ,indicatorsContainer:MQ,indicatorSeparator:BQ,input:nZ,loadingIndicator:WQ,loadingMessage:kQ,menu:vQ,menuList:SQ,menuPortal:EQ,multiValue:aZ,multiValueLabel:lZ,multiValueRemove:uZ,noOptionsMessage:wQ,option:mZ,placeholder:yZ,singleValue:xZ,valueContainer:OQ},nJ={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},rJ=4,w4=4,oJ=38,iJ=w4*2,sJ={baseUnit:w4,controlHeight:oJ,menuGutter:iJ},Dh={borderRadius:rJ,colors:nJ,spacing:sJ},aJ={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ak(),captureMenuScroll:!ak(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:LZ(),formatGroupLabel:JZ,getOptionLabel:S4,getOptionValue:x4,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:eJ,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!sQ(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function bk(e,t,n,r){var o=P4(e,t,n),i=E4(e,t,n),s=C4(e,t),a=qd(e,t);return{type:"option",data:t,isDisabled:o,isSelected:i,label:s,value:a,index:r}}function Vc(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(s,a){return bk(e,s,t,a)}).filter(function(s){return xk(e,s)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=bk(e,n,t,r);return xk(e,i)?i:void 0}).filter(uQ)}function k4(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,xs(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Sk(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,xs(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function lJ(e,t){return k4(Vc(e,t))}function xk(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!_4(e)||!i)&&T4(e,{label:s,value:a,data:o},r)}function uJ(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var i=t.indexOf(n);if(i>-1)return n;if(o-1?n:t[0]}var Fh=function(t,n){var r,o=(r=t.find(function(i){return i.data===n}))===null||r===void 0?void 0:r.id;return o||null},C4=function(t,n){return t.getOptionLabel(n)},qd=function(t,n){return t.getOptionValue(n)};function P4(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function E4(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=qd(e,t);return n.some(function(o){return qd(e,o)===r})}function T4(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var _4=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},dJ=1,nu=function(e){RX(n,e);var t=AX(n);function n(r){var o;if($X(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=ZZ(),o.controlRef=null,o.getControlRef=function(l){o.controlRef=l},o.focusedOptionRef=null,o.getFocusedOptionRef=function(l){o.focusedOptionRef=l},o.menuListRef=null,o.getMenuListRef=function(l){o.menuListRef=l},o.inputRef=null,o.getInputRef=function(l){o.inputRef=l},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(l,u){var c=o.props,d=c.onChange,f=c.name;u.name=f,o.ariaOnChange(l,u),d(l,u)},o.setValue=function(l,u,c){var d=o.props,f=d.closeMenuOnSelect,p=d.isMulti,m=d.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),f&&(o.setState({inputIsHiddenAfterUpdate:!p}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(l,{action:u,option:c})},o.selectOption=function(l){var u=o.props,c=u.blurInputOnSelect,d=u.isMulti,f=u.name,p=o.state.selectValue,m=d&&o.isOptionSelected(l,p),h=o.isOptionDisabled(l,p);if(m){var S=o.getOptionValue(l);o.setValue(p.filter(function(v){return o.getOptionValue(v)!==S}),"deselect-option",l)}else if(!h)d?o.setValue([].concat(xs(p),[l]),"select-option",l):o.setValue(l,"select-option");else{o.ariaOnChange(l,{action:"select-option",option:l,name:f});return}c&&o.blurInput()},o.removeValue=function(l){var u=o.props.isMulti,c=o.state.selectValue,d=o.getOptionValue(l),f=c.filter(function(m){return o.getOptionValue(m)!==d}),p=Ra(u,f,f[0]||null);o.onChange(p,{action:"remove-value",removedValue:l}),o.focusInput()},o.clearValue=function(){var l=o.state.selectValue;o.onChange(Ra(o.props.isMulti,[],null),{action:"clear",removedValues:l})},o.popValue=function(){var l=o.props.isMulti,u=o.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),f=Ra(l,d,d[0]||null);o.onChange(f,{action:"pop-value",removedValue:c})},o.getFocusedOptionId=function(l){return Fh(o.state.focusableOptionsWithIds,l)},o.getFocusableOptionsWithIds=function(){return Sk(Vc(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;cp||f>p}},o.onTouchEnd=function(l){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(l.target)&&o.menuListRef&&!o.menuListRef.contains(l.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(l){o.userIsDragging||o.onControlMouseDown(l)},o.onClearIndicatorTouchEnd=function(l){o.userIsDragging||o.onClearIndicatorMouseDown(l)},o.onDropdownIndicatorTouchEnd=function(l){o.userIsDragging||o.onDropdownIndicatorMouseDown(l)},o.handleInputChange=function(l){var u=o.props.inputValue,c=l.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(c,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(l){o.props.onFocus&&o.props.onFocus(l),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(l){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(l),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(l){if(!(o.blockOptionHover||o.state.focusedOption===l)){var u=o.getFocusableOptions(),c=u.indexOf(l);o.setState({focusedOption:l,focusedOptionId:c>-1?o.getFocusedOptionId(l):null})}},o.shouldHideSelectedOptions=function(){return _4(o.props)},o.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),o.focus()},o.onKeyDown=function(l){var u=o.props,c=u.isMulti,d=u.backspaceRemovesValue,f=u.escapeClearsValue,p=u.inputValue,m=u.isClearable,h=u.isDisabled,S=u.menuIsOpen,v=u.onKeyDown,y=u.tabSelectsValue,b=u.openMenuOnFocus,x=o.state,k=x.focusedOption,P=x.focusedValue,C=x.selectValue;if(!h&&!(typeof v=="function"&&(v(l),l.defaultPrevented))){switch(o.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||p)return;o.focusValue("previous");break;case"ArrowRight":if(!c||p)return;o.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(P)o.removeValue(P);else{if(!d)return;c?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||l.shiftKey||!S||!y||!k||b&&o.isOptionSelected(k,C))return;o.selectOption(k);break;case"Enter":if(l.keyCode===229)break;if(S){if(!k||o.isComposing)return;o.selectOption(k);break}return;case"Escape":S?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:p}),o.onMenuClose()):m&&f&&o.clearValue();break;case" ":if(p)return;if(!S){o.openMenu("first");break}if(!k)return;o.selectOption(k);break;case"ArrowUp":S?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":S?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!S)return;o.focusOption("pageup");break;case"PageDown":if(!S)return;o.focusOption("pagedown");break;case"Home":if(!S)return;o.focusOption("first");break;case"End":if(!S)return;o.focusOption("last");break;default:return}l.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++dJ),o.state.selectValue=Wd(r.value),r.menuIsOpen&&o.state.selectValue.length){var i=o.getFocusableOptionsWithIds(),s=o.buildFocusableOptions(),a=s.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=i,o.state.focusedOption=s[a],o.state.focusedOptionId=Fh(i,s[a])}return o}return OX(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&sk(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var i=this.props,s=i.isDisabled,a=i.menuIsOpen,l=this.state.isFocused;(l&&!s&&o.isDisabled||l&&a&&!o.menuIsOpen)&&this.focusInput(),l&&s&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(sk(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,i){this.props.onInputChange(o,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var i=this,s=this.state,a=s.selectValue,l=s.isFocused,u=this.buildFocusableOptions(),c=o==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(a[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(o){var i=this.state,s=i.selectValue,a=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var u=s.length-1,c=-1;if(s.length){switch(o){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,u=a.indexOf(s);s||(u=-1),o==="up"?l=u>0?u-1:a.length-1:o==="down"?l=(u+1)%a.length:o==="pageup"?(l=u-i,l<0&&(l=0)):o==="pagedown"?(l=u+i,l>a.length-1&&(l=a.length-1)):o==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Dh):G(G({},Dh),this.props.theme):Dh}},{key:"getCommonProps",value:function(){var o=this.clearValue,i=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,f=d.isMulti,p=d.isRtl,m=d.options,h=this.hasValue();return{clearValue:o,cx:i,getStyles:s,getClassNames:a,getValue:l,hasValue:h,isMulti:f,isRtl:p,options:m,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,i=o.isClearable,s=o.isMulti;return i===void 0?s:i}},{key:"isOptionDisabled",value:function(o,i){return P4(this.props,o,i)}},{key:"isOptionSelected",value:function(o,i){return E4(this.props,o,i)}},{key:"filterOption",value:function(o,i){return T4(this.props,o,i)}},{key:"formatOptionLabel",value:function(o,i){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(o,{context:i,inputValue:s,selectValue:a})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,i=o.isDisabled,s=o.isSearchable,a=o.inputId,l=o.inputValue,u=o.tabIndex,c=o.form,d=o.menuIsOpen,f=o.required,p=this.getComponents(),m=p.Input,h=this.state,S=h.inputIsHidden,v=h.ariaSelection,y=this.commonProps,b=a||this.getElementId("input"),x=G(G(G({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?g.createElement(m,K({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:i,isHidden:S,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},x)):g.createElement(VZ,K({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Hd,onFocus:this.onInputFocus,disabled:i,tabIndex:u,inputMode:"none",form:c,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,i=this.getComponents(),s=i.MultiValue,a=i.MultiValueContainer,l=i.MultiValueLabel,u=i.MultiValueRemove,c=i.SingleValue,d=i.Placeholder,f=this.commonProps,p=this.props,m=p.controlShouldRenderValue,h=p.isDisabled,S=p.isMulti,v=p.inputValue,y=p.placeholder,b=this.state,x=b.selectValue,k=b.focusedValue,P=b.isFocused;if(!this.hasValue()||!m)return v?null:g.createElement(d,K({},f,{key:"placeholder",isDisabled:h,isFocused:P,innerProps:{id:this.getElementId("placeholder")}}),y);if(S)return x.map(function(E,_){var $=E===k,M="".concat(o.getOptionLabel(E),"-").concat(o.getOptionValue(E));return g.createElement(s,K({},f,{components:{Container:a,Label:l,Remove:u},isFocused:$,isDisabled:h,key:M,index:_,removeProps:{onClick:function(){return o.removeValue(E)},onTouchEnd:function(){return o.removeValue(E)},onMouseDown:function(W){W.preventDefault()}},data:E}),o.formatOptionLabel(E,"value"))});if(v)return null;var C=x[0];return g.createElement(c,K({},f,{data:C,isDisabled:h}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),i=o.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(i,K({},s,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),i=o.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!i||!u)return null;var d={"aria-hidden":"true"};return g.createElement(i,K({},s,{innerProps:d,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator,s=o.IndicatorSeparator;if(!i||!s)return null;var a=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return g.createElement(s,K({},a,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),i=o.DropdownIndicator;if(!i)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(i,K({},s,{innerProps:u,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var o=this,i=this.getComponents(),s=i.Group,a=i.GroupHeading,l=i.Menu,u=i.MenuList,c=i.MenuPortal,d=i.LoadingMessage,f=i.NoOptionsMessage,p=i.Option,m=this.commonProps,h=this.state.focusedOption,S=this.props,v=S.captureMenuScroll,y=S.inputValue,b=S.isLoading,x=S.loadingMessage,k=S.minMenuHeight,P=S.maxMenuHeight,C=S.menuIsOpen,E=S.menuPlacement,_=S.menuPosition,$=S.menuPortalTarget,M=S.menuShouldBlockScroll,F=S.menuShouldScrollIntoView,W=S.noOptionsMessage,re=S.onMenuScrollToTop,H=S.onMenuScrollToBottom;if(!C)return null;var N=function(ee,j){var te=ee.type,ae=ee.data,we=ee.isDisabled,Se=ee.isSelected,xt=ee.label,Ln=ee.value,Bt=h===ae,pe=we?void 0:function(){return o.onOptionHover(ae)},tt=we?void 0:function(){return o.selectOption(ae)},Sn="".concat(o.getElementId("option"),"-").concat(j),ne={id:Sn,onClick:tt,onMouseMove:pe,onMouseOver:pe,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:Se};return g.createElement(p,K({},m,{innerProps:ne,data:ae,isDisabled:we,isSelected:Se,key:Sn,label:xt,type:te,value:Ln,isFocused:Bt,innerRef:Bt?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(ee.data,"menu"))},R;if(this.hasOptions())R=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var ee=B.data,j=B.options,te=B.index,ae="".concat(o.getElementId("group"),"-").concat(te),we="".concat(ae,"-heading");return g.createElement(s,K({},m,{key:ae,data:ee,options:j,Heading:a,headingProps:{id:we,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(Se){return N(Se,"".concat(te,"-").concat(Se.index))}))}else if(B.type==="option")return N(B,"".concat(B.index))});else if(b){var O=x({inputValue:y});if(O===null)return null;R=g.createElement(d,m,O)}else{var D=W({inputValue:y});if(D===null)return null;R=g.createElement(f,m,D)}var V={minMenuHeight:k,maxMenuHeight:P,menuPlacement:E,menuPosition:_,menuShouldScrollIntoView:F},oe=g.createElement(gQ,K({},m,V),function(B){var ee=B.ref,j=B.placerProps,te=j.placement,ae=j.maxHeight;return g.createElement(l,K({},m,V,{innerRef:ee,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:te}),g.createElement(UZ,{captureEnabled:v,onTopArrive:re,onBottomArrive:H,lockEnabled:M},function(we){return g.createElement(u,K({},m,{innerRef:function(xt){o.getMenuListRef(xt),we(xt)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:ae,focusedOption:h}),R)}))});return $||_==="fixed"?g.createElement(c,K({},m,{appendTo:$,controlElement:this.controlRef,menuPlacement:E,menuPosition:_}),oe):oe}},{key:"renderFormField",value:function(){var o=this,i=this.props,s=i.delimiter,a=i.isDisabled,l=i.isMulti,u=i.name,c=i.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!a)return g.createElement(GZ,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(l)if(s){var f=d.map(function(h){return o.getOptionValue(h)}).join(s);return g.createElement("input",{name:u,type:"hidden",value:f})}else{var p=d.length>0?d.map(function(h,S){return g.createElement("input",{key:"i-".concat(S),name:u,type:"hidden",value:o.getOptionValue(h)})}):g.createElement("input",{name:u,type:"hidden",value:""});return g.createElement("div",null,p)}else{var m=d[0]?this.getOptionValue(d[0]):"";return g.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,i=this.state,s=i.ariaSelection,a=i.focusedOption,l=i.focusedValue,u=i.isFocused,c=i.selectValue,d=this.getFocusableOptions();return g.createElement(IZ,K({},o,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),i=o.Control,s=o.IndicatorsContainer,a=o.SelectContainer,l=o.ValueContainer,u=this.props,c=u.className,d=u.id,f=u.isDisabled,p=u.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return g.createElement(a,K({},h,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:m}),this.renderLiveRegion(),g.createElement(i,K({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:m,menuIsOpen:p}),g.createElement(l,K({},h,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),g.createElement(s,K({},h,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,i){var s=i.prevProps,a=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,u=i.ariaSelection,c=i.isFocused,d=i.prevWasFocused,f=i.instancePrefix,p=o.options,m=o.value,h=o.menuIsOpen,S=o.inputValue,v=o.isMulti,y=Wd(m),b={};if(s&&(m!==s.value||p!==s.options||h!==s.menuIsOpen||S!==s.inputValue)){var x=h?lJ(o,y):[],k=h?Sk(Vc(o,y),"".concat(f,"-option")):[],P=a?uJ(i,y):null,C=cJ(i,x),E=Fh(k,C);b={selectValue:y,focusedOption:C,focusedOptionId:E,focusableOptionsWithIds:k,focusedValue:P,clearFocusValueOnUpdate:!1}}var _=l!=null&&o!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},$=u,M=c&&d;return c&&!M&&($={value:Ra(v,y,y[0]||null),options:y,action:"initial-input-focus"},M=!d),(u==null?void 0:u.action)==="initial-input-focus"&&($=null),G(G(G({},b),_),{},{prevProps:o,ariaSelection:$,prevWasFocused:M})}}]),n}(g.Component);nu.defaultProps=aJ;var fJ=g.forwardRef(function(e,t){var n=Zf(e);return g.createElement(nu,K({ref:t},n))}),pJ=fJ,hJ=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],wk=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),i=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return i===o||s===o},Lh={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(i){return wk(t,i,o)})||r.some(function(i){return wk(t,i,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function $4(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,i=e.formatCreateLabel,s=i===void 0?Lh.formatCreateLabel:i,a=e.isValidNewOption,l=a===void 0?Lh.isValidNewOption:a,u=e.getNewOptionData,c=u===void 0?Lh.getNewOptionData:u,d=e.onCreateOption,f=e.options,p=f===void 0?[]:f,m=e.onChange,h=Zn(e,hJ),S=h.getOptionValue,v=S===void 0?x4:S,y=h.getOptionLabel,b=y===void 0?S4:y,x=h.inputValue,k=h.isLoading,P=h.isMulti,C=h.value,E=h.name,_=g.useMemo(function(){return l(x,Wd(C),p,{getOptionValue:v,getOptionLabel:b})?c(x,s(x)):void 0},[s,c,b,v,x,l,p,C]),$=g.useMemo(function(){return(n||!k)&&_?o==="first"?[_].concat(xs(p)):[].concat(xs(p),[_]):p},[n,o,k,_,p]),M=g.useCallback(function(F,W){if(W.action!=="select-option")return m(F,W);var re=Array.isArray(F)?F:[F];if(re[re.length-1]===_){if(d)d(x);else{var H=c(x,x),N={action:"create-option",name:E,option:H};m(Ra(P,[].concat(xs(Wd(C)),[H]),H),N)}return}m(F,W)},[c,x,P,E,_,d,m,C]);return G(G({},h),{},{options:$,onChange:M})}var mJ=g.forwardRef(function(e,t){var n=Zf(e),r=$4(n);return g.createElement(nu,K({ref:t},r))}),vJ=mJ,gJ=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function O4(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,i=e.loadOptions;e.options;var s=e.isLoading,a=s===void 0?!1:s,l=e.onInputChange,u=e.filterOption,c=u===void 0?null:u,d=Zn(e,gJ),f=d.inputValue,p=g.useRef(void 0),m=g.useRef(!1),h=g.useState(Array.isArray(n)?n:void 0),S=st(h,2),v=S[0],y=S[1],b=g.useState(typeof f<"u"?f:""),x=st(b,2),k=x[0],P=x[1],C=g.useState(n===!0),E=st(C,2),_=E[0],$=E[1],M=g.useState(void 0),F=st(M,2),W=F[0],re=F[1],H=g.useState([]),N=st(H,2),R=N[0],O=N[1],D=g.useState(!1),V=st(D,2),oe=V[0],B=V[1],ee=g.useState({}),j=st(ee,2),te=j[0],ae=j[1],we=g.useState(void 0),Se=st(we,2),xt=Se[0],Ln=Se[1],Bt=g.useState(void 0),pe=st(Bt,2),tt=pe[0],Sn=pe[1];o!==tt&&(ae({}),Sn(o)),n!==xt&&(y(Array.isArray(n)?n:void 0),Ln(n)),g.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var ne=g.useCallback(function(nt,wt){if(!i)return wt();var De=i(nt,wt);De&&typeof De.then=="function"&&De.then(wt,function(){return wt()})},[i]);g.useEffect(function(){n===!0&&ne(k,function(nt){m.current&&(y(nt||[]),$(!!p.current))})},[]);var Pe=g.useCallback(function(nt,wt){var De=tQ(nt,wt,l);if(!De){p.current=void 0,P(""),re(""),O([]),$(!1),B(!1);return}if(o&&te[De])P(De),re(De),O(te[De]),$(!1),B(!1);else{var Ei=p.current={};P(De),$(!0),B(!W),ne(De,function(Ti){m&&Ei===p.current&&(p.current=void 0,$(!1),re(De),O(Ti||[]),B(!1),ae(Ti?G(G({},te),{},ei({},De,Ti)):te))})}},[o,ne,W,te,l]),Be=oe?[]:k&&W?R:v||[];return G(G({},d),{},{options:Be,isLoading:_||a,onInputChange:Pe,filterOption:c})}var yJ=g.forwardRef(function(e,t){var n=O4(e),r=Zf(n);return g.createElement(nu,K({ref:t},r))}),bJ=yJ,SJ=g.forwardRef(function(e,t){var n=O4(e),r=Zf(n),o=$4(r);return g.createElement(nu,K({ref:t},o))}),xJ=SJ,R4=e=>{let{className:t,clearValue:n,cx:r,getStyles:o,getClassNames:i,getValue:s,hasValue:a,isMulti:l,isRtl:u,options:c,selectOption:d,selectProps:f,setValue:p,theme:m,...h}=e;return{...h}},wJ=e=>typeof e=="string"&&["sm","md","lg"].includes(e),kJ=e=>wJ(e)?e:e==="xs"?"sm":e==="xl"?"lg":"md",Jn=e=>{let t=Yr(),n=kJ(t.components.Input.defaultProps.size),r=e??n;return qH(typeof r=="string"?[r]:r,{fallback:"md"})||n},CJ=e=>{let{children:t,className:n,cx:r,innerProps:o,isDisabled:i,isRtl:s,hasValue:a,selectProps:{chakraStyles:l}}=e,u={position:"relative",direction:s?"rtl":void 0,...i?{cursor:"not-allowed"}:{}},c=l!=null&&l.container?l.container(u,e):u;return w.jsx(et,{...o,className:r({"--is-disabled":i,"--is-rtl":s,"--has-value":a},n),sx:c,children:t})},PJ=e=>{let{children:t,className:n,cx:r,isMulti:o,hasValue:i,innerProps:s,selectProps:{chakraStyles:a,size:l,variant:u,focusBorderColor:c,errorBorderColor:d,controlShouldRenderValue:f}}=e,p=Jn(l),m=ut("Input",{size:p,variant:u,focusBorderColor:c,errorBorderColor:d}),h={display:o&&i&&f?"flex":"grid",alignItems:"center",flex:1,paddingY:"2px",paddingX:m.field.px,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},S=a!=null&&a.valueContainer?a.valueContainer(h,e):h;return w.jsx(et,{...s,className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n),sx:S,children:t})},EJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i}}=e,s={display:"flex",alignItems:"center",alignSelf:"stretch",flexShrink:0},a=i!=null&&i.indicatorsContainer?i.indicatorsContainer(s,e):s;return w.jsx(et,{...o,className:r({indicators:!0},n),sx:a,children:t})},TJ=e=>{let{className:t,cx:n,children:r,innerRef:o,innerProps:i,isDisabled:s,isFocused:a,menuIsOpen:l,selectProps:{chakraStyles:u,size:c,variant:d,focusBorderColor:f,errorBorderColor:p,isInvalid:m,isReadOnly:h}}=e,S=Jn(c),{field:{height:v,h:y,...b}}=ut("Input",{size:S,variant:d,focusBorderColor:f,errorBorderColor:p}),x={...b,position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",padding:0,overflow:"hidden",height:"auto",minH:v||y,...s?{pointerEvents:"none"}:{}},k=u!=null&&u.control?u.control(x,e):x;return w.jsx(et,{ref:o,className:n({control:!0,"control--is-disabled":s,"control--is-focused":a,"control--menu-is-open":l},t),sx:k,...i,"data-focus":a?!0:void 0,"data-focus-visible":a?!0:void 0,"data-invalid":m?!0:void 0,"data-disabled":s?!0:void 0,"data-readonly":h?!0:void 0,children:r})},_J=e=>{let{className:t,cx:n,selectProps:{chakraStyles:r,useBasicStyles:o,variant:i}}=e,s={opacity:1,...o||i!=="outline"?{display:"none"}:{}},a=r!=null&&r.indicatorSeparator?r.indicatorSeparator(s,e):s;return w.jsx(f_,{className:n({"indicator-separator":!0},t),sx:a,orientation:"vertical"})},$J=e=>w.jsx(Qn,{role:"presentation",focusable:"false","aria-hidden":"true",...e,children:w.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),OJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,useBasicStyles:s,size:a,focusBorderColor:l,errorBorderColor:u,variant:c}}=e,d=Jn(a),f=ut("Input",{size:d,variant:c,focusBorderColor:l,errorBorderColor:u}),p={sm:"16px",md:"20px",lg:"24px"}[d],m={...f.addon,display:"flex",alignItems:"center",justifyContent:"center",height:"100%",borderRadius:0,borderWidth:0,fontSize:p,...s&&{background:"transparent",padding:0,width:6,marginRight:2,marginLeft:1,cursor:"inherit"}},h=i!=null&&i.dropdownIndicator?i.dropdownIndicator(m,e):m,S={height:"1em",width:"1em"},v=i!=null&&i.downChevron?i.downChevron(S,e):S;return w.jsx(et,{...o,className:r({indicator:!0,"dropdown-indicator":!0},n),sx:h,children:t||w.jsx($J,{sx:v})})},RJ=e=>w.jsx(Qn,{focusable:"false","aria-hidden":!0,...e,children:w.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}),MJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,size:s}}=e,a=Jn(s),l={...en("CloseButton",{size:a}),marginX:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:"pointer"},u=i!=null&&i.clearIndicator?i.clearIndicator(l,e):l,c={width:"1em",height:"1em"},d=i!=null&&i.crossIcon?i.crossIcon(c,e):c;return w.jsx(et,{role:"button",className:r({indicator:!0,"clear-indicator":!0},n),sx:u,"aria-label":"Clear selected options",...o,children:t||w.jsx(RJ,{sx:d})})},IJ=e=>{let{className:t,cx:n,innerProps:r,selectProps:{chakraStyles:o,size:i},color:s,emptyColor:a,speed:l,thickness:u,spinnerSize:c}=e,d=Jn(i),f={sm:"xs",md:"sm",lg:"md"}[d],p={marginRight:3},m=o!=null&&o.loadingIndicator?o.loadingIndicator(p,e):p;return w.jsx(Vf,{className:n({indicator:!0,"loading-indicator":!0},t),sx:m,...r,size:c||f,color:s,emptyColor:a,speed:l,thickness:u})},AJ=TJ,DJ=e=>{let{className:t,cx:n,value:r,selectProps:{chakraStyles:o,isReadOnly:i}}=e,{innerRef:s,isDisabled:a,isHidden:l,inputClassName:u,...c}=R4(e),d={gridArea:"1 / 2",minW:"2px",border:0,margin:0,outline:0,padding:0},f={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",visibility:a?"hidden":"visible",transform:r?"translateZ(0)":"",_after:{content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0,...d}},p=o!=null&&o.inputContainer?o.inputContainer(f,e):f,m={background:0,opacity:l?0:1,width:"100%",...d},h=o!=null&&o.input?o.input(m,e):m;return w.jsx(et,{className:n({"input-container":!0},t),"data-value":r||"",sx:p,children:w.jsx(A.input,{className:n({input:!0},u),ref:s,sx:h,disabled:a,readOnly:i?!0:void 0,...c})})},FJ=DJ,LJ=e=>e?{bottom:"top",top:"bottom"}[e]:"top",NJ=e=>{let{className:t,cx:n,children:r,innerProps:o,innerRef:i,placement:s,selectProps:{chakraStyles:a}}=e,l={position:"absolute",[LJ(s)]:"100%",marginY:"8px",width:"100%",zIndex:1},u=a!=null&&a.menu?a.menu(l,e):l;return w.jsx(P_,{children:w.jsx(et,{...o,ref:i,className:n({menu:!0},t),sx:u,children:r})})},VJ=NJ,zJ=e=>{var t;let{className:n,cx:r,innerRef:o,children:i,maxHeight:s,isMulti:a,innerProps:l,selectProps:{chakraStyles:u,size:c,variant:d,focusBorderColor:f,errorBorderColor:p}}=e,m=ut("Menu"),h=Jn(c),S=ut("Input",{size:h,variant:d,focusBorderColor:f,errorBorderColor:p}).field,v={...m.list,minW:"100%",maxHeight:`${s}px`,overflowY:"auto","--input-border-radius":S==null?void 0:S["--input-border-radius"],borderRadius:(S==null?void 0:S.borderRadius)||((t=m.list)==null?void 0:t.borderRadius),position:"relative",WebkitOverflowScrolling:"touch"},y=u!=null&&u.menuList?u.menuList(v,e):v;return w.jsx(et,{...l,className:r({"menu-list":!0,"menu-list--is-multi":a},n),sx:y,ref:o,children:i})},BJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,size:s}}=e,a=Jn(s),l={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[a],fontSize:a},u=i!=null&&i.loadingMessage?i.loadingMessage(l,e):l;return w.jsx(et,{...o,className:r({"menu-notice":!0,"menu-notice--loading":!0},n),sx:u,children:t})},jJ=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i,size:s}}=e,a=Jn(s),l={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[a],fontSize:a},u=i!=null&&i.noOptionsMessage?i.noOptionsMessage(l,e):l;return w.jsx(et,{...o,className:r({"menu-notice":!0,"menu-notice--no-options":!0},n),sx:u,children:t})},HJ=e=>{let{children:t,className:n,cx:r,theme:o,getStyles:i,Heading:s,headingProps:a,label:l,selectProps:u,innerProps:c,getClassNames:d}=e,{chakraStyles:f}=u,p={},m=f!=null&&f.group?f.group(p,e):p;return w.jsxs(et,{...c,className:r({group:!0},n),sx:m,children:[w.jsx(s,{...a,selectProps:u,cx:r,theme:o,getStyles:i,getClassNames:d,children:l}),w.jsx(et,{children:t})]})},WJ=e=>{let{cx:t,className:n,selectProps:{chakraStyles:r,size:o,hasStickyGroupHeaders:i}}=e,{data:s,...a}=R4(e),l=ut("Menu"),u=Jn(o),c={sm:"xs",md:"sm",lg:"md"},d={sm:"0.4rem 0.8rem",md:"0.5rem 1rem",lg:"0.6rem 1.2rem"},f={...l.groupTitle,fontSize:c[u],padding:d[u],margin:0,borderBottomWidth:i?"1px":0,position:i?"sticky":"static",top:-2,bg:l.list.bg,zIndex:1},p=r!=null&&r.groupHeading?r.groupHeading(f,e):f;return w.jsx(et,{...a,className:t({"group-heading":!0},n),sx:p})},UJ=e=>w.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e,children:w.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),qJ=e=>{let{className:t,cx:n,innerRef:r,innerProps:o,children:i,isFocused:s,isDisabled:a,isSelected:l,selectProps:{chakraStyles:u,size:c,isMulti:d,hideSelectedOptions:f,selectedOptionStyle:p,selectedOptionColorScheme:m}}=e,h=ut("Menu").item,S=Jn(c),v={sm:"0.6rem",md:"0.8rem",lg:"1rem"},y={sm:"0.3rem",md:"0.4rem",lg:"0.5rem"},b=sb(`${m}.500`,`${m}.300`),x=sb("white","black"),k=p==="check"&&(!d||f===!1),P=p==="color",C={...h,cursor:"pointer",display:"flex",alignItems:"center",width:"100%",textAlign:"start",fontSize:S,paddingX:v[S],paddingY:y[S],...P&&{_selected:{bg:b,color:x,_active:{bg:b}}}},E=u!=null&&u.option?u.option(C,e):C;return w.jsxs(et,{...o,className:n({option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":l},t),sx:E,ref:r,"data-focus":s?!0:void 0,"aria-disabled":a?!0:void 0,"aria-selected":l,children:[k&&w.jsx(E_,{fontSize:"0.8em",marginEnd:"0.75rem",opacity:l?1:0,children:w.jsx(UJ,{})}),i]})},KJ=e=>typeof e=="object"&&e!==null&&"colorScheme"in e&&typeof e.colorScheme=="string",GJ=e=>typeof e=="object"&&e!==null&&"variant"in e&&typeof e.variant=="string",M4=e=>typeof e=="object"&&e!==null&&"isFixed"in e&&typeof e.isFixed=="boolean",YJ=e=>{let{children:t,className:n,components:r,cx:o,data:i,innerProps:s,isDisabled:a,isFocused:l,removeProps:u,selectProps:c,cropWithEllipsis:d}=e,{Container:f,Label:p,Remove:m}=r,{chakraStyles:h,colorScheme:S,tagVariant:v,size:y}=c,b=Jn(y),x="",k="",P=!1;KJ(i)&&(x=i.colorScheme),GJ(i)&&(k=i.variant),M4(i)&&(P=i.isFixed);let C=ut("Tag",{size:b,colorScheme:x||S,variant:k||v||(P?"solid":"subtle")}),E={...C.container,display:"flex",alignItems:"center",minWidth:0,margin:"0.125rem"},_=h!=null&&h.multiValue?h.multiValue(E,e):E,$={...C.label,overflow:"hidden",textOverflow:d||d===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},M=h!=null&&h.multiValueLabel?h.multiValueLabel($,e):$,F={...C.closeButton,display:"flex",alignItems:"center",justifyContent:"center"},W=h!=null&&h.multiValueRemove?h.multiValueRemove(F,e):F;return w.jsxs(f,{data:i,innerProps:{className:o({"multi-value":!0,"multi-value--is-disabled":a},n),...s},sx:_,selectProps:c,children:[w.jsx(p,{data:i,innerProps:{className:o({"multi-value__label":!0},n)},sx:M,selectProps:c,children:t}),w.jsx(m,{data:i,innerProps:{className:o({"multi-value__remove":!0},n),"aria-label":`Remove ${t||"option"}`,...u},sx:W,selectProps:c,isFocused:l})]})},XJ=e=>{let{children:t,innerProps:n,sx:r}=e;return w.jsx(A.span,{...n,sx:r,children:t})},QJ=e=>{let{children:t,innerProps:n,sx:r}=e;return w.jsx(A.span,{...n,sx:r,children:t})},ZJ=e=>w.jsx(Qn,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:w.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})}),JJ=e=>{let{children:t,innerProps:n,isFocused:r,data:o,sx:i}=e;return M4(o)&&o.isFixed?null:w.jsx(et,{...n,role:"button",sx:i,"data-focus":r?!0:void 0,"data-focus-visible":r?!0:void 0,children:t||w.jsx(ZJ,{})})},eee=YJ,tee=e=>{let{children:t,className:n,cx:r,innerProps:o,selectProps:{chakraStyles:i}}=e,s={gridArea:"1 / 1 / 2 / 3",color:"chakra-placeholder-color",mx:"0.125rem",userSelect:"none"},a=i!=null&&i.placeholder?i.placeholder(s,e):s;return w.jsx(et,{...o,className:r({placeholder:!0},n),sx:a,children:t})},nee=tee,ree=e=>{let{children:t,className:n,cx:r,isDisabled:o,innerProps:i,selectProps:{chakraStyles:s}}=e,a={gridArea:"1 / 1 / 2 / 3",mx:"0.125rem",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},l=s!=null&&s.singleValue?s.singleValue(a,e):a;return w.jsx(et,{className:r({"single-value":!0,"single-value--is-disabled":o},n),sx:l,...i,children:t})},oee=ree,iee={ClearIndicator:MJ,Control:AJ,DropdownIndicator:OJ,Group:HJ,GroupHeading:WJ,IndicatorSeparator:_J,IndicatorsContainer:EJ,Input:FJ,LoadingIndicator:IJ,LoadingMessage:BJ,Menu:VJ,MenuList:zJ,MultiValue:eee,MultiValueContainer:XJ,MultiValueLabel:QJ,MultiValueRemove:JJ,NoOptionsMessage:jJ,Option:qJ,Placeholder:nee,SelectContainer:CJ,SingleValue:oee,ValueContainer:PJ},see=iee,aee=({components:e={},theme:t,size:n,colorScheme:r="gray",isDisabled:o,isInvalid:i,isReadOnly:s,required:a,isRequired:l,inputId:u,tagVariant:c,selectedOptionStyle:d="color",selectedOptionColorScheme:f,selectedOptionColor:p,variant:m,focusBorderColor:h,errorBorderColor:S,chakraStyles:v={},onFocus:y,onBlur:b,menuIsOpen:x,...k})=>{var P;let C=Yr(),{variant:E}=C.components.Input.defaultProps,_=L0({id:u,isDisabled:o,isInvalid:i,isRequired:l,isReadOnly:s,onFocus:y,onBlur:b}),$=x??(_.readOnly?!1:void 0),M=d;["color","check"].includes(d)||(M="color");let F=f||p||"blue";return typeof F!="string"&&(F="blue"),{components:{...see,...e},colorScheme:r,size:n,tagVariant:c,selectedOptionStyle:M,selectedOptionColorScheme:F,variant:m??E,chakraStyles:v,focusBorderColor:h,errorBorderColor:S,onFocus:_.onFocus,onBlur:_.onBlur,isDisabled:_.disabled,isInvalid:!!_["aria-invalid"],inputId:_.id,isReadOnly:_.readOnly,required:a??_.required,menuIsOpen:$,...k,"aria-invalid":(P=k["aria-invalid"])!=null?P:_["aria-invalid"]}},ep=aee,lee=g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(pJ,{ref:t,...n})}),mte=lee;g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(vJ,{ref:t,...n})});g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(bJ,{ref:t,...n})});g.forwardRef((e,t)=>{let n=ep(e);return w.jsx(xJ,{ref:t,...n})});export{Ree as $,kee as A,bT as B,ote as C,ite as D,qee as E,jH as F,Jee as G,VH as H,c8 as I,Xee as J,rte as K,TH as L,Gee as M,lte as N,bee as O,$ee as P,sy as Q,Un as R,tte as S,SK as T,L_ as U,cte as V,FH as W,_ee as X,Tee as Y,Iee as Z,Oee as _,cee as a,Mee as a0,et as a1,Eee as a2,Aee as a3,$q as a4,DH as a5,Z0 as a6,RH as a7,MH as a8,zee as a9,NH as aA,yee as aB,Bq as aC,Pee as aD,kq as aE,A as aF,fte as aG,pte as aH,Xj as aI,fee as aJ,Uy as aK,vee as aL,dee as aM,Oe as aN,_I as aO,BH as aa,Hee as ab,h8 as ac,H8 as ad,dte as ae,qq as af,Dee as ag,Fee as ah,Vee as ai,Lee as aj,Nee as ak,s_ as al,w8 as am,C8 as an,mte as ao,pK as ap,nte as aq,Yee as ar,Dq as as,Oq as at,ste as au,sK as av,aK as aw,cK as ax,uK as ay,lK as az,Wl as b,ute as c,Ef as d,u_ as e,a8 as f,Qn as g,Wee as h,Qee as i,w as j,Kee as k,xh as l,Zee as m,Bee as n,jee as o,Tq as p,Cee as q,g as r,Pq as s,_q as t,mee as u,Cq as v,hte as w,ete as x,Uee as y,ate as z}; diff --git a/src/components/ButtonIconTooltip.jsx b/src/components/ButtonIconTooltip.jsx new file mode 100644 index 0000000..69e62ed --- /dev/null +++ b/src/components/ButtonIconTooltip.jsx @@ -0,0 +1,20 @@ +import { IconButton, Tooltip } from "@chakra-ui/react"; +import React from "react"; +import { useCallback } from "react"; + +export default function ButtonIconTooltip(props) { + const { icon, onClick, colorScheme, label, size, placement, isDisabled = false } = props; + + + const handleClick = useCallback(() => { + if (onClick) onClick(); + }, [onClick]); + + return label && placement ? ( + + + + ) : ( + + ); +} diff --git a/src/components/Header.jsx b/src/components/Header.jsx index 177c24b..87d84ee 100644 --- a/src/components/Header.jsx +++ b/src/components/Header.jsx @@ -3,16 +3,30 @@ import React, { useCallback } from "react"; import Logo from "../assets/Titan.png"; import { useApp } from "../AppContext"; import { MdBrowserUpdated, MdCode, MdCodeOff, MdDarkMode, MdSunny } from "react-icons/md"; +import { IoReload } from "react-icons/io5"; import useSocketEmits from "../hooks/useSocketEmits"; import { LuFileCog } from "react-icons/lu"; import useNotifications from "../hooks/useNotifications"; import ButtonElectron from "./ButtonElectron"; +import ButtonIconTooltip from "./ButtonIconTooltip"; export default function Header() { const { config, isDebug, setIsDebug } = useApp(); const { emitOpenConfig } = useSocketEmits(); const { RaiseClientNotificaiton } = useNotifications(); - const { colorMode, toggleColorMode } = useColorMode() + const { colorMode, toggleColorMode } = useColorMode(); + + const handleGetAppVersion = useCallback(() => { + if (!window.electron) return; + + window.electron.getAppVersion().then((version) => { + RaiseClientNotificaiton(`Application Version: v${version}`, "info", 2000); + }); + }, [RaiseClientNotificaiton]); + + const handleReload = useCallback(() => { + window.location.reload(); + }, []); const handleCheckForUpdates = useCallback(() => { window.electron.checkForUpdates().then((result) => { @@ -24,13 +38,13 @@ export default function Header() { }); }, [RaiseClientNotificaiton]); - const handleGetAppVersion = useCallback(() => { - if (!window.electron) return; + const handleOpenConfig = useCallback(() => { + emitOpenConfig(); + }, [emitOpenConfig]); - window.electron.getAppVersion().then((version) => { - RaiseClientNotificaiton(`Application Version: v${version}`, "info", 2000); - }); - }, [RaiseClientNotificaiton]); + const handleToggleDebug = useCallback(() => { + setIsDebug((prev) => !prev); + }, [setIsDebug]); return ( @@ -46,16 +60,11 @@ export default function Header() { - - } onClick={toggleColorMode} /> - + } onClick={toggleColorMode} colorScheme={"yellow"} label="Toggle Light/Dark Mode" placement={"bottom-start"} size="md" /> + } onClick={handleReload} colorScheme={"yellow"} label="Reload" placement={"bottom-start"} size="md" /> } onClick={handleCheckForUpdates} colorScheme={"yellow"} label="Check For Updates" size="md" /> - - } onClick={() => emitOpenConfig()} /> - - - : } onClick={() => setIsDebug((prev) => !prev)} /> - + } onClick={handleOpenConfig} colorScheme={"yellow"} label="Open Config File" placement={"bottom-start"} size="md" /> + : } onClick={handleToggleDebug} colorScheme={"yellow"} label={`Current Debug Mode: ${isDebug ? "on" : "off"}`} placement={"bottom-start"} size="md" /> );