@p4code/cli 0.9.18 → 0.9.19
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/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
- package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
- package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
- package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
- package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
- package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BU8mTsuy.mjs} +278 -50
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DzRO6f_z.mjs → binCli-CJGD6FcB.mjs} +297 -125
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
- package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2143 -2131
- package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-dXNVRqH0.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BnTV2LIU.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-BW_NJOn9.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-zR4M88FU.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-DIzrmjXm.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-D9gz0spY.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-BFO1LsJz.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-CflGSI2z.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-B_-tUtQE.js} +2 -2
- package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-CNFGk064.js} +2 -2
- package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-DSw7e3qz.js} +2 -2
- package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-C1endahg.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DGyrlbqz.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-DG3oq8Fl.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-uHFuClfP.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-DJtfqV3f.js} +2 -2
- package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-B4MgXIYY.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-CnWbDLSz.js} +2 -2
- package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-DdZ6n5qP.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-Dg1SR7pz.js +2 -0
- package/dist/client/assets/ChatMarkdown-eJNo9q4b.js +49 -0
- package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +2 -0
- package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-Cny-j-4e.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-C4KEUUA1.js +2 -0
- package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +2 -0
- package/dist/client/assets/ComboboxClear-DI8al7ca.js +2 -0
- package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js} +2 -2
- package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-BOYakQHx.js} +2 -2
- package/dist/client/assets/CompositeRoot-OiiGu5cn.js +2 -0
- package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-D99K7hWK.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-BF6iP9-o.js} +2 -2
- package/dist/client/assets/DevicePanel-BzIRsUjQ.js +2 -0
- package/dist/client/assets/DeviceSetup-DQqwNSXQ.js +2 -0
- package/dist/client/assets/DialogTitle-BNEjkHZl.js +2 -0
- package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-DOn5F9Vx.js} +3 -3
- package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-C7d_tSjH.js} +2 -2
- package/dist/client/assets/DiffPanel-zzTYLQBt.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-CHaL1Ona.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-DZezJSS1.js} +8 -8
- package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-BrYDn6tR.js} +2 -2
- package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-BsOIEd28.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-B07Bu4_g.js} +2 -2
- package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-Ua5R3Une.js} +2 -2
- package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-CAhD0qa4.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-Ptxxfl5h.js} +6 -6
- package/dist/client/assets/FoldedSettingsSection-C-4eZXtv.js +2 -0
- package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-BiCUaNcl.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-MsC8mniI.js} +2 -2
- package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-D8Idteuf.js} +2 -2
- package/dist/client/assets/Input-BtekXNnW.js +2 -0
- package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-Aqwzi0Sz.js} +2 -2
- package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +1 -0
- package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-CkU_KXkd.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-DLs66X2w.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-DNTed1xn.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BOSadp0O.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-qg2nPaOP.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-CQIJcmq4.js} +2 -2
- package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-B_2pC76G.js} +2 -2
- package/dist/client/assets/ModelLiveLayer-BdDN1RwJ.js +3 -0
- package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-DkFZrX8t.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-DF_hOTNF.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-DIDw2XWy.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-DX7_CzKu.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-mHLqolvI.js} +2 -2
- package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-Suig0WTF.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-naPvNZLz.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-D2rgfUAh.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-7rnsehAx.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-0R4z7KQU.js} +2 -2
- package/dist/client/assets/PopoverHandle-BxV9_kh8.js +2 -0
- package/dist/client/assets/PreviewPanel-DCN5UudG.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +2 -0
- package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-DJmxMkvz.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-3Bcbbvvc.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-Bb9wZVNY.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-mgY-tn0M.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-CGySH9bP.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +6 -0
- package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-Ddcb7a4G.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-CUrcvaQB.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-DiLAhy4C.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-DNjP1Gq4.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-BKZPxtjZ.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-CAdpUQd9.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +6 -0
- package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-CjWqxV6P.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-BNGMax5h.js} +2 -2
- package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-F_2AS4sm.js} +2 -2
- package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +2 -0
- package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection-dyJbezur.js} +2 -2
- package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-BwrWyM3f.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DWRYwc9b.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-DpC9Q9ae.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-ByWEF0y2.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-BsP9x4U3.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-BONiqXri.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-CLTZIB-s.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-C7o3GtWa.js} +3 -3
- package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-Bq_XM62t.js} +40 -40
- package/dist/client/assets/ThreadTerminalDrawer-CD5oxZhC.js +5 -0
- package/dist/client/assets/TooltipProvider-DPt8xz_3.js +2 -0
- package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-BS_wwVFT.js} +2 -2
- package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CpDVNtuT.js} +2 -2
- package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-BWztABfX.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-4IVaqPOG.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-BHensDdi.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-CCJOwHlv.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-C9Tpr_np.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-DO1k5hPx.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-DR5ebldd.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-D6Kx02Ci.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-B7xQdu1d.js} +2 -2
- package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-vpRi9ruy.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-BPr-N_Eh.js} +2 -2
- package/dist/client/assets/_chat-B7MuBHoN.js +47 -0
- package/dist/client/assets/{_chat.design-C593M39o.js → _chat.design-JY93KEj-.js} +2 -2
- package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-BLQil4HT.js} +2 -2
- package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-BUUjlaam.js} +3 -3
- package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +2 -0
- package/dist/client/assets/{alert-BdISKl4u.js → alert-Eh-IusVP.js} +2 -2
- package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-BxwvNOYD.js} +2 -2
- package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-Bk8CvVQ5.js} +2 -2
- package/dist/client/assets/assets-w0TTeveX.js +2 -0
- package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-CQgs_U0x.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-BD9wK52f.js} +2 -2
- package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-CDoyvSyH.js} +2 -2
- package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-BOsv4n_B.js} +2 -2
- package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-BJsEk7ze.js} +2 -2
- package/dist/client/assets/{command-CeMH9lgx.js → command-Cg83G2rG.js} +2 -2
- package/dist/client/assets/{connect-CQUjsv6p.js → connect-C7ENaX3L.js} +2 -2
- package/dist/client/assets/connect-agent-BEYL9KOm.js +2 -0
- package/dist/client/assets/{design-BL2REeQ-.js → design-pZfTAgOJ.js} +2 -2
- package/dist/client/assets/{device-DUMKyegd.js → device-CG5GzxuX.js} +2 -2
- package/dist/client/assets/{dialog-BzESHWgr.js → dialog-wBelv1Ac.js} +2 -2
- package/dist/client/assets/diffPanelStore-C8bCQWTi.js +2 -0
- package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-C_l9f0DJ.js} +2 -2
- package/dist/client/assets/{dist--Lo1A95S.js → dist-1X_vspyy.js} +3 -3
- package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-BhYlt4Pu.js} +2 -2
- package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-C9zEhnho.js} +2 -2
- package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic--1QgBotz.js} +3 -3
- package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-B_jWJYkI.js} +2 -2
- package/dist/client/assets/{empty-CeYEMFdG.js → empty-CJnssipy.js} +2 -2
- package/dist/client/assets/entities-CRXY8xy3.js +2 -0
- package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-Bg40qEqI.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-C_MZA2Fb.js} +2 -2
- package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
- package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-PLuWhYlb.js} +2 -2
- package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DNX1FsUO.js} +2 -2
- package/dist/client/assets/index-BeP8Inse.js +3 -0
- package/dist/client/assets/{input-K95B1E2P.js → input-Cd-93Wp0.js} +2 -2
- package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-CsS-Psw7.js} +2 -2
- package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-DB5SHS11.js} +2 -2
- package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-DBugaGH3.js} +2 -2
- package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-8c6T_8yh.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-DtOhACEQ.js} +2 -2
- package/dist/client/assets/{link-B57I0_wC.js → link-BrJlIcQX.js} +2 -2
- package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN6Qis59.js} +2 -2
- package/dist/client/assets/main-CNyrs4J_.js +37 -0
- package/dist/client/assets/main-h6l_SQzg.css +2 -0
- package/dist/client/assets/mediaReference-CJpFszQ0.js +2 -0
- package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-D0cInV6V.js} +2 -2
- package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-BmBrNhLd.js} +2 -2
- package/dist/client/assets/number-field-CSK9SRbZ.js +2 -0
- package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-CFw3_anS.js} +2 -2
- package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-Eqww5SU9.js} +2 -2
- package/dist/client/assets/openFileInPreview-D0wySgTe.js +2 -0
- package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-BBI5SxD4.js} +2 -2
- package/dist/client/assets/{pair-Bc34xPWk.js → pair-DQR36eTM.js} +2 -2
- package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-Dxq1oBH6.js} +2 -2
- package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-DLo78qRr.js} +2 -2
- package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-uaZzWTro.js} +2 -2
- package/dist/client/assets/{popover-CtPuvMeZ.js → popover-DU7x_UNP.js} +2 -2
- package/dist/client/assets/{preview-DIIM6Lws.js → preview-CiDRJw3K.js} +2 -2
- package/dist/client/assets/{preview-CS0uw3GP.js → preview-DpJtvz_q.js} +2 -2
- package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +2 -0
- package/dist/client/assets/primary-B5Ds-X9y.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +2 -0
- package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +2 -0
- package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-BvwaSAI1.js} +2 -2
- package/dist/client/assets/providerSkills-BzFbjrTC.js +2 -0
- package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-D9w_E_Dv.js} +3 -3
- package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-gBL3Yt9x.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CDUFfLmu.js} +2 -2
- package/dist/client/assets/pullRequests-BZ7PzmTm.js +2 -0
- package/dist/client/assets/queries-CzRpIoRQ.js +2 -0
- package/dist/client/assets/query-B8d0w621.js +2 -0
- package/dist/client/assets/radio-group-XlBZKXvU.js +2 -0
- package/dist/client/assets/relay-BWVOLzv_.js +2 -0
- package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-B6SrQg1c.js} +2 -2
- package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-BuudmoUr.js} +2 -2
- package/dist/client/assets/runtime-DYDOkR3G.js +7 -0
- package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DyiI0NS9.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-DK9Z9azP.js} +3 -3
- package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-B1iVi_db.js} +2 -2
- package/dist/client/assets/{select-BtqP8nTL.js → select-Dn3MxyiK.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-D5ELz2sX.js} +2 -2
- package/dist/client/assets/server-DQkamj54.js +2 -0
- package/dist/client/assets/session-A0FOa5Fv.js +2 -0
- package/dist/client/assets/session-logic-21koHfxl.js +27 -0
- package/dist/client/assets/{settings-A-pqSt1Y.js → settings-RZUSGfch.js} +2 -2
- package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-C2NUZQFB.js} +2 -2
- package/dist/client/assets/settings.archived-BOhwFyi3.js +2 -0
- package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-BhT0XlhO.js} +2 -2
- package/dist/client/assets/settings.connections-CVIPNlOU.js +2 -0
- package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-GIrtB4_J.js} +2 -2
- package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-BBnbf4E4.js} +2 -2
- package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-BrpJ4wJk.js} +2 -2
- package/dist/client/assets/settings.diagnostics-H0YPr7JD.js +2 -0
- package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CuMxiE8w.js} +2 -2
- package/dist/client/assets/settings.integrations-bw-NYX6w.js +2 -0
- package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-Mqx8YmX-.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DppmDqdO.js} +2 -2
- package/dist/client/assets/settings.plugins-PhsBK5Nz.js +5 -0
- package/dist/client/assets/settings.projects-DvjxFMyV.js +4 -0
- package/dist/client/assets/settings.providers-DZac28bF.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-_8iDYzJF.js} +2 -2
- package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-B5WZy_fN.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-BThcjeQt.js} +2 -2
- package/dist/client/assets/settings.source-control-Cj9K4HE8.js +2 -0
- package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-D3QQPs1U.js} +2 -2
- package/dist/client/assets/settingsLayout-LNYGC372.js +3 -0
- package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-CCcDCy-Q.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-Bj_Qatcf.js} +2 -2
- package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-dlFZVmO8.js} +2 -2
- package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-Tyc4OKDH.js} +2 -2
- package/dist/client/assets/sourceControlClients-ECBkjM0e.js +2 -0
- package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-fU7Q2OR1.js} +2 -2
- package/dist/client/assets/src-B7vcPG0D.js +15 -0
- package/dist/client/assets/terminal-links-CPJORRle.js +2 -0
- package/dist/client/assets/terminalSessions-B00GvWIU.js +2 -0
- package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CEng2dlo.js} +2 -2
- package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-CcasVi_y.js} +3 -3
- package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-D7P5EX0m.js} +2 -2
- package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-DN8nwGi8.js} +2 -2
- package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-Dx-ruC5S.js} +2 -2
- package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-Da633nbs.js} +2 -2
- package/dist/client/assets/uiStateStore-aIXF8Zlu.js +2 -0
- package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
- package/dist/client/assets/{usage-BJA7zQoS.js → usage-DXoXMoKb.js} +2 -2
- package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-RRnEiTSy.js} +2 -2
- package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-D95Lw1XX.js} +2 -2
- package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-3UXG3hMD.js} +2 -2
- package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-BkSai4ZH.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-rzE7PQnj.js} +2 -2
- package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +2 -0
- package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-D7ZCVKu2.js} +2 -2
- package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-C6_wm78C.js} +2 -2
- package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-iqJmvild.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-CKTZ-MxU.js} +2 -2
- package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-DND-Jy5h.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-DFJ-2rdQ.js} +2 -2
- package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-EARvZG9w.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-DRrQpPhD.js} +3 -3
- package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-Byb-EJOb.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-tXU_0tMY.js} +2 -2
- package/dist/client/assets/useSettings-BOuYsEM0.js +3 -0
- package/dist/client/assets/utils-DsOiwDNN.js +24 -0
- package/dist/client/assets/vcsRefInvalidation-CnjZD1r1.js +2 -0
- package/dist/client/assets/welcome-BgxI7gmD.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
- package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-C_h8Tda3.mjs} +894 -438
- package/dist/{renderer-iWfzRWCX.mjs → renderer-BeTlHpQk.mjs} +2 -2
- package/dist/{runtime-CllDK9QU.mjs → runtime-BUfUqrrw.mjs} +3 -3
- package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-5R-ZfBsl.mjs} +3152 -2949
- package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-DurN_FAN.mjs} +1 -1
- package/dist/{server-vm1eH-y1.mjs → server-DuD96ZSr.mjs} +347 -228
- package/dist/{sha2-9FUhed4s.mjs → sha2-oCwRxj9g.mjs} +13 -7
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
- package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
- package/dist/client/assets/CheckboxIndicator-CLFg8-A1.js +0 -2
- package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
- package/dist/client/assets/CollapsiblePanel-BlUD5mJC.js +0 -2
- package/dist/client/assets/ComboboxClear-DKHwuDAL.js +0 -2
- package/dist/client/assets/CompositeRoot-_C3uLH2F.js +0 -2
- package/dist/client/assets/DevicePanel-Dvozgov3.js +0 -2
- package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
- package/dist/client/assets/DialogTitle-C9j5Tmuy.js +0 -2
- package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
- package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
- package/dist/client/assets/Input-BWhtnCC0.js +0 -2
- package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
- package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
- package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
- package/dist/client/assets/PopoverHandle-BwqnKm9Y.js +0 -2
- package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-rvN_67Gu.js +0 -2
- package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
- package/dist/client/assets/ScheduledTasksSettings-CvbQDrJp.js +0 -6
- package/dist/client/assets/SelectScrollUpArrow-Dj2om6Qx.js +0 -2
- package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
- package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
- package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
- package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
- package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
- package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
- package/dist/client/assets/diffPanelStore-B-hQEy6C.js +0 -2
- package/dist/client/assets/entities-CpJdh0W5.js +0 -2
- package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
- package/dist/client/assets/index-BWKkBtFt.js +0 -3
- package/dist/client/assets/main-C8b9a0ht.js +0 -37
- package/dist/client/assets/main-CCH0X0zL.css +0 -2
- package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
- package/dist/client/assets/number-field-D6t0GpAB.js +0 -2
- package/dist/client/assets/openFileInPreview-DFpXOfx7.js +0 -2
- package/dist/client/assets/previewMiniPlayerStore-oJw0qrRM.js +0 -2
- package/dist/client/assets/primary-B0bbGdiR.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
- package/dist/client/assets/projectFilesQueryState-DpLF9eJd.js +0 -2
- package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
- package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
- package/dist/client/assets/queries-DDAXRF4r.js +0 -2
- package/dist/client/assets/query-DpmTmXUV.js +0 -2
- package/dist/client/assets/radio-group-DSfZzUu8.js +0 -2
- package/dist/client/assets/relay-CnLeC-mg.js +0 -2
- package/dist/client/assets/runtime-DUPVFypn.js +0 -7
- package/dist/client/assets/server-BYnv0CK4.js +0 -2
- package/dist/client/assets/session-BryEqNW-.js +0 -2
- package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
- package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
- package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
- package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
- package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
- package/dist/client/assets/settings.plugins-B6My9wD7.js +0 -5
- package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
- package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
- package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
- package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
- package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
- package/dist/client/assets/src-BZzGU-vc.js +0 -15
- package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
- package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
- package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
- package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
- package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
- package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
- package/dist/client/assets/utils-Cs97wR6T.js +0 -24
- package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
- package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./input-
|
|
2
|
-
//# sourceMappingURL=draft-input-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./input-Cd-93Wp0.js";var a=n(),o=e(t(),1);function s(e,t,n){let r=(0,a.c)(15),[i,s]=(0,o.useState)(null),l=(0,o.useRef)(e),u=i??e,d;r[0]!==i||r[1]!==n||r[2]!==e?(d=t=>{let r=t.target.value;s(n?n(i??e,r):r)},r[0]=i,r[1]=n,r[2]=e,r[3]=d):d=r[3];let f;r[4]===e?f=r[5]:(f=()=>{l.current=e,s(e)},r[4]=e,r[5]=f);let p;r[6]!==i||r[7]!==t||r[8]!==e?(p=()=>{let n=i??e;s(null),n!==l.current&&n!==e&&t(n)},r[6]=i,r[7]=t,r[8]=e,r[9]=p):p=r[9];let m;return r[10]!==u||r[11]!==d||r[12]!==f||r[13]!==p?(m={value:u,onChange:d,onFocus:f,onBlur:p,onKeyDown:c},r[10]=u,r[11]=d,r[12]=f,r[13]=p,r[14]=m):m=r[14],m}function c(e){e.nativeEvent.isComposing||e.keyCode===229||e.key===`Enter`&&(e.preventDefault(),e.target.blur())}var l=e(r(),1);function u(e){let t=(0,a.c)(8),n,r,o,c;t[0]===e?(n=t[1],r=t[2],o=t[3],c=t[4]):({value:c,onCommit:r,normalizeDraft:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=c);let u=s(c,r,n),d;return t[5]!==u||t[6]!==o?(d=(0,l.jsx)(i,{...o,...u}),t[5]=u,t[6]=o,t[7]=d):d=t[7],d}export{u as t};
|
|
2
|
+
//# sourceMappingURL=draft-input-BhYlt4Pu.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as e,y as t}from"./_chat-DoDgVLYz.js";import{A as n,B as r,C as i,H as a,I as o,J as s,L as c,U as l,V as u,Y as d,b as f,c as p,g as m,h,i as g,j as _,k as v,n as y,o as ee,q as b,r as x,u as S}from"./GLTFLoader-DL026JyV.js";import{t as te}from"./RoomEnvironment-Iz7-KYrN.js";import{i as C,n as w,o as ne,r as re,t as T}from"./renderScheduler-Cvu4oEGc.js";function E(e,t,n){return e===1?{x:t,y:n}:{x:n,y:1-t}}function D(e,t){return e.width>0&&e.height>0&&Math.abs(e.width/e.height-t.width/t.height)<=1/e.height+1/t.height}function O(e){return e?`${e.screenId}:${e.width}:${e.height}:${e.orientation}`:``}function ie(e,t){let i=e.getObjectByName(`left-half`),a=e.getObjectByName(`right-half`),o=e.getObjectByName(`cover-display`),l=e.getObjectByName(`inner-display-left`),m=e.getObjectByName(`inner-display-right`);if(!i||!a||!(o instanceof n)||!(l instanceof n)||!(m instanceof n))throw Error(`Duo model must have two hinge groups and all three display meshes`);let h={1:[o],3:[l,m]},g=[1,3].map(e=>{let t=new ee;for(let n of h[e])n.geometry.computeBoundingBox(),t.union(n.geometry.boundingBox);let n=t.getSize(new d);if(![n.x,n.y].every(e=>Number.isFinite(e)&&e>0))throw Error(`Invalid Duo display bounds`);return{bounds:t,size:n}}),y=new f,x=new f;x.add(e),y.add(x);let S=NaN,te=new ee,C=new v,w=new v,ne={1:new _({map:t[1],toneMapped:!1}),3:new _({map:t[3],toneMapped:!1})},re=new Map;for(let e of[1,3]){let{bounds:t,size:n}=g[e===1?0:1];for(let r of h[e]){let i=r.geometry.getAttribute(`position`),a=new Float32Array(i.count*2);for(let r=0;r<i.count;r++){let o=(i.getX(r)-t.min.x)/n.x;a[r*2]=e===1?1-o:o,a[r*2+1]=(i.getY(r)-t.min.y)/n.y}r.geometry.setAttribute(`uv`,new p(a,2)),re.set(r,r.material),r.material=ne[e]}}let T=new u,D=null;return{root:y,setAngle(t){if(t===S)return;S=t;let r=(180-Math.min(180,Math.max(0,t)))*Math.PI/360;i.rotation.y=r,a.rotation.y=-r,x.position.set(0,0,0),y.updateWorldMatrix(!0,!0),w.copy(y.matrixWorld).invert(),te.makeEmpty(),e.traverse(e=>{e instanceof n&&(e.geometry.boundingBox||e.geometry.computeBoundingBox(),e.geometry.boundingBox&&(C.multiplyMatrices(w,e.matrixWorld),te.union(e.geometry.boundingBox.clone().applyMatrix4(C))))}),x.position.copy(te.getCenter(new d)).negate()},restFrames(e){y.updateWorldMatrix(!0,!0),w.copy(y.matrixWorld).invert();let t=(e,t)=>{let n=new ee,r=new d,i=new d;for(let t of e)t.geometry.boundingBox||t.geometry.computeBoundingBox(),C.multiplyMatrices(w,t.matrixWorld),n.union(t.geometry.boundingBox.clone().applyMatrix4(C)),r.add(new d().fromBufferAttribute(t.geometry.getAttribute(`normal`),0).transformDirection(C)),i.add(new d(0,1,0).transformDirection(C));return{face:t,center:n.getCenter(new d),normal:r.normalize(),up:i.normalize()}};if(e===1)return[t([o],`cover`)];let n=t([l,m],`inside`);return S>20&&S<165?[n,t([l],`left`),t([m],`right`)]:[n]},leafRotation(e){return y.updateWorldMatrix(!0,!0),C.multiplyMatrices(y.matrixWorld.clone().invert(),(e===`left`?i:a).matrixWorld),new r().setFromRotationMatrix(C.extractRotation(C))},hingeLeafAt(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t))return null;y.updateMatrixWorld(!0),n.updateMatrixWorld(!0),T.setFromCamera(new s(e*2-1,1-t*2),n);let r=T.intersectObject(y,!0)[0]?.object;for(;r;){if(r===i)return`left`;if(r===a)return`right`;r=r.parent??void 0}return null},cancelInput(){D=null},screenPoint(e,t,r,i,a,o=!1){let l=O(i);if(!i||!a||l!==a)return D=null,null;if(y.updateMatrixWorld(!0),r.updateMatrixWorld(!0),T.setFromCamera(new s(e*2-1,1-t*2),r),o&&D?.key===l){let e=T.ray.intersectPlane(D.plane,new d),t=e?D.triangle.getBarycoord(e,new d):null;if(!t)return null;let n=D.uv[0].clone().multiplyScalar(t.x).addScaledVector(D.uv[1],t.y).addScaledVector(D.uv[2],t.z);return E(D.panel,n.x,1-n.y)}let u=T.intersectObject(y,!0)[0];if(!u?.uv||!u.face||!(u.object instanceof n))return null;let f=h[1].includes(u.object)?1:h[3].includes(u.object)?3:null;if(!f||f!==i.screenId)return null;let p=[u.face.a,u.face.b,u.face.c],m=u.object.geometry.getAttribute(`position`),g=new b(...p.map(e=>new d().fromBufferAttribute(m,e).applyMatrix4(u.object.matrixWorld))),_=u.object.geometry.getAttribute(`uv`);return D={panel:f,triangle:g,uv:p.map(e=>new s().fromBufferAttribute(_,e)),plane:g.getPlane(new c),key:l},E(f,u.uv.x,1-u.uv.y)},dispose(){for(let[e,t]of re)e.material=t;for(let e of Object.values(ne))e.map=null,e.dispose();x.remove(e),D=null}}}var ae=[`portrait`,`landscape_left`,`portrait_upside_down`,`landscape_right`],oe=new d(0,0,1),k=new d(0,1,0);function se(e,t){let n=[];for(let i of e){let a=i.normal.clone().normalize();if(a.lengthSq()<.5)continue;let o=i.up.clone().cross(a).normalize(),s=a.clone().cross(o).normalize(),c=new r().setFromRotationMatrix(new v().makeBasis(o,s,a)).invert();for(let a=0;a<ae.length;a++){if(i.face===`right`&&a!==0||i.face===`left`&&a!==2)continue;let o=(t===3?Math.PI/2:0)-a*Math.PI/2,s=c.clone().premultiply(new r().setFromAxisAngle(oe,o));if((i.face===`left`||i.face===`right`)&&s.premultiply(new r().setFromAxisAngle(new d(1,0,0),Math.PI/12)),t===3&&e.some(e=>(e.face===`left`||e.face===`right`)&&e.normal.clone().applyQuaternion(s).z<.04))continue;let l=i.face===`cover`?Math.PI/9:Math.PI/3;if(t===3)for(let t of[-1,1])for(let n=1;n<=60;n++){let i=new r().setFromAxisAngle(k,t*n*Math.PI/180);if(e.some(e=>(e.face===`left`||e.face===`right`)&&e.normal.clone().applyQuaternion(s).applyQuaternion(i).z<.04)){l=Math.min(l,(n-1)*Math.PI/180);break}}n.push({rotation:s,face:i.face,orientation:ae[a],center:i.center.clone(),yawLimit:l})}}return n}var A=w;function j(n){let s=[1,3].map(e=>{let t=document.createElement(`canvas`);t.width=e===1?784:1600,t.height=e===1?1140:1125;let n=t.getContext(`2d`,{alpha:!1});if(!n)throw Error(`Duo display canvas is unavailable`);return n.fillStyle=`#080a10`,n.fillRect(0,0,t.width,t.height),{id:e,canvas:t,context:n}}).map(({id:e,canvas:t,context:n})=>{let r=new S(t);return r.colorSpace=a,r.minFilter=r.magFilter=i,r.generateMipmaps=!1,{id:e,canvas:t,context:n,texture:r}}),c=new x({canvas:n.canvas,alpha:!0,antialias:!0,powerPreference:`low-power`});c.outputColorSpace=a;let u=new l,f=(()=>{let e=new y(c),t=new te;try{return e.fromScene(t,.04)}catch(e){for(let e of s)e.texture.dispose();throw c.dispose(),c.forceContextLoss(),e}finally{t.dispose(),e.dispose()}})();u.environment=f.texture;let p=new o(36,1,.1,150),_=new h(16777215,4);_.position.set(-6,10,14);let v=new h(13098239,2);v.position.set(8,-3,-5),u.add(new g(16777215,2.4),_,v);let b=null,w=null,E=``,ae=``,oe=0,k=!1,j={width:0,height:0,ratio:1},ce={width:0,height:0,ratio:0},M=`inside`,N=null,P=null,F=new d,I=new d,L=null,le=null,R=()=>{le&&clearTimeout(le),le=null,L=null},z=()=>b?se(b.restFrames(w?.screenId===1?1:3),w?.screenId===1?1:3):[],ue=()=>{if(!b||!w?.supportsPhysicalOrientation||!n.onPanelRequested)return z();let e=se(b.restFrames(1),1);return V>20&&V<180?[...se(b.restFrames(3),3),...e]:z()},B=re({choose(e){let t=A(e,ue());if(!t)return e;M=t.face;let r=t.face===`cover`?1:3;return w&&r!==(L??w.screenId)&&n.onPanelRequested?(R(),L=r,b?.cancelInput(),n.onPanelRequested(r),le=setTimeout(()=>{R();let e=A(B.rotation,z());e&&(M=e.face,B.setPose(e.rotation,performance.now())),$.invalidate()},5e3)):w&&L===null&&t.orientation!==P&&n.onOrientationRequested&&(P=t.orientation,N=t.orientation,n.onOrientationRequested(t.orientation)),t.rotation}}),V=180,H=180,U=null,W=null,de=NaN,fe=!1,G=C(),pe=new ee,K=!0,q=!1,J=`open`,me=180,Y=new r,X=0,he=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,Z=()=>{if(!b)return;let e=W&&de!==V?b.leafRotation(W):null;if(b.setAngle(V),de=V,e&&W){let t=e.multiply(b.leafRotation(W).invert());t.angleTo(new r)>1e-8&&B.setPose(B.rotation.clone().multiply(t),performance.now(),!0)}b.root.quaternion.copy(B.rotation),b.root.position.set(0,0,0);let t=b.restFrames(M===`cover`?1:3),n=t.find(e=>e.face===M)??t[0];I.copy(n?.center??new d),b.root.position.copy(F).applyQuaternion(b.root.quaternion).negate()},ge=()=>{p.position.set(G.center.x,G.center.y,G.distance()),p.lookAt(G.center.x,G.center.y,0),p.updateProjectionMatrix()},Q=(e=!1)=>{b&&j.width&&j.height&&(p.aspect=j.width/j.height,G.setBounds(pe.setFromObject(b.root),p.fov*Math.PI/360,p.aspect,performance.now(),e),ge())},_e=()=>Math.abs(V-H)>.01||F.distanceTo(I)>.001,$=T(()=>{if(!k&&b&&j.width&&j.height)try{let e=performance.now(),t=Math.max(0,(e-X)/1e3),n=he?1:1-Math.exp(-14*Math.max(0,(e-X)/1e3||.016));X=e;let r=_e(),i=B.advance(e,he);r&&(V+=(H-V)*n,Math.abs(V-H)<=.01&&(V=H),Z(),F.lerp(I,n),F.distanceTo(I)<=.001&&F.copy(I),Z(),Q(he||t>.5)),i&&(Z(),Q(he||t>.5)),G.advance(e,he)&&ge(),(ce.width!==j.width||ce.height!==j.height||ce.ratio!==j.ratio)&&(c.setDrawingBufferSize(j.width,j.height,j.ratio),ce=j),c.render(u,p),(r||_e()||B.needsFrame()||G.needsFrame())&&$.invalidate()}catch{n.onUnavailable()}}),ve=t({load:ne,onError(e){n.onModelError?.(e),n.onUnavailable()},install(e){let t=e?ie(e.asset,{1:s[0].texture,3:s[1].texture}):null;if(b&&(u.remove(b.root),b.dispose()),b=t,de=NaN,b&&!k){if(u.add(b.root),Z(),w?.screenId===1&&J!==`tent`){let e=A(B.rotation,z());e&&(M=e.face,B.setPose(e.rotation,performance.now(),!0),Z())}F.copy(I),Z(),Q(),$.invalidate()}}}),ye=e=>{e.preventDefault(),n.onUnavailable()};return n.canvas.addEventListener(`webglcontextlost`,ye),ve.set(n.model),{setScreen(t){if(k)return;let n=_e()||B.needsFrame();O(w)!==O(t)&&(E=``,oe=performance.now(),b?.cancelInput());let i=w,a=L!==null;t&&t.screenId!==L||R();let o=N!==null,s=o&&t?.screenId===i?.screenId,c=t?.screenId!==i?.screenId;N=null,w=t;let l=t?.hingePose&&t.hingePose!==i?.hingePose,u=W!==null&&!l,f=i?.hingeAngle??(i?.screenId===1?0:180),p=t?.hingeAngle??(t?.screenId===1?0:180);!t||u||l?q=!1:i&&f!==p&&(q=!0);let h=q&&!!t&&e(t)&&!a;t&&e(t)&&(q=!1);let g=!q&&t?.screenId===i?.screenId&&t?.hingeAngle===i?.hingeAngle&&t?.orientation!==i?.orientation,_=g&&!s&&!a&&!u&&!t?.hingePose&&U===null;if((K||l||_||h)&&(J=t?.hingePose??(t?.screenId===1?`closed`:`open`),me=t?.hingeAngle??(t?.screenId===1?0:180)),H=U??t?.hingeAngle??(t?.screenId===1?0:180),K||l||h||g&&!s&&!a&&!u){W=null,P=t?.orientation??null;let e=me,n=(180-e)*Math.PI/360,i=J===`closed`?0:Math.PI/2;t&&t.width<t.height&&(t.orientation===`landscape_left`&&(i-=Math.PI/2),t.orientation===`landscape_right`&&(i+=Math.PI/2)),t?.orientation===`portrait_upside_down`&&(i-=Math.PI);let a=J===`laptop`?new m(-n+Math.PI/9,-Math.PI/9,Math.PI/2,`YXZ`):J===`tent`?new m(Math.PI/2+Math.PI/18,-Math.PI/9,-Math.PI/2,`YXZ`):new m(0,Math.PI/2*(1-e/180)**3,0,`YXZ`);if(Y=new r().setFromEuler(a),J!==`laptop`&&J!==`tent`&&Y.premultiply(new r().setFromAxisAngle(new d(0,0,1),i)),t?.screenId===1&&!h&&J!==`tent`){let e=A(Y,z());e&&Y.copy(e.rotation)}K&&(V=H),M=t?.screenId===1?`cover`:J===`laptop`?`right`:`inside`,B.setPose(Y,performance.now(),K),K=!1}else if(t&&c&&!a&&!u&&M===`cover`!=(t.screenId===1)&&(o||e(t))){let e=A(B.rotation,z());e&&(M=e.face,B.setPose(e.rotation,performance.now()))}n||(X=performance.now()),Z(),Q(),$.invalidate()},setHingePreview(e,t=!1){k||e!==null&&(!Number.isFinite(e)||e<0||e>180)||(_e()||(X=performance.now()),U=e,e!==null&&!t?W=null:e!==null&&!W&&b&&(R(),N=null,W=w?.screenId===1&&V>20?`left`:`right`,B.setPose(B.rotation.clone(),performance.now(),!0)),B.hold(fe||t&&e!==null,performance.now()),H=e??w?.hingeAngle??(w?.screenId===1?0:180),e!==null&&t&&(V=e,Z(),Q()),b?.cancelInput(),$.invalidate())},setInteractionActive(e,t=`touch`){k||(t===`orbit`?(e&&(W=null),B.dragActive(e,performance.now())):(fe=e,B.hold(e||U!==null,performance.now()),G.hold(e,performance.now())),$.invalidate())},rejectOrientation(){if(k||N===null&&L===null)return;R(),N=null,P=w?.orientation??null;let e=z().filter(e=>e.orientation===w?.orientation),t=A(B.rotation,e);t&&(M=t.face,B.setPose(t.rotation,performance.now())),$.invalidate()},frameUpdated(e,t){if(k||w?.screenId!==e)return;let r=O(w);if(!t&&ae===r)return;let i=t??n.sources[e];if(!D(i,w))return;let a=s[e===1?0:1],{context:o,canvas:c}=a;if(!t&&!E&&performance.now()-oe<1500){let e=document.createElement(`canvas`);e.width=e.height=8;let t=e.getContext(`2d`,{willReadFrequently:!0});if(t&&(t.drawImage(i,0,0,8,8),!t.getImageData(0,0,8,8).data.some((e,t)=>t%4!=3&&e>3)))return}o.save(),o.fillStyle=`#080a10`,o.fillRect(0,0,c.width,c.height),o.translate(c.width/2,c.height/2);let l=e===3;l&&o.rotate(Math.PI/2);let u=Math.min(c.width/(l?i.height:i.width),c.height/(l?i.width:i.height));o.drawImage(i,-i.width*u/2,-i.height*u/2,i.width*u,i.height*u),o.restore(),a.texture.needsUpdate=!0,E=O(w),t&&(ae=E),$.invalidate()},resize(e,t,n){k||![e,t,n].every(Number.isFinite)||e<=0||t<=0||(j={width:e,height:t,ratio:Math.min(2,Math.max(1,n))},Q(!0),$.invalidate())},screenPoint(e,t,n=!1){return k||_e()||U!==null||N!==null||L!==null?null:(Z(),b?.screenPoint(e,t,p,w,E,n)??null)},cancelInput(){W=null,b?.cancelInput()},orbit(e,t){k||(W=null,B.orbit(e*j.width,t*j.height,performance.now()),$.invalidate())},beginHinge(e,t){return k||!b||!w||(Z(),!b.hingeLeafAt(e,t,p))?!1:(R(),N=null,W=w.screenId===1&&V>20?`left`:`right`,B.setPose(B.rotation.clone(),performance.now(),!0),b.cancelInput(),!0)},resetPose(){if(k)return;W=null,N=null,R();let e=z().find(e=>e.orientation===w?.orientation);e&&e.orientation!==P&&n.onOrientationRequested&&(P=e.orientation,N=e.orientation,n.onOrientationRequested(e.orientation)),B.reset(e?.rotation??Y,performance.now()),Z(),Q(),$.invalidate()},dispose(){if(R(),!k){k=!0,$.dispose(),ve.dispose(),n.canvas.removeEventListener(`webglcontextlost`,ye);for(let e of s)e.texture.dispose();u.environment=null,f.dispose(),c.dispose(),c.forceContextLoss()}}}}export{j as createDuoViewer};
|
|
2
|
-
//# sourceMappingURL=duoViewer-
|
|
1
|
+
import{v as e,y as t}from"./_chat-B7MuBHoN.js";import{A as n,B as r,C as i,H as a,I as o,J as s,L as c,U as l,V as u,Y as d,b as f,c as p,g as m,h,i as g,j as _,k as v,n as y,o as ee,q as b,r as x,u as S}from"./GLTFLoader-DL026JyV.js";import{t as te}from"./RoomEnvironment-Iz7-KYrN.js";import{i as C,n as w,o as ne,r as re,t as T}from"./renderScheduler-B6SrQg1c.js";function E(e,t,n){return e===1?{x:t,y:n}:{x:n,y:1-t}}function D(e,t){return e.width>0&&e.height>0&&Math.abs(e.width/e.height-t.width/t.height)<=1/e.height+1/t.height}function O(e){return e?`${e.screenId}:${e.width}:${e.height}:${e.orientation}`:``}function ie(e,t){let i=e.getObjectByName(`left-half`),a=e.getObjectByName(`right-half`),o=e.getObjectByName(`cover-display`),l=e.getObjectByName(`inner-display-left`),m=e.getObjectByName(`inner-display-right`);if(!i||!a||!(o instanceof n)||!(l instanceof n)||!(m instanceof n))throw Error(`Duo model must have two hinge groups and all three display meshes`);let h={1:[o],3:[l,m]},g=[1,3].map(e=>{let t=new ee;for(let n of h[e])n.geometry.computeBoundingBox(),t.union(n.geometry.boundingBox);let n=t.getSize(new d);if(![n.x,n.y].every(e=>Number.isFinite(e)&&e>0))throw Error(`Invalid Duo display bounds`);return{bounds:t,size:n}}),y=new f,x=new f;x.add(e),y.add(x);let S=NaN,te=new ee,C=new v,w=new v,ne={1:new _({map:t[1],toneMapped:!1}),3:new _({map:t[3],toneMapped:!1})},re=new Map;for(let e of[1,3]){let{bounds:t,size:n}=g[e===1?0:1];for(let r of h[e]){let i=r.geometry.getAttribute(`position`),a=new Float32Array(i.count*2);for(let r=0;r<i.count;r++){let o=(i.getX(r)-t.min.x)/n.x;a[r*2]=e===1?1-o:o,a[r*2+1]=(i.getY(r)-t.min.y)/n.y}r.geometry.setAttribute(`uv`,new p(a,2)),re.set(r,r.material),r.material=ne[e]}}let T=new u,D=null;return{root:y,setAngle(t){if(t===S)return;S=t;let r=(180-Math.min(180,Math.max(0,t)))*Math.PI/360;i.rotation.y=r,a.rotation.y=-r,x.position.set(0,0,0),y.updateWorldMatrix(!0,!0),w.copy(y.matrixWorld).invert(),te.makeEmpty(),e.traverse(e=>{e instanceof n&&(e.geometry.boundingBox||e.geometry.computeBoundingBox(),e.geometry.boundingBox&&(C.multiplyMatrices(w,e.matrixWorld),te.union(e.geometry.boundingBox.clone().applyMatrix4(C))))}),x.position.copy(te.getCenter(new d)).negate()},restFrames(e){y.updateWorldMatrix(!0,!0),w.copy(y.matrixWorld).invert();let t=(e,t)=>{let n=new ee,r=new d,i=new d;for(let t of e)t.geometry.boundingBox||t.geometry.computeBoundingBox(),C.multiplyMatrices(w,t.matrixWorld),n.union(t.geometry.boundingBox.clone().applyMatrix4(C)),r.add(new d().fromBufferAttribute(t.geometry.getAttribute(`normal`),0).transformDirection(C)),i.add(new d(0,1,0).transformDirection(C));return{face:t,center:n.getCenter(new d),normal:r.normalize(),up:i.normalize()}};if(e===1)return[t([o],`cover`)];let n=t([l,m],`inside`);return S>20&&S<165?[n,t([l],`left`),t([m],`right`)]:[n]},leafRotation(e){return y.updateWorldMatrix(!0,!0),C.multiplyMatrices(y.matrixWorld.clone().invert(),(e===`left`?i:a).matrixWorld),new r().setFromRotationMatrix(C.extractRotation(C))},hingeLeafAt(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t))return null;y.updateMatrixWorld(!0),n.updateMatrixWorld(!0),T.setFromCamera(new s(e*2-1,1-t*2),n);let r=T.intersectObject(y,!0)[0]?.object;for(;r;){if(r===i)return`left`;if(r===a)return`right`;r=r.parent??void 0}return null},cancelInput(){D=null},screenPoint(e,t,r,i,a,o=!1){let l=O(i);if(!i||!a||l!==a)return D=null,null;if(y.updateMatrixWorld(!0),r.updateMatrixWorld(!0),T.setFromCamera(new s(e*2-1,1-t*2),r),o&&D?.key===l){let e=T.ray.intersectPlane(D.plane,new d),t=e?D.triangle.getBarycoord(e,new d):null;if(!t)return null;let n=D.uv[0].clone().multiplyScalar(t.x).addScaledVector(D.uv[1],t.y).addScaledVector(D.uv[2],t.z);return E(D.panel,n.x,1-n.y)}let u=T.intersectObject(y,!0)[0];if(!u?.uv||!u.face||!(u.object instanceof n))return null;let f=h[1].includes(u.object)?1:h[3].includes(u.object)?3:null;if(!f||f!==i.screenId)return null;let p=[u.face.a,u.face.b,u.face.c],m=u.object.geometry.getAttribute(`position`),g=new b(...p.map(e=>new d().fromBufferAttribute(m,e).applyMatrix4(u.object.matrixWorld))),_=u.object.geometry.getAttribute(`uv`);return D={panel:f,triangle:g,uv:p.map(e=>new s().fromBufferAttribute(_,e)),plane:g.getPlane(new c),key:l},E(f,u.uv.x,1-u.uv.y)},dispose(){for(let[e,t]of re)e.material=t;for(let e of Object.values(ne))e.map=null,e.dispose();x.remove(e),D=null}}}var ae=[`portrait`,`landscape_left`,`portrait_upside_down`,`landscape_right`],oe=new d(0,0,1),k=new d(0,1,0);function se(e,t){let n=[];for(let i of e){let a=i.normal.clone().normalize();if(a.lengthSq()<.5)continue;let o=i.up.clone().cross(a).normalize(),s=a.clone().cross(o).normalize(),c=new r().setFromRotationMatrix(new v().makeBasis(o,s,a)).invert();for(let a=0;a<ae.length;a++){if(i.face===`right`&&a!==0||i.face===`left`&&a!==2)continue;let o=(t===3?Math.PI/2:0)-a*Math.PI/2,s=c.clone().premultiply(new r().setFromAxisAngle(oe,o));if((i.face===`left`||i.face===`right`)&&s.premultiply(new r().setFromAxisAngle(new d(1,0,0),Math.PI/12)),t===3&&e.some(e=>(e.face===`left`||e.face===`right`)&&e.normal.clone().applyQuaternion(s).z<.04))continue;let l=i.face===`cover`?Math.PI/9:Math.PI/3;if(t===3)for(let t of[-1,1])for(let n=1;n<=60;n++){let i=new r().setFromAxisAngle(k,t*n*Math.PI/180);if(e.some(e=>(e.face===`left`||e.face===`right`)&&e.normal.clone().applyQuaternion(s).applyQuaternion(i).z<.04)){l=Math.min(l,(n-1)*Math.PI/180);break}}n.push({rotation:s,face:i.face,orientation:ae[a],center:i.center.clone(),yawLimit:l})}}return n}var A=w;function j(n){let s=[1,3].map(e=>{let t=document.createElement(`canvas`);t.width=e===1?784:1600,t.height=e===1?1140:1125;let n=t.getContext(`2d`,{alpha:!1});if(!n)throw Error(`Duo display canvas is unavailable`);return n.fillStyle=`#080a10`,n.fillRect(0,0,t.width,t.height),{id:e,canvas:t,context:n}}).map(({id:e,canvas:t,context:n})=>{let r=new S(t);return r.colorSpace=a,r.minFilter=r.magFilter=i,r.generateMipmaps=!1,{id:e,canvas:t,context:n,texture:r}}),c=new x({canvas:n.canvas,alpha:!0,antialias:!0,powerPreference:`low-power`});c.outputColorSpace=a;let u=new l,f=(()=>{let e=new y(c),t=new te;try{return e.fromScene(t,.04)}catch(e){for(let e of s)e.texture.dispose();throw c.dispose(),c.forceContextLoss(),e}finally{t.dispose(),e.dispose()}})();u.environment=f.texture;let p=new o(36,1,.1,150),_=new h(16777215,4);_.position.set(-6,10,14);let v=new h(13098239,2);v.position.set(8,-3,-5),u.add(new g(16777215,2.4),_,v);let b=null,w=null,E=``,ae=``,oe=0,k=!1,j={width:0,height:0,ratio:1},ce={width:0,height:0,ratio:0},M=`inside`,N=null,P=null,F=new d,I=new d,L=null,le=null,R=()=>{le&&clearTimeout(le),le=null,L=null},z=()=>b?se(b.restFrames(w?.screenId===1?1:3),w?.screenId===1?1:3):[],ue=()=>{if(!b||!w?.supportsPhysicalOrientation||!n.onPanelRequested)return z();let e=se(b.restFrames(1),1);return V>20&&V<180?[...se(b.restFrames(3),3),...e]:z()},B=re({choose(e){let t=A(e,ue());if(!t)return e;M=t.face;let r=t.face===`cover`?1:3;return w&&r!==(L??w.screenId)&&n.onPanelRequested?(R(),L=r,b?.cancelInput(),n.onPanelRequested(r),le=setTimeout(()=>{R();let e=A(B.rotation,z());e&&(M=e.face,B.setPose(e.rotation,performance.now())),$.invalidate()},5e3)):w&&L===null&&t.orientation!==P&&n.onOrientationRequested&&(P=t.orientation,N=t.orientation,n.onOrientationRequested(t.orientation)),t.rotation}}),V=180,H=180,U=null,W=null,de=NaN,fe=!1,G=C(),pe=new ee,K=!0,q=!1,J=`open`,me=180,Y=new r,X=0,he=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,Z=()=>{if(!b)return;let e=W&&de!==V?b.leafRotation(W):null;if(b.setAngle(V),de=V,e&&W){let t=e.multiply(b.leafRotation(W).invert());t.angleTo(new r)>1e-8&&B.setPose(B.rotation.clone().multiply(t),performance.now(),!0)}b.root.quaternion.copy(B.rotation),b.root.position.set(0,0,0);let t=b.restFrames(M===`cover`?1:3),n=t.find(e=>e.face===M)??t[0];I.copy(n?.center??new d),b.root.position.copy(F).applyQuaternion(b.root.quaternion).negate()},ge=()=>{p.position.set(G.center.x,G.center.y,G.distance()),p.lookAt(G.center.x,G.center.y,0),p.updateProjectionMatrix()},Q=(e=!1)=>{b&&j.width&&j.height&&(p.aspect=j.width/j.height,G.setBounds(pe.setFromObject(b.root),p.fov*Math.PI/360,p.aspect,performance.now(),e),ge())},_e=()=>Math.abs(V-H)>.01||F.distanceTo(I)>.001,$=T(()=>{if(!k&&b&&j.width&&j.height)try{let e=performance.now(),t=Math.max(0,(e-X)/1e3),n=he?1:1-Math.exp(-14*Math.max(0,(e-X)/1e3||.016));X=e;let r=_e(),i=B.advance(e,he);r&&(V+=(H-V)*n,Math.abs(V-H)<=.01&&(V=H),Z(),F.lerp(I,n),F.distanceTo(I)<=.001&&F.copy(I),Z(),Q(he||t>.5)),i&&(Z(),Q(he||t>.5)),G.advance(e,he)&&ge(),(ce.width!==j.width||ce.height!==j.height||ce.ratio!==j.ratio)&&(c.setDrawingBufferSize(j.width,j.height,j.ratio),ce=j),c.render(u,p),(r||_e()||B.needsFrame()||G.needsFrame())&&$.invalidate()}catch{n.onUnavailable()}}),ve=t({load:ne,onError(e){n.onModelError?.(e),n.onUnavailable()},install(e){let t=e?ie(e.asset,{1:s[0].texture,3:s[1].texture}):null;if(b&&(u.remove(b.root),b.dispose()),b=t,de=NaN,b&&!k){if(u.add(b.root),Z(),w?.screenId===1&&J!==`tent`){let e=A(B.rotation,z());e&&(M=e.face,B.setPose(e.rotation,performance.now(),!0),Z())}F.copy(I),Z(),Q(),$.invalidate()}}}),ye=e=>{e.preventDefault(),n.onUnavailable()};return n.canvas.addEventListener(`webglcontextlost`,ye),ve.set(n.model),{setScreen(t){if(k)return;let n=_e()||B.needsFrame();O(w)!==O(t)&&(E=``,oe=performance.now(),b?.cancelInput());let i=w,a=L!==null;t&&t.screenId!==L||R();let o=N!==null,s=o&&t?.screenId===i?.screenId,c=t?.screenId!==i?.screenId;N=null,w=t;let l=t?.hingePose&&t.hingePose!==i?.hingePose,u=W!==null&&!l,f=i?.hingeAngle??(i?.screenId===1?0:180),p=t?.hingeAngle??(t?.screenId===1?0:180);!t||u||l?q=!1:i&&f!==p&&(q=!0);let h=q&&!!t&&e(t)&&!a;t&&e(t)&&(q=!1);let g=!q&&t?.screenId===i?.screenId&&t?.hingeAngle===i?.hingeAngle&&t?.orientation!==i?.orientation,_=g&&!s&&!a&&!u&&!t?.hingePose&&U===null;if((K||l||_||h)&&(J=t?.hingePose??(t?.screenId===1?`closed`:`open`),me=t?.hingeAngle??(t?.screenId===1?0:180)),H=U??t?.hingeAngle??(t?.screenId===1?0:180),K||l||h||g&&!s&&!a&&!u){W=null,P=t?.orientation??null;let e=me,n=(180-e)*Math.PI/360,i=J===`closed`?0:Math.PI/2;t&&t.width<t.height&&(t.orientation===`landscape_left`&&(i-=Math.PI/2),t.orientation===`landscape_right`&&(i+=Math.PI/2)),t?.orientation===`portrait_upside_down`&&(i-=Math.PI);let a=J===`laptop`?new m(-n+Math.PI/9,-Math.PI/9,Math.PI/2,`YXZ`):J===`tent`?new m(Math.PI/2+Math.PI/18,-Math.PI/9,-Math.PI/2,`YXZ`):new m(0,Math.PI/2*(1-e/180)**3,0,`YXZ`);if(Y=new r().setFromEuler(a),J!==`laptop`&&J!==`tent`&&Y.premultiply(new r().setFromAxisAngle(new d(0,0,1),i)),t?.screenId===1&&!h&&J!==`tent`){let e=A(Y,z());e&&Y.copy(e.rotation)}K&&(V=H),M=t?.screenId===1?`cover`:J===`laptop`?`right`:`inside`,B.setPose(Y,performance.now(),K),K=!1}else if(t&&c&&!a&&!u&&M===`cover`!=(t.screenId===1)&&(o||e(t))){let e=A(B.rotation,z());e&&(M=e.face,B.setPose(e.rotation,performance.now()))}n||(X=performance.now()),Z(),Q(),$.invalidate()},setHingePreview(e,t=!1){k||e!==null&&(!Number.isFinite(e)||e<0||e>180)||(_e()||(X=performance.now()),U=e,e!==null&&!t?W=null:e!==null&&!W&&b&&(R(),N=null,W=w?.screenId===1&&V>20?`left`:`right`,B.setPose(B.rotation.clone(),performance.now(),!0)),B.hold(fe||t&&e!==null,performance.now()),H=e??w?.hingeAngle??(w?.screenId===1?0:180),e!==null&&t&&(V=e,Z(),Q()),b?.cancelInput(),$.invalidate())},setInteractionActive(e,t=`touch`){k||(t===`orbit`?(e&&(W=null),B.dragActive(e,performance.now())):(fe=e,B.hold(e||U!==null,performance.now()),G.hold(e,performance.now())),$.invalidate())},rejectOrientation(){if(k||N===null&&L===null)return;R(),N=null,P=w?.orientation??null;let e=z().filter(e=>e.orientation===w?.orientation),t=A(B.rotation,e);t&&(M=t.face,B.setPose(t.rotation,performance.now())),$.invalidate()},frameUpdated(e,t){if(k||w?.screenId!==e)return;let r=O(w);if(!t&&ae===r)return;let i=t??n.sources[e];if(!D(i,w))return;let a=s[e===1?0:1],{context:o,canvas:c}=a;if(!t&&!E&&performance.now()-oe<1500){let e=document.createElement(`canvas`);e.width=e.height=8;let t=e.getContext(`2d`,{willReadFrequently:!0});if(t&&(t.drawImage(i,0,0,8,8),!t.getImageData(0,0,8,8).data.some((e,t)=>t%4!=3&&e>3)))return}o.save(),o.fillStyle=`#080a10`,o.fillRect(0,0,c.width,c.height),o.translate(c.width/2,c.height/2);let l=e===3;l&&o.rotate(Math.PI/2);let u=Math.min(c.width/(l?i.height:i.width),c.height/(l?i.width:i.height));o.drawImage(i,-i.width*u/2,-i.height*u/2,i.width*u,i.height*u),o.restore(),a.texture.needsUpdate=!0,E=O(w),t&&(ae=E),$.invalidate()},resize(e,t,n){k||![e,t,n].every(Number.isFinite)||e<=0||t<=0||(j={width:e,height:t,ratio:Math.min(2,Math.max(1,n))},Q(!0),$.invalidate())},screenPoint(e,t,n=!1){return k||_e()||U!==null||N!==null||L!==null?null:(Z(),b?.screenPoint(e,t,p,w,E,n)??null)},cancelInput(){W=null,b?.cancelInput()},orbit(e,t){k||(W=null,B.orbit(e*j.width,t*j.height,performance.now()),$.invalidate())},beginHinge(e,t){return k||!b||!w||(Z(),!b.hingeLeafAt(e,t,p))?!1:(R(),N=null,W=w.screenId===1&&V>20?`left`:`right`,B.setPose(B.rotation.clone(),performance.now(),!0),b.cancelInput(),!0)},resetPose(){if(k)return;W=null,N=null,R();let e=z().find(e=>e.orientation===w?.orientation);e&&e.orientation!==P&&n.onOrientationRequested&&(P=e.orientation,N=e.orientation,n.onOrientationRequested(e.orientation)),B.reset(e?.rotation??Y,performance.now()),Z(),Q(),$.invalidate()},dispose(){if(R(),!k){k=!0,$.dispose(),ve.dispose(),n.canvas.removeEventListener(`webglcontextlost`,ye);for(let e of s)e.texture.dispose();u.environment=null,f.dispose(),c.dispose(),c.forceContextLoss()}}}}export{j as createDuoViewer};
|
|
2
|
+
//# sourceMappingURL=duoViewer-C9zEhnho.js.map
|