@yuriai/web 0.2.36 → 0.2.37
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/README.md +6 -0
- package/dist/assets/AgentAvatar-Dpot7DG_.js +1 -0
- package/dist/assets/AssistantContactStatus-DBUeAOcC.js +3 -0
- package/dist/assets/AssistantUnreadBadge-uMPRfRqu.js +1 -0
- package/dist/assets/AssistantView-9v8wufOH.js +1 -0
- package/dist/assets/DiagramView-D317a0U8.js +1 -0
- package/dist/assets/FadeInOnReveal-DlU4WRpc.js +1 -0
- package/dist/assets/GuiPluginSurface-DHMppLxf.js +1 -0
- package/dist/assets/GuiPluginWindow-CWP-ZcJj.js +1 -0
- package/dist/assets/Icon-3udlHlix.js +1 -0
- package/dist/assets/ImageLoadingPlaceholder-D2CKCkHe.js +1 -0
- package/dist/assets/LoadingImage-CzTb95Cn.js +1 -0
- package/dist/assets/MarkdownRenderer-C1KveBTm.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-DBaGpRQS.js → MarkdownRendererImpl-Dfj5yBQH.js} +2 -2
- package/dist/assets/MarkstreamRendererImpl-DBWfVjRS.js +3 -0
- package/dist/assets/MobileDetailNavigation-D6pHFCLd.js +1 -0
- package/dist/assets/MobileResizableSheet-B9lJQT-Q.js +1 -0
- package/dist/assets/MobileShareBridge-BJDkko0y.js +4 -0
- package/dist/assets/MobileTabPageHeader-BdZ4z7qY.js +2 -0
- package/dist/assets/MultiRunWindow-C4sUyQMj.js +1 -0
- package/dist/assets/OnboardingScreen-tF0G9FoO.js +1 -0
- package/dist/assets/OverlayScrollbar-BhUMMoCN.js +1 -0
- package/dist/assets/SettingsView-Dk2vpPHM.js +29 -0
- package/dist/assets/SettingsWindow-Cl_MVXqd.js +1 -0
- package/dist/assets/SetupTourDialog-BGvxww7E.js +1 -0
- package/dist/assets/TerminalView-DCVU9yPv.js +8 -0
- package/dist/assets/{ToolOutputDialog-BhD4QiRH.js → ToolOutputDialog-BSNWZM5u.js} +4 -4
- package/dist/assets/VoiceSettings-C3KZYlyP.js +2 -0
- package/dist/assets/YuriLogo-CMoJ3Apd.js +1 -0
- package/dist/assets/{YuriWordmark-CGDlDvEH.js → YuriWordmark-DiB7p_ho.js} +1 -1
- package/dist/assets/{appThemeRegistry-2DEQy44q.js → appThemeRegistry-axRbeIwY.js} +1 -1
- package/dist/assets/{assistant-attachment-cache-oatc8F4t.js → assistant-attachment-cache-B7NHgRWA.js} +1 -1
- package/dist/assets/bootstrap-CH0Mo2ok.js +9 -0
- package/dist/assets/{capgoAdapter-Dz8eMW5Y.js → capgoAdapter-C8QhPFlX.js} +1 -1
- package/dist/assets/checkbox-C641Uk-q.js +1 -0
- package/dist/assets/collapsible-YNp0uGvK.js +1 -0
- package/dist/assets/context-menu-BHe5nbZ0.js +1 -0
- package/dist/assets/desktop-DLxQTjzu.js +1 -0
- package/dist/assets/desktopHosts-Dk0D5ATF.js +1 -0
- package/dist/assets/desktopRelayRestore-COTsQw8C.js +1 -0
- package/dist/assets/{device-w1ioiqv3.js → device-BGox1QjM.js} +1 -1
- package/dist/assets/diagram-DZJvm12J.js +1 -0
- package/dist/assets/dialog-So-nuji1.js +1 -0
- package/dist/assets/{es-CPoqPlVn.js → es-BC7jaA0J.js} +2 -2
- package/dist/assets/{fileMentionTouchSelection-B-oPBD2a.js → fileMentionTouchSelection-CcBab6jA.js} +1 -1
- package/dist/assets/fileQueries-BBcsALlC.js +1 -0
- package/dist/assets/{fileReferenceActions-DrAZHld4.js → fileReferenceActions-DRECILCs.js} +1 -1
- package/dist/assets/{fileReferenceParser-1HHDBUum.js → fileReferenceParser-BayaidRM.js} +1 -1
- package/dist/assets/{fr-F7aQyu3-.js → fr-BIvcfHvS.js} +2 -2
- package/dist/assets/{gitApi-Dy__-dVB.js → gitApi-CXUPuRTB.js} +5 -5
- package/dist/assets/historyImportQueries-MpkoiK56.js +1 -0
- package/dist/assets/host-CzMYcPbz.js +1 -0
- package/dist/assets/image-loading-2ppAWcFZ.js +1 -0
- package/dist/assets/input-BK1Dm9vD.js +1 -0
- package/dist/assets/insertionBoundaries-DQRAPE-y.js +1 -0
- package/dist/assets/{ja-BVQSzC4w.js → ja-Dx_d9fYc.js} +2 -2
- package/dist/assets/{ko-DW2WaBw6.js → ko-CLQ_FtRR.js} +2 -2
- package/dist/assets/main-BVl-5tBj.js +169 -0
- package/dist/assets/main-CM26G9n0.js +2 -0
- package/dist/assets/{markdownHeightCache-D0fP62uP.js → markdownHeightCache-DMZ5GgoP.js} +1 -1
- package/dist/assets/mcpQueries-BFbulSUU.js +1 -0
- package/dist/assets/miniChat-CD9Pz0ZW.js +2 -0
- package/dist/assets/mobile-B3bArIND.js +2 -0
- package/dist/assets/{mobileBackNavigation-B-dgoPw6.js → mobileBackNavigation-D3-dwiiY.js} +1 -1
- package/dist/assets/multirun-CEyNjbIS.js +3 -0
- package/dist/assets/{native-config-CLcCZ6JT.js → native-config-stLNU1o7.js} +1 -1
- package/dist/assets/path-utils-HRmerlyU.js +1 -0
- package/dist/assets/{pl-BWVfAt6z.js → pl-BkPum7Gu.js} +3 -3
- package/dist/assets/platform-h8km2dnF.js +1 -0
- package/dist/assets/projectActions-C-9Z8R7y.js +1 -0
- package/dist/assets/projectMeta-2FoNc0nP.js +1 -0
- package/dist/assets/{pt-BR-BifD1KYG.js → pt-BR-DfT7YLHn.js} +2 -2
- package/dist/assets/pwa-CCJwn58X.js +2 -0
- package/dist/assets/queue-abort-optimistic-BZd3gflI.js +1 -0
- package/dist/assets/readiness-Djew2NvN.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-DdvkzG1o.js +2 -0
- package/dist/assets/renderMobileApp-D4aaygxO.js +28 -0
- package/dist/assets/runtime-file-download-Bz4NbKDi.js +1 -0
- package/dist/assets/runtime-file-resource-Btl3euLf.js +2 -0
- package/dist/assets/runtimeConfig-D4pEnoIh.js +2 -0
- package/dist/assets/runtimeEndpointReset-6jhYadQt.css +1 -0
- package/dist/assets/runtimeEndpointReset-DvSz9Dmf.js +149 -0
- package/dist/assets/{scheduledTaskNavigation-7dD6PWMD.js → scheduledTaskNavigation-BhsMoXS3.js} +1 -1
- package/dist/assets/select-IPdYq29J.js +1 -0
- package/dist/assets/sessionLookup-7Ux2A4fS.js +1 -0
- package/dist/assets/sortable-tabs-strip-pQbSLRMg.js +1 -0
- package/dist/assets/{speechSettingsQueries-sb0ZHAri.js → speechSettingsQueries-Cl_-LtPL.js} +1 -1
- package/dist/assets/src-BHDTEDdR.css +2 -0
- package/dist/assets/{store-Dvb_y7vz.js → store-BKKodkCp.js} +3 -3
- package/dist/assets/terminalApi-D2kNkPrJ.js +1 -0
- package/dist/assets/textarea-DSOIfiVX.js +1 -0
- package/dist/assets/tooltip-BuZUnYeV.js +1 -0
- package/dist/assets/{types-DD3a5G5L.js → types-DAssRFbW.js} +1 -1
- package/dist/assets/{uk-3_q1FN3X.js → uk-DgzBKB1K.js} +2 -2
- package/dist/assets/url-DO6Zrx1P.js +1 -0
- package/dist/assets/{useAppFontEffects-BBRIHYET.js → useAppFontEffects-Cjtcc4Sq.js} +58 -58
- package/dist/assets/{useAssistantUIStore-cHle1U5H.js → useAssistantUIStore-Jmh6rESU.js} +1 -1
- package/dist/assets/useDesktopWindowControlsLayout-BJx2ijlY.js +1 -0
- package/dist/assets/useDictation-BafHajO_.js +1 -0
- package/dist/assets/useEffectiveDirectory-AQOtdYdf.js +1 -0
- package/dist/assets/{useFontPreferences-D-AOjd9H.js → useFontPreferences-OCLG7Btz.js} +1 -1
- package/dist/assets/useMobileNavigationStore-l2L-r3RJ.js +17 -0
- package/dist/assets/usePluginsStore-DaZr5OE_.js +1 -0
- package/dist/assets/{useStreamingTextThrottle-C2ORuOtg.js → useStreamingTextThrottle-C1Dm4frL.js} +1 -1
- package/dist/assets/{useUIStore-B61bCFEM.js → useUIStore-DPo791La.js} +1 -1
- package/dist/assets/useWorkerHighlightedLines-DhJbTxdK.js +7 -0
- package/dist/assets/vendor-reactuses-core-CuTmqEMK.js +1 -0
- package/dist/assets/{zh-CN-DvlJbsyJ.js → zh-CN-DTKScxtm.js} +2 -2
- package/dist/assets/{zh-TW-B4FmXnzP.js → zh-TW-JOn8l2o2.js} +2 -2
- package/dist/index.html +19 -23
- package/dist/mini-chat.html +19 -23
- package/dist/mobile.html +19 -23
- package/package.json +1 -1
- package/server/index.js +4 -3
- package/server/lib/assistants/DOCUMENTATION.md +37 -5
- package/server/lib/assistants/contact-store.js +8 -1
- package/server/lib/assistants/contact-tools.js +6 -6
- package/server/lib/assistants/contact-tools.test.js +4 -2
- package/server/lib/assistants/harness.js +14 -8
- package/server/lib/assistants/harness.test.js +33 -0
- package/server/lib/assistants/pi-tools.js +15 -2
- package/server/lib/assistants/pi-tools.test.js +35 -1
- package/server/lib/assistants/service.js +6 -9
- package/server/lib/assistants/service.test.js +90 -12
- package/server/lib/assistants/summary.js +2 -0
- package/server/lib/assistants/tool-execution.js +53 -0
- package/server/lib/assistants/tool-execution.test.js +82 -0
- package/server/lib/assistants/yuri-project.http.test.js +2 -3
- package/server/lib/assistants/yuri-tools.js +1 -1
- package/server/lib/git/DOCUMENTATION.md +3 -0
- package/server/lib/git/service.js +9 -3
- package/server/lib/git/worktrees.catalog.test.js +31 -0
- package/server/lib/notifications/DOCUMENTATION.md +34 -0
- package/server/lib/notifications/session-unread-runtime.js +101 -0
- package/server/lib/notifications/session-unread-store.js +93 -0
- package/server/lib/notifications/session-unread.test.js +176 -0
- package/server/lib/opencode/feature-routes-runtime.js +22 -1
- package/server/lib/opencode/session-directory-runtime.js +29 -3
- package/server/lib/opencode/session-directory-runtime.test.js +78 -0
- package/server/lib/scheduled-tasks/DOCUMENTATION.md +12 -0
- package/server/lib/scheduled-tasks/runtime.js +24 -0
- package/server/lib/scheduled-tasks/runtime.test.js +41 -0
- package/server/lib/session-index/DOCUMENTATION.md +9 -0
- package/server/lib/session-index/sync-runtime.js +10 -1
- package/dist/assets/AgentAvatar-0zDTBIBH.js +0 -1
- package/dist/assets/AssistantContactStatus-CqBzrMI3.js +0 -3
- package/dist/assets/AssistantUnreadBadge-CqMHWeGm.js +0 -1
- package/dist/assets/AssistantView-DSnDwWGc.js +0 -1
- package/dist/assets/DiagramView-xGg1oS8b.js +0 -1
- package/dist/assets/FadeInOnReveal-C_UU65YY.js +0 -1
- package/dist/assets/GuiPluginSurface-Dpiaq__1.js +0 -1
- package/dist/assets/GuiPluginWindow-B0oHkEwj.js +0 -1
- package/dist/assets/Icon-BNzwtZlI.js +0 -1
- package/dist/assets/ImageLoadingPlaceholder-CH4TCRvH.js +0 -1
- package/dist/assets/LoadingImage-C6jr50EL.js +0 -1
- package/dist/assets/MarkdownRenderer-BonJRvHM.js +0 -2
- package/dist/assets/MarkstreamRendererImpl-DcxDrUW1.js +0 -3
- package/dist/assets/MobileDetailNavigation-DacHr77a.js +0 -1
- package/dist/assets/MobileResizableSheet-DZ7Kq3ZS.js +0 -1
- package/dist/assets/MobileShareBridge-CKDkjJIK.js +0 -4
- package/dist/assets/MobileTabPageHeader-CT5jeuHU.js +0 -2
- package/dist/assets/MultiRunWindow-GFioSTDw.js +0 -1
- package/dist/assets/OnboardingScreen-DAiSh2kq.js +0 -1
- package/dist/assets/OverlayScrollbar-5yODT_nG.js +0 -1
- package/dist/assets/SettingsView-BoDwWc6-.js +0 -29
- package/dist/assets/SettingsWindow-BGPVsXUi.js +0 -1
- package/dist/assets/SetupTourDialog-CM8-QHJ3.js +0 -1
- package/dist/assets/TerminalView-BnR50Mgm.js +0 -8
- package/dist/assets/VoiceSettings-BeMRGXfr.js +0 -2
- package/dist/assets/YuriLogo-D7QXHCf6.js +0 -1
- package/dist/assets/bootstrap-Bi91NjXG.js +0 -3
- package/dist/assets/button-CPRnAdlm.js +0 -1
- package/dist/assets/checkbox-DZkjNegP.js +0 -1
- package/dist/assets/collapsible-CP7z1jKL.js +0 -1
- package/dist/assets/context-menu-B8yin969.js +0 -1
- package/dist/assets/desktop-BAmoc_34.js +0 -1
- package/dist/assets/desktopHosts-BLU1tGSX.js +0 -1
- package/dist/assets/desktopRelayRestore-2BIIs8mZ.js +0 -1
- package/dist/assets/diagram-O7VUqG75.js +0 -1
- package/dist/assets/dialog-Dq8l3IQC.js +0 -1
- package/dist/assets/fileQueries-C2Rs6TPz.js +0 -1
- package/dist/assets/gitApiHttp-CKrsk1tw.js +0 -7
- package/dist/assets/historyImportQueries-C8VK9R5_.js +0 -1
- package/dist/assets/host-z9PU8q1e.js +0 -1
- package/dist/assets/image-loading-DKQOYtti.js +0 -1
- package/dist/assets/input-9A1m0Yjq.js +0 -1
- package/dist/assets/insertionBoundaries-DdpR3zaP.js +0 -1
- package/dist/assets/main-B2Bi3ueT.js +0 -2
- package/dist/assets/main-CpoO7VOS.js +0 -169
- package/dist/assets/mcpQueries-DcbmHgNY.js +0 -1
- package/dist/assets/miniChat-C52LB0Yu.js +0 -2
- package/dist/assets/mobile-U4WSU-8R.js +0 -2
- package/dist/assets/multirun-VckoCH5p.js +0 -3
- package/dist/assets/path-utils-jGozTg9d.js +0 -1
- package/dist/assets/pathNormalization-ewtPqJWn.js +0 -1
- package/dist/assets/platform-sEg2IOLZ.js +0 -1
- package/dist/assets/projectActions-BX0cjZoq.js +0 -1
- package/dist/assets/projectMeta-BYNpABmO.js +0 -1
- package/dist/assets/pwa--whpkoe7.js +0 -2
- package/dist/assets/queryRuntime-2dx7jbt9.js +0 -1
- package/dist/assets/queue-abort-optimistic-CsU9CtHa.js +0 -1
- package/dist/assets/readiness-CafO-iNt.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-BOZWsCQP.js +0 -2
- package/dist/assets/renderMobileApp-Cc6uK66H.js +0 -28
- package/dist/assets/runtime-file-download-D6bwc3Kj.js +0 -1
- package/dist/assets/runtime-file-resource-BP4P52ry.js +0 -2
- package/dist/assets/runtimeAPIRegistry-C2VogTny.js +0 -1
- package/dist/assets/runtimeConfig-Coh1hryT.js +0 -2
- package/dist/assets/runtimeEndpointReset-BP4JwHFJ.css +0 -1
- package/dist/assets/runtimeEndpointReset-Bwm_RwzE.js +0 -149
- package/dist/assets/select-BNDVM5KL.js +0 -1
- package/dist/assets/sessionLookup-BI6ygHcL.js +0 -1
- package/dist/assets/sortable-tabs-strip-lZ6K_9ug.js +0 -1
- package/dist/assets/src-B_i0g2Ca.css +0 -2
- package/dist/assets/terminalApi-Bo6KWljy.js +0 -1
- package/dist/assets/textarea-Ds63PD7U.js +0 -1
- package/dist/assets/tooltip-C25g1ojI.js +0 -1
- package/dist/assets/url-MRa-FtQa.js +0 -1
- package/dist/assets/useDesktopWindowControlsLayout-CTSEy8Ep.js +0 -1
- package/dist/assets/useDictation-ozXiBIfG.js +0 -1
- package/dist/assets/useEffectiveDirectory-DO311OTB.js +0 -1
- package/dist/assets/useMobileNavigationStore-D59MROJU.js +0 -17
- package/dist/assets/usePluginsStore-3VJgeLvf.js +0 -1
- package/dist/assets/useWorkerHighlightedLines-DaoXaYxw.js +0 -7
- package/dist/assets/vendor-reactuses-core-DWo5Wn6R.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-
|
|
1
|
+
import{a as e,n as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-DAssRFbW.js";var r=e(`CapacitorUpdater`),i=()=>{if(typeof window>`u`)return!1;try{return t.isNativePlatform()&&t.isPluginAvailable(`CapacitorUpdater`)}catch{return!1}},a=()=>{throw new n},o=()=>({async notifyAppReady(){return i()||a(),r.notifyAppReady()},async download(e){return i()||a(),r.download(e)},async next(e){return i()||a(),r.next(e)},async reload(){return i()||a(),r.reload()},async current(){return i()||a(),r.current()},async getDeviceId(){return i()||a(),r.getDeviceId()},async list(){return i()||a(),r.list()},addListener:(async(e,t)=>(i()||a(),r.addListener(e,t)))}),s,c=async()=>s===void 0?i()?(s=o(),s):(s=null,null):s,l=()=>i();export{l as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{J as t,Y as n,ot as r,st as i}from"./vendor-base-ui-CzHs0bHY.js";import{n as a}from"./vendor-react-DlzBev0S.js";import{Jn as o}from"./useMobileNavigationStore-l2L-r3RJ.js";import{n as s}from"./Icon-3udlHlix.js";var c=a(),l=e(i(),1),u=r(),d=l.memo(function(e){let r=(0,c.c)(20),{checked:i,onChange:a,disabled:l,indeterminate:d,ariaLabel:f,className:p,iconClassName:m}=e,h=l!==void 0&&l,g=i||d,_;r[0]===a?_=r[1]:(_=e=>a(!!e),r[0]=a,r[1]=_);let v=g?`border-[color:color-mix(in_srgb,var(--primary-base)_65%,var(--interactive-border))] bg-transparent shadow-none hover:bg-[var(--interactive-hover)] hover:border-[color:color-mix(in_srgb,var(--primary-base)_75%,var(--interactive-border))]`:`border-[var(--interactive-border)] bg-transparent shadow-none hover:bg-[var(--interactive-hover)] hover:border-[var(--interactive-border)]`,y;r[2]!==p||r[3]!==v?(y=o(`group/checkbox relative flex shrink-0 self-center items-center justify-center rounded-[4px] border outline-none`,`h-[14px] w-[14px] min-h-[14px] min-w-[14px]`,`transition-[background-color,border-color,box-shadow] duration-200 ease-out`,v,`focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-transparent`,`disabled:cursor-not-allowed disabled:opacity-50`,p),r[2]=p,r[3]=v,r[4]=y):y=r[4];let b;r[5]===m?b=r[6]:(b=o(`flex items-center justify-center text-[var(--primary-base)]`,`data-[unchecked]:hidden`,m),r[5]=m,r[6]=b);let x;r[7]===d?x=r[8]:(x=d?(0,u.jsx)(s,{name:`subtract`,className:o(`h-[10px] w-[10px] min-h-[10px] min-w-[10px]`,`text-[var(--primary-base)]`)}):(0,u.jsx)(s,{name:`check`,className:o(`h-[10px] w-[10px] min-h-[10px] min-w-[10px]`,`text-[var(--primary-base)]`)}),r[7]=d,r[8]=x);let S;r[9]!==b||r[10]!==x?(S=(0,u.jsx)(t,{keepMounted:!0,className:b,children:x}),r[9]=b,r[10]=x,r[11]=S):S=r[11];let C;return r[12]!==f||r[13]!==i||r[14]!==h||r[15]!==d||r[16]!==_||r[17]!==y||r[18]!==S?(C=(0,u.jsx)(n,{checked:i,onCheckedChange:_,disabled:h,indeterminate:d,"aria-label":f,className:y,children:S}),r[12]=f,r[13]=i,r[14]=h,r[15]=d,r[16]=_,r[17]=y,r[18]=S,r[19]=C):C=r[19],C});export{d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,ot as n,r,st as i,t as a}from"./vendor-base-ui-CzHs0bHY.js";import{n as o}from"./vendor-react-DlzBev0S.js";import{Jn as s}from"./useMobileNavigationStore-l2L-r3RJ.js";var c=o(),l=e(i(),1),u=n(),d=r,f=e=>{let n=(0,c.c)(14),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:a,asChild:r,children:i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let d;n[5]!==r||n[6]!==i?(d=r&&l.isValidElement(i)?{render:i}:{children:i},n[5]=r,n[6]=i,n[7]=d):d=n[7];let f=d,p;n[8]===a?p=n[9]:(p=s(`flex w-full items-center justify-between rounded-lg px-2 py-1.5 text-left text-foreground hover:bg-interactive-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,a),n[8]=a,n[9]=p);let m;return n[10]!==o||n[11]!==f||n[12]!==p?(m=(0,u.jsx)(t,{className:p,...o,...f}),n[10]=o,n[11]=f,n[12]=p,n[13]=m):m=n[13],m},p=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=s(`overflow-hidden data-[closed]:animate-collapsible-up data-[open]:animate-collapsible-down`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,u.jsx)(a,{className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o};export{p as n,f as r,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-hePW80VL.js";import{A as e,B as t,L as n,R as r,a as i,i as a,ot as o,st as s,z as c}from"./vendor-base-ui-CzHs0bHY.js";import{n as l}from"./vendor-react-DlzBev0S.js";import{Jn as u}from"./useMobileNavigationStore-l2L-r3RJ.js";import{n as d,r as f,t as p}from"./dropdown-menu.styles-BDla58Rm.js";var m=l();s();var h=o();function g(e){let t=(0,m.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,h.jsx)(i,{...n}),t[2]=n,t[3]=r),r}function _(e){let t=(0,m.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,h.jsx)(a,{...n}),t[2]=n,t[3]=r),r}function v(e){let t=(0,m.c)(20),i,a,o,s,l;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],l=t[5]):({className:a,positionerClassName:o,children:i,style:l,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l);let f;t[6]===o?f=t[7]:(f=u(`app-region-no-drag z-50`,o),t[6]=o,t[7]=f);let p;t[8]===l?p=t[9]:(p={color:`var(--surface-elevated-foreground)`,...l},t[8]=l,t[9]=p);let g;t[10]===a?g=t[11]:(g=u(d,a),t[10]=a,t[11]=g);let _;t[12]!==i||t[13]!==s||t[14]!==p||t[15]!==g?(_=(0,h.jsx)(c,{"data-slot":`dropdown-menu-content`,style:p,className:g,...s,children:i}),t[12]=i,t[13]=s,t[14]=p,t[15]=g,t[16]=_):_=t[16];let v;return t[17]!==f||t[18]!==_?(v=(0,h.jsx)(r,{children:(0,h.jsx)(n,{className:f,children:_})}),t[17]=f,t[18]=_,t[19]=v):v=t[19],v}function y(e){let n=(0,m.c)(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=u(p,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,h.jsx)(t,{className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}function b(t){let n=(0,m.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=u(f,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=(0,h.jsx)(e,{className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o}export{_ as a,b as i,v as n,y as r,g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./runtime-auth-DBn9yahL.js";import{r as t,t as n}from"./runtime-switch-DEZ1K7qW.js";import{s as r}from"./path-utils-HRmerlyU.js";var i=[`local`,`remote`,null],a=[`ok`,`not-configured`,`unreachable`,`pairing-expired`,`incompatible`,`wrong-service`,`missing`];function o(e){if(!e||typeof e!=`object`)return{valid:!1};let t=e,n=t.target,r=t.status;if(n!==null&&(typeof n!=`string`||!i.includes(n))||typeof r!=`string`||!a.includes(r))return{valid:!1};if(n===`remote`||n===`local`){if(r===`ok`&&n===`local`)return{valid:!0,outcome:{target:`local`,status:`ok`}};if(r===`ok`&&n===`remote`)return typeof t.hostId!=`string`||typeof t.url!=`string`?{valid:!1}:{valid:!0,outcome:{target:`remote`,status:`ok`,hostId:t.hostId,url:t.url}};if(r===`unreachable`)return n===`local`?{valid:!0,outcome:{target:`local`,status:`unreachable`}}:typeof t.hostId!=`string`||typeof t.url!=`string`?{valid:!1}:{valid:!0,outcome:{target:`remote`,status:`unreachable`,hostId:t.hostId,url:t.url}};if(r===`incompatible`||r===`wrong-service`||r===`pairing-expired`)return n!==`remote`||typeof t.hostId!=`string`||typeof t.url!=`string`?{valid:!1}:{valid:!0,outcome:{target:`remote`,status:r,hostId:t.hostId,url:t.url}};if(r===`missing`)return n!==`remote`||typeof t.hostId!=`string`?{valid:!1}:{valid:!0,outcome:{target:`remote`,status:`missing`,hostId:t.hostId}}}if(n===null){if(r===`not-configured`)return{valid:!0,outcome:{target:null,status:`not-configured`}};if(r===`missing`)return{valid:!1}}return{valid:!1}}function s(e){if(!e.isDesktopShell)return null;let t=e.bootOutcome;if(!t)return null;if(t.status===`ok`){if(t.target===`local`)return{screen:`main`};if(t.target===`remote`)return{screen:`main`,hostId:t.hostId,url:t.url}}if(t.target===null&&t.status===`not-configured`)return{screen:`chooser`};if(t.target===`local`&&t.status===`unreachable`)return{screen:`recovery`,variant:`local-unavailable`};if(t.target===`remote`){if(t.status===`unreachable`)return{screen:`recovery`,variant:`remote-unreachable`,hostId:t.hostId,url:t.url};if(t.status===`pairing-expired`)return{screen:`recovery`,variant:`remote-pairing-expired`,hostId:t.hostId,url:t.url};if(t.status===`incompatible`)return{screen:`recovery`,variant:`remote-incompatible`,hostId:t.hostId,url:t.url};if(t.status===`wrong-service`)return{screen:`recovery`,variant:`remote-wrong-service`,hostId:t.hostId,url:t.url};if(t.status===`missing`)return{screen:`recovery`,variant:`remote-missing`,hostId:t.hostId}}return null}function c(e){return e.isDesktopShell?e.bootOutcomeKnown?e.bootViewIsMain===!1||e.isInitialized:!1:e.isInitialized}function l(e){return e.isDesktopShell&&!e.isDesktopLocalOriginActive}function u(){if(f()!==`valid`)return null;let e=o(d());return e.valid?e.outcome:null}var d=()=>{if(typeof window>`u`)return;let e=window.__YURI_DESKTOP_BOOT_OUTCOME__;if(e!=null)return e;let t=window.__YURI_DESKTOP_BOOT__;if(t&&typeof t.getOutcome==`function`)try{return t.getOutcome()}catch{return}return e};function f(){if(typeof window>`u`)return`not-injected`;let e=d();return e==null?`not-injected`:o(e).valid?`valid`:`malformed`}var p=()=>typeof window>`u`?null:window.__YURI_ELECTRON__??null,m=()=>typeof window>`u`?null:window.__YURI_DESKTOP__??null,h=()=>p()?.runtime===`electron`,g=()=>h()&&p()?.packaged===!0,_=e=>{if(!h())return null;let t=m()?.getPathForFile?.(e);return typeof t==`string`&&t.trim()?t:null},v=()=>{if(typeof window>`u`)return null;let e=window.__YURI_PLATFORM__;return typeof e==`string`?e:null},y=()=>{if(!h())return!1;let e=v();return e===`win32`||e===`linux`},b=(e=v())=>e===`linux`?`left`:`right`,x=(e,t=v())=>e===`left`||e===`right`?e:b(t),S=()=>typeof m()?.invoke==`function`,C=()=>h()&&S(),ee=()=>S()&&R()&&m()?.isDocumentRestricted?.()!==!0,w=()=>h()&&R()?m()?.guiPlugins:void 0,T=()=>h()?m()?.guiPlugins:void 0,E=()=>h()?m()?.viewExport:void 0,D=async(e,t)=>{let n=m();return typeof n?.invoke==`function`?n.invoke(e,t??{}):null},te=async e=>{if(!C()||!R())throw Error(`unsupported`);let t=await D(e.type===`status`?`desktop_remote_desktop_status`:e.type===`enabled`?`desktop_remote_desktop_enable`:`desktop_remote_desktop_permission`,{...e});if(!t||typeof t.supported!=`boolean`||typeof t.enabled!=`boolean`||typeof t.screenRecording!=`string`||typeof t.accessibility!=`boolean`||typeof t.helperAvailable!=`boolean`||typeof t.ready!=`boolean`)throw Error(`invalid_desktop_status`);return t},O=async()=>{if(!C()||!R())return null;try{let e=await D(`desktop_get_launch_at_login`);return!e||typeof e.supported!=`boolean`||typeof e.enabled!=`boolean`?null:e}catch(e){return console.warn(`Failed to get launch at login status`,e),null}},k=async e=>{if(!C()||!R())return null;try{let t=await D(`desktop_set_launch_at_login`,{enabled:e});return!t||typeof t.supported!=`boolean`||typeof t.enabled!=`boolean`?null:t}catch(e){return console.warn(`Failed to set launch at login status`,e),null}},A=async()=>{if(!C()||!R())return null;try{let e=await D(`desktop_get_minimize_to_tray`);return!e||typeof e.supported!=`boolean`||typeof e.enabled!=`boolean`?null:e}catch(e){return console.warn(`Failed to get minimize to tray status`,e),null}},j=async e=>{if(!C()||!R())return null;try{let t=await D(`desktop_set_minimize_to_tray`,{enabled:e});return!t||typeof t.supported!=`boolean`||typeof t.enabled!=`boolean`?null:t}catch(e){return console.warn(`Failed to set minimize to tray status`,e),null}},M=async()=>{if(!C()||!R())return null;try{let e=await D(`desktop_get_keep_awake`);return!e||typeof e.supported!=`boolean`||typeof e.enabled!=`boolean`||typeof e.active!=`boolean`?null:e}catch(e){return console.warn(`Failed to get keep awake status`,e),null}},N=async e=>{if(!C()||!R())return null;try{let t=await D(`desktop_set_keep_awake`,{enabled:e});return!t||typeof t.supported!=`boolean`||typeof t.enabled!=`boolean`||typeof t.active!=`boolean`?null:t}catch(e){return console.warn(`Failed to set keep awake status`,e),null}},P=e=>{let t=e.trim();if(!t)return null;try{return new URL(t).origin}catch{try{return new URL(t.endsWith(`/`)?t:`${t}/`).origin}catch{return null}}},F=e=>{let t=e.trim();if(!t)return null;try{return new URL(t)}catch{try{return new URL(t.endsWith(`/`)?t:`${t}/`)}catch{return null}}},I=e=>e.replace(/^\[|\]$/g,``).toLowerCase(),L=e=>{let t=I(e);return t===`localhost`||t===`127.0.0.1`||t===`::1`},R=()=>{if(typeof window>`u`||!z()||e())return!1;let r=t();if(r.startsWith(`host:`))return!1;if(r===`local`)return!0;let i=typeof window.__YURI_LOCAL_ORIGIN__==`string`?window.__YURI_LOCAL_ORIGIN__:``,a=F(i),o=F(n());if(!o&&a&&u()?.target===`local`)return!0;if(a&&o){if(a.origin===o.origin)return!0;let e=a.port||(a.protocol===`https:`?`443`:`80`),t=o.port||(o.protocol===`https:`?`443`:`80`);return a.protocol===o.protocol&&e===t&&L(a.hostname)&&L(o.hostname)}let s=F(window.location.origin);if(a&&s){if(a.origin===s.origin)return!0;let e=a.port||(a.protocol===`https:`?`443`:`80`),t=s.port||(s.protocol===`https:`?`443`:`80`);return a.protocol===s.protocol&&e===t&&L(a.hostname)&&L(s.hostname)}let c=P(i),l=P(window.location.origin)||window.location.origin;return c&&l&&c===l?!0:!!(s&&L(s.hostname))},z=()=>typeof window>`u`?!1:h(),B=async()=>{if(!z())return!1;try{return await D(`desktop_start_window_drag`),!0}catch{return!1}},V=()=>r()?.runtime?.isVSCode===!0,H=()=>{let e=r()?.runtime?.platform;return e===`web`?!0:e===`desktop`||e===`vscode`?!1:!V()},U=async()=>{if(typeof window<`u`){let e=window.__YURI_HOME__;if(e&&e.length>0)return e}return null},ne=async e=>{if(S()&&R())try{let e=await m()?.openDialog?.({directory:!0,multiple:!1,title:`Select Working Directory`});return!e||typeof e!=`string`?{success:!1,error:`Directory selection cancelled`}:{success:!0,path:e}}catch(e){return console.warn(`Failed to request directory access`,e),{success:!1,error:e instanceof Error?e.message:String(e)}}return{success:!0,path:e}},W=e=>typeof e==`object`&&!!e&&!Array.isArray(e),G=async e=>{if(S()&&R())try{let t=await m()?.openDialog?.({directory:!1,multiple:!1,title:`Select File`,returnGrant:!0,...e?.filters?{filters:e.filters}:{},...e?.defaultPath?{defaultPath:e.defaultPath}:{}});if(!t)return{success:!1,error:`File selection cancelled`};if(typeof t==`string`)return{success:!0,path:t};if(!W(t))return{success:!1,error:`File selection cancelled`};let n=typeof t.path==`string`?t.path:``;return n?{success:!0,path:n,outsideFileGrant:typeof t.outsideFileGrant==`string`?t.outsideFileGrant:void 0}:{success:!1,error:`File selection cancelled`}}catch(e){return console.warn(`Failed to request file access`,e),{success:!1,error:e instanceof Error?e.message:String(e)}}return{success:!1,error:`Native file picker not available`}},K=async e=>{let t=typeof e==`string`?e.trim():``;if(!t)return{success:!1,error:`Path is required`};if(!S()||!R())return{success:!1,error:`Native file access not available`};try{let e=await m()?.grantFileAccess?.(t);if(!W(e))return{success:!1,error:`File access was not granted`};let n=typeof e.path==`string`?e.path:``,r=typeof e.outsideFileGrant==`string`?e.outsideFileGrant:``;return!n||!r?{success:!1,error:`File access was not granted`}:{success:!0,path:n,outsideFileGrant:r}}catch(e){return console.warn(`Failed to request existing file access`,e),{success:!1,error:e instanceof Error?e.message:String(e)}}},q=async e=>({success:!0}),J=async e=>({success:!0}),Y=async e=>{if(!S())throw Error(`Desktop update checker is unavailable`);let t=await D(`desktop_check_for_updates`,{channelOverride:e});if(!t)throw Error(`Desktop update checker returned no result`);return t},X=async e=>{S()&&await D(`desktop_ota_ready`,{version:e})},Z=()=>D(`desktop_get_app_version`),re=async e=>{let t=m();return typeof t?.listen==`function`?t.listen(`yuri:update-progress`,t=>{let n=t?.payload;if(!n||typeof n!=`object`)return;let r=n;e({event:typeof r.event==`string`?r.event:void 0,data:r.data&&typeof r.data==`object`?r.data:void 0})}):null},ie=async e=>{let t=m();return typeof t?.listen==`function`?t.listen(`yuri:update-ready`,t=>{let n=t?.payload;if(!n||typeof n!=`object`)return;let r=n;e({version:typeof r.version==`string`?r.version:null,downloaded:r.downloaded===!0})}):null},ae=async e=>{if(!S())return!1;let t=m(),n=null,r=0,i;try{return typeof e==`function`&&t?.listen&&(n=await t.listen(`yuri:update-progress`,t=>{let n=t?.payload;if(!n||typeof n!=`object`)return;let a=n,o=typeof a.event==`string`?a.event:null,s=a.data&&typeof a.data==`object`?a.data:null;if(o===`Started`){r=0,i=typeof s?.contentLength==`number`?s.contentLength:void 0,e({downloaded:r,total:i});return}if(o===`Progress`){let t=s?.downloaded,n=s?.total;typeof t==`number`&&(r=t),typeof n==`number`&&(i=n),e({downloaded:r,total:i});return}o===`Finished`&&e({downloaded:r,total:i})})),await D(`desktop_download_and_install_update`),!0}catch(e){throw e instanceof Error?e:Error(String(e))}finally{if(n)try{let e=n();e instanceof Promise&&await e}catch{}}},oe=async()=>S()?Q({applyUpdate:!0}):!1,Q=async({applyUpdate:e=!1}={})=>{if(!S())return!1;try{return await D(`desktop_restart`,e?{applyUpdate:!0}:void 0),!0}catch(e){return console.warn(`Failed to restart desktop app`,e),!1}},se=async()=>{if(!S()||!R())return null;try{let e=await D(`desktop_get_lan_address`);return typeof e==`string`&&e.trim().length>0?e.trim():null}catch(e){return console.warn(`Failed to get desktop LAN address`,e),null}},$=async(e,t)=>{if(!S()||!R())return!1;let n=e?.trim();if(!n)return!1;try{return await D(`desktop_open_path`,{path:n,app:typeof t==`string`&&t.trim().length>0?t.trim():void 0}),!0}catch(e){return console.warn(`Failed to open path`,e),!1}},ce=async e=>{if(!S()||!R())return null;let t=e?.trim();if(!t)return null;try{let e=await D(`desktop_is_binary_path`,{path:t});return typeof e==`boolean`?e:null}catch{return null}},le=async e=>{if(!S()||!R())return!1;let t=e?.trim();if(!t)return!1;try{return await D(`desktop_reveal_path`,{path:t}),!0}catch{return $(t)}},ue=async(e,t)=>{if(!S()||!R())return null;let n=e?.trim();if(!n)return null;try{let e=await D(`desktop_save_markdown_file`,{defaultFileName:n,content:t});return typeof e==`string`&&e.trim().length>0?e:null}catch(e){return console.warn(`Failed to save markdown file`,e),null}},de=async(e,n,r,i)=>{if(!S()||!i&&!R())return!1;if(i)return t()===`host:${i}`&&(await D(`desktop_open_ssh_in_app`,{projectPath:e,appId:n,hostId:i}),!0);let a=e?.trim(),o=n?.trim(),s=r?.trim();if(!a||!o||!s)return!1;try{return await D(`desktop_open_in_app`,{projectPath:a,appId:o,appName:s}),!0}catch(e){return console.warn(`Failed to open project in app`,e),!1}},fe=async(e,t,n)=>{if(!S()||!R())return!1;let r=e?.trim(),i=t?.trim(),a=n?.trim();if(!r||!i||!a)return!1;try{return await D(`desktop_open_file_in_app`,{filePath:r,appId:i,appName:a}),!0}catch(e){return console.warn(`Failed to open file in app`,e),!1}},pe=async(e,t)=>{if(!S())return{apps:[],success:!1,hasCache:!1,isCacheStale:!1};if(v()===`linux`)return{apps:[],success:!0,hasCache:!1,isCacheStale:!1};let n=Array.isArray(e)?e.filter(e=>typeof e==`string`):[];if(n.length===0)return{apps:[],success:!0,hasCache:!1,isCacheStale:!1};try{let e=await D(`desktop_get_installed_apps`,{apps:n,force:t===!0||void 0});if(!e||typeof e!=`object`)return{apps:[],success:!1,hasCache:!1,isCacheStale:!1};let r=e;return r.supported===!1?{apps:[],success:!0,hasCache:!1,isCacheStale:!1}:Array.isArray(r.apps)?{apps:r.apps.filter(e=>e&&typeof e==`object`).map(e=>{let t=e;return{name:typeof t.name==`string`?t.name:``,iconDataUrl:typeof t.iconDataUrl==`string`?t.iconDataUrl:null}}).filter(e=>e.name.length>0),success:!0,hasCache:r.hasCache===!0,isCacheStale:r.isCacheStale===!0}:{apps:[],success:!1,hasCache:!1,isCacheStale:!1}}catch(e){return console.warn(`Failed to fetch installed apps`,e),{apps:[],success:!1,hasCache:!1,isCacheStale:!1}}};export{fe as A,ue as B,h as C,re as D,H as E,G as F,B as G,k as H,x as I,c as J,J as K,Q as L,de as M,ne as N,ie as O,K as P,l as Q,oe as R,z as S,V as T,j as U,N as V,q as W,u as X,f as Y,s as Z,v as _,ae as a,ce as b,w as c,M as d,se as f,_ as g,E as h,te as i,$ as j,X as k,T as l,A as m,C as n,pe as o,O as p,y as q,Y as r,Z as s,ee as t,U as u,S as v,g as w,R as x,D as y,le as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e}from"./runtime-auth-DBn9yahL.js";import{v as t,y as n}from"./desktop-DLxQTjzu.js";var r=e=>typeof e==`object`&&!!e,i=e=>e.trim().toLowerCase()===`authorization`,a=e=>{if(!r(e))return;let t={};for(let[n,r]of Object.entries(e)){let e=n.trim(),a=typeof r==`string`?r.trim():``;!e||!a||/[\r\n:]/.test(e)||/[\r\n]/.test(a)||i(e)||(t[e]=a)}return Object.keys(t).length>0?t:void 0},o=`connect-link`,s=e=>!!(e.clientToken&&(e.source===`connect-link`||e.relay)),c=(e,t)=>e.source===`connect-link`||e.relay?!0:t.has(e.id),l=(e,t)=>!t.has(e.id)&&c(e,t),u=e=>`relay://${e}`,d=e=>{if(!r(e))return null;let t=_(e,`relayUrl`)||_(e,`relay_url`),n=_(e,`serverId`)||_(e,`server_id`),i=e.hostEncPubJwk??e.host_enc_pub_jwk;return!t||!n||!r(i)?null:{relayUrl:t,serverId:n,hostEncPubJwk:i}},f=/^(t|.*(?:token|auth|secret|api).*)$/i,p=e=>{let t=e.trim();if(!t)return null;try{let e=new URL(t);return e.protocol!==`http:`&&e.protocol!==`https:`?null:t.split(`#`)[0]||null}catch{return null}},m=e=>{let t=p(e);if(!t)return null;try{let e=new URL(t);if((e.pathname.replace(/\/+$/,``)||`/`)===`/connect`&&e.searchParams.has(`t`))return{persistedUrl:e.origin,redeemUrl:e.toString(),kind:`tunnel-connect-link`}}catch{return null}return{persistedUrl:t,redeemUrl:null,kind:`normal-host`}},h=e=>{let t=p(e);if(!t)return e;try{let e=new URL(t);(e.username||e.password)&&(e.username=``,e.password=``);let n=Array.from(new Set(Array.from(e.searchParams.keys())));for(let t of n)f.test(t)&&e.searchParams.set(t,`[REDACTED]`);return e.toString()}catch{return t}},g=(e,t)=>{let n=p(e),r=p(t);if(!n||!r)return!1;try{let e=new URL(n),t=new URL(r);if(e.origin!==t.origin||t.search&&e.search!==t.search)return!1;let i=t.pathname.length>1?t.pathname.replace(/\/+$/,``):t.pathname,a=e.pathname.length>1?e.pathname.replace(/\/+$/,``):e.pathname;return i===`/`||a===i||a.startsWith(`${i}/`)}catch{return!1}},_=(e,t)=>{let n=e[t];return typeof n==`string`?n:null},v=(e,t)=>{let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:null},y=e=>{if(!r(e))return null;let t=_(e,`id`),n=_(e,`label`),i=_(e,`url`),s=_(e,`apiUrl`)||_(e,`api_url`),c=_(e,`clientToken`)||_(e,`client_token`),l=a(e.requestHeaders),u=d(e.relay),f=_(e,`source`)===`connect-link`?o:void 0;return!t||!n||!i&&!u?null:{id:t,label:n,url:i||``,...s?{apiUrl:s}:{},...c?{clientToken:c}:{},...l?{requestHeaders:l}:{},...u?{relay:u}:{},...f?{source:f}:{}}},b=e=>p(e.apiUrl||e.url)||e.apiUrl||e.url,x=()=>t()?(e,t)=>n(e,t):null,S=async()=>{let e=x();if(!e)return{hosts:[],defaultHostId:null,initialHostChoiceCompleted:!1};let t=await e(`desktop_hosts_get`);if(!r(t))return{hosts:[],defaultHostId:null,initialHostChoiceCompleted:!1};let n=t.hosts,i=Array.isArray(n)?n.map(y).filter(e=>!!e):[],a=_(t,`defaultHostId`)||_(t,`default_host_id`)||_(t,`defaultHostID`),o=t.initialHostChoiceCompleted===!0||t.initial_host_choice_completed===!0,s=_(t,`localOrigin`)||_(t,`local_origin`),c=Array.isArray(t.sshHostIds)?t.sshHostIds.filter(e=>typeof e==`string`&&i.some(t=>t.id===e)):void 0;return{hosts:i,defaultHostId:a,initialHostChoiceCompleted:o,localOrigin:s,...c?{sshHostIds:c}:{}}},C=async e=>{let t=x();if(!t)return;let n={hosts:e.hosts,defaultHostId:e.defaultHostId,initialHostChoiceCompleted:e.initialHostChoiceCompleted};e.localClientToken!==void 0&&(n.localClientToken=e.localClientToken),await t(`desktop_hosts_set`,{input:n})},w=async e=>{let t=x();if(!t)throw Error(`Desktop host preparation is unavailable`);let n=y(await t(`desktop_host_prepare`,{hostId:e.id}));if(!n||n.id!==e.id)throw Error(`Invalid prepared desktop host`);return n},T=async()=>{let e=x();if(!e)throw Error(`Local host settings are unavailable`);await e(`desktop_open_local_host_settings`)},E=async()=>{let e=x();if(!e)return``;let t=await e(`desktop_local_client_token_get`).catch(()=>null);return typeof t==`string`?t.trim():``},D=async()=>{let e=x();if(!e)return``;let t=await e(`desktop_install_id_get`).catch(()=>null);return typeof t==`string`?t.trim():``},O=8e3,k=async(t,n)=>{let r=e({relayUrl:t.relayUrl,serverId:t.serverId,hostEncPubJwk:t.hostEncPubJwk}),i=Date.now(),a=!1,o;try{let e=await Promise.race([(async()=>{let e=await r.fetch(`/auth/session`,{headers:n?.clientToken?{Authorization:`Bearer ${n.clientToken}`}:{}});return{response:e,payload:e.ok?await e.json().catch(()=>null):null}})(),new Promise(e=>{o=setTimeout(()=>e(null),O)})]),t=e?.response;return t?.status===401||t?.status===403?{status:`auth`,latencyMs:Math.max(0,Date.now()-i)}:t?.ok?e?.payload?.authenticated===!0?(a=n?.keepTunnel===!0,{status:`ok`,latencyMs:Math.max(0,Date.now()-i),...a?{tunnel:r}:{}}):{status:`auth`,latencyMs:Math.max(0,Date.now()-i)}:{status:`unreachable`,latencyMs:0}}catch{return{status:`unreachable`,latencyMs:0}}finally{o!==void 0&&clearTimeout(o),a||r.close()}},A=async(e,t)=>{let n=x();if(!n)return{status:`unreachable`,latencyMs:0};let i=await n(`desktop_host_probe`,{url:e,clientToken:t?.clientToken||void 0,requestHeaders:t?.requestHeaders||void 0,expectedServerId:t?.expectedServerId||void 0});if(!r(i))return{status:`unreachable`,latencyMs:0};let a=i.status;return{status:a===`ok`||a===`auth`||a===`update-recommended`||a===`incompatible`||a===`wrong-service`||a===`unreachable`?a:`unreachable`,latencyMs:v(i,`latencyMs`)??v(i,`latency_ms`)??0}},j=async(e,t)=>{let n=x();n&&await n(`desktop_new_window_at_url`,{url:e,clientToken:t?.clientToken||void 0,requestHeaders:t?.requestHeaders||void 0})},M=async e=>{let t=x();t&&await t(`desktop_new_window_for_host`,{hostId:e})};export{k as _,D as a,m as b,j as c,b as d,s as f,p as g,g as h,C as i,M as l,c as m,A as n,E as o,l as p,S as r,T as s,o as t,w as u,h as v,u as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./runtime-auth-DBn9yahL.js";import{l as t,n,r,t as i}from"./runtime-switch-DEZ1K7qW.js";import{n as a}from"./runtime-fetch-D0YWp3FJ.js";import{C as o,X as s}from"./desktop-DLxQTjzu.js";import{_ as c,d as l,f as u,g as d,i as f,n as p,r as m,u as h}from"./desktopHosts-Dk0D5ATF.js";var g=e=>e!==`ok`&&e!==`update-recommended`,_=e=>e.id===`local`?`local`:`host:${e.id}`,v=e=>r()===_(e),y=async(n,r)=>{if(!o())return{ok:!1,status:{status:`unreachable`,latencyMs:0},reason:`unsupported`};n=await h(n);let i=d(l(n))||``;if(!i&&!n.relay)return{ok:!1,status:{status:`unreachable`,latencyMs:0},reason:`unreachable`};let a=(r,i)=>{i&&e({relayUrl:r.relayUrl,serverId:r.serverId,hostEncPubJwk:r.hostEncPubJwk},i),t({apiBaseUrl:E(),clientToken:n.clientToken||null,runtimeKey:_(n),relay:r}),O(n.id)},s=e=>{t({apiBaseUrl:e,clientToken:n.clientToken||null,requestHeaders:n.requestHeaders||null,runtimeKey:_(n)})},u={status:`unreachable`,latencyMs:0},f=null,m;if(i){let e=await p(i,{clientToken:n.clientToken||null,requestHeaders:n.requestHeaders||null,expectedServerId:n.relay?.serverId||null}).catch(()=>({status:`unreachable`,latencyMs:0}));u={status:e.status,latencyMs:e.latencyMs},g(e.status)||(f=`direct`)}if(!f&&n.relay){let e=await c(n.relay,{keepTunnel:!0,clientToken:n.clientToken||null}).catch(()=>({status:`unreachable`,latencyMs:0}));e.status===`ok`?(u={status:e.status,latencyMs:e.latencyMs,via:`relay`},f=`relay`,m=`tunnel`in e?e.tunnel:void 0):(!i||e.status===`auth`)&&(u={status:e.status,latencyMs:e.latencyMs})}return f?f===`relay`&&n.relay?(a(n.relay,m),{ok:!0,via:`relay`,status:u}):(s(i),{ok:!0,via:`direct`,status:u}):{ok:!1,status:u,reason:`unreachable`}},b=5e3,x=1500,S=e=>e===`ok`||e===`update-recommended`,C=!1,w=()=>{if(typeof window>`u`)return``;let e=window.__YURI_LOCAL_ORIGIN__;return typeof e==`string`?e.trim():``},T=e=>{if(!e||e===`null`)return!1;try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&t.origin!==`null`}catch{return!1}},E=()=>{if(typeof window>`u`)return``;let e=window.location.origin;if(T(e))return e;let t=w();return T(t)?t:``},D=async e=>{if(!o()||C)return;let i=`host:${e}`;if(r()!==i)return;let s=n(),c=()=>r()===i&&n()===s;C=!0;try{let n=await m().catch(()=>null);if(!c())return;let r=n?.hosts.find(t=>t.id===e);if(!n||!r?.relay)return;let o=r.apiUrl?d(r.apiUrl):null;if(o&&o.startsWith(`https://`))return;let s=await a(`/api/client-auth/connection/candidates`).catch(()=>null);if(!s?.ok)return;let l=await s.json().catch(()=>null);if(!c()||!l||l.serverId!==r.relay.serverId)return;let u=Array.isArray(l.candidates)?l.candidates:[],h=[];for(let e of u){if(!e||typeof e!=`object`)continue;let t=e;if(t.type!==`lan`||typeof t.url!=`string`)continue;let n=d(t.url);n&&!h.includes(n)&&h.push(n)}if(h.length===0)return;let g=o&&h.includes(o)?o:h[0];if(g!==o&&await f({hosts:n.hosts.map(t=>t.id===e?{...t,apiUrl:g}:t),defaultHostId:n.defaultHostId,initialHostChoiceCompleted:n.initialHostChoiceCompleted}).catch(()=>void 0),!c()||!S((await p(g,{clientToken:r.clientToken||null,requestHeaders:r.requestHeaders||null,expectedServerId:r.relay.serverId}).catch(()=>({status:`unreachable`,latencyMs:0}))).status)||!c())return;t({apiBaseUrl:g,clientToken:r.clientToken||null,requestHeaders:r.requestHeaders||null,runtimeKey:i})}finally{C=!1}},O=e=>{typeof window>`u`||window.setTimeout(()=>{D(e).catch(()=>void 0)},b)},k=async a=>{if(!o())return;let f=r(),g=n(),v=()=>r()===f&&n()===g,y=await m().catch(()=>null);if(!y||!v())return;let b=s(),C=b?.target===`remote`?b.hostId:b?.target===`local`?`local`:null,w=a||C||(y.defaultHostId===`local`?null:y.defaultHostId);if(!w)return;let T=y.hosts.find(e=>e.id===w);if(!T)return;let D=_(T);if(r()===D)return;if(!T.relay){let e=d(l(T));e&&d(i())===e&&(!b||b.status===`ok`)&&t({apiBaseUrl:e,clientToken:T.clientToken||null,requestHeaders:T.requestHeaders||null,runtimeKey:D});return}let k=null,A=!1,j=async n=>{let r=n.apiUrl||!n.relay?d(l(n)):null;if(r){let e,i=await Promise.race([p(r,{clientToken:n.clientToken||null,requestHeaders:n.requestHeaders||null,expectedServerId:n.relay?.serverId}).catch(()=>null),new Promise(t=>{e=setTimeout(()=>t(null),x)})]).finally(()=>{e!==void 0&&clearTimeout(e)});if(!v())return!1;if(i?.status===`auth`&&u(n)&&(k=n.clientToken||null),i&&S(i.status))return t({apiBaseUrl:r,clientToken:n.clientToken||null,requestHeaders:n.requestHeaders||null,runtimeKey:D}),!0}if(!n.relay||!v())return!1;let i=await c(n.relay,{keepTunnel:!0,clientToken:n.clientToken||null});return v()?(i.status===`auth`&&u(n)&&(k=n.clientToken||null),i.status!==`ok`||!i.tunnel?!1:(e(n.relay,i.tunnel),t({apiBaseUrl:E(),clientToken:n.clientToken||null,runtimeKey:D,relay:n.relay}),O(n.id),!0)):(i.tunnel?.close(),!1)};try{if(await j(T)||!v()||(T=await h(T),!v())||await j(T)||!v())return;throw A=!0,Error(`Remote instance is unreachable after initialization`)}catch(e){throw v()&&(window.__YURI_DESKTOP_BOOT_OUTCOME__={target:`remote`,status:A&&k&&k===T.clientToken?`pairing-expired`:`unreachable`,hostId:w,url:l(T)}),e}};export{y as i,v as n,_ as r,k as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.js","assets/rolldown-runtime-hePW80VL.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{S as t,T as n}from"./desktop-
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{S as t,T as n}from"./desktop-DLxQTjzu.js";import{st as r}from"./vendor-base-ui-CzHs0bHY.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{n as i}from"./vendor-react-DlzBev0S.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as o}from"./platform-h8km2dnF.js";var s=e(r(),1),c=i(),l=.85,u=1.2,d=10/9*1.05,f=.9,p=1.029,m=p/f,h=`yuri.designPtScale.v9`;function g(e){return!Number.isFinite(e)||e<=0?1:Math.min(u,Math.max(l,e))}function _(e){if(!e)return p;let t=e.density,n=(e.xdpi+e.ydpi)/2;if(!(t>0)||!(n>=50)||n>800)return p;let r=g(n/t/163);return Math.min(p,r*m)}function v(){if(typeof window>`u`)return 1;try{let e=Number.parseFloat(window.localStorage.getItem(`yuri.designPtScale.v9`)??``),t=window.Capacitor?.getPlatform?.();return t===`android`?!Number.isFinite(e)||e<=0?p:Math.min(p,g(e)):t===`ios`?d:g(e)}catch{return 1}}function y(e){if(!(typeof window>`u`))try{window.localStorage.setItem(h,String(e))}catch{}}function b(e,t=document.documentElement){let n=g(e);t.style.setProperty(`--dpt`,`${n}px`),t.style.setProperty(`--dpt-n`,String(n))}async function x(){if(typeof document>`u`)return 1;b(v());let{Capacitor:e,registerPlugin:t}=await a(async()=>{let{Capacitor:e,registerPlugin:t}=await import(`./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js`).then(e=>e.i);return{Capacitor:e,registerPlugin:t}},__vite__mapDeps([0,1]));if(!e.isNativePlatform())return b(1),1;if(e.getPlatform()===`ios`)return b(d),y(d),d;if(e.getPlatform()!==`android`)return b(1),1;if(!e.isPluginAvailable(`YuriPhysicalScale`))return b(p),y(p),p;try{let e=_(await t(`YuriPhysicalScale`).getMetrics());return y(e),b(e),e}catch{return b(p),y(p),p}}var S=({screenWidth:e,...t})=>t,C={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},w={isMobile:!1,isTablet:!1,isDesktop:!0,deviceType:`desktop`,screenWidth:1024,breakpoint:`lg`,hasTouchInput:!1,hasTouchOnlyPointer:!1},T=S(w),E=()=>typeof window>`u`?!1:new URLSearchParams(window.location.search).get(`surface`)===`desktop`,D=e=>{if(typeof navigator>`u`)return{isExplicitTablet:!1};let t=navigator.userAgent||``,n=navigator.platform||``,r=/iPad/i.test(t)||(/Macintosh|MacIntel/i.test(t)||/MacIntel/i.test(n))&&e>1,i=/Android/i.test(t)&&!/Mobile/i.test(t),a=/Tablet/i.test(t);return{isExplicitTablet:r||i||a}},O=(e,t,n)=>{if(typeof window>`u`)return;let r=document.documentElement,i=t===`mobile`,a=t===`tablet`,o=(e,t)=>{r.classList.contains(e)!==t&&r.classList.toggle(e,t)},s=(e,t)=>{r.style.getPropertyValue(e)!==t&&r.style.setProperty(e,t)};o(`device-mobile`,i),o(`device-tablet`,a),o(`device-desktop`,t===`desktop`),o(`desktop-runtime`,e),o(`mobile-pointer`,!e&&n),e?(s(`--is-mobile`,`0`),s(`--device-type`,`desktop`),s(`--font-scale`,`1`),s(`--has-coarse-pointer`,`0`),s(`--has-touch-input`,`0`)):(s(`--is-mobile`,i?`1`:`0`),s(`--device-type`,t),s(`--font-scale`,i?`0.9`:a?`0.95`:`1`),s(`--has-coarse-pointer`,n?`1`:`0`),s(`--has-touch-input`,n?`1`:`0`));let c=e?1:v();(r.style.getPropertyValue(`--dpt`)!==`${c}px`||r.style.getPropertyValue(`--dpt-n`)!==String(c))&&b(c,r)};function k(){let e=window.innerWidth,r=typeof window.matchMedia==`function`,i=r?window.matchMedia(`(pointer: coarse)`):null,a=r?window.matchMedia(`(hover: none)`):null,s=i?.matches??!1,c=a?.matches??!1,l=typeof navigator<`u`?navigator.maxTouchPoints??0:0,u=t()||n()||E(),{isExplicitTablet:d}=D(l),f=s||c||l>0,p=s||c,m=e>C.md&&e<=C.lg,h=e<=C.md,g=f&&h,_=f&&!g&&(m||d),v=!f||!_&&e>C.lg,y=`desktop`;u?(g=!1,_=!1,v=!0,y=`desktop`):o()?(g=!0,_=!1,v=!1,y=`mobile`):g?y=`mobile`:_?y=`tablet`:(v=!0,y=`desktop`),O(u,y,f);let b=`xs`;for(let[t,n]of Object.entries(C))e>=n&&(b=t);return{isMobile:g,isTablet:_,isDesktop:v,deviceType:y,screenWidth:e,breakpoint:b,hasTouchInput:f,hasTouchOnlyPointer:p}}var A=(e,t)=>e.isMobile===t.isMobile&&e.isTablet===t.isTablet&&e.isDesktop===t.isDesktop&&e.deviceType===t.deviceType&&e.breakpoint===t.breakpoint&&e.hasTouchInput===t.hasTouchInput&&e.hasTouchOnlyPointer===t.hasTouchOnlyPointer,j=new Set,M=new Set,N=null,P=null,F,I=null,L=()=>typeof window>`u`?w:(N||=k(),N),R=()=>typeof window>`u`?T:(P||=S(L()),P),z=()=>{F=void 0;let e=k(),t=!P||!A(P,e);if(!(!t&&N?.screenWidth===e.screenWidth)){if(N=e,t){P=S(e);for(let e of M)e()}for(let e of j)e()}},B=()=>{typeof window>`u`||F!==void 0||(F=window.requestAnimationFrame(z))},V=(e,t)=>e?typeof e.addEventListener==`function`?(e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)):typeof e.addListener==`function`?(e.addListener(t),()=>e.removeListener(t)):()=>{}:()=>{},H=()=>{if(typeof window>`u`)return()=>{};z(),window.addEventListener(`resize`,B);let e=typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null,t=typeof window.matchMedia==`function`?window.matchMedia(`(hover: none)`):null,n=V(e,B),r=V(t,B);return()=>{window.removeEventListener(`resize`,B),n(),r(),F!==void 0&&(window.cancelAnimationFrame(F),F=void 0)}},U=(e,t)=>typeof window>`u`?()=>{}:(e.add(t),I||=H(),()=>{e.delete(t),j.size===0&&M.size===0&&I&&(I(),I=null,N=null,P=null)}),W=e=>U(j,e),G=e=>U(M,e);function K(){if(typeof window>`u`||typeof window<`u`&&t())return!1;let e=document.documentElement,n=e.style.getPropertyValue(`--is-mobile`)||getComputedStyle(e).getPropertyValue(`--is-mobile`);return n===`1`||n===`true`}var q=()=>typeof window>`u`?!1:!!(navigator.standalone===!0||window.matchMedia?.(`(display-mode: standalone)`)?.matches||window.matchMedia?.(`(display-mode: fullscreen)`)?.matches),J=()=>{if(typeof window>`u`||t())return!1;let e=typeof navigator<`u`?navigator.maxTouchPoints??0:0;return q()&&e>0&&window.innerWidth>C.md};function Y(){let e=(0,c.c)(2),[t,n]=s.useState(X),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`)return;let e=()=>n(J()),t=window.matchMedia?.(`(display-mode: standalone)`),r=window.matchMedia?.(`(display-mode: fullscreen)`);e(),window.addEventListener(`resize`,e),window.addEventListener(`focus`,e);let i=t=>{t&&(typeof t.addEventListener==`function`?t.addEventListener(`change`,e):typeof t.addListener==`function`&&t.addListener(e))},a=t=>{t&&(typeof t.removeEventListener==`function`?t.removeEventListener(`change`,e):typeof t.removeListener==`function`&&t.removeListener(e))};return i(t),i(r),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`focus`,e),a(t),a(r)}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),s.useEffect(r,i),t}function X(){return J()}var Z=()=>typeof window>`u`?`portrait`:window.matchMedia?.(`(orientation: landscape)`)?.matches?`landscape`:`portrait`;function Q(){let e=(0,c.c)(2),[t,n]=s.useState(Z),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(orientation: landscape)`),t=()=>n(e.matches?`landscape`:`portrait`);return t(),V(e,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),s.useEffect(r,i),t}function $(e){let t=(0,c.c)(2),n;return t[0]===e?.includeScreenWidth?n=t[1]:(n=()=>e?.includeScreenWidth?w:T,t[0]=e?.includeScreenWidth,t[1]=n),s.useSyncExternalStore(e?.includeScreenWidth?W:G,e?.includeScreenWidth?L:R,n)}export{Y as a,Q as i,K as n,x as o,$ as r,k as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{Jn as r}from"./useMobileNavigationStore-l2L-r3RJ.js";import{t as i}from"./vendor-react-drawio-Dyg1-39Q.js";var a=e(n(),1),o=t(),s=`<mxfile><diagram id="new" name="Page-1"><mxGraphModel dx="0" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel></diagram></mxfile>`;function c(){if(typeof document>`u`)return!1;let e=document.documentElement.getAttribute(`data-theme`);return e===`dark`||!e&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}var l=a.forwardRef(function({xml:e,readOnly:t,className:n,onChange:l},u){let d=a.useRef(e),f=a.useRef(null),p=a.useRef(!1),[m,h]=a.useState(c),g=a.useRef(e),_=a.useRef(e);_.current!==e&&(_.current=e,g.current=e,d.current=e);let v=a.useRef(m);v.current!==m&&(v.current=m,g.current=d.current);let y=a.useRef(null);a.useEffect(()=>{let e=()=>h(c());e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]}),()=>t.disconnect()},[]),a.useEffect(()=>{let e=setTimeout(()=>{y.current?.querySelector(`.diagrams-iframe`)?.focus()},600);return()=>clearTimeout(e)},[]),a.useImperativeHandle(u,()=>({getXml:()=>d.current}));let b=a.useCallback(()=>{!e&&!p.current&&(p.current=!0,setTimeout(()=>{f.current?.template({})},500))},[e]),x=a.useCallback(e=>{d.current=e.xml,l?.(e.xml)},[l]);return(0,o.jsx)(`div`,{ref:y,className:r(`h-full w-full`,n),children:(0,o.jsx)(i,{ref:f,xml:g.current||s,autosave:!0,urlParameters:{ui:t?`simple`:m?`dark`:`kennedy`,spin:!0,libraries:!t,chrome:t,nav:t,layers:t,noSaveBtn:!0,noExitBtn:!0,saveAndExit:!1},onLoad:b,onAutoSave:x},m?`dark`:`light`)})});export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,Q as n,X as r,Z as i,et as a,nt as o,ot as s,rt as c,st as l,tt as u}from"./vendor-base-ui-CzHs0bHY.js";import{n as d}from"./vendor-react-DlzBev0S.js";import{Jn as f,Va as p}from"./useMobileNavigationStore-l2L-r3RJ.js";import{n as m}from"./Icon-3udlHlix.js";var h=e(l(),1),g=d(),_=s(),v=0;function y(e,t){return e&&h.isValidElement(t)?{render:t}:{children:t}}function b(e){let t=(0,g.c)(4),r;t[0]===e?r=t[1]:({...r}=e,t[0]=e,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,_.jsx)(n,{...r}),t[2]=r,t[3]=i),i}function x(e){let t=(0,g.c)(10),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({asChild:n,children:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o;t[4]!==n||t[5]!==i?(o=y(n,i),t[4]=n,t[5]=i,t[6]=o):o=t[6];let s=o,c;return t[7]!==a||t[8]!==s?(c=(0,_.jsx)(r,{"data-slot":`dialog-trigger`,...a,...s}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function S(e){let n=(0,g.c)(4),r;n[0]===e?r=n[1]:({...r}=e,n[0]=e,n[1]=r);let i;return n[2]===r?i=n[3]:(i=(0,_.jsx)(t,{...r}),n[2]=r,n[3]=i),i}var C=h.forwardRef((e,t)=>{let n=(0,g.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[3]=a):a=n[3],h.useEffect(A,a);let o=t,s;n[4]===r?s=n[5]:(s=f(`app-region-no-drag fixed inset-0 z-50 bg-black/50 dark:bg-black/75`,`transition-opacity duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[ending-style]:opacity-0`,r),n[4]=r,n[5]=s);let l;return n[6]!==i||n[7]!==o||n[8]!==s?(l=(0,_.jsx)(c,{ref:o,"data-slot":`dialog-overlay`,className:s,...i}),n[6]=i,n[7]=o,n[8]=s,n[9]=l):l=n[9],l});C.displayName=`DialogOverlay`;function w(e){let t=(0,g.c)(33),n,r,i,s,c,l,u;t[0]===e?(n=t[1],r=t[2],i=t[3],s=t[4],c=t[5],l=t[6],u=t[7]):({className:r,overlayClassName:s,containerClassName:i,children:n,showCloseButton:l,presentation:u,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u);let d=u===void 0?`default`:u,{t:h}=p(),v=l??d!==`picker`,y=d===`picker`&&`bg-transparent dark:bg-transparent`,b;t[8]!==s||t[9]!==y?(b=f(`rounded-none`,y,s),t[8]=s,t[9]=y,t[10]=b):b=t[10];let x;t[11]===b?x=t[12]:(x=(0,_.jsx)(C,{className:b}),t[11]=b,t[12]=x);let w=i??(d===`picker`?`block p-0`:`items-center p-4`),T;t[13]===w?T=t[14]:(T=f(`fixed inset-0 z-50 flex justify-center pointer-events-none`,w),t[13]=w,t[14]=T);let E=d===`picker`&&`yuri-picker-dialog yuri-mobile-overlay-surface yuri-mobile-overlay-surface--translucent yuri-composer-autocomplete-surface fixed left-1/2 top-[10vh] w-[min(42rem,calc(100vw-3rem))] max-w-none -translate-x-1/2 translate-y-0 gap-0 overflow-hidden rounded-3xl border-0 p-0`,D;t[15]!==r||t[16]!==E?(D=f(`app-region-no-drag relative pointer-events-auto bg-background text-foreground flex flex-col w-full max-w-lg max-h-full gap-4 rounded-xl border p-6 shadow-none overflow-y-auto pwa-dialog-content origin-center`,`transition-all duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]`,`data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]`,`data-[nested-dialog-open]:brightness-[0.55] dark:data-[nested-dialog-open]:brightness-[0.4]`,E,r),t[15]=r,t[16]=E,t[17]=D):D=t[17];let O;t[18]!==v||t[19]!==h?(O=v&&(0,_.jsxs)(o,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[open]:bg-interactive-active data-[open]:text-foreground absolute top-2 right-2 rounded-lg opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none text-muted-foreground hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,_.jsx)(m,{name:`close`}),(0,_.jsx)(`span`,{className:`sr-only`,children:h(`dialog.common.actions.close`)})]}),t[18]=v,t[19]=h,t[20]=O):O=t[20];let k;t[21]!==n||t[22]!==d||t[23]!==c||t[24]!==D||t[25]!==O?(k=(0,_.jsxs)(a,{"data-slot":`dialog-content`,"data-state-slot":`dialog`,"data-presentation":d,className:D,...c,children:[n,O]}),t[21]=n,t[22]=d,t[23]=c,t[24]=D,t[25]=O,t[26]=k):k=t[26];let A;t[27]!==k||t[28]!==T?(A=(0,_.jsx)(`div`,{className:T,children:k}),t[27]=k,t[28]=T,t[29]=A):A=t[29];let j;return t[30]!==A||t[31]!==x?(j=(0,_.jsxs)(S,{children:[x,A]}),t[30]=A,t[31]=x,t[32]=j):j=t[32],j}function T(e){let t=(0,g.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=f(`flex flex-col gap-2 text-center sm:text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function E(e){let t=(0,g.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=f(`flex flex-col-reverse gap-2 bottom-safe-area sm:flex-row sm:justify-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(`div`,{"data-slot":`dialog-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function D(e){let t=(0,g.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 a;t[3]===n?a=t[4]:(a=f(`typography-markdown leading-none font-semibold text-foreground`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,_.jsx)(i,{"data-slot":`dialog-title`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function O(e){let t=(0,g.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=f(`text-muted-foreground typography-ui-label`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(u,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function k(){v=Math.max(0,v-1),v===0&&document.documentElement.classList.remove(`yuri-dialog-open`)}function A(){return v+=1,document.documentElement.classList.add(`yuri-dialog-open`),k}export{T as a,E as i,w as n,D as o,O as r,x as s,b as t};
|