specrails-desktop 2.62.0 → 2.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/dist/specrails-desktop.js +39 -5
- package/client/dist/assets/{ActivityFeedPage-C_pqc281.js → ActivityFeedPage-Bn2MpG5M.js} +1 -1
- package/client/dist/assets/{AgentBrowserCapture-vz6rbDtu.js → AgentBrowserCapture-CHlXWdXq.js} +1 -1
- package/client/dist/assets/AgentModeAnalyticsPane-yj-YCgrK.js +2 -0
- package/client/dist/assets/AgentModeCodePane-Xczcyghb.js +2 -0
- package/client/dist/assets/{AgentModeJobsPane-99fBBLri.js → AgentModeJobsPane-DtOW01ln.js} +1 -1
- package/client/dist/assets/AgentsPage-BMfJ4mzU.js +118 -0
- package/client/dist/assets/AnalyticsPage-CGn5cgtc.js +1 -0
- package/client/dist/assets/BarChart-BDMqVFJy.js +55 -0
- package/client/dist/assets/CodePage-C8NIginr.js +3 -0
- package/client/dist/assets/DesktopAnalyticsPage-C87r4y26.js +1 -0
- package/client/dist/assets/{DocsDialog-XUCYKoq0.js → DocsDialog-Z50a_KPv.js} +1 -1
- package/client/dist/assets/{DocsPage-dOLC8bXA.js → DocsPage-DIArbEPl.js} +1 -1
- package/client/dist/assets/{ExportDropdown-BvKQgwM9.js → ExportDropdown-CJdCqYd7.js} +1 -1
- package/client/dist/assets/IntegrationsPage-EAipiDWm.js +1 -0
- package/client/dist/assets/InteractiveJobComposer-BxLh4me-.js +19 -0
- package/client/dist/assets/{JobDetailModal-CkiubrkZ.js → JobDetailModal-C7dWoRu6.js} +1 -1
- package/client/dist/assets/{JobDetailPage-CNe4Wn7l.js → JobDetailPage-Ilu294WS.js} +1 -1
- package/client/dist/assets/JobsPage-fPq1hefb.js +1 -0
- package/client/dist/assets/LoopBuilderPage-5M7IypEP.js +1 -0
- package/client/dist/assets/{LoopPreviewModal-Dv3dxHr_.js → LoopPreviewModal-ChI3NQC7.js} +1 -1
- package/client/dist/assets/{LoopWindowSurface-DN2lbSnL.js → LoopWindowSurface-D1WB9i-9.js} +1 -1
- package/client/dist/assets/LoopsPage-CCwc0Biu.js +2 -0
- package/client/dist/assets/MinimizedChatsContext-eH_KaAZ1.js +1 -0
- package/client/dist/assets/PluginsPage-DfDfEfbW.js +2 -0
- package/client/dist/assets/ProjectSettingsDialog-9NHnG8JQ.js +1 -0
- package/client/dist/assets/RepositoryDeliveries-DgzNnJmn.js +5 -0
- package/client/dist/assets/{RepositoryScopeSelector-DrtPqvc_.js → RepositoryScopeSelector-BSgUqk_u.js} +1 -1
- package/client/dist/assets/ReviewPacketPage-D34bGpSA.js +4 -0
- package/client/dist/assets/{TemplatePreviewModal-DcFlhUxy.js → TemplatePreviewModal-CcfSxWQ7.js} +1 -1
- package/client/dist/assets/TicketDetailModalContext-BoafEcm4.js +16 -0
- package/client/dist/assets/Trans-CVSryAL1.js +1 -0
- package/client/dist/assets/ban-wqfdzoXt.js +1 -0
- package/client/dist/assets/{button-D1xExSTF.js → button-4FS1ZDTp.js} +1 -1
- package/client/dist/assets/chevron-up-6EFqEHBj.js +1 -0
- package/client/dist/assets/chunk-OB3PAWPO-B1EMk45A.js +3 -0
- package/client/dist/assets/circle-x-D2ttKotB.js +1 -0
- package/client/dist/assets/createLucideIcon-DtODIU64.js +1 -0
- package/client/dist/assets/{dialog-CMgps2MY.js → dialog-DtdR05v1.js} +1 -1
- package/client/dist/assets/download-C9wP_42h.js +1 -0
- package/client/dist/assets/external-link-CZ6Q-v1-.js +1 -0
- package/client/dist/assets/file-text-C0blZHLh.js +1 -0
- package/client/dist/assets/{formatDistanceToNow-DlQY1Lm_.js → formatDistanceToNow-NVM6rK3i.js} +1 -1
- package/client/dist/assets/{getTimezoneOffsetInMilliseconds-COUeq65G.js → getTimezoneOffsetInMilliseconds-ZHg7WpdH.js} +1 -1
- package/client/dist/assets/git-branch-yf6LE1Bw.js +1 -0
- package/client/dist/assets/{index-CONHvEJw.js → index-Culan6y7.js} +40 -40
- package/client/dist/assets/{index-BacrO_ub.css → index-D1v33giW.css} +1 -1
- package/client/dist/assets/jira-api-Bl8xEIpk.js +1 -0
- package/client/dist/assets/jsx-runtime-BbYvbtY8.js +1 -0
- package/client/dist/assets/layers-BCLTgHXO.js +1 -0
- package/client/dist/assets/{lib-C7Mhm-gT.js → lib-CQJT8S6Q.js} +1 -1
- package/client/dist/assets/{lib-CGdyxIWg.js → lib-DWJfei6y.js} +1 -1
- package/client/dist/assets/loader-circle-BqV9xYGf.js +1 -0
- package/client/dist/assets/{loop-layout-BF8xMiNv.js → loop-layout-CyXj9223.js} +1 -1
- package/client/dist/assets/pencil-CxrRbDwb.js +1 -0
- package/client/dist/assets/plus-fHDdjBk1.js +1 -0
- package/client/dist/assets/{project-repositories-Cc3oNv8X.js → project-repositories-CvJf1a6H.js} +1 -1
- package/client/dist/assets/react-dom-DDD8FYaU.js +1 -0
- package/client/dist/assets/rotate-ccw-DalJAQQX.js +1 -0
- package/client/dist/assets/save-LmPSfsvZ.js +1 -0
- package/client/dist/assets/search-BDVp3fkH.js +1 -0
- package/client/dist/assets/{settings-BKJZ2KEM.js → settings-BO2N-oPf.js} +1 -1
- package/client/dist/assets/{settings-LfFnl1UH.js → settings-BQChAs_w.js} +1 -1
- package/client/dist/assets/{settings-BV3jocIx.js → settings-BzmYlcQB.js} +1 -1
- package/client/dist/assets/{settings-BjM2Dw8_.js → settings-CGjXb6TX.js} +1 -1
- package/client/dist/assets/{settings-DA77M48m.js → settings-CMxEWY46.js} +1 -1
- package/client/dist/assets/{settings-P1IQvhnL.js → settings-C_dRSgI2.js} +1 -1
- package/client/dist/assets/{settings-eIMJjyK_.js → settings-Hw7av-B1.js} +1 -1
- package/client/dist/assets/{settings-CKu0LTib.js → settings-nryN6wuS.js} +1 -1
- package/client/dist/assets/sparkles-CCfUdFGY.js +1 -0
- package/client/dist/assets/spending-BfjSJjBd.js +1 -0
- package/client/dist/assets/square-D0JTbRSR.js +1 -0
- package/client/dist/assets/trash-D8zYUmTg.js +1 -0
- package/client/dist/assets/triangle-alert-Cxpn8bqr.js +1 -0
- package/client/dist/assets/upload-CCHvUkRs.js +1 -0
- package/client/dist/assets/{useDesktop-9Lwoel_8.js → useDesktop-C5JVBeur.js} +1 -1
- package/client/dist/assets/{useRuntimeRuns-DL0xYoZ2.js → useRuntimeRuns-DohBmeg8.js} +1 -1
- package/client/dist/assets/useSharedWebSocket-CNOvmgTr.js +2 -0
- package/client/dist/assets/{value-s-gzBeyF.js → value-DtOOK0wQ.js} +1 -1
- package/client/dist/assets/x-Bu7X_eR2.js +1 -0
- package/client/dist/assets/zap-bugHyWzQ.js +1 -0
- package/client/dist/index.html +43 -44
- package/docs/ci-cd.md +8 -1
- package/docs/customizing.md +1 -0
- package/docs/getting-started.md +1 -1
- package/docs/guide/de/settings/5-project-environment.md +27 -0
- package/docs/guide/en/settings/5-project-environment.md +27 -0
- package/docs/guide/es/settings/5-project-environment.md +27 -0
- package/docs/guide/fr/settings/5-project-environment.md +27 -0
- package/docs/guide/it/settings/5-project-environment.md +27 -0
- package/docs/guide/ja/settings/5-project-environment.md +27 -0
- package/docs/guide/pt/settings/5-project-environment.md +27 -0
- package/docs/guide/zh/settings/5-project-environment.md +27 -0
- package/docs/internals/api-reference.md +3 -1
- package/docs/internals/configuration.md +46 -5
- package/docs/internals/safe-pr-review-flow.md +15 -0
- package/docs/internals/source-map.md +3 -1
- package/docs/mcp.md +1 -1
- package/docs/platforms/macos.md +2 -0
- package/docs/platforms/windows-parity.md +4 -4
- package/docs/platforms/windows.md +9 -9
- package/local-runner/dist/specrails-local-runner.js +1 -1
- package/package.json +8 -9
- package/server/dist/mcp/tools/env.js +38 -3
- package/server/dist/modules/execution/runtime/queue-manager.js +8 -0
- package/server/dist/modules/loops/runtime/loop-executors.js +1 -0
- package/server/dist/modules/loops/runtime/loop-run-manager.js +7 -0
- package/server/dist/modules/project-settings/adapters/http.js +24 -0
- package/server/dist/path-resolver.js +135 -20
- package/server/dist/project-env.js +265 -17
- package/server/dist/project-registry.js +14 -0
- package/server/dist/project-router-settings.js +17 -0
- package/server/dist/worktree-node-modules.js +95 -1
- package/client/dist/assets/AgentModeAnalyticsPane-BHCcUahS.js +0 -2
- package/client/dist/assets/AgentModeCodePane-DhmxgG3W.js +0 -2
- package/client/dist/assets/AgentsPage-CTwm_6T8.js +0 -118
- package/client/dist/assets/AnalyticsPage-YD8MLoPa.js +0 -1
- package/client/dist/assets/BarChart-nBOMNfiy.js +0 -33
- package/client/dist/assets/CodePage-CLJn2F2e.js +0 -3
- package/client/dist/assets/DesktopAnalyticsPage-MWGQVbwp.js +0 -1
- package/client/dist/assets/IntegrationsPage-Bhy58lnQ.js +0 -1
- package/client/dist/assets/InteractiveJobComposer-DxOvwmBF.js +0 -19
- package/client/dist/assets/JobsPage-DSts_L_d.js +0 -1
- package/client/dist/assets/LoopBuilderPage-C9D9eer5.js +0 -1
- package/client/dist/assets/LoopsPage-DHgIreEW.js +0 -2
- package/client/dist/assets/MinimizedChatsContext-Ds2-R6qJ.js +0 -1
- package/client/dist/assets/PluginsPage-D1EJ9oja.js +0 -2
- package/client/dist/assets/ProjectSettingsDialog-DKpa1wKk.js +0 -1
- package/client/dist/assets/RepositoryDeliveries-CW4eKG3x.js +0 -5
- package/client/dist/assets/ReviewPacketPage-BtjPI0Cc.js +0 -4
- package/client/dist/assets/TicketDetailModalContext-Dea22CI-.js +0 -16
- package/client/dist/assets/Trans-CAY2Rd2f.js +0 -1
- package/client/dist/assets/ban-E4EaZe3a.js +0 -1
- package/client/dist/assets/chevron-up-CwGUHd6D.js +0 -1
- package/client/dist/assets/chunk-KS7C4IRE-DEKu087k.js +0 -3
- package/client/dist/assets/circle-x-CMYsN4ZH.js +0 -1
- package/client/dist/assets/createLucideIcon-Bjbbp_KS.js +0 -1
- package/client/dist/assets/dist-Bq10nS2m.js +0 -1
- package/client/dist/assets/download-CFHyyHcw.js +0 -1
- package/client/dist/assets/external-link-D6XxC_Cu.js +0 -1
- package/client/dist/assets/file-text-BcLCfcWZ.js +0 -1
- package/client/dist/assets/git-branch-BRM0F5GN.js +0 -1
- package/client/dist/assets/jira-api-C94VNHNY.js +0 -1
- package/client/dist/assets/jsx-runtime-zu2_FqZY.js +0 -1
- package/client/dist/assets/layers-eDMjG41I.js +0 -1
- package/client/dist/assets/loader-circle-DcygOQpC.js +0 -1
- package/client/dist/assets/pencil-C9RkrIPZ.js +0 -1
- package/client/dist/assets/plus-CsnjfkmX.js +0 -1
- package/client/dist/assets/react-dom-DiWzBDP9.js +0 -1
- package/client/dist/assets/rotate-ccw-Wh4id13q.js +0 -1
- package/client/dist/assets/save-B6wGWwBR.js +0 -1
- package/client/dist/assets/search-Cq_gE3Ik.js +0 -1
- package/client/dist/assets/sparkles-DrY8hb0X.js +0 -1
- package/client/dist/assets/spending-DemeFfrH.js +0 -1
- package/client/dist/assets/square-Ci-PFcFe.js +0 -1
- package/client/dist/assets/trash-2-BOU3WdZZ.js +0 -1
- package/client/dist/assets/triangle-alert-H9T4jAmh.js +0 -1
- package/client/dist/assets/upload-DYMjAQ6M.js +0 -1
- package/client/dist/assets/useSharedWebSocket-BEHPeU1Y.js +0 -2
- package/client/dist/assets/x-CBMI9ejn.js +0 -1
- package/client/dist/assets/zap-CHo3aCD1.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{n as t}from"./jsx-runtime-BbYvbtY8.js";import{t as n}from"./preload-helper-Czpn1I53.js";var r=e(t(),1),i=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a=/^[\\/]{2}/;function o(e,t){return t+e.replace(/\\/g,`/`)}var s=`popstate`;function c(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function l(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return m(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function m(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f(),mask:i}}function h({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function g(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=`POP`,u=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function h(){l=`POP`;let e=f(),t=e==null?null:e-d;d=e,u&&u({action:l,location:b.location,delta:t})}function g(e,t){l=`PUSH`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f()+1;let s=p(r,d),h=b.createHref(r.mask||r);try{o.pushState(s,``,h)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(h)}a&&u&&u({action:l,location:b.location,delta:1})}function _(e,t){l=`REPLACE`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f();let i=p(r,d),s=b.createHref(r.mask||r);o.replaceState(i,``,s),a&&u&&u({action:l,location:b.location,delta:0})}function y(e){return v(i,e)}let b={get action(){return l},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,h),u=e,()=>{i.removeEventListener(s,h),u=null}},createHref(e){return t(i,e)},createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:g,replace:_,go(e){return o.go(e)}};return b}function v(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),u(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:h(t);return i=i.replace(/ $/,`%20`),!n&&a.test(i)&&(i=r+i),new URL(i,r)}function y(e,t,n=`/`){return b(e,t,n,!1)}function b(e,t,n,r,i){let a=k((typeof t==`string`?g(t):t).pathname||`/`,n);if(a==null)return null;let o=i??S(e),s=null,c=ue(a);for(let e=0;s==null&&e<o.length;++e)s=se(o[e],c,r);return s}function x(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function S(e){let t=C(e);return T(t),t}function C(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=N([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),C(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ae(l,e.index),routesMeta:d.map((e,t)=>{let[n,r]=le(e.relativePath,e.caseSensitive,t===d.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of w(e.path))a(e,t,!0,n)}),t}function w(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=w(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function T(e){e.sort((e,t)=>e.score===t.score?oe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var E=/^:[\w-]+$/,ee=3,te=2,ne=1,re=10,D=-2,ie=e=>e===`*`;function ae(e,t){let n=e.split(`/`),r=n.length;return n.some(ie)&&(r+=D),t&&(r+=te),n.filter(e=>!ie(e)).reduce((e,t)=>e+(E.test(t)?ee:t===``?ne:re),r)}function oe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function se(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ce(u,l,s.matcher,s.compiledParams):O(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=O({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:N([a,d.pathname]),pathnameBase:he(N([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=N([a,d.pathnameBase]))}return o}function O(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=le(e.path,e.caseSensitive,e.end);return ce(e,t,n,r)}function ce(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=P(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=P(a.slice(0,a.length-e.length),1)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function le(e,t=!1,n=!0){d(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ue(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function k(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function de(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=me(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?fe(n.substring(1),`/`):fe(n,t)):a=t,{pathname:a,search:ge(r),hash:_e(i)}}function fe(e,t){let n=P(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function A(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function j(e){let t=pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function M(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),A(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),A(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),A(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=de(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var me=e=>e.replace(/[\\/]{2,}/g,`/`),N=e=>me(e.join(`/`));function P(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var he=e=>P(e).replace(/^\/*/,`/`),ge=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,_e=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ve=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ye(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function be(e){return N(e.map(e=>e.route.path).filter(Boolean))||`/`}var xe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Se(e,t){let n=e;if(typeof n!=`string`||!i.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(xe)try{let e=new URL(window.location.href),r=a.test(n)?new URL(o(n,e.protocol)):new URL(n),i=k(r.pathname,t);r.origin===e.origin&&i!=null?n=i+r.search+r.hash:s=!0}catch{d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ce=new URL(`http://localhost`);function we(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Ce)}catch{return Ce}}function Te(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Ee(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function De(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Te(i,n),s=!Te(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Ee(e,i)||!Te(i,a)))throw Error(`External navigation is not allowed`)}var Oe=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Oe);var ke=[`GET`,...Oe];new Set(ke);var Ae=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function je(e){try{return Ae.includes(new URL(e).protocol)}catch{return!1}}var F=r.createContext(null);F.displayName=`DataRouter`;var I=r.createContext(null);I.displayName=`DataRouterState`;var Me=r.createContext(!1);function Ne(){return r.useContext(Me)}var Pe=r.createContext({isTransitioning:!1});Pe.displayName=`ViewTransition`;var Fe=r.createContext(new Map);Fe.displayName=`Fetchers`;var Ie=r.createContext(null);Ie.displayName=`Await`;var L=r.createContext(null);L.displayName=`Navigation`;var R=r.createContext(null);R.displayName=`Location`;var z=r.createContext({outlet:null,matches:[],isDataRoute:!1});z.displayName=`Route`;var B=r.createContext(null);B.displayName=`RouteError`;var Le=`REACT_ROUTER_ERROR`,Re=`REDIRECT`,ze=`ROUTE_ERROR_RESPONSE`;function Be(e){if(e.startsWith(`${Le}:${Re}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ve(e){if(e.startsWith(`${Le}:${ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ve(t.status,t.statusText,t.data)}catch{}}function He(e,{relative:t}={}){u(V(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:i}=r.useContext(L),{hash:a,pathname:o,search:s}=W(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:N([n,o])),i.createHref({pathname:c,search:s,hash:a})}function V(){return r.useContext(R)!=null}function H(){return u(V(),`useLocation() may be used only in the context of a <Router> component.`),r.useContext(R).location}var Ue=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function We(e){r.useContext(L).static||r.useLayoutEffect(e)}function U(){let{isDataRoute:e}=r.useContext(z);return e?pt():Ge()}function Ge(){u(V(),`useNavigate() may be used only in the context of a <Router> component.`);let e=r.useContext(F),{basename:t,navigator:n}=r.useContext(L),{matches:i}=r.useContext(z),{pathname:a}=H(),o=JSON.stringify(j(i)),s=r.useRef(!1);return We(()=>{s.current=!0}),r.useCallback((r,i={})=>{if(d(s.current,Ue),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=M(r,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:N([t,c.pathname])),De(typeof r==`string`?r:h(r),n.createHref(c),we(n),`reject`),(i.replace?n.replace:n.push)(c,i.state,i)},[t,n,o,a,e])}var Ke=r.createContext(null);function qe(e){let t=r.useContext(z).outlet;return r.useMemo(()=>t&&r.createElement(Ke.Provider,{value:e},t),[t,e])}function Je(){let{matches:e}=r.useContext(z);return e[e.length-1]?.params??{}}function W(e,{relative:t}={}){let{matches:n}=r.useContext(z),{pathname:i}=H(),a=JSON.stringify(j(n));return r.useMemo(()=>M(e,JSON.parse(a),i,t===`path`),[e,a,i,t])}function Ye(e,t){return Xe(e,t)}function Xe(e,t,n){u(V(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:i}=r.useContext(L),{matches:a}=r.useContext(z),o=a[a.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,f=o&&o.route;{let e=f&&f.path||``;ht(c,!f||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
|
+
|
|
3
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let p=H(),m;if(t){let e=typeof t==`string`?g(t):t;u(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),m=e}else m=p;let h=m.pathname||`/`,_=h;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);_=`/`+h.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let v=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):y(e,{pathname:_});d(f||v!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),d(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=rt(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:N([l,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:N([l,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,n);return t&&b?r.createElement(R.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...m},navigationType:`POP`}},b):b}function Ze(){let e=ft(),t=ye(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:i},o={padding:`2px 4px`,backgroundColor:i},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=r.createElement(r.Fragment,null,r.createElement(`p`,null,`💿 Hey developer 👋`),r.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,r.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,r.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),r.createElement(r.Fragment,null,r.createElement(`h2`,null,`Unexpected Application Error!`),r.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?r.createElement(`pre`,{style:a},n):null,s)}var Qe=r.createElement(Ze,null),$e=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ve(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:r.createElement(z.Provider,{value:this.props.routeContext},r.createElement(B.Provider,{value:e,children:this.props.component}));return this.context?r.createElement(tt,{error:e},t):t}};$e.contextType=Me;var et=new WeakMap;function tt({children:e,error:t}){let{basename:n,navigator:i}=r.useContext(L);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Be(t.digest);if(e){let a=et.get(t);if(a)throw a;let o=Se(e.location,n),s=o.absoluteURL||o.to;if(De(e.location,s,we(i),`allow-explicit`),je(s))throw Error(`Invalid redirect location`);if(xe&&!et.get(t))if(o.isExternal||e.reloadDocument)window.location.href=s;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw et.set(t,n),n}return r.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function nt({routeContext:e,match:t,children:n}){let i=r.useContext(F);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),r.createElement(z.Provider,{value:e},n)}function rt(e,t=[],n){let i=n?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,o=i?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),a=c>=0?a.slice(0,c+1):[a[0]];break}}}}let l=n?.onError,d=i&&l?(e,t)=>{l(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:be(i.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,l)=>{let u,f=!1,p=null,m=null;i&&(u=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||Qe,s&&(c<0&&l===0?(ht(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=u?p:f?m:n.route.Component?r.createElement(n.route.Component,null):n.route.element?n.route.element:e,r.createElement(nt,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:i!=null},children:t})};return i&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?r.createElement($e,{location:i.location,revalidation:i.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()},null)}function it(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function at(e){let t=r.useContext(F);return u(t,it(e)),t}function ot(e){let t=r.useContext(I);return u(t,it(e)),t}function st(e){let t=r.useContext(z);return u(t,it(e)),t}function ct(e){let t=st(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function lt(){return ct(`useRouteId`)}function ut(){let e=ot(`useNavigation`);return r.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function dt(){let{matches:e,loaderData:t}=ot(`useMatches`);return r.useMemo(()=>e.map(e=>x(e,t)),[e,t])}function ft(){let e=r.useContext(B),t=ot(`useRouteError`),n=ct(`useRouteError`);return e===void 0?t.errors?.[n]:e}function pt(){let{router:e}=at(`useNavigate`),t=ct(`useNavigate`),n=r.useRef(!1);return We(()=>{n.current=!0}),r.useCallback(async(r,i={})=>{d(n.current,Ue),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var mt={};function ht(e,t,n){!t&&!mt[e]&&(mt[e]=!0,d(!1,n))}r.memo(gt);function gt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Xe(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function _t({to:e,replace:t,state:n,relative:i}){u(V(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:a,navigator:o}=r.useContext(L);d(!a,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:s}=r.useContext(z),{pathname:c}=H(),l=U(),f=M(e,j(s),c,i===`path`);De(typeof e==`string`?e:h(e),o.createHref(f),we(o),`reject`);let p=JSON.stringify(f);return r.useEffect(()=>{l(JSON.parse(p),{replace:t,state:n,relative:i})},[l,p,i,t,n]),null}function vt(e){return qe(e.context)}function yt(e){u(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function bt({basename:e=`/`,children:t=null,location:n,navigationType:i=`POP`,navigator:a,static:o=!1,useTransitions:s}){u(!V(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=r.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof n==`string`&&(n=g(n));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:_=`default`,mask:v}=n,y=r.useMemo(()=>{let e=k(f,c);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:_,mask:v},navigationType:i}},[c,f,p,m,h,_,i,v]);return d(y!=null,`<Router basename="${c}"> is not able to match the URL "${f}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:r.createElement(L.Provider,{value:l},r.createElement(R.Provider,{children:t,value:y}))}function xt({children:e,location:t}){return Ye(St(e),t)}r.Component;function St(e,t=[]){let n=[];return r.Children.forEach(e,(e,i)=>{if(!r.isValidElement(e))return;let a=[...t,i];if(e.type===r.Fragment){n.push.apply(n,St(e.props.children,a));return}u(e.type===yt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),u(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||a.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=St(e.props.children,a)),n.push(o)}),n}var G=`get`,K=`application/x-www-form-urlencoded`;function q(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ct(e){return q(e)&&e.tagName.toLowerCase()===`button`}function wt(e){return q(e)&&e.tagName.toLowerCase()===`form`}function Tt(e){return q(e)&&e.tagName.toLowerCase()===`input`}function Et(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dt(e,t){return e.button===0&&(!t||t===`_self`)&&!Et(e)}function Ot(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function kt(e,t){let n=Ot(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var J=null;function At(){if(J===null)try{new FormData(document.createElement(`form`),0),J=!1}catch{J=!0}return J}var jt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Mt(e){return e!=null&&!jt.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${K}"`),null):e}function Nt(e,t){let n,r,i,a,o;if(wt(e)){let o=e.getAttribute(`action`);r=o?k(o,t):null,n=e.getAttribute(`method`)||G,i=Mt(e.getAttribute(`enctype`))||K,a=new FormData(e)}else if(Ct(e)||Tt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?k(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||G,i=Mt(e.getAttribute(`formenctype`))||Mt(o.getAttribute(`enctype`))||K,a=new FormData(o,e),!At()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(q(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=G,r=null,i=K,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Pt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Ft=/[&><\u2028\u2029]/g;function It(e){return e.replace(Ft,e=>Pt[e])}function Lt(e,t){if(e===!1||e==null)throw Error(t)}function Rt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&k(i.pathname,t)===`/`?i.pathname=`${P(t)}/_root.${r}`:i.pathname=`${P(i.pathname)}.${r}`,i}async function zt(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Bt(e){return e!=null&&typeof e.page==`string`}function Vt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Ht(e,t,n){return qt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await zt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Vt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Ut(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Wt(e,t,{includeHydrateFallback:n}={}){return Gt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Gt(e){return[...new Set(e)]}function Kt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function qt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Bt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Kt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Jt(){let e=r.useContext(F);return Lt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Yt(){let e=r.useContext(I);return Lt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Y=r.createContext(void 0);Y.displayName=`FrameworkContext`;function X(){let e=r.useContext(Y);return Lt(e,`You must render this element inside a <HydratedRouter> element`),e}function Xt(e,t){let n=r.useContext(Y),[i,a]=r.useState(!1),[o,s]=r.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=r.useRef(null);r.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:Z(c,m),onBlur:Z(l,h),onMouseEnter:Z(u,m),onMouseLeave:Z(d,h),onTouchStart:Z(f,m)}]:[o,p,{}]:[!1,p,{}]}function Z(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Zt({page:e,...t}){let n=Ne(),{nonce:i}=X(),{router:a}=Jt(),o=r.useMemo(()=>y(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&i&&(t={...t,nonce:i}),n?r.createElement($t,{page:e,matches:o,...t}):r.createElement(en,{page:e,matches:o,...t})):null}function Qt(e){let{manifest:t,routeModules:n}=X(),[i,a]=r.useState([]);return r.useEffect(()=>{let r=!1;return Ht(e,t,n).then(e=>{r||a(e)}),()=>{r=!0}},[e,t,n]),i}function $t({page:e,matches:t,...n}){let i=H(),{future:a}=X(),{basename:o}=Jt(),s=r.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=Rt(e,o,a.v8_trailingSlashAwareDataRequests,`rsc`),r=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?r=!0:s.push(e.route.id);return r&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,a.v8_trailingSlashAwareDataRequests,e,i,t]);return r.createElement(r.Fragment,null,s.map(e=>r.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function en({page:e,matches:t,...n}){let i=H(),{future:a,manifest:o,routeModules:s}=X(),{basename:c}=Jt(),{loaderData:l,matches:u}=Yt(),d=r.useMemo(()=>Ut(e,t,u,o,i,`data`),[e,t,u,o,i]),f=r.useMemo(()=>Ut(e,t,u,o,i,`assets`),[e,t,u,o,i]),p=r.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=new Set,r=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:n.add(e.route.id))}),n.size===0)return[];let u=Rt(e,c,a.v8_trailingSlashAwareDataRequests,`data`);return r&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,a.v8_trailingSlashAwareDataRequests,l,i,o,d,t,e,s]),m=r.useMemo(()=>Wt(f,o),[f,o]),h=Qt(f);return r.createElement(r.Fragment,null,p.map(e=>r.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>r.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>r.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function tn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}r.Component;var nn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{nn&&(window.__reactRouterVersion=`7.18.4`)}catch{}function rn({basename:e,children:t,useTransitions:n,window:i}){let a=r.useRef();a.current??=l({window:i,v5Compat:!0});let o=a.current,[s,c]=r.useState({action:o.action,location:o.location}),u=r.useCallback(e=>{n===!1?c(e):r.startTransition(()=>c(e))},[n]);return r.useLayoutEffect(()=>o.listen(u),[o,u]),r.createElement(bt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:n})}function an({basename:e,children:t,history:n,useTransitions:i}){let[a,o]=r.useState({action:n.action,location:n.location}),s=r.useCallback(e=>{i===!1?o(e):r.startTransition(()=>o(e))},[i]);return r.useLayoutEffect(()=>n.listen(s),[n,s]),r.createElement(bt,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:n,useTransitions:i})}an.displayName=`unstable_HistoryRouter`;var Q=r.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:a,reloadDocument:o,replace:s,mask:c,state:l,target:u,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=r.useContext(L),b=typeof d==`string`&&i.test(d),x=Se(d,_);d=x.to;let S=He(d,{relative:a}),C=H(),w=null;if(c){let e=M(c,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:N([_,e.pathname])),w=v.createHref(e)}let[T,E,ee]=Xt(n,h),te=fn(d,{replace:s,mask:c,state:l,target:u,preventScrollReset:f,relative:a,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let re=!(x.isExternal||o),D=r.createElement(`a`,{...h,...ee,href:(re?w:void 0)||x.absoluteURL||S,onClick:re?ne:e,ref:tn(g,E),target:u,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?r.createElement(r.Fragment,null,D,r.createElement(Zt,{page:S})):D});Q.displayName=`Link`;var on=r.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:i=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=W(o,{relative:l.relative}),f=H(),p=r.useContext(I),{navigator:m,basename:h}=r.useContext(L),g=p!=null&&Sn(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=k(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!i&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!i&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof a==`function`?a(C):a;return r.createElement(Q,{...l,"aria-current":w,className:T,ref:u,style:E,to:o,viewTransition:s},typeof c==`function`?c(C):c)});on.displayName=`NavLink`;var sn=r.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:a,replace:o,state:s,method:c=G,action:l,onSubmit:u,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=r.useContext(L),v=gn(),y=_n(l,{relative:d}),b=c.toLowerCase()===`get`?`get`:`post`,x=typeof l==`string`&&i.test(l);return r.createElement(`form`,{ref:g,method:b,action:y,onSubmit:a?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let i=e.nativeEvent.submitter,a=i?.getAttribute(`formmethod`)||c,l=()=>v(i||e.currentTarget,{fetcherKey:t,method:a,navigate:n,replace:o,state:s,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});_&&n!==!1?r.startTransition(()=>l()):l()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});sn.displayName=`Form`;function cn({getKey:e,storageKey:t,...n}){let i=r.useContext(Y),{basename:a}=r.useContext(L),o=H(),s=dt();bn({getKey:e,storageKey:t});let c=r.useMemo(()=>{if(!i||!e)return null;let t=yn(o,s,a,e);return t===o.key?null:t},[]);if(!i||i.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&i?.nonce&&(n.nonce=i.nonce),r.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${It(JSON.stringify(t||vn))}, ${It(JSON.stringify(c))})`}})}cn.displayName=`ScrollRestoration`;function ln(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function un(e){let t=r.useContext(F);return u(t,ln(e)),t}function dn(e){let t=r.useContext(I);return u(t,ln(e)),t}function fn(e,{target:t,replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=U(),f=H(),p=W(e,{relative:s});return r.useCallback(m=>{if(Dt(m,t)){m.preventDefault();let t=n===void 0?h(f)===h(p):n,g=()=>d(e,{replace:t,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?r.startTransition(()=>g()):g()}},[f,d,p,n,i,a,t,e,o,s,c,l,u])}function pn(e){d(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=r.useRef(Ot(e)),n=r.useRef(!1),i=H(),a=r.useMemo(()=>kt(i.search,n.current?null:t.current),[i.search]),o=U();return[a,r.useCallback((e,t)=>{let r=Ot(typeof e==`function`?e(new URLSearchParams(a)):e);n.current=!0,o(`?`+r,t)},[o,a])]}var mn=0,hn=()=>`__${String(++mn)}__`;function gn(){let{router:e}=un(`useSubmit`),{basename:t}=r.useContext(L),n=lt(),i=e.fetch,a=e.navigate;return r.useCallback(async(e,r={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Nt(e,t);if(r.navigate===!1){let e=r.fetcherKey||hn();await i(e,n,r.action||o,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:l,body:u,formMethod:r.method||s,formEncType:r.encType||c,flushSync:r.flushSync})}else await a(r.action||o,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:l,body:u,formMethod:r.method||s,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[i,a,t,n])}function _n(e,{relative:t}={}){let{basename:n}=r.useContext(L),i=r.useContext(z);u(i,`useFormAction must be used inside a RouteContext`);let[a]=i.matches.slice(-1),o={...W(e||`.`,{relative:t})},s=H();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:N([n,o.pathname])),h(o)}var vn=`react-router-scroll-positions`,$={};function yn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:k(e.pathname,n)||e.pathname},t)),i??=e.key,i}function bn({getKey:e,storageKey:t}={}){let{router:n}=un(`useScrollRestoration`),{restoreScrollPosition:i,preventScrollReset:a}=dn(`useScrollRestoration`),{basename:o}=r.useContext(L),s=H(),c=dt(),l=ut();r.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),xn(r.useCallback(()=>{if(l.state===`idle`){let t=yn(s,c,o,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||vn,JSON.stringify($))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,o,s,c,t])),typeof document<`u`&&(r.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||vn);e&&($=JSON.parse(e))}catch{}},[t]),r.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>yn(t,n,o,e):void 0);return()=>t&&t()},[n,o,e]),r.useLayoutEffect(()=>{if(i!==!1){if(typeof i==`number`){window.scrollTo(0,i);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[s,i,a]))}function xn(e,t){let{capture:n}=t||{};r.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Sn(e,{relative:t}={}){let n=r.useContext(Pe);u(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=un(`useViewTransitionState`),a=W(e,{relative:t});if(!n.isTransitioning)return!1;let o=k(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=k(n.nextLocation.pathname,i)||n.nextLocation.pathname;return O(a.pathname,s)!=null||O(a.pathname,o)!=null}export{vt as a,V as c,Je as d,pn as f,_t as i,H as l,Q as n,yt as o,on as r,xt as s,rn as t,U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DtODIU64.js";var t={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-CNC7AqOf.js";import{n}from"./jsx-runtime-BbYvbtY8.js";var r=e(n()),i=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);d(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},a={},o=(e,t,n,r)=>{d(n)&&a[n]||(d(n)&&(a[n]=new Date),i(e,t,n,r))},s=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},c=(e,t,n)=>{e.loadNamespaces(t,s(e,n))},l=(e,t,n,r)=>{if(d(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return c(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,s(e,r))},u=(e,t,n={})=>!t.languages||!t.languages.length?(o(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),d=e=>typeof e==`string`,f=e=>typeof e==`object`&&!!e,p=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,m={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},h=e=>m[e],g=e=>e.replace(p,h),_={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:g,transDefaultProps:void 0},v=(e={})=>{_={..._,...e}},y=()=>_,b,x=e=>{b=e},S=()=>b,C=(0,r.createContext)(),w=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},T=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),E=t(((e,t)=>{t.exports=T()})),D=E(),O={t:(e,t)=>{if(d(t))return t;if(f(t)&&d(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},k=()=>()=>{},A=(e,t={})=>{let{i18n:n}=t,{i18n:i,defaultNS:a}=(0,r.useContext)(C)||{},s=n||i||S();s&&!s.reportNamespaces&&(s.reportNamespaces=new w),s||o(s,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let f=(0,r.useMemo)(()=>({...y(),...s?.options?.react,...t}),[s,t]),{useSuspense:p,keyPrefix:m}=f,h=e||a||s?.options?.defaultNS,g=d(h)?[h]:h||[`translation`],_=(0,r.useMemo)(()=>g,g);s?.reportNamespaces?.addUsedNamespaces?.(_);let v=(0,r.useRef)(0),b=(0,r.useCallback)(e=>{if(!s)return k;let{bindI18n:t,bindI18nStore:n}=f,r=()=>{v.current+=1,e()};return t&&s.on(t,r),n&&s.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>s.off(e,r)),n&&n.split(` `).forEach(e=>s.store.off(e,r))}},[s,f]),x=(0,r.useRef)(),T=(0,r.useCallback)(()=>{if(!s)return O;let e=!!(s.isInitialized||s.initializedStoreOnce)&&_.every(e=>u(e,s,f)),n=t.lng||s.language,r=v.current,i=x.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===m&&i.revision===r)return i;let a={t:s.getFixedT(n,f.nsMode===`fallback`?_:_[0],m,{scopeNs:_}),ready:e,lng:n,keyPrefix:m,revision:r};return x.current=a,a},[s,_,m,f,t.lng]),[E,A]=(0,r.useState)(0),{t:j,ready:M}=(0,D.useSyncExternalStore)(b,T,T);(0,r.useEffect)(()=>{if(s&&!M&&!p){let e=()=>A(e=>e+1);t.lng?l(s,t.lng,_,e):c(s,_,e)}},[s,t.lng,_,M,p,E]);let N=s||{},P=(0,r.useRef)(null),F=(0,r.useRef)(),I=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,L=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},R=(0,r.useMemo)(()=>{let e=N,t=e&&I(e),n=e;e&&(P.current&&P.current.__original===e&&F.current===t?n=P.current:(n=L(e),P.current=n,F.current=t));let r=!M&&!p?(...e)=>(o(s,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),j(...e)):j,i=[r,n,M];return i.t=r,i.i18n=n,i.ready=M,i},[j,N,M,N.resolvedLanguage,N.language,N.languages]);if(s&&p&&!M){let e=!1;try{e=!1}catch{}throw e&&o(s,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?l(s,t.lng,_,n):c(s,_,n)})}return R},j=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function M(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:j(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var N=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},P=e=>{let t=N(e);return t.charAt(0).toUpperCase()+t.slice(1)},F=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),I={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function L(e){return e!=null}function R(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??I.width,a=e.size??e.height??I.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?F(...c):F(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??I[`stroke-width`])*Number(e.size??e.width??I.width)/Number(t.size??t.width??I.width):t.strokeWidth??I[`stroke-width`];return[`svg`,{...Object.entries(I).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&L(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&L(t.width)&&{[r(`width`)]:t.width},...`height`in t&&L(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function z(e,t={}){return R(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var B=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},V=(0,r.createContext)({}),H=()=>(0,r.useContext)(V),U=(0,r.forwardRef)(({color:e,size:t,width:n,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=H()??{},b=!!l||B(f),[x,S,C=[]]=z(d,{color:e??v,width:n??t??m,height:i??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:F(y,c),hasA11yProp:b,attributes:f});return(0,r.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function W(e,t=[],n=[]){let i=typeof e==`string`?M(e,t,n):e,a=(0,r.forwardRef)(({className:e,...t},n)=>(0,r.createElement)(U,{ref:n,icon:i,className:e,...t}));return i.name&&(a.displayName=P(i.name)),a}export{S as a,v as c,d,i as f,C as i,g as l,A as n,x as o,o as p,E as r,y as s,W as t,f as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{n as t,t as n}from"./jsx-runtime-zu2_FqZY.js";import{t as r}from"./react-dom-DiWzBDP9.js";import{n as i}from"./createLucideIcon-Bjbbp_KS.js";import{t as a}from"./x-CBMI9ejn.js";import{t as o}from"./utils-BC4DHlz2.js";var s=e(t(),1),c=e(r(),1),l=n(),u=[`nw`,`n`,`ne`,`e`,`se`,`s`,`sw`,`w`],d={nw:{left:!0,top:!0},n:{top:!0},ne:{right:!0,top:!0},e:{right:!0},se:{right:!0,bottom:!0},s:{bottom:!0},sw:{left:!0,bottom:!0},w:{left:!0}};function f(e){return e===`n`||e===`s`?`horizontal`:`vertical`}function p(e,t,n){return Math.min(Math.max(e,t),Math.max(t,n))}function m(e,t,n,r){return{w:p(e,r.minWidth,n.width-16),h:p(t,r.minHeight,n.height-(n.topInset??0)-16)}}function h(e,t){if(t.topInset){let n=Math.min(e.w,Math.max(1,t.width-16)),r=Math.min(e.h,Math.max(1,t.height-t.topInset-16));return{w:n,h:r,x:p(e.x,16/2,Math.max(16/2,t.width-n-16/2)),y:p(e.y,t.topInset,Math.max(t.topInset,t.height-r-16))}}let n=p(e.x,120-e.w,t.width-e.w),r=p(e.y,0,Math.max(0,t.height-48));return{...e,x:n,y:r}}function g(e,t,n,r){return h({...e,x:e.x+t,y:e.y+n},r)}function _(e,t,n,r,i,a){let o=d[t],s=e.x+e.w,c=e.y+e.h,l=e.w,u=e.h;o.right&&(l=e.w+n),o.left&&(l=e.w-n),o.bottom&&(u=e.h+r),o.top&&(u=e.h-r);let f=m(l,u,i,a),p=e.x,g=e.y;return o.left&&(p=s-f.w),o.top&&(g=c-f.h),h({x:p,y:g,w:f.w,h:f.h},i)}function ee(e,t,n,r,i){let a=d[t],o=a.left||a.right,s=a.top||a.bottom,c=o?n===`min`?i.minWidth:r.width-16:e.w,l=s?n===`min`?i.minHeight:r.height-(r.topInset??0)-16:e.h,u=e.x+e.w,f=e.y+e.h,p=m(c,l,r,i);return h({x:a.left?u-p.w:e.x,y:a.top?f-p.h:e.y,w:p.w,h:p.h},r)}function v(e){return{x:e.left,y:e.top,w:e.width,h:e.height}}function y(e,t){return{w:e.width,h:e.height,x:Math.round((t.width-e.width)/2),y:Math.max(t.topInset??0,Math.round(((t.topInset??0)+t.height-e.height)/2))}}function te(e,t){let{x:n,y:r,w:i,h:a}=t,o=Math.max(0,i-24),s=Math.max(0,a-24);switch(e){case`nw`:return{left:n-14/2,top:r-14/2,width:14,height:14};case`ne`:return{left:n+i-14/2,top:r-14/2,width:14,height:14};case`se`:return{left:n+i-14/2,top:r+a-14/2,width:14,height:14};case`sw`:return{left:n-14/2,top:r+a-14/2,width:14,height:14};case`n`:return{left:n+12,top:r-8/2,width:o,height:8};case`s`:return{left:n+12,top:r+a-8/2,width:o,height:8};case`e`:return{left:n+i-8/2,top:r+12,width:8,height:s};case`w`:return{left:n-8/2,top:r+12,width:8,height:s}}}function b(e,t,n){let r=d[e],i=r.left||r.right,a=r.top||r.bottom;switch(t){case`ArrowRight`:return i?{dx:n,dy:0}:null;case`ArrowLeft`:return i?{dx:-n,dy:0}:null;case`ArrowDown`:return a?{dx:0,dy:n}:null;case`ArrowUp`:return a?{dx:0,dy:-n}:null;default:return null}}function x(){return typeof window<`u`&&`__TAURI_INTERNALS__`in window?28:0}function S(){return{top:x()}}function C(){let e=x();return{top:`calc(50% + ${e/2}px)`,maxHeight:`min(85dvh, calc(100dvh - ${e}px - 32px))`}}var ne=64;function w(){if(typeof window>`u`)return{width:0,height:0};let e=x();return{width:window.innerWidth,height:window.innerHeight,topInset:e?e+16:0}}var re=`button, input, textarea, select, a, [role="button"], [contenteditable="true"]`;function T(e={}){let{enabled:t=!0,allowMove:n=!0,minWidth:r=320,minHeight:i=200,anchorFromCurrentRect:a=!1,persistKey:o}=e,c=(0,s.useRef)(null),[l,d]=(0,s.useState)(null),p=(0,s.useCallback)(e=>{c.current=e,d(e)},[]),[m,x]=(0,s.useState)(()=>{if(!o||typeof window>`u`)return null;try{let e=window.localStorage.getItem(o);if(!e)return null;let t=JSON.parse(e);if([t?.x,t?.y,t?.w,t?.h].every(e=>typeof e==`number`&&Number.isFinite(e))&&t.w>0&&t.h>0)return h(t,w())}catch{}return null}),[S,C]=(0,s.useState)(null),[T,ie]=(0,s.useState)(()=>typeof window>`u`||window.innerWidth>=900),E=(0,s.useRef)(null),D=(0,s.useRef)(null),O=(0,s.useRef)(!1),k=(0,s.useRef)(null),A=(0,s.useRef)(!1);D.current=m;let j={minWidth:r,minHeight:i},M=t&&T;(0,s.useEffect)(()=>{function e(){let e=window.innerWidth>=900;ie(e),e||x(null)}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,s.useEffect)(()=>{t||x(null)},[t]),(0,s.useEffect)(()=>{if(!(!o||typeof window>`u`||!m))try{window.localStorage.setItem(o,JSON.stringify(m))}catch{}},[m,o]),(0,s.useEffect)(()=>{if(!M||m!==null){C(null);return}let e=c.current;if(!e)return;let t=()=>C(v(e.getBoundingClientRect()));t();let n;return typeof ResizeObserver<`u`&&(n=new ResizeObserver(t),n.observe(e)),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{n?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[M,m,l]);let ae=(0,s.useCallback)(e=>{k.current=e,!O.current&&(O.current=!0,requestAnimationFrame(()=>{O.current=!1,k.current&&x(k.current)}))},[]),N=(0,s.useCallback)(e=>{let t=E.current;if(!t)return;let n=w(),r=e.clientX-t.startX,i=e.clientY-t.startY,a=t.mode===`move`?g(t.startGeom,r,i,n):_(t.startGeom,t.position,r,i,n,j);ae(a)},[ae,j.minWidth,j.minHeight]),P=(0,s.useCallback)(()=>{let e=E.current;if(e){try{e.element.releasePointerCapture(e.pointerId)}catch{}E.current=null,A.current=!0,setTimeout(()=>{A.current=!1},0),k.current&&x(k.current),window.removeEventListener(`pointermove`,N),window.removeEventListener(`pointerup`,P),window.removeEventListener(`pointercancel`,P)}},[N]),F=(0,s.useCallback)((e,t)=>{if(!M||e.button!==0)return;let n=c.current;if(!n)return;let r=D.current;if(!r){let e=n.getBoundingClientRect();if(e.width<=0||e.height<=0)return;r=h(a?v(e):y(e,w()),w())}D.current=r,k.current=r;let i=t(r);E.current=i;try{i.element.setPointerCapture(i.pointerId)}catch{}x(r),window.addEventListener(`pointermove`,N),window.addEventListener(`pointerup`,P),window.addEventListener(`pointercancel`,P)},[M,N,P,a]),I=(0,s.useCallback)(e=>{if(!n||e.target.closest(re))return;let t=c.current;t&&e.clientY-t.getBoundingClientRect().top>ne||F(e,t=>({mode:`move`,startX:e.clientX,startY:e.clientY,startGeom:t,pointerId:e.pointerId,element:e.currentTarget}))},[n,F]),oe=(0,s.useCallback)(e=>t=>{t.stopPropagation(),F(t,n=>({mode:`resize`,position:e,startX:t.clientX,startY:t.clientY,startGeom:n,pointerId:t.pointerId,element:t.currentTarget}))},[F]),L=(0,s.useCallback)(()=>x(null),[]),se=(0,s.useCallback)(e=>(...t)=>{A.current||e(...t)},[]),ce=(0,s.useCallback)(e=>t=>{if(!M)return;if(t.key===`0`){t.preventDefault(),L();return}let n=c.current;if(!n)return;let r=w(),i=D.current??v(n.getBoundingClientRect());if(t.key===`Home`||t.key===`End`){t.preventDefault(),x(ee(i,e,t.key===`Home`?`min`:`max`,r,j));return}let a=t.shiftKey?64:16,o=b(e,t.key,a);o&&(t.preventDefault(),x(_(i,e,o.dx,o.dy,r,j)))},[M,L,j.minWidth,j.minHeight]);(0,s.useEffect)(()=>{if(!m||!T)return;function e(){let e=D.current;e&&x(h(e,w()))}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[m,T]),(0,s.useEffect)(()=>()=>{window.removeEventListener(`pointermove`,N),window.removeEventListener(`pointerup`,P),window.removeEventListener(`pointercancel`,P);let e=E.current;if(e){try{e.element.releasePointerCapture(e.pointerId)}catch{}E.current=null}},[N,P]);let le=M&&m!==null,ue=le&&m?{position:`fixed`,left:m.x,top:m.y,width:m.w,height:m.h,maxWidth:`none`,maxHeight:`none`,margin:0,transform:`none`,animation:`none`}:{},de=le?m:S,fe=M&&de?u.map(e=>({position:e,role:`separator`,"aria-orientation":f(e),tabIndex:0,style:{position:`fixed`,...te(e,de)},onPointerDown:oe(e),onKeyDown:ce(e)})):[];return{panelRef:p,panelStyle:ue,headerHandleProps:{onPointerDown:I},resizeHandles:fe,isFloating:le,enabled:M,reset:L,guardBackdrop:se}}var ie={nw:`cursor-nwse-resize`,n:`cursor-ns-resize`,ne:`cursor-nesw-resize`,e:`cursor-ew-resize`,se:`cursor-nwse-resize`,s:`cursor-ns-resize`,sw:`cursor-nesw-resize`,w:`cursor-ew-resize`};function E({handles:e}){let{t}=i(`common`);return e.length===0?null:(0,l.jsx)(l.Fragment,{children:e.map(e=>(0,l.jsx)(`div`,{"data-testid":`modal-resize-${e.position}`,role:e.role,"aria-orientation":e[`aria-orientation`],"aria-label":t(`modal.resize.${e.position}`),tabIndex:e.tabIndex,style:e.style,onPointerDown:e.onPointerDown,onKeyDown:e.onKeyDown,className:o(`z-[51] rounded-full bg-transparent transition-colors duration-150`,`hover:bg-accent-primary/20 focus:outline-none focus-visible:bg-accent-primary/30`,ie[e.position])},e.position))})}function D(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function O(...e){return t=>{let n=!1,r=e.map(e=>{let r=D(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():D(e[t],null)}}}}function k(...e){return s.useCallback(O(...e),e)}typeof window<`u`&&window.document&&window.document.createElement;function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function j(e,t){let n=s.createContext(t),r=e=>{let{children:t,...r}=e,i=s.useMemo(()=>r,Object.values(r));return(0,l.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function M(e,t=[]){let n=[];function r(t,r){let i=s.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,c=n?.[e]?.[a]||i,u=s.useMemo(()=>o,Object.values(o));return(0,l.jsx)(c.Provider,{value:u,children:r})};o.displayName=t+`Provider`;function c(n,o){let c=o?.[e]?.[a]||i,l=s.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,c]}let i=()=>{let t=n.map(e=>s.createContext(e));return function(n){let r=n?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ae(i,...t)]}function ae(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var N=globalThis?.document?s.useLayoutEffect:()=>{},P=s.useId||(()=>void 0),F=0;function I(e){let[t,n]=s.useState(P());return N(()=>{e||n(e=>e??String(F++))},[e]),e||(t?`radix-${t}`:``)}var oe=s.useInsertionEffect||N;function L({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=se({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=s.useRef(e!==void 0);s.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,r])}return[l,s.useCallback(t=>{if(c){let n=ce(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[c,e,a,o])]}function se({defaultProp:e,onChange:t}){let[n,r]=s.useState(e),i=s.useRef(n),a=s.useRef(t);return oe(()=>{a.current=t},[t]),s.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ce(e){return typeof e==`function`}function le(e){let t=ue(e),n=s.forwardRef((e,n)=>{let{children:r,...i}=e,a=s.Children.toArray(r),o=a.find(fe);if(o){let e=o.props.children,r=a.map(t=>t===o?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return(0,l.jsx)(t,{...i,ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,r):null})}return(0,l.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ue(e){let t=s.forwardRef((e,t)=>{let{children:n,...r}=e;if(s.isValidElement(n)){let e=me(n),i=pe(r,n.props);return n.type!==s.Fragment&&(i.ref=t?O(t,e):e),s.cloneElement(n,i)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var de=Symbol(`radix.slottable`);function fe(e){return s.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===de}function pe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function me(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var R=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=le(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,l.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function he(e,t){e&&c.flushSync(()=>e.dispatchEvent(t))}function z(e){let t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}function ge(e,t=globalThis?.document){let n=z(e);s.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var _e=`DismissableLayer`,ve=`dismissableLayer.update`,ye=`dismissableLayer.pointerDownOutside`,be=`dismissableLayer.focusOutside`,xe,Se=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ce=s.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:c,...u}=e,d=s.useContext(Se),[f,p]=s.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=s.useState({}),g=k(t,e=>p(e)),_=Array.from(d.layers),[ee]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=_.indexOf(ee),y=f?_.indexOf(f):-1,te=d.layersWithOutsidePointerEventsDisabled.size>0,b=y>=v,x=Ee(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||c?.())},m),S=De(e=>{let t=e.target;[...d.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||c?.())},m);return ge(e=>{y===d.layers.size-1&&(r?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},m),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(xe=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Oe(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xe)}},[f,m,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,d]),s.useEffect(()=>{let e=()=>h({});return document.addEventListener(ve,e),()=>document.removeEventListener(ve,e)},[]),(0,l.jsx)(R.div,{...u,ref:g,style:{pointerEvents:te?b?`auto`:`none`:void 0,...e.style},onFocusCapture:A(e.onFocusCapture,S.onFocusCapture),onBlurCapture:A(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,x.onPointerDownCapture)})});Ce.displayName=_e;var we=`DismissableLayerBranch`,Te=s.forwardRef((e,t)=>{let n=s.useContext(Se),r=s.useRef(null),i=k(t,r);return s.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,l.jsx)(R.div,{...e,ref:i})});Te.displayName=we;function Ee(e,t=globalThis?.document){let n=z(e),r=s.useRef(!1),i=s.useRef(()=>{});return s.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ke(ye,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function De(e,t=globalThis?.document){let n=z(e),r=s.useRef(!1);return s.useEffect(()=>{let e=e=>{e.target&&!r.current&&ke(be,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Oe(){let e=new CustomEvent(ve);document.dispatchEvent(e)}function ke(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?he(i,a):i.dispatchEvent(a)}var Ae=`focusScope.autoFocusOnMount`,je=`focusScope.autoFocusOnUnmount`,Me={bubbles:!1,cancelable:!0},Ne=`FocusScope`,Pe=s.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[c,u]=s.useState(null),d=z(i),f=z(a),p=s.useRef(null),m=k(t,e=>u(e)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?p.current=t:B(p.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||B(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&B(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,h.paused]),s.useEffect(()=>{if(c){Ve.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Ae,Me);c.addEventListener(Ae,d),c.dispatchEvent(t),t.defaultPrevented||(Fe(We(Le(c)),{select:!0}),document.activeElement===e&&B(c))}return()=>{c.removeEventListener(Ae,d),setTimeout(()=>{let t=new CustomEvent(je,Me);c.addEventListener(je,f),c.dispatchEvent(t),t.defaultPrevented||B(e??document.body,{select:!0}),c.removeEventListener(je,f),Ve.remove(h)},0)}}},[c,d,f,h]);let g=s.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ie(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&B(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&B(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,l.jsx)(R.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})});Pe.displayName=Ne;function Fe(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(B(r,{select:t}),document.activeElement!==n)return}function Ie(e){let t=Le(e);return[Re(t,e),Re(t.reverse(),e)]}function Le(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Re(e,t){for(let n of e)if(!ze(n,{upTo:t}))return n}function ze(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Be(e){return e instanceof HTMLInputElement&&`select`in e}function B(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Be(e)&&t&&e.select()}}var Ve=He();function He(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ue(e,t),e.unshift(t)},remove(t){e=Ue(e,t),e[0]?.resume()}}}function Ue(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function We(e){return e.filter(e=>e.tagName!==`A`)}var Ge=`Portal`,Ke=s.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=s.useState(!1);N(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?c.createPortal((0,l.jsx)(R.div,{...r,ref:t}),o):null});Ke.displayName=Ge;function qe(e,t){return s.useReducer((e,n)=>t[e][n]??e,e)}var V=e=>{let{present:t,children:n}=e,r=Je(t),i=typeof n==`function`?n({present:r.isPresent}):s.Children.only(n),a=k(r.ref,Ye(i));return typeof n==`function`||r.isPresent?s.cloneElement(i,{ref:a}):null};V.displayName=`Presence`;function Je(e){let[t,n]=s.useState(),r=s.useRef(null),i=s.useRef(e),a=s.useRef(`none`),[o,c]=qe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return s.useEffect(()=>{let e=H(r.current);a.current=o===`mounted`?e:`none`},[o]),N(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=H(t);e?c(`MOUNT`):o===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),N(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=H(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=H(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:s.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function H(e){return e?.animationName||`none`}function Ye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xe=0;function Ze(){s.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Qe()),document.body.insertAdjacentElement(`beforeend`,e[1]??Qe()),Xe++,()=>{Xe===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Xe--}},[])}function Qe(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function $e(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function et(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var W=`right-scroll-bar-position`,tt=`width-before-scroll-bar`,nt=`with-scroll-bars-hidden`,rt=`--removed-body-scroll-bar-size`;function it(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function at(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ot=typeof window<`u`?s.useLayoutEffect:s.useEffect,st=new WeakMap;function ct(e,t){var n=at(t||null,function(t){return e.forEach(function(e){return it(e,t)})});return ot(function(){var t=st.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||it(e,null)}),i.forEach(function(e){r.has(e)||it(e,a)})}st.set(n,e)},[e]),n}function lt(e){return e}function ut(e,t){t===void 0&&(t=lt);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function dt(e){e===void 0&&(e={});var t=ut(null);return t.options=U({async:!0,ssr:!1},e),t}var ft=function(e){var t=e.sideCar,n=$e(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return s.createElement(r,U({},n))};ft.isSideCarExport=!0;function pt(e,t){return e.useMedium(t),ft}var mt=dt(),ht=function(){},gt=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:ht,onWheelCapture:ht,onTouchMoveCapture:ht}),i=r[0],a=r[1],o=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,ee=e.as,v=ee===void 0?`div`:ee,y=e.gapMode,te=$e(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),b=p,x=ct([n,t]),S=U(U({},te),i);return s.createElement(s.Fragment,null,d&&s.createElement(b,{sideCar:mt,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:y}),o?s.cloneElement(s.Children.only(c),U(U({},S),{ref:x})):s.createElement(v,U({},S,{className:l,ref:x}),c))});gt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},gt.classNames={fullWidth:tt,zeroRight:W};var _t,vt=function(){if(_t)return _t;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function yt(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=vt();return t&&e.setAttribute(`nonce`,t),e}function bt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xt(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var St=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yt())&&(bt(t,n),xt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ct=function(){var e=St();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wt=function(){var e=Ct();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Tt={left:0,top:0,right:0,gap:0},Et=function(e){return parseInt(e||``,10)||0},Dt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Et(n),Et(r),Et(i)]},Ot=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Tt;var t=Dt(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])}},kt=wt(),G=`data-scroll-locked`,At=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{n as t,t as n}from"./jsx-runtime-BbYvbtY8.js";import{t as r}from"./react-dom-DDD8FYaU.js";import{n as i}from"./createLucideIcon-DtODIU64.js";import{t as a}from"./x-Bu7X_eR2.js";import{t as o}from"./utils-BC4DHlz2.js";var s=e(t(),1),c=e(r(),1),l=n(),u=[`nw`,`n`,`ne`,`e`,`se`,`s`,`sw`,`w`],d={nw:{left:!0,top:!0},n:{top:!0},ne:{right:!0,top:!0},e:{right:!0},se:{right:!0,bottom:!0},s:{bottom:!0},sw:{left:!0,bottom:!0},w:{left:!0}};function f(e){return e===`n`||e===`s`?`horizontal`:`vertical`}function p(e,t,n){return Math.min(Math.max(e,t),Math.max(t,n))}function m(e,t,n,r){return{w:p(e,r.minWidth,n.width-16),h:p(t,r.minHeight,n.height-(n.topInset??0)-16)}}function h(e,t){if(t.topInset){let n=Math.min(e.w,Math.max(1,t.width-16)),r=Math.min(e.h,Math.max(1,t.height-t.topInset-16));return{w:n,h:r,x:p(e.x,16/2,Math.max(16/2,t.width-n-16/2)),y:p(e.y,t.topInset,Math.max(t.topInset,t.height-r-16))}}let n=p(e.x,120-e.w,t.width-e.w),r=p(e.y,0,Math.max(0,t.height-48));return{...e,x:n,y:r}}function g(e,t,n,r){return h({...e,x:e.x+t,y:e.y+n},r)}function _(e,t,n,r,i,a){let o=d[t],s=e.x+e.w,c=e.y+e.h,l=e.w,u=e.h;o.right&&(l=e.w+n),o.left&&(l=e.w-n),o.bottom&&(u=e.h+r),o.top&&(u=e.h-r);let f=m(l,u,i,a),p=e.x,g=e.y;return o.left&&(p=s-f.w),o.top&&(g=c-f.h),h({x:p,y:g,w:f.w,h:f.h},i)}function ee(e,t,n,r,i){let a=d[t],o=a.left||a.right,s=a.top||a.bottom,c=o?n===`min`?i.minWidth:r.width-16:e.w,l=s?n===`min`?i.minHeight:r.height-(r.topInset??0)-16:e.h,u=e.x+e.w,f=e.y+e.h,p=m(c,l,r,i);return h({x:a.left?u-p.w:e.x,y:a.top?f-p.h:e.y,w:p.w,h:p.h},r)}function v(e){return{x:e.left,y:e.top,w:e.width,h:e.height}}function y(e,t){return{w:e.width,h:e.height,x:Math.round((t.width-e.width)/2),y:Math.max(t.topInset??0,Math.round(((t.topInset??0)+t.height-e.height)/2))}}function te(e,t){let{x:n,y:r,w:i,h:a}=t,o=Math.max(0,i-24),s=Math.max(0,a-24);switch(e){case`nw`:return{left:n-14/2,top:r-14/2,width:14,height:14};case`ne`:return{left:n+i-14/2,top:r-14/2,width:14,height:14};case`se`:return{left:n+i-14/2,top:r+a-14/2,width:14,height:14};case`sw`:return{left:n-14/2,top:r+a-14/2,width:14,height:14};case`n`:return{left:n+12,top:r-8/2,width:o,height:8};case`s`:return{left:n+12,top:r+a-8/2,width:o,height:8};case`e`:return{left:n+i-8/2,top:r+12,width:8,height:s};case`w`:return{left:n-8/2,top:r+12,width:8,height:s}}}function b(e,t,n){let r=d[e],i=r.left||r.right,a=r.top||r.bottom;switch(t){case`ArrowRight`:return i?{dx:n,dy:0}:null;case`ArrowLeft`:return i?{dx:-n,dy:0}:null;case`ArrowDown`:return a?{dx:0,dy:n}:null;case`ArrowUp`:return a?{dx:0,dy:-n}:null;default:return null}}function x(){return typeof window<`u`&&`__TAURI_INTERNALS__`in window?28:0}function S(){return{top:x()}}function C(){let e=x();return{top:`calc(50% + ${e/2}px)`,maxHeight:`min(85dvh, calc(100dvh - ${e}px - 32px))`}}var ne=64;function w(){if(typeof window>`u`)return{width:0,height:0};let e=x();return{width:window.innerWidth,height:window.innerHeight,topInset:e?e+16:0}}var re=`button, input, textarea, select, a, [role="button"], [contenteditable="true"]`;function T(e={}){let{enabled:t=!0,allowMove:n=!0,minWidth:r=320,minHeight:i=200,anchorFromCurrentRect:a=!1,persistKey:o}=e,c=(0,s.useRef)(null),[l,d]=(0,s.useState)(null),p=(0,s.useCallback)(e=>{c.current=e,d(e)},[]),[m,x]=(0,s.useState)(()=>{if(!o||typeof window>`u`)return null;try{let e=window.localStorage.getItem(o);if(!e)return null;let t=JSON.parse(e);if([t?.x,t?.y,t?.w,t?.h].every(e=>typeof e==`number`&&Number.isFinite(e))&&t.w>0&&t.h>0)return h(t,w())}catch{}return null}),[S,C]=(0,s.useState)(null),[T,ie]=(0,s.useState)(()=>typeof window>`u`||window.innerWidth>=900),E=(0,s.useRef)(null),D=(0,s.useRef)(null),O=(0,s.useRef)(!1),k=(0,s.useRef)(null),A=(0,s.useRef)(!1);D.current=m;let j={minWidth:r,minHeight:i},M=t&&T;(0,s.useEffect)(()=>{function e(){let e=window.innerWidth>=900;ie(e),e||x(null)}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,s.useEffect)(()=>{t||x(null)},[t]),(0,s.useEffect)(()=>{if(!(!o||typeof window>`u`||!m))try{window.localStorage.setItem(o,JSON.stringify(m))}catch{}},[m,o]),(0,s.useEffect)(()=>{if(!M||m!==null){C(null);return}let e=c.current;if(!e)return;let t=()=>C(v(e.getBoundingClientRect()));t();let n;return typeof ResizeObserver<`u`&&(n=new ResizeObserver(t),n.observe(e)),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{n?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[M,m,l]);let ae=(0,s.useCallback)(e=>{k.current=e,!O.current&&(O.current=!0,requestAnimationFrame(()=>{O.current=!1,k.current&&x(k.current)}))},[]),N=(0,s.useCallback)(e=>{let t=E.current;if(!t)return;let n=w(),r=e.clientX-t.startX,i=e.clientY-t.startY,a=t.mode===`move`?g(t.startGeom,r,i,n):_(t.startGeom,t.position,r,i,n,j);ae(a)},[ae,j.minWidth,j.minHeight]),P=(0,s.useCallback)(()=>{let e=E.current;if(e){try{e.element.releasePointerCapture(e.pointerId)}catch{}E.current=null,A.current=!0,setTimeout(()=>{A.current=!1},0),k.current&&x(k.current),window.removeEventListener(`pointermove`,N),window.removeEventListener(`pointerup`,P),window.removeEventListener(`pointercancel`,P)}},[N]),F=(0,s.useCallback)((e,t)=>{if(!M||e.button!==0)return;let n=c.current;if(!n)return;let r=D.current;if(!r){let e=n.getBoundingClientRect();if(e.width<=0||e.height<=0)return;r=h(a?v(e):y(e,w()),w())}D.current=r,k.current=r;let i=t(r);E.current=i;try{i.element.setPointerCapture(i.pointerId)}catch{}x(r),window.addEventListener(`pointermove`,N),window.addEventListener(`pointerup`,P),window.addEventListener(`pointercancel`,P)},[M,N,P,a]),I=(0,s.useCallback)(e=>{if(!n||e.target.closest(re))return;let t=c.current;t&&e.clientY-t.getBoundingClientRect().top>ne||F(e,t=>({mode:`move`,startX:e.clientX,startY:e.clientY,startGeom:t,pointerId:e.pointerId,element:e.currentTarget}))},[n,F]),oe=(0,s.useCallback)(e=>t=>{t.stopPropagation(),F(t,n=>({mode:`resize`,position:e,startX:t.clientX,startY:t.clientY,startGeom:n,pointerId:t.pointerId,element:t.currentTarget}))},[F]),L=(0,s.useCallback)(()=>x(null),[]),se=(0,s.useCallback)(e=>(...t)=>{A.current||e(...t)},[]),ce=(0,s.useCallback)(e=>t=>{if(!M)return;if(t.key===`0`){t.preventDefault(),L();return}let n=c.current;if(!n)return;let r=w(),i=D.current??v(n.getBoundingClientRect());if(t.key===`Home`||t.key===`End`){t.preventDefault(),x(ee(i,e,t.key===`Home`?`min`:`max`,r,j));return}let a=t.shiftKey?64:16,o=b(e,t.key,a);o&&(t.preventDefault(),x(_(i,e,o.dx,o.dy,r,j)))},[M,L,j.minWidth,j.minHeight]);(0,s.useEffect)(()=>{if(!m||!T)return;function e(){let e=D.current;e&&x(h(e,w()))}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[m,T]),(0,s.useEffect)(()=>()=>{window.removeEventListener(`pointermove`,N),window.removeEventListener(`pointerup`,P),window.removeEventListener(`pointercancel`,P);let e=E.current;if(e){try{e.element.releasePointerCapture(e.pointerId)}catch{}E.current=null}},[N,P]);let le=M&&m!==null,ue=le&&m?{position:`fixed`,left:m.x,top:m.y,width:m.w,height:m.h,maxWidth:`none`,maxHeight:`none`,margin:0,transform:`none`,animation:`none`}:{},de=le?m:S,fe=M&&de?u.map(e=>({position:e,role:`separator`,"aria-orientation":f(e),tabIndex:0,style:{position:`fixed`,...te(e,de)},onPointerDown:oe(e),onKeyDown:ce(e)})):[];return{panelRef:p,panelStyle:ue,headerHandleProps:{onPointerDown:I},resizeHandles:fe,isFloating:le,enabled:M,reset:L,guardBackdrop:se}}var ie={nw:`cursor-nwse-resize`,n:`cursor-ns-resize`,ne:`cursor-nesw-resize`,e:`cursor-ew-resize`,se:`cursor-nwse-resize`,s:`cursor-ns-resize`,sw:`cursor-nesw-resize`,w:`cursor-ew-resize`};function E({handles:e}){let{t}=i(`common`);return e.length===0?null:(0,l.jsx)(l.Fragment,{children:e.map(e=>(0,l.jsx)(`div`,{"data-testid":`modal-resize-${e.position}`,role:e.role,"aria-orientation":e[`aria-orientation`],"aria-label":t(`modal.resize.${e.position}`),tabIndex:e.tabIndex,style:e.style,onPointerDown:e.onPointerDown,onKeyDown:e.onKeyDown,className:o(`z-[51] rounded-full bg-transparent transition-colors duration-150`,`hover:bg-accent-primary/20 focus:outline-none focus-visible:bg-accent-primary/30`,ie[e.position])},e.position))})}function D(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function O(...e){return t=>{let n=!1,r=e.map(e=>{let r=D(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():D(e[t],null)}}}}function k(...e){return s.useCallback(O(...e),e)}typeof window<`u`&&window.document&&window.document.createElement;function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function j(e,t){let n=s.createContext(t),r=e=>{let{children:t,...r}=e,i=s.useMemo(()=>r,Object.values(r));return(0,l.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function M(e,t=[]){let n=[];function r(t,r){let i=s.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,c=n?.[e]?.[a]||i,u=s.useMemo(()=>o,Object.values(o));return(0,l.jsx)(c.Provider,{value:u,children:r})};o.displayName=t+`Provider`;function c(n,o){let c=o?.[e]?.[a]||i,l=s.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,c]}let i=()=>{let t=n.map(e=>s.createContext(e));return function(n){let r=n?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ae(i,...t)]}function ae(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var N=globalThis?.document?s.useLayoutEffect:()=>{},P=s.useId||(()=>void 0),F=0;function I(e){let[t,n]=s.useState(P());return N(()=>{e||n(e=>e??String(F++))},[e]),e||(t?`radix-${t}`:``)}var oe=s.useInsertionEffect||N;function L({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=se({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=s.useRef(e!==void 0);s.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,r])}return[l,s.useCallback(t=>{if(c){let n=ce(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[c,e,a,o])]}function se({defaultProp:e,onChange:t}){let[n,r]=s.useState(e),i=s.useRef(n),a=s.useRef(t);return oe(()=>{a.current=t},[t]),s.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ce(e){return typeof e==`function`}function le(e){let t=ue(e),n=s.forwardRef((e,n)=>{let{children:r,...i}=e,a=s.Children.toArray(r),o=a.find(fe);if(o){let e=o.props.children,r=a.map(t=>t===o?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return(0,l.jsx)(t,{...i,ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,r):null})}return(0,l.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ue(e){let t=s.forwardRef((e,t)=>{let{children:n,...r}=e;if(s.isValidElement(n)){let e=me(n),i=pe(r,n.props);return n.type!==s.Fragment&&(i.ref=t?O(t,e):e),s.cloneElement(n,i)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var de=Symbol(`radix.slottable`);function fe(e){return s.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===de}function pe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function me(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var R=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=le(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,l.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function he(e,t){e&&c.flushSync(()=>e.dispatchEvent(t))}function z(e){let t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}function ge(e,t=globalThis?.document){let n=z(e);s.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var _e=`DismissableLayer`,ve=`dismissableLayer.update`,ye=`dismissableLayer.pointerDownOutside`,be=`dismissableLayer.focusOutside`,xe,Se=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ce=s.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:c,...u}=e,d=s.useContext(Se),[f,p]=s.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=s.useState({}),g=k(t,e=>p(e)),_=Array.from(d.layers),[ee]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=_.indexOf(ee),y=f?_.indexOf(f):-1,te=d.layersWithOutsidePointerEventsDisabled.size>0,b=y>=v,x=Ee(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||c?.())},m),S=De(e=>{let t=e.target;[...d.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||c?.())},m);return ge(e=>{y===d.layers.size-1&&(r?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},m),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(xe=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Oe(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xe)}},[f,m,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,d]),s.useEffect(()=>{let e=()=>h({});return document.addEventListener(ve,e),()=>document.removeEventListener(ve,e)},[]),(0,l.jsx)(R.div,{...u,ref:g,style:{pointerEvents:te?b?`auto`:`none`:void 0,...e.style},onFocusCapture:A(e.onFocusCapture,S.onFocusCapture),onBlurCapture:A(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,x.onPointerDownCapture)})});Ce.displayName=_e;var we=`DismissableLayerBranch`,Te=s.forwardRef((e,t)=>{let n=s.useContext(Se),r=s.useRef(null),i=k(t,r);return s.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,l.jsx)(R.div,{...e,ref:i})});Te.displayName=we;function Ee(e,t=globalThis?.document){let n=z(e),r=s.useRef(!1),i=s.useRef(()=>{});return s.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ke(ye,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function De(e,t=globalThis?.document){let n=z(e),r=s.useRef(!1);return s.useEffect(()=>{let e=e=>{e.target&&!r.current&&ke(be,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Oe(){let e=new CustomEvent(ve);document.dispatchEvent(e)}function ke(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?he(i,a):i.dispatchEvent(a)}var Ae=`focusScope.autoFocusOnMount`,je=`focusScope.autoFocusOnUnmount`,Me={bubbles:!1,cancelable:!0},Ne=`FocusScope`,Pe=s.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[c,u]=s.useState(null),d=z(i),f=z(a),p=s.useRef(null),m=k(t,e=>u(e)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?p.current=t:B(p.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||B(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&B(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,h.paused]),s.useEffect(()=>{if(c){Ve.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Ae,Me);c.addEventListener(Ae,d),c.dispatchEvent(t),t.defaultPrevented||(Fe(We(Le(c)),{select:!0}),document.activeElement===e&&B(c))}return()=>{c.removeEventListener(Ae,d),setTimeout(()=>{let t=new CustomEvent(je,Me);c.addEventListener(je,f),c.dispatchEvent(t),t.defaultPrevented||B(e??document.body,{select:!0}),c.removeEventListener(je,f),Ve.remove(h)},0)}}},[c,d,f,h]);let g=s.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ie(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&B(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&B(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,l.jsx)(R.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})});Pe.displayName=Ne;function Fe(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(B(r,{select:t}),document.activeElement!==n)return}function Ie(e){let t=Le(e);return[Re(t,e),Re(t.reverse(),e)]}function Le(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Re(e,t){for(let n of e)if(!ze(n,{upTo:t}))return n}function ze(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Be(e){return e instanceof HTMLInputElement&&`select`in e}function B(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Be(e)&&t&&e.select()}}var Ve=He();function He(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ue(e,t),e.unshift(t)},remove(t){e=Ue(e,t),e[0]?.resume()}}}function Ue(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function We(e){return e.filter(e=>e.tagName!==`A`)}var Ge=`Portal`,Ke=s.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=s.useState(!1);N(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?c.createPortal((0,l.jsx)(R.div,{...r,ref:t}),o):null});Ke.displayName=Ge;function qe(e,t){return s.useReducer((e,n)=>t[e][n]??e,e)}var V=e=>{let{present:t,children:n}=e,r=Je(t),i=typeof n==`function`?n({present:r.isPresent}):s.Children.only(n),a=k(r.ref,Ye(i));return typeof n==`function`||r.isPresent?s.cloneElement(i,{ref:a}):null};V.displayName=`Presence`;function Je(e){let[t,n]=s.useState(),r=s.useRef(null),i=s.useRef(e),a=s.useRef(`none`),[o,c]=qe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return s.useEffect(()=>{let e=H(r.current);a.current=o===`mounted`?e:`none`},[o]),N(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=H(t);e?c(`MOUNT`):o===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),N(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=H(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=H(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:s.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function H(e){return e?.animationName||`none`}function Ye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xe=0;function Ze(){s.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Qe()),document.body.insertAdjacentElement(`beforeend`,e[1]??Qe()),Xe++,()=>{Xe===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Xe--}},[])}function Qe(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function $e(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function et(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var W=`right-scroll-bar-position`,tt=`width-before-scroll-bar`,nt=`with-scroll-bars-hidden`,rt=`--removed-body-scroll-bar-size`;function it(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function at(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ot=typeof window<`u`?s.useLayoutEffect:s.useEffect,st=new WeakMap;function ct(e,t){var n=at(t||null,function(t){return e.forEach(function(e){return it(e,t)})});return ot(function(){var t=st.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||it(e,null)}),i.forEach(function(e){r.has(e)||it(e,a)})}st.set(n,e)},[e]),n}function lt(e){return e}function ut(e,t){t===void 0&&(t=lt);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function dt(e){e===void 0&&(e={});var t=ut(null);return t.options=U({async:!0,ssr:!1},e),t}var ft=function(e){var t=e.sideCar,n=$e(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return s.createElement(r,U({},n))};ft.isSideCarExport=!0;function pt(e,t){return e.useMedium(t),ft}var mt=dt(),ht=function(){},gt=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:ht,onWheelCapture:ht,onTouchMoveCapture:ht}),i=r[0],a=r[1],o=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,ee=e.as,v=ee===void 0?`div`:ee,y=e.gapMode,te=$e(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),b=p,x=ct([n,t]),S=U(U({},te),i);return s.createElement(s.Fragment,null,d&&s.createElement(b,{sideCar:mt,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:y}),o?s.cloneElement(s.Children.only(c),U(U({},S),{ref:x})):s.createElement(v,U({},S,{className:l,ref:x}),c))});gt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},gt.classNames={fullWidth:tt,zeroRight:W};var _t,vt=function(){if(_t)return _t;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function yt(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=vt();return t&&e.setAttribute(`nonce`,t),e}function bt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xt(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var St=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yt())&&(bt(t,n),xt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ct=function(){var e=St();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wt=function(){var e=Ct();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Tt={left:0,top:0,right:0,gap:0},Et=function(e){return parseInt(e||``,10)||0},Dt=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Et(n),Et(r),Et(i)]},Ot=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Tt;var t=Dt(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])}},kt=wt(),G=`data-scroll-locked`,At=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${nt} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DtODIU64.js";var t={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DtODIU64.js";var t={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DtODIU64.js";var t={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};t.node;var n=e(t),r={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};r.node;var i=e(r);export{n,i as t};
|
package/client/dist/assets/{formatDistanceToNow-DlQY1Lm_.js → formatDistanceToNow-NVM6rK3i.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,S as n,k as r,w as i,x as a,y as o}from"./useSharedWebSocket-
|
|
1
|
+
import{A as e,C as t,S as n,k as r,w as i,x as a,y as o}from"./useSharedWebSocket-CNOvmgTr.js";import{t as s}from"./getTimezoneOffsetInMilliseconds-ZHg7WpdH.js";function c(e,t){let n=a(e)-+a(t);return n<0?-1:n>0?1:n}function l(e){return i(e,Date.now())}function u(e,n,r){let[i,a]=t(r?.in,e,n),o=i.getFullYear()-a.getFullYear(),s=i.getMonth()-a.getMonth();return o*12+s}function d(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function f(e,t){return a(e)-+a(t)}function p(e,t){let n=a(e,t?.in);return n.setHours(23,59,59,999),n}function m(e,t){let n=a(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function h(e,t){let n=a(e,t?.in);return+p(n,t)==+m(n,t)}function g(e,n,r){let[i,a,o]=t(r?.in,e,e,n),s=c(a,o),l=Math.abs(u(a,o));if(l<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-s*l);let d=c(a,o)===-s;h(i)&&l===1&&c(i,o)===1&&(d=!1);let f=s*(l-+d);return f===0?0:f}function _(e,t,n){let r=f(e,t)/1e3;return d(n?.roundingMethod)(r)}function v(i,a,l){let u=n(),d=l?.locale??u.locale??o,f=c(i,a);if(isNaN(f))throw RangeError(`Invalid time value`);let p=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:f}),[m,h]=t(l?.in,...f>0?[a,i]:[i,a]),v=_(h,m),y=(s(h)-s(m))/1e3,b=Math.round((v-y)/60),x;if(b<2)return l?.includeSeconds?v<5?d.formatDistance(`lessThanXSeconds`,5,p):v<10?d.formatDistance(`lessThanXSeconds`,10,p):v<20?d.formatDistance(`lessThanXSeconds`,20,p):v<40?d.formatDistance(`halfAMinute`,0,p):v<60?d.formatDistance(`lessThanXMinutes`,1,p):d.formatDistance(`xMinutes`,1,p):b===0?d.formatDistance(`lessThanXMinutes`,1,p):d.formatDistance(`xMinutes`,b,p);if(b<45)return d.formatDistance(`xMinutes`,b,p);if(b<90)return d.formatDistance(`aboutXHours`,1,p);if(b<1440){let e=Math.round(b/60);return d.formatDistance(`aboutXHours`,e,p)}else if(b<2520)return d.formatDistance(`xDays`,1,p);else if(b<43200){let e=Math.round(b/r);return d.formatDistance(`xDays`,e,p)}else if(b<43200*2)return x=Math.round(b/e),d.formatDistance(`aboutXMonths`,x,p);if(x=g(h,m),x<12){let t=Math.round(b/e);return d.formatDistance(`xMonths`,t,p)}else{let e=x%12,t=Math.trunc(x/12);return e<3?d.formatDistance(`aboutXYears`,t,p):e<9?d.formatDistance(`overXYears`,t,p):d.formatDistance(`almostXYears`,t+1,p)}}function y(e,t){return v(e,l(e),t)}export{y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as e}from"./useSharedWebSocket-
|
|
1
|
+
import{x as e}from"./useSharedWebSocket-CNOvmgTr.js";function t(t){let n=e(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),t-+r}export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DtODIU64.js";var t={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};t.node;var n=e(t);export{n as t};
|