nextclaw 0.19.23 → 0.19.26
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/package.json +19 -19
- package/ui-dist/assets/{api-CKKNxbsy.js → api-rASx2-N4.js} +1 -1
- package/ui-dist/assets/{app-manager-provider-BM1hziPv.js → app-manager-provider-CUkcbdWk.js} +1 -1
- package/ui-dist/assets/{channels-list-page-B6JASU3q.js → channels-list-page-CE_9jne_.js} +1 -1
- package/ui-dist/assets/{chat-page-C_lQm75P.js → chat-page-BMJLtk3O.js} +1 -1
- package/ui-dist/assets/cpu-DKc3bQic.js +3 -0
- package/ui-dist/assets/desktop-DJpQzxsz.js +3 -0
- package/ui-dist/assets/{desktop-update-config-jWt63bXG.js → desktop-update-config-DAD9JN9Q.js} +1 -1
- package/ui-dist/assets/{dialog-DWZeMf9V.js → dialog-CR80q3Rm.js} +1 -1
- package/ui-dist/assets/{dist-DN-YM_0Y.js → dist-NBjcwlsw.js} +1 -1
- package/ui-dist/assets/doc-browser-B19cYGxa.js +1 -0
- package/ui-dist/assets/{doc-browser-CAhfnm0D.js → doc-browser-CDBYvb8A.js} +1 -1
- package/ui-dist/assets/doc-browser-IRh6LCzu.js +1 -0
- package/ui-dist/assets/{doc-browser-context-FukQHvyo.js → doc-browser-context-BPeeiNJ_.js} +1 -1
- package/ui-dist/assets/{es2015-ZJ-nWL4L.js → es2015-CVAuMqlM.js} +1 -1
- package/ui-dist/assets/index-BEn7o-oH.js +100 -0
- package/ui-dist/assets/index-DV57tBmg.css +1 -0
- package/ui-dist/assets/{marketplace-page-BdiLk2eA.js → marketplace-page-B3Q_uKOZ.js} +2 -2
- package/ui-dist/assets/marketplace-page-CCq1bFb1.js +1 -0
- package/ui-dist/assets/{mcp-marketplace-page-DTCFgcDl.js → mcp-marketplace-page-D9maE_Sf.js} +1 -1
- package/ui-dist/assets/mcp-marketplace-page-O5AQzBYl.js +1 -0
- package/ui-dist/assets/{model-config-QChwQThC.js → model-config-BsEQYJvz.js} +1 -1
- package/ui-dist/assets/{notice-card-BM2_YNoc.js → notice-card-CF4AJPM3.js} +1 -1
- package/ui-dist/assets/{popover-2H9DS7Cv.js → popover-DeAliE_4.js} +1 -1
- package/ui-dist/assets/{provider-scoped-model-input-DsZJ44ZV.js → provider-scoped-model-input-B8LJ6RCt.js} +1 -1
- package/ui-dist/assets/{providers-list-lpGJJ21M.js → providers-list-5mA-2zno.js} +1 -1
- package/ui-dist/assets/remote-DiPWGRZc.js +1 -0
- package/ui-dist/assets/runtime-config-page-BSoKMvCh.js +1 -0
- package/ui-dist/assets/{search-config-CJOrq3h0.js → search-config-DxWm2GrK.js} +1 -1
- package/ui-dist/assets/{secrets-config-C17j6mjS.js → secrets-config-qutTAlFx.js} +1 -1
- package/ui-dist/assets/{select-C2c10F3e.js → select-HI5kiwX_.js} +1 -1
- package/ui-dist/assets/{setting-row-CB_ZFbIZ.js → setting-row-B4QnghjV.js} +1 -1
- package/ui-dist/assets/{tag-chip-CrQfVN3A.js → tag-chip-BPgMfp9l.js} +1 -1
- package/ui-dist/assets/{use-config-jAYudJxy.js → use-config-BFqzVF8Y.js} +1 -1
- package/ui-dist/assets/{use-infinite-scroll-loader-zzviKbU8.js → use-infinite-scroll-loader-CyNa4Vj6.js} +1 -1
- package/ui-dist/index.html +18 -18
- package/ui-dist/assets/cpu-DPPwMzoC.js +0 -3
- package/ui-dist/assets/desktop-CmIbyIrg.js +0 -3
- package/ui-dist/assets/doc-browser-p9DDNPWB.js +0 -1
- package/ui-dist/assets/doc-browser-rZIQIjuw.js +0 -1
- package/ui-dist/assets/index-CTfzteME.js +0 -100
- package/ui-dist/assets/index-DKC9hvsP.css +0 -1
- package/ui-dist/assets/marketplace-page-C3RVIckE.js +0 -1
- package/ui-dist/assets/mcp-marketplace-page-BVCDibC7.js +0 -1
- package/ui-dist/assets/remote-Dm6hKGew.js +0 -1
- package/ui-dist/assets/runtime-config-page-CDEAJFfY.js +0 -1
package/ui-dist/index.html
CHANGED
|
@@ -78,35 +78,35 @@
|
|
|
78
78
|
})();
|
|
79
79
|
</script>
|
|
80
80
|
<title>NextClaw</title>
|
|
81
|
-
<script type="module" crossorigin src="/assets/index-
|
|
81
|
+
<script type="module" crossorigin src="/assets/index-BEn7o-oH.js"></script>
|
|
82
82
|
<link rel="modulepreload" crossorigin href="/assets/i18n-D1144VAA.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DzY6wN61.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/cpu-
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/api-
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/es2015-
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/select-
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
84
|
+
<link rel="modulepreload" crossorigin href="/assets/cpu-DKc3bQic.js">
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/api-rASx2-N4.js">
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/es2015-CVAuMqlM.js">
|
|
87
|
+
<link rel="modulepreload" crossorigin href="/assets/select-HI5kiwX_.js">
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-NBjcwlsw.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="/assets/x-BeyYA_h6.js">
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/dialog-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/dialog-CR80q3Rm.js">
|
|
91
|
+
<link rel="modulepreload" crossorigin href="/assets/popover-DeAliE_4.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="/assets/search-CRtQwr-h.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="/assets/book-open-BcnAiKde.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/external-link-CpEvG65F.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/plus-B-YHtTNC.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-context-BPeeiNJ_.js">
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-B19cYGxa.js">
|
|
94
98
|
<link rel="modulepreload" crossorigin href="/assets/download-CMM8po31.js">
|
|
95
99
|
<link rel="modulepreload" crossorigin href="/assets/key-round-DUq47t0P.js">
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/notice-card-
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/notice-card-CF4AJPM3.js">
|
|
97
101
|
<link rel="modulepreload" crossorigin href="/assets/status-dot-l3kPFdq_.js">
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/app-manager-provider-
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/app-manager-provider-CUkcbdWk.js">
|
|
99
103
|
<link rel="modulepreload" crossorigin href="/assets/settings-MWL2SMyk.js">
|
|
100
104
|
<link rel="modulepreload" crossorigin href="/assets/refresh-cw-CrbD8EkT.js">
|
|
101
105
|
<link rel="modulepreload" crossorigin href="/assets/sparkles-BmgOD4nY.js">
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
104
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
105
|
-
<link rel="
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/doc-browser-CAhfnm0D.js">
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/use-config-jAYudJxy.js">
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/desktop-CmIbyIrg.js">
|
|
109
|
-
<link rel="stylesheet" crossorigin href="/assets/index-DKC9hvsP.css">
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-CDBYvb8A.js">
|
|
107
|
+
<link rel="modulepreload" crossorigin href="/assets/use-config-BFqzVF8Y.js">
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-DJpQzxsz.js">
|
|
109
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DV57tBmg.css">
|
|
110
110
|
</head>
|
|
111
111
|
|
|
112
112
|
<body>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{_ as e,m as t}from"./i18n-D1144VAA.js";import{t as n}from"./createLucideIcon-DzY6wN61.js";var r=`modulepreload`,i=function(e){return`/`+e},a={},o=function(e,t,n){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(t.map(t=>{if(t=i(t,n),t in a)return;a[t]=!0;let o=t.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:r,o||(l.as=`script`),l.crossOrigin=``,l.href=t,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,n)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})},s=e(t(),1),c=`popstate`;function l(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return m(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}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}}function m(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f()}}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,s=`POP`,l=null,u=d();u??(u=0,o.replaceState({...o.state,idx:u},``));function d(){return(o.state||{idx:null}).idx}function f(){s=`POP`;let e=d(),t=e==null?null:e-u;u=e,l&&l({action:s,location:y.location,delta:t})}function h(e,t){s=`PUSH`;let r=m(y.location,e,t);n&&n(r,e),u=d()+1;let c=p(r,u),f=y.createHref(r);try{o.pushState(c,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&l&&l({action:s,location:y.location,delta:1})}function g(e,t){s=`REPLACE`;let r=m(y.location,e,t);n&&n(r,e),u=d();let i=p(r,u),c=y.createHref(r);o.replaceState(i,``,c),a&&l&&l({action:s,location:y.location,delta:0})}function _(e){return v(e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw Error(`A history only accepts one active listener`);return i.addEventListener(c,f),l=e,()=>{i.removeEventListener(c,f),l=null}},createHref(e){return t(i,e)},createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:g,go(e){return o.go(e)}};return y}function v(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),u(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:h(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function y(e,t,n=`/`){return b(e,t,n,!1)}function b(e,t,n,r){let i=D((typeof t==`string`?g(t):t).pathname||`/`,n);if(i==null)return null;let a=S(e);w(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ue(i);o=ce(a[e],t,r)}return o}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,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=j([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}".`),S(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:oe(l,e.index),routesMeta:d})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of C(e.path))a(e,t,!0,n)}),t}function C(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=C(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 w(e){e.sort((e,t)=>e.score===t.score?se(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var T=/^:[\w-]+$/,ee=3,te=2,ne=1,re=10,ie=-2,ae=e=>e===`*`;function oe(e,t){let n=e.split(`/`),r=n.length;return n.some(ae)&&(r+=ie),t&&(r+=te),n.filter(e=>!ae(e)).reduce((e,t)=>e+(T.test(t)?ee:t===``?ne:re),r)}function se(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 ce(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=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:j([a,u.pathname]),pathnameBase:he(j([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=j([a,u.pathnameBase]))}return o}function E(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=le(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$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)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).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 D(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)||`/`}var de=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?pe(n.substring(1),`/`):pe(n,t)):a=t,{pathname:a,search:ge(r),hash:_e(i)}}function pe(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function O(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 me(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function k(e){let t=me(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function A(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),O(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),O(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),O(`#`,`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=fe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var j=e=>e.join(`/`).replace(/\/\/+/g,`/`),he=e=>e.replace(/\/+$/,``).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 e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}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`||!de.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(xe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=D(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!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:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ce=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ce);var we=[`GET`,...Ce];new Set(we);var M=s.createContext(null);M.displayName=`DataRouter`;var N=s.createContext(null);N.displayName=`DataRouterState`;var Te=s.createContext(!1),Ee=s.createContext({isTransitioning:!1});Ee.displayName=`ViewTransition`;var De=s.createContext(new Map);De.displayName=`Fetchers`;var Oe=s.createContext(null);Oe.displayName=`Await`;var P=s.createContext(null);P.displayName=`Navigation`;var F=s.createContext(null);F.displayName=`Location`;var I=s.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var L=s.createContext(null);L.displayName=`RouteError`;var ke=`REACT_ROUTER_ERROR`,Ae=`REDIRECT`,je=`ROUTE_ERROR_RESPONSE`;function Me(e){if(e.startsWith(`${ke}:${Ae}:{`))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 Ne(e){if(e.startsWith(`${ke}:${je}:{`))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 Pe(e,{relative:t}={}){u(R(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=s.useContext(P),{hash:i,pathname:a,search:o}=V(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:j([n,a])),r.createHref({pathname:c,search:o,hash:i})}function R(){return s.useContext(F)!=null}function z(){return u(R(),`useLocation() may be used only in the context of a <Router> component.`),s.useContext(F).location}var Fe=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ie(e){s.useContext(P).static||s.useLayoutEffect(e)}function B(){let{isDataRoute:e}=s.useContext(I);return e?nt():Le()}function Le(){u(R(),`useNavigate() may be used only in the context of a <Router> component.`);let e=s.useContext(M),{basename:t,navigator:n}=s.useContext(P),{matches:r}=s.useContext(I),{pathname:i}=z(),a=JSON.stringify(k(r)),o=s.useRef(!1);return Ie(()=>{o.current=!0}),s.useCallback((r,s={})=>{if(d(o.current,Fe),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=A(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}s.createContext(null);function Re(){let{matches:e}=s.useContext(I),t=e[e.length-1];return t?t.params:{}}function V(e,{relative:t}={}){let{matches:n}=s.useContext(I),{pathname:r}=z(),i=JSON.stringify(k(n));return s.useMemo(()=>A(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ze(e,t){return Be(e,t)}function Be(e,t,n,r,i){u(R(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=s.useContext(P),{matches:o}=s.useContext(I),c=o[o.length-1],l=c?c.params:{},f=c?c.pathname:`/`,p=c?c.pathnameBase:`/`,m=c&&c.route;{let e=m&&m.path||``;it(f,!m||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (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 h=z(),_;if(t){let e=typeof t==`string`?g(t):t;u(p===`/`||e.pathname?.startsWith(p),`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 "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`),_=e}else _=h;let v=_.pathname||`/`,b=v;if(p!==`/`){let e=p.replace(/^\//,``).split(`/`);b=`/`+v.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let x=y(e,{pathname:b});d(m||x!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),d(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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 S=Ke(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:j([p,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?p:j([p,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&S?s.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,..._},navigationType:`POP`}},S):S}function Ve(){let e=tt(),t=ye(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=s.createElement(s.Fragment,null,s.createElement(`p`,null,`💿 Hey developer 👋`),s.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,s.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,s.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),s.createElement(s.Fragment,null,s.createElement(`h2`,null,`Unexpected Application Error!`),s.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?s.createElement(`pre`,{style:i},n):null,o)}var He=s.createElement(Ve,null),Ue=class extends s.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=Ne(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:s.createElement(I.Provider,{value:this.props.routeContext},s.createElement(L.Provider,{value:e,children:this.props.component}));return this.context?s.createElement(We,{error:e},t):t}};Ue.contextType=Te;var H=new WeakMap;function We({children:e,error:t}){let{basename:n}=s.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Me(t.digest);if(e){let r=H.get(t);if(r)throw r;let i=Se(e.location,n);if(xe&&!H.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw H.set(t,n),n}return s.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ge({routeContext:e,match:t,children:n}){let r=s.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),s.createElement(I.Provider,{value:e},n)}function Ke(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.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 c=!1,l=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:be(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,f=!1,p=null,m=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||He,c&&(l<0&&i===0?(it(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):l===i&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,i+1)),g=()=>{let t;return t=u?p:f?m:r.route.Component?s.createElement(r.route.Component,null):r.route.element?r.route.element:e,s.createElement(Ge,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?s.createElement(Ue,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()},null)}function qe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Je(e){let t=s.useContext(M);return u(t,qe(e)),t}function Ye(e){let t=s.useContext(N);return u(t,qe(e)),t}function Xe(e){let t=s.useContext(I);return u(t,qe(e)),t}function Ze(e){let t=Xe(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 Qe(){return Ze(`useRouteId`)}function $e(){return Ye(`useNavigation`).navigation}function et(){let{matches:e,loaderData:t}=Ye(`useMatches`);return s.useMemo(()=>e.map(e=>x(e,t)),[e,t])}function tt(){let e=s.useContext(L),t=Ye(`useRouteError`),n=Ze(`useRouteError`);return e===void 0?t.errors?.[n]:e}function nt(){let{router:e}=Je(`useNavigate`),t=Ze(`useNavigate`),n=s.useRef(!1);return Ie(()=>{n.current=!0}),s.useCallback(async(r,i={})=>{d(n.current,Fe),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var rt={};function it(e,t,n){!t&&!rt[e]&&(rt[e]=!0,d(!1,n))}s.useOptimistic,s.memo(at);function at({routes:e,future:t,state:n,onError:r}){return Be(e,void 0,n,r,t)}function ot({to:e,replace:t,state:n,relative:r}){u(R(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=s.useContext(P);d(!i,`<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:a}=s.useContext(I),{pathname:o}=z(),c=B(),l=A(e,k(a),o,r===`path`),f=JSON.stringify(l);return s.useEffect(()=>{c(JSON.parse(f),{replace:t,state:n,relative:r})},[c,f,r,t,n]),null}function st(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 ct({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){u(!R(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=s.useMemo(()=>({basename:c,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[c,i,a,o]);typeof n==`string`&&(n=g(n));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:_=`default`}=n,v=s.useMemo(()=>{let e=D(f,c);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:_},navigationType:r}},[c,f,p,m,h,_,r]);return d(v!=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.`),v==null?null:s.createElement(P.Provider,{value:l},s.createElement(F.Provider,{children:t,value:v}))}function lt({children:e,location:t}){return ze(U(e),t)}s.Component;function U(e,t=[]){let n=[];return s.Children.forEach(e,(e,r)=>{if(!s.isValidElement(e))return;let i=[...t,r];if(e.type===s.Fragment){n.push.apply(n,U(e.props.children,i));return}u(e.type===st,`[${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 a={id:e.props.id||i.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&&(a.children=U(e.props.children,i)),n.push(a)}),n}var W=`get`,G=`application/x-www-form-urlencoded`;function K(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ut(e){return K(e)&&e.tagName.toLowerCase()===`button`}function dt(e){return K(e)&&e.tagName.toLowerCase()===`form`}function ft(e){return K(e)&&e.tagName.toLowerCase()===`input`}function pt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mt(e,t){return e.button===0&&(!t||t===`_self`)&&!pt(e)}var q=null;function ht(){if(q===null)try{new FormData(document.createElement(`form`),0),q=!1}catch{q=!0}return q}var gt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function J(e){return e!=null&&!gt.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${G}"`),null):e}function _t(e,t){let n,r,i,a,o;if(dt(e)){let o=e.getAttribute(`action`);r=o?D(o,t):null,n=e.getAttribute(`method`)||W,i=J(e.getAttribute(`enctype`))||G,a=new FormData(e)}else if(ut(e)||ft(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?D(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||W,i=J(e.getAttribute(`formenctype`))||J(o.getAttribute(`enctype`))||G,a=new FormData(o,e),!ht()){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(K(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=W,r=null,i=G,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 vt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},yt=/[&><\u2028\u2029]/g;function bt(e){return e.replace(yt,e=>vt[e])}function Y(e,t){if(e===!1||e==null)throw Error(t)}function xt(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&&D(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function St(e,t){if(e.id in t)return t[e.id];try{let n=await o(()=>import(e.module),[]);return t[e.id]=n,n}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 Ct(e){return e!=null&&typeof e.page==`string`}function wt(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 Tt(e,t,n){return At((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await St(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(wt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Et(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,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 Dt(e,t,{includeHydrateFallback:n}={}){return Ot(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 Ot(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 At(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ct(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=s.useContext(M);return Y(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Mt(){let e=s.useContext(N);return Y(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var X=s.createContext(void 0);X.displayName=`FrameworkContext`;function Nt(){let e=s.useContext(X);return Y(e,`You must render this element inside a <HydratedRouter> element`),e}function Pt(e,t){let n=s.useContext(X),[r,i]=s.useState(!1),[a,o]=s.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=s.useRef(null);s.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),s.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:Z(c,m),onBlur:Z(l,h),onMouseEnter:Z(u,m),onMouseLeave:Z(d,h),onTouchStart:Z(f,m)}]:[a,p,{}]:[!1,p,{}]}function Z(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ft({page:e,...t}){let{router:n}=jt(),r=s.useMemo(()=>y(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?s.createElement(Lt,{page:e,matches:r,...t}):null}function It(e){let{manifest:t,routeModules:n}=Nt(),[r,i]=s.useState([]);return s.useEffect(()=>{let r=!1;return Tt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Lt({page:e,matches:t,...n}){let r=z(),{future:i,manifest:a,routeModules:o}=Nt(),{basename:c}=jt(),{loaderData:l,matches:u}=Mt(),d=s.useMemo(()=>Et(e,t,u,a,r,`data`),[e,t,u,a,r]),f=s.useMemo(()=>Et(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=s.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let u=xt(e,c,i.unstable_trailingSlashAwareDataRequests,`data`);return s&&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,i.unstable_trailingSlashAwareDataRequests,l,r,a,d,t,e,o]),m=s.useMemo(()=>Dt(f,a),[f,a]),h=It(f);return s.createElement(s.Fragment,null,p.map(e=>s.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>s.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>s.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Rt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}s.Component;var zt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{zt&&(window.__reactRouterVersion=`7.13.0`)}catch{}function Bt({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=s.useRef();i.current??=l({window:r,v5Compat:!0});let a=i.current,[o,c]=s.useState({action:a.action,location:a.location}),u=s.useCallback(e=>{n===!1?c(e):s.startTransition(()=>c(e))},[n]);return s.useLayoutEffect(()=>a.listen(u),[a,u]),s.createElement(ct,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Vt({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=s.useState({action:n.action,location:n.location}),o=s.useCallback(e=>{r===!1?a(e):s.startTransition(()=>a(e))},[r]);return s.useLayoutEffect(()=>n.listen(o),[n,o]),s.createElement(ct,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Vt.displayName=`unstable_HistoryRouter`;var Ht=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q=s.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,unstable_useTransitions:g}=s.useContext(P),_=typeof l==`string`&&Ht.test(l),v=Se(l,h);l=v.to;let y=Pe(l,{relative:r}),[b,x,S]=Pt(n,p),C=Yt(l,{replace:a,state:o,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:g});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=s.createElement(`a`,{...p,...S,href:v.absoluteURL||y,onClick:v.isExternal||i?e:w,ref:Rt(m,x),target:c,"data-discover":!_&&t===`render`?`true`:void 0});return b&&!_?s.createElement(s.Fragment,null,T,s.createElement(Ft,{page:y})):T});Q.displayName=`Link`;var Ut=s.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:c,...l},u){let d=V(a,{relative:l.relative}),f=z(),p=s.useContext(N),{navigator:m,basename:h}=s.useContext(P),g=p!=null&&an(d)&&o===!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=D(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&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 ee=typeof i==`function`?i(C):i;return s.createElement(Q,{...l,"aria-current":w,className:T,ref:u,style:ee,to:a,viewTransition:o},typeof c==`function`?c(C):c)});Ut.displayName=`NavLink`;var Wt=s.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=W,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...m},h)=>{let{unstable_useTransitions:g}=s.useContext(P),_=Qt(),v=$t(c,{relative:u}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&Ht.test(c);return s.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});g&&n!==!1?s.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Wt.displayName=`Form`;function Gt({getKey:e,storageKey:t,...n}){let r=s.useContext(X),{basename:i}=s.useContext(P),a=z(),o=et();nn({getKey:e,storageKey:t});let c=s.useMemo(()=>{if(!r||!e)return null;let t=tn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.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 s.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${bt(JSON.stringify(t||en))}, ${bt(JSON.stringify(c))})`}})}Gt.displayName=`ScrollRestoration`;function Kt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qt(e){let t=s.useContext(M);return u(t,Kt(e)),t}function Jt(e){let t=s.useContext(N);return u(t,Kt(e)),t}function Yt(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=B(),d=z(),f=V(e,{relative:a});return s.useCallback(p=>{if(mt(p,t)){p.preventDefault();let t=n===void 0?h(d)===h(f):n,m=()=>u(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c});l?s.startTransition(()=>m()):m()}},[d,u,f,n,r,t,e,i,a,o,c,l])}var Xt=0,Zt=()=>`__${String(++Xt)}__`;function Qt(){let{router:e}=qt(`useSubmit`),{basename:t}=s.useContext(P),n=Qe(),r=e.fetch,i=e.navigate;return s.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=_t(e,t);a.navigate===!1?await r(a.fetcherKey||Zt(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function $t(e,{relative:t}={}){let{basename:n}=s.useContext(P),r=s.useContext(I);u(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...V(e||`.`,{relative:t})},o=z();if(e==null){a.search=o.search;let e=new URLSearchParams(a.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();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:j([n,a.pathname])),h(a)}var en=`react-router-scroll-positions`,$={};function tn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:D(e.pathname,n)||e.pathname},t)),i??=e.key,i}function nn({getKey:e,storageKey:t}={}){let{router:n}=qt(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Jt(`useScrollRestoration`),{basename:a}=s.useContext(P),o=z(),c=et(),l=$e();s.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),rn(s.useCallback(()=>{if(l.state===`idle`){let t=tn(o,c,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||en,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,a,o,c,t])),typeof document<`u`&&(s.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||en);e&&($=JSON.parse(e))}catch{}},[t]),s.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>tn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),s.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function rn(e,t){let{capture:n}=t||{};s.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function an(e,{relative:t}={}){let n=s.useContext(Ee);u(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qt(`useViewTransitionState`),i=V(e,{relative:t});if(!n.isTransitioning)return!1;let a=D(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=D(n.nextLocation.pathname,r)||n.nextLocation.pathname;return E(i.pathname,o)!=null||E(i.pathname,a)!=null}var on=n(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]);export{ot as a,z as c,o as d,Ut as i,B as l,Bt as n,st as o,Q as r,lt as s,on as t,Re as u};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/doc-browser-p9DDNPWB.js","assets/doc-browser-rZIQIjuw.js","assets/i18n-D1144VAA.js","assets/createLucideIcon-DzY6wN61.js","assets/search-CRtQwr-h.js","assets/book-open-BcnAiKde.js","assets/external-link-CpEvG65F.js","assets/plus-B-YHtTNC.js","assets/x-BeyYA_h6.js","assets/doc-browser-context-FukQHvyo.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as e,i as t,m as n,p as r,r as i,u as a}from"./i18n-D1144VAA.js";import{Dt as o,Et as s,Lt as c,Nt as l,Ot as u,Tt as d,bt as f,gt as p,mt as m,pt as h,wt as g,yt as ee}from"./api-CKKNxbsy.js";import{d as _,i as v,t as y}from"./cpu-DPPwMzoC.js";import{t as b}from"./createLucideIcon-DzY6wN61.js";import{n as te,t as ne}from"./search-CRtQwr-h.js";import{t as re}from"./book-open-BcnAiKde.js";import{i as ie,k as ae,n as oe,r as x,t as se}from"./select-C2c10F3e.js";import{t as S}from"./download-CMM8po31.js";import{t as ce}from"./key-round-DUq47t0P.js";import{h as le,n as ue}from"./app-manager-provider-BM1hziPv.js";import{n as de,t as fe}from"./settings-MWL2SMyk.js";import{t as pe}from"./refresh-cw-CrbD8EkT.js";import{t as me}from"./sparkles-BmgOD4nY.js";import{t as he}from"./x-BeyYA_h6.js";import{i as ge}from"./doc-browser-context-FukQHvyo.js";import{n as _e}from"./doc-browser-CAhfnm0D.js";import{t as ve}from"./use-config-jAYudJxy.js";import{n as ye,r as be,t as xe}from"./popover-2H9DS7Cv.js";var C=b(`AlarmClock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),w=b(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),T=b(`BrainCircuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),E=b(`Languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),D=b(`MessageCircle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),O=b(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),Se=b(`Plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Ce=b(`Shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),we=b(`Smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Te=b(`Wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),k=b(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]),A=f(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null})),Ee=new class{constructor(){this.start=async()=>{let e=this.getDesktopApi();if(!e){this.markUnsupported();return}A.setState({supported:!0,initialized:!1,busyAction:`loading`});try{let t=await e.getPresenceState();A.setState({supported:!0,initialized:!0,busyAction:null,snapshot:t})}catch(e){A.setState({supported:!0,initialized:!0,busyAction:null}),c.error(`${i(`runtimePresenceLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.markUnsupported=()=>{A.setState({supported:!1,initialized:!0,busyAction:null,snapshot:null})},this.updatePreferences=async e=>{let t=this.getDesktopApi();if(!t)throw Error(i(`runtimePresenceLaunchAtLoginUnavailable`));A.setState({busyAction:`saving-preferences`});try{let n=await t.updatePresencePreferences(e);return A.setState({supported:!0,initialized:!0,snapshot:n}),c.success(i(`runtimePresenceSaved`)),n}catch(e){throw c.error(`${i(`runtimePresenceSaveFailed`)}: ${this.getErrorMessage(e)}`),e}finally{A.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:i(`error`)}},j=f(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null}));new class{constructor(){this.unsubscribe=null,this.subscriptionCount=0,this.start=async()=>{this.subscriptionCount+=1;let e=this.getDesktopApi();if(!e){j.setState({supported:!1,initialized:!0,snapshot:null});return}this.unsubscribe||=e.onUpdateStateChanged(e=>{j.setState({supported:!0,initialized:!0,snapshot:e})}),j.setState({supported:!0,initialized:!1});try{let t=await e.getUpdateState();j.setState({supported:!0,initialized:!0,snapshot:t})}catch(e){j.setState({supported:!0,initialized:!0}),c.error(`${i(`desktopUpdatesLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.stop=()=>{this.subscriptionCount=Math.max(0,this.subscriptionCount-1),!(this.subscriptionCount>0)&&(this.unsubscribe?.(),this.unsubscribe=null)},this.checkForUpdates=async()=>{let e;try{e=await this.runSnapshotCommand(`checking`,i(`desktopUpdatesCheckFailed`),async e=>await e.checkForUpdates())}catch{return}if(e.status===`up-to-date`){c.success(i(`desktopUpdatesAlreadyLatest`));return}if(e.status===`update-available`){c.success(i(`desktopUpdatesAvailable`).replace(`{version}`,e.availableVersion??i(`desktopUpdatesUnknownVersion`)));return}if(e.status===`downloaded`){c.success(i(`desktopUpdatesReadyToApply`));return}e.status===`failed`&&e.errorMessage&&c.error(e.errorMessage)},this.downloadUpdate=async()=>{let e;try{e=await this.runSnapshotCommand(`downloading`,i(`desktopUpdatesDownloadFailed`),async e=>await e.downloadUpdate())}catch{return}e.status===`downloaded`&&c.success(i(`desktopUpdatesReadyToApply`))},this.applyDownloadedUpdate=async()=>{try{await this.runSnapshotCommand(`applying`,i(`desktopUpdatesApplyFailed`),async e=>await e.applyDownloadedUpdate())}catch{return}},this.updatePreferences=async e=>{try{await this.runSnapshotCommand(`saving-preferences`,i(`desktopUpdatesPreferencesFailed`),async t=>await t.updatePreferences(e))}catch{return}},this.updateChannel=async e=>{if(j.getState().snapshot?.channel===e)return;let t;try{t=await this.runSnapshotCommand(`switching-channel`,i(`desktopUpdatesChannelChangeFailed`),async t=>await t.updateChannel(e))}catch{return}if(t.status===`update-available`&&t.availableVersion){c.success(i(`desktopUpdatesChannelChangedWithUpdate`).replace(`{channel}`,this.getChannelLabel(e)).replace(`{version}`,t.availableVersion));return}c.success(i(`desktopUpdatesChannelChanged`).replace(`{channel}`,this.getChannelLabel(e)))},this.runSnapshotCommand=async(e,t,n)=>{let r=this.getDesktopApi();if(!r)throw Error(i(`desktopUpdatesDesktopOnlyDescription`));j.setState({busyAction:e});try{let e=await n(r);return j.setState({snapshot:e}),e}catch(e){throw c.error(`${t}: ${this.getErrorMessage(e)}`),e}finally{j.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:i(`error`),this.getChannelLabel=e=>i(e===`beta`?`desktopUpdatesChannelBeta`:`desktopUpdatesChannelStable`)}};function De(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r||n.startsWith(`${r}/`)}function Oe(e){let t=e.toLowerCase();return t===`/chat`||t.startsWith(`/chat/`)||t===`/skills`||t.startsWith(`/skills/`)||t===`/cron`||t.startsWith(`/cron/`)||t===`/agents`||t.startsWith(`/agents/`)}function ke(e){let t=e.toLowerCase();return t.startsWith(`/chat/`)&&t!==`/chat`}function Ae(e){return[{target:`/chat`,label:e(`chat`),icon:D},{target:`/skills`,label:e(`marketplaceFilterSkills`),icon:T},{target:`/agents`,label:e(`agentsPageTitle`),icon:w},{target:`/settings`,label:e(`settings`),icon:fe}]}function je(e){return[{target:`/model`,label:e(`model`),icon:y},{target:`/providers`,label:e(`providers`),icon:me},{target:`/channels`,label:e(`channels`),icon:de},{target:`/search`,label:e(`searchChannels`),icon:ne},{target:`/runtime`,label:e(`runtime`),icon:y},{target:`/updates`,label:e(`updates`),icon:S},{target:`/remote`,label:e(`remote`),icon:Te},{target:`/security`,label:e(`security`),icon:Ce},{target:`/secrets`,label:e(`secrets`),icon:ce},{target:`/cron`,label:e(`cron`),icon:C},{target:`/marketplace/plugins`,label:e(`marketplaceFilterPlugins`),icon:Se},{target:`/marketplace/mcp`,label:e(`marketplaceFilterMcp`),icon:k}]}function M(e){return[{target:`/language`,label:e(`language`),icon:E},...je(e)]}function Me(e){let t=e.toLowerCase();return t===`/settings`?!0:M(e=>e).some(e=>De(t,e.target))}function Ne(e,t){let n=e.toLowerCase(),r=M(t);if(ke(n))return{title:t(`chat`),backTarget:`/chat`,backLabel:t(`chat`)};if(n===`/chat`)return{title:t(`chat`),backTarget:null,backLabel:null};if(n===`/skills`||n.startsWith(`/skills/`))return{title:t(`marketplaceFilterSkills`),backTarget:null,backLabel:null};if(n===`/agents`||n.startsWith(`/agents/`))return{title:t(`agentsPageTitle`),backTarget:null,backLabel:null};if(n===`/settings`)return{title:t(`settings`),backTarget:null,backLabel:null};for(let e of r)if(De(n,e.target))return{title:e.label,backTarget:`/settings`,backLabel:t(`settings`)};return{title:t(`settings`),backTarget:null,backLabel:null}}var Pe=`nextclaw.ui.theme`,N=[{value:`warm`,labelKey:`themeWarm`},{value:`cool`,labelKey:`themeCool`}],P=`warm`,F=!1,I=new Set;function Fe(e){return e===`warm`||e===`cool`}function L(e){typeof document>`u`||document.documentElement.setAttribute(`data-theme`,e)}function Ie(){if(typeof window>`u`)return`warm`;try{let e=window.localStorage.getItem(Pe);if(Fe(e))return e}catch{}return`warm`}function R(){return F||=(P=Ie(),L(P),!0),P}function Le(){return F?P:R()}function Re(e){if(R(),e!==P){if(P=e,L(P),typeof window<`u`)try{window.localStorage.setItem(Pe,P)}catch{}I.forEach(e=>e(P))}}function ze(e){return I.add(e),()=>{I.delete(e)}}var z=r(),Be={healthy:`bg-emerald-500 shadow-[0_0_0_3px_rgba(16,185,129,0.14)]`,attention:`bg-amber-400 shadow-[0_0_0_3px_rgba(251,191,36,0.16)]`,inactive:`bg-gray-300 shadow-[0_0_0_3px_rgba(156,163,175,0.12)]`};function Ve(){let e=p(),t=e.actionLabel===i(`runtimeStatusRestartAction`),n=async()=>{if(t)try{let e=await ee.runRuntimeControlAction(`restart-service`);c.success(e.message)}catch(e){let t=e instanceof Error?e.message:i(`runtimeControlActionFailed`);c.error(`${i(`runtimeControlActionFailed`)}: ${t}`)}};return(0,z.jsxs)(xe,{children:[(0,z.jsx)(be,{asChild:!0,children:(0,z.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-full p-0.5 transition-transform hover:scale-105`,"aria-label":e.title,title:e.title,"data-testid":`runtime-status-entry`,children:(0,z.jsx)(`span`,{className:a(`h-2.5 w-2.5 rounded-full`,Be[e.tone])})})}),(0,z.jsxs)(ye,{align:`start`,sideOffset:10,className:`w-[290px] space-y-3 rounded-2xl border border-gray-200 bg-white p-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`div`,{className:`text-sm font-semibold text-gray-900`,children:e.title}),(0,z.jsx)(`p`,{className:`text-xs leading-5 text-gray-600`,children:e.description})]}),e.reasonLines.length>0?(0,z.jsx)(`div`,{className:`space-y-2`,children:e.reasonLines.map(e=>(0,z.jsx)(`div`,{className:`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-900`,children:e},e))}):null,e.actionLabel?(0,z.jsxs)(`div`,{className:`flex items-center justify-between border-t border-gray-100 pt-1`,children:[(0,z.jsx)(`span`,{className:`text-[11px] text-gray-500`,children:i(`runtimeStatusActionHint`)}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>void n(),disabled:e.isBusy,className:`text-sm font-semibold text-sky-600 transition-colors hover:text-sky-700 disabled:text-gray-400`,children:e.isBusy?i(`runtimeStatusRestartingAction`):e.actionLabel})]}):null]})]})}var B=e(n(),1);function V({className:e,density:t=`sidebar`,suffix:n}){let{data:r}=ve(),i=r?.name??`NextClaw`,o=r?.productVersion?.trim(),s=o?`v${o}`:null,c=n??(0,z.jsx)(Ve,{}),l=typeof window<`u`&&window.nextclawDesktop?.platform===`darwin`,u=t===`chrome`;return(0,z.jsxs)(`div`,{className:a(e??`flex min-w-0 items-center gap-2`,l&&`pl-[58px]`),children:[(0,z.jsx)(`div`,{className:a(`flex shrink-0 items-center justify-center overflow-hidden`,`h-6 w-6 rounded-md`),children:(0,z.jsx)(`img`,{src:`/logo.svg`,alt:i,className:`h-full w-full object-contain`})}),(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,z.jsx)(`span`,{className:a(`shrink-0 font-semibold text-gray-800`,u?`text-[15px]`:`text-[14px]`),children:i}),s?(0,z.jsx)(He,{versionLabel:s,density:t}):null]}),(0,z.jsx)(Ue,{}),c?(0,z.jsx)(`span`,{className:`inline-flex items-center shrink-0`,children:c}):null]})]})}function He({versionLabel:e,density:t}){let[n,r]=(0,B.useState)(!1);return(0,z.jsxs)(`span`,{className:`relative min-w-0 flex-1`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),children:[(0,z.jsx)(`span`,{tabIndex:0,"aria-label":e,className:a(`block min-w-0 truncate font-medium text-gray-500 outline-none`,`text-[12px]`),children:e}),n?(0,z.jsx)(`span`,{className:`pointer-events-none absolute left-0 top-full z-[var(--z-tooltip)] mt-1 w-max max-w-none whitespace-nowrap rounded-md border bg-popover px-3 py-1.5 text-xs font-medium text-popover-foreground shadow-md`,children:e}):null]})}function Ue(){let{supported:e,busyAction:t,snapshot:n}=m();return!e||!n?null:n.status===`downloading`||n.status===`blocked`||n.status===`failed`?(0,z.jsx)(We,{snapshot:n}):n.status===`downloaded`?(0,z.jsx)(`button`,{type:`button`,className:`inline-flex h-5 shrink-0 items-center rounded-full bg-emerald-50 px-2 text-[11px] font-semibold leading-none text-emerald-700 ring-1 ring-emerald-100 transition-colors hover:bg-emerald-100 disabled:opacity-70`,disabled:t===`applying`,onClick:()=>void h.applyDownloadedUpdate(),children:i(t===`applying`?`desktopUpdatesInlineApplying`:`desktopUpdatesInlineReady`)}):n.status===`update-available`?(0,z.jsx)(`button`,{type:`button`,className:`inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 transition-colors hover:bg-amber-100 disabled:opacity-70`,disabled:t===`downloading`,onClick:()=>void h.downloadUpdate(),children:i(t===`downloading`?`desktopUpdatesInlineDownloading`:`desktopUpdatesInlineDownload`)}):null}function We({snapshot:e}){if(e.status===`blocked`||e.status===`failed`)return(0,z.jsx)(Ge,{snapshot:e});let t=e.status===`downloading`?Ke(e):null;return t?(0,z.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 transition-colors hover:bg-amber-100 disabled:opacity-70`,title:i(`updates`),children:t}):null}function Ge({snapshot:e}){let t=e.status===`failed`?i(`desktopUpdatesStatusFailed`):i(`desktopUpdatesStatusBlocked`),n=e.recoveryCommand?.trim()||null,r=e.errorMessage?.trim()||e.blockReason?.trim()||null,a=[t,e.status===`blocked`&&e.blockReason?i(`desktopUpdatesBlockedRootCause.${e.blockReason}`):null,r,n].filter(Boolean).join(`
|
|
3
|
-
`);return(0,z.jsx)(`span`,{role:`img`,"aria-label":t,title:a,tabIndex:0,className:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-amber-50 text-[13px] font-bold leading-none text-amber-700 ring-1 ring-amber-100`,children:`!`})}function Ke(e){let t=e.progress?.percent;return t==null?i(`desktopUpdatesInlineDownloading`):i(`desktopUpdatesInlineDownloadingPercent`).replace(`{percent}`,String(t))}var qe={default:{row:`gap-3 px-3 py-2.5 text-[14px]`,icon:`h-[17px] w-[17px]`,value:`text-xs`,gap:`gap-3`},compact:{row:`gap-2.5 px-3 py-2 text-[13px]`,icon:`h-4 w-4`,value:`text-[11px]`,gap:`gap-2.5`}};function H(e){return qe[e]}function U({to:e,label:t,icon:n,density:r=`default`,className:i}){let o=H(r);return(0,z.jsx)(v,{to:e,className:({isActive:e})=>a(`group flex w-full items-center rounded-xl font-medium transition-colors duration-base`,o.row,e?`bg-gray-200 text-gray-900 shadow-sm`:`text-gray-600 hover:bg-gray-200/60 hover:text-gray-900`,i),children:({isActive:e})=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(n,{className:a(o.icon,`transition-colors`,e?`text-gray-900`:`text-gray-500 group-hover:text-gray-800`)}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:t})]})})}function W({label:e,icon:t,onClick:n,density:r=`default`,className:i,labelClassName:o,trailing:s,trailingClassName:c,testId:l,trailingTestId:u}){let d=H(r);return(0,z.jsxs)(`button`,{type:`button`,onClick:n,className:a(`flex w-full items-center rounded-xl font-medium text-gray-600 transition-all duration-base hover:bg-gray-200/60 hover:text-gray-800`,d.row,i),"data-testid":l,children:[(0,z.jsx)(t,{className:a(d.icon,`shrink-0 text-gray-400`)}),(0,z.jsx)(`span`,{className:a(`min-w-0 flex-1 text-left`,o),children:e}),s?(0,z.jsx)(`span`,{className:a(`shrink-0 text-gray-500`,d.value,c),"data-testid":u,children:s}):null]})}function G({label:e,icon:t,value:n,valueLabel:r,onValueChange:i,density:o=`default`,children:s}){let c=H(o);return(0,z.jsxs)(se,{value:n,onValueChange:i,children:[(0,z.jsxs)(ie,{className:a(`h-auto w-full rounded-xl border-0 bg-transparent font-medium text-gray-600 shadow-none hover:bg-gray-200/60 focus:ring-0`,c.row),children:[(0,z.jsxs)(`div`,{className:a(`flex min-w-0 items-center`,c.gap),children:[(0,z.jsx)(t,{className:a(c.icon,`text-gray-400`)}),(0,z.jsx)(`span`,{className:`text-left`,children:e})]}),(0,z.jsx)(`span`,{className:a(`ml-auto text-gray-500`,c.value),children:r})]}),(0,z.jsx)(oe,{children:s})]})}var K=`nextclaw-pwa-install-banner-dismissed`,q=`nextclaw-pwa-install-banner-dismissed-until`;function Je(){let e=J();return e?e.getItem(`nextclaw-pwa-install-banner-dismissed`)===`1`?!0:Ze(e):!1}function Ye(){let e=J();e?.setItem(K,`1`),e?.removeItem(q)}function Xe(){let e=J();e?.removeItem(K),e?.removeItem(q)}function J(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Ze(e){let t=e.getItem(q);if(!t)return!1;let n=Number.parseInt(t,10);return e.removeItem(q),!Number.isFinite(n)||n<=Date.now()?!1:(e.setItem(K,`1`),!0)}function Qe(){return{initialized:!1,installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`,dismissedInstallPrompt:Je(),updateAvailable:!1,registrationFailed:!1}}var Y=f(()=>Qe()),X=`nextclaw-pwa-dev-sw-reset`,Z=new class{constructor(){this.started=!1,this.registration=null,this.reloadWhenControllerChanges=!1,this.start=async()=>{if(!(this.started||typeof window>`u`)&&(this.started=!0,!(!(`serviceWorker`in navigator)||!this.isEligibleInstallContext()))){if(this.isDevelopmentServer()){await this.cleanupDevelopmentRegistrations();return}try{let e=await navigator.serviceWorker.register(`/sw.js`);this.registration=e,this.bindRegistration(e),navigator.serviceWorker.addEventListener(`controllerchange`,this.handleControllerChange),await this.syncUpdateAvailability()}catch{Y.setState({registrationFailed:!0})}}},this.syncUpdateAvailability=async()=>{if(typeof window>`u`||!(`serviceWorker`in navigator)||typeof navigator.serviceWorker.getRegistration!=`function`){Y.setState({updateAvailable:!1});return}let e=this.registration??await navigator.serviceWorker.getRegistration(`/sw.js`)??null;Y.setState({updateAvailable:this.shouldSurfaceUpdate(e)})},this.applyUpdate=async()=>{let e=this.registration??await navigator.serviceWorker.getRegistration(`/sw.js`)??null;if(!e){window.location.reload();return}e.waiting||await e.update();let t=e.waiting;if(!t){window.location.reload();return}this.reloadWhenControllerChanges=!0,t.postMessage({type:`SKIP_WAIT`})},this.stop=()=>{!this.started||typeof window>`u`||!(`serviceWorker`in navigator)||(navigator.serviceWorker.removeEventListener(`controllerchange`,this.handleControllerChange),this.started=!1,this.registration=null,this.reloadWhenControllerChanges=!1)},this.bindRegistration=e=>{e.addEventListener(`updatefound`,()=>{let t=e.installing;t&&t.addEventListener(`statechange`,()=>{t.state===`installed`&&this.syncUpdateAvailability()})})},this.handleControllerChange=()=>{this.reloadWhenControllerChanges&&(this.reloadWhenControllerChanges=!1,window.location.reload())},this.isEligibleInstallContext=()=>window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>!1,this.shouldSurfaceUpdate=e=>!e?.waiting||!navigator.serviceWorker.controller?!1:Y.getState().installability===`installed`,this.cleanupDevelopmentRegistrations=async()=>{if(typeof navigator.serviceWorker.getRegistrations!=`function`)return;let e=(await navigator.serviceWorker.getRegistrations()).filter(e=>[e.active?.scriptURL,e.installing?.scriptURL,e.waiting?.scriptURL].filter(e=>!!e).some(e=>e.endsWith(`/sw.js`)));if(e.length===0){this.clearDevResetMarker();return}if(await Promise.all(e.map(async e=>await e.unregister())),await this.clearNextClawCaches(),navigator.serviceWorker.controller&&!this.hasDevResetMarker()){this.setDevResetMarker(),window.location.reload();return}this.clearDevResetMarker()},this.clearNextClawCaches=async()=>{if(typeof window>`u`||!(`caches`in window)||typeof caches.keys!=`function`)return;let e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith(`nextclaw-ui-`)).map(async e=>await caches.delete(e)))},this.hasDevResetMarker=()=>{try{return window.sessionStorage.getItem(X)===`1`}catch{return!1}},this.setDevResetMarker=()=>{try{window.sessionStorage.setItem(X,`1`)}catch{}},this.clearDevResetMarker=()=>{try{window.sessionStorage.removeItem(X)}catch{}}}},Q=new class{constructor(){this.started=!1,this.deferredPrompt=null,this.displayModeMediaQuery=null,this.start=()=>{this.started||typeof window>`u`||(this.started=!0,window.addEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.addEventListener(`appinstalled`,this.handleAppInstalled),typeof window.matchMedia==`function`&&(this.displayModeMediaQuery=window.matchMedia(`(display-mode: standalone)`),this.bindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged)),this.refreshState())},this.stop=()=>{!this.started||typeof window>`u`||(window.removeEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.removeEventListener(`appinstalled`,this.handleAppInstalled),this.displayModeMediaQuery&&=(this.unbindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged),null),this.deferredPrompt=null,this.started=!1)},this.resetForTests=()=>{this.stop(),Y.setState(Qe())},this.refreshState=()=>{let e=this.resolveInstallability();Y.setState(t=>({...t,initialized:!0,installability:e.installability,installMethod:e.installMethod,blockedReason:e.blockedReason,dismissedInstallPrompt:Je()})),Z.syncUpdateAvailability()},this.dismissInstallPrompt=()=>{Ye(),Y.setState({dismissedInstallPrompt:!0})},this.promptInstall=async()=>{let e=this.resolveInstallability();if(e.installability!==`available`)return`unavailable`;if(e.installMethod===`manual`||!this.deferredPrompt)return`manual`;this.deferredPrompt.prompt();let t=await this.deferredPrompt.userChoice;return this.deferredPrompt=null,t.outcome===`accepted`?(Xe(),this.refreshState(),c.success(i(`pwaInstallAccepted`)),`accepted`):(this.dismissInstallPrompt(),this.refreshState(),`dismissed`)},this.handleBeforeInstallPrompt=e=>{e.preventDefault(),this.deferredPrompt=e,this.refreshState()},this.handleAppInstalled=()=>{this.deferredPrompt=null,Xe(),Y.setState({dismissedInstallPrompt:!0}),c.success(i(`pwaInstalledToast`)),this.refreshState()},this.handleDisplayModeChanged=()=>{this.refreshState()},this.resolveInstallability=()=>this.isDevelopmentServer()?{installability:`unsupported`,installMethod:`none`,blockedReason:`dev-server`}:this.hasDesktopHost()?{installability:`suppressed`,installMethod:`none`,blockedReason:`desktop-host`}:this.isStandalone()?{installability:`installed`,installMethod:`none`,blockedReason:null}:this.hasInstallSurfaceSupport()?this.isEligibleInstallContext()?{installability:`available`,installMethod:this.deferredPrompt?`prompt`:`manual`,blockedReason:null}:{installability:`unsupported`,installMethod:`none`,blockedReason:`insecure-context`}:{installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`},this.hasDesktopHost=()=>typeof window<`u`&&!!window.nextclawDesktop,this.hasInstallSurfaceSupport=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&`serviceWorker`in navigator,this.isEligibleInstallContext=()=>typeof window>`u`?!1:window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>typeof window<`u`&&!1,this.isStandalone=()=>{if(typeof window>`u`)return!1;let e=window.navigator;return typeof window.matchMedia==`function`&&window.matchMedia(`(display-mode: standalone)`).matches||e.standalone===!0},this.bindDisplayModeListener=(e,t)=>{if(`addEventListener`in e){e.addEventListener(`change`,t);return}e.addListener?.(t)},this.unbindDisplayModeListener=(e,t)=>{if(`removeEventListener`in e){e.removeEventListener(`change`,t);return}e.removeListener?.(t)}}};function $e(){let e=Y(e=>e.installability);return(0,z.jsx)(`span`,{className:a(`inline-flex items-center rounded-full border px-3 py-1 text-xs font-medium`,e===`installed`?`bg-emerald-50 text-emerald-700 border-emerald-200`:e===`available`?`bg-amber-50 text-amber-700 border-amber-200`:`bg-gray-100 text-gray-600 border-gray-200`),children:et(e)})}function et(e){return i(e===`available`?`pwaInstallStatusAvailable`:e===`installed`?`pwaInstallStatusInstalled`:e===`suppressed`?`pwaInstallStatusDesktopHost`:`pwaInstallStatusUnavailable`)}function tt(e,t,n){return i(e===`installed`?`pwaInstallCardInstalled`:e===`suppressed`?`pwaInstallCardSuppressed`:e===`available`&&t===`prompt`?`pwaInstallCardPrompt`:e===`available`?`pwaInstallCardManual`:n===`insecure-context`?`pwaInstallCardInsecureContext`:n===`dev-server`?`pwaInstallCardDevServer`:`pwaInstallCardUnsupported`)}function nt(){let e=Y(e=>e.installability),t=Y(e=>e.installMethod),n=Y(e=>e.blockedReason);return(0,z.jsxs)(g,{children:[(0,z.jsxs)(o,{className:`flex flex-row items-start justify-between gap-4 space-y-0`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(u,{children:i(`pwaInstallTitle`)}),(0,z.jsx)(s,{children:i(`pwaInstallDescription`)})]}),(0,z.jsx)($e,{})]}),(0,z.jsxs)(d,{className:`space-y-4`,children:[(0,z.jsx)(`div`,{className:`rounded-2xl border border-gray-200 bg-gray-50/90 p-4`,children:(0,z.jsx)(`p`,{className:`text-sm leading-6 text-gray-700`,children:tt(e,t,n)})}),e===`available`&&t===`prompt`?(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsxs)(l,{type:`button`,className:`gap-2`,onClick:()=>{Q.promptInstall()},children:[(0,z.jsx)(S,{className:`h-4 w-4`}),i(`pwaInstallAction`)]}),(0,z.jsx)(`p`,{className:`text-sm text-gray-500`,children:i(`pwaInstallPromptHint`)})]}):null,e===`available`&&t===`manual`?(0,z.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-dashed border-gray-300 bg-white p-4`,children:[(0,z.jsx)(we,{className:`mt-0.5 h-4 w-4 text-gray-500`}),(0,z.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:i(`pwaInstallManualHint`)})]}):null]})]})}function rt(){let e=Y(e=>e.installability),t=Y(e=>e.installMethod),n=Y(e=>e.dismissedInstallPrompt);return e!==`available`||t!==`prompt`||n?null:(0,z.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:i(`pwaInstallBannerTitle`)}),(0,z.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:i(`pwaInstallBannerDescription`)})]}),(0,z.jsx)(`button`,{type:`button`,"aria-label":i(`pwaInstallDismiss`),className:`rounded-full p-1 text-gray-400 transition hover:bg-gray-100 hover:text-gray-600`,onClick:()=>{Q.dismissInstallPrompt()},children:(0,z.jsx)(he,{className:`h-4 w-4`})})]}),(0,z.jsxs)(`div`,{className:`mt-4 flex items-center gap-3`,children:[(0,z.jsxs)(l,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{Q.promptInstall()},children:[(0,z.jsx)(S,{className:`h-4 w-4`}),i(`pwaInstallAction`)]}),(0,z.jsx)(l,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{Q.dismissInstallPrompt()},children:i(`pwaInstallDismiss`)})]})]})}function it(){let e=Y(e=>e.updateAvailable),t=Y(e=>e.installability);return!e||t!==`installed`?null:(0,z.jsxs)(`div`,{className:`fixed top-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,z.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:i(`pwaUpdateBannerTitle`)}),(0,z.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:i(`pwaUpdateBannerDescription`)})]})}),(0,z.jsx)(`div`,{className:`mt-4`,children:(0,z.jsxs)(l,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{Z.applyUpdate()},children:[(0,z.jsx)(pe,{className:`h-4 w-4`}),i(`pwaUpdateAction`)]})})]})}var $=!1;function at(){$||typeof window>`u`||($=!0,Q.start(),Z.start())}var ot={warm:`#F9F8F5`,cool:`#F8FAFB`},st=new class{constructor(){this.syncTheme=e=>{if(typeof document>`u`)return;let t=ot[e];this.updateThemeMeta(t),this.updateSurfaceBackgrounds(t),document.documentElement.style.colorScheme=`light`},this.syncCurrentTheme=()=>{if(typeof document>`u`)return;let e=document.documentElement.getAttribute(`data-theme`)===`cool`?`cool`:`warm`;this.syncTheme(e)},this.updateThemeMeta=e=>{let t=document.querySelector(`meta[name="theme-color"]`);t instanceof HTMLMetaElement&&(t.content=e)},this.updateSurfaceBackgrounds=e=>{document.documentElement.style.backgroundColor=e,document.body.style.backgroundColor=e;let t=document.getElementById(`root`);t&&(t.style.backgroundColor=e)}}},ct=(0,B.createContext)(null);function lt({children:e}){let[t,n]=(0,B.useState)(()=>R());(0,B.useEffect)(()=>{st.syncTheme(t),window.nextclawDesktop?.setShellTheme?.(t)},[t]),(0,B.useEffect)(()=>ze(e=>{n(e)}),[]);let r=(0,B.useCallback)(e=>{Re(e),n(Le())},[]),i=(0,B.useMemo)(()=>({theme:t,setTheme:r}),[t,r]);return(0,z.jsx)(ct.Provider,{value:i,children:e})}function ut(){let e=(0,B.useContext)(ct);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}function dt(){let{language:e,setLanguage:n}=_e();return{currentLanguage:e,currentLanguageLabel:t.find(t=>t.value===e)?.label??e,languageOptions:t,selectLanguage:(0,B.useCallback)(t=>{e!==t&&(n(t),window.location.reload())},[e,n])}}function ft(){let{currentLanguage:e,currentLanguageLabel:t,languageOptions:n,selectLanguage:r}=dt();return(0,z.jsxs)(`section`,{className:`mx-auto w-full max-w-3xl space-y-4`,children:[(0,z.jsx)(`div`,{className:`rounded-3xl border border-gray-200/80 bg-white p-5 shadow-card`,children:(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(`div`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl bg-gray-100 text-gray-600`,children:(0,z.jsx)(E,{className:`h-4 w-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:i(`language`)}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:t})]})]})}),(0,z.jsx)(`div`,{className:`overflow-hidden rounded-3xl border border-gray-200/80 bg-white shadow-card`,children:n.map(t=>{let n=t.value===e;return(0,z.jsxs)(`button`,{type:`button`,onClick:()=>r(t.value),className:a(`flex w-full items-center justify-between gap-3 border-b border-gray-100 px-5 py-4 text-left text-sm transition-colors last:border-b-0`,n?`bg-gray-50 text-gray-900`:`text-gray-700 hover:bg-gray-50/70`),"aria-current":n?`true`:void 0,children:[(0,z.jsx)(`span`,{className:`font-medium`,children:t.label}),n?(0,z.jsx)(ae,{className:`h-4 w-4 text-gray-700`}):null]},t.value)})})]})}function pt({mode:e}){let t=ue(),n=ge(),r=le(),{currentLanguage:o,currentLanguageLabel:s,languageOptions:c,selectLanguage:l}=dt(),{theme:u,setTheme:d}=ut(),f=e===`settings`,p=i(N.find(e=>e.value===u)?.labelKey??`themeWarm`),m=r.data?.account.email?.trim(),h=!!r.data?.account.loggedIn,g=e=>{u!==e&&d(e)},ee=[{target:`/chat`,label:i(`chat`),icon:D},{target:`/chat/cron`,label:i(`cron`),icon:C},{target:`/chat/skills`,label:i(`marketplaceFilterSkills`),icon:T},{target:`/agents`,label:i(`agentsPageTitle`),icon:w}],_=je(i),y=f?_:ee,b=f?`compact`:`default`;return(0,z.jsxs)(`aside`,{className:`w-[240px] shrink-0 flex h-full min-h-0 flex-col overflow-hidden bg-secondary px-4 py-6`,children:[f?(0,z.jsx)(`div`,{className:`shrink-0 px-2 pb-3`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1`,"data-testid":`settings-sidebar-header`,children:[(0,z.jsxs)(v,{to:`/chat`,className:`group inline-flex min-w-0 items-center gap-1.5 rounded-lg px-1 py-1 text-[12px] font-medium text-gray-500 transition-colors hover:bg-gray-200/60 hover:text-gray-900`,children:[(0,z.jsx)(te,{className:`h-3.5 w-3.5 shrink-0 text-gray-400 group-hover:text-gray-700`}),(0,z.jsx)(`span`,{className:`truncate`,children:i(`backToMain`)})]}),(0,z.jsx)(`span`,{className:`h-4 w-px shrink-0 bg-[#dddfe6]`,"aria-hidden":`true`}),(0,z.jsx)(`h1`,{className:`truncate text-[15px] font-semibold tracking-[-0.01em] text-gray-800`,children:i(`settings`)})]})}):(0,z.jsx)(`div`,{className:`shrink-0 px-2 pb-8`,children:(0,z.jsx)(V,{className:`flex items-center gap-2.5 cursor-pointer`})}),(0,z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,z.jsx)(`nav`,{className:`custom-scrollbar min-h-0 flex-1 overflow-y-auto pr-1`,children:(0,z.jsx)(`ul`,{className:a(f?`space-y-0.5 pb-3`:`space-y-1 pb-4`),children:y.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsx)(U,{to:e.target,label:e.label,icon:e.icon,density:b})},e.target))})}),(0,z.jsxs)(`div`,{className:a(`shrink-0 border-t border-[#dde0ea] bg-secondary`,f?`mt-2 pt-3`:`mt-3 pt-3`),children:[f?(0,z.jsx)(W,{onClick:()=>t.accountManager.openAccountPanel(),icon:ce,label:i(`remoteAccountEntryManage`),density:`compact`,className:`mb-1.5`,trailing:h?m||i(`remoteAccountEntryConnected`):i(`remoteAccountEntryDisconnected`),trailingClassName:`max-w-[92px] truncate text-right`,testId:`settings-sidebar-account-entry`,trailingTestId:`settings-sidebar-account-status`}):null,e===`main`&&(0,z.jsx)(`div`,{className:`mb-2`,children:(0,z.jsx)(U,{to:`/settings`,label:i(`settings`),icon:fe})}),(0,z.jsx)(`div`,{className:`mb-2`,children:(0,z.jsx)(G,{value:u,onValueChange:e=>g(e),icon:O,label:i(`theme`),valueLabel:p,density:b,children:N.map(e=>(0,z.jsx)(x,{value:e.value,className:`text-xs`,children:i(e.labelKey)},e.value))})}),(0,z.jsx)(`div`,{className:`mb-2`,children:(0,z.jsx)(G,{value:o,onValueChange:e=>l(e),icon:E,label:i(`language`),valueLabel:s,density:b,children:c.map(e=>(0,z.jsx)(x,{value:e.value,className:`text-xs`,children:e.label},e.value))})}),(0,z.jsx)(W,{onClick:()=>n.open(void 0,{kind:`docs`,newTab:!0,title:`Docs`}),icon:re,label:i(`docBrowserHelp`),density:b})]})]})]})}function mt(){return(0,z.jsxs)(`header`,{className:`flex h-[var(--desktop-titlebar-height)] shrink-0 bg-background`,"data-testid":`desktop-window-chrome`,children:[(0,z.jsxs)(`div`,{className:`desktop-window-drag flex h-full w-[var(--desktop-sidebar-width)] shrink-0 items-center bg-secondary pl-4 pr-3 text-secondary-foreground`,"data-testid":`desktop-window-chrome-sidebar`,children:[(0,z.jsx)(`div`,{className:`desktop-window-no-drag flex min-w-0 shrink-0 items-center`,children:(0,z.jsx)(V,{className:`flex min-w-0 items-center gap-2.5`,density:`chrome`})}),(0,z.jsx)(`div`,{className:`min-w-0 flex-1 self-stretch`,"aria-hidden":`true`})]}),(0,z.jsx)(`div`,{className:`desktop-window-drag flex min-w-0 flex-1 items-center border-b border-[#ebe7dc]/80 bg-secondary pr-[var(--desktop-caption-safe-right)]`,"aria-hidden":`true`,"data-testid":`desktop-window-chrome-main`,children:(0,z.jsx)(`div`,{className:`min-w-0 flex-1 self-stretch`})})]})}function ht(){return typeof window>`u`?null:vt()??window.nextclawDesktop?.platform??null}function gt(){return ht()===`darwin`}function _t(){return ht()===`win32`}function vt(){return null}var yt=(0,B.lazy)(async()=>({default:(await _(async()=>{let{DocBrowser:e}=await import(`./doc-browser-p9DDNPWB.js`);return{DocBrowser:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))).DocBrowser}));function bt(e){return{"--desktop-titlebar-height":`40px`,"--desktop-caption-safe-right":`140px`,"--desktop-sidebar-width":e?`280px`:`240px`}}function xt({pathname:e,isDocBrowserOpen:t,docBrowserMode:n,children:r}){let i=Oe(e),o=_t();return(0,z.jsxs)(`div`,{className:a(`h-screen flex flex-col overflow-hidden bg-background font-sans text-foreground`,o?`rounded-[10px]`:null),style:o?bt(i):void 0,children:[o?(0,z.jsx)(mt,{}):null,(0,z.jsxs)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:[!i&&(0,z.jsx)(pt,{mode:`settings`}),(0,z.jsxs)(`div`,{className:`flex-1 flex min-w-0 overflow-hidden relative`,children:[(0,z.jsx)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:i?(0,z.jsx)(`div`,{className:`flex-1 h-full overflow-hidden`,children:r}):(0,z.jsx)(`main`,{className:`flex-1 overflow-auto p-8 pb-16 custom-scrollbar`,children:(0,z.jsx)(`div`,{className:`mx-auto h-full max-w-6xl animate-fade-in`,children:r})})}),t&&n===`docked`?(0,z.jsx)(B.Suspense,{fallback:null,children:(0,z.jsx)(yt,{})}):null]})]}),t&&n===`floating`?(0,z.jsx)(B.Suspense,{fallback:null,children:(0,z.jsx)(yt,{})}):null]})}export{O as C,w as D,T as E,C as O,k as S,E as T,Oe as _,lt as a,Ee as b,rt as c,U as d,V as f,ke as g,M as h,ft as i,nt as l,Ae as m,gt as n,ut as o,N as p,_t as r,at as s,xt as t,it as u,Me as v,D as w,A as x,Ne as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./doc-browser-rZIQIjuw.js";export{e as DocBrowser};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,m as t,p as n,r,u as i}from"./i18n-D1144VAA.js";import{t as a}from"./createLucideIcon-DzY6wN61.js";import{n as o,t as ee}from"./search-CRtQwr-h.js";import{t as s}from"./book-open-BcnAiKde.js";import{t as c}from"./external-link-CpEvG65F.js";import{t as l}from"./plus-B-YHtTNC.js";import{t as u}from"./x-BeyYA_h6.js";import{i as d,r as f,t as p}from"./doc-browser-context-FukQHvyo.js";var te=a(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),m=a(`GripVertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),h=a(`Maximize2`,[[`polyline`,{points:`15 3 21 3 21 9`,key:`mznyad`}],[`polyline`,{points:`9 21 3 21 3 15`,key:`1avn1i`}],[`line`,{x1:`21`,x2:`14`,y1:`3`,y2:`10`,key:`ota7mn`}],[`line`,{x1:`3`,x2:`10`,y1:`21`,y2:`14`,key:`1atl0r`}]]),g=a(`PanelRightOpen`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),_=e(t(),1),v=n();function y(e,t){return i(`flex flex-col bg-white overflow-hidden relative`,e?`fixed inset-0 z-[9999] h-[100dvh] w-screen rounded-none border-0 shadow-2xl`:t?`h-full border-l border-gray-200 shrink-0`:`rounded-2xl shadow-2xl border border-gray-200`)}function b(e){let{isFullscreen:t,isDocked:n,dockedWidth:r,floatPos:i,floatSize:a}=e;if(!t)return n?{width:r}:{position:`fixed`,left:i.x,top:i.y,width:a.w,height:a.h,zIndex:9999}}function x({displayMode:e=`desktop`}){let{isOpen:t,mode:n,tabs:a,activeTabId:x,currentTab:S,currentUrl:C,navVersion:w,close:T,toggleMode:E,goBack:D,goForward:ne,canGoBack:re,canGoForward:ie,navigate:O,syncUrl:k,setActiveTab:ae,closeTab:oe,openNewTab:A}=d(),[j,M]=(0,_.useState)(``),[N,P]=(0,_.useState)(!1),[F,I]=(0,_.useState)(!1),[L,R]=(0,_.useState)(()=>({x:Math.max(40,window.innerWidth-520),y:80})),[z,B]=(0,_.useState)({w:480,h:600}),[V,H]=(0,_.useState)(420),U=(0,_.useRef)(null),W=(0,_.useRef)(null),G=(0,_.useRef)(null),K=(0,_.useRef)(null),q=(0,_.useRef)(w),J=S?.kind===`docs`;(0,_.useEffect)(()=>{if(!J){M(``);return}try{M(new URL(C).pathname)}catch{M(C)}},[C,x,J]),(0,_.useEffect)(()=>{if(J){if(w!==q.current){q.current=w;return}if(K.current?.contentWindow)try{let e=new URL(C).pathname;K.current.contentWindow.postMessage({type:`docs-navigate`,path:e},`*`)}catch{}}},[C,w,J]),(0,_.useEffect)(()=>{n===`floating`&&R(e=>({x:Math.max(40,window.innerWidth-z.w-40),y:e.y}))},[n,z.w]),(0,_.useEffect)(()=>{let e=e=>{J&&e.data?.type===`docs-route-change`&&typeof e.data.url==`string`&&k(e.data.url)};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[k,J]);let se=(0,_.useCallback)(e=>{if(e.preventDefault(),!J)return;let t=j.trim();t&&(t.startsWith(`/`)?O(`${p}${t}`):t.startsWith(`http`)?O(t):O(`${p}/${t}`))},[j,O,J]),ce=(0,_.useCallback)(e=>{n===`floating`&&(P(!0),U.current={startX:e.clientX,startY:e.clientY,startPosX:L.x,startPosY:L.y})},[n,L]);(0,_.useEffect)(()=>{if(!N)return;let e=e=>{U.current&&R({x:U.current.startPosX+(e.clientX-U.current.startX),y:U.current.startPosY+(e.clientY-U.current.startY)})},t=()=>{P(!1),U.current=null};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[N]);let Y=(0,_.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),I(!0);let{axis:t}=e.currentTarget.dataset;W.current={startX:e.clientX,startY:e.clientY,startW:z.w,startH:z.h};let n=e=>{W.current&&B(n=>({w:t===`y`?n.w:Math.max(360,W.current.startW+(e.clientX-W.current.startX)),h:t===`x`?n.h:Math.max(400,W.current.startH+(e.clientY-W.current.startY))}))},r=()=>{I(!1),W.current=null,window.removeEventListener(`mousemove`,n),window.removeEventListener(`mouseup`,r)};window.addEventListener(`mousemove`,n),window.addEventListener(`mouseup`,r)},[z]),le=(0,_.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),I(!0),G.current={startX:e.clientX,startW:V};let t=e=>{if(!G.current)return;let t=G.current.startX-e.clientX;H(Math.max(320,Math.min(860,G.current.startW+t)))},n=()=>{I(!1),G.current=null,window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,n)};window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,n)},[V]),X=(0,_.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),I(!0);let t=e.clientX,n=z.w,r=L.x,i=e=>{let i=t-e.clientX,a=Math.max(360,n+i);B(e=>({...e,w:a})),R(e=>({...e,x:r-(a-n)}))},a=()=>{I(!1),window.removeEventListener(`mousemove`,i),window.removeEventListener(`mouseup`,a)};window.addEventListener(`mousemove`,i),window.addEventListener(`mouseup`,a)},[z.w,L.x]);if(!t)return null;let Z=n===`docked`,Q=e===`fullscreen`,$=!Z&&!Q;return(0,v.jsxs)(`div`,{"data-testid":`doc-browser-panel`,className:y(Q,Z),style:b({isFullscreen:Q,isDocked:Z,dockedWidth:V,floatPos:L,floatSize:z}),children:[Z&&!Q&&(0,v.jsx)(`div`,{className:`absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors`,onMouseDown:le}),(0,v.jsxs)(`div`,{className:i(`flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-200 shrink-0 select-none`,$&&`cursor-grab active:cursor-grabbing`,Q&&`pt-[calc(env(safe-area-inset-top,0px)+0.625rem)]`),onMouseDown:$?ce:void 0,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2.5 min-w-0`,children:[(0,v.jsx)(s,{className:`w-4 h-4 text-primary shrink-0`}),(0,v.jsx)(`span`,{className:`text-sm font-semibold text-gray-900 truncate`,children:r(`docBrowserTitle`)})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1`,children:[Q?null:(0,v.jsx)(`button`,{onClick:E,className:`hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors`,title:r(Z?`docBrowserFloatMode`:`docBrowserDockMode`),children:Z?(0,v.jsx)(h,{className:`w-3.5 h-3.5`}):(0,v.jsx)(g,{className:`w-3.5 h-3.5`})}),(0,v.jsx)(`button`,{onClick:T,className:`hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors`,title:r(`docBrowserClose`),children:(0,v.jsx)(u,{className:`w-3.5 h-3.5`})})]})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-2 bg-background border-b border-[#f1e7d4] overflow-x-auto custom-scrollbar`,children:[a.map(e=>(0,v.jsxs)(`div`,{className:i(`inline-flex items-center gap-1 h-7 px-1.5 rounded-lg text-xs border max-w-[220px] shrink-0 transition-colors`,e.id===x?`bg-amber-50/80 border-amber-200 text-amber-900 shadow-[0_1px_2px_rgba(30,20,10,0.04)]`:`bg-[#f9f8f5] border-[#eee3d1] text-[#78644d] hover:bg-[#fff7ea] hover:text-[#2f2212]`),children:[(0,v.jsx)(`button`,{type:`button`,onClick:()=>ae(e.id),className:`truncate text-left px-1`,title:e.title,children:e.title||r(`docBrowserTabUntitled`)}),(0,v.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),oe(e.id)},className:`rounded p-0.5 hover:bg-black/10`,"aria-label":r(`docBrowserCloseTab`),children:(0,v.jsx)(u,{className:`w-3 h-3`})})]},e.id)),(0,v.jsx)(`button`,{onClick:()=>A(void 0,{kind:`docs`,title:`Docs`}),className:`inline-flex items-center justify-center w-7 h-7 rounded-lg border border-[#eee3d1] bg-white text-[#78644d] hover:bg-[#fff7ea] hover:text-[#2f2212] shrink-0`,title:r(`docBrowserNewTab`),children:(0,v.jsx)(l,{className:`w-3.5 h-3.5`})})]}),J&&(0,v.jsxs)(`div`,{className:`flex items-center gap-2 px-3.5 py-2 bg-white border-b border-gray-100 shrink-0`,children:[(0,v.jsx)(`button`,{onClick:D,disabled:!re,className:`p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors`,children:(0,v.jsx)(o,{className:`w-4 h-4`})}),(0,v.jsx)(`button`,{onClick:ne,disabled:!ie,className:`p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors`,children:(0,v.jsx)(te,{className:`w-4 h-4`})}),(0,v.jsxs)(`form`,{onSubmit:se,className:`flex-1 relative`,children:[(0,v.jsx)(ee,{className:`w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400`}),(0,v.jsx)(`input`,{type:`text`,value:j,onChange:e=>M(e.target.value),placeholder:r(`docBrowserSearchPlaceholder`),className:`w-full h-8 pl-8 pr-3 rounded-lg bg-gray-50 border border-gray-200 text-xs text-gray-700 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors placeholder:text-gray-400`})]})]}),(0,v.jsxs)(`div`,{className:`flex-1 relative overflow-hidden`,children:[(0,v.jsx)(`iframe`,{ref:K,src:C,className:`absolute inset-0 w-full h-full border-0`,title:S?.title||`NextClaw Docs`,sandbox:`allow-same-origin allow-scripts allow-popups allow-forms`,allow:`clipboard-read; clipboard-write`},`${x}:${w}`),(F||N)&&(0,v.jsx)(`div`,{className:`absolute inset-0 z-10`})]}),J&&f(C)&&(0,v.jsx)(`div`,{className:`flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-200 shrink-0`,children:(0,v.jsxs)(`a`,{href:C,target:`_blank`,rel:`noopener noreferrer`,"data-doc-external":!0,className:`flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover font-medium transition-colors`,children:[r(`docBrowserOpenExternal`),(0,v.jsx)(c,{className:`w-3 h-3`})]})}),!Z&&!Q&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`div`,{className:`absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors`,onMouseDown:X}),(0,v.jsx)(`div`,{className:`absolute top-0 right-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors`,onMouseDown:Y,"data-axis":`x`}),(0,v.jsx)(`div`,{className:`absolute bottom-0 left-0 h-1.5 w-full cursor-ns-resize z-20 hover:bg-primary/10 transition-colors`,onMouseDown:Y,"data-axis":`y`}),(0,v.jsx)(`div`,{className:`absolute bottom-0 right-0 w-4 h-4 cursor-se-resize z-30 flex items-center justify-center text-gray-300 hover:text-gray-500 transition-colors`,onMouseDown:Y,children:(0,v.jsx)(m,{className:`w-3 h-3 rotate-[-45deg]`})})]})]})}export{x as t};
|