sliccy 6.185.0 → 6.185.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/.vite/manifest.json +212 -212
- package/dist/ui/assets/{SKILL-wvtABi3i.js → SKILL-nEVBLbup.js} +1 -1
- package/dist/ui/assets/{account-store-C41qiTs8.js → account-store-BYWm5ahZ.js} +1 -1
- package/dist/ui/assets/{account-store-CdWvtLK5.js → account-store-Br2mSpab.js} +1 -1
- package/dist/ui/assets/{adobe-Cuq2cJ2f.js → adobe-CObWZuyD.js} +1 -1
- package/dist/ui/assets/{adobe-pJP3L2S1.js → adobe-Cf5-hIji.js} +1 -1
- package/dist/ui/assets/{agent-panels-Ca0HA81F.js → agent-panels-BvZGSCD0.js} +1 -1
- package/dist/ui/assets/{almost-bash-shell-headless-3-QEOXc2.js → almost-bash-shell-headless-CZLDhK1f.js} +33 -33
- package/dist/ui/assets/{apply-layout-CKuJgZ53.js → apply-layout-D2JbVCM_.js} +1 -1
- package/dist/ui/assets/{apps-DZhY4wWQ.js → apps-B5iEJzUt.js} +1 -1
- package/dist/ui/assets/{azure-openai-BWRYpShR.js → azure-openai-Cep1RYAS.js} +1 -1
- package/dist/ui/assets/{azure-openai-DR1sAgZg.js → azure-openai-DFccznQV.js} +1 -1
- package/dist/ui/assets/{backend-hostfs-Bgb_DsUT.js → backend-hostfs-D57AvEFu.js} +1 -1
- package/dist/ui/assets/{bunny-probe-DwyMiB71.js → bunny-probe-8V1ePOla.js} +1 -1
- package/dist/ui/assets/{bunny-run-COGwXgvg.js → bunny-run-DYRf1zOt.js} +1 -1
- package/dist/ui/assets/{cdp-D8ppMyya.js → cdp-h_BPeDae.js} +1 -1
- package/dist/ui/assets/{cerebras-C_6PRb_m.js → cerebras-BINd88DM.js} +1 -1
- package/dist/ui/assets/{cerebras-Drhn15WH.js → cerebras-BVj2bFId.js} +1 -1
- package/dist/ui/assets/{composer-speech-CJ5WxRmi.js → composer-speech-C4P1wrBq.js} +1 -1
- package/dist/ui/assets/{connect-surface-B25ziPK_.js → connect-surface-BOZaT8zF.js} +1 -1
- package/dist/ui/assets/{directed-approval-CHjy_veK.js → directed-approval-C0AwARyp.js} +1 -1
- package/dist/ui/assets/{dist-BpNPANbz.js → dist-BMDfry7W.js} +1 -1
- package/dist/ui/assets/{dist-C-tO1Skg.js → dist-CaPMlUXZ.js} +1 -1
- package/dist/ui/assets/{dist-BX7il2y2.js → dist-Djwo0SK2.js} +1 -1
- package/dist/ui/assets/{dist-5YOibBa4.js → dist-RJwZ5Bse.js} +1 -1
- package/dist/ui/assets/{emscripten-vfs-hook-BgKVsuWf.js → emscripten-vfs-hook-I9U0qMWS.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-JOVdeAED.js → ensure-speech-assets-C7BqIxvE.js} +1 -1
- package/dist/ui/assets/{fast-path-CG_eXz0M.js → fast-path-CriOTZyu.js} +1 -1
- package/dist/ui/assets/{frozen-archive-writer-XUf0GMRR.js → frozen-archive-writer-BdhAPJA-.js} +1 -1
- package/dist/ui/assets/{fs-DyrFPUp2.js → fs-B2fd3m5O.js} +2 -2
- package/dist/ui/assets/{fs-CfJdpL5x.js → fs-CGwyt0NN.js} +1 -1
- package/dist/ui/assets/{gelatiere-store-DCvfmki0.js → gelatiere-store-BMIL9lQv.js} +1 -1
- package/dist/ui/assets/{gelatiere-unit-DcQlQ9QA.js → gelatiere-unit-CMya23QY.js} +1 -1
- package/dist/ui/assets/{github-BH0fYYDC.js → github-D-otjGSE.js} +1 -1
- package/dist/ui/assets/{github-J3Pos7xW.js → github-DdvtTOtn.js} +2 -2
- package/dist/ui/assets/{github-auth-C0PAZtLa.js → github-auth-DtKPkP6O.js} +1 -1
- package/dist/ui/assets/{github-copilot-GnnngJgc.js → github-copilot-DJ4atTnp.js} +1 -1
- package/dist/ui/assets/{github-copilot-r7THpGrf.js → github-copilot-DhZpRpZ7.js} +1 -1
- package/dist/ui/assets/{github-install-bXSPtrJ8.js → github-install-CTgTDuO_.js} +1 -1
- package/dist/ui/assets/{github-zip-CQ8Hranj.js → github-zip-B7ij9nSt.js} +1 -1
- package/dist/ui/assets/{hear-vBH6fz6J.js → hear-BAzZhRH5.js} +1 -1
- package/dist/ui/assets/{help-BIRVuAQg.js → help-Cda2RKb5.js} +1 -1
- package/dist/ui/assets/icons-dEBJiC8z.js +1 -0
- package/dist/ui/assets/{installer-BIr2X4ZR.js → installer-DsU9Bt88.js} +1 -1
- package/dist/ui/assets/{js-realm-worker-xXM5hNmY.js → js-realm-worker-BOxTbSGf.js} +2 -2
- package/dist/ui/assets/{jsh-executor-Sq-_s17Z.js → jsh-executor-CS83LMmZ.js} +2 -2
- package/dist/ui/assets/{kernel-worker-BfQfWWGY.js → kernel-worker-BJ0c96Mi.js} +10 -10
- package/dist/ui/assets/{lick-ws-bridge-Cb_x25TH.js → lick-ws-bridge-CcI6teSG.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-1KGk00fU.js → lick-ws-bridge-DD_ESCbV.js} +1 -1
- package/dist/ui/assets/{live-session-curation-D2302oBw.js → live-session-curation-BZAOH9nA.js} +1 -1
- package/dist/ui/assets/{live-session-snapshot-MSEMhtzT.js → live-session-snapshot-CZ-B04Oo.js} +1 -1
- package/dist/ui/assets/{local-llm-Drx0Pf5F.js → local-llm-sjHLMR0H.js} +1 -1
- package/dist/ui/assets/{local-llm-C1bXK5E_.js → local-llm-tUt9259j.js} +1 -1
- package/dist/ui/assets/{main-ke7UzEyb.js → main-BxJYvn2p.js} +3 -3
- package/dist/ui/assets/{main-cherry-DMGXCqlk.js → main-cherry-B6afTuP6.js} +1 -1
- package/dist/ui/assets/{memory-curation-seam-BQ0ag4HS.js → memory-curation-seam-Cfdj18W8.js} +1 -1
- package/dist/ui/assets/{memory-health-DOBolAoU.js → memory-health-59w2sixO.js} +1 -1
- package/dist/ui/assets/{memory-write-execute-iB7MTIuf.js → memory-write-execute-c1nS7nAF.js} +1 -1
- package/dist/ui/assets/{mount-C8_YWxvL.js → mount-CwV2ETLu.js} +1 -1
- package/dist/ui/assets/{mount-sN1zOOQO.js → mount-DU11qcVU.js} +3 -3
- package/dist/ui/assets/{new-session-Chf2aTIb.js → new-session-C0-6JwTm.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-DhxqRx6M.js → oauth-bootstrap-IhFv8x_G.js} +2 -2
- package/dist/ui/assets/{onboarding-orchestrator-CSUMNTNq.js → onboarding-orchestrator-BPTv9Yh5.js} +1 -1
- package/dist/ui/assets/{openai-codex-LJJS3BN5.js → openai-codex-B-_op7Op.js} +1 -1
- package/dist/ui/assets/{openai-codex-E3c2zrJK.js → openai-codex-CSvp2o5O.js} +1 -1
- package/dist/ui/assets/{openrouter-HCWd3_Dv.js → openrouter-BtEOgbx4.js} +1 -1
- package/dist/ui/assets/{openrouter-free-CndCA5W5.js → openrouter-free-BCsuDfQ_.js} +1 -1
- package/dist/ui/assets/{openrouter-free-DEOSmXMR.js → openrouter-free-BWYrQTrf.js} +1 -1
- package/dist/ui/assets/{openrouter-B47ePBty.js → openrouter-nhXX67Yd.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-uaZxqhE3.js → openrouter-oauth-CHHX03dR.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-BN42fHf7.js → openrouter-oauth-Iu13nSWU.js} +1 -1
- package/dist/ui/assets/{opfs-mount-DmHtfJvm.js → opfs-mount-DQ8hqRqi.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-DxnZUmep.js → panel-rpc-handlers-gIjFzE4p.js} +2 -2
- package/dist/ui/assets/{panelize-shell-S-7afGEn.js → panelize-shell-4Ckl1Rlr.js} +1 -1
- package/dist/ui/assets/{pi-edit-execution-Y4T_bzrT.js → pi-edit-execution-DwX-a8w-.js} +1 -1
- package/dist/ui/assets/{provider-Cz1V2WqO.js → provider-BvruW9_d.js} +1 -1
- package/dist/ui/assets/{provider-DTffpEWN.js → provider-Vc-3ZUEr.js} +2 -2
- package/dist/ui/assets/{provider-settings-CxqviYt8.js → provider-settings-C0a7xTzz.js} +1 -1
- package/dist/ui/assets/provider-store-access-CIdsyXCw.js +1 -0
- package/dist/ui/assets/provider-store-access-T6xp0Y3c.js +1 -0
- package/dist/ui/assets/{providers-DRo5rfSc.js → providers-BUt9cTjL.js} +2 -2
- package/dist/ui/assets/{providers-jnPvVe9y.js → providers-DSnqrxU3.js} +1 -1
- package/dist/ui/assets/{quick-llm-DYIT2ufv.js → quick-llm-CwMENyH2.js} +1 -1
- package/dist/ui/assets/{realm-inprocess-JkVFNdN8.js → realm-inprocess-BPdEAS55.js} +1 -1
- package/dist/ui/assets/{recovery-screen-C_VP_tQT.js → recovery-screen-nUj2S4Kl.js} +1 -1
- package/dist/ui/assets/{remote-terminal-view-Dhc7yeLL.js → remote-terminal-view-yc1ctoH3.js} +1 -1
- package/dist/ui/assets/{restore-Bc04Ic3P.js → restore-5Pd0vEqt.js} +1 -1
- package/dist/ui/assets/{run-C1e4W7pJ.js → run-B-b1oASQ.js} +1 -1
- package/dist/ui/assets/{run-L6Ylv9dF.js → run-B7JwvoYv.js} +1 -1
- package/dist/ui/assets/{run-DjWLQRmi.js → run-BCW6JYCx.js} +1 -1
- package/dist/ui/assets/{run-BRPVL491.js → run-BPIWk2Dz.js} +1 -1
- package/dist/ui/assets/{run-D-ECpM63.js → run-BXtEkg8U.js} +2 -2
- package/dist/ui/assets/{run-D65zpTOz.js → run-CgPXJKZ-.js} +2 -2
- package/dist/ui/assets/{run-D4l6XlAu.js → run-DCB_d0xn.js} +2 -2
- package/dist/ui/assets/{run-Bd-jYaDM.js → run-Jp_ZOByn.js} +2 -2
- package/dist/ui/assets/{run-CG3zbaSU.js → run-oxE2jfCs.js} +1 -1
- package/dist/ui/assets/{session-command-memory-Ci1Zf9vr.js → session-command-memory-BWg7sIYO.js} +2 -2
- package/dist/ui/assets/{session-jsonl-COpl-CLY.js → session-jsonl-Bhp6wipk.js} +1 -1
- package/dist/ui/assets/{session-jsonl-BA0osLaK.js → session-jsonl-BiCcpvNV.js} +1 -1
- package/dist/ui/assets/{session-search-index-CdHuMIG2.js → session-search-index-BqxvtCBQ.js} +1 -1
- package/dist/ui/assets/{setup-feature-flags-remote-DtQ886Eg.js → setup-feature-flags-remote-CYBfAxiL.js} +1 -1
- package/dist/ui/assets/{setup-model-catalog-CZ582M7C.js → setup-model-catalog-Dmni1WC1.js} +1 -1
- package/dist/ui/assets/{signed-fetch-BR0AMgn_.js → signed-fetch-CPM5oMES.js} +1 -1
- package/dist/ui/assets/{silent-renew-backoff-CYQP7u_w.js → silent-renew-backoff-ThMSvZZl.js} +1 -1
- package/dist/ui/assets/slicc-editor-Bwxbi0cp.js +1 -0
- package/dist/ui/assets/slicc-editor-DZXa2pZw.js +23 -0
- package/dist/ui/assets/slicc-version-Bq7GVQX1.js +1 -0
- package/dist/ui/assets/{snapshot-DkZ54_ve.js → snapshot-DUtYnaet.js} +1 -1
- package/dist/ui/assets/{snapshot-features-tcAtohfL.js → snapshot-features-DeyPsTfS.js} +1 -1
- package/dist/ui/assets/{soundscape-DxCVDpTl.js → soundscape-9E8QV2kT.js} +1 -1
- package/dist/ui/assets/{speak-BqdHQaW1.js → speak-B3zyT2Ll.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-BuTuVoeH.js → sprinkle-manager-C_xPQk_d.js} +1 -1
- package/dist/ui/assets/{sprinkle-renderer-PPC5klpl.js → sprinkle-renderer-PJtkMKp5.js} +3 -3
- package/dist/ui/assets/src-C6UBnSGT.js +575 -0
- package/dist/ui/assets/{ssh-9Y3S-Bha.js → ssh-Ca0IyfQK.js} +1 -1
- package/dist/ui/assets/{state-4HAkKcwp.js → state-fLtv6usH.js} +1 -1
- package/dist/ui/assets/{store-DoauiqkB.js → store-CS22MHEy.js} +1 -1
- package/dist/ui/assets/{store-BQov__WY.js → store-CeiTFba0.js} +1 -1
- package/dist/ui/assets/{sudo-ChMUrnDt.js → sudo-B-FlSan1.js} +1 -1
- package/dist/ui/assets/{supervisor-B8SqOt_K.js → supervisor-qNiNIhSg.js} +1 -1
- package/dist/ui/assets/{sync-dialog-DpyNUkDH.js → sync-dialog-nKWUK7fT.js} +1 -1
- package/dist/ui/assets/{transformers-env-BENPPudh.js → transformers-env-B3GpaxuZ.js} +1 -1
- package/dist/ui/assets/{tray-leader-BA4ZTTff.js → tray-leader-CYp-DQMu.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-CBTb4mlH.js → tray-leave-runtime-tEMCrIY2.js} +1 -1
- package/dist/ui/assets/{tray-sidecar-CnZgpbOI.js → tray-sidecar-4C7VUy9Q.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-Dq2MUoOD.js → upgrade-detection-BZipCNim.js} +1 -1
- package/dist/ui/assets/{upskill-lick-skip-DUIw4OcH.js → upskill-lick-skip-CAvgv_ri.js} +1 -1
- package/dist/ui/assets/{voice-reply-CEwRhiYz.js → voice-reply-1yeNMEnU.js} +1 -1
- package/dist/ui/assets/{wc-attach-2TSX-inX.js → wc-attach-Bmr96lo2.js} +2 -2
- package/dist/ui/assets/{wc-browser-DJxUV8of.js → wc-browser-CFWI2FeJ.js} +1 -1
- package/dist/ui/assets/{wc-computers-BHu_7f-5.js → wc-computers-B9NC1Ue0.js} +1 -1
- package/dist/ui/assets/{wc-detached-BFnPmR0d.js → wc-detached-CjTNI4rY.js} +1 -1
- package/dist/ui/assets/{wc-extension-BYUYa6KS.js → wc-extension-BcE7UaX7.js} +2 -2
- package/dist/ui/assets/wc-follower-DE4kJ5Rn.js +17 -0
- package/dist/ui/assets/{wc-follower-oauth-DHAss7Bl.js → wc-follower-oauth-DHlE6ql1.js} +1 -1
- package/dist/ui/assets/{wc-gelatiere-Cr6JuzRn.js → wc-gelatiere-0HIlLrum.js} +1 -1
- package/dist/ui/assets/{wc-live-qHNanIrf.js → wc-live-DKnjSwhd.js} +5 -5
- package/dist/ui/assets/{wc-nav-X6D6V6gK.js → wc-nav-GtDOyEGR.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-Bt5oCUsn.js → wc-onboarding-B6t6zCns.js} +2 -2
- package/dist/ui/assets/{wc-permissions-BisFwUlJ.js → wc-permissions-hTpsWKNG.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-mnzIda5e.js → wc-placeholder-CgtGXSv5.js} +3 -3
- package/dist/ui/assets/{wc-secret-request-EQCdKc1f.js → wc-secret-request-ButBnUJH.js} +1 -1
- package/dist/ui/assets/{wc-settings-DnUvuaLB.js → wc-settings-DIjjwws4.js} +3 -3
- package/dist/ui/assets/{wc-shell-BtEykt-v.js → wc-shell-Dz1_0PFH.js} +193 -193
- package/dist/ui/assets/{wc-shortcut-config-BQmt9XFF.js → wc-shortcut-config-D6CuLO30.js} +1 -1
- package/dist/ui/assets/wc-sprinkles-Bc29I0Xy.js +2 -0
- package/dist/ui/assets/{wc-transcript-export-Cv0T-WSY.js → wc-transcript-export-yLjd8vVn.js} +2 -2
- package/dist/ui/assets/{wc-tray-DXzaLMSR.js → wc-tray-AjdLCp0o.js} +4 -4
- package/dist/ui/assets/{wc-unit-context-CS4hSDi7.js → wc-unit-context-DbQt1MsQ.js} +1 -1
- package/dist/ui/assets/welcome-detection-Bcatt_wO.js +1 -0
- package/dist/ui/assets/{whisper-session-C7baPCyL.js → whisper-session-Q3OwxGiv.js} +2 -2
- package/dist/ui/assets/{xai-grok-11wZ6TYi.js → xai-grok-C7_Vjmtd.js} +1 -1
- package/dist/ui/assets/{xai-grok-pbhR-Op4.js → xai-grok-C_rWJJ_o.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/ui/lucide-icons.js +249 -239
- package/dist/ui/packages/webapp/index.html +3 -3
- package/dist/ui/slicc-editor.js +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/icons-jrIi5FYk.js +0 -1
- package/dist/ui/assets/provider-store-access-DVcoprAg.js +0 -1
- package/dist/ui/assets/provider-store-access-Des62vG8.js +0 -1
- package/dist/ui/assets/slicc-editor-BwV9b9S6.js +0 -23
- package/dist/ui/assets/slicc-editor-abxGgeUl.js +0 -1
- package/dist/ui/assets/slicc-version-idHB6nsN.js +0 -1
- package/dist/ui/assets/src-BfoZU01X.js +0 -575
- package/dist/ui/assets/wc-follower-BwhkRRX4.js +0 -17
- package/dist/ui/assets/wc-sprinkles-CjPNiNB5.js +0 -2
- package/dist/ui/assets/welcome-detection-miHs8L-e.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,t}from"./base64-BPBW1Gzr.js";import{t as n}from"./mime-types-D7IV6i7k.js";import{t as r}from"./types-D8gIX-W-.js";import{n as i}from"./multipart-form-data-DopbgwRR.js";const a=`https://api.aem.live`;function o(e){let t=e.match(/^aem:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid AEM source '${e}' — expected aem://org/site[/path]`);return{org:t[1],site:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}function s(e){if(!e)return``;let t=Date.parse(e);return Number.isNaN(t)?``:String(t)}function c(e){let t=Date.parse(e??``);return Number.isNaN(t)?0:t}function l(e){return e.map(e=>e[`content-type`]===`application/folder`||e.name.endsWith(`/`)?{name:e.name.replace(/\/+$/,``),kind:`directory`}:{name:e.name,kind:`file`,size:e.size,etag:s(e[`last-modified`]),lastModified:c(e[`last-modified`])})}var u=class{kind=`aem`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=o(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??5242880,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new r(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`),r=`/${this.parsed.org}/sites/${this.parsed.site}/source`;return n?`${r}/${n}`:r}toListPath(e){return`${this.toSourcePath(e)}/`}request(e,t,n){return this.transport({method:e,path:t,origin:a,headers:n?.headers,body:n?.body})}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let i=await this.request(`GET`,this.toSourcePath(t));if(i.status===404)throw await this.cache.invalidateBody(t),new r(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new r(`EACCES`,`aem access denied`,e);if(i.status>=400)throw new r(`EIO`,`aem readFile failed: ${i.status}`,e);let a=new Uint8Array(await i.arrayBuffer());if(a.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);return await this.cache.putBody(t,a,s(i.headers.get(`last-modified`))),a}async assertUnchanged(e,t,n){if(!n)return;let i=await this.request(`HEAD`,this.toSourcePath(t));if(i.status===404)return;if(i.status>=400)throw new r(`EIO`,`aem precondition HEAD failed: ${i.status}`,e);let a=s(i.headers.get(`last-modified`));if(a&&a!==n)throw await this.cache.invalidateBody(t),new r(`EBUSY`,`remote modified since last read — re-read and retry`,e)}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let n=this.toMountRelative(e),i=await this.cache.getBody(n);await this.assertUnchanged(e,n,i?.etag??``);let a=await this.request(`PUT`,this.toSourcePath(n),{body:t});if(a.status===401||a.status===403)throw new r(`EACCES`,`aem write denied`,e);if(a.status>=400)throw new r(`EIO`,`aem writeFile failed: ${a.status}`,e);await this.cache.invalidateBody(n);let o=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(o)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let i=await this.request(`GET`,this.toListPath(t));if(i.status===404)throw new r(`ENOENT`,`no such directory`,e);if(i.status===401||i.status===403)throw new r(`EACCES`,`aem access denied`,e);if(i.status>=400)throw new r(`EIO`,`aem list failed: ${i.status}`,e);let a=l(await i.json());return await this.cache.putListing(t,a),a}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e);if(t===``)return{kind:`directory`,size:0,mtime:0};let n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let i=t.split(`/`),a=i.pop()??``,o=i.join(`/`),s=await this.cache.getListing(o),c=(s&&!this.cache.isStale(s.cachedAt)?s.entries:await this.readDirQuietly(o))?.find(e=>e.name===a);if(!c)throw new r(`ENOENT`,`no such file or directory`,e);return c.kind===`directory`?{kind:`directory`,size:0,mtime:c.lastModified??0}:{kind:`file`,size:c.size??0,mtime:c.lastModified??0,etag:c.etag??``}}async readDirQuietly(e){try{return await this.readDir(e)}catch{return null}}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.request(`DELETE`,this.toSourcePath(t));if(n.status===404)throw new r(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new r(`EACCES`,`aem delete denied`,e);if(n.status>=400)throw new r(`EIO`,`aem delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let i=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(i)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.request(`GET`,this.toListPath(e));if(r.status===404){await this.cache.putListing(e,[]);return}if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=l(await r.json());for(let r of i){let i=e?`${e}/${r.name}`:r.name;r.kind===`directory`?n.push(i):await this.classifyFile(i,r.etag??``,t)}await this.cache.putListing(e,i)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.site}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function d(e,t,n){let r=i([{name:`data`,file:{bytes:n,filename:e,contentType:t}}]);return{contentType:r.contentType,body:r.bytes}}function f(e){return e.split(`/`).pop()||`data`}function p(e){let t=e.match(/^da:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid DA source '${e}' — expected da://org/repo[/path]`);return{org:t[1],repo:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var m=class{kind=`da`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=p(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??5242880,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new r(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/source/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}toListPath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/list/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let i={};n&&(i[`if-none-match`]=n.etag);let a=await this.transport({method:`GET`,path:this.toSourcePath(t),headers:i});if(a.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(a.status===404)throw await this.cache.invalidateBody(t),new r(`ENOENT`,`no such file`,e);if(a.status===401||a.status===403)throw new r(`EACCES`,`da access denied`,e);if(a.status>=400)throw new r(`EIO`,`da readFile failed: ${a.status}`,e);let o=a.headers.get(`content-length`),s=o?Number(o):void 0;if(s!==void 0&&s>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let c=new Uint8Array(await a.arrayBuffer());if(c.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let l=a.headers.get(`etag`)??``,u=l.startsWith(`W/`)?l.slice(2):l;return await this.cache.putBody(t,c,u),c}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let i=this.toMountRelative(e),a=await this.cache.getBody(i),o=d(f(e),n(e),t),s={"content-type":o.contentType,"content-length":String(o.body.byteLength)};a?.etag?s[`if-match`]=a.etag.startsWith(`W/`)?a.etag.slice(2):a.etag:a||(s[`if-none-match`]=`*`);let c=()=>this.transport({method:`POST`,path:this.toSourcePath(i),headers:s,body:o.body}),l,u=1;try{l=await c()}catch{u=2,l=await c()}if(l.status===412){if(u===2){let n=await this.transport({method:`HEAD`,path:this.toSourcePath(i)});if(n.status>=400)throw new r(`EIO`,`da reconcile HEAD failed: ${n.status}`,e);let a=n.headers.get(`etag`)??``;await this.cache.putBody(i,t,a);let o=i.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(o);return}await this.cache.invalidateBody(i);try{await this.readFile(e)}catch{}throw new r(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(l.status===401||l.status===403)throw new r(`EACCES`,`da write denied`,e);if(l.status>=400)throw new r(`EIO`,`da writeFile failed: ${l.status}`,e);let p=l.headers.get(`etag`)??``;await this.cache.putBody(i,t,p);let m=i.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(m)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let i=await this.transport({method:`GET`,path:this.toListPath(t)});if(i.status===404)throw new r(`ENOENT`,`no such directory`,e);if(i.status>=400)throw new r(`EIO`,`da list failed: ${i.status}`,e);let a=(await i.json()).map(e=>e.ext?{name:`${e.name}.${e.ext}`,kind:`file`,etag:e.etag,lastModified:e.lastModified}:{name:e.name,kind:`directory`,lastModified:e.lastModified});return await this.cache.putListing(t,a),a}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let i=t.split(`/`),a=i.pop()??``,o=i.join(`/`),s=await this.cache.getListing(o);if(s&&!this.cache.isStale(s.cachedAt)){let t=s.entries.find(e=>e.name===a);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??s.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??s.cachedAt};if(!t)throw new r(`ENOENT`,`no such file or directory`,e)}let c=await this.transport({method:`HEAD`,path:this.toSourcePath(t)});if(c.status===200){let e=Number(c.headers.get(`content-length`)??`0`),t=c.headers.get(`etag`)??``,n=c.headers.get(`last-modified`),r=n?Date.parse(n):0;if(s){let n=s.entries.map(n=>n.name===a&&n.kind===`file`?{...n,size:e,etag:t,lastModified:r}:n);await this.cache.putListing(o,n)}return{kind:`file`,size:e,mtime:r,etag:t}}if(c.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new r(`ENOENT`,`no such file or directory`,e)}throw new r(`EIO`,`da stat failed: ${c.status}`,e)}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.transport({method:`DELETE`,path:this.toSourcePath(t)});if(n.status===404)throw new r(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new r(`EACCES`,`da delete denied`,e);if(n.status>=400)throw new r(`EIO`,`da delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let i=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(i)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.transport({method:`GET`,path:this.toListPath(e)});if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=await r.json(),a=[];for(let r of i)if(r.ext){let n=e?`${e}/${r.name}.${r.ext}`:`${r.name}.${r.ext}`;a.push({name:`${r.name}.${r.ext}`,kind:`file`,etag:r.etag,lastModified:r.lastModified}),await this.classifyFile(n,r.etag,t)}else a.push({name:r.name,kind:`directory`}),n.push(e?`${e}/${r.name}`:r.name);await this.cache.putListing(e,a)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.repo}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function h(e){let t=e.match(/^s3:\/\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid S3 source '${e}' — expected s3://bucket[/prefix]`);return{bucket:t[1],prefix:(t[2]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var g=class{kind=`s3`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=h(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??26214400,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new r(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toS3Key(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``);return[this.parsed.prefix,t].filter(e=>e.length>0).join(`/`)}toMountRelativeKey(e){return this.parsed.prefix?e.slice(this.parsed.prefix.length+1):e}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let i={};n&&(i[`if-none-match`]=n.etag);let a=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:this.toS3Key(t),headers:i});if(a.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(a.status===404)throw await this.cache.invalidateBody(t),new r(`ENOENT`,`no such file`,e);if(a.status===401||a.status===403)throw new r(`EACCES`,`s3 access denied`,e);if(a.status>=400)throw new r(`EIO`,`s3 readFile failed: ${a.status}`,e);let o=a.headers.get(`content-length`),s=o?Number(o):void 0;if(s!==void 0&&s>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes (${s} > ${this.maxBodyBytes})`,e);let c=new Uint8Array(await a.arrayBuffer());if(c.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let l=a.headers.get(`etag`)??``;return await this.cache.putBody(t,c,l),c}async writeFile(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let i=await this.cache.getBody(n),a={"content-type":`application/octet-stream`,"content-length":String(t.byteLength)};i?a[`if-match`]=i.etag:a[`if-none-match`]=`*`;let o=()=>this.transport({method:`PUT`,bucket:this.parsed.bucket,key:this.toS3Key(n),headers:a,body:t}),s,c=1;try{s=await o()}catch{c=2,s=await o()}if(s.status===412){if(c===2){let i=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(i.status>=400)throw new r(`EIO`,`s3 reconcile HEAD failed: ${i.status}`,e);let a=i.headers.get(`etag`)??``;await this.cache.putBody(n,t,a);let o=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(o);return}await this.cache.invalidateBody(n);try{await this.readFile(e)}catch{}throw new r(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(s.status===401||s.status===403)throw new r(`EACCES`,`s3 write denied`,e);if(s.status>=400)throw new r(`EIO`,`s3 writeFile failed: ${s.status}`,e);let l=s.headers.get(`etag`)??``;await this.cache.putBody(n,t,l);let u=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(u)}async listObjectsV2(){let e=[],t;do{let n={"list-type":`2`};this.parsed.prefix&&(n.prefix=`${this.parsed.prefix}/`),t&&(n[`continuation-token`]=t);let i=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:``,query:n});if(i.status>=400)throw new r(`EIO`,`s3 list failed: ${i.status}`,`/`);let a=await i.text(),o=this.parseListingXml(a);e.push(...o.contents),t=o.nextContinuationToken}while(t);return e}parseListingXml(e){let t=[];for(let n of e.matchAll(/<Contents>([\s\S]*?)<\/Contents>/g)){let e=n[1],r=e.match(/<Key>([^<]+)<\/Key>/)?.[1]??``,i=e.match(/<ETag>([^<]+)<\/ETag>/)?.[1]??``,a=e.match(/<Size>([^<]+)<\/Size>/)?.[1]??`0`,o=e.match(/<LastModified>([^<]+)<\/LastModified>/)?.[1]??``;t.push({key:r,etag:i,size:Number(a),lastModified:o?Date.parse(o):0})}return{contents:t,nextContinuationToken:e.match(/<IsTruncated>([^<]+)<\/IsTruncated>/)?.[1]===`true`?e.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/)?.[1]:void 0}}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.listObjectsV2(),i=this.groupByDir(r);for(let[e,t]of i)await this.cache.putListing(e,t);return i.get(t)??[]}groupByDir(e){let t=new Map,n=e=>(t.has(e)||t.set(e,[]),t.get(e));n(``);for(let t of e){let e=this.toMountRelativeKey(t.key).split(`/`),r=e.pop();n(e.join(`/`)).push({name:r,kind:`file`,size:t.size,etag:t.etag,lastModified:t.lastModified});let i=``;for(let t of e){let e=i;i=i?`${i}/${t}`:t;let r=n(e);r.find(e=>e.name===t&&e.kind===`directory`)||r.push({name:t,kind:`directory`}),n(i)}}return t}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.body.byteLength,mtime:n.cachedAt,etag:n.etag};let i=t.split(`/`),a=i.pop()??``,o=i.join(`/`),s=await this.cache.getListing(o);if(s&&!this.cache.isStale(s.cachedAt)){let t=s.entries.find(e=>e.name===a);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??s.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??s.cachedAt};if(!t)throw new r(`ENOENT`,`no such file or directory`,e)}let c=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(t)});if(c.status===200){let e=Number(c.headers.get(`content-length`)??`0`),t=c.headers.get(`etag`)??``,n=c.headers.get(`last-modified`);return{kind:`file`,size:e,mtime:n?Date.parse(n):0,etag:t}}if(c.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new r(`ENOENT`,`no such file or directory`,e)}throw new r(`EIO`,`s3 stat failed: ${c.status}`,e)}async refresh(e){this.assertOpen(`/`);let t=await this.listObjectsV2(),n=new Set(t.map(e=>this.toMountRelativeKey(e.key))),r=new Map(t.map(e=>[this.toMountRelativeKey(e.key),e.etag])),i={added:[],removed:[],changed:[],unchanged:0,errors:[]};for(let e of n){let t=await this.cache.getBody(e),n=r.get(e);t?t.etag===n?i.unchanged++:(await this.cache.invalidateBody(e),i.changed.push(e)):i.added.push(e)}let a=this.groupByDir(t);for(let[e,t]of a)await this.cache.putListing(e,t);if(e?.bodies)for(let e of i.changed)try{await this.readFile(e)}catch(t){i.errors.push({path:e,message:t instanceof Error?t.message:String(t)})}return i}async mkdir(e){}async remove(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t?.recursive)throw new r(`EINVAL`,`recursive remove not yet supported on S3`,e);let i=await this.transport({method:`DELETE`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(i.status===404)throw new r(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new r(`EACCES`,`s3 delete denied`,e);if(i.status>=400)throw new r(`EIO`,`s3 delete failed: ${i.status}`,e);await this.cache.invalidateBody(n);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a)}describe(){return{displayName:this.parsed.prefix?`${this.parsed.bucket}/${this.parsed.prefix}`:this.parsed.bucket,source:this.source,profile:this.profile}}async close(){this.closed||=!0}},_=class extends Error{constructor(e){super(e),this.name=`ProfileNotConfiguredError`}};async function v(){let{getAccounts:e}=await import(`./account-store-CdWvtLK5.js`).then(e=>e.t),t=e().find(e=>e.providerId===`adobe`);if(!t?.accessToken)throw new _(`No Adobe IMS account found. Log in via Settings → Providers → Adobe first.`);return{identity:`adobe-ims`,getBearerToken:async()=>t.accessToken}}let y;function b(e){y=e}function x(){return y}const S=t,C=e,w=new Set([`invalid_profile`,`invalid_request`,`profile_not_configured`,`fetch_failed`,`internal`]),T=new Set([101,103,204,205,304]);function E(e){if(!e.ok)throw e.errorCode===`profile_not_configured`||e.errorCode===`invalid_profile`?new r(`EACCES`,e.error):e.errorCode===`invalid_request`?new r(`EINVAL`,e.error):e.errorCode===`fetch_failed`||e.errorCode===`internal`||w.has(String(e.errorCode))?new r(`EIO`,e.error):new r(`EINVAL`,`mount transport returned unrecognized errorCode '${e.errorCode}': ${e.error}`);let t;try{t=S(e.bodyBase64)}catch(e){throw new r(`EIO`,`mount transport: response body decode failed: ${e instanceof Error?e.message:String(e)}`)}let n=T.has(e.status)?null:t;return new Response(n,{status:e.status,headers:new Headers(e.headers)})}function D(e,t){return t===void 0?e===`node-rest`?` (SLICC backend at localhost may not be running)`:e===`extension-direct`||e===`extension-delegate`?` (extension service worker not responding)`:``:``}async function O(e){let t=x();if(!t)throw new r(`EIO`,`mount transport unavailable: setMountCapabilityBroker was never called for this float (composition bug — refusing to guess a transport for a privileged sign-and-forward request)`);let n=await t.mounts.signRequest(e);if(!n.ok){let e=`status`in n?n.status:void 0;throw new r(`EIO`,`mount transport failed: ${n.message}${D(t.adapter,e)}`)}return n.value}function k(e){return async t=>E(await O({backend:`s3`,envelope:{profile:e,method:t.method,bucket:t.bucket,key:t.key,query:t.query,headers:t.headers,bodyBase64:t.body?C(t.body):void 0}}))}function A(e){let t=e?.getImsToken??(async()=>(await v()).getBearerToken());return async e=>{let n;try{n=await t()}catch(e){throw new r(`EACCES`,`DA mount: ${e instanceof Error?e.message:String(e)}`)}return E(await O({backend:`da`,envelope:{imsToken:n,method:e.method,path:e.path,origin:e.origin,query:e.query,headers:e.headers,bodyBase64:e.body?C(e.body):void 0}}))}}export{m as a,g as i,k as n,a as o,b as r,u as s,A as t};
|
|
1
|
+
import{r as e,t}from"./base64-BPBW1Gzr.js";import{t as n}from"./mime-types-D7IV6i7k.js";import{t as r}from"./types-D8gIX-W-.js";import{n as i}from"./multipart-form-data-DopbgwRR.js";const a=`https://api.aem.live`;function o(e){let t=e.match(/^aem:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid AEM source '${e}' — expected aem://org/site[/path]`);return{org:t[1],site:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}function s(e){if(!e)return``;let t=Date.parse(e);return Number.isNaN(t)?``:String(t)}function c(e){let t=Date.parse(e??``);return Number.isNaN(t)?0:t}function l(e){return e.map(e=>e[`content-type`]===`application/folder`||e.name.endsWith(`/`)?{name:e.name.replace(/\/+$/,``),kind:`directory`}:{name:e.name,kind:`file`,size:e.size,etag:s(e[`last-modified`]),lastModified:c(e[`last-modified`])})}var u=class{kind=`aem`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=o(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??5242880,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new r(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`),r=`/${this.parsed.org}/sites/${this.parsed.site}/source`;return n?`${r}/${n}`:r}toListPath(e){return`${this.toSourcePath(e)}/`}request(e,t,n){return this.transport({method:e,path:t,origin:a,headers:n?.headers,body:n?.body})}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let i=await this.request(`GET`,this.toSourcePath(t));if(i.status===404)throw await this.cache.invalidateBody(t),new r(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new r(`EACCES`,`aem access denied`,e);if(i.status>=400)throw new r(`EIO`,`aem readFile failed: ${i.status}`,e);let a=new Uint8Array(await i.arrayBuffer());if(a.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);return await this.cache.putBody(t,a,s(i.headers.get(`last-modified`))),a}async assertUnchanged(e,t,n){if(!n)return;let i=await this.request(`HEAD`,this.toSourcePath(t));if(i.status===404)return;if(i.status>=400)throw new r(`EIO`,`aem precondition HEAD failed: ${i.status}`,e);let a=s(i.headers.get(`last-modified`));if(a&&a!==n)throw await this.cache.invalidateBody(t),new r(`EBUSY`,`remote modified since last read — re-read and retry`,e)}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let n=this.toMountRelative(e),i=await this.cache.getBody(n);await this.assertUnchanged(e,n,i?.etag??``);let a=await this.request(`PUT`,this.toSourcePath(n),{body:t});if(a.status===401||a.status===403)throw new r(`EACCES`,`aem write denied`,e);if(a.status>=400)throw new r(`EIO`,`aem writeFile failed: ${a.status}`,e);await this.cache.invalidateBody(n);let o=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(o)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let i=await this.request(`GET`,this.toListPath(t));if(i.status===404)throw new r(`ENOENT`,`no such directory`,e);if(i.status===401||i.status===403)throw new r(`EACCES`,`aem access denied`,e);if(i.status>=400)throw new r(`EIO`,`aem list failed: ${i.status}`,e);let a=l(await i.json());return await this.cache.putListing(t,a),a}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e);if(t===``)return{kind:`directory`,size:0,mtime:0};let n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let i=t.split(`/`),a=i.pop()??``,o=i.join(`/`),s=await this.cache.getListing(o),c=(s&&!this.cache.isStale(s.cachedAt)?s.entries:await this.readDirQuietly(o))?.find(e=>e.name===a);if(!c)throw new r(`ENOENT`,`no such file or directory`,e);return c.kind===`directory`?{kind:`directory`,size:0,mtime:c.lastModified??0}:{kind:`file`,size:c.size??0,mtime:c.lastModified??0,etag:c.etag??``}}async readDirQuietly(e){try{return await this.readDir(e)}catch{return null}}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.request(`DELETE`,this.toSourcePath(t));if(n.status===404)throw new r(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new r(`EACCES`,`aem delete denied`,e);if(n.status>=400)throw new r(`EIO`,`aem delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let i=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(i)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.request(`GET`,this.toListPath(e));if(r.status===404){await this.cache.putListing(e,[]);return}if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=l(await r.json());for(let r of i){let i=e?`${e}/${r.name}`:r.name;r.kind===`directory`?n.push(i):await this.classifyFile(i,r.etag??``,t)}await this.cache.putListing(e,i)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.site}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function d(e,t,n){let r=i([{name:`data`,file:{bytes:n,filename:e,contentType:t}}]);return{contentType:r.contentType,body:r.bytes}}function f(e){return e.split(`/`).pop()||`data`}function p(e){let t=e.match(/^da:\/\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid DA source '${e}' — expected da://org/repo[/path]`);return{org:t[1],repo:t[2],path:(t[3]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var m=class{kind=`da`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=p(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??5242880,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new r(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toSourcePath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/source/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}toListPath(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``),n=[this.parsed.path,t].filter(e=>e.length>0).join(`/`);return`/list/${this.parsed.org}/${this.parsed.repo}${n?`/${n}`:``}`}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let i={};n&&(i[`if-none-match`]=n.etag);let a=await this.transport({method:`GET`,path:this.toSourcePath(t),headers:i});if(a.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(a.status===404)throw await this.cache.invalidateBody(t),new r(`ENOENT`,`no such file`,e);if(a.status===401||a.status===403)throw new r(`EACCES`,`da access denied`,e);if(a.status>=400)throw new r(`EIO`,`da readFile failed: ${a.status}`,e);let o=a.headers.get(`content-length`),s=o?Number(o):void 0;if(s!==void 0&&s>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let c=new Uint8Array(await a.arrayBuffer());if(c.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let l=a.headers.get(`etag`)??``,u=l.startsWith(`W/`)?l.slice(2):l;return await this.cache.putBody(t,c,u),c}async writeFile(e,t){if(this.assertOpen(e),t.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let i=this.toMountRelative(e),a=await this.cache.getBody(i),o=d(f(e),n(e),t),s={"content-type":o.contentType,"content-length":String(o.body.byteLength)};a?.etag?s[`if-match`]=a.etag.startsWith(`W/`)?a.etag.slice(2):a.etag:a||(s[`if-none-match`]=`*`);let c=()=>this.transport({method:`POST`,path:this.toSourcePath(i),headers:s,body:o.body}),l,u=1;try{l=await c()}catch{u=2,l=await c()}if(l.status===412){if(u===2){let n=await this.transport({method:`HEAD`,path:this.toSourcePath(i)});if(n.status>=400)throw new r(`EIO`,`da reconcile HEAD failed: ${n.status}`,e);let a=n.headers.get(`etag`)??``;await this.cache.putBody(i,t,a);let o=i.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(o);return}await this.cache.invalidateBody(i);try{await this.readFile(e)}catch{}throw new r(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(l.status===401||l.status===403)throw new r(`EACCES`,`da write denied`,e);if(l.status>=400)throw new r(`EIO`,`da writeFile failed: ${l.status}`,e);let p=l.headers.get(`etag`)??``;await this.cache.putBody(i,t,p);let m=i.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(m)}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let i=await this.transport({method:`GET`,path:this.toListPath(t)});if(i.status===404)throw new r(`ENOENT`,`no such directory`,e);if(i.status>=400)throw new r(`EIO`,`da list failed: ${i.status}`,e);let a=(await i.json()).map(e=>e.ext?{name:`${e.name}.${e.ext}`,kind:`file`,etag:e.etag,lastModified:e.lastModified}:{name:e.name,kind:`directory`,lastModified:e.lastModified});return await this.cache.putListing(t,a),a}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.size,mtime:n.cachedAt,etag:n.etag};let i=t.split(`/`),a=i.pop()??``,o=i.join(`/`),s=await this.cache.getListing(o);if(s&&!this.cache.isStale(s.cachedAt)){let t=s.entries.find(e=>e.name===a);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??s.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??s.cachedAt};if(!t)throw new r(`ENOENT`,`no such file or directory`,e)}let c=await this.transport({method:`HEAD`,path:this.toSourcePath(t)});if(c.status===200){let e=Number(c.headers.get(`content-length`)??`0`),t=c.headers.get(`etag`)??``,n=c.headers.get(`last-modified`),r=n?Date.parse(n):0;if(s){let n=s.entries.map(n=>n.name===a&&n.kind===`file`?{...n,size:e,etag:t,lastModified:r}:n);await this.cache.putListing(o,n)}return{kind:`file`,size:e,mtime:r,etag:t}}if(c.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new r(`ENOENT`,`no such file or directory`,e)}throw new r(`EIO`,`da stat failed: ${c.status}`,e)}async mkdir(e){}async remove(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.transport({method:`DELETE`,path:this.toSourcePath(t)});if(n.status===404)throw new r(`ENOENT`,`no such file`,e);if(n.status===401||n.status===403)throw new r(`EACCES`,`da delete denied`,e);if(n.status>=400)throw new r(`EIO`,`da delete failed: ${n.status}`,e);await this.cache.invalidateBody(t);let i=t.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(i)}async refresh(e){this.assertOpen(`/`);let t={added:[],removed:[],changed:[],unchanged:0,errors:[]},n=[``];for(;n.length>0;){let e=n.pop();try{await this.refreshDir(e,t,n)}catch(n){t.errors.push({path:e,message:n instanceof Error?n.message:String(n)})}}return e?.bodies&&await this.refreshBodies(t),t}async classifyFile(e,t,n){let r=await this.cache.getBody(e);r?t&&r.etag!==t?(await this.cache.invalidateBody(e),n.changed.push(e)):n.unchanged++:n.added.push(e)}async refreshDir(e,t,n){let r=await this.transport({method:`GET`,path:this.toListPath(e)});if(r.status>=400){t.errors.push({path:e,message:`list failed: ${r.status}`});return}let i=await r.json(),a=[];for(let r of i)if(r.ext){let n=e?`${e}/${r.name}.${r.ext}`:`${r.name}.${r.ext}`;a.push({name:`${r.name}.${r.ext}`,kind:`file`,etag:r.etag,lastModified:r.lastModified}),await this.classifyFile(n,r.etag,t)}else a.push({name:r.name,kind:`directory`}),n.push(e?`${e}/${r.name}`:r.name);await this.cache.putListing(e,a)}async refreshBodies(e){for(let t of e.changed)try{await this.readFile(t)}catch(n){e.errors.push({path:t,message:n instanceof Error?n.message:String(n)})}}describe(){return{displayName:`${this.parsed.org}/${this.parsed.repo}${this.parsed.path?`/${this.parsed.path}`:``}`,source:this.source,profile:this.profile}}async close(){this.closed||=!0}};function h(e){let t=e.match(/^s3:\/\/([^/]+)(?:\/(.*))?$/);if(!t)throw Error(`invalid S3 source '${e}' — expected s3://bucket[/prefix]`);return{bucket:t[1],prefix:(t[2]??``).replace(/^\/+/,``).replace(/\/+$/,``)}}var g=class{kind=`s3`;source;profile;mountId;parsed;cache;maxBodyBytes;transport;closed=!1;constructor(e){this.source=e.source,this.profile=e.profile,this.mountId=e.mountId??crypto.randomUUID(),this.parsed=h(e.source),this.cache=e.cache,this.maxBodyBytes=e.maxBodyBytes??26214400,this.transport=e.signedFetch}assertOpen(e){if(this.closed)throw new r(`EBADF`,`mount closed`,e)}toMountRelative(e){return e.replace(/^\/+/,``)}toS3Key(e){let t=e.replace(/^\/+/,``).replace(/\/+$/,``);return[this.parsed.prefix,t].filter(e=>e.length>0).join(`/`)}toMountRelativeKey(e){return this.parsed.prefix?e.slice(this.parsed.prefix.length+1):e}async readFile(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n&&!this.cache.isStale(n.cachedAt))return n.body;let i={};n&&(i[`if-none-match`]=n.etag);let a=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:this.toS3Key(t),headers:i});if(a.status===304&&n)return await this.cache.putBody(t,n.body,n.etag),n.body;if(a.status===404)throw await this.cache.invalidateBody(t),new r(`ENOENT`,`no such file`,e);if(a.status===401||a.status===403)throw new r(`EACCES`,`s3 access denied`,e);if(a.status>=400)throw new r(`EIO`,`s3 readFile failed: ${a.status}`,e);let o=a.headers.get(`content-length`),s=o?Number(o):void 0;if(s!==void 0&&s>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes (${s} > ${this.maxBodyBytes})`,e);let c=new Uint8Array(await a.arrayBuffer());if(c.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let l=a.headers.get(`etag`)??``;return await this.cache.putBody(t,c,l),c}async writeFile(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t.byteLength>this.maxBodyBytes)throw new r(`EFBIG`,`body exceeds maxBodyBytes`,e);let i=await this.cache.getBody(n),a={"content-type":`application/octet-stream`,"content-length":String(t.byteLength)};i?a[`if-match`]=i.etag:a[`if-none-match`]=`*`;let o=()=>this.transport({method:`PUT`,bucket:this.parsed.bucket,key:this.toS3Key(n),headers:a,body:t}),s,c=1;try{s=await o()}catch{c=2,s=await o()}if(s.status===412){if(c===2){let i=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(i.status>=400)throw new r(`EIO`,`s3 reconcile HEAD failed: ${i.status}`,e);let a=i.headers.get(`etag`)??``;await this.cache.putBody(n,t,a);let o=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(o);return}await this.cache.invalidateBody(n);try{await this.readFile(e)}catch{}throw new r(`EBUSY`,`remote modified since last read — re-read and retry`,e)}if(s.status===401||s.status===403)throw new r(`EACCES`,`s3 write denied`,e);if(s.status>=400)throw new r(`EIO`,`s3 writeFile failed: ${s.status}`,e);let l=s.headers.get(`etag`)??``;await this.cache.putBody(n,t,l);let u=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(u)}async listObjectsV2(){let e=[],t;do{let n={"list-type":`2`};this.parsed.prefix&&(n.prefix=`${this.parsed.prefix}/`),t&&(n[`continuation-token`]=t);let i=await this.transport({method:`GET`,bucket:this.parsed.bucket,key:``,query:n});if(i.status>=400)throw new r(`EIO`,`s3 list failed: ${i.status}`,`/`);let a=await i.text(),o=this.parseListingXml(a);e.push(...o.contents),t=o.nextContinuationToken}while(t);return e}parseListingXml(e){let t=[];for(let n of e.matchAll(/<Contents>([\s\S]*?)<\/Contents>/g)){let e=n[1],r=e.match(/<Key>([^<]+)<\/Key>/)?.[1]??``,i=e.match(/<ETag>([^<]+)<\/ETag>/)?.[1]??``,a=e.match(/<Size>([^<]+)<\/Size>/)?.[1]??`0`,o=e.match(/<LastModified>([^<]+)<\/LastModified>/)?.[1]??``;t.push({key:r,etag:i,size:Number(a),lastModified:o?Date.parse(o):0})}return{contents:t,nextContinuationToken:e.match(/<IsTruncated>([^<]+)<\/IsTruncated>/)?.[1]===`true`?e.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/)?.[1]:void 0}}async readDir(e){this.assertOpen(e);let t=this.toMountRelative(e).replace(/\/+$/,``),n=await this.cache.getListing(t);if(n&&!this.cache.isStale(n.cachedAt))return n.entries;let r=await this.listObjectsV2(),i=this.groupByDir(r);for(let[e,t]of i)await this.cache.putListing(e,t);return i.get(t)??[]}groupByDir(e){let t=new Map,n=e=>(t.has(e)||t.set(e,[]),t.get(e));n(``);for(let t of e){let e=this.toMountRelativeKey(t.key).split(`/`),r=e.pop();n(e.join(`/`)).push({name:r,kind:`file`,size:t.size,etag:t.etag,lastModified:t.lastModified});let i=``;for(let t of e){let e=i;i=i?`${i}/${t}`:t;let r=n(e);r.find(e=>e.name===t&&e.kind===`directory`)||r.push({name:t,kind:`directory`}),n(i)}}return t}async stat(e){this.assertOpen(e);let t=this.toMountRelative(e),n=await this.cache.getBody(t);if(n)return{kind:`file`,size:n.body.byteLength,mtime:n.cachedAt,etag:n.etag};let i=t.split(`/`),a=i.pop()??``,o=i.join(`/`),s=await this.cache.getListing(o);if(s&&!this.cache.isStale(s.cachedAt)){let t=s.entries.find(e=>e.name===a);if(t?.kind===`file`&&t.size!==void 0)return{kind:`file`,size:t.size,mtime:t.lastModified??s.cachedAt,etag:t.etag??``};if(t?.kind===`directory`)return{kind:`directory`,size:0,mtime:t.lastModified??s.cachedAt};if(!t)throw new r(`ENOENT`,`no such file or directory`,e)}let c=await this.transport({method:`HEAD`,bucket:this.parsed.bucket,key:this.toS3Key(t)});if(c.status===200){let e=Number(c.headers.get(`content-length`)??`0`),t=c.headers.get(`etag`)??``,n=c.headers.get(`last-modified`);return{kind:`file`,size:e,mtime:n?Date.parse(n):0,etag:t}}if(c.status===404){let n=await this.cache.getListing(t);if(n)return{kind:`directory`,size:0,mtime:n.cachedAt};throw new r(`ENOENT`,`no such file or directory`,e)}throw new r(`EIO`,`s3 stat failed: ${c.status}`,e)}async refresh(e){this.assertOpen(`/`);let t=await this.listObjectsV2(),n=new Set(t.map(e=>this.toMountRelativeKey(e.key))),r=new Map(t.map(e=>[this.toMountRelativeKey(e.key),e.etag])),i={added:[],removed:[],changed:[],unchanged:0,errors:[]};for(let e of n){let t=await this.cache.getBody(e),n=r.get(e);t?t.etag===n?i.unchanged++:(await this.cache.invalidateBody(e),i.changed.push(e)):i.added.push(e)}let a=this.groupByDir(t);for(let[e,t]of a)await this.cache.putListing(e,t);if(e?.bodies)for(let e of i.changed)try{await this.readFile(e)}catch(t){i.errors.push({path:e,message:t instanceof Error?t.message:String(t)})}return i}async mkdir(e){}async remove(e,t){this.assertOpen(e);let n=this.toMountRelative(e);if(t?.recursive)throw new r(`EINVAL`,`recursive remove not yet supported on S3`,e);let i=await this.transport({method:`DELETE`,bucket:this.parsed.bucket,key:this.toS3Key(n)});if(i.status===404)throw new r(`ENOENT`,`no such file`,e);if(i.status===401||i.status===403)throw new r(`EACCES`,`s3 delete denied`,e);if(i.status>=400)throw new r(`EIO`,`s3 delete failed: ${i.status}`,e);await this.cache.invalidateBody(n);let a=n.split(`/`).slice(0,-1).join(`/`);await this.cache.invalidateListing(a)}describe(){return{displayName:this.parsed.prefix?`${this.parsed.bucket}/${this.parsed.prefix}`:this.parsed.bucket,source:this.source,profile:this.profile}}async close(){this.closed||=!0}},_=class extends Error{constructor(e){super(e),this.name=`ProfileNotConfiguredError`}};async function v(){let{getAccounts:e}=await import(`./account-store-Br2mSpab.js`).then(e=>e.t),t=e().find(e=>e.providerId===`adobe`);if(!t?.accessToken)throw new _(`No Adobe IMS account found. Log in via Settings → Providers → Adobe first.`);return{identity:`adobe-ims`,getBearerToken:async()=>t.accessToken}}let y;function b(e){y=e}function x(){return y}const S=t,C=e,w=new Set([`invalid_profile`,`invalid_request`,`profile_not_configured`,`fetch_failed`,`internal`]),T=new Set([101,103,204,205,304]);function E(e){if(!e.ok)throw e.errorCode===`profile_not_configured`||e.errorCode===`invalid_profile`?new r(`EACCES`,e.error):e.errorCode===`invalid_request`?new r(`EINVAL`,e.error):e.errorCode===`fetch_failed`||e.errorCode===`internal`||w.has(String(e.errorCode))?new r(`EIO`,e.error):new r(`EINVAL`,`mount transport returned unrecognized errorCode '${e.errorCode}': ${e.error}`);let t;try{t=S(e.bodyBase64)}catch(e){throw new r(`EIO`,`mount transport: response body decode failed: ${e instanceof Error?e.message:String(e)}`)}let n=T.has(e.status)?null:t;return new Response(n,{status:e.status,headers:new Headers(e.headers)})}function D(e,t){return t===void 0?e===`node-rest`?` (SLICC backend at localhost may not be running)`:e===`extension-direct`||e===`extension-delegate`?` (extension service worker not responding)`:``:``}async function O(e){let t=x();if(!t)throw new r(`EIO`,`mount transport unavailable: setMountCapabilityBroker was never called for this float (composition bug — refusing to guess a transport for a privileged sign-and-forward request)`);let n=await t.mounts.signRequest(e);if(!n.ok){let e=`status`in n?n.status:void 0;throw new r(`EIO`,`mount transport failed: ${n.message}${D(t.adapter,e)}`)}return n.value}function k(e){return async t=>E(await O({backend:`s3`,envelope:{profile:e,method:t.method,bucket:t.bucket,key:t.key,query:t.query,headers:t.headers,bodyBase64:t.body?C(t.body):void 0}}))}function A(e){let t=e?.getImsToken??(async()=>(await v()).getBearerToken());return async e=>{let n;try{n=await t()}catch(e){throw new r(`EACCES`,`DA mount: ${e instanceof Error?e.message:String(e)}`)}return E(await O({backend:`da`,envelope:{imsToken:n,method:e.method,path:e.path,origin:e.origin,query:e.query,headers:e.headers,bodyBase64:e.body?C(e.body):void 0}}))}}export{m as a,g as i,k as n,a as o,b as r,u as s,A as t};
|
package/dist/ui/assets/{silent-renew-backoff-CYQP7u_w.js → silent-renew-backoff-ThMSvZZl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./bridge-protocol-C52CnDIj.js";import{M as e}from"./main-
|
|
1
|
+
import"./bridge-protocol-C52CnDIj.js";import{M as e}from"./main-BxJYvn2p.js";function t(t){try{let n=new URL(t);return n.searchParams.has(`bridge`)?!0:!e(n.hostname)}catch{return!1}}function n(n,r){let i=t(n.pageHref),a=r();if(i){if(n.configuredRedirectUri){let t=``;try{t=new URL(n.configuredRedirectUri).origin}catch{t=``}if(t&&n.pageOrigin===t){let e=btoa(JSON.stringify({source:`opener`,path:`/auth/callback`,nonce:a}));return{redirectUri:n.configuredRedirectUri,oauthState:e,expectedNonce:a,source:`opener`}}let r=null;try{r=new URL(n.pageHref)}catch{r=null}if(r!==null&&r.protocol===`http:`&&e(r.hostname)&&r.port!==``&&r){let e=parseInt(r.port,10),t=btoa(JSON.stringify({source:`local`,port:e,path:`/auth/callback`,nonce:a}));return{redirectUri:n.configuredRedirectUri,oauthState:t,expectedNonce:a,source:`local`}}}return{redirectUri:`${n.pageOrigin}/auth/callback`,oauthState:btoa(JSON.stringify({source:`opener`,path:`/auth/callback`,nonce:a})),expectedNonce:a,source:`opener`}}let o=n.configuredRedirectUri??`${n.pageOrigin}/auth/callback`,s=parseInt(new URL(n.pageHref).port||`5710`,10);return{redirectUri:o,oauthState:btoa(JSON.stringify({port:s,path:`/auth/callback`,nonce:a})),expectedNonce:a,source:`local`}}var r=3e5;function i(e=r){let t=0;return{async run(n,r=Date.now()){if(r<t)return null;let i=null;try{i=await n()}catch(e){console.debug(`[silent-renew-backoff] renew threw:`,e instanceof Error?e.message:String(e)),i=null}return t=i?0:r+e,i},inCooldown(e=Date.now()){return e<t}}}export{n,t as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./slicc-editor-DZXa2pZw.js";window.__SLICC_CM6__={StreamLanguage:e};
|