@inkeep/open-knowledge 0.79.3-beta.0 → 0.79.3-beta.1
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/dist/cli.mjs +6 -6
- package/dist/constants-CMlttrfV.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-H4L4PCDm.mjs → init-CU5RL6f6.mjs} +2 -2
- package/dist/init-Cifsemq8.mjs +1 -0
- package/dist/{launch-json-removal-DAf1fKWA.mjs → launch-json-removal-MAOA6UoT.mjs} +1 -1
- package/dist/{loader-gbJWrT9X.mjs → loader-_iulGod2.mjs} +1 -1
- package/dist/loader-y0nJuvh8.mjs +1 -0
- package/dist/{preview-CMgnC4UA.mjs → preview-BFGjEB-3.mjs} +1 -1
- package/dist/preview-x0kqNHT0.mjs +1 -0
- package/dist/public/assets/FeedbackForm-BWVDETqI.js +1 -0
- package/dist/public/assets/{ImageAttachments-CIgN2ICo.js → ImageAttachments-CbvAD6gO.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-C-53A-0F.js → ReportBugDialogBody-Dgdx0abm.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-29birQ-y.js → ReportBugMenuTrigger-L6UKLhv7.js} +1 -1
- package/dist/public/assets/{SessionsHost-CKvXoA48.js → SessionsHost-DLUt2F6p.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-BXIexfq8.js → TerminalWindowApp-BMEXM7e6.js} +1 -1
- package/dist/public/assets/{ThreadView-D1YayNv3.js → ThreadView-DcCcrnS8.js} +17 -17
- package/dist/public/assets/image-attachment-IlVZ-iwe.js +1 -0
- package/dist/public/assets/index-0UAk3qu0.js +2205 -0
- package/dist/public/assets/{progress-C8ijsHox.js → progress-CTr23hqQ.js} +1 -1
- package/dist/public/assets/{use-installed-clis-F-bc0S3Y.js → use-installed-clis-D8GK8YwQ.js} +2 -2
- package/dist/public/index.html +6 -6
- package/dist/{registry-probes-DCe3rWZ7.mjs → registry-probes-DIjo4lc4.mjs} +1 -1
- package/dist/{removal-file-path-DiyOqKix.mjs → removal-file-path-DpLraZks.mjs} +1 -1
- package/dist/{repair-launch-json-CK7gSieg.mjs → repair-launch-json-D8diDIHc.mjs} +1 -1
- package/dist/{repair-mcp-configs-B2IwckuL.mjs → repair-mcp-configs-pQlO34hz.mjs} +1 -1
- package/dist/{src-7sNhM-_B.mjs → src-jzrJerbj.mjs} +1 -1
- package/dist/src-w38zUUim.mjs +1 -0
- package/dist/start-BsY2TxeT.mjs +1 -0
- package/dist/{start-DYrDwaUD.mjs → start-D93NCq63.mjs} +2 -2
- package/package.json +5 -5
- package/dist/constants-wVFbQ-W8.mjs +0 -1
- package/dist/init-CqGfdMuB.mjs +0 -1
- package/dist/loader-BK3wGq2e.mjs +0 -1
- package/dist/preview-DPQ4BPLK.mjs +0 -1
- package/dist/public/assets/FeedbackForm-t3IG2SJR.js +0 -1
- package/dist/public/assets/image-attachment-C1B_QOlM.js +0 -1
- package/dist/public/assets/index-CWenCiFy.js +0 -2205
- package/dist/src-DZ44CKon.mjs +0 -1
- package/dist/start-DaOK3zKh.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Po as e,jo as t,zo as n}from"./dist-Bt-cb2ik.mjs";import{A as r,M as i,O as a}from"./init-
|
|
1
|
+
import{Po as e,jo as t,zo as n}from"./dist-Bt-cb2ik.mjs";import{A as r,M as i,O as a}from"./init-CU5RL6f6.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-DpLraZks.mjs";import{join as c}from"node:path";import{readFileSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(o){let f=s(c(o,`.claude`,`launch.json`));if(f.kind!==`ready`)return f;let m=f.path,h;try{h=l(m,`utf-8`)}catch(e){return{kind:`declined`,reason:i(e)}}let g=[],_=e(h,g,u)??void 0;if(g.some(e=>!d(e,h))||_?.type!==`object`)return{kind:`declined`,reason:`unparseable`};let v=t(_).configurations;if(!Array.isArray(v))return{kind:`not-present`};let y=v.findIndex(p);if(y===-1)return{kind:`not-present`};let{text:b,changed:x}=r(h,[`configurations`,y]);return x?(n(m,b,{mode:a(m)}),{kind:`removed`}):{kind:`not-present`}}function p(e){if(!o(e))return!1;let t=e;if(t.name!==`open-knowledge-ui`||!Array.isArray(t.runtimeArgs))return!1;let n=t.runtimeArgs;return t.runtimeExecutable===`/bin/sh`?n.length===3&&n[0]===`-l`&&n[1]===`-c`&&typeof n[2]==`string`&&/^# ok-ui-v[1-9]\d*$/.test(n[2].split(/\r?\n/,1)[0]??``):t.runtimeExecutable===`npx`?m.some(e=>h(n,e)):t.runtimeExecutable===`powershell`&&n.length===4&&n[0]===`-NoProfile`&&n[1]===`-NonInteractive`&&n[2]===`-Command`&&typeof n[3]==`string`&&/^# ok-ui-win-v[1-9]\d*$/.test(n[3].split(/\r?\n/,1)[0]??``)}const m=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge@latest`,`ui`]];function h(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}export{f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ml as e,Uu as t,ao as n,bl as r,fl as i,ls as a,ul as o}from"./md-manager-BGnqyqi1-BWyJhS5F.mjs";import{Uo as s,Vo as c,x as l}from"./dist-Bt-cb2ik.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-
|
|
1
|
+
import{Ml as e,Uu as t,ao as n,bl as r,fl as i,ls as a,ul as o}from"./md-manager-BGnqyqi1-BWyJhS5F.mjs";import{Uo as s,Vo as c,x as l}from"./dist-Bt-cb2ik.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-CMlttrfV.mjs";import{resolve as f}from"node:path";import{existsSync as p,readFileSync as m}from"node:fs";import{realpath as h}from"node:fs/promises";var g=t();async function _(e){let t=f(e);try{return await h(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function v(e){if(!p(e))return{value:null,path:e,source:null,doc:null};let t;try{t=m(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,g.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function y(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=r({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...i,source:e}}return i})}function b(t){let r=t??process.cwd(),u=[],p=[],m=[],h=[],g=s(`user`,r),_=c({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(t,r=!1)=>{let i=v(t);if(i.diagnostic!==void 0&&p.push(i.diagnostic),i.value===null)return{};let a=o({value:i.value,file:i.path,source:i.source,doc:i.doc});p.push(...a),u.push(t);let s=a.length>0?e(i.value):i.value;return r&&h.push(...n({value:s,file:i.path,source:i.source,doc:i.doc})),s},x=f(r,`.ok`,d),S=b(x,!0),C=b(s(`project-local`,r)),w=a(_.value,S,C),T=l.safeParse(w);if(!T.success){let e=v(x),t={code:`SCHEMA_INVALID`,issues:y(T.error.issues,e)};throw Error(i(t))}return{config:T.data,sources:u,diagnostics:p,sidelined:m,ignoredCommittedKeys:h}}function x(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=_(e.startupCwd);return async o=>{let s=await _(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-_iulGod2.mjs";export{e as loadConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{xn as e}from"./dist-Bt-cb2ik.mjs";import"./constants-
|
|
1
|
+
import{xn as e}from"./dist-Bt-cb2ik.mjs";import"./constants-CMlttrfV.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);a.push(``);let c=t(i,`.ok`,`config.yml`);return r(c)?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-BFGjEB-3.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./index-0UAk3qu0.js";export{e as FeedbackForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{r as s,t as c}from"./button-BeFNZANd.js";import{i as l,n as u,r as d,t as f}from"./tooltip-DVBVVaAs.js";import{lt as p,o as m,s as h}from"./dist-bQ5kvrpa.js";import{t as g}from"./paperclip-BbzLnmPD.js";import{t as _}from"./x-BcfoD9-8.js";import{t as v}from"./input-B87iFAAQ.js";import{h as y}from"./file-tree-adapter-BqzkXC53.js";import{i as b}from"./image-attachment-C1B_QOlM.js";import{t as x}from"./textarea-DVoGSfK8.js";var S=e(n(),1),C=a(),w=3,T=p,E=m,D=h;function O(e){return E.includes(e)}function k(e){return e.reduce((e,t)=>e+t.size,0)}function A(e){return e.length>w?`count`:e.every(e=>O(e.type))?k(e)>T?`total`:null:`type`}function j(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var M=t(),N=s(`group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed`,{variants:{size:{default:`gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2`,sm:`gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5`,xs:`gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1`},orientation:{horizontal:`min-w-40 items-center`,vertical:`w-24 flex-col has-data-[slot=attachment-content]:w-30`}}});function P(e){let t=(0,C.c)(16),n,r,i,a,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5]):({className:n,state:i,size:a,orientation:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s);let c=i===void 0?`done`:i,l=a===void 0?`default`:a,u=s===void 0?`horizontal`:s,d;t[6]!==n||t[7]!==u||t[8]!==l?(d=o(N({size:l,orientation:u}),n),t[6]=n,t[7]=u,t[8]=l,t[9]=d):d=t[9];let f;return t[10]!==u||t[11]!==r||t[12]!==l||t[13]!==c||t[14]!==d?(f=(0,M.jsx)(`div`,{"data-slot":`attachment`,"data-state":c,"data-size":l,"data-orientation":u,className:d,...r}),t[10]=u,t[11]=r,t[12]=l,t[13]=c,t[14]=d,t[15]=f):f=t[15],f}var F=s(`relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{icon:``,image:`opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover`}},defaultVariants:{variant:`icon`}});function I(e){let t=(0,C.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`icon`:i,s;t[4]!==n||t[5]!==a?(s=o(F({variant:a}),n),t[4]=n,t[5]=a,t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==s||t[9]!==a?(c=(0,M.jsx)(`div`,{"data-slot":`attachment-media`,"data-variant":a,className:s,...r}),t[7]=r,t[8]=s,t[9]=a,t[10]=c):c=t[10],c}function L(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`div`,{"data-slot":`attachment-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`span`,{"data-slot":`attachment-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80`,`max-w-full`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`span`,{"data-slot":`attachment-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function B(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`div`,{"data-slot":`attachment-actions`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function V(e){let t=(0,C.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:a,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`icon-xs`:i,l=a??`ghost`,u;t[5]===n?u=t[6]:(u=o(n),t[5]=n,t[6]=u);let d;return t[7]!==r||t[8]!==s||t[9]!==l||t[10]!==u?(d=(0,M.jsx)(c,{"data-slot":`attachment-action`,variant:l,size:s,className:u,...r}),t[7]=r,t[8]=s,t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function H(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`div`,{"data-slot":`attachment-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var U=w,W=e=>{let t=(0,C.c)(5),{file:n}=e,[r,i]=(0,S.useState)(null),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>{let e=URL.createObjectURL(n);return i(e),()=>URL.revokeObjectURL(e)},o=[n],t[0]=n,t[1]=a,t[2]=o),(0,S.useEffect)(a,o);let s;return t[3]===r?s=t[4]:(s=r?(0,M.jsx)(`img`,{src:r,alt:``,className:`size-full object-cover`}):null,t[3]=r,t[4]=s),s},G=e=>{let t=(0,C.c)(22),{files:n,onPick:i,disabled:a,className:s}=e,p=a===void 0?!1:a,m=(0,S.useRef)(null),h=n.length>=U,_=p||h,y=_&&`cursor-not-allowed`,b;t[0]!==s||t[1]!==y?(b=o(`inline-flex`,y,s),t[0]=s,t[1]=y,t[2]=b):b=t[2];let x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>m.current?.click(),t[3]=x):x=t[3];let w;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,M.jsx)(g,{className:`size-4`}),t[4]=w):w=t[4];let T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,M.jsx)(`span`,{className:`sr-only`,children:(0,M.jsx)(r,{id:`3LbBJn`})}),t[5]=T):T=t[5];let D;t[6]===_?D=t[7]:(D=(0,M.jsxs)(c,{type:`button`,variant:`ghost`,size:`icon`,disabled:_,onClick:x,className:`size-7 text-muted-foreground`,children:[w,T]}),t[6]=_,t[7]=D);let O;t[8]!==b||t[9]!==D?(O=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsx)(`span`,{className:b,children:D})}),t[8]=b,t[9]=D,t[10]=O):O=t[10];let k;t[11]===h?k=t[12]:(k=(0,M.jsx)(u,{children:h?(0,M.jsx)(r,{id:`ASqqsQ`,values:{MAX_ATTACHMENTS:U}}):(0,M.jsx)(r,{id:`3LbBJn`})}),t[11]=h,t[12]=k);let A;t[13]!==O||t[14]!==k?(A=(0,M.jsx)(d,{children:(0,M.jsxs)(f,{children:[O,k]})}),t[13]=O,t[14]=k,t[15]=A):A=t[15];let j;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(j=E.join(`,`),t[16]=j):j=t[16];let N;t[17]===i?N=t[18]:(N=(0,M.jsx)(v,{ref:m,type:`file`,accept:j,multiple:!0,className:`hidden`,onChange:e=>{i(e.target.files),e.target.value=``}}),t[17]=i,t[18]=N);let P;return t[19]!==A||t[20]!==N?(P=(0,M.jsxs)(M.Fragment,{children:[A,N]}),t[19]=A,t[20]=N,t[21]=P):P=t[21],P},K=e=>{let t=(0,C.c)(9),{files:n,onChange:r,error:a}=e,o=a===void 0?null:a,{_:s}=i();if(n.length===0&&o===null)return null;let c;t[0]!==s||t[1]!==n||t[2]!==r?(c=n.length>0&&(0,M.jsx)(H,{children:n.map((e,t)=>(0,M.jsxs)(P,{size:`xs`,children:[(0,M.jsx)(I,{variant:`image`,children:(0,M.jsx)(W,{file:e})}),(0,M.jsxs)(L,{children:[(0,M.jsx)(R,{children:e.name}),(0,M.jsx)(z,{children:j(e.size)})]}),(0,M.jsx)(B,{children:(0,M.jsx)(V,{type:`button`,"aria-label":s({id:`w61W3L`,values:{0:e.name}}),onClick:()=>r(n.filter((e,n)=>n!==t)),children:(0,M.jsx)(_,{className:`size-3.5`})})})]},`${e.name}:${e.size}`))}),t[0]=s,t[1]=n,t[2]=r,t[3]=c):c=t[3];let l;t[4]===o?l=t[5]:(l=o!==null&&(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:o}),t[4]=o,t[5]=l);let u;return t[6]!==c||t[7]!==l?(u=(0,M.jsxs)(M.Fragment,{children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8],u};function q(){let{_:e}=i();return t=>t===null?null:e(t===`count`?{id:`E9gh86`,values:{MAX_ATTACHMENTS:U}}:t===`type`?{id:`s7us1p`}:{id:`ItxGi3`})}function J(e){let t=(0,C.c)(4),{count:n}=e,i;t[0]===n?i=t[1]:(i=n>0&&(0,M.jsx)(r,{id:`L2Bye8`,values:{count:n}}),t[0]=n,t[1]=i);let a;return t[2]===i?a=t[3]:(a=(0,M.jsx)(`span`,{role:`status`,className:`sr-only`,children:i}),t[2]=i,t[3]=a),a}function Y(e){let t=(0,C.c)(12),{files:n,onChange:r,disabled:i}=e,[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),l;t[0]!==i||t[1]!==n||t[2]!==r?(l=function(e){if(i||e===null||e.length===0)return;let t=new Map(n.map(X));for(let n of Array.from(e))t.set(`${n.name}:${n.size}`,n);let a=[...t.values()],o=A(a);c(o===null?null:{files:n,problem:o}),o===null&&r(a)},t[0]=i,t[1]=n,t[2]=r,t[3]=l):l=t[3];let u=l,d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>c(null),t[4]=d):d=t[4];let f=s?.files===n?s.problem:null,p=a&&!i,m;return t[5]!==u||t[6]!==i||t[7]!==n||t[8]!==r||t[9]!==f||t[10]!==p?(m={files:n,setFiles:r,disabled:i,add:u,clearProblem:d,problem:f,dragging:p,onPaste(e){if(i||!(e.target instanceof Node)||!e.currentTarget.contains(e.target))return;let t=b(e.clipboardData);t.length!==0&&(e.preventDefault(),u(t))},onDragOver(e){y(e)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=i?`none`:`copy`,i||o(!0))},onDragLeave(e){(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&o(!1)},onDrop(e){o(!1),y(e)&&(e.preventDefault(),e.stopPropagation(),u(e.dataTransfer.files))}},t[5]=u,t[6]=i,t[7]=n,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function X(e){return[`${e.name}:${e.size}`,e]}function Z(e){let t=(0,C.c)(49),n,i,a,s,c,l;t[0]===e?(n=t[1],i=t[2],a=t[3],s=t[4],c=t[5],l=t[6]):({intake:s,error:c,hint:a,className:n,"aria-describedby":i,...l}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=s,t[5]=c,t[6]=l);let u=c===void 0?null:c,d=(0,S.useId)(),f=q(),p=s.onDragOver,m=s.onDragLeave,h=s.onDrop,g=s.disabled,_;t[7]!==i||t[8]!==d?(_=[i,d].filter(Boolean),t[7]=i,t[8]=d,t[9]=_):_=t[9];let v=_.join(` `),y=s.dragging&&`border-primary bg-primary/5`,b;t[10]!==n||t[11]!==y?(b=o(`resize-none pb-9`,n,y),t[10]=n,t[11]=y,t[12]=b):b=t[12];let w;t[13]!==s.disabled||t[14]!==v||t[15]!==b||t[16]!==l?(w=(0,M.jsx)(x,{...l,disabled:g,"aria-describedby":v,className:b}),t[13]=s.disabled,t[14]=v,t[15]=b,t[16]=l,t[17]=w):w=t[17];let T;t[18]!==s.add||t[19]!==s.disabled||t[20]!==s.files?(T=(0,M.jsx)(G,{files:s.files,onPick:s.add,disabled:s.disabled,className:`absolute bottom-1.5 start-1.5`}),t[18]=s.add,t[19]=s.disabled,t[20]=s.files,t[21]=T):T=t[21];let E;t[22]===s.files.length?E=t[23]:(E=(0,M.jsx)(J,{count:s.files.length}),t[22]=s.files.length,t[23]=E);let D;t[24]!==s.onDragLeave||t[25]!==s.onDragOver||t[26]!==s.onDrop||t[27]!==w||t[28]!==T||t[29]!==E?(D=(0,M.jsxs)(`div`,{className:`relative`,onDragOver:p,onDragLeave:m,onDrop:h,children:[w,T,E]}),t[24]=s.onDragLeave,t[25]=s.onDragOver,t[26]=s.onDrop,t[27]=w,t[28]=T,t[29]=E,t[30]=D):D=t[30];let O;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,M.jsx)(r,{id:`eqSy2M`,values:{MAX_ATTACHMENTS:U}}),t[31]=O):O=t[31];let k;t[32]===a?k=t[33]:(k=a!==void 0&&(0,M.jsxs)(M.Fragment,{children:[` `,a]}),t[32]=a,t[33]=k);let A;t[34]!==d||t[35]!==k?(A=(0,M.jsxs)(`p`,{id:d,className:`text-xs text-muted-foreground`,children:[O,k]}),t[34]=d,t[35]=k,t[36]=A):A=t[36];let j;t[37]!==u||t[38]!==s.problem||t[39]!==f?(j=u??(s.problem===null?null:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(r,{id:`w7IPNE`}),` `,(0,M.jsx)(`span`,{children:f(s.problem)})]})),t[37]=u,t[38]=s.problem,t[39]=f,t[40]=j):j=t[40];let N;t[41]!==s.files||t[42]!==s.setFiles||t[43]!==j?(N=(0,M.jsx)(K,{files:s.files,onChange:s.setFiles,error:j}),t[41]=s.files,t[42]=s.setFiles,t[43]=j,t[44]=N):N=t[44];let P;return t[45]!==D||t[46]!==A||t[47]!==N?(P=(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[D,A,N]}),t[45]=D,t[46]=A,t[47]=N,t[48]=P):P=t[48],P}export{w as a,D as i,Y as n,T as o,E as r,O as s,Z as t};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{r as s,t as c}from"./button-BeFNZANd.js";import{i as l,n as u,r as d,t as f}from"./tooltip-DVBVVaAs.js";import{lt as p,o as m,s as h}from"./dist-bQ5kvrpa.js";import{t as g}from"./paperclip-BbzLnmPD.js";import{t as _}from"./x-BcfoD9-8.js";import{t as v}from"./input-B87iFAAQ.js";import{h as y}from"./file-tree-adapter-BqzkXC53.js";import{i as b}from"./image-attachment-IlVZ-iwe.js";import{t as x}from"./textarea-DVoGSfK8.js";var S=e(n(),1),C=a(),w=3,T=p,E=m,D=h;function O(e){return E.includes(e)}function k(e){return e.reduce((e,t)=>e+t.size,0)}function A(e){return e.length>w?`count`:e.every(e=>O(e.type))?k(e)>T?`total`:null:`type`}function j(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var M=t(),N=s(`group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed`,{variants:{size:{default:`gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2`,sm:`gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5`,xs:`gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1`},orientation:{horizontal:`min-w-40 items-center`,vertical:`w-24 flex-col has-data-[slot=attachment-content]:w-30`}}});function P(e){let t=(0,C.c)(16),n,r,i,a,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],s=t[5]):({className:n,state:i,size:a,orientation:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=s);let c=i===void 0?`done`:i,l=a===void 0?`default`:a,u=s===void 0?`horizontal`:s,d;t[6]!==n||t[7]!==u||t[8]!==l?(d=o(N({size:l,orientation:u}),n),t[6]=n,t[7]=u,t[8]=l,t[9]=d):d=t[9];let f;return t[10]!==u||t[11]!==r||t[12]!==l||t[13]!==c||t[14]!==d?(f=(0,M.jsx)(`div`,{"data-slot":`attachment`,"data-state":c,"data-size":l,"data-orientation":u,className:d,...r}),t[10]=u,t[11]=r,t[12]=l,t[13]=c,t[14]=d,t[15]=f):f=t[15],f}var F=s(`relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{icon:``,image:`opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover`}},defaultVariants:{variant:`icon`}});function I(e){let t=(0,C.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`icon`:i,s;t[4]!==n||t[5]!==a?(s=o(F({variant:a}),n),t[4]=n,t[5]=a,t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==s||t[9]!==a?(c=(0,M.jsx)(`div`,{"data-slot":`attachment-media`,"data-variant":a,className:s,...r}),t[7]=r,t[8]=s,t[9]=a,t[10]=c):c=t[10],c}function L(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`div`,{"data-slot":`attachment-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`span`,{"data-slot":`attachment-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80`,`max-w-full`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`span`,{"data-slot":`attachment-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function B(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`div`,{"data-slot":`attachment-actions`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function V(e){let t=(0,C.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:a,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`icon-xs`:i,l=a??`ghost`,u;t[5]===n?u=t[6]:(u=o(n),t[5]=n,t[6]=u);let d;return t[7]!==r||t[8]!==s||t[9]!==l||t[10]!==u?(d=(0,M.jsx)(c,{"data-slot":`attachment-action`,variant:l,size:s,className:u,...r}),t[7]=r,t[8]=s,t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function H(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,M.jsx)(`div`,{"data-slot":`attachment-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var U=w,W=e=>{let t=(0,C.c)(5),{file:n}=e,[r,i]=(0,S.useState)(null),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>{let e=URL.createObjectURL(n);return i(e),()=>URL.revokeObjectURL(e)},o=[n],t[0]=n,t[1]=a,t[2]=o),(0,S.useEffect)(a,o);let s;return t[3]===r?s=t[4]:(s=r?(0,M.jsx)(`img`,{src:r,alt:``,className:`size-full object-cover`}):null,t[3]=r,t[4]=s),s},G=e=>{let t=(0,C.c)(22),{files:n,onPick:i,disabled:a,className:s}=e,p=a===void 0?!1:a,m=(0,S.useRef)(null),h=n.length>=U,_=p||h,y=_&&`cursor-not-allowed`,b;t[0]!==s||t[1]!==y?(b=o(`inline-flex`,y,s),t[0]=s,t[1]=y,t[2]=b):b=t[2];let x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>m.current?.click(),t[3]=x):x=t[3];let w;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,M.jsx)(g,{className:`size-4`}),t[4]=w):w=t[4];let T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,M.jsx)(`span`,{className:`sr-only`,children:(0,M.jsx)(r,{id:`3LbBJn`})}),t[5]=T):T=t[5];let D;t[6]===_?D=t[7]:(D=(0,M.jsxs)(c,{type:`button`,variant:`ghost`,size:`icon`,disabled:_,onClick:x,className:`size-7 text-muted-foreground`,children:[w,T]}),t[6]=_,t[7]=D);let O;t[8]!==b||t[9]!==D?(O=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsx)(`span`,{className:b,children:D})}),t[8]=b,t[9]=D,t[10]=O):O=t[10];let k;t[11]===h?k=t[12]:(k=(0,M.jsx)(u,{children:h?(0,M.jsx)(r,{id:`ASqqsQ`,values:{MAX_ATTACHMENTS:U}}):(0,M.jsx)(r,{id:`3LbBJn`})}),t[11]=h,t[12]=k);let A;t[13]!==O||t[14]!==k?(A=(0,M.jsx)(d,{children:(0,M.jsxs)(f,{children:[O,k]})}),t[13]=O,t[14]=k,t[15]=A):A=t[15];let j;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(j=E.join(`,`),t[16]=j):j=t[16];let N;t[17]===i?N=t[18]:(N=(0,M.jsx)(v,{ref:m,type:`file`,accept:j,multiple:!0,className:`hidden`,onChange:e=>{i(e.target.files),e.target.value=``}}),t[17]=i,t[18]=N);let P;return t[19]!==A||t[20]!==N?(P=(0,M.jsxs)(M.Fragment,{children:[A,N]}),t[19]=A,t[20]=N,t[21]=P):P=t[21],P},K=e=>{let t=(0,C.c)(9),{files:n,onChange:r,error:a}=e,o=a===void 0?null:a,{_:s}=i();if(n.length===0&&o===null)return null;let c;t[0]!==s||t[1]!==n||t[2]!==r?(c=n.length>0&&(0,M.jsx)(H,{children:n.map((e,t)=>(0,M.jsxs)(P,{size:`xs`,children:[(0,M.jsx)(I,{variant:`image`,children:(0,M.jsx)(W,{file:e})}),(0,M.jsxs)(L,{children:[(0,M.jsx)(R,{children:e.name}),(0,M.jsx)(z,{children:j(e.size)})]}),(0,M.jsx)(B,{children:(0,M.jsx)(V,{type:`button`,"aria-label":s({id:`w61W3L`,values:{0:e.name}}),onClick:()=>r(n.filter((e,n)=>n!==t)),children:(0,M.jsx)(_,{className:`size-3.5`})})})]},`${e.name}:${e.size}`))}),t[0]=s,t[1]=n,t[2]=r,t[3]=c):c=t[3];let l;t[4]===o?l=t[5]:(l=o!==null&&(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:o}),t[4]=o,t[5]=l);let u;return t[6]!==c||t[7]!==l?(u=(0,M.jsxs)(M.Fragment,{children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8],u};function q(){let{_:e}=i();return t=>t===null?null:e(t===`count`?{id:`E9gh86`,values:{MAX_ATTACHMENTS:U}}:t===`type`?{id:`s7us1p`}:{id:`ItxGi3`})}function J(e){let t=(0,C.c)(4),{count:n}=e,i;t[0]===n?i=t[1]:(i=n>0&&(0,M.jsx)(r,{id:`L2Bye8`,values:{count:n}}),t[0]=n,t[1]=i);let a;return t[2]===i?a=t[3]:(a=(0,M.jsx)(`span`,{role:`status`,className:`sr-only`,children:i}),t[2]=i,t[3]=a),a}function Y(e){let t=(0,C.c)(12),{files:n,onChange:r,disabled:i}=e,[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),l;t[0]!==i||t[1]!==n||t[2]!==r?(l=function(e){if(i||e===null||e.length===0)return;let t=new Map(n.map(X));for(let n of Array.from(e))t.set(`${n.name}:${n.size}`,n);let a=[...t.values()],o=A(a);c(o===null?null:{files:n,problem:o}),o===null&&r(a)},t[0]=i,t[1]=n,t[2]=r,t[3]=l):l=t[3];let u=l,d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>c(null),t[4]=d):d=t[4];let f=s?.files===n?s.problem:null,p=a&&!i,m;return t[5]!==u||t[6]!==i||t[7]!==n||t[8]!==r||t[9]!==f||t[10]!==p?(m={files:n,setFiles:r,disabled:i,add:u,clearProblem:d,problem:f,dragging:p,onPaste(e){if(i||!(e.target instanceof Node)||!e.currentTarget.contains(e.target))return;let t=b(e.clipboardData);t.length!==0&&(e.preventDefault(),u(t))},onDragOver(e){y(e)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=i?`none`:`copy`,i||o(!0))},onDragLeave(e){(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&o(!1)},onDrop(e){o(!1),y(e)&&(e.preventDefault(),e.stopPropagation(),u(e.dataTransfer.files))}},t[5]=u,t[6]=i,t[7]=n,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function X(e){return[`${e.name}:${e.size}`,e]}function Z(e){let t=(0,C.c)(49),n,i,a,s,c,l;t[0]===e?(n=t[1],i=t[2],a=t[3],s=t[4],c=t[5],l=t[6]):({intake:s,error:c,hint:a,className:n,"aria-describedby":i,...l}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=s,t[5]=c,t[6]=l);let u=c===void 0?null:c,d=(0,S.useId)(),f=q(),p=s.onDragOver,m=s.onDragLeave,h=s.onDrop,g=s.disabled,_;t[7]!==i||t[8]!==d?(_=[i,d].filter(Boolean),t[7]=i,t[8]=d,t[9]=_):_=t[9];let v=_.join(` `),y=s.dragging&&`border-primary bg-primary/5`,b;t[10]!==n||t[11]!==y?(b=o(`resize-none pb-9`,n,y),t[10]=n,t[11]=y,t[12]=b):b=t[12];let w;t[13]!==s.disabled||t[14]!==v||t[15]!==b||t[16]!==l?(w=(0,M.jsx)(x,{...l,disabled:g,"aria-describedby":v,className:b}),t[13]=s.disabled,t[14]=v,t[15]=b,t[16]=l,t[17]=w):w=t[17];let T;t[18]!==s.add||t[19]!==s.disabled||t[20]!==s.files?(T=(0,M.jsx)(G,{files:s.files,onPick:s.add,disabled:s.disabled,className:`absolute bottom-1.5 start-1.5`}),t[18]=s.add,t[19]=s.disabled,t[20]=s.files,t[21]=T):T=t[21];let E;t[22]===s.files.length?E=t[23]:(E=(0,M.jsx)(J,{count:s.files.length}),t[22]=s.files.length,t[23]=E);let D;t[24]!==s.onDragLeave||t[25]!==s.onDragOver||t[26]!==s.onDrop||t[27]!==w||t[28]!==T||t[29]!==E?(D=(0,M.jsxs)(`div`,{className:`relative`,onDragOver:p,onDragLeave:m,onDrop:h,children:[w,T,E]}),t[24]=s.onDragLeave,t[25]=s.onDragOver,t[26]=s.onDrop,t[27]=w,t[28]=T,t[29]=E,t[30]=D):D=t[30];let O;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,M.jsx)(r,{id:`eqSy2M`,values:{MAX_ATTACHMENTS:U}}),t[31]=O):O=t[31];let k;t[32]===a?k=t[33]:(k=a!==void 0&&(0,M.jsxs)(M.Fragment,{children:[` `,a]}),t[32]=a,t[33]=k);let A;t[34]!==d||t[35]!==k?(A=(0,M.jsxs)(`p`,{id:d,className:`text-xs text-muted-foreground`,children:[O,k]}),t[34]=d,t[35]=k,t[36]=A):A=t[36];let j;t[37]!==u||t[38]!==s.problem||t[39]!==f?(j=u??(s.problem===null?null:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(r,{id:`w7IPNE`}),` `,(0,M.jsx)(`span`,{children:f(s.problem)})]})),t[37]=u,t[38]=s.problem,t[39]=f,t[40]=j):j=t[40];let N;t[41]!==s.files||t[42]!==s.setFiles||t[43]!==j?(N=(0,M.jsx)(K,{files:s.files,onChange:s.setFiles,error:j}),t[41]=s.files,t[42]=s.setFiles,t[43]=j,t[44]=N):N=t[44];let P;return t[45]!==D||t[46]!==A||t[47]!==N?(P=(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[D,A,N]}),t[45]=D,t[46]=A,t[47]=N,t[48]=P):P=t[48],P}export{w as a,D as i,Y as n,T as o,E as r,O as s,Z as t};
|
package/dist/public/assets/{ReportBugDialogBody-C-53A-0F.js → ReportBugDialogBody-Dgdx0abm.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-BeFNZANd.js";import{n as s,r as c,t as l}from"./collapsible-DYySK8La.js";import{t as u}from"./checkbox-BZdMjUlq.js";import{Pr as d,Vc as f,ai as p,c as m,oi as h,si as g}from"./dist-bQ5kvrpa.js";import{t as _}from"./createLucideIcon-B6ULg5PN.js";import{t as v}from"./chevron-right-C-g4JuT4.js";import{t as y}from"./circle-alert-Czw40trT.js";import{t as b}from"./spinner-D7ppCG-D.js";import{a as ee,r as x,t as te}from"./bug-report-send-manager-BCkcP5rY.js";import{n as ne}from"./BugReportHistory-DSKcw3JQ.js";import{t as re}from"./triangle-alert--Fl5KoVX.js";import{a as S,c as ie,i as ae,l as oe,n as se,o as ce,s as le,t as ue}from"./dialog-BfHNtxM9.js";import{t as de}from"./input-B87iFAAQ.js";import{t as fe}from"./badge-lmgHBfMn.js";import{n as C}from"./platform-labels-w7hAI_JL.js";import{n as w,t as pe}from"./contact-email-store-BIZ55WhY.js";import{n as me,s as he,t as ge}from"./ImageAttachments-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-BeFNZANd.js";import{n as s,r as c,t as l}from"./collapsible-DYySK8La.js";import{t as u}from"./checkbox-BZdMjUlq.js";import{Pr as d,Vc as f,ai as p,c as m,oi as h,si as g}from"./dist-bQ5kvrpa.js";import{t as _}from"./createLucideIcon-B6ULg5PN.js";import{t as v}from"./chevron-right-C-g4JuT4.js";import{t as y}from"./circle-alert-Czw40trT.js";import{t as b}from"./spinner-D7ppCG-D.js";import{a as ee,r as x,t as te}from"./bug-report-send-manager-BCkcP5rY.js";import{n as ne}from"./BugReportHistory-DSKcw3JQ.js";import{t as re}from"./triangle-alert--Fl5KoVX.js";import{a as S,c as ie,i as ae,l as oe,n as se,o as ce,s as le,t as ue}from"./dialog-BfHNtxM9.js";import{t as de}from"./input-B87iFAAQ.js";import{t as fe}from"./badge-lmgHBfMn.js";import{n as C}from"./platform-labels-w7hAI_JL.js";import{n as w,t as pe}from"./contact-email-store-BIZ55WhY.js";import{n as me,s as he,t as ge}from"./ImageAttachments-CbvAD6gO.js";var _e=_(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),ve=_(`expand`,[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]),ye=_(`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`}]]),be=a(),T=e(n(),1);function xe(e){let t=e===void 0?w:e;return(0,T.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function Se(e){return f().safeParse(e).success}var E=t();function Ce(e,t){let n=e.trim();if(t===void 0)return n===``?void 0:n;let r=t.join(`
|
|
2
2
|
`);return n===``?r:`${n}\n\n${r}`}var D=25;function we(e){return e.replace(/\(([^)]*)\)/,(e,t)=>{let n=t.split(/[/\\]/).pop();return n===void 0||n===``?e:`(${n})`})}function O(e){let t=e.split(`
|
|
3
3
|
`).map(e=>we(e.trim())).filter(e=>e!==``);if(t.length===0)return[];let n=t.slice(0,D),r=t.length-n.length;return[`Component stack:`,...n,...r>0?[`... ${r} more frame(s) omitted`]:[]]}function Te(e){let t=[`Crash source: ${e.source}`];return e.docName!==void 0&&t.push(`Document: ${e.docName}`),e.errorMessage!==void 0&&t.push(`Error: ${e.errorMessage}`),e.componentStack!==void 0&&t.push(...O(e.componentStack)),t}function Ee(e){let t=[`Crash source: ${e.kind===`render-process-gone`?`renderer process crash (reason: ${e.context.reason})`:e.kind===`child-process-gone`?`${e.context.processType} process crash (reason: ${e.context.reason})`:e.context.dirtyShutdown?`previous session ended without a clean quit`:`new crash dump found from the previous session`}`,`Crash event: ${e.eventId}`];return e.kind===`boot`&&e.crashedAppVersion!==void 0&&t.push(`Crashed app version: ${e.crashedAppVersion}`),e.kind===`boot`&&e.crashedAt!==void 0&&t.push(`Crashed at: ${e.crashedAt} (${d(e.crashedAt)})`),t}var De={step:`compose`,creating:!1,createError:null};function Oe(e){return e.summary.files.some(g)}function ke(e){return e.summary.files.some(h)}async function Ae(e){let t=[];for(let n of e)he(n.type)&&t.push({contentType:n.type,bytes:new Uint8Array(await n.arrayBuffer())});return t}function k(e){let t=(0,be.c)(87),{open:n,onOpenChange:a,systemWide:d,crashContext:f,crashInvite:h,screenshot:g,pointerMarked:_,crashDumpAvailable:ee,agentChat:x}=e,C=d===void 0?!1:d,w=g===void 0?null:g,he=_===void 0?!1:_,_e=ee===void 0?!1:ee,{_:D}=i(),we=(typeof window<`u`?window.okDesktop?.platform:void 0)===`darwin`,[O,k]=(0,T.useState)(De),[A,Me]=(0,T.useState)(``),[j,Ne]=(0,T.useState)(f!==void 0||h!==void 0),M=h===void 0?_e:h.minidumpAvailable===!0,[N,Pe]=(0,T.useState)(h?.minidumpAvailable===!0),[P,Fe]=(0,T.useState)(!0),[F,Ie]=(0,T.useState)(!0),I;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(I=[],t[0]=I):I=t[0];let[L,Le]=(0,T.useState)(I),Re=O.step!==`compose`||O.creating,R;t[1]!==L||t[2]!==Re?(R={files:L,onChange:Le,disabled:Re},t[1]=L,t[2]=Re,t[3]=R):R=t[3];let z=me(R),[B,ze]=(0,T.useState)(!1),[V,Be]=(0,T.useState)(``),[H,U]=(0,T.useState)(null),W=(0,T.useRef)(0),G=(0,T.useId)(),K=(0,T.useId)(),Ve=(0,T.useId)(),He=(0,T.useId)(),Ue=(0,T.useId)(),We=(0,T.useId)(),Ge=(0,T.useId)(),Ke=(0,T.useId)(),qe=(0,T.useId)(),Je=(0,T.useId)(),Ye=(0,T.useId)(),Xe=(0,T.useId)(),Ze=(0,T.useId)(),Qe=(0,T.useId)(),q=xe().email,$e,J;t[4]!==n||t[5]!==q?($e=()=>{n&&(ze(q!==null),Be(q??``),U(null))},J=[n,q],t[4]=n,t[5]=q,t[6]=$e,t[7]=J):($e=t[6],J=t[7]),(0,T.useEffect)($e,J);let et;t[8]!==f||t[9]!==h?(et=f===void 0?h===void 0?void 0:Ee(h):Te(f),t[8]=f,t[9]=h,t[10]=et):et=t[10];let Y=et,tt;t[11]===a?tt=t[12]:(tt=function(e){e||(W.current+=1,k(De)),a(e)},t[11]=a,t[12]=tt);let X=tt,nt;t[13]!==D||t[14]!==x||t[15]!==z||t[16]!==L||t[17]!==M||t[18]!==j||t[19]!==V||t[20]!==F||t[21]!==N||t[22]!==P||t[23]!==A||t[24]!==Y||t[25]!==w||t[26]!==B?(nt=async function(){let e=window.okDesktop?.bugReport;if(!e){k({step:`compose`,creating:!1,createError:D({id:`_0JUKX`})});return}if(B&&!Se(V.trim())){U(D({id:`fwrPh4`}));return}U(null);let t=W.current+=1;k({step:`compose`,creating:!0,createError:null});let n=await Ae(L);if(W.current!==t)return;let r=x!==void 0&&F,i=await e.create({level:j?`full`:`standard`,note:Ce(A,Y),...M?{includeCrashDump:N}:{},...w===null?{}:{includeScreenshot:P},...n.length>0?{attachments:n}:{},...r?{agentChatThreadId:x.threadId}:{}});W.current===t&&(i.ok?(z.clearProblem(),k({step:`review`,report:{zipPath:i.zipPath,zipSizeBytes:i.zipSizeBytes,summary:i.summary},conversationMissing:r&&!i.summary.files.some(p)})):k({step:`compose`,creating:!1,createError:i.error}))},t[13]=D,t[14]=x,t[15]=z,t[16]=L,t[17]=M,t[18]=j,t[19]=V,t[20]=F,t[21]=N,t[22]=P,t[23]=A,t[24]=Y,t[25]=w,t[26]=B,t[27]=nt):nt=t[27];let rt=nt,it;t[28]!==f||t[29]!==h||t[30]!==V||t[31]!==X||t[32]!==A||t[33]!==Y||t[34]!==B?(it=function(e){let t=V.trim();pe(B,t),te.startBugReportSend({kind:`created-report`,report:e,note:Ce(A,Y),includeScreenshot:e.summary.files.includes(m),includeAttachments:ke(e),...B&&Se(t)?{email:t}:{}}),Me(``),Ne(f!==void 0||h!==void 0),Pe(h?.minidumpAvailable===!0),Fe(!0),Ie(!0),Le([]),X(!1)},t[28]=f,t[29]=h,t[30]=V,t[31]=X,t[32]=A,t[33]=Y,t[34]=B,t[35]=it):it=t[35];let at=it,ot;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ot=function(e){window.okDesktop?.shell.showItemInFolder(e)},t[36]=ot):ot=t[36];let st=ot,Z;t[37]!==D||t[38]!==x||t[39]!==z||t[40]!==qe||t[41]!==Ke||t[42]!==f||t[43]!==M||t[44]!==h||t[45]!==j||t[46]!==Ue||t[47]!==He||t[48]!==Ge||t[49]!==We||t[50]!==V||t[51]!==H||t[52]!==Qe||t[53]!==Ze||t[54]!==rt||t[55]!==X||t[56]!==F||t[57]!==N||t[58]!==P||t[59]!==Ve||t[60]!==K||t[61]!==A||t[62]!==G||t[63]!==O.createError||t[64]!==O.creating||t[65]!==O.step||t[66]!==he||t[67]!==w||t[68]!==Ye||t[69]!==Je||t[70]!==B||t[71]!==Xe||t[72]!==C?(Z=O.step===`compose`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(le,{className:`gap-2 pr-6`,children:[(0,E.jsx)(ie,{children:(0,E.jsx)(r,{id:`cd5EXh`})}),h===void 0&&(0,E.jsx)(S,{children:(0,E.jsx)(r,{id:`2H5Zhu`})})]}),(0,E.jsxs)(se,{className:`flex flex-auto flex-col gap-2 pb-2 [&>*]:shrink-0`,children:[h!==void 0&&(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-md border border-chart-3/35 bg-chart-3/10 px-3 py-2.5 text-sm`,children:[(0,E.jsx)(re,{className:`mt-0.5 size-4 shrink-0 text-chart-3`,"aria-hidden":`true`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium`,children:(0,E.jsx)(r,{id:`_IGfXZ`})}),(0,E.jsx)(S,{className:`mt-0.5 text-xs`,children:(0,E.jsx)(r,{id:`03wKPg`})})]})]}),O.createError!==null&&(0,E.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-2.5 rounded-md border border-destructive/35 bg-destructive/10 px-3 py-2.5 text-sm`,children:[(0,E.jsx)(y,{className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":`true`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium`,children:(0,E.jsx)(r,{id:`wVa83H`})}),(0,E.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:O.createError}),(0,E.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:(0,E.jsx)(r,{id:`5PHgV2`,components:{0:(0,E.jsx)(`code`,{className:`font-mono`})}})})]})]}),f!==void 0&&(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,E.jsx)(r,{id:`CJ59QJ`})}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsxs)(`label`,{htmlFor:G,className:`text-sm font-medium`,children:[h===void 0?(0,E.jsx)(r,{id:`y_K0Dz`}):(0,E.jsx)(r,{id:`60vpJN`}),` `,(0,E.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:(0,E.jsx)(r,{id:`NzluOx`})})]}),(0,E.jsx)(ge,{id:G,value:A,onChange:e=>Me(e.target.value),placeholder:D(h===void 0?{id:`YLMBSd`}:{id:`T3j-7o`}),rows:2,className:`min-h-20`,intake:z,hint:(0,E.jsx)(r,{id:`XoMG7W`})})]}),w!==null&&(0,E.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5 pt-0.5`,children:[(0,E.jsx)(u,{id:Je,checked:P,onCheckedChange:e=>Fe(e===!0),"aria-describedby":Ye,disabled:O.creating}),(0,E.jsx)(`label`,{htmlFor:Je,className:`text-sm font-medium`,children:(0,E.jsx)(r,{id:`IxyZXD`})})]}),(0,E.jsxs)(ue,{children:[(0,E.jsx)(oe,{asChild:!0,children:(0,E.jsxs)(o,{variant:`outline`,className:`relative block h-auto w-40 shrink-0 overflow-hidden rounded-md bg-muted/40 p-0`,"aria-label":D({id:`AkJx1j`}),children:[(0,E.jsx)(`img`,{src:w.dataUrl,alt:D({id:`WuntOK`}),className:`h-24 w-full object-contain ${P?``:`opacity-40`}`}),(0,E.jsx)(`span`,{className:`absolute end-1 top-1 flex items-center rounded bg-popover/90 p-1`,children:(0,E.jsx)(ve,{className:`size-3`,"aria-hidden":`true`})})]})}),(0,E.jsxs)(ae,{className:`sm:max-w-5xl`,children:[(0,E.jsxs)(le,{className:`pr-6`,children:[(0,E.jsx)(ie,{children:(0,E.jsx)(r,{id:`xvv5gL`})}),(0,E.jsx)(S,{children:(0,E.jsx)(r,{id:`qApCYm`})})]}),(0,E.jsx)(se,{children:(0,E.jsx)(`img`,{src:w.dataUrl,alt:D({id:`WuntOK`}),className:`max-h-[70dvh] w-full object-contain`})})]})]}),(0,E.jsxs)(`p`,{id:Ye,className:`min-w-40 flex-1 text-xs text-muted-foreground`,children:[he?(0,E.jsx)(r,{id:`ZBZEkP`}):(0,E.jsx)(r,{id:`nczGih`}),` `,(0,E.jsx)(r,{id:`qApCYm`})]})]}),(0,E.jsxs)(`fieldset`,{className:`grid min-w-0 gap-3 border-t pt-3 sm:grid-cols-[1fr_1.25fr]`,children:[(0,E.jsx)(`legend`,{className:`sr-only`,children:(0,E.jsx)(r,{id:`WJjviG`})}),(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,E.jsx)(u,{id:K,checked:!0,disabled:!0,"aria-describedby":Ve,className:`mt-0.5`}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,E.jsxs)(`label`,{htmlFor:K,className:`flex flex-wrap items-center gap-2 text-sm font-medium text-foreground`,children:[(0,E.jsx)(r,{id:`FgRAvd`}),(0,E.jsx)(fe,{variant:`primary`,className:`text-2xs`,children:(0,E.jsx)(r,{id:`C0hoX6`})})]}),(0,E.jsx)(`p`,{id:Ve,className:`text-1sm text-muted-foreground`,children:C?(0,E.jsx)(r,{id:`DqyItq`}):(0,E.jsx)(r,{id:`0wkh7o`})})]})]}),(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,E.jsx)(u,{id:He,checked:j,onCheckedChange:e=>Ne(e===!0),"aria-describedby":Ue,disabled:O.creating,className:`mt-0.5`}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,E.jsx)(`label`,{htmlFor:He,className:`text-sm font-medium`,children:(0,E.jsx)(r,{id:`zvjCD4`})}),(0,E.jsx)(fe,{variant:`primary`,className:`text-2xs`,children:(0,E.jsx)(r,{id:`WEYdDv`})})]}),(0,E.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`mx_oWI`})}),(0,E.jsx)(`p`,{id:Ue,className:`text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`Z5q-I8`})}),(0,E.jsxs)(l,{children:[(0,E.jsx)(c,{asChild:!0,children:(0,E.jsxs)(o,{variant:`ghost`,size:`sm`,className:`group -ms-2 h-7 justify-start px-2 text-1sm font-normal`,children:[(0,E.jsx)(v,{className:`size-3.5 group-data-[state=open]:rotate-90`,"aria-hidden":`true`}),(0,E.jsx)(r,{id:`0cGsQh`})]})}),(0,E.jsx)(s,{children:(0,E.jsxs)(`p`,{className:`rounded-md bg-muted/50 p-3 text-1sm text-muted-foreground`,children:[(0,E.jsx)(r,{id:`fRVBiq`}),` `,we&&(0,E.jsx)(r,{id:`7xEWbL`})]})})]})]})]})]}),M&&(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,E.jsx)(u,{id:We,checked:N,onCheckedChange:e=>Pe(e===!0),"aria-describedby":Ge,disabled:O.creating,className:`mt-0.5`}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,E.jsx)(`label`,{htmlFor:We,className:`text-sm font-medium`,children:(0,E.jsx)(r,{id:`8TvlHF`})}),(0,E.jsx)(`p`,{id:Ge,className:`text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`jnCROW`})})]})]}),x!==void 0&&(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,E.jsx)(u,{id:Ke,checked:F,onCheckedChange:e=>Ie(e===!0),"aria-describedby":qe,disabled:O.creating,className:`mt-0.5`}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,E.jsx)(`label`,{htmlFor:Ke,className:`text-sm font-medium`,children:(0,E.jsx)(r,{id:`U8novP`})}),(0,E.jsx)(`p`,{id:qe,className:`text-1sm text-muted-foreground`,children:(0,E.jsx)(r,{id:`nXK5bR`})})]})]}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,E.jsx)(r,{id:`ko-CKk`})}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,E.jsx)(u,{id:Xe,checked:B,onCheckedChange:e=>{ze(e===!0),U(null)},disabled:O.creating}),(0,E.jsx)(`label`,{htmlFor:Xe,className:`text-sm`,children:(0,E.jsx)(r,{id:`SF9qpO`})})]}),B&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,E.jsx)(de,{id:Ze,"aria-label":D({id:`DFQ2Sj`}),type:`email`,value:V,onChange:e=>{Be(e.target.value),U(null)},placeholder:D({id:`JHf6qZ`}),disabled:O.creating,"aria-invalid":H!==null,"aria-describedby":H===null?void 0:Qe}),H!==null&&(0,E.jsx)(`p`,{id:Qe,className:`text-destructive text-sm`,children:H})]})]}),h===void 0&&f===void 0?(0,E.jsx)(ne,{}):null]}),(0,E.jsxs)(ce,{children:[(0,E.jsx)(o,{variant:`ghost`,onClick:()=>X(!1),children:h===void 0?(0,E.jsx)(r,{id:`dEgA5A`}):(0,E.jsx)(r,{id:`PBxg_E`})}),(0,E.jsxs)(o,{onClick:()=>void rt(),disabled:O.creating,children:[O.creating&&(0,E.jsx)(b,{className:`size-4`,"aria-hidden":`true`}),(0,E.jsx)(r,{id:`Si7mIR`})]})]})]}),t[37]=D,t[38]=x,t[39]=z,t[40]=qe,t[41]=Ke,t[42]=f,t[43]=M,t[44]=h,t[45]=j,t[46]=Ue,t[47]=He,t[48]=Ge,t[49]=We,t[50]=V,t[51]=H,t[52]=Qe,t[53]=Ze,t[54]=rt,t[55]=X,t[56]=F,t[57]=N,t[58]=P,t[59]=Ve,t[60]=K,t[61]=A,t[62]=G,t[63]=O.createError,t[64]=O.creating,t[65]=O.step,t[66]=he,t[67]=w,t[68]=Ye,t[69]=Je,t[70]=B,t[71]=Xe,t[72]=C,t[73]=Z):Z=t[73];let Q;t[74]!==at||t[75]!==O.conversationMissing||t[76]!==O.report||t[77]!==O.step?(Q=O.step===`review`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(le,{children:[(0,E.jsx)(ie,{children:(0,E.jsx)(r,{id:`2AIVbm`})}),(0,E.jsx)(S,{children:(0,E.jsx)(r,{id:`3l_cXP`})})]}),(0,E.jsxs)(se,{className:`flex flex-col gap-4`,children:[(0,E.jsx)(je,{zipPath:O.report.zipPath,zipSizeBytes:O.report.zipSizeBytes,fileCount:O.report.summary.files.length,rawDumpIncluded:Oe(O.report),onReveal:st}),O.conversationMissing?(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,E.jsx)(r,{id:`nRX05G`})}):null,(0,E.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border bg-muted/50 px-3 py-2.5 text-xs text-muted-foreground`,children:[(0,E.jsx)(ye,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,E.jsx)(`span`,{children:(0,E.jsx)(r,{id:`-o5XAG`})})]})]}),(0,E.jsxs)(ce,{className:`sm:justify-between`,children:[(0,E.jsx)(o,{variant:`ghost`,onClick:()=>k(De),children:(0,E.jsx)(r,{id:`iH8pgl`})}),(0,E.jsx)(o,{onClick:()=>at(O.report),children:(0,E.jsx)(r,{id:`O9oQJS`})})]})]}),t[74]=at,t[75]=O.conversationMissing,t[76]=O.report,t[77]=O.step,t[78]=Q):Q=t[78];let $;t[79]!==z.onPaste||t[80]!==Z||t[81]!==Q?($=(0,E.jsxs)(ae,{className:`gap-2 sm:max-w-[46.25rem]`,onPaste:z.onPaste,children:[Z,Q]}),t[79]=z.onPaste,t[80]=Z,t[81]=Q,t[82]=$):$=t[82];let ct;return t[83]!==X||t[84]!==n||t[85]!==$?(ct=(0,E.jsx)(ue,{open:n,onOpenChange:X,children:$}),t[83]=X,t[84]=n,t[85]=$,t[86]=ct):ct=t[86],ct}function je(e){let t=(0,be.c)(23),{zipPath:n,zipSizeBytes:i,fileCount:a,rawDumpIncluded:s,onReveal:c}=e,l;t[0]===n?l=t[1]:(l=ee(n),t[0]=n,t[1]=l);let u=l,d;t[2]===i?d=t[3]:(d=x(i),t[2]=i,t[3]=d);let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,E.jsx)(`div`,{className:`flex items-center justify-center size-8 rounded-md bg-muted`,children:(0,E.jsx)(_e,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`})}),t[4]=p):p=t[4];let m;t[5]===u?m=t[6]:(m=(0,E.jsx)(`p`,{className:`truncate text-1sm`,title:u,children:u}),t[5]=u,t[6]=m);let h;t[7]!==a||t[8]!==s||t[9]!==f?(h=(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s?(0,E.jsx)(r,{id:`sn5BEU`,values:{sizeText:f,fileCount:a}}):(0,E.jsx)(r,{id:`3DJEEt`,values:{sizeText:f,fileCount:a}})}),t[7]=a,t[8]=s,t[9]=f,t[10]=h):h=t[10];let g;t[11]!==m||t[12]!==h?(g=(0,E.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==c||t[15]!==n?(_=()=>c(n),t[14]=c,t[15]=n,t[16]=_):_=t[16];let v;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(v=C(typeof window<`u`?window.okDesktop?.platform:void 0),t[17]=v):v=t[17];let y;t[18]===_?y=t[19]:(y=(0,E.jsx)(o,{variant:`link`,className:`h-auto shrink-0 p-0 text-xs`,onClick:_,children:v}),t[18]=_,t[19]=y);let b;return t[20]!==g||t[21]!==y?(b=(0,E.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md border px-3 py-2.5`,children:[p,g,y]}),t[20]=g,t[21]=y,t[22]=b):b=t[22],b}export{k as default};
|
package/dist/public/assets/{ReportBugMenuTrigger-29birQ-y.js → ReportBugMenuTrigger-L6UKLhv7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{n as i}from"./use-installed-clis-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{n as i}from"./use-installed-clis-D8GK8YwQ.js";import{n as a}from"./local-menu-action-bus-DaoT7_kL.js";var o=r(),s=e(n(),1),c=t();function l(e){let t=(0,o.c)(7),{systemWide:n}=e,[r,l]=(0,s.useState)(null),u,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>a((e,t)=>{e===`report-bug`&&l(e=>e??t)}),d=[],t[0]=u,t[1]=d):(u=t[0],d=t[1]),(0,s.useEffect)(u,d);let f=r!==null,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{e||l(null)},t[2]=p):p=t[2];let m=r?.launcherBorne===!0,h;return t[3]!==n||t[4]!==f||t[5]!==m?(h=(0,c.jsx)(i,{open:f,onOpenChange:p,launcherBorne:m,systemWide:n}),t[3]=n,t[4]=f,t[5]=m,t[6]=h):h=t[6],h}export{l as t};
|