sliccy 6.154.2 → 6.154.3
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 +166 -166
- package/dist/ui/assets/SKILL-BGww2dFz.js +1 -0
- package/dist/ui/assets/{SKILL-cqUV8C7U.js → SKILL-Cl9PVarg.js} +1 -1
- package/dist/ui/assets/{account-store-BSWxmlJm.js → account-store-BYDUpeqo.js} +1 -1
- package/dist/ui/assets/{account-store-BZdeVW0x.js → account-store-BvEgWXDi.js} +1 -1
- package/dist/ui/assets/{adobe-BKDJ9PXB.js → adobe-Bf44Mdem.js} +1 -1
- package/dist/ui/assets/{adobe-Do7ppUu_.js → adobe-DIeHS2Yx.js} +1 -1
- package/dist/ui/assets/{agent-bridge-DKIVd0zM.js → agent-bridge-pmiSNwoc.js} +1 -1
- package/dist/ui/assets/{agent-panels-CERHjYbV.js → agent-panels-CWBbnFvW.js} +1 -1
- package/dist/ui/assets/api-endpoint-3qEcn7BY.js +1 -0
- package/dist/ui/assets/{apply-layout-cMZU1oiO.js → apply-layout-Eft8a3mq.js} +1 -1
- package/dist/ui/assets/{apps-DBeGXxMQ.js → apps-BklKPyC6.js} +1 -1
- package/dist/ui/assets/{auto-mount-table-0jMTi9rV.js → auto-mount-table-BDyGIOIb.js} +1 -1
- package/dist/ui/assets/{azure-openai-B7F3oYWt.js → azure-openai-7VfJn11R.js} +1 -1
- package/dist/ui/assets/{azure-openai-CYw20Rb5.js → azure-openai-o6cG2UDZ.js} +1 -1
- package/dist/ui/assets/{backend-hostfs-BxfjZHzO.js → backend-hostfs-BJU2QL9q.js} +1 -1
- package/dist/ui/assets/{budget-usage-source-nJeiDJgA.js → budget-usage-source-B5GSAynq.js} +1 -1
- package/dist/ui/assets/{cdp-C0EXef8t.js → cdp-Di9nU0k7.js} +1 -1
- package/dist/ui/assets/{cerebras-DmWJf3th.js → cerebras-BRpdCI1J.js} +1 -1
- package/dist/ui/assets/{cerebras-B2Urbvva.js → cerebras-DuUgRhfz.js} +1 -1
- package/dist/ui/assets/{client-BOSdqiLb.js → client-B6iKb_ye.js} +1 -1
- package/dist/ui/assets/{composer-speech-BNHWaL3y.js → composer-speech-Chlrvbhg.js} +1 -1
- package/dist/ui/assets/{connect-surface-ig8ePsTv.js → connect-surface-DBXtjfUP.js} +1 -1
- package/dist/ui/assets/{core-D59qaXEb.js → core-C9qgaWgE.js} +2 -2
- package/dist/ui/assets/{directed-approval-B-TQlMYu.js → directed-approval-C2OTs8pv.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-uGHvkmNC.js → ensure-speech-assets-DOu9EHnU.js} +1 -1
- package/dist/ui/assets/{extension-ops-B9_1VB7W.js → extension-ops-B05mAXsq.js} +1 -1
- package/dist/ui/assets/{fs-D5MhOzXY.js → fs-Dqh17T5J.js} +2 -2
- package/dist/ui/assets/{fs-CY5pwJnY.js → fs-T4T9WqhX.js} +1 -1
- package/dist/ui/assets/{github-C0Ge88be.js → github-CL_7yoHL.js} +1 -1
- package/dist/ui/assets/github-auth-A6Mopmg8.js +1 -0
- package/dist/ui/assets/{github-copilot-socdhqrE.js → github-copilot-B2ugBoRh.js} +1 -1
- package/dist/ui/assets/{github-copilot-CZaiYWHF.js → github-copilot-_5qoxGCT.js} +1 -1
- package/dist/ui/assets/github-install-8yCqacop.js +1 -0
- package/dist/ui/assets/{github-B-Bd_nZ-.js → github-koUNqi7Y.js} +2 -2
- package/dist/ui/assets/github-zip-CV41OIqx.js +1 -0
- package/dist/ui/assets/{guest-tool-gate-6uzbOlEb.js → guest-tool-gate-_NuvhpkB.js} +1 -1
- package/dist/ui/assets/{hear-Ghdnf7n1.js → hear-DScAQlnK.js} +1 -1
- package/dist/ui/assets/{help-hIoQhrvq.js → help-BvOxNE_5.js} +1 -1
- package/dist/ui/assets/{js-realm-worker-DWUez8Bj.js → js-realm-worker-fE5Mi5F2.js} +1 -1
- package/dist/ui/assets/{kernel-worker-DOOSpFVG.js → kernel-worker-DURzH7I0.js} +49 -48
- package/dist/ui/assets/{lick-urls-HYeTtmbf.js → lick-urls-BZVq_P3x.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-DqmithfF.js → lick-ws-bridge-CDToX4F0.js} +1 -1
- package/dist/ui/assets/{local-llm-DUeCZi0o.js → local-llm-D_HQ1XG8.js} +1 -1
- package/dist/ui/assets/{local-llm-Bi5_jnDv.js → local-llm-QN3Afs2P.js} +1 -1
- package/dist/ui/assets/{main-BBsnqT-n.js → main-DyPgoSsm.js} +3 -3
- package/dist/ui/assets/{main-cherry-Dx-6EGAA.js → main-cherry-v6ksBa29.js} +1 -1
- package/dist/ui/assets/{memory-curation-seam-6Ye5fb1z.js → memory-curation-seam-DXGqoWuF.js} +1 -1
- package/dist/ui/assets/{mount-BJWo4gr-.js → mount-CdTXGHvm.js} +3 -3
- package/dist/ui/assets/{mount-Dq_fD8nk.js → mount-Drg9K5Dc.js} +1 -1
- package/dist/ui/assets/{mount-bridge-client-B5qLR9Xe.js → mount-bridge-client-DWY67yip.js} +1 -1
- package/dist/ui/assets/{mount-recovery-2IXcFTPg.js → mount-recovery-CUhmg6UT.js} +1 -1
- package/dist/ui/assets/{new-session-yJbhj5MZ.js → new-session-BBCvIUGf.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-B1nxEXuw.js → oauth-bootstrap-37qdAFNO.js} +2 -2
- package/dist/ui/assets/{oauth-service-BZl-9EoE.js → oauth-service-IlBYPvwr.js} +1 -1
- package/dist/ui/assets/{onboarding-orchestrator-Bzd3eyDB.js → onboarding-orchestrator-CgzN2Wut.js} +1 -1
- package/dist/ui/assets/{openai-codex-Blu70lOC.js → openai-codex-CByg7ExV.js} +1 -1
- package/dist/ui/assets/{openai-codex-CRux_5Io.js → openai-codex-yA937LOi.js} +1 -1
- package/dist/ui/assets/{openrouter-D5FrXcZn.js → openrouter-Bq9TiHqe.js} +1 -1
- package/dist/ui/assets/{openrouter-BwyOovNP.js → openrouter-D1YZxJcz.js} +1 -1
- package/dist/ui/assets/{openrouter-free-73roMQJB.js → openrouter-free-BwEyNzqx.js} +1 -1
- package/dist/ui/assets/{openrouter-free-C6PmJYd9.js → openrouter-free-Db1fart9.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-DWlKSVgT.js → openrouter-oauth-CFlNuCUA.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-D6eTjtsZ.js → openrouter-oauth-Cj61jTQa.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-3YsyA58r.js → panel-rpc-handlers-CLsTGXPT.js} +2 -2
- package/dist/ui/assets/{panelize-shell-DE_uUThR.js → panelize-shell-Bf9yr7Qf.js} +1 -1
- package/dist/ui/assets/{port-bridge-client-CzOd_VUf.js → port-bridge-client-Ds3xwapn.js} +1 -1
- package/dist/ui/assets/provenance-DdmsQ3Nr.js +1 -0
- package/dist/ui/assets/{provider-PKpn_LmL.js → provider-BD-0pPN8.js} +1 -1
- package/dist/ui/assets/{provider-kiXfL_mq.js → provider-C66yENxs.js} +2 -2
- package/dist/ui/assets/provider-settings-DysstkNf.js +1 -0
- package/dist/ui/assets/provider-store-access-BeX0OGEs.js +1 -0
- package/dist/ui/assets/provider-store-access-Cc45yVjV.js +1 -0
- package/dist/ui/assets/{providers-B7K9U_fm.js → providers-BtR_Oc-m.js} +2 -2
- package/dist/ui/assets/{providers-e1sU7s6k.js → providers-C2bj3jKv.js} +1 -1
- package/dist/ui/assets/proxied-fetch-DEK8DT-z.js +1 -0
- package/dist/ui/assets/{quick-llm-fE1NE1pP.js → quick-llm-D-nM71kO.js} +1 -1
- package/dist/ui/assets/{recovery-screen-yZ7MZWap.js → recovery-screen-YuMG99R0.js} +1 -1
- package/dist/ui/assets/{redirect-uri-C6BjkDE0.js → redirect-uri-CgKdq7-K.js} +1 -1
- package/dist/ui/assets/rest-ops-Bps3Ay-k.js +1 -0
- package/dist/ui/assets/{run-CJHbh10K.js → run-CDicdmnK.js} +1 -1
- package/dist/ui/assets/{run-WYZqOFOH.js → run-CdzvBpS0.js} +3 -3
- package/dist/ui/assets/{run-Ce3yzmAj.js → run-D5LoTYwZ.js} +1 -1
- package/dist/ui/assets/{secrets-bridge-client-DBeju3mP.js → secrets-bridge-client-ZpBL1Zhl.js} +1 -1
- package/dist/ui/assets/{session-jsonl-1Tumjx5q.js → session-jsonl-By2mMQqb.js} +1 -1
- package/dist/ui/assets/{setup-feature-flags-remote-Bjk9XIgB.js → setup-feature-flags-remote-BuBwyibG.js} +1 -1
- package/dist/ui/assets/sidecar-repair-DRkuMyU_.js +1 -0
- package/dist/ui/assets/{silent-renew-backoff-Djz3wKFS.js → silent-renew-backoff-CS_htRXY.js} +1 -1
- package/dist/ui/assets/{skills-CyxZ_qdB.js → skills-Cg34jB8I.js} +1 -1
- package/dist/ui/assets/slicc-version-DbT116fI.js +1 -0
- package/dist/ui/assets/{snapshot-3Qf38DNo.js → snapshot-B6SF0dpr.js} +1 -1
- package/dist/ui/assets/{snapshot-features-BPOMdL3k.js → snapshot-features-A-jmNbR9.js} +1 -1
- package/dist/ui/assets/{soundscape-B2mWrlHy.js → soundscape-smt9sQsm.js} +1 -1
- package/dist/ui/assets/{speak-CDJ0RzHm.js → speak-DeYQY3R8.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-CpaUQQdp.js → sprinkle-manager-q3Ku7Zvz.js} +1 -1
- package/dist/ui/assets/{sprinkle-renderer-xqSZhBNo.js → sprinkle-renderer-B9Re-_rl.js} +1 -1
- package/dist/ui/assets/{state-C-GUxpCw.js → state-NPdZC8rd.js} +1 -1
- package/dist/ui/assets/{store-DNbNsvQ5.js → store-BbRPb7Di.js} +1 -1
- package/dist/ui/assets/{store-BpCQUWkE.js → store-BfdKxUK3.js} +1 -1
- package/dist/ui/assets/{sudo-HwABgE4V.js → sudo-CtUlj7iw.js} +1 -1
- package/dist/ui/assets/{sync-dialog-BjaW5TBb.js → sync-dialog-CXgM1Uvh.js} +1 -1
- package/dist/ui/assets/{transformers-env-Xlg2tROb.js → transformers-env-C7dJtjmn.js} +1 -1
- package/dist/ui/assets/{tray-runtime-config--rtR6Gxd.js → tray-runtime-config-CRZxBChd.js} +1 -1
- package/dist/ui/assets/{tray-sidecar-KbAtqLcw.js → tray-sidecar-BtFzGslJ.js} +1 -1
- package/dist/ui/assets/types-Dzr0qYl3.js +1 -0
- package/dist/ui/assets/{upgrade-detection-BWteE-0x.js → upgrade-detection-BWpOvoVx.js} +1 -1
- package/dist/ui/assets/upskill-lick-skip-ZGNBIEXS.js +1 -0
- package/dist/ui/assets/{voice-reply-Bju5XMHK.js → voice-reply-CCkglCEp.js} +1 -1
- package/dist/ui/assets/{wc-attach-Z0pwdH9M.js → wc-attach-C8CgBet1.js} +2 -2
- package/dist/ui/assets/{wc-extension-_Hj1HhGf.js → wc-extension-CHb4P34s.js} +2 -2
- package/dist/ui/assets/{wc-follower-DVUdb9Um.js → wc-follower-DmIZM7ao.js} +3 -3
- package/dist/ui/assets/{wc-follower-oauth-BPx1gTgG.js → wc-follower-oauth-CQgoqG9v.js} +1 -1
- package/dist/ui/assets/{wc-gelatiere-C0ySyH9N.js → wc-gelatiere-B8JhDjog.js} +1 -1
- package/dist/ui/assets/{wc-live-DDos6Dzx.js → wc-live-gCevk2Vh.js} +5 -5
- package/dist/ui/assets/{wc-nav-B2eDg6pO.js → wc-nav-CpHEdfwe.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-DboQnPWI.js → wc-onboarding-iwpabkC3.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-BjUEI-Mu.js → wc-placeholder-Cnl3OQfj.js} +3 -3
- package/dist/ui/assets/{wc-secret-request-DceB-GYM.js → wc-secret-request-B9oB6kAt.js} +1 -1
- package/dist/ui/assets/{wc-settings-DSED486Z.js → wc-settings-_0roTDdf.js} +3 -3
- package/dist/ui/assets/{wc-shell-Dukh8kBp.js → wc-shell-DkJPUxGT.js} +3 -3
- package/dist/ui/assets/{wc-shortcut-config-BVLmA_4e.js → wc-shortcut-config-CIup4nE8.js} +1 -1
- package/dist/ui/assets/{wc-shortcuts-DRoF52xJ.js → wc-shortcuts-C9SNe-vm.js} +1 -1
- package/dist/ui/assets/{wc-sprinkles-D-gTuKDK.js → wc-sprinkles-C7_z9Yfm.js} +2 -2
- package/dist/ui/assets/{wc-transcript-export-NX12cq80.js → wc-transcript-export-DnNvjokD.js} +2 -2
- package/dist/ui/assets/{wc-tray-CiypFS7u.js → wc-tray-DhWe0-Ie.js} +4 -4
- package/dist/ui/assets/welcome-detection-BbyyaOna.js +1 -0
- package/dist/ui/assets/{whisper-session-B2k89xAM.js → whisper-session-CMXLPRdV.js} +2 -2
- package/dist/ui/assets/{xai-grok-cDPFunWd.js → xai-grok-BNRMntfw.js} +1 -1
- package/dist/ui/assets/{xai-grok-DMR1ZtnC.js → xai-grok-BiF6I0r6.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/ui/packages/webapp/index.html +3 -3
- package/package.json +1 -1
- package/dist/ui/assets/SKILL-CuHGVKei.js +0 -1
- package/dist/ui/assets/api-endpoint-Lx_FU5cP.js +0 -1
- package/dist/ui/assets/github-install-DuwYDOce.js +0 -1
- package/dist/ui/assets/github-zip-CatJM_Hn.js +0 -1
- package/dist/ui/assets/provider-settings-DQML2w6d.js +0 -1
- package/dist/ui/assets/provider-store-access-BEmFKV-n.js +0 -1
- package/dist/ui/assets/provider-store-access-Cce46clP.js +0 -1
- package/dist/ui/assets/proxied-fetch-B57RqgUb.js +0 -1
- package/dist/ui/assets/rest-ops-CB2up_K0.js +0 -1
- package/dist/ui/assets/sidecar-repair-D9Vw_sYj.js +0 -1
- package/dist/ui/assets/slicc-version-Be90TKG2.js +0 -1
- package/dist/ui/assets/welcome-detection-DS0NGHuw.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as e,v as t}from"./account-store-
|
|
1
|
+
import{S as e,v as t}from"./account-store-BvEgWXDi.js";import{a as n}from"./diagnostics-DN_idNHx.js";import{t as r}from"./models-BSkXF4T6.js";import{d as i}from"./claude-model-version-CSATLzrT.js";import{r as a,t as o}from"./transform-messages-BsQjTIEJ.js";function s(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}function c(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}var l=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return l=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),n=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^n()&15>>e/4).toString(16))};function u(e){return typeof e==`object`&&!!e&&(`name`in e&&e.name===`AbortError`||`message`in e&&String(e.message).includes(`FetchRequestCanceledException`))}var d=e=>{if(e instanceof Error)return e;if(typeof e==`object`&&e){try{if(Object.prototype.toString.call(e)===`[object Error]`){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)},f=class extends Error{},p=class e extends f{constructor(t,n,r,i){super(`${e.makeMessage(t,n,r)}`),this.status=t,this.headers=i,this.requestID=i?.get(`x-request-id`),this.error=n;let a=n;this.code=a?.code,this.param=a?.param,this.type=a?.type}static makeMessage(e,t,n){let r=t?.message?typeof t.message==`string`?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||`(no status code or body)`}static generate(t,n,r,i){if(!t||!i)return new h({message:r,cause:d(n)});let a=n?.error;return t===400?new _(t,a,r,i):t===401?new v(t,a,r,i):t===403?new y(t,a,r,i):t===404?new b(t,a,r,i):t===409?new x(t,a,r,i):t===422?new ee(t,a,r,i):t===429?new te(t,a,r,i):t>=500?new ne(t,a,r,i):new e(t,a,r,i)}},m=class extends p{constructor({message:e}={}){super(void 0,void 0,e||`Request was aborted.`,void 0)}},h=class extends p{constructor({message:e,cause:t}){super(void 0,void 0,e||`Connection error.`,void 0),t&&(this.cause=t)}},g=class extends h{constructor({message:e}={}){super({message:e??`Request timed out.`})}},_=class extends p{},v=class extends p{},y=class extends p{},b=class extends p{},x=class extends p{},ee=class extends p{},te=class extends p{},ne=class extends p{},re=class extends f{constructor(){super(`Could not parse response content as the length limit was reached`)}},ie=class extends f{constructor(){super(`Could not parse response content as the request was rejected by the content filter`)}},ae=class extends Error{constructor(e){super(e)}},oe=class extends p{constructor(e,t,n){let r=`OAuth2 authentication error`,i;if(t&&typeof t==`object`){let e=t;i=e.error;let n=e.error_description;n&&typeof n==`string`?r=n:i&&(r=i)}super(e,t,r,n),this.error_code=i}},se=class extends f{constructor(e,t,n){super(e),this.provider=t,this.cause=n}},ce=/^[a-z][a-z0-9+.-]*:/i,le=e=>ce.test(e),S=e=>(S=Array.isArray,S(e)),ue=S;function de(e){return typeof e==`object`?e??{}:{}}function fe(e){if(!e)return!0;for(let t in e)return!1;return!0}function pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function C(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var me=(e,t)=>{if(typeof t!=`number`||!Number.isInteger(t))throw new f(`${e} must be an integer`);if(t<0)throw new f(`${e} must be a positive integer`);return t},he=e=>{try{return JSON.parse(e)}catch{return}},ge=e=>new Promise(t=>setTimeout(t,e));function _e(){if(typeof fetch<`u`)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function ve(...e){let t=globalThis.ReadableStream;if(t===void 0)throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function ye(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return ve({start(){},async pull(e){let{done:n,value:r}=await t.next();n?e.close():e.enqueue(r)},async cancel(){await t.return?.()}})}function be(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function xe(e){if(typeof e!=`object`||!e)return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),n=t.cancel();t.releaseLock(),await n}var Se;function w(e){let t;return(Se??=(t=new globalThis.TextEncoder,t.encode.bind(t)))(e)}var Ce;function we(e){let t;return(Ce??=(t=new globalThis.TextDecoder,t.decode.bind(t)))(e)}var Te,T,E,D,O,Ee,De,Oe=65536,ke=class{constructor(){Te.add(this),T.set(this,void 0),E.set(this,void 0),D.set(this,void 0),O.set(this,void 0),Ee.set(this,void 0),s(this,T,new Uint8Array,`f`),s(this,E,0,`f`),s(this,D,0,`f`),s(this,O,0,`f`),s(this,Ee,!1,`f`)}decode(e){if(e==null)return[];let t;if(t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e==`string`?w(e):e,t.length===0||c(this,Ee,`f`)&&(s(this,Ee,!1,`f`),t[0]===10&&(t=t.subarray(1)),t.length===0))return[];c(this,Te,`m`,De).call(this,t);let n=[],r;for(;(r=Ae(c(this,T,`f`),c(this,O,`f`),c(this,D,`f`)))!=null;){let e=we(c(this,T,`f`).subarray(c(this,E,`f`),r.preceding));n.push(e),s(this,E,r.index,`f`),r.carriage&&(c(this,E,`f`)<c(this,D,`f`)&&c(this,T,`f`)[c(this,E,`f`)]===10?s(this,E,c(this,E,`f`)+1,`f`):c(this,E,`f`)===c(this,D,`f`)&&s(this,Ee,!0,`f`)),s(this,O,c(this,E,`f`),`f`)}if(s(this,O,c(this,D,`f`),`f`),c(this,E,`f`)===c(this,D,`f`))s(this,E,0,`f`),s(this,D,0,`f`),s(this,O,0,`f`),c(this,T,`f`).length>Oe&&s(this,T,new Uint8Array,`f`);else if(n.length>0&&c(this,T,`f`).length>Oe){let e=c(this,D,`f`)-c(this,E,`f`);if(e<=Oe||c(this,T,`f`).length>e*4){let t=e<=Oe?Math.min(Math.max(e*2,256),Oe):e*2,n=new Uint8Array(t);n.set(c(this,T,`f`).subarray(c(this,E,`f`),c(this,D,`f`))),s(this,T,n,`f`),s(this,E,0,`f`),s(this,D,e,`f`),s(this,O,e,`f`)}}return n}flush(){return s(this,Ee,!1,`f`),c(this,E,`f`)===c(this,D,`f`)?[]:this.decode(`
|
|
2
2
|
`)}};T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakMap,Ee=new WeakMap,Te=new WeakSet,De=function(e){if(c(this,D,`f`)+e.length>c(this,T,`f`).length){let t=c(this,D,`f`)-c(this,E,`f`);if(c(this,E,`f`)>=c(this,T,`f`).length/2&&t+e.length<=c(this,T,`f`).length)c(this,T,`f`).copyWithin(0,c(this,E,`f`),c(this,D,`f`));else{let n=Math.max(c(this,T,`f`).length*2,t+e.length,256),r=new Uint8Array(n);r.set(c(this,T,`f`).subarray(c(this,E,`f`),c(this,D,`f`))),s(this,T,r,`f`)}s(this,O,c(this,O,`f`)-c(this,E,`f`),`f`),s(this,D,t,`f`),s(this,E,0,`f`)}c(this,T,`f`).set(e,c(this,D,`f`)),s(this,D,c(this,D,`f`)+e.length,`f`)},ke.NEWLINE_CHARS=new Set([`
|
|
3
3
|
`,`\r`]),ke.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Ae(e,t,n){for(let r=t;r<n;r++){if(e[r]===10)return{preceding:r,index:r+1,carriage:!1};if(e[r]===13)return{preceding:r,index:r+1,carriage:!0}}return null}function je(e){for(let t=0;t<e.length-1;t++){let n=Me(e,t);if(n>0){let r=t+n,i=Me(e,r);if(i>0)return r+i}}return-1}function Me(e,t){return e[t]===10?1:e[t]===13?e[t+1]===10?2:1:0}var Ne={off:0,error:200,warn:300,info:400,debug:500},Pe=(e,t,n)=>{if(e){if(pe(Ne,e))return e;k(n).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(Ne))}`)}};function Fe(){}function Ie(e,t,n){return!t||Ne[e]>Ne[n]?Fe:t[e].bind(t)}var Le={error:Fe,warn:Fe,info:Fe,debug:Fe},Re=new WeakMap;function k(e){let t=e.logger,n=e.logLevel??`off`;if(!t)return Le;let r=Re.get(t);if(r&&r[0]===n)return r[1];let i={error:Ie(`error`,t,n),warn:Ie(`warn`,t,n),info:Ie(`info`,t,n),debug:Ie(`debug`,t,n)};return Re.set(t,[n,i]),i}var ze=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([e,t])=>[e,e.toLowerCase()===`authorization`||e.toLowerCase()===`api-key`||e.toLowerCase()===`x-api-key`||e.toLowerCase()===`x-amz-security-token`||e.toLowerCase()===`cookie`||e.toLowerCase()===`set-cookie`?`***`:t])),`retryOfRequestLogID`in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e),Be,Ve=class e{constructor(e,t,n){Be.set(this,void 0),this.iterator=e,this.controller=t,s(this,Be,n,`f`)}static fromSSEResponse(t,n,r,i){let a=!1,o=r?k(r):console;async function*s(){if(a)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");a=!0;let e=!1,r=!1;try{for await(let e of He(t,n)){if(e.data.startsWith(`[DONE]`)){r=!0;break}if(e.event===null||!e.event.startsWith(`thread.`)){let n;try{n=JSON.parse(e.data)}catch(t){throw o.error(`Could not parse message into JSON:`,e.data),o.error(`From chunk:`,e.raw),t}if(n&&n.error)throw new p(void 0,n.error,void 0,t.headers);yield i?{event:e.event,data:n}:n}else{let t;try{t=JSON.parse(e.data)}catch(t){throw console.error(`Could not parse message into JSON:`,e.data),console.error(`From chunk:`,e.raw),t}if(e.event===`error`)throw new p(void 0,t.error,t.message,void 0);yield{event:e.event,data:t}}}e=!0}catch(e){if(r||u(e)||n.signal.aborted&&e===n.signal.reason)return;throw e}finally{e||n.abort()}}return new e(s,n,r)}static fromReadableStream(t,n,r){let i=!1;async function*a(){let e=new ke,r=t.getReader(),i=!1,a,o=()=>{a??=r.cancel(),a.catch(()=>void 0)};n.signal.addEventListener(`abort`,o,{once:!0});try{if(n.signal.aborted){o();return}for(;;){let{value:t,done:a}=await r.read();if(a){i=!0;break}if(n.signal.aborted)return;for(let r of e.decode(t)){if(n.signal.aborted)return;yield r}}if(n.signal.aborted)return;for(let t of e.flush()){if(n.signal.aborted)return;yield t}}finally{n.signal.removeEventListener(`abort`,o),i||o(),r.releaseLock()}}async function*o(){if(i)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let e=!1;try{for await(let t of a())e||t&&(yield JSON.parse(t));e=!0}catch(e){if(n.signal.aborted||u(e))return;throw e}finally{e||n.abort()}}return new e(o,n,r)}[(Be=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],n=[],r=this.iterator(),i=e=>({next:()=>{if(e.length===0){let e=r.next();t.push(e),n.push(e)}return e.shift()}});return[new e(()=>i(t),this.controller,c(this,Be,`f`)),new e(()=>i(n),this.controller,c(this,Be,`f`))]}toReadableStream(){let e;return ve({start:async()=>{e=this[Symbol.asyncIterator]()},async pull(t){try{let{value:n,done:r}=await e.next();if(r)return t.close();let i=w(JSON.stringify(n)+`
|
|
4
4
|
`);t.enqueue(i)}catch(e){t.error(e)}},async cancel(){await e.return?.()}})}};async function*He(e,t){if(!e.body)throw t.abort(),globalThis.navigator!==void 0&&globalThis.navigator.product===`ReactNative`?new f(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`):new f(`Attempted to iterate over a response with no body`);let n=new Ge,r=new ke,i=be(e.body);for await(let e of We(i))for(let t of r.decode(e)){let e=n.decode(t);e&&(yield e)}for(let e of r.flush()){let t=n.decode(e);t&&(yield t)}}var Ue=3;async function*We(e){let t=new Uint8Array,n=0,r=0,i=0;for await(let a of e){if(a==null)continue;let e;if(e=a instanceof ArrayBuffer?new Uint8Array(a):typeof a==`string`?w(a):a,r+e.length>t.length){let a=r-n;if(n>=t.length/2&&a+e.length<=t.length)t.copyWithin(0,n,r);else{let i=new Uint8Array(Math.max(t.length*2,a+e.length));i.set(t.subarray(n,r)),t=i}i-=n,n=0,r=a}t.set(e,r),r+=e.length;let o;for(;(o=je(t.subarray(i,r)))!==-1;)o+=i,yield t.slice(n,o),n=o,i=n;i=Math.max(n,r-Ue)}r>n&&(yield t.slice(n,r))}var Ge=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith(`\r`)&&(e=e.slice(0,-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{o as e,t}from"./api-endpoint-3qEcn7BY.js";import{t as n}from"./types-Dgm4REV3.js";import{t as r}from"./remote-cache-BE5T1-53.js";function i(e){if(!Number.isFinite(e))return{run:e=>e(),get active(){return 0}};let t=Math.max(1,Math.floor(e)),n=[],r=0,i=()=>{let e=n.shift();if(e){e();return}--r};return{async run(e){r>=t?await new Promise(e=>n.push(e)):r+=1;try{return await e()}finally{i()}},get active(){return r}}}const a=104857600,o=new Set([`list`,`stat`,`mkdir`,`rename`,`remove`]),s=new Set([`ENOENT`,`EEXIST`,`ENOTDIR`,`EISDIR`,`ENOTEMPTY`,`EINVAL`,`EACCES`,`ELOOP`,`EBUSY`,`EFBIG`,`EBADF`,`EIO`]),c=new Set([`list`,`stat`,`read`,`mkdir`]),l=`no-store`;function u(e,t){return`hostfs:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}const d=e=>e.json(),f=async e=>({partial:e.status===206,body:await e.arrayBuffer()}),p=async e=>{await e.arrayBuffer()},m=e=>e>0?new Promise(t=>setTimeout(t,e)):Promise.resolve();function h(e,t,r,i,a){let o=r instanceof Error?r.message:String(r),s=a?` after ${i} attempt${i===1?``:`s`}`:` (not retried: non-idempotent op)`;return new n(`EIO`,`hostfs ${e} failed${s}: transient bridge error: ${o}`,t)}function g(e){return typeof e==`number`&&Number.isFinite(e)?e:void 0}function _(e){let t={},n=g(e.ctime);n!==void 0&&(t.ctime=n);let r=g(e.ino);r!==void 0&&(t.ino=r);let i=g(e.uid);i!==void 0&&(t.uid=i);let a=g(e.gid);a!==void 0&&(t.gid=a);let o=g(e.mode);return o!==void 0&&(t.mode=o),t}var v=class{kind=`hostfs`;listingStatsMatchStat=!0;source;mountId;targetPath;hostPath;fetchImpl;limiter;maxAttempts;retryDelayMs;cache;maxCachedBodyBytes;cacheGeneration=0;closed=!1;stableEndpoint=!0;constructor(e){this.targetPath=e.targetPath,this.hostPath=e.hostPath,this.source=`hostfs://${e.hostPath}`,this.mountId=e.mountId??u(e.targetPath,e.hostPath),this.fetchImpl=e.fetchImpl??fetch,this.limiter=i(e.maxInflight??24),this.maxAttempts=Math.max(1,e.maxAttempts??3),this.retryDelayMs=e.retryDelayMs??25,this.maxCachedBodyBytes=Math.max(0,e.maxCachedBodyBytes??4194304),this.cache=e.cache??new r({mountId:this.mountId,ttlMs:e.cacheTtlMs??3e4})}assertOpen(e){if(this.closed)throw new n(`EBADF`,`mount closed`,e)}bodyKey(e){return e.replace(/^\/+/,``)}async invalidateCachePrefixes(e){this.cacheGeneration+=1,await this.cache.invalidatePrefixes(e)}async cacheBodyIfCurrent(e,t,n,r){e!==this.cacheGeneration||n.byteLength>this.maxCachedBodyBytes||(await this.cache.putBody(t,n,r),e!==this.cacheGeneration&&await this.cache.invalidateBody(t))}async applyHostInvalidation(e){if(e.length===0){await this.invalidateCachePrefixes([]);return}let t=e.map(e=>e.replace(/^\/+/,``));if(t.some(e=>e.length===0||e===`.`)){await this.invalidateCachePrefixes([]);return}await this.invalidateCachePrefixes(t)}getCache(){return this.cache}url(t,n,r){let i=new URLSearchParams({mount:this.targetPath,path:n.replace(/^\/+/,``)});for(let[e,t]of Object.entries(r??{}))i.set(e,t);return e(`/api/hostfs/${t}?${i.toString()}`)}buildRequest(n,r,i){let a=t(i?.headers);if(this.stableEndpoint&&o.has(n))return{url:e(`/api/hostfs`),init:{method:`POST`,headers:{...a,"Content-Type":`application/json`},body:JSON.stringify({op:n,mount:this.targetPath,path:r.replace(/^\/+/,``),...i?.extra??{}})}};let{extra:s,...c}=i??{};return{url:this.url(n,r,i?.extra),init:{...c,headers:a}}}async request(e,t,n,r){return this.assertOpen(t),this.limiter.run(()=>this.attemptRequest(e,t,n,r))}async attemptRequest(e,t,r,i){let a=c.has(e)?this.maxAttempts:1,o=0,s;for(;o<a;){o+=1;try{return await this.routeAndConsume(e,t,r,i)}catch(e){if(e instanceof n)throw e;if(s=e,this.closed)break;o<a&&await m(this.retryDelayMs*o)}}throw h(e,t,s,o,a>1)}async routeAndConsume(e,t,n,r){let i=this.stableEndpoint&&o.has(e),a=this.buildRequest(e,t,r),s=await this.fetchImpl(a.url,a.init);if(s.ok||s.status===304)return await n(s);let{error:c,rawCode:l}=await this.errorFromResponse(e,t,s);if(i&&l===null&&(s.status===404||s.status===405))return this.stableEndpoint=!1,await this.routeAndConsume(e,t,n,r);throw c}async errorFromResponse(e,t,r){let i=`EIO`,a=null,o=`hostfs ${e} failed with HTTP ${r.status}`;try{let e=await r.json();typeof e.code==`string`&&(a=e.code,s.has(e.code)&&(i=e.code)),typeof e.message==`string`&&(o=e.message)}catch{}return{error:new n(i,o,t),rawCode:a}}async readDir(e){let t=await this.request(`list`,e,d);if(!Array.isArray(t.entries))return[];let n=[];for(let e of t.entries){let t=e;typeof t.name!=`string`||t.kind!==`file`&&t.kind!==`directory`||n.push({name:t.name,kind:t.kind,...typeof t.size==`number`?{size:t.size}:{},...typeof t.lastModified==`number`?{lastModified:t.lastModified}:{},..._(t)})}return n}async readFile(e){this.assertOpen(e);let t=this.cacheGeneration,r=this.bodyKey(e),i=await this.cache.getBody(r);if(i&&!this.cache.isStale(i.cachedAt))return i.body;let o={};i?.etag&&(o[`If-None-Match`]=i.etag);let s=await this.request(`read`,e,async e=>e.status===304?{kind:`not-modified`}:{kind:`body`,bytes:new Uint8Array(await e.arrayBuffer()),etag:e.headers.get(`etag`)??``},{cache:l,headers:o});if(s.kind===`not-modified`){if(!i)throw new n(`EIO`,`hostfs read got 304 without a cached body`,e);return await this.cacheBodyIfCurrent(t,r,i.body,i.etag),i.body}if(s.bytes.byteLength>a)throw new n(`EFBIG`,`file exceeds the hostfs body cap`,e);return await this.cacheBodyIfCurrent(t,r,s.bytes,s.etag),s.bytes}async readFileRange(e,t,r){if(!Number.isInteger(t)||!Number.isInteger(r)||t<0||r<t)throw new n(`EINVAL`,`invalid byte range ${t}-${r}`,e);if(r===t)return new Uint8Array;if(r-t>a)throw new n(`EFBIG`,`byte range exceeds the hostfs body cap`,e);let{partial:i,body:o}=await this.request(`read`,e,f,{cache:l,headers:{Range:`bytes=${t}-${r-1}`}});return i?new Uint8Array(o):new Uint8Array(o).slice(t,r)}async writeFile(e,t){if(t.byteLength>a)throw new n(`EFBIG`,`body exceeds the hostfs body cap`,e);await this.request(`write`,e,p,{method:`PUT`,headers:{"Content-Type":`application/octet-stream`},body:new Uint8Array(t)});let r=this.bodyKey(e),i=++this.cacheGeneration;t.byteLength<=this.maxCachedBodyBytes?await this.cacheBodyIfCurrent(i,r,new Uint8Array(t),``):await this.cache.invalidateBody(r)}async stat(e){let t=await this.request(`stat`,e,d);return{kind:t.kind===`directory`?`directory`:`file`,size:typeof t.size==`number`?t.size:0,mtime:typeof t.mtime==`number`?t.mtime:0,..._(t)}}async mkdir(e){await this.request(`mkdir`,e,p,{method:`POST`})}async rename(e,t){await this.request(`rename`,e,p,{method:`POST`,extra:{to:t.replace(/^\/+/,``)}});let n=this.bodyKey(e),r=this.bodyKey(t);await this.invalidateCachePrefixes([n,r])}async remove(e,t){await this.request(`remove`,e,p,{method:`DELETE`,extra:t?.recursive?{recursive:`1`}:void 0});let n=this.bodyKey(e);t?.recursive?await this.invalidateCachePrefixes([n]):(this.cacheGeneration+=1,await this.cache.invalidateBody(n))}async refresh(e){return this.assertOpen(this.targetPath),await this.invalidateCachePrefixes([]),{added:[],removed:[],changed:e?.bodies?[`*`]:[],unchanged:0,errors:[]}}describe(){return{displayName:this.hostPath.split(`/`).filter(Boolean).at(-1)??this.hostPath,source:this.source,extra:`configured via mount table (auto-mounted, live host view)`}}async close(){this.closed=!0}getHostPath(){return this.hostPath}getTargetPath(){return this.targetPath}};export{v as HostFsMountBackend};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./providers-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./providers-C2bj3jKv.js";import{f as n}from"./account-store-BYDUpeqo.js";var r=class{resolve;providerId;now;#e=null;#t=null;#n=null;#r=null;constructor(e,t,n=Date.now){this.resolve=e,this.providerId=t,this.now=n}#i(e){return e===`ok`?6e4:e===`unsupported`?18e5:3e5}isStale(){let e=this.#e;return!e||this.#t!==this.providerId()||this.now()-e.at>=this.#i(e.outcome)}snapshot(){return this.#t===this.providerId()?this.#e?.window??null:null}async refresh(e={}){if(!e.force&&!this.isStale())return this.snapshot();let t=this.providerId();return this.#n!==null&&this.#r===t?this.#n:(this.#n=this.resolve().then(e=>{let n=e?{...e,at:this.now()}:null;return this.#a(t,n?`ok`:`unsupported`,n),n}).catch(()=>{let e=this.snapshot();return this.#a(t,`failed`,e),e}).finally(()=>{this.#r===t&&(this.#n=null,this.#r=null)}),this.#r=t,this.#n)}#a(e,t,n){e===this.providerId()&&(this.#t=e,this.#e={outcome:t,window:n,at:this.now()})}clear(){this.#e=null,this.#t=null}},i=e({clearBudgetWindowCache:()=>u,getBudgetWindowSnapshot:()=>c,refreshBudgetWindow:()=>l});async function a(){let e=n();if(!e)return null;let r=t(e);if(!r?.getBudgetUsage)return null;let i=await r.getBudgetUsage();return i?{...i,providerId:e}:null}function o(){try{return n()}catch{return``}}const s=new r(a,o);function c(){return s.snapshot()}function l(e){return s.refresh(e)}function u(){s.clear()}export{l as i,u as n,c as r,i as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./logger-DDBAeTLF.js";import"./navigation-watcher-BpA1OwJw.js";import"./wc-follower-oauth-BPx1gTgG.js";import{n as t,t as n}from"./pending-request-table-k-D7ZZsL.js";var r=e(`cdp`);function i(e){return e===4001?`CDP connection superseded by another SLICC tab/window on this instance`:e===4002?`CDP connection reset by proxy (upstream Chrome connection was re-established)`:`CDP connection closed`}var a=class{ws=null;nextId=1;_superseded=!1;pending=new n;listeners=new Map;_state=`disconnected`;stateListeners=new Set;lastNotifiedState=`disconnected`;lastNotifiedReason;get state(){return this._state}onStateChange(e){return this.stateListeners.add(e),()=>{this.stateListeners.delete(e)}}get superseded(){return this._superseded}async connect(e){if(this._state!==`disconnected`)throw Error(`Cannot connect: state is ${this._state}`);if(!e?.url)throw Error(`CDPClient.connect() requires a WebSocket URL`);let{url:t,timeout:n=5e3,protocols:i}=e;return this._state=`connecting`,new Promise((e,a)=>{let o=setTimeout(()=>{this.cleanup(),a(Error(`CDP connection timed out after ${n}ms`))},n);try{this.ws=i===void 0?new WebSocket(t):new WebSocket(t,i)}catch(e){clearTimeout(o),this._state=`disconnected`,a(e);return}this.ws.onopen=()=>{clearTimeout(o),this._state=`connected`,this._superseded=!1,r.info(`Connected`,{url:t}),this.notifyState(`connected`),e()},this.ws.onerror=e=>{clearTimeout(o),this._state===`connecting`&&(r.error(`Connection failed`,{url:t}),this.cleanup(),a(Error(`CDP WebSocket connection failed`)))},this.ws.onmessage=e=>{this.handleMessage(e.data)},this.ws.onclose=e=>{this.handleClose(e?.code)}})}disconnect(){this.ws&&(this.ws.onclose=null,this.ws.close()),this._superseded=!1,this.cleanup(),r.info(`Disconnected`)}async send(e,t,n,i=3e4){if(this._state!==`connected`||!this.ws)throw Error(`CDP client is not connected`);let a=this.nextId++,o={id:a,method:e};t&&(o.params=t),n&&(o.sessionId=n),r.debug(`Send`,{method:e,id:a,sessionId:n});let s=this.pending.issue(a,i,`CDP command timed out after ${i}ms: ${e}`);return this.ws.send(JSON.stringify(o)),s}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,n=3e4){return t(t=>(this.on(e,t),()=>this.off(e,t)),n,`Timed out waiting for event: ${e}`)}handleMessage(e){let t;try{t=JSON.parse(e)}catch{return}if(`id`in t&&typeof t.id==`number`){let e=t;r.debug(`Response`,{id:e.id,hasError:!!e.error}),e.error?(r.error(`Command error`,{id:e.id,code:e.error.code,message:e.error.message}),this.pending.reject(e.id,Error(`CDP error: ${e.error.message} (${e.error.code})`))):this.pending.resolve(e.id,e.result??{});return}if(`method`in t){let e=t;r.debug(`Event`,{method:e.method,sessionId:e.sessionId});let n=this.listeners.get(e.method);if(n){let t=e.sessionId?{...e.params,sessionId:e.sessionId}:e.params??{};for(let e of n)try{e(t)}catch{}}}}handleClose(e){e===4001?(this._superseded=!0,r.warn(`CDP slot superseded by another SLICC tab/window on this instance`,{code:e})):e===4002?r.warn(`CDP proxy reset its upstream Chrome connection — sessions dropped`,{code:e,pendingCommands:this.pending.size}):r.error(`Connection closed unexpectedly`,{pendingCommands:this.pending.size}),this.cleanup(i(e))}cleanup(e=`CDP client disconnected`){this.ws=null,this._state=`disconnected`,this.pending.rejectAll(e),this.notifyState(`disconnected`,e)}notifyState(e,t){if(e!==this.lastNotifiedState||t!==this.lastNotifiedReason){this.lastNotifiedState=e,this.lastNotifiedReason=t;for(let n of this.stateListeners)try{n(e,t)}catch{}}}},o=class extends Error{step;name=`CommandAbortedError`;constructor(e){super(`Browser command aborted while ${e}. A CDP round trip already in flight cannot be cancelled, so it may still have been applied to the page; nothing after it was started.`),this.step=e}};function s(e,t){if(e?.aborted)throw new o(t)}function c(e,t){return e?{signal:e,error:()=>new o(t)}:void 0}function l(e,t,n){return new Promise((r,i)=>{if(t?.aborted){i(new o(n));return}let a=()=>{clearTimeout(s),i(new o(n))},s=setTimeout(()=>{t?.removeEventListener(`abort`,a),r()},e);t?.addEventListener(`abort`,a,{once:!0})})}function u(e,t,n){return t?t.aborted?Promise.reject(new o(n)):new Promise((r,i)=>{let a=()=>i(new o(n));t.addEventListener(`abort`,a,{once:!0}),e.then(()=>{t.removeEventListener(`abort`,a),r()},e=>{t.removeEventListener(`abort`,a),i(e instanceof Error?e:Error(String(e)))})}):e}var d=e(`har-recorder`),f=class{recordings=new Map;client;fs;eventCleanup=new Map;constructor(e,t){this.client=e,this.fs=t}async startRecording(e,t,n,r){let i=`rec-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;s(r,`about to enable Network on tab ${e}`),await this.client.send(`Network.enable`,{},t),s(r,`about to enable Page on tab ${e}`),await this.client.send(`Page.enable`,{},t),s(r,`about to read the URL of tab ${e}`);let a=(await this.client.send(`Runtime.evaluate`,{expression:`location.href`,returnByValue:!0},t)).result?.value??`about:blank`,o={id:i,targetId:e,sessionId:t,filterCode:n,pendingRequests:new Map,entries:[],startTime:Date.now(),currentUrl:a,snapshotCount:0};return this.recordings.set(i,o),this.setupEventListeners(o),await this.ensureDir(`/recordings/${i}`),d.debug(`Started recording`,{recordingId:i,targetId:e,currentUrl:a}),i}setupEventListeners(e){let{sessionId:t,id:n}=e,r=n=>{let r=n;r.sessionId===t&&this.handleRequestWillBeSent(e,r)},i=n=>{let r=n;r.sessionId===t&&this.handleResponseReceived(e,r)},a=r=>{let i=r;i.sessionId===t&&this.handleLoadingFinished(e,i).catch(e=>{d.error(`Failed to process loadingFinished event`,{recordingId:n,requestId:i.requestId,error:e instanceof Error?e.message:String(e)})})},o=n=>{let r=n;r.sessionId===t&&this.handleLoadingFailed(e,r)},s=r=>{let i=r;if(i.sessionId!==t)return;let a=i.frame;if(!a?.parentId&&a?.url){let t=[...e.entries],r=e.currentUrl;e.currentUrl=a.url,e.entries=[],e.pendingRequests.clear(),this.saveSnapshotWithEntries(e,`navigation`,t,r).catch(e=>{d.error(`Failed to save navigation snapshot`,{recordingId:n,error:e instanceof Error?e.message:String(e)})})}};this.client.on(`Network.requestWillBeSent`,r),this.client.on(`Network.responseReceived`,i),this.client.on(`Network.loadingFinished`,a),this.client.on(`Network.loadingFailed`,o),this.client.on(`Page.frameNavigated`,s),this.eventCleanup.set(n,()=>{this.client.off(`Network.requestWillBeSent`,r),this.client.off(`Network.responseReceived`,i),this.client.off(`Network.loadingFinished`,a),this.client.off(`Network.loadingFailed`,o),this.client.off(`Page.frameNavigated`,s)})}handleRequestWillBeSent(e,t){let{requestId:n,request:r,timestamp:i}=t;!n||!r||i==null||e.pendingRequests.set(n,{requestId:n,startTime:i*1e3,request:{method:r.method,url:r.url,headers:r.headers,postData:r.postData}})}handleResponseReceived(e,t){let{requestId:n,response:r}=t;if(!n||!r)return;let i=e.pendingRequests.get(n);i&&(i.response={status:r.status,statusText:r.statusText,headers:r.headers,mimeType:r.mimeType},i.timing=r.timing)}async handleLoadingFinished(e,t){let{requestId:n,timestamp:r}=t;if(!n||r==null)return;let i=e.pendingRequests.get(n);if(!i)return;i.endTime=r*1e3;try{let t=await this.client.send(`Network.getResponseBody`,{requestId:n},e.sessionId);i.responseBody=t.body,i.responseBodyBase64=t.base64Encoded===!0}catch{}let a=this.buildHarEntry(i);a&&e.entries.push(a),e.pendingRequests.delete(n)}handleLoadingFailed(e,t){let{requestId:n}=t;n&&e.pendingRequests.delete(n)}buildHarEntry(e){if(!e.response)return null;let{request:t,response:n,timing:r,startTime:i,endTime:a,responseBody:o,responseBodyBase64:s}=e,c=a?a-i:0,l=[];try{let e=new URL(t.url);l=Array.from(e.searchParams.entries()).map(([e,t])=>({name:e,value:t}))}catch{}let u=r?(()=>{let e=(e,t)=>{if(e==null||t==null||e<0||t<0)return-1;let n=t-e;return n>=0?n:-1},t=r.dnsStart>=0?r.dnsStart:r.connectStart>=0?r.connectStart:0;return{blocked:t>0?t:-1,dns:e(r.dnsStart,r.dnsEnd),connect:e(r.connectStart,r.connectEnd),ssl:e(r.sslStart,r.sslEnd),send:e(r.sendStart,r.sendEnd),wait:e(r.sendEnd,r.receiveHeadersStart),receive:e(r.receiveHeadersStart,r.receiveHeadersEnd)}})():{blocked:-1,dns:-1,connect:-1,ssl:-1,send:0,wait:c,receive:0},d={size:o?.length??0,mimeType:n.mimeType??`application/octet-stream`};o&&(d.text=o,s&&(d.encoding=`base64`));let f;return t.postData&&(f={mimeType:t.headers[`content-type`]??t.headers[`Content-Type`]??`text/plain`,text:t.postData}),{startedDateTime:new Date(i).toISOString(),time:c,request:{method:t.method,url:t.url,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(t.headers).map(([e,t])=>({name:e,value:t})),queryString:l,postData:f,headersSize:-1,bodySize:t.postData?.length??0},response:{status:n.status,statusText:n.statusText,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(n.headers).map(([e,t])=>({name:e,value:t})),content:d,redirectURL:n.headers.location??n.headers.Location??``,headersSize:-1,bodySize:d.size},cache:{},timings:u}}async saveSnapshot(e,t){return this.saveSnapshotWithEntries(e,t,e.entries,e.currentUrl)}async applyFilter(e,t){return p(e,t)}async saveSnapshotWithEntries(e,t,n,r){if(n.length===0)return d.debug(`No entries to save`,{recordingId:e.id,trigger:t}),null;let i=e.filterCode?await this.applyFilter(n,e.filterCode):n;if(i.length===0)return d.debug(`All entries filtered out`,{recordingId:e.id,trigger:t}),null;e.snapshotCount++;let a=new Date().toISOString().replace(/[:.]/g,`-`),o=this.urlToSlug(r),s=`${e.snapshotCount.toString().padStart(3,`0`)}-${a}-${t}-${o}.har`,c=`/recordings/${e.id}/${s}`,l={log:{version:`1.2`,creator:{name:`SLICC HAR Recorder`,version:`1.0.0`},entries:i}};return await this.fs.writeFile(c,JSON.stringify(l,null,2)),d.debug(`Saved HAR snapshot`,{recordingId:e.id,path:c,entryCount:i.length}),c}urlToSlug(e){try{let t=new URL(e);return`${t.hostname}${t.pathname}`.replace(/[^a-zA-Z0-9]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``).slice(0,50)||`page`}catch{return`page`}}async stopRecording(e){let t=this.recordings.get(e);if(!t)throw Error(`Recording not found: ${e}`);await this.saveSnapshot(t,`close`);let n=this.eventCleanup.get(e);n&&(n(),this.eventCleanup.delete(e));try{await this.client.send(`Network.disable`,{},t.sessionId)}catch{}this.recordings.delete(e);let r=`/recordings/${e}`;return d.debug(`Stopped recording`,{recordingId:e,snapshotCount:t.snapshotCount}),r}getRecording(e){return this.recordings.get(e)}getRecordingByTarget(e){for(let[t,n]of this.recordings)if(n.targetId===e)return t}async ensureDir(e){await this.fs.mkdir(e,{recursive:!0})}};function p(e,t){try{let n=Function(`entry`,`return (${t})(entry);`),r=[];for(let t of e)try{let e=n(t);if(e===!1)continue;typeof e==`object`&&e?r.push(e):r.push(t)}catch(e){d.error(`Filter function error on entry, keeping it`,{error:e instanceof Error?e.message:String(e)}),r.push(t)}return r}catch(t){return d.error(`Failed to compile filter, returning unfiltered`,{error:t instanceof Error?t.message:String(t)}),e}}var m=`(function() {
|
|
1
|
+
import{t as e}from"./logger-DDBAeTLF.js";import"./navigation-watcher-BpA1OwJw.js";import"./wc-follower-oauth-CQgoqG9v.js";import{n as t,t as n}from"./pending-request-table-k-D7ZZsL.js";var r=e(`cdp`);function i(e){return e===4001?`CDP connection superseded by another SLICC tab/window on this instance`:e===4002?`CDP connection reset by proxy (upstream Chrome connection was re-established)`:`CDP connection closed`}var a=class{ws=null;nextId=1;_superseded=!1;pending=new n;listeners=new Map;_state=`disconnected`;stateListeners=new Set;lastNotifiedState=`disconnected`;lastNotifiedReason;get state(){return this._state}onStateChange(e){return this.stateListeners.add(e),()=>{this.stateListeners.delete(e)}}get superseded(){return this._superseded}async connect(e){if(this._state!==`disconnected`)throw Error(`Cannot connect: state is ${this._state}`);if(!e?.url)throw Error(`CDPClient.connect() requires a WebSocket URL`);let{url:t,timeout:n=5e3,protocols:i}=e;return this._state=`connecting`,new Promise((e,a)=>{let o=setTimeout(()=>{this.cleanup(),a(Error(`CDP connection timed out after ${n}ms`))},n);try{this.ws=i===void 0?new WebSocket(t):new WebSocket(t,i)}catch(e){clearTimeout(o),this._state=`disconnected`,a(e);return}this.ws.onopen=()=>{clearTimeout(o),this._state=`connected`,this._superseded=!1,r.info(`Connected`,{url:t}),this.notifyState(`connected`),e()},this.ws.onerror=e=>{clearTimeout(o),this._state===`connecting`&&(r.error(`Connection failed`,{url:t}),this.cleanup(),a(Error(`CDP WebSocket connection failed`)))},this.ws.onmessage=e=>{this.handleMessage(e.data)},this.ws.onclose=e=>{this.handleClose(e?.code)}})}disconnect(){this.ws&&(this.ws.onclose=null,this.ws.close()),this._superseded=!1,this.cleanup(),r.info(`Disconnected`)}async send(e,t,n,i=3e4){if(this._state!==`connected`||!this.ws)throw Error(`CDP client is not connected`);let a=this.nextId++,o={id:a,method:e};t&&(o.params=t),n&&(o.sessionId=n),r.debug(`Send`,{method:e,id:a,sessionId:n});let s=this.pending.issue(a,i,`CDP command timed out after ${i}ms: ${e}`);return this.ws.send(JSON.stringify(o)),s}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,n=3e4){return t(t=>(this.on(e,t),()=>this.off(e,t)),n,`Timed out waiting for event: ${e}`)}handleMessage(e){let t;try{t=JSON.parse(e)}catch{return}if(`id`in t&&typeof t.id==`number`){let e=t;r.debug(`Response`,{id:e.id,hasError:!!e.error}),e.error?(r.error(`Command error`,{id:e.id,code:e.error.code,message:e.error.message}),this.pending.reject(e.id,Error(`CDP error: ${e.error.message} (${e.error.code})`))):this.pending.resolve(e.id,e.result??{});return}if(`method`in t){let e=t;r.debug(`Event`,{method:e.method,sessionId:e.sessionId});let n=this.listeners.get(e.method);if(n){let t=e.sessionId?{...e.params,sessionId:e.sessionId}:e.params??{};for(let e of n)try{e(t)}catch{}}}}handleClose(e){e===4001?(this._superseded=!0,r.warn(`CDP slot superseded by another SLICC tab/window on this instance`,{code:e})):e===4002?r.warn(`CDP proxy reset its upstream Chrome connection — sessions dropped`,{code:e,pendingCommands:this.pending.size}):r.error(`Connection closed unexpectedly`,{pendingCommands:this.pending.size}),this.cleanup(i(e))}cleanup(e=`CDP client disconnected`){this.ws=null,this._state=`disconnected`,this.pending.rejectAll(e),this.notifyState(`disconnected`,e)}notifyState(e,t){if(e!==this.lastNotifiedState||t!==this.lastNotifiedReason){this.lastNotifiedState=e,this.lastNotifiedReason=t;for(let n of this.stateListeners)try{n(e,t)}catch{}}}},o=class extends Error{step;name=`CommandAbortedError`;constructor(e){super(`Browser command aborted while ${e}. A CDP round trip already in flight cannot be cancelled, so it may still have been applied to the page; nothing after it was started.`),this.step=e}};function s(e,t){if(e?.aborted)throw new o(t)}function c(e,t){return e?{signal:e,error:()=>new o(t)}:void 0}function l(e,t,n){return new Promise((r,i)=>{if(t?.aborted){i(new o(n));return}let a=()=>{clearTimeout(s),i(new o(n))},s=setTimeout(()=>{t?.removeEventListener(`abort`,a),r()},e);t?.addEventListener(`abort`,a,{once:!0})})}function u(e,t,n){return t?t.aborted?Promise.reject(new o(n)):new Promise((r,i)=>{let a=()=>i(new o(n));t.addEventListener(`abort`,a,{once:!0}),e.then(()=>{t.removeEventListener(`abort`,a),r()},e=>{t.removeEventListener(`abort`,a),i(e instanceof Error?e:Error(String(e)))})}):e}var d=e(`har-recorder`),f=class{recordings=new Map;client;fs;eventCleanup=new Map;constructor(e,t){this.client=e,this.fs=t}async startRecording(e,t,n,r){let i=`rec-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;s(r,`about to enable Network on tab ${e}`),await this.client.send(`Network.enable`,{},t),s(r,`about to enable Page on tab ${e}`),await this.client.send(`Page.enable`,{},t),s(r,`about to read the URL of tab ${e}`);let a=(await this.client.send(`Runtime.evaluate`,{expression:`location.href`,returnByValue:!0},t)).result?.value??`about:blank`,o={id:i,targetId:e,sessionId:t,filterCode:n,pendingRequests:new Map,entries:[],startTime:Date.now(),currentUrl:a,snapshotCount:0};return this.recordings.set(i,o),this.setupEventListeners(o),await this.ensureDir(`/recordings/${i}`),d.debug(`Started recording`,{recordingId:i,targetId:e,currentUrl:a}),i}setupEventListeners(e){let{sessionId:t,id:n}=e,r=n=>{let r=n;r.sessionId===t&&this.handleRequestWillBeSent(e,r)},i=n=>{let r=n;r.sessionId===t&&this.handleResponseReceived(e,r)},a=r=>{let i=r;i.sessionId===t&&this.handleLoadingFinished(e,i).catch(e=>{d.error(`Failed to process loadingFinished event`,{recordingId:n,requestId:i.requestId,error:e instanceof Error?e.message:String(e)})})},o=n=>{let r=n;r.sessionId===t&&this.handleLoadingFailed(e,r)},s=r=>{let i=r;if(i.sessionId!==t)return;let a=i.frame;if(!a?.parentId&&a?.url){let t=[...e.entries],r=e.currentUrl;e.currentUrl=a.url,e.entries=[],e.pendingRequests.clear(),this.saveSnapshotWithEntries(e,`navigation`,t,r).catch(e=>{d.error(`Failed to save navigation snapshot`,{recordingId:n,error:e instanceof Error?e.message:String(e)})})}};this.client.on(`Network.requestWillBeSent`,r),this.client.on(`Network.responseReceived`,i),this.client.on(`Network.loadingFinished`,a),this.client.on(`Network.loadingFailed`,o),this.client.on(`Page.frameNavigated`,s),this.eventCleanup.set(n,()=>{this.client.off(`Network.requestWillBeSent`,r),this.client.off(`Network.responseReceived`,i),this.client.off(`Network.loadingFinished`,a),this.client.off(`Network.loadingFailed`,o),this.client.off(`Page.frameNavigated`,s)})}handleRequestWillBeSent(e,t){let{requestId:n,request:r,timestamp:i}=t;!n||!r||i==null||e.pendingRequests.set(n,{requestId:n,startTime:i*1e3,request:{method:r.method,url:r.url,headers:r.headers,postData:r.postData}})}handleResponseReceived(e,t){let{requestId:n,response:r}=t;if(!n||!r)return;let i=e.pendingRequests.get(n);i&&(i.response={status:r.status,statusText:r.statusText,headers:r.headers,mimeType:r.mimeType},i.timing=r.timing)}async handleLoadingFinished(e,t){let{requestId:n,timestamp:r}=t;if(!n||r==null)return;let i=e.pendingRequests.get(n);if(!i)return;i.endTime=r*1e3;try{let t=await this.client.send(`Network.getResponseBody`,{requestId:n},e.sessionId);i.responseBody=t.body,i.responseBodyBase64=t.base64Encoded===!0}catch{}let a=this.buildHarEntry(i);a&&e.entries.push(a),e.pendingRequests.delete(n)}handleLoadingFailed(e,t){let{requestId:n}=t;n&&e.pendingRequests.delete(n)}buildHarEntry(e){if(!e.response)return null;let{request:t,response:n,timing:r,startTime:i,endTime:a,responseBody:o,responseBodyBase64:s}=e,c=a?a-i:0,l=[];try{let e=new URL(t.url);l=Array.from(e.searchParams.entries()).map(([e,t])=>({name:e,value:t}))}catch{}let u=r?(()=>{let e=(e,t)=>{if(e==null||t==null||e<0||t<0)return-1;let n=t-e;return n>=0?n:-1},t=r.dnsStart>=0?r.dnsStart:r.connectStart>=0?r.connectStart:0;return{blocked:t>0?t:-1,dns:e(r.dnsStart,r.dnsEnd),connect:e(r.connectStart,r.connectEnd),ssl:e(r.sslStart,r.sslEnd),send:e(r.sendStart,r.sendEnd),wait:e(r.sendEnd,r.receiveHeadersStart),receive:e(r.receiveHeadersStart,r.receiveHeadersEnd)}})():{blocked:-1,dns:-1,connect:-1,ssl:-1,send:0,wait:c,receive:0},d={size:o?.length??0,mimeType:n.mimeType??`application/octet-stream`};o&&(d.text=o,s&&(d.encoding=`base64`));let f;return t.postData&&(f={mimeType:t.headers[`content-type`]??t.headers[`Content-Type`]??`text/plain`,text:t.postData}),{startedDateTime:new Date(i).toISOString(),time:c,request:{method:t.method,url:t.url,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(t.headers).map(([e,t])=>({name:e,value:t})),queryString:l,postData:f,headersSize:-1,bodySize:t.postData?.length??0},response:{status:n.status,statusText:n.statusText,httpVersion:`HTTP/1.1`,cookies:[],headers:Object.entries(n.headers).map(([e,t])=>({name:e,value:t})),content:d,redirectURL:n.headers.location??n.headers.Location??``,headersSize:-1,bodySize:d.size},cache:{},timings:u}}async saveSnapshot(e,t){return this.saveSnapshotWithEntries(e,t,e.entries,e.currentUrl)}async applyFilter(e,t){return p(e,t)}async saveSnapshotWithEntries(e,t,n,r){if(n.length===0)return d.debug(`No entries to save`,{recordingId:e.id,trigger:t}),null;let i=e.filterCode?await this.applyFilter(n,e.filterCode):n;if(i.length===0)return d.debug(`All entries filtered out`,{recordingId:e.id,trigger:t}),null;e.snapshotCount++;let a=new Date().toISOString().replace(/[:.]/g,`-`),o=this.urlToSlug(r),s=`${e.snapshotCount.toString().padStart(3,`0`)}-${a}-${t}-${o}.har`,c=`/recordings/${e.id}/${s}`,l={log:{version:`1.2`,creator:{name:`SLICC HAR Recorder`,version:`1.0.0`},entries:i}};return await this.fs.writeFile(c,JSON.stringify(l,null,2)),d.debug(`Saved HAR snapshot`,{recordingId:e.id,path:c,entryCount:i.length}),c}urlToSlug(e){try{let t=new URL(e);return`${t.hostname}${t.pathname}`.replace(/[^a-zA-Z0-9]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``).slice(0,50)||`page`}catch{return`page`}}async stopRecording(e){let t=this.recordings.get(e);if(!t)throw Error(`Recording not found: ${e}`);await this.saveSnapshot(t,`close`);let n=this.eventCleanup.get(e);n&&(n(),this.eventCleanup.delete(e));try{await this.client.send(`Network.disable`,{},t.sessionId)}catch{}this.recordings.delete(e);let r=`/recordings/${e}`;return d.debug(`Stopped recording`,{recordingId:e,snapshotCount:t.snapshotCount}),r}getRecording(e){return this.recordings.get(e)}getRecordingByTarget(e){for(let[t,n]of this.recordings)if(n.targetId===e)return t}async ensureDir(e){await this.fs.mkdir(e,{recursive:!0})}};function p(e,t){try{let n=Function(`entry`,`return (${t})(entry);`),r=[];for(let t of e)try{let e=n(t);if(e===!1)continue;typeof e==`object`&&e?r.push(e):r.push(t)}catch(e){d.error(`Filter function error on entry, keeping it`,{error:e instanceof Error?e.message:String(e)}),r.push(t)}return r}catch(t){return d.error(`Failed to compile filter, returning unfiltered`,{error:t instanceof Error?t.message:String(t)}),e}}var m=`(function() {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
// ===== DOM Utilities =====
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./account-store-
|
|
1
|
+
import{a as e}from"./account-store-BYDUpeqo.js";import{a as t}from"./diagnostics-DN_idNHx.js";import{a as n}from"./compat-uEPf6-XW.js";import{r,s as i}from"./legacy-api-aliases-jKEvBgOL.js";const a=`cerebras`,o=`https://api.cerebras.ai/v1`,s=`openai-completions`,c=`${a}-openai`,l=`slicc-cerebras-models`;let u=[];const d=[{id:`gpt-oss-120b`,name:`GPT OSS 120B`,api:`openai`,reasoning:!0,input:[`text`],context_window:131072,max_tokens:40960},{id:`gemma-4-31b`,name:`Gemma 4 31B`,api:`openai`,reasoning:!1,input:[`text`,`image`],context_window:131072,max_tokens:40960},{id:`zai-glm-4.7`,name:`Z.AI GLM-4.7`,api:`openai`,reasoning:!1,input:[`text`],context_window:131072,max_tokens:40960}];function f(e){try{localStorage.setItem(l,JSON.stringify(e))}catch{}}function p(){try{let e=localStorage.getItem(l);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)&&t.length>0?t:[]}catch{return[]}}function m(e){let t=e.id??``,n=d.find(e=>e.id===t);return{id:t,name:e.name??n?.name??t,api:`openai`,reasoning:e.capabilities?.reasoning??n?.reasoning??!1,input:e.capabilities?.vision?[`text`,`image`]:n?.input??[`text`],context_window:e.limits?.max_context_length??n?.context_window??8192,max_tokens:e.limits?.max_completion_tokens??n?.max_tokens??4096}}async function h(e){let t=await fetch(`${o}/models`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`GET /v1/models → ${t.status} ${t.statusText}`);let n=((await t.json()).data??[]).map(m).filter(e=>e.id.length>0);n.length>0&&(u=n,f(n))}function g(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:c,provider:a,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}}function _(e){console.error(`[cerebras] Stream error:`,e instanceof Error?e.message:String(e))}const v=(e,n,r={})=>{let i=t();return y(i,e,n,r).catch(_),i};async function y(e,t,n,i){try{let a={...t,baseUrl:o,api:s},c=r(a,n,i);for await(let t of c)e.push(t);e.end()}catch(n){_(n),e.push(g(t,n)),e.end()}}const b=(e,n,r)=>{let i=t();return x(i,e,n,r).catch(_),i};async function x(e,t,n,r){try{let a={...t,baseUrl:o,api:s},c=i(a,n,r);for await(let t of c)e.push(t);e.end()}catch(n){_(n),e.push(g(t,n)),e.end()}}const S={id:a,name:`Cerebras`,description:`Ultra-fast inference on Cerebras hardware. Get an API key at cloud.cerebras.ai.`,requiresApiKey:!0,requiresBaseUrl:!1,getModelIds:()=>{if(u.length>0)return u;let e=p();return e.length>0?e:d},refreshModels:async t=>{let n=t??e(a)??``;if(n)try{await h(n)}catch(e){console.warn(`[cerebras] Failed to refresh model list:`,e instanceof Error?e.message:String(e))}}};function C(){n({api:c,stream:v,streamSimple:b})}export{S as config,C as register};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./account-store-
|
|
1
|
+
import{_ as e}from"./account-store-BvEgWXDi.js";import{a as t}from"./diagnostics-DN_idNHx.js";import{d as n}from"./claude-model-version-CSATLzrT.js";import{r,s as i}from"./legacy-api-aliases-bAJ0Klzq.js";var a=`cerebras`,o=`https://api.cerebras.ai/v1`,s=`openai-completions`,c=`${a}-openai`,l=`slicc-cerebras-models`,u=[],d=[{id:`gpt-oss-120b`,name:`GPT OSS 120B`,api:`openai`,reasoning:!0,input:[`text`],context_window:131072,max_tokens:40960},{id:`gemma-4-31b`,name:`Gemma 4 31B`,api:`openai`,reasoning:!1,input:[`text`,`image`],context_window:131072,max_tokens:40960},{id:`zai-glm-4.7`,name:`Z.AI GLM-4.7`,api:`openai`,reasoning:!1,input:[`text`],context_window:131072,max_tokens:40960}];function f(e){try{localStorage.setItem(l,JSON.stringify(e))}catch{}}function p(){try{let e=localStorage.getItem(l);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)&&t.length>0?t:[]}catch{return[]}}function m(e){let t=e.id??``,n=d.find(e=>e.id===t);return{id:t,name:e.name??n?.name??t,api:`openai`,reasoning:e.capabilities?.reasoning??n?.reasoning??!1,input:e.capabilities?.vision?[`text`,`image`]:n?.input??[`text`],context_window:e.limits?.max_context_length??n?.context_window??8192,max_tokens:e.limits?.max_completion_tokens??n?.max_tokens??4096}}async function h(e){let t=await fetch(`${o}/models`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`GET /v1/models → ${t.status} ${t.statusText}`);let n=((await t.json()).data??[]).map(m).filter(e=>e.id.length>0);n.length>0&&(u=n,f(n))}function g(e,t){return{type:`error`,reason:`error`,error:{role:`assistant`,content:[],api:c,provider:a,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}}function _(e){console.error(`[cerebras] Stream error:`,e instanceof Error?e.message:String(e))}var v=(e,n,r={})=>{let i=t();return y(i,e,n,r).catch(_),i};async function y(e,t,n,i){try{let a={...t,baseUrl:o,api:s},c=r(a,n,i);for await(let t of c)e.push(t);e.end()}catch(n){_(n),e.push(g(t,n)),e.end()}}var b=(e,n,r)=>{let i=t();return x(i,e,n,r).catch(_),i};async function x(e,t,n,r){try{let a={...t,baseUrl:o,api:s},c=i(a,n,r);for await(let t of c)e.push(t);e.end()}catch(n){_(n),e.push(g(t,n)),e.end()}}var S={id:a,name:`Cerebras`,description:`Ultra-fast inference on Cerebras hardware. Get an API key at cloud.cerebras.ai.`,requiresApiKey:!0,requiresBaseUrl:!1,getModelIds:()=>{if(u.length>0)return u;let e=p();return e.length>0?e:d},refreshModels:async t=>{let n=t??e(a)??``;if(n)try{await h(n)}catch(e){console.warn(`[cerebras] Failed to refresh model list:`,e instanceof Error?e.message:String(e))}}};function C(){n({api:c,stream:v,streamSimple:b})}export{S as config,C as register};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./logger-LESFN7Hj.js";var n=e({DEFAULT_TIMEOUT_MS:()=>i,MCP_SUPPORTED_PROTOCOL_VERSIONS:()=>a,McpAuthRequiredError:()=>c,McpClient:()=>S,McpTimeoutError:()=>u,parseResourceMetadataUrl:()=>f,selectSseResponseFrame:()=>p});const r=t(`mcp-client`),i=6e4,a=[`2026-07-28`,`2025-06-18`],o=a[0],s=a[1];var c=class extends Error{status;resourceMetadataUrl;wwwAuthenticate;constructor(e){super(`MCP server requires authentication (HTTP ${e.status})`),this.name=`McpAuthRequiredError`,this.status=e.status,this.resourceMetadataUrl=e.resourceMetadataUrl,this.wwwAuthenticate=e.wwwAuthenticate}},l=class extends Error{rpcError;constructor(e){super(`MCP RPC error ${e.code}: ${e.message}`),this.name=`McpRpcFailure`,this.rpcError=e}},u=class extends Error{method;timeoutMs;constructor(e){super(`MCP request timed out after ${e.timeoutMs}ms (${e.method})`),this.name=`McpTimeoutError`,this.method=e.method,this.timeoutMs=e.timeoutMs}},d=class extends Error{status;rpcError;constructor(e){super(`MCP HTTP ${e.status} ${e.statusText} for ${e.method}: ${e.snippet||`(empty body)`}`),this.name=`McpHttpError`,this.status=e.status,this.rpcError=e.rpcError}};function f(e){if(!e)return;let t=/resource_metadata="([^"]+)"/i.exec(e);return t?t[1]:/resource_metadata=([^,\s]+)/i.exec(e)?.[1]}function p(e,t){let n=new TextDecoder(`utf-8`).decode(e).replace(/\r\n/g,`
|
|
2
2
|
`).split(/\n\n/);for(let e of n){if(!e.trim())continue;let n=[];for(let t of e.split(`
|
|
3
3
|
`))t.startsWith(`data:`)&&n.push(t.slice(5).trimStart());if(n.length===0)continue;let r=n.join(`
|
|
4
|
-
`),i;try{i=JSON.parse(r)}catch{continue}if(i.id!==void 0&&i.id!==null&&i.id===t)return i}throw Error(`MCP SSE stream ended without a response for request id ${String(t)}`)}function m(e,t){let n=t.toLowerCase();for(let[t,r]of Object.entries(e))if(t.toLowerCase()===n)return r}function h(e){if(e instanceof d||e instanceof l)return e.rpcError}function g(e){return new l(e)}function _(e,t,n){let r=e.id===t||n?.allowNullId===!0&&e.id===null;if(e.jsonrpc!==`2.0`||!r||Object.hasOwn(e,`result`))return;let i=e.error;return i&&typeof i.code==`number`&&typeof i.message==`string`?i:void 0}function v(e,t){try{return _(JSON.parse(e),t,{allowNullId:!0})}catch{return}}function y(e,t){if(!t)return!1;let n=e instanceof d?e.status:void 0;return t.code===-32601?n===400||e instanceof l:t.code===-32e3&&n===400&&t.message.toLowerCase().includes(`mcp-session-id`)}function b(e){if(!e.data||typeof e.data!=`object`)return[];let t=e.data.supported;return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}async function x(){let{createProxiedFetch:e}=await import(`./proxied-fetch-
|
|
4
|
+
`),i;try{i=JSON.parse(r)}catch{continue}if(i.id!==void 0&&i.id!==null&&i.id===t)return i}throw Error(`MCP SSE stream ended without a response for request id ${String(t)}`)}function m(e,t){let n=t.toLowerCase();for(let[t,r]of Object.entries(e))if(t.toLowerCase()===n)return r}function h(e){if(e instanceof d||e instanceof l)return e.rpcError}function g(e){return new l(e)}function _(e,t,n){let r=e.id===t||n?.allowNullId===!0&&e.id===null;if(e.jsonrpc!==`2.0`||!r||Object.hasOwn(e,`result`))return;let i=e.error;return i&&typeof i.code==`number`&&typeof i.message==`string`?i:void 0}function v(e,t){try{return _(JSON.parse(e),t,{allowNullId:!0})}catch{return}}function y(e,t){if(!t)return!1;let n=e instanceof d?e.status:void 0;return t.code===-32601?n===400||e instanceof l:t.code===-32e3&&n===400&&t.message.toLowerCase().includes(`mcp-session-id`)}function b(e){if(!e.data||typeof e.data!=`object`)return[];let t=e.data.supported;return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}async function x(){let{createProxiedFetch:e}=await import(`./proxied-fetch-DEK8DT-z.js`).then(e=>e.i),t=e();return async(e,n)=>{let r=await t(e,{method:n?.method,headers:n?.headers,body:n?.body});return{status:r.status,statusText:r.statusText,headers:r.headers,body:r.body}}}var S=class{url;staticHeaders;timeoutMs;getAuthHeader;preferredProtocolVersion;clientInfo;fetchImpl;fetchImplLoader=null;sessionId;negotiatedProtocolVersion;nextId=1;constructor(e){this.url=e.url,this.staticHeaders=e.headers??{},this.timeoutMs=e.timeoutMs??6e4,this.getAuthHeader=e.getAuthHeader,this.preferredProtocolVersion=e.protocolVersion??o,this.clientInfo=e.clientInfo??{name:`SLICC`,version:`0.0.0`},this.fetchImpl=e.fetchImpl??null,this.sessionId=e.sessionId}getSessionId(){return this.sessionId}getNegotiatedProtocolVersion(){return this.negotiatedProtocolVersion}async initialize(){if(this.preferredProtocolVersion===s)return this.initializeLegacy();try{return await this.discoverModern(this.preferredProtocolVersion)}catch(e){let t=h(e);if(t?.code===-32022){let e=b(t),n=a.find(t=>t!==s&&e.includes(t));if(!n)throw Error(`MCP server does not support a compatible modern protocol version (supported: ${e.join(`, `)||`none`})`);return this.discoverModern(n)}if(y(e,t))return r.debug(`server/discover identified a legacy server; using initialize`,{error:e instanceof Error?e.message:String(e)}),this.initializeLegacy();throw e}}async discoverModern(e){let t=await this.request(`server/discover`,{protocolVersion:e}),n=Array.isArray(t?.supportedVersions)?t.supportedVersions.filter(e=>typeof e==`string`):[],r=a.find(e=>e!==s&&n.includes(e));if(!r)throw Error(`MCP server discovery did not advertise a compatible modern protocol version (advertised: ${n.join(`, `)||`none`})`);return this.negotiatedProtocolVersion=r,this.sessionId=void 0,t}async toolsList(){return(await this.request(`tools/list`,{}))?.tools??[]}async toolsCall(e,t){return this.request(`tools/call`,{name:e,arguments:t})}async appsList(){try{return(await this.request(`apps/list`,{}))?.apps??[]}catch(e){if(e instanceof c)throw e;return r.debug(`apps/list not supported by server`,{error:e instanceof Error?e.message:String(e)}),[]}}async request(e,t){let n=this.nextId++,r=await this.resolveFetchImpl(),i={"Content-Type":`application/json`,Accept:`application/json, text/event-stream`,...this.staticHeaders};if(this.negotiatedProtocolVersion===s&&this.sessionId&&e!==`initialize`&&(i[`Mcp-Session-Id`]=this.sessionId),this.getAuthHeader){let e=await this.getAuthHeader();e&&(i.Authorization=e)}let a=JSON.stringify({jsonrpc:`2.0`,id:n,method:e,params:t}),o=new AbortController,l=!1,h,y=new Promise((t,n)=>{h=setTimeout(()=>{l=!0,n(new u({method:e,timeoutMs:this.timeoutMs})),o.abort()},this.timeoutMs)}),b,x=r(this.url,{method:`POST`,headers:i,body:a,signal:o.signal});try{b=await Promise.race([x,y])}catch(t){throw l?(x.catch(()=>void 0),new u({method:e,timeoutMs:this.timeoutMs})):t}finally{h&&clearTimeout(h)}if(b.status===401){let e=m(b.headers,`www-authenticate`);throw new c({status:401,wwwAuthenticate:e,resourceMetadataUrl:f(e)})}if(this.negotiatedProtocolVersion===s){let e=m(b.headers,`mcp-session-id`);e&&(this.sessionId=e)}if(b.status>=400){let t=new TextDecoder(`utf-8`).decode(b.body);throw new d({status:b.status,statusText:b.statusText,method:e,snippet:t.slice(0,512),rpcError:v(t,n)})}let S=(m(b.headers,`content-type`)??``).toLowerCase().includes(`text/event-stream`)?p(b.body,n):JSON.parse(new TextDecoder(`utf-8`).decode(b.body));if(S.error){let e=_(S,n);throw e?g(e):Error(`MCP invalid JSON-RPC error response for request id ${String(n)}`)}return S.result}async resolveFetchImpl(){return this.fetchImpl?this.fetchImpl:(this.fetchImplLoader||=x().then(e=>(this.fetchImpl=e,e)),this.fetchImplLoader)}async initializeLegacy(){return this.negotiatedProtocolVersion=s,this.request(`initialize`,{protocolVersion:s,capabilities:{},clientInfo:this.clientInfo})}};export{n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./logger-DDBAeTLF.js";import{q as t}from"./wc-shortcuts-
|
|
1
|
+
import{t as e}from"./logger-DDBAeTLF.js";import{q as t}from"./wc-shortcuts-C9SNe-vm.js";import{n}from"./runtime-env-Dlaokqg1.js";import{t as r}from"./permissions-surface-registry-CilCRwhh.js";import{t as i}from"./speech-assets-bridge-CFYafE89.js";import{o as a}from"./transformers-env-C7dJtjmn.js";import{i as o,t as s}from"./whisper-session-CMXLPRdV.js";var c=e(`speech:composer`),l=5e3,u=(e,t,n)=>new Promise((r,i)=>{let a=setTimeout(()=>i(Error(`${n} timed out after ${t}ms`)),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})}),d=class{#e;#t;#n;#r;#i;#a=null;#o=!1;#s={engine:`builtin`,state:`idle`};#c=a();#l=new Set;#u=null;constructor(e={}){this.#e=e.builtin??t(),this.#t=e.loadWhisper??o,this.#n=e.startSession??s,this.#r=e.getPermissionSurface??f,this.#i=e.ensureAssets??v}permission(){return this.#e.permission()}async requestPermission(){let e=this.#r();if(e)try{let t=await e.request(`microphone`);return t?(this.#p(t.stream),!0):!1}catch(e){return c.warn(`permission surface microphone request failed`,e),!1}return this.#e.requestPermission()}microphones(){return this.#e.microphones()}status(){return this.#s}onStatus(e){return this.#l.add(e),e(this.#s),()=>this.#l.delete(e)}warmup(){this.#o||(this.#o=!0,this.#c=a(),this.#_({engine:`builtin`,state:`downloading`}),this.#d().then(e=>{this.#a=e,this.#_({engine:`enhanced`,state:`ready`})},e=>{this.#o=!1,this.#_({engine:`builtin`,state:`unavailable`,message:m(e)}),c.warn(`enhanced speech engine unavailable`,e)}))}async#d(){let e=null;try{await this.#i(e=>this.#h(e))}catch(t){e=t,c.warn(`speech asset staging failed; trying already-present assets`,t)}try{return await this.#t(e=>this.#g(e))}catch(t){throw e??t}}async start(e){let t=this.#a;if(t){let n=null;try{return n=await this.#f(e.deviceId),await this.#n(t,{deviceId:e.deviceId,lang:e.lang,onPartial:e.onPartial,onError:e.onError,stream:n??void 0})}catch(e){if(n)for(let e of n.getTracks())e.stop();c.warn(`whisper session failed to start; falling back to builtin`,e)}}return this.#e.start(e)}async#f(e){let t=e&&e!=="default"?e:void 0,n=this.#m();if(n){if(!t&&p(n))return n;for(let e of n.getTracks())e.stop()}let r=this.#r();if(!r)return null;let i={audio:!t||{deviceId:{exact:t}}},a=await u(r.request(`microphone`,{constraints:i}),l,`microphone capture`);if(!a)throw Error(`microphone permission denied`);return a.stream}#p(e){if(this.#u&&this.#u!==e)for(let e of this.#u.getTracks())e.stop();this.#u=e}#m(){let e=this.#u;return this.#u=null,e}get enhancedReady(){return this.#a!==null}#h(e){if(this.#s.state!==`downloading`)return;(e.bytesTotal!=null||e.bytesLoaded!=null)&&this.#c.update(e.asset,e.bytesLoaded??0,e.bytesTotal??0);let t=this.#c.snapshot();t.total<=0||this.#_({engine:`builtin`,state:`downloading`,download:{loaded:t.loaded,total:t.total,etaSeconds:t.etaSeconds}})}#g(e){this.#s.state===`downloading`&&this.#_({engine:`builtin`,state:`downloading`,download:{loaded:e.loaded,total:e.total,etaSeconds:e.etaSeconds}})}#_(e){this.#s=e;for(let t of this.#l)t(e)}};function f(){let e=r();return e?{async request(t,n){let r=await e.request(t,n);return r?.kind===`microphone`?{kind:`microphone`,stream:r.stream}:null}}:null}function p(e){let t=e.getTracks();return t.length>0&&t.some(e=>e.readyState!==`ended`)}function m(e){return`Enhanced speech unavailable: ${e instanceof Error?e.message:String(e)}`}var h=n,g;function _(e){g=e}function v(e){return h()?Promise.resolve():i({instanceId:g,onProgress:e})}var y=null;function b(){return y??=new d,y}export{b as getComposerSpeech,_ as setComposerSpeechInstanceId};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as e,f as t,p as n,z as r}from"./account-store-
|
|
1
|
+
import{T as e,f as t,p as n,z as r}from"./account-store-BvEgWXDi.js";import{n as i}from"./main-DyPgoSsm.js";var a=`slicc_cloud_model_catalog`,o=`adobe`;function s(t){if(t===o)return!1;let n=e(t);return!(n.hidden||n.onOAuthLoginIntercepted)}function c(){try{let e=n().map(e=>({providerId:e.providerId,providerName:e.providerName,models:e.models.map(e=>({id:e.id,name:e.name}))}));localStorage.setItem(a,JSON.stringify(e))}catch{}}async function l(n){for(;n.firstChild;)n.removeChild(n.firstChild);n.className=`connect-surface`;let a=document.createElement(`h1`);a.className=`connect-surface__title`,a.textContent=`Connect providers`,n.appendChild(a);let l=document.createElement(`p`);l.className=`connect-surface__desc`,l.textContent=`Log in or add API keys for the providers your cone should use, then click Done to return to the dashboard.`,n.appendChild(l);let u=document.createElement(`div`);u.className=`connect-surface__accounts`,n.appendChild(u);function d(){for(;u.firstChild;)u.removeChild(u.firstChild);let n=t().filter(e=>e.providerId!==o);if(n.length===0){let e=document.createElement(`div`);e.className=`connect-surface__empty`,e.textContent=`No providers connected yet.`,u.appendChild(e)}else{let t=document.createElement(`div`);t.className=`connect-surface__accounts-list`;for(let i of n){let n=e(i.providerId),a=document.createElement(`div`);a.className=`connect-surface__account-row`;let o=document.createElement(`div`);o.className=`connect-surface__account-info`;let s=document.createElement(`div`);s.className=`connect-surface__account-name`,s.textContent=n.name,o.appendChild(s);let l=document.createElement(`div`);l.className=`connect-surface__account-detail`,l.textContent=i.userName?i.userName:i.accessToken?`Logged in`:i.apiKey?`API key set`:`No credentials`,o.appendChild(l),a.appendChild(o);let u=document.createElement(`button`);u.className=`connect-surface__remove-btn`,u.textContent=`Remove`,u.onclick=async()=>{await r(i.providerId),c(),d()},a.appendChild(u),t.appendChild(a)}u.appendChild(t)}let a=document.createElement(`button`);a.className=`connect-surface__add-btn`,a.textContent=n.length===0?`Add provider`:`Manage providers`,a.onclick=async()=>{await i({startInAddAccount:!0,providerFilter:s})&&(c(),d())},u.appendChild(a)}d(),c();let f=document.createElement(`div`);f.className=`connect-surface__footer`;let p=document.createElement(`button`);if(p.className=`connect-surface__done-btn`,p.textContent=`Done — return to dashboard`,p.onclick=()=>{c(),window.close()},f.appendChild(p),n.appendChild(f),!document.getElementById(`connect-surface-style`)){let e=document.createElement(`style`);e.id=`connect-surface-style`,e.textContent=`
|
|
2
2
|
.connect-surface {
|
|
3
3
|
padding: 2rem;
|
|
4
4
|
max-width: 560px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{t as n}from"./logger-LESFN7Hj.js";import{r,t as i}from"./base64-DzRgusa4.js";import"./proxied-fetch-B57RqgUb.js";import{t as a}from"./runtime-env-DadgceZk.js";import{a as o,r as s,t as c}from"./api-endpoint-Lx_FU5cP.js";import"./compat-uEPf6-XW.js";import"./libesm-CSMdpGMF.js";import"./context-compaction-DRymamfD.js";import{t as l}from"./secrets-bridge-client-DBeju3mP.js";import{r as u,t as d}from"./image-markers-DuyWsic3.js";const f={assign:0,create:0,clone:0,discard:0,update:0};function p(e,t){return f.assign+=1,{...e,...t}}function m(e,t,n){return e>=t&&e<=n}function h(e){return e===8205}function g(e){return m(e,55296,56319)}function ee(e){return m(e,127462,127487)}function _(e){return m(e,65024,65039)}function v(e){return m(e,768,879)||m(e,6832,6911)||m(e,7616,7679)||m(e,65056,65071)}function te(e){return e>65535?2:1}function ne(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(v(n)||_(n))t+=te(n);else break}return t}function re(e,t){let n=e.codePointAt(t),r=t+te(n);for(r=ne(e,r);r<e.length-1&&e[r]===``;){let t=e.codePointAt(r+1);r+=1+te(t),r=ne(e,r)}return ee(n)&&r<e.length&&ee(e.codePointAt(r))&&(r+=te(e.codePointAt(r))),r}function ie(e){return g(e)||v(e)||_(e)||h(e)}function ae(e){let t=0,n=0;for(;n<e.length;)n=re(e,n),t++;return t}function oe(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>=t)return!0;return!1}function se(e,t){let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>t)return!1;return!0}function ce(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return oe(e,t);if(n++,n>=t)return!0}return!1}function le(e,t){let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return se(e,t);if(n++,n>t)return!1}return!0}var ue=e({Entries:()=>Ie,EntriesRegExp:()=>Fe,Every:()=>Me,EveryAll:()=>Ne,GraphemeCount:()=>ke,HasPropertyKey:()=>C,IsArray:()=>y,IsBigInt:()=>de,IsBoolean:()=>fe,IsClassInstance:()=>De,IsConstructor:()=>pe,IsDeepEqual:()=>Ve,IsEqual:()=>x,IsFunction:()=>me,IsGreaterEqualThan:()=>Te,IsGreaterThan:()=>Se,IsInteger:()=>he,IsLessEqualThan:()=>we,IsLessThan:()=>Ce,IsMaxLength:()=>Ae,IsMinLength:()=>je,IsMultipleOf:()=>Ee,IsNull:()=>ge,IsNumber:()=>_e,IsObject:()=>b,IsObjectNotArray:()=>ve,IsString:()=>ye,IsSymbol:()=>be,IsUndefined:()=>xe,IsUnsafePropertyKey:()=>Pe,IsValueLike:()=>Oe,Keys:()=>w,ShiftLeft:()=>S,Symbols:()=>Le,Values:()=>Re});function y(e){return Array.isArray(e)}function de(e){return x(typeof e,`bigint`)}function fe(e){return x(typeof e,`boolean`)}function pe(e){if(xe(e)||!me(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function me(e){return x(typeof e,`function`)}function he(e){return Number.isInteger(e)}function ge(e){return x(e,null)}function _e(e){return Number.isFinite(e)}function ve(e){return b(e)&&!y(e)}function b(e){return x(typeof e,`object`)&&!ge(e)}function ye(e){return x(typeof e,`string`)}function be(e){return x(typeof e,`symbol`)}function xe(e){return x(e,void 0)}function x(e,t){return e===t}function Se(e,t){return e>t}function Ce(e,t){return e<t}function we(e,t){return e<=t}function Te(e,t){return e>=t}function Ee(e,t){if(de(e)||de(t))return BigInt(e)%BigInt(t)===0n;if(!_e(e)||he(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<1e-10}function De(e){if(!b(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return!ge(t)&&x(typeof t.constructor,`function`)&&!(x(t.constructor,globalThis.Object)||x(t.constructor.name,`Object`))}function Oe(e){return de(e)||fe(e)||ge(e)||_e(e)||ye(e)||xe(e)}function ke(e){return ae(e)}function Ae(e,t){return le(e,t)}function je(e,t){return ce(e,t)}function Me(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function Ne(e,t,n){let r=!0;for(let i=t;i<e.length;i++)n(e[i],i)||(r=!1);return r}function S(e,t,n){return x(e.length,0)?n():t(e[0],e.slice(1))}function Pe(e){return x(e,`__proto__`)||x(e,`constructor`)||x(e,`prototype`)}function C(e,t){return Pe(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Fe(e){return w(e).map(t=>[RegExp(`^${t}$`),e[t]])}function Ie(e){return Object.entries(e)}function w(e){return Object.getOwnPropertyNames(e)}function Le(e){return Object.getOwnPropertySymbols(e)}function Re(e){return Object.values(e)}function ze(e,t){if(!b(t))return!1;let n=w(e);return x(n.length,w(t).length)&&n.every(n=>Ve(e[n],t[n]))}function Be(e,t){return y(t)&&x(e.length,t.length)&&e.every((n,r)=>Ve(e[r],t[r]))}function Ve(e,t){return y(e)?Be(e,t):b(e)?ze(e,t):x(e,t)}function He(e){return e instanceof Boolean}function Ue(e){return e instanceof Number}function We(e){return e instanceof String}function Ge(e){return globalThis.ArrayBuffer.isView(e)}function Ke(e){return e instanceof globalThis.RegExp}function qe(e){return e instanceof globalThis.Date}function Je(e){return e instanceof globalThis.Set}function Ye(e){return e instanceof globalThis.Map}function Xe(e){return e}function Ze(e){return C(e,`~kind`)||C(e,`~unsafe`)}function Qe(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){if(Pe(e))continue;let r=n[e];C(r,`value`)&&Object.defineProperty(t,e,{...r,value:ot(r.value)})}return t}function $e(e){let t={};for(let n of w(e))Pe(n)||(t[n]=ot(e[n]));for(let n of Le(e))t[n]=ot(e[n]);return t}function et(e){return De(e)?Xe(e):Ze(e)?Qe(e):$e(e)}function tt(e){return e.map(e=>ot(e))}function nt(e){return e.slice()}function rt(e){return new RegExp(e.source,e.flags)}function it(e){return new Map(ot([...e.entries()]))}function at(e){return new Set(ot([...e.values()]))}function ot(e){return Ge(e)?nt(e):Ke(e)?rt(e):Ye(e)?it(e):Je(e)?at(e):y(e)?tt(e):b(e)?et(e):e}function st(e){return f.clone+=1,ot(e)}const ct={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function lt(){return ct}function ut(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function dt(e,t){return{...e,...t}}function T(e,t,n={}){f.create+=1;let r=lt(),i=dt(t,n),a=r.enumerableKind?dt(i,e):ut(i,e);return r.immutableTypes?Object.freeze(a):a}function ft(e,t){f.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(st(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function E(e,t,n){f.update+=1;let r=lt(),i=st(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function D(e,t){return b(e)&&C(e,`~kind`)&&x(e[`~kind`],t)}function pt(e){return b(e)}function O(e,t,n){return T({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function mt(e){return D(e,`Deferred`)}function ht(e){return E(e,{"~readonly":!0},{})}function gt(e,t){return E(ht(e),{},t)}function _t(e,t,n,r){return gt(Y(e,t,n),r)}function vt(e){return E(e,{"~optional":!0},{})}function yt(e,t){return E(vt(e),{},t)}function bt(e,t,n,r){return yt(Y(e,t,n),r)}function xt(e,t){return T({"~kind":`Array`},{type:`array`,items:e},t)}function k(e){return D(e,`Array`)}function St(e){return ft(e,[`~kind`,`type`,`items`])}function Ct(e,t,n={}){return T({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function wt(e){return D(e,`Constructor`)}function Tt(e){return ft(e,[`~kind`,`type`,`parameters`,`instanceType`])}function Et(e,t,n={}){return T({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Dt(e){return D(e,`Function`)}function Ot(e){return ft(e,[`~kind`,`type`,`parameters`,`returnType`])}function kt(e,t){return T({"~kind":`Ref`},{$ref:e},t)}function At(e){return D(e,`Ref`)}function jt(e,t){return T({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function Mt(e){return D(e,`Generic`)}function Nt(e){return T({"~kind":`Any`},{},e)}function Pt(e){return D(e,`Any`)}function A(e){return T({"~kind":`Never`},{not:{}},e)}function Ft(e){return D(e,`Never`)}function It(e,t={}){return yt(e,t)}function Lt(e){return It(e)}function Rt(e){return pt(e)&&C(e,`~optional`)}function zt(e){return w(e).filter(t=>!Rt(e[t]))}function Bt(e){return w(e)}function Vt(e){return Re(e)}function j(e,t={}){let n=zt(e);return T({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function M(e){return D(e,`Object`)}function Ht(e){return ft(e,[`~kind`,`type`,`properties`,`required`])}function Ut(e){return T({"~kind":`Unknown`},{},e)}function Wt(e){return D(e,`Unknown`)}function Gt(e,t,n){return T({"~kind":`Cyclic`},{$defs:w(e).reduce((t,n)=>({...t,[n]:E(e[n],{},{$id:n})}),{}),$ref:t},n)}function Kt(e){return D(e,`Cyclic`)}function qt(e){return ve(e)&&C(e,`~unsafe`)&&ge(e[`~unsafe`])}function Jt(e){return D(e,`Infer`)}function Yt(e,t,n,r={}){return T({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function Xt(e){return D(e,`Dependent`)}function Zt(e){return ft(e,[`~kind`,`if`,`then`,`else`])}function Qt(e){return D(e,`Enum`)}function $t(e,t={}){return T({"~kind":`Intersect`},{allOf:e},t)}function N(e){return D(e,`Intersect`)}function en(e){return ft(e,[`~kind`,`allOf`])}function tn(){throw Error(`Unreachable`)}var nn=e({Hash:()=>An,HashCode:()=>kn});function rn(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function an(e){return typeof e==`number`}var P;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(P||={});let on=BigInt(`14695981039346656037`);const[sn,cn]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],ln=Array.from({length:256}).map((e,t)=>BigInt(t)),un=new Float64Array(1),dn=new DataView(un.buffer),fn=new Uint8Array(un.buffer);function F(e){on^=ln[e],on=on*sn%cn}function pn(e){F(P.Array);for(let t of e)On(t)}function mn(e){F(P.BigInt),dn.setBigInt64(0,e);for(let e of fn)F(e)}function hn(e){F(P.Boolean),F(+!!e)}function gn(e){F(P.Constructor),On(e.toString())}function _n(e){F(P.Date),On(e.getTime())}function vn(e){F(P.Function),On(e.toString())}function yn(e){F(P.Null)}function bn(e){F(P.Number),dn.setFloat64(0,e,!0);for(let e of fn)F(e)}function xn(e){F(P.Object);for(let t of rn(e).sort())On(t),On(e[t])}function Sn(e){F(P.RegExp),wn(e.toString())}const Cn=new TextEncoder;function wn(e){F(P.String);for(let t of Cn.encode(e))F(t)}function Tn(e){F(P.Symbol),On(e.toString())}function En(e){F(P.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)F(t[e])}function Dn(e){return F(P.Undefined)}function On(e){return Ge(e)?En(e):qe(e)?_n(e):Ke(e)?Sn(e):He(e)?hn(e.valueOf()):We(e)?wn(e.valueOf()):Ue(e)?bn(e.valueOf()):an(e)?bn(e):y(e)?pn(e):fe(e)?hn(e):de(e)?mn(e):pe(e)?gn(e):ge(e)?yn(e):b(e)?xn(e):ye(e)?wn(e):be(e)?Tn(e):xe(e)?Dn(e):me(e)?vn(e):tn()}function kn(e){return on=BigInt(`14695981039346656037`),On(e),on}function An(e){return kn(e).toString(16).padStart(16,`0`)}function jn(e){return pt(e)&&C(e,`~codec`)&&b(e[`~codec`])&&C(e[`~codec`],`encode`)&&C(e[`~codec`],`decode`)}function Mn(e){return pt(e)&&C(e,`~immutable`)}function Nn(e,t={}){return gt(e,t)}function Pn(e){return pt(e)&&C(e,`~readonly`)}function Fn(e){return T({"~kind":`BigInt`},{type:`bigint`},e)}function In(e){return D(e,`BigInt`)}function Ln(e){return D(e,`Boolean`)}const Rn=`-?(?:0|[1-9][0-9]*)`;function zn(e){return T({"~kind":`Integer`},{type:`integer`},e)}function Bn(e){return D(e,`Integer`)}var Vn=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function Hn(e){return de(e)?`bigint`:fe(e)?`boolean`:_e(e)?`number`:ye(e)?`string`:(()=>{throw new Vn(e)})()}function I(e,t){return T({"~kind":`Literal`},{type:Hn(e),const:e},t)}function Un(e){return de(e)||fe(e)||_e(e)||ye(e)}function Wn(e){return L(e)&&de(e.const)}function Gn(e){return L(e)&&fe(e.const)}function Kn(e){return L(e)&&_e(e.const)}function qn(e){return L(e)&&ye(e.const)}function L(e){return D(e,`Literal`)}function Jn(e){return T({"~kind":`Null`},{type:`null`},e)}function Yn(e){return D(e,`Null`)}const Xn=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function Zn(e){return T({"~kind":`Number`},{type:`number`},e)}function Qn(e){return D(e,`Number`)}function $n(e){return T({"~kind":`Symbol`},{type:`symbol`},e)}function er(e){return D(e,`Symbol`)}function R(e){return T({"~kind":`String`},{type:`string`},e)}function tr(e){return D(e,`String`)}function z(e,t={}){return T({"~kind":`Union`},{anyOf:e},t)}function B(e){return D(e,`Union`)}function nr(e){return ft(e,[`~kind`,`anyOf`])}function rr(e){let t=Ea(e);return x(t.length,2)?t[0]:[]}function ir(e){return!0}function ar(e){return S(e,(e,t)=>sr(e)?ar(t):!1,()=>!0)}function or(e){return!x(e.length,0)&&ar(e)}function sr(e){return B(e)?or(e.anyOf):L(e)?ir(e.const):!1}function cr(e){return or(e)}function lr(e){return T({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function ur(e,t,n=[]){return S(e,(e,r)=>ur(r,t,[...n,`${e}${t}`]),()=>n)}function dr(e,t){return x(e.length,0)?[`${t}`]:ur(e,t)}function fr(e,t,n=[]){return S(t,(t,r)=>fr(e,r,[...n,...pr(e,t)]),()=>n)}function pr(e,t){return B(t)?fr(e,t.anyOf):L(t)?dr(e,t.const):tn()}function mr(e,t){return S(t,(t,n)=>mr(pr(e,t),n),()=>e)}function hr(e){return e.map(e=>I(e))}function gr(e){return z(hr(mr([],e)))}function _r(e){return x(e.length,0)?tn():x(e.length,1)&&L(e[0])?e[0]:gr(e)}function vr(e){let t=rr(e);return x(t.length,0)?R():cr(t)?_r(t):lr(e)}function yr(e){let t=vr(e);return qa(t)?R():t}function br(e,t){return T({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function xr(e){return br(wi,e)}function Sr(e){return j({true:e,false:e})}function Cr(e,t={}){let[n,r,i]=[e,e.length,!1];return T({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function V(e){return D(e,`Tuple`)}function wr(e){return ft(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Tr(e){return ft(e,[`~readonly`])}function Er(e,t){return E(Tr(e),{},t)}function Dr(e,t,n,r){return Er(Y(e,t,n),r)}function Or(e,t={}){return Er(e,t)}function kr(e){return ft(e,[`~optional`])}function Ar(e,t){return E(kr(e),{},t)}function jr(e,t,n,r){return Ar(Y(e,t,n),r)}function Mr(e,t={}){return Ar(e,t)}function Nr(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function Pr(e){return j(Nr(e.items))}function Fr(e,t){return Pn(e)?!!Pn(t):!1}function Ir(e,t){return Rt(e)?!!Rt(t):!1}function Lr(e,t){let n=Fr(e,t),r=Ir(e,t),i=Or(Mr(ei([e,t])));return n&&r?Nn(It(i)):n&&!r?Nn(i):!n&&r?It(i):i}function Rr(e,t,n){return n in e?n in t?Lr(e[n],t[n]):e[n]:n in t?t[n]:A()}function zr(e,t){return[...new Set([...w(t),...w(e)])].reduce((n,r)=>({...n,[r]:Rr(e,t,r)}),{})}function Br(e){return M(e)?e.properties:V(e)?Nr(e.items):tn()}function Vr(e,t){return j(zr(Br(e),Br(t)))}function Hr(e,t){let n=qs(e,t);return x(n,`left-inside`)?e:x(n,`right-inside`)||x(n,`equal`)?t:A()}function Ur(e){return M(e)||V(e)}function Wr(e,t){let n=B(e),r=B(t);return n||r}function Gr(e,t){let n=ri(e),r=ri(t),i=Wr(n,r),a=Ur(n),o=Ur(r);return i?ei([n,r]):a&&o?Vr(n,r):a&&!o?n:!a&&o?r:Hr(n,r)}function Kr(e,t,n=[]){return S(t,(t,r)=>Kr(e,r,[...n,Gr(e,t)]),()=>x(n.length,0)?[e]:n)}function qr(e,t,n=[]){return S(e,(e,r)=>qr(r,t,[...n,...Jr([e],t)]),()=>n)}function Jr(e,t=[]){return S(e,(e,n)=>B(e)?Jr(n,qr(e.anyOf,t)):Jr(n,Kr(e,t)),()=>t)}function Yr(e,t){return Qa(Ks({},e,t))?[]:[e]}function Xr(e,t){return e.reduce((e,n)=>[...e,...Yr(n,t)],[])}function Zr(e,t){let n=ri(e);return ni(Xr(B(n)?n.anyOf:[n],t))}function Qr(e,t,n){return ni([$t([e,t]),Zr(n,e)])}function $r(e){return ni(e.map(e=>I(e)))}function ei(e){return ii(Qs(Jr(e)))}function ti(e){return ri(yr(e))}function ni(e){return ii(Qs(e))}function ri(e){return Xt(e)?Qr(e.if,e.then,e.else):Qt(e)?$r(e.enum):N(e)?ei(e.allOf):qa(e)?ti(e.pattern):B(e)?ni(e.anyOf):e}function ii(e){return x(e.length,1)?e[0]:x(e.length,0)?A():z(e)}function ai(e,t){return yi($r(e),t)}function oi(e,t){return br(Si,t)}function si(e,t){return yi(ei(e),t)}function ci(e,t){return ye(e)||_e(e)?j({[e]:t}):x(e,!1)?j({false:t}):x(e,!0)?j({true:t}):j({})}function li(e,t){return br(Ci,t)}function ui(e,t){return C(e,`pattern`)&&(ye(e.pattern)||e.pattern instanceof RegExp)?br(e.pattern.toString(),t):br(wi,t)}function di(e,t){return cr(rr(e))?yi(ti(e),t):br(e,t)}function fi(e){return B(e)?pi(e.anyOf):[e]}function pi(e){return e.reduce((e,t)=>[...e,...fi(t)],[])}function mi(e){return e.some(e=>tr(e)||Qn(e)||Bn(e))}function hi(e,t){return x(mi(e),!0)?br(wi,t):void 0}function gi(e,t){return e.reduce((e,n)=>L(n)&&(ye(n.const)||_e(n.const))?{...e,[n.const]:t}:e,{})}function _i(e,t){return j(gi(e,t))}function vi(e,t){let n=pi(e),r=hi(n,t);return pt(r)?r:_i(n,t)}function yi(e,t){return Pt(e)?xr(t):Ln(e)?Sr(t):Qt(e)?ai(e.enum,t):Bn(e)?oi(e,t):N(e)?si(e.allOf,t):L(e)?ci(e.const,t):Qn(e)?li(e,t):B(e)?vi(e.anyOf,t):tr(e)?ui(e,t):qa(e)?di(e.pattern,t):j({})}function bi(e,t,n){return J([e])?E(yi(e,t),{},n):Ti(e,t,n)}function xi(e,t,n,r,i){return bi(Y(e,t,n),Y(e,t,r),i)}const Si=`^${Rn}$`,Ci=`^${Xn}$`,wi=`^.*$`;function Ti(e,t,n={}){return O(`Record`,[e,t],n)}function Ei(e,t,n={}){return bi(e,t,n)}function Di(e,t){return br(e,t)}function Oi(e){return x(e,wi)?R():x(e,Si)?zn():x(e,Ci)?Zn():vr(e)}function ki(e){return w(e.patternProperties)[0]}function Ai(e){return Oi(ki(e))}function ji(e){return e.patternProperties[ki(e)]}function Mi(e){return D(e,`Record`)}function Ni(e){return T({"~kind":`Rest`},{type:`rest`,items:e},{})}function Pi(e){return D(e,`Rest`)}function Fi(e){return D(e,`This`)}function Ii(e){return T({"~kind":`Undefined`},{type:`undefined`},e)}function Li(e){return D(e,`Undefined`)}function Ri(e){return D(e,`Void`)}function zi(e){return Fn()}function Bi(e){return R()}function Vi(e){return Zn()}function Hi(e){return zn()}function Ui(e){return A()}function Wi(e){return I(e)}function Gi(e){return e}function Ki(e){return z(e[1])}function qi(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Ji(e){return[e[0],...e[1]]}function Yi(e){return e}function Xi(e){return e[1]}function Zi(e){return x(e.length,2)}function Qi(e,t,n){return Zi(e)?t(e[0],e[1]):n()}function $i(e,t){return x(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function ea(e,t){for(let n=0;n<e.length;n++){let r=$i(e[n],t);if(Zi(r))return r}return[]}function ta(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}const na=[...ta(97,122),...ta(65,90)],ra=[`0`,...ta(49,57)];function ia(e){let t=e.indexOf(`*/`);return x(t,-1)?``:e.slice(t+2)}function aa(e){let t=e.indexOf(`
|
|
1
|
+
import{n as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{t as n}from"./logger-LESFN7Hj.js";import{r,t as i}from"./base64-DzRgusa4.js";import"./proxied-fetch-DEK8DT-z.js";import{t as a}from"./runtime-env-DadgceZk.js";import{i as o,o as s,t as c}from"./api-endpoint-3qEcn7BY.js";import"./compat-uEPf6-XW.js";import"./libesm-CSMdpGMF.js";import"./context-compaction-DRymamfD.js";import{t as l}from"./secrets-bridge-client-ZpBL1Zhl.js";import{r as u,t as d}from"./image-markers-DuyWsic3.js";const f={assign:0,create:0,clone:0,discard:0,update:0};function p(e,t){return f.assign+=1,{...e,...t}}function m(e,t,n){return e>=t&&e<=n}function h(e){return e===8205}function g(e){return m(e,55296,56319)}function ee(e){return m(e,127462,127487)}function _(e){return m(e,65024,65039)}function v(e){return m(e,768,879)||m(e,6832,6911)||m(e,7616,7679)||m(e,65056,65071)}function te(e){return e>65535?2:1}function ne(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(v(n)||_(n))t+=te(n);else break}return t}function re(e,t){let n=e.codePointAt(t),r=t+te(n);for(r=ne(e,r);r<e.length-1&&e[r]===``;){let t=e.codePointAt(r+1);r+=1+te(t),r=ne(e,r)}return ee(n)&&r<e.length&&ee(e.codePointAt(r))&&(r+=te(e.codePointAt(r))),r}function ie(e){return g(e)||v(e)||_(e)||h(e)}function ae(e){let t=0,n=0;for(;n<e.length;)n=re(e,n),t++;return t}function oe(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>=t)return!0;return!1}function se(e,t){let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>t)return!1;return!0}function ce(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return oe(e,t);if(n++,n>=t)return!0}return!1}function le(e,t){let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return se(e,t);if(n++,n>t)return!1}return!0}var ue=e({Entries:()=>Ie,EntriesRegExp:()=>Fe,Every:()=>Me,EveryAll:()=>Ne,GraphemeCount:()=>ke,HasPropertyKey:()=>C,IsArray:()=>y,IsBigInt:()=>de,IsBoolean:()=>fe,IsClassInstance:()=>De,IsConstructor:()=>pe,IsDeepEqual:()=>Ve,IsEqual:()=>x,IsFunction:()=>me,IsGreaterEqualThan:()=>Te,IsGreaterThan:()=>Se,IsInteger:()=>he,IsLessEqualThan:()=>we,IsLessThan:()=>Ce,IsMaxLength:()=>Ae,IsMinLength:()=>je,IsMultipleOf:()=>Ee,IsNull:()=>ge,IsNumber:()=>_e,IsObject:()=>b,IsObjectNotArray:()=>ve,IsString:()=>ye,IsSymbol:()=>be,IsUndefined:()=>xe,IsUnsafePropertyKey:()=>Pe,IsValueLike:()=>Oe,Keys:()=>w,ShiftLeft:()=>S,Symbols:()=>Le,Values:()=>Re});function y(e){return Array.isArray(e)}function de(e){return x(typeof e,`bigint`)}function fe(e){return x(typeof e,`boolean`)}function pe(e){if(xe(e)||!me(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function me(e){return x(typeof e,`function`)}function he(e){return Number.isInteger(e)}function ge(e){return x(e,null)}function _e(e){return Number.isFinite(e)}function ve(e){return b(e)&&!y(e)}function b(e){return x(typeof e,`object`)&&!ge(e)}function ye(e){return x(typeof e,`string`)}function be(e){return x(typeof e,`symbol`)}function xe(e){return x(e,void 0)}function x(e,t){return e===t}function Se(e,t){return e>t}function Ce(e,t){return e<t}function we(e,t){return e<=t}function Te(e,t){return e>=t}function Ee(e,t){if(de(e)||de(t))return BigInt(e)%BigInt(t)===0n;if(!_e(e)||he(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<1e-10}function De(e){if(!b(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return!ge(t)&&x(typeof t.constructor,`function`)&&!(x(t.constructor,globalThis.Object)||x(t.constructor.name,`Object`))}function Oe(e){return de(e)||fe(e)||ge(e)||_e(e)||ye(e)||xe(e)}function ke(e){return ae(e)}function Ae(e,t){return le(e,t)}function je(e,t){return ce(e,t)}function Me(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function Ne(e,t,n){let r=!0;for(let i=t;i<e.length;i++)n(e[i],i)||(r=!1);return r}function S(e,t,n){return x(e.length,0)?n():t(e[0],e.slice(1))}function Pe(e){return x(e,`__proto__`)||x(e,`constructor`)||x(e,`prototype`)}function C(e,t){return Pe(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Fe(e){return w(e).map(t=>[RegExp(`^${t}$`),e[t]])}function Ie(e){return Object.entries(e)}function w(e){return Object.getOwnPropertyNames(e)}function Le(e){return Object.getOwnPropertySymbols(e)}function Re(e){return Object.values(e)}function ze(e,t){if(!b(t))return!1;let n=w(e);return x(n.length,w(t).length)&&n.every(n=>Ve(e[n],t[n]))}function Be(e,t){return y(t)&&x(e.length,t.length)&&e.every((n,r)=>Ve(e[r],t[r]))}function Ve(e,t){return y(e)?Be(e,t):b(e)?ze(e,t):x(e,t)}function He(e){return e instanceof Boolean}function Ue(e){return e instanceof Number}function We(e){return e instanceof String}function Ge(e){return globalThis.ArrayBuffer.isView(e)}function Ke(e){return e instanceof globalThis.RegExp}function qe(e){return e instanceof globalThis.Date}function Je(e){return e instanceof globalThis.Set}function Ye(e){return e instanceof globalThis.Map}function Xe(e){return e}function Ze(e){return C(e,`~kind`)||C(e,`~unsafe`)}function Qe(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){if(Pe(e))continue;let r=n[e];C(r,`value`)&&Object.defineProperty(t,e,{...r,value:ot(r.value)})}return t}function $e(e){let t={};for(let n of w(e))Pe(n)||(t[n]=ot(e[n]));for(let n of Le(e))t[n]=ot(e[n]);return t}function et(e){return De(e)?Xe(e):Ze(e)?Qe(e):$e(e)}function tt(e){return e.map(e=>ot(e))}function nt(e){return e.slice()}function rt(e){return new RegExp(e.source,e.flags)}function it(e){return new Map(ot([...e.entries()]))}function at(e){return new Set(ot([...e.values()]))}function ot(e){return Ge(e)?nt(e):Ke(e)?rt(e):Ye(e)?it(e):Je(e)?at(e):y(e)?tt(e):b(e)?et(e):e}function st(e){return f.clone+=1,ot(e)}const ct={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function lt(){return ct}function ut(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function dt(e,t){return{...e,...t}}function T(e,t,n={}){f.create+=1;let r=lt(),i=dt(t,n),a=r.enumerableKind?dt(i,e):ut(i,e);return r.immutableTypes?Object.freeze(a):a}function ft(e,t){f.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(st(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function E(e,t,n){f.update+=1;let r=lt(),i=st(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function D(e,t){return b(e)&&C(e,`~kind`)&&x(e[`~kind`],t)}function pt(e){return b(e)}function O(e,t,n){return T({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function mt(e){return D(e,`Deferred`)}function ht(e){return E(e,{"~readonly":!0},{})}function gt(e,t){return E(ht(e),{},t)}function _t(e,t,n,r){return gt(Y(e,t,n),r)}function vt(e){return E(e,{"~optional":!0},{})}function yt(e,t){return E(vt(e),{},t)}function bt(e,t,n,r){return yt(Y(e,t,n),r)}function xt(e,t){return T({"~kind":`Array`},{type:`array`,items:e},t)}function k(e){return D(e,`Array`)}function St(e){return ft(e,[`~kind`,`type`,`items`])}function Ct(e,t,n={}){return T({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function wt(e){return D(e,`Constructor`)}function Tt(e){return ft(e,[`~kind`,`type`,`parameters`,`instanceType`])}function Et(e,t,n={}){return T({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Dt(e){return D(e,`Function`)}function Ot(e){return ft(e,[`~kind`,`type`,`parameters`,`returnType`])}function kt(e,t){return T({"~kind":`Ref`},{$ref:e},t)}function At(e){return D(e,`Ref`)}function jt(e,t){return T({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function Mt(e){return D(e,`Generic`)}function Nt(e){return T({"~kind":`Any`},{},e)}function Pt(e){return D(e,`Any`)}function A(e){return T({"~kind":`Never`},{not:{}},e)}function Ft(e){return D(e,`Never`)}function It(e,t={}){return yt(e,t)}function Lt(e){return It(e)}function Rt(e){return pt(e)&&C(e,`~optional`)}function zt(e){return w(e).filter(t=>!Rt(e[t]))}function Bt(e){return w(e)}function Vt(e){return Re(e)}function j(e,t={}){let n=zt(e);return T({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function M(e){return D(e,`Object`)}function Ht(e){return ft(e,[`~kind`,`type`,`properties`,`required`])}function Ut(e){return T({"~kind":`Unknown`},{},e)}function Wt(e){return D(e,`Unknown`)}function Gt(e,t,n){return T({"~kind":`Cyclic`},{$defs:w(e).reduce((t,n)=>({...t,[n]:E(e[n],{},{$id:n})}),{}),$ref:t},n)}function Kt(e){return D(e,`Cyclic`)}function qt(e){return ve(e)&&C(e,`~unsafe`)&&ge(e[`~unsafe`])}function Jt(e){return D(e,`Infer`)}function Yt(e,t,n,r={}){return T({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function Xt(e){return D(e,`Dependent`)}function Zt(e){return ft(e,[`~kind`,`if`,`then`,`else`])}function Qt(e){return D(e,`Enum`)}function $t(e,t={}){return T({"~kind":`Intersect`},{allOf:e},t)}function N(e){return D(e,`Intersect`)}function en(e){return ft(e,[`~kind`,`allOf`])}function tn(){throw Error(`Unreachable`)}var nn=e({Hash:()=>An,HashCode:()=>kn});function rn(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function an(e){return typeof e==`number`}var P;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(P||={});let on=BigInt(`14695981039346656037`);const[sn,cn]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],ln=Array.from({length:256}).map((e,t)=>BigInt(t)),un=new Float64Array(1),dn=new DataView(un.buffer),fn=new Uint8Array(un.buffer);function F(e){on^=ln[e],on=on*sn%cn}function pn(e){F(P.Array);for(let t of e)On(t)}function mn(e){F(P.BigInt),dn.setBigInt64(0,e);for(let e of fn)F(e)}function hn(e){F(P.Boolean),F(+!!e)}function gn(e){F(P.Constructor),On(e.toString())}function _n(e){F(P.Date),On(e.getTime())}function vn(e){F(P.Function),On(e.toString())}function yn(e){F(P.Null)}function bn(e){F(P.Number),dn.setFloat64(0,e,!0);for(let e of fn)F(e)}function xn(e){F(P.Object);for(let t of rn(e).sort())On(t),On(e[t])}function Sn(e){F(P.RegExp),wn(e.toString())}const Cn=new TextEncoder;function wn(e){F(P.String);for(let t of Cn.encode(e))F(t)}function Tn(e){F(P.Symbol),On(e.toString())}function En(e){F(P.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)F(t[e])}function Dn(e){return F(P.Undefined)}function On(e){return Ge(e)?En(e):qe(e)?_n(e):Ke(e)?Sn(e):He(e)?hn(e.valueOf()):We(e)?wn(e.valueOf()):Ue(e)?bn(e.valueOf()):an(e)?bn(e):y(e)?pn(e):fe(e)?hn(e):de(e)?mn(e):pe(e)?gn(e):ge(e)?yn(e):b(e)?xn(e):ye(e)?wn(e):be(e)?Tn(e):xe(e)?Dn(e):me(e)?vn(e):tn()}function kn(e){return on=BigInt(`14695981039346656037`),On(e),on}function An(e){return kn(e).toString(16).padStart(16,`0`)}function jn(e){return pt(e)&&C(e,`~codec`)&&b(e[`~codec`])&&C(e[`~codec`],`encode`)&&C(e[`~codec`],`decode`)}function Mn(e){return pt(e)&&C(e,`~immutable`)}function Nn(e,t={}){return gt(e,t)}function Pn(e){return pt(e)&&C(e,`~readonly`)}function Fn(e){return T({"~kind":`BigInt`},{type:`bigint`},e)}function In(e){return D(e,`BigInt`)}function Ln(e){return D(e,`Boolean`)}const Rn=`-?(?:0|[1-9][0-9]*)`;function zn(e){return T({"~kind":`Integer`},{type:`integer`},e)}function Bn(e){return D(e,`Integer`)}var Vn=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function Hn(e){return de(e)?`bigint`:fe(e)?`boolean`:_e(e)?`number`:ye(e)?`string`:(()=>{throw new Vn(e)})()}function I(e,t){return T({"~kind":`Literal`},{type:Hn(e),const:e},t)}function Un(e){return de(e)||fe(e)||_e(e)||ye(e)}function Wn(e){return L(e)&&de(e.const)}function Gn(e){return L(e)&&fe(e.const)}function Kn(e){return L(e)&&_e(e.const)}function qn(e){return L(e)&&ye(e.const)}function L(e){return D(e,`Literal`)}function Jn(e){return T({"~kind":`Null`},{type:`null`},e)}function Yn(e){return D(e,`Null`)}const Xn=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function Zn(e){return T({"~kind":`Number`},{type:`number`},e)}function Qn(e){return D(e,`Number`)}function $n(e){return T({"~kind":`Symbol`},{type:`symbol`},e)}function er(e){return D(e,`Symbol`)}function R(e){return T({"~kind":`String`},{type:`string`},e)}function tr(e){return D(e,`String`)}function z(e,t={}){return T({"~kind":`Union`},{anyOf:e},t)}function B(e){return D(e,`Union`)}function nr(e){return ft(e,[`~kind`,`anyOf`])}function rr(e){let t=Ea(e);return x(t.length,2)?t[0]:[]}function ir(e){return!0}function ar(e){return S(e,(e,t)=>sr(e)?ar(t):!1,()=>!0)}function or(e){return!x(e.length,0)&&ar(e)}function sr(e){return B(e)?or(e.anyOf):L(e)?ir(e.const):!1}function cr(e){return or(e)}function lr(e){return T({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function ur(e,t,n=[]){return S(e,(e,r)=>ur(r,t,[...n,`${e}${t}`]),()=>n)}function dr(e,t){return x(e.length,0)?[`${t}`]:ur(e,t)}function fr(e,t,n=[]){return S(t,(t,r)=>fr(e,r,[...n,...pr(e,t)]),()=>n)}function pr(e,t){return B(t)?fr(e,t.anyOf):L(t)?dr(e,t.const):tn()}function mr(e,t){return S(t,(t,n)=>mr(pr(e,t),n),()=>e)}function hr(e){return e.map(e=>I(e))}function gr(e){return z(hr(mr([],e)))}function _r(e){return x(e.length,0)?tn():x(e.length,1)&&L(e[0])?e[0]:gr(e)}function vr(e){let t=rr(e);return x(t.length,0)?R():cr(t)?_r(t):lr(e)}function yr(e){let t=vr(e);return qa(t)?R():t}function br(e,t){return T({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function xr(e){return br(wi,e)}function Sr(e){return j({true:e,false:e})}function Cr(e,t={}){let[n,r,i]=[e,e.length,!1];return T({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function V(e){return D(e,`Tuple`)}function wr(e){return ft(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Tr(e){return ft(e,[`~readonly`])}function Er(e,t){return E(Tr(e),{},t)}function Dr(e,t,n,r){return Er(Y(e,t,n),r)}function Or(e,t={}){return Er(e,t)}function kr(e){return ft(e,[`~optional`])}function Ar(e,t){return E(kr(e),{},t)}function jr(e,t,n,r){return Ar(Y(e,t,n),r)}function Mr(e,t={}){return Ar(e,t)}function Nr(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function Pr(e){return j(Nr(e.items))}function Fr(e,t){return Pn(e)?!!Pn(t):!1}function Ir(e,t){return Rt(e)?!!Rt(t):!1}function Lr(e,t){let n=Fr(e,t),r=Ir(e,t),i=Or(Mr(ei([e,t])));return n&&r?Nn(It(i)):n&&!r?Nn(i):!n&&r?It(i):i}function Rr(e,t,n){return n in e?n in t?Lr(e[n],t[n]):e[n]:n in t?t[n]:A()}function zr(e,t){return[...new Set([...w(t),...w(e)])].reduce((n,r)=>({...n,[r]:Rr(e,t,r)}),{})}function Br(e){return M(e)?e.properties:V(e)?Nr(e.items):tn()}function Vr(e,t){return j(zr(Br(e),Br(t)))}function Hr(e,t){let n=qs(e,t);return x(n,`left-inside`)?e:x(n,`right-inside`)||x(n,`equal`)?t:A()}function Ur(e){return M(e)||V(e)}function Wr(e,t){let n=B(e),r=B(t);return n||r}function Gr(e,t){let n=ri(e),r=ri(t),i=Wr(n,r),a=Ur(n),o=Ur(r);return i?ei([n,r]):a&&o?Vr(n,r):a&&!o?n:!a&&o?r:Hr(n,r)}function Kr(e,t,n=[]){return S(t,(t,r)=>Kr(e,r,[...n,Gr(e,t)]),()=>x(n.length,0)?[e]:n)}function qr(e,t,n=[]){return S(e,(e,r)=>qr(r,t,[...n,...Jr([e],t)]),()=>n)}function Jr(e,t=[]){return S(e,(e,n)=>B(e)?Jr(n,qr(e.anyOf,t)):Jr(n,Kr(e,t)),()=>t)}function Yr(e,t){return Qa(Ks({},e,t))?[]:[e]}function Xr(e,t){return e.reduce((e,n)=>[...e,...Yr(n,t)],[])}function Zr(e,t){let n=ri(e);return ni(Xr(B(n)?n.anyOf:[n],t))}function Qr(e,t,n){return ni([$t([e,t]),Zr(n,e)])}function $r(e){return ni(e.map(e=>I(e)))}function ei(e){return ii(Qs(Jr(e)))}function ti(e){return ri(yr(e))}function ni(e){return ii(Qs(e))}function ri(e){return Xt(e)?Qr(e.if,e.then,e.else):Qt(e)?$r(e.enum):N(e)?ei(e.allOf):qa(e)?ti(e.pattern):B(e)?ni(e.anyOf):e}function ii(e){return x(e.length,1)?e[0]:x(e.length,0)?A():z(e)}function ai(e,t){return yi($r(e),t)}function oi(e,t){return br(Si,t)}function si(e,t){return yi(ei(e),t)}function ci(e,t){return ye(e)||_e(e)?j({[e]:t}):x(e,!1)?j({false:t}):x(e,!0)?j({true:t}):j({})}function li(e,t){return br(Ci,t)}function ui(e,t){return C(e,`pattern`)&&(ye(e.pattern)||e.pattern instanceof RegExp)?br(e.pattern.toString(),t):br(wi,t)}function di(e,t){return cr(rr(e))?yi(ti(e),t):br(e,t)}function fi(e){return B(e)?pi(e.anyOf):[e]}function pi(e){return e.reduce((e,t)=>[...e,...fi(t)],[])}function mi(e){return e.some(e=>tr(e)||Qn(e)||Bn(e))}function hi(e,t){return x(mi(e),!0)?br(wi,t):void 0}function gi(e,t){return e.reduce((e,n)=>L(n)&&(ye(n.const)||_e(n.const))?{...e,[n.const]:t}:e,{})}function _i(e,t){return j(gi(e,t))}function vi(e,t){let n=pi(e),r=hi(n,t);return pt(r)?r:_i(n,t)}function yi(e,t){return Pt(e)?xr(t):Ln(e)?Sr(t):Qt(e)?ai(e.enum,t):Bn(e)?oi(e,t):N(e)?si(e.allOf,t):L(e)?ci(e.const,t):Qn(e)?li(e,t):B(e)?vi(e.anyOf,t):tr(e)?ui(e,t):qa(e)?di(e.pattern,t):j({})}function bi(e,t,n){return J([e])?E(yi(e,t),{},n):Ti(e,t,n)}function xi(e,t,n,r,i){return bi(Y(e,t,n),Y(e,t,r),i)}const Si=`^${Rn}$`,Ci=`^${Xn}$`,wi=`^.*$`;function Ti(e,t,n={}){return O(`Record`,[e,t],n)}function Ei(e,t,n={}){return bi(e,t,n)}function Di(e,t){return br(e,t)}function Oi(e){return x(e,wi)?R():x(e,Si)?zn():x(e,Ci)?Zn():vr(e)}function ki(e){return w(e.patternProperties)[0]}function Ai(e){return Oi(ki(e))}function ji(e){return e.patternProperties[ki(e)]}function Mi(e){return D(e,`Record`)}function Ni(e){return T({"~kind":`Rest`},{type:`rest`,items:e},{})}function Pi(e){return D(e,`Rest`)}function Fi(e){return D(e,`This`)}function Ii(e){return T({"~kind":`Undefined`},{type:`undefined`},e)}function Li(e){return D(e,`Undefined`)}function Ri(e){return D(e,`Void`)}function zi(e){return Fn()}function Bi(e){return R()}function Vi(e){return Zn()}function Hi(e){return zn()}function Ui(e){return A()}function Wi(e){return I(e)}function Gi(e){return e}function Ki(e){return z(e[1])}function qi(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Ji(e){return[e[0],...e[1]]}function Yi(e){return e}function Xi(e){return e[1]}function Zi(e){return x(e.length,2)}function Qi(e,t,n){return Zi(e)?t(e[0],e[1]):n()}function $i(e,t){return x(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function ea(e,t){for(let n=0;n<e.length;n++){let r=$i(e[n],t);if(Zi(r))return r}return[]}function ta(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}const na=[...ta(97,122),...ta(65,90)],ra=[`0`,...ta(49,57)];function ia(e){let t=e.indexOf(`*/`);return x(t,-1)?``:e.slice(t+2)}function aa(e){let t=e.indexOf(`
|
|
2
2
|
`);return x(t,-1)?``:e.slice(t)}function oa(e){return e.replace(/^[ \t\r\f\v]+/,``)}function sa(e){let t=oa(e);return t.startsWith(`/*`)?sa(ia(t.slice(2))):t.startsWith(`//`)?sa(aa(t.slice(2))):t}function ca(e){let t=e.trimStart();return t.startsWith(`/*`)?ca(ia(t.slice(2))):t.startsWith(`//`)?ca(aa(t.slice(2))):t}[...ra];function la(e,t){return ea([e],t)}function ua(e,t){return x(e,``)?[``,t]:e.startsWith(`
|
|
3
3
|
`)?la(e,sa(t)):e.startsWith(` `)?la(e,t):la(e,ca(t))}[...na,...ra],[...ra];function da(e){return x(e,``)?[]:[e.slice(0,1),e.slice(1)]}function fa(e,t){return S(e,(e,n)=>t.startsWith(e)?!0:fa(n,t),()=>!1)}function pa(e,t,n=``){return Qi(da(t),(r,i)=>fa(e,t)?[n,t]:pa(e,i,`${n}${r}`),()=>[])}function ma(e,t){return Qi(pa(e,t),(e,t)=>x(e,``)?[]:[e,t],()=>[])}const H=(e,t,n=()=>[])=>e.length===2?t(e):n(),ha=e=>H(ua(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[zi(e),t]),ga=e=>H(ua(`.*`,e),([e,t])=>[Bi(e),t]),_a=e=>H(ua(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[Vi(e),t]),va=e=>H(ua(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[Hi(e),t]),ya=e=>H(ua(`(?!)`,e),([e,t])=>[Ui(e),t]),ba=e=>H(ma([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[Wi(e),t]),xa=e=>H(H(ha(e),([e,t])=>[e,t],()=>H(ga(e),([e,t])=>[e,t],()=>H(_a(e),([e,t])=>[e,t],()=>H(va(e),([e,t])=>[e,t],()=>H(ya(e),([e,t])=>[e,t],()=>H(Sa(e),([e,t])=>[e,t],()=>H(ba(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[Gi(e),t]),Sa=e=>H(H(ua(`(`,e),([e,t])=>H(Ta(t),([t,n])=>H(ua(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ki(e),t]),Ca=e=>H(H(H(wa(e),([e,t])=>H(ua(`|`,t),([t,n])=>H(Ca(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>H(H(wa(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>H([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[qi(e),t]),wa=e=>H(H(xa(e),([e,t])=>H(Ta(t),([t,n])=>[[e,t],n])),([e,t])=>[Ji(e),t]),Ta=e=>H(H(Ca(e),([e,t])=>[e,t],()=>H(wa(e),([e,t])=>[e,t],()=>[])),([e,t])=>[Yi(e),t]),Ea=e=>H(H(ua(`^`,e),([e,t])=>H(Ta(t),([t,n])=>H(ua(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Xi(e),t]);function Da(e){return e.join(`|`)}function Oa(e){return e.slice(1,e.length-1)}function ka(e,t,n){return Ba(t,`${n}${e}`)}function Aa(e,t){return Ba(e,`${t}-?(?:0|[1-9][0-9]*)n`)}function ja(e,t){return Ba(e,`${t}${Rn}`)}function Ma(e,t){return Ba(e,`${t}${Xn}`)}function Na(e,t){return za(z([I(`false`),I(`true`)]),e,t)}function Pa(e,t){return Ba(e,`${t}.*`)}function Fa(e,t,n){return Ba(t,`${n}${Oa(e)}`)}function Ia(e,t,n){return za(Ua(e,{}),t,n)}function La(e,t,n){return za($r(e),t,n)}function Ra(e,t,n,r=[]){return S(e,(e,i)=>Ra(i,t,n,[...r,za(e,[],``)]),()=>Ba(t,`${n}(${Da(r)})`))}function za(e,t,n){return Qt(e)?La(e.enum,t,n):Bn(e)?ja(t,n):L(e)?ka(e.const,t,n):In(e)?Aa(t,n):Ln(e)?Na(t,n):Qn(e)?Ma(t,n):tr(e)?Pa(t,n):qa(e)?Fa(e.pattern,t,n):Ka(e)?Ia(e.parameters[0],t,n):B(e)?Ra(e.anyOf,t,n):`(?!)`}function Ba(e,t){return S(e,(e,n)=>za(e,n,t),()=>t)}function Va(e){return`^${Ba(e,``)}$`}function Ha(e){return lr(Va(e))}function Ua(e,t){return J(e)?E(Ha(e),{},t):Ga(e,t)}function Wa(e,t,n,r){return Ua(Xd(e,t,n),r)}function Ga(e,t={}){return O(`TemplateLiteral`,[e],t)}function Ka(e){return pt(e)&&C(e,`action`)&&x(e.action,`TemplateLiteral`)}function qa(e){return D(e,`TemplateLiteral`)}function Ja(e){return T({"~kind":`ExtendsUnion`},{inferred:e})}function Ya(e){return b(e)&&C(e,`~kind`)&&C(e,`inferred`)&&x(e[`~kind`],`ExtendsUnion`)&&b(e.inferred)}function U(e){return T({"~kind":`ExtendsTrue`},{inferred:e})}function Xa(e){return b(e)&&C(e,`~kind`)&&C(e,`inferred`)&&x(e[`~kind`],`ExtendsTrue`)&&b(e.inferred)}function W(){return T({"~kind":`ExtendsFalse`},{})}function Za(e){return b(e)&&C(e,`~kind`)&&x(e[`~kind`],`ExtendsFalse`)}function Qa(e){return Ya(e)||Xa(e)}function G(e,t,n){return Qa(e)?t(e.inferred):n()}function $a(e,t,n,r){return G(q(e,n,r),r=>U(p(p(e,r),{[t]:n})),()=>W())}function eo(e,t){return U(e)}function to(e,t,n,r,i){return G(q(e,t,n),e=>G(q(e,t,r),e=>U(e),()=>W()),()=>G(q(e,t,i),e=>U(e),()=>W()))}function no(e,t,n){return q(e,t,$r(n))}function ro(e,t,n){return S(n,(n,r)=>G(q(e,t,n),e=>ro(e,t,r),()=>W()),()=>U(e))}function io(e,t,n){return q(e,t,ti(n))}function ao(e,t,n){return S(n,(n,r)=>G(q(e,t,n),e=>U(e),()=>ao(e,t,r)),()=>W())}function K(e,t,n){return Pt(n)?eo(e,t):Xt(n)?to(e,t,n.if,n.then,n.else):Qt(n)?no(e,t,n.enum):Jt(n)?$a(e,n.name,t,n.extends):N(n)?ro(e,t,n.allOf):qa(n)?io(e,t,n.pattern):B(n)?ao(e,t,n.anyOf):Wt(n)?U(e):W()}function oo(e,t,n){return Jt(n)?K(e,t,n):Pt(n)||Wt(n)?U(e):Ja(e)}function so(e,t){let n=Mn(e),r=Mn(t);return n&&r||!n&&r?!0:!(n&&!r)}function co(e,t,n,r){return k(r)?so(t,r)?q(e,n,r.items):W():K(e,t,r)}function lo(e,t,n){return In(n)?U(e):K(e,t,n)}function uo(e,t,n){return Ln(n)?U(e):K(e,t,n)}function fo(e,t,n,r,i){let a=Jt(r)?t:r,o=Jt(r)?r:t,s=Rt(t),c=Rt(r);return!s&&c?W():G(q(e,a,o),e=>ho(e,n,i),()=>W())}function po(e,t,n,r){return S(r,(r,i)=>fo(e,t,n,r,i),()=>Rt(t)?U(e):W())}function mo(e,t,n){return S(t,(t,r)=>po(e,t,r,n),()=>U(e))}function ho(e,t,n){return mo(e,t,n)}function go(e,t,n){return Ri(n)?U(e):q(e,t,n)}function _o(e,t,n,r){return Pt(r)||Wt(r)?U(e):wt(r)?G(ho(e,t,r.parameters),e=>go(e,n,r.instanceType),()=>W()):W()}function vo(e,t,n,r,i){return G(q(e,t,i),()=>q(e,n,i),()=>q(e,r,i))}function yo(e,t,n){return q(e,$r(t),n)}function bo(e,t,n,r){return Pt(r)||Wt(r)?U(e):Dt(r)?G(ho(e,t,r.parameters),e=>go(e,n,r.returnType),()=>W()):W()}function xo(e,t,n){return Bn(n)||Qn(n)?U(e):K(e,t,n)}function So(e,t,n){return q(e,ei(t),n)}function Co(e,t,n){return t===n?U(e):W()}function wo(e,t,n){return L(n)?Co(e,t,n.const):In(n)?U(e):K(e,I(t),n)}function To(e,t,n){return L(n)?Co(e,t,n.const):Ln(n)?U(e):K(e,I(t),n)}function Eo(e,t,n){return L(n)?Co(e,t,n.const):Qn(n)?U(e):K(e,I(t),n)}function Do(e,t,n){return L(n)?Co(e,t,n.const):tr(n)?U(e):K(e,I(t),n)}function Oo(e,t,n){return de(t.const)?wo(e,t.const,n):fe(t.const)?To(e,t.const,n):_e(t.const)?Eo(e,t.const,n):ye(t.const)?Do(e,t.const,n):tn()}function ko(e,t,n){return Jt(n)?K(e,t,n):U(e)}function Ao(e,t,n){return Yn(n)?U(e):K(e,t,n)}function jo(e,t,n){return Qn(n)?U(e):K(e,t,n)}function Mo(e,t,n){return Rt(t)?Rt(n)?U(e):W():U(e)}function No(e,t,n){return Jt(n)&&Ft(n.extends)?W():G(q(e,t,n),e=>Mo(e,t,n),()=>W())}function Po(e,t){return e.reduce((e,n)=>n in t&&Qa(t[n])?{...e,...t[n].inferred}:tn(),{})}function Fo(e,t,n){let r={};for(let i of w(n))r[i]=i in t?No({},t[i],n[i]):Rt(n[i])?Jt(n[i])?U(p(e,{[n[i].name]:n[i].extends})):U(e):W();let i=Re(r).every(e=>Qa(e)),a=i?Po(w(r),r):{};return i?U(a):W()}function Io(e,t,n){let r=Fo(e,t,n);return Qa(r)?U(p(e,r.inferred)):W()}function Lo(e,t,n){return Io(e,t,n)}function Ro(e,t){return w(t).reduce((n,r)=>({...n,[r]:C(e,r)?B(n[r])?z([...n[r].anyOf,t[r]]):z([e[r],t[r]]):t[r]}),e)}function zo(e,t,n,r){return S(t,(t,i)=>G(q({},e[t],n),t=>zo(e,i,n,Ro(r,t)),()=>W()),()=>U(r))}function Bo(e,t,n,r){return zo(t,w(t),r,e)}function Vo(e,t,n){return Mi(n)?Bo(e,t,ki(n),ji(n)):M(n)?Lo(e,t,n.properties):K(e,j(t),n)}function Ho(e,t){return x(w(t).length,0)?U(e):W()}function Uo(e,t,n,r,i){return q(e,n,i)}function Wo(e,t,n,r){return Mi(r)?Uo(e,Oi(t),n,Oi(ki(r)),ji(r)):M(r)?Ho(e,r.properties):Pt(r)||Wt(r)?U(e):W()}function Go(e,t,n){return tr(n)?U(e):K(e,t,n)}function Ko(e,t,n){return er(n)?U(e):K(e,t,n)}function qo(e,t,n){return q(e,ti(t),n)}function Jo(e,t){return T({"~kind":`Inferrable`},{name:e,type:t},{})}function Yo(e){return b(e)&&C(e,`~kind`)&&C(e,`name`)&&C(e,`type`)&&x(e[`~kind`],`Inferrable`)&&ye(e.name)&&b(e.type)}function Xo(e){return Pi(e)?Jt(e.items)?k(e.items.extends)?Jo(e.items.name,e.items.extends.items):Wt(e.items.extends)?Jo(e.items.name,e.items.extends):void 0:tn():void 0}function Zo(e){return Jt(e)?Jo(e.name,e.extends):void 0}function Qo(e,t,n=[]){return S(e,(e,r)=>G(q({},e,t),()=>Qo(r,t,[...n,e]),()=>void 0),()=>n)}function $o(e,t,n,r){let i=Qo(n,r);return y(i)?U(p(e,{[t]:Cr(i)})):W()}function es(e,t,n,r){let i=Qo(n,r);return y(i)?U(p(e,{[t]:z(i)})):W()}function ts(e){return[...e].reverse()}function ns(e,t){return t?ts(e):e}function rs(e){let t=e.length>0?e[0]:void 0;return pt(pt(t)?Xo(t):void 0)}function is(e,t,n,r,i,a){return G(q(e,n,i),e=>ss(e,t,r,a),()=>W())}function as(e,t,n,r,i){let a=Xo(r);return Yo(a)?$o(e,a.name,ns(n,t),a.type):S(n,(n,a)=>is(e,t,n,a,r,i),()=>W())}function os(e,t,n,r){return S(r,(r,i)=>as(e,t,n,r,i),()=>x(n.length,0)?U(e):W())}function ss(e,t,n,r){return os(e,t,n,r)}function cs(e,t,n){let r=Yd(e,qd([],[]),n),i=rs(r);return ss(e,i,ns(t,i),ns(r,i))}function ls(e,t,n){let r=Zo(n);return Yo(r)?es(e,r.name,t,r.type):S(t,(t,r)=>G(q(e,t,n),e=>ls(e,r,n),()=>W()),()=>U(e))}function us(e,t,n){let r=Yd(e,qd([],[]),t);return V(n)?cs(e,r,n.items):k(n)?ls(e,r,n.items):K(e,Cr(r),n)}function ds(e,t,n){return Ri(n)||Li(n)?U(e):K(e,t,n)}function fs(e,t,n){return S(n,(n,r)=>G(q(e,t,n),e=>U(e),()=>fs(e,t,r)),()=>W())}function ps(e,t,n){return S(t,(t,r)=>G(fs(e,t,n),e=>ps(e,r,n),()=>W()),()=>U(e))}function ms(e,t,n){let r=Zo(n);return Yo(r)?es(e,r.name,t,r.type):B(n)?ps(e,t,n.anyOf):ps(e,t,[n])}function hs(e,t,n){return Jt(n)?K(e,t,n):Pt(n)||Wt(n)?U(e):W()}function gs(e,t,n){return Ri(n)?U(e):K(e,t,n)}function q(e,t,n){return Pt(t)?oo(e,t,n):k(t)?co(e,t,t.items,n):In(t)?lo(e,t,n):Ln(t)?uo(e,t,n):wt(t)?_o(e,t.parameters,t.instanceType,n):Xt(t)?vo(e,t.if,t.then,t.else,n):Qt(t)?yo(e,t.enum,n):Dt(t)?bo(e,t.parameters,t.returnType,n):Bn(t)?xo(e,t,n):N(t)?So(e,t.allOf,n):L(t)?Oo(e,t,n):Ft(t)?ko(e,t,n):Yn(t)?Ao(e,t,n):Qn(t)?jo(e,t,n):M(t)?Vo(e,t.properties,n):Mi(t)?Wo(e,ki(t),ji(t),n):tr(t)?Go(e,t,n):er(t)?Ko(e,t,n):qa(t)?qo(e,t.pattern,n):V(t)?us(e,t.items,n):Li(t)?ds(e,t,n):B(t)?ms(e,t.anyOf,n):Wt(t)?hs(e,t,n):Ri(t)?gs(e,t,n):W()}function _s(e,t){return ei([...e,j(t)])}function vs(e,t,n){return J(e)?E(_s(e,t),{},n):bs(e,t,n)}function ys(e,t,n,r,i){return vs(Xd(e,t,n),Jd(e,t,r),i)}function bs(e,t,n={}){return O(`Interface`,[e,t],n)}function xs(e){return pt(e)&&C(e,`action`)&&x(e.action,`Interface`)}function Ss(e,t,n){return e.includes(n)?!0:Ts([...e,n],t,t[n])}function Cs(e,t,n){return ws(e,t,Vt(n))}function ws(e,t,n){return S(n,(n,r)=>Ts(e,t,n)?!0:ws(e,t,r),()=>!1)}function Ts(e,t,n){return At(n)?Ss(e,t,n.$ref):k(n)?Ts(e,t,n.items):wt(n)?ws(e,t,[...n.parameters,n.instanceType]):Dt(n)?ws(e,t,[...n.parameters,n.returnType]):xs(n)?Cs(e,t,n.parameters[1]):N(n)?ws(e,t,n.allOf):M(n)?Cs(e,t,n.properties):B(n)?ws(e,t,n.anyOf):V(n)?ws(e,t,n.items):Mi(n)?Ts(e,t,ji(n)):!1}function Es(e,t,n){return Ts(e,t,n)}function Ds(e,t){return t.reduce((t,n)=>Es([n],e,e[n])?[...t,n]:t,[])}function Os(e){return Ds(e,Bt(e))}function ks(e,t,n){return n.includes(t)?n:t in e?Ms(e,e[t],[...n,t]):tn()}function As(e,t,n){return js(e,Vt(t),n)}function js(e,t,n){return t.reduce((t,n)=>Ms(e,n,t),n)}function Ms(e,t,n){return At(t)?ks(e,t.$ref,n):k(t)?Ms(e,t.items,n):wt(t)?js(e,[...t.parameters,t.instanceType],n):Dt(t)?js(e,[...t.parameters,t.returnType],n):xs(t)?As(e,t.parameters[1],n):N(t)?js(e,t.allOf,n):M(t)?As(e,t.properties,n):B(t)?js(e,t.anyOf,n):V(t)?js(e,t.items,n):Mi(t)?Ms(e,ji(t),n):n}function Ns(e,t,n){return Ms(e,n,[t])}function Ps(e){return Nt()}function Fs(e){return w(e).reduce((t,n)=>({...t,[n]:Ls(e[n])}),{})}function Is(e){return e.reduce((e,t)=>[...e,Ls(t)],[])}function Ls(e){return At(e)?Ps(e.$ref):k(e)?xt(Ls(e.items),St(e)):wt(e)?Ct(Is(e.parameters),Ls(e.instanceType)):Dt(e)?Et(Is(e.parameters),Ls(e.returnType)):N(e)?$t(Is(e.allOf)):M(e)?j(Fs(e.properties)):Mi(e)?Ei(Ai(e),Ls(ji(e))):B(e)?z(Is(e.anyOf)):V(e)?Cr(Is(e.items)):e}function Rs(e,t){return t in e?Ls(e[t]):Ut()}function zs(e){return Rs(e.$defs,e.$ref)}function Bs(e,t,n){let r=Xd(e,qd([],[]),t),i=Jd({},qd([],[]),n);return ei([...r,j(i)])}function Vs(e,t){return w(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=xs(r)?Bs(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function Hs(e,t,n){return Gt(Vs(e,Ns(e,t,n)),t)}function Us(e,t){return t in e?At(e[t])?Us(e,e[t].$ref):e[t]:A()}function Ws(e,t){return Us(e,t)}function Gs(e){return Kt(e)?zs(e):qt(e)?Ut():e}function Ks(e,t,n){return q(e,Gs(t),Gs(n))}function qs(e,t){let n=[Wt(e)?W():Ks({},e,t),Wt(e)?U({}):Ks({},t,e)];return Qa(n[0])&&Qa(n[1])?`equal`:Qa(n[0])&&Za(n[1])?`left-inside`:Za(n[0])&&Qa(n[1])?`right-inside`:`disjoint`}function Js(e,t){return t.filter(t=>qs(e,t)!==`right-inside`)}function Ys(e,t){return x(t.some(t=>{let n=qs(e,t);return x(n,`left-inside`)||x(n,`equal`)}),!1)}function Xs(e,t){let n=ri(e);return Pt(n)?[n]:Ys(n,t)?[...Js(n,t),n]:t}function Zs(e){return e.reduce((e,t)=>M(t)?[...e,t]:Ft(t)?e:Xs(t,e),[])}function Qs(e){return pi(Zs(e))}function $s(e,t){return E(ri(e),{},t)}function ec(e,t,n,r){return $s(Y(e,t,n),r)}function tc(e,t=[]){return mt(e)&&x(e.action,`Conditional`)?At(e.parameters[0])?tc(e.parameters[2],tc(e.parameters[3],[...t,e.parameters[0].$ref])):tc(e.parameters[2],tc(e.parameters[3],t)):mt(e)&&x(e.action,`Mapped`)&&mt(e.parameters[1])&&x(e.parameters[1].action,`KeyOf`)&&At(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function nc(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function rc(e,t,n=[]){return S(e,(e,r)=>S(t,(t,i)=>rc(r,i,[...n,[t,e]]),()=>n),()=>n)}function ic(e){return B(e)?[...e.anyOf]:[e]}function ac(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function oc(e,t){return t.reduce((t,n)=>[...t,...ac(e,n)],[])}function sc(e){return e.reduce((e,t)=>x(t[0],!0)?oc(e,ic(t[1])):oc(e,[t[1]]),[[]])}function cc(e,t,n){let r=rc(t,nc(e,tc(n)));return mt(n)&&x(n.action,`Conditional`)||mt(n)&&x(n.action,`Mapped`)?sc(r):[t]}function lc(){return[`(not-resolvable)`,A()]}function uc(){return[`(not-generic)`,A()]}function dc(e,t,n){return[e,jt(t,n)]}function fc(e,t,n){return t in e?pc(e,t,e[t],n):lc()}function pc(e,t,n,r){return Mt(n)?dc(t,n.parameters,n.expression):At(n)?fc(e,n.$ref,r):uc()}function mc(e,t,n){return pc(e,`(anonymous)`,t,n)}function hc(e,t,n){if(Jt(t)||Dc(t)||Qa(Ks({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function gc(e,t,n,r,i){let a=Y(e,t,i);return hc(n,a,r),p(e,{[n]:a})}function _c(e,t,n,r,i){let a=Y(e,t,n.extends),o=Y(e,t,n.equals);return S(i,(i,o)=>vc(gc(e,t,n.name,a,i),t,r,o),()=>vc(gc(e,t,n.name,a,o),t,r,[]))}function vc(e,t,n,r){return S(n,(n,i)=>_c(e,t,n,i,r),()=>e)}function yc(e,t,n,r){return vc(e,t,n,r)}function bc(e){return Se(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function xc(e,t){return x(bc(e),t)}function Sc(e,t,n,r,i,a){let o=yc(e,t,r,a),s=Y(o,qd([...t.callstack,n.$ref],t.visited),i);return Y(o,qd([],[]),s)}function Cc(e,t,n,r,i,a){return a.reduce((a,o)=>[...a,Sc(e,t,n,r,i,o)],[])}function wc(e,t,n,r,i,a){let o=Cc(e,t,n,r,i,cc(r,a,i));return x(o.length,1)?o[0]:ni(o)}function Tc(e,t,n,r){let i=Xd(e,t,r),a=mc(e,n,r),o=a[0],s=a[1];return Mt(s)?xc(t,o)?Ec(kt(o),i):wc(e,t,kt(o),s.parameters,s.expression,i):Ec(n,i)}function Ec(e,t){return T({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function Dc(e){return D(e,`Call`)}function Oc(e){return ft(e,[`~immutable`])}function kc(e,t){return E(Oc(e),{},t)}function Ac(e,t,n,r){return kc(Y(e,t,n),r)}function jc(e,t){return e(t)}function Mc(e,t){return ye(t)?I(jc(e,t)):I(t)}function Nc(e,t){return Fc(e,ti(t))}function Pc(e,t){return z(t.map(t=>Fc(e,t)))}function Fc(e,t){return L(t)?Mc(e,t.const):qa(t)?Nc(e,t.pattern):B(t)?Pc(e,t.anyOf):t}function Ic(e,t={}){return O(`Capitalize`,[e],t)}function Lc(e,t={}){return O(`Lowercase`,[e],t)}function Rc(e,t={}){return O(`Uncapitalize`,[e],t)}function zc(e,t={}){return O(`Uppercase`,[e],t)}const Bc=e=>e[0].toUpperCase()+e.slice(1),Vc=e=>e.toLowerCase(),Hc=e=>e[0].toLowerCase()+e.slice(1),Uc=e=>e.toUpperCase();function Wc(e,t){return J([e])?E(Fc(Bc,e),{},t):Ic(e,t)}function Gc(e,t){return J([e])?E(Fc(Vc,e),{},t):Lc(e,t)}function Kc(e,t){return J([e])?E(Fc(Hc,e),{},t):Rc(e,t)}function qc(e,t){return J([e])?E(Fc(Uc,e),{},t):zc(e,t)}function Jc(e,t,n,r){return Wc(Y(e,t,n),r)}function Yc(e,t,n,r){return Gc(Y(e,t,n),r)}function Xc(e,t,n,r){return Kc(Y(e,t,n),r)}function Zc(e,t,n,r){return qc(Y(e,t,n),r)}function Qc(e,t,n,r,i={}){return O(`Conditional`,[e,t,n,r],i)}function $c(e,t,n,r,i,a){let o=Ks(e,n,r);return Ya(o)?z([Y(o.inferred,t,i),Y(e,t,a)]):Xa(o)?Y(o.inferred,t,i):Y(e,t,a)}function el(e,t,n,r,i,a,o){return J([n,r])?E($c(e,t,n,r,i,a),{},o):Qc(n,r,i,a,o)}function tl(e,t,n,r,i,a,o){return el(e,t,Y(e,t,n),Y(e,t,r),i,a,o)}function nl(e,t={}){return O(`ConstructorParameters`,[e],t)}function rl(e){let t=wt(e)?e.parameters:[];return Cr(Yd({},qd([],[]),t))}function il(e,t){return J([e])?E(rl(e),{},t):nl(e,t)}function al(e,t,n,r){return il(Y(e,t,n),r)}function ol(e,t,n={}){return O(`Exclude`,[e,t],n)}function sl(e,t,n){return J([e,t])?E(Zr(e,t),{},n):ol(e,t,n)}function cl(e,t,n,r,i){return sl(Y(e,t,n),Y(e,t,r),i)}function ll(e,t,n={}){return O(`Extract`,[e,t],n)}function ul(e,t){return Qa(Ks({},e,t))?[e]:[]}function dl(e,t){return e.reduce((e,n)=>[...e,...ul(n,t)],[])}function fl(e,t){let n=ri(e);return ni(dl(B(n)?n.anyOf:[n],t))}function pl(e,t,n){return J([e,t])?E(fl(e,t),{},n):ll(e,t,n)}function ml(e,t,n,r,i){return pl(Y(e,t,n),Y(e,t,r),i)}function hl(e,t,n={}){return O(`Index`,[e,t],n)}function gl(e,t){return Tl(Ws(e,t))}function _l(e,t,n){return Tl(Qr(e,t,n))}function vl(e,t){let n=w(e).filter(e=>!C(t,e)),r=w(t).filter(t=>!C(e,t)),i=w(e).filter(e=>C(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:ei([e[r],t[r]])}),{});return p(p(a,o),s)}function yl(e){return e.reduce((e,t)=>vl(e,Tl(t)),{})}function bl(e){return e}function xl(e){return Tl(Pr(Cr(e)))}function Sl(e,t){return w(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:ni([e[r],t[r]])}),{})}function Cl(e,t){return S(e,(e,n)=>Cl(n,Sl(t,Tl(e))),()=>t)}function wl(e){return S(e,(e,t)=>Cl(t,Tl(e)),()=>tn())}function Tl(e){return Kt(e)?gl(e.$defs,e.$ref):Xt(e)?_l(e.if,e.then,e.else):N(e)?yl(e.allOf):B(e)?wl(e.anyOf):V(e)?xl(e.items):M(e)?bl(e.properties):{}}function El(e){return j(Tl(e))}const Dl=RegExp(`^(?:0|[1-9][0-9]*)$`);function Ol(e){let t=`${e}`;return Dl.test(t)?parseInt(t):e}function kl(e){return I(Ol(e))}function Al(e){return e.map(e=>jl(e))}function jl(e){return N(e)?$t(Al(e.allOf)):B(e)?z(Al(e.anyOf)):L(e)?kl(e.const):e}function Ml(e,t){return Qa(Ks({},jl(t),Zn()))?e:L(t)&&x(t.const,`length`)?Zn():A()}function Nl(e,t){return Bl(Ws(e,t))}function Pl(e,t,n){return Bl(Qr(e,t,n))}function Fl(e){return Bl($r(e))}function Il(e){return Bl(ei(e))}function Ll(e){return[`${e}`]}function Rl(e){return Bl(ti(e))}function zl(e){return e.reduce((e,t)=>[...e,...Bl(t)],[])}function Bl(e){return Kt(e)?Nl(e.$defs,e.$ref):Xt(e)?Pl(e.if,e.then,e.else):Qt(e)?Fl(e.enum):N(e)?Il(e.allOf):L(e)?Ll(e.const):qa(e)?Rl(e.pattern):B(e)?zl(e.anyOf):[]}function Vl(e){return Bl(e)}function Hl(e,t){return t.map(t=>Ul(e,t))}function Ul(e,t){return k(t)?xt(Ul(e,t.items)):wt(t)?Ct(Hl(e,t.parameters),Ul(e,t.instanceType)):Dt(t)?Et(Hl(e,t.parameters),Ul(e,t.returnType)):V(t)?Cr(Hl(e,t.items)):B(t)?z(Hl(e,t.anyOf)):N(t)?$t(Hl(e,t.allOf)):Fi(t)?j(e):t}function Wl(e,t){return Ul(e,t)}function Gl(e,t){return Wl(e,t in e?e[t]:A())}function Kl(e,t){return t.reduce((t,n)=>[...t,Gl(e,n)],[])}function ql(e,t){return ni(Kl(e,Vl(t)))}const Jl=new RegExp(Si);function Yl(e){return e.filter(e=>Jl.test(e))}function Xl(e){return ni(Kl(e,Yl(Bt(e))))}function Zl(e,t){return Qn(t)?Xl(e):ql(e,t)}function Ql(e){return I(Ol(e))}function $l(e){return e.map(e=>eu(e))}function eu(e){return N(e)?$t($l(e.allOf)):B(e)?z($l(e.anyOf)):L(e)?Ql(e.const):e}function tu(e,t){return e.reduceRight((e,n,r)=>Qa(Ks({},I(r),t))?[n,...e]:e,[])}function nu(e,t){return ii(tu(e,eu(t)))}function ru(e){return ii(e)}function iu(e,t){return L(t)&&x(t.const,`length`)?I(e.length):Qn(t)||Bn(t)?ru(e):nu(e,t)}function au(e,t){return k(e)?Ml(e.items,t):M(e)?Zl(e.properties,t):V(e)?iu(e.items,t):A()}function ou(e){return Kt(e)||Xt(e)||N(e)||B(e)?El(e):e}function su(e,t,n){return J([e,t])?E(au(ou(e),t),{},n):hl(e,t,n)}function cu(e,t,n,r,i){return su(Y(e,t,n),Y(e,t,r),i)}function lu(e,t={}){return O(`InstanceType`,[e],t)}function uu(e){return wt(e)?e.instanceType:A()}function du(e,t){return J([e])?E(uu(e),{},t):lu(e,t)}function fu(e,t,n,r={}){return du(Y(e,t,n),r)}function pu(e,t={}){return O(`KeyOf`,[e],t)}function mu(){return z([Zn(),R(),$n()])}function hu(e){return Zn()}function gu(e){return e.reduce((e,t)=>Un(t)?[...e,I(Ol(t))]:tn(),[])}function _u(e){return ii(gu(w(e)))}function vu(e){return Ai(e)}function yu(e){return ii(e.map((e,t)=>I(t)))}function bu(e){return Pt(e)?mu():k(e)?hu(e.items):M(e)?_u(e.properties):Mi(e)?vu(e):V(e)?yu(e.items):A()}function xu(e){return Kt(e)||Xt(e)||N(e)||B(e)?El(e):e}function Su(e,t){return J([e])?E(bu(xu(e)),{},t):pu(e,t)}function Cu(e,t,n,r){return Su(Y(e,t,n),r)}function wu(e,t,n,r,i={}){return O(`Mapped`,[e,t,n,r],i)}function Tu(e){return ku(ti(e))}function Eu(e){return e.reduce((e,t)=>[...e,...ku(t)],[])}function Du(e){return ku($r(e))}function Ou(e){return _e(e)?[I(`${e}`)]:[I(e)]}function ku(e){return Qt(e)?Du(e.enum):L(e)?Ou(e.const):qa(e)?Tu(e.pattern):B(e)?Eu(e.anyOf):[e]}function Au(e){return ku(e)}function ju(e){return qa(e)?ti(e.pattern):e}function Mu(e,t,n,r,i,a){let o=p(e,{[n.name]:r}),s=ju(Y(o,t,i)),c=Y(o,t,a);return Kn(s)||qn(s)?{[s.const]:c}:{}}function Nu(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,Mu(e,t,n,o,i,a)],[])}function Pu(e){return e.reduce((e,t)=>[...e,j(t)],[])}function Fu(e,t,n,r,i,a){return ei(Pu(Nu(e,t,n,Au(r),i,a)))}function Iu(e,t,n,r,i,a,o){return J([r])?E(Fu(e,t,n,r,i,a),{},o):wu(n,r,i,a,o)}function Lu(e,t,n,r,i,a,o){return Iu(e,t,n,Y(e,t,r),i,a,o)}function Ru(e,t,n){let r=p(e,t);return w(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:Hs(r,n,t[n])}),{})}function zu(e,t,n){let r=p(e,t);return w(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:Y(r,qd([],[]),t[n])}),{})}function Bu(e,t,n){let r=Os(t),i=Ru(e,t,r),a=zu(e,t,r);return E({...i,...a},{},n)}function Vu(e,t,n,r){return Bu(e,n,r)}function Hu(e,t={}){return O(`NonNullable`,[e],t)}function Uu(e){return sl(e,z([Jn(),Ii()]),{})}function Wu(e,t){return J([e])?E(Uu(e),{},t):Hu(e,t)}function Gu(e,t,n,r){return Wu(Y(e,t,n),r)}function Ku(e,t,n={}){return O(`Omit`,[e,t],n)}function qu(e){let t=El(e);return M(t)?t.properties:tn()}function Ju(e,t){return w(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function Yu(e,t){return j(Ju(qu(e),Vl(t)))}function Xu(e,t,n){return J([e,t])?E(Yu(e,t),{},n):Ku(e,t,n)}function Zu(e,t,n,r,i){return Xu(Y(e,t,n),Y(e,t,r),i)}function Qu(e,t={}){return O(`Parameters`,[e],t)}function $u(e){let t=Dt(e)?e.parameters:[];return Cr(Yd({},qd([],[]),t))}function ed(e,t){return J([e])?E($u(e),{},t):Qu(e,t)}function td(e,t,n,r){return ed(Y(e,t,n),r)}function nd(e,t={}){return O(`Partial`,[e],t)}function rd(e,t){let n=cd(Ws(e,t));return Gt(p(e,{[t]:n}),t)}function id(e,t,n){return cd(Qr(e,t,n))}function ad(e){return cd(ei(e))}function od(e){return z(e.map(e=>cd(e)))}function sd(e){return j(w(e).reduce((t,n)=>({...t,[n]:It(e[n])}),{}))}function cd(e){return Kt(e)?rd(e.$defs,e.$ref):Xt(e)?id(e.if,e.then,e.else):N(e)?ad(e.allOf):B(e)?od(e.anyOf):M(e)?sd(e.properties):j({})}function ld(e,t){return J([e])?E(cd(e),{},t):nd(e,t)}function ud(e,t,n,r){return ld(Y(e,t,n),r)}function dd(e,t,n={}){return O(`Pick`,[e,t],n)}function fd(e,t){return w(e).reduce((n,r)=>t.includes(r)?p(n,{[r]:e[r]}):n,{})}function pd(e,t){return j(fd(qu(e),Vl(t)))}function md(e,t,n){return J([e,t])?E(pd(e,t),{},n):dd(e,t,n)}function hd(e,t,n,r,i){return md(Y(e,t,n),Y(e,t,r),i)}function gd(e,t={}){return O(`ReadonlyObject`,[e],t)}function _d(e){return af(xt(e))}function vd(e,t){let n=wd(Ws(e,t));return Gt(p(e,{[t]:n}),t)}function yd(e,t,n){return wd(Qr(e,t,n))}function bd(e){return wd(ei(e))}function xd(e){return j(w(e).reduce((t,n)=>({...t,[n]:Nn(e[n])}),{}))}function Sd(e){return af(Cr(e))}function Cd(e){return z(e.map(e=>wd(e)))}function wd(e){return k(e)?_d(e.items):Kt(e)?vd(e.$defs,e.$ref):Xt(e)?yd(e.if,e.then,e.else):N(e)?bd(e.allOf):M(e)?xd(e.properties):V(e)?Sd(e.items):B(e)?Cd(e.anyOf):e}function Td(e,t){return J([e])?E(wd(e),{},t):gd(e)}function Ed(e,t,n,r){return Td(Y(e,t,n),r)}function Dd(e,t,n,r){return t.visited.includes(r)?n:r in e?Y(e,qd(t.callstack,[...t.visited,r]),e[r]):n}function Od(e,t){let n=Nd(Ws(e,t));return Gt(p(e,{[t]:n}),t)}function kd(e,t,n){return Nd(Qr(e,t,n))}function Ad(e){return Nd(ei(e))}function jd(e){return z(e.map(e=>Nd(e)))}function Md(e){return j(w(e).reduce((t,n)=>({...t,[n]:Mr(e[n])}),{}))}function Nd(e){return Kt(e)?Od(e.$defs,e.$ref):Xt(e)?kd(e.if,e.then,e.else):N(e)?Ad(e.allOf):B(e)?jd(e.anyOf):M(e)?Md(e.properties):j({})}function Pd(e,t={}){return O(`Required`,[e],t)}function Fd(e,t){return J([e])?E(Nd(e),{},t):Pd(e,t)}function Id(e,t,n,r){return Fd(Y(e,t,n),r)}function Ld(e,t={}){return O(`ReturnType`,[e],t)}function Rd(e){return Dt(e)?e.returnType:A()}function zd(e,t){return J([e])?E(Rd(e),{},t):Ld(e,t)}function Bd(e,t,n,r={}){return zd(Y(e,t,n),r)}function Vd(e,t){return O(`With`,[e,t],{})}function Hd(e,t){return Ud(e,t)}function Ud(e,t){return J([e])?E(e,{},t):Vd(e,t)}function Wd(e,t,n,r){return Ud(Y(e,t,n),r)}function Gd(e){return Pi(e)?V(e.items)?Kd(e.items.items):Jt(e.items)||At(e.items)?[e]:[A()]:[e]}function Kd(e){return e.reduce((e,t)=>[...e,...Gd(t)],[])}function qd(e,t){return{callstack:e,visited:t}}function J(e){return S(e,(e,t)=>!At(e)&&J(t),()=>!0)}function Jd(e,t,n){return w(n).reduce((r,i)=>({...r,[i]:Y(e,t,n[i])}),{})}function Yd(e,t,n){return Kd(Xd(e,t,n))}function Xd(e,t,n){return n.map(n=>Y(e,t,n))}function Zd(e,t){let n=Rt(e)?yt(t,{}):t,r=Pn(e)?gt(n,{}):n;return Mn(e)?nf(r,{}):r}function Qd(e,t,n,r,i){return x(n,`AddImmutable`)?rf(e,t,r[0],i):x(n,`RemoveImmutable`)?Ac(e,t,r[0],i):x(n,`AddReadonly`)?_t(e,t,r[0],i):x(n,`RemoveReadonly`)?Dr(e,t,r[0],i):x(n,`AddOptional`)?bt(e,t,r[0],i):x(n,`RemoveOptional`)?jr(e,t,r[0],i):x(n,`Capitalize`)?Jc(e,t,r[0],i):x(n,`Conditional`)?tl(e,t,r[0],r[1],r[2],r[3],i):x(n,`ConstructorParameters`)?al(e,t,r[0],i):x(n,`Evaluate`)?ec(e,t,r[0],i):x(n,`Exclude`)?cl(e,t,r[0],r[1],i):x(n,`Extract`)?ml(e,t,r[0],r[1],i):x(n,`Index`)?cu(e,t,r[0],r[1],i):x(n,`InstanceType`)?fu(e,t,r[0],i):x(n,`Interface`)?ys(e,t,r[0],r[1],i):x(n,`KeyOf`)?Cu(e,t,r[0],i):x(n,`Lowercase`)?Yc(e,t,r[0],i):x(n,`Mapped`)?Lu(e,t,r[0],r[1],r[2],r[3],i):x(n,`Module`)?Vu(e,t,r[0],i):x(n,`NonNullable`)?Gu(e,t,r[0],i):x(n,`Pick`)?hd(e,t,r[0],r[1],i):x(n,`Parameters`)?td(e,t,r[0],i):x(n,`Partial`)?ud(e,t,r[0],i):x(n,`Omit`)?Zu(e,t,r[0],r[1],i):x(n,`ReadonlyObject`)?Ed(e,t,r[0],i):x(n,`Record`)?xi(e,t,r[0],r[1],i):x(n,`Required`)?Id(e,t,r[0],i):x(n,`ReturnType`)?Bd(e,t,r[0],i):x(n,`TemplateLiteral`)?Wa(e,t,r[0],i):x(n,`Uncapitalize`)?Xc(e,t,r[0],i):x(n,`Uppercase`)?Zc(e,t,r[0],i):x(n,`With`)?Wd(e,t,r[0],r[1]):O(n,r,i)}function $d(e,t,n){return Zd(n,At(n)?Dd(e,t,n,n.$ref):k(n)?xt(Y(e,t,n.items),St(n)):Dc(n)?Tc(e,t,n.target,n.arguments):wt(n)?Ct(Xd(e,t,n.parameters),Y(e,t,n.instanceType),Tt(n)):Dt(n)?Et(Xd(e,t,n.parameters),Y(e,t,n.returnType),Ot(n)):Xt(n)?Yt(Y(e,t,n.if),Y(e,t,n.then),Y(e,t,n.else),Zt(n)):N(n)?$t(Xd(e,t,n.allOf),en(n)):M(n)?j(Jd(e,t,n.properties),Ht(n)):Mi(n)?Di(ki(n),Y(e,t,ji(n))):Pi(n)?Ni(Y(e,t,n.items)):V(n)?Cr(Yd(e,t,n.items),wr(n)):B(n)?z(Xd(e,t,n.anyOf),nr(n)):n)}function Y(e,t,n){return mt(n)?Qd(e,t,n.action,n.parameters,n.options):$d(e,t,n)}function ef(e,t){return Y(e,qd([],[]),t)}function tf(e){return E(e,{"~immutable":!0},{})}function nf(e,t){return E(tf(e),{},t)}function rf(e,t,n,r){return nf(Y(e,t,n),r)}function af(e,t={}){return nf(e,t)}function of(e,t={}){return $s(e,t)}function sf(e,t){let n=qs(e,t);return x(n,`right-inside`)?1:+!!x(n,`disjoint`)}function cf(e,t,n=[]){return S(t,(r,i)=>x(sf(e,r),1)?cf(e,i,[...n,r]):[...n,e,...t],()=>[...n,e])}function lf(e,t=[]){return S(e,(e,n)=>lf(n,cf(e,t)),()=>t)}function uf(e){return lf(e)}function df(e,t){try{return Promise.resolve(t(ff))}catch(e){return Promise.reject(e)}}const ff={startSpan:df,addEvent:()=>{},setAttributes:()=>{},setStatus:()=>{}};Object.freeze(ff);const pf=Symbol.for(`yaml.alias`),mf=Symbol.for(`yaml.document`),hf=Symbol.for(`yaml.map`),gf=Symbol.for(`yaml.pair`),_f=Symbol.for(`yaml.scalar`),vf=Symbol.for(`yaml.seq`),yf=Symbol.for(`yaml.node.type`),bf=e=>!!e&&typeof e==`object`&&e[yf]===pf,xf=e=>!!e&&typeof e==`object`&&e[yf]===mf,Sf=e=>!!e&&typeof e==`object`&&e[yf]===hf,X=e=>!!e&&typeof e==`object`&&e[yf]===gf,Z=e=>!!e&&typeof e==`object`&&e[yf]===_f,Cf=e=>!!e&&typeof e==`object`&&e[yf]===vf;function wf(e){if(e&&typeof e==`object`)switch(e[yf]){case hf:case vf:return!0}return!1}function Q(e){if(e&&typeof e==`object`)switch(e[yf]){case pf:case hf:case _f:case vf:return!0}return!1}const Tf=e=>(Z(e)||wf(e))&&!!e.anchor,Ef=Symbol(`break visit`),Df=Symbol(`skip children`),Of=Symbol(`remove node`);function kf(e,t){let n=jf(t);xf(e)?Af(null,e.contents,n,Object.freeze([e]))===Of&&(e.contents=null):Af(null,e,n,Object.freeze([]))}kf.BREAK=Ef,kf.SKIP=Df,kf.REMOVE=Of;function Af(e,t,n,r){let i=Mf(e,t,n,r);if(Q(i)||X(i))return Nf(e,r,i),Af(e,i,n,r);if(typeof i!=`symbol`){if(wf(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Af(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Ef)return Ef;else i===Of&&(t.items.splice(e,1),--e)}}else if(X(t)){r=Object.freeze(r.concat(t));let e=Af(`key`,t.key,n,r);if(e===Ef)return Ef;e===Of&&(t.key=null);let i=Af(`value`,t.value,n,r);if(i===Ef)return Ef;i===Of&&(t.value=null)}}return i}function jf(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Mf(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Sf(t))return n.Map?.(e,t,r);if(Cf(t))return n.Seq?.(e,t,r);if(X(t))return n.Pair?.(e,t,r);if(Z(t))return n.Scalar?.(e,t,r);if(bf(t))return n.Alias?.(e,t,r)}function Nf(e,t,n){let r=t[t.length-1];if(wf(r))r.items[e]=n;else if(X(r))e===`key`?r.key=n:r.value=n;else if(xf(r))r.contents=n;else{let e=bf(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}function Pf(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Ff(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Ff(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Ff(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Ff(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Ff(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function If(e,t,n){if(Array.isArray(e))return e.map((e,t)=>If(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Tf(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Lf=class{constructor(e){Object.defineProperty(this,yf,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!xf(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=If(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Ff(i,{"":o},``,o):o}},Rf=class extends Lf{constructor(e){super(pf),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],kf(e,{Node:(e,t)=>{(bf(t)||Tf(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(If(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=zf(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Pf(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function zf(e,t,n){if(bf(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(wf(t)){let r=0;for(let i of t.items){let t=zf(e,i,n);t>r&&(r=t)}return r}if(X(t)){let r=zf(e,t.key,n),i=zf(e,t.value,n);return Math.max(r,i)}return 1}const Bf=e=>!e||typeof e!=`function`&&typeof e!=`object`;var $=class extends Lf{constructor(e){super(_f),this.value=e}toJSON(e,t){return t?.keep?this.value:If(this.value,e,t)}toString(){return String(this.value)}};$.BLOCK_FOLDED=`BLOCK_FOLDED`,$.BLOCK_LITERAL=`BLOCK_LITERAL`,$.PLAIN=`PLAIN`,$.QUOTE_DOUBLE=`QUOTE_DOUBLE`,$.QUOTE_SINGLE=`QUOTE_SINGLE`;function Vf(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Hf(e,t,n){if(xf(e)&&(e=e.contents),Q(e))return e;if(X(e)){let t=n.schema[hf].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Rf(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=`tag:yaml.org,2002:`+t.slice(2));let l=Vf(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new $(e);return c&&(c.node=t),t}l=e instanceof Map?o[hf]:Symbol.iterator in Object(e)?o[vf]:o[hf]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new $(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Uf(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Hf(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}const Wf=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;var Gf=class extends Lf{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Q(t)||X(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Wf(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(wf(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Uf(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(wf(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Z(i)?i.value:i:wf(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X(t))return!1;let n=t.value;return n==null||e&&Z(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return wf(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(wf(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Uf(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};const Kf=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function qf(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Jf=(e,t,n)=>e.endsWith(`
|
|
4
4
|
`)?qf(n,t):n.includes(`
|
|
@@ -35,4 +35,4 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
35
35
|
`}}return e?(p+=`
|
|
36
36
|
`+qf(l(e),c),s&&s()):d&&o&&o(),p}function Tp({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(Q(i))i.spaceBefore&&d.push(``),Ep(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(X(i)){let e=Q(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),Ep(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Q(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=dp(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
37
37
|
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Jf(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
38
|
-
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function Ep({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=qf(t(r),e);n.push(i.trimStart())}}function Dp(e,t){let n=Z(t)?t.value:t;for(let r of e)if(X(r)&&(r.key===t||r.key===n||Z(r.key)&&r.key.value===n))return r}var Op=class extends Gf{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(hf,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(xp(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=X(e)?e:!e||typeof e!=`object`||!(`key`in e)?new Sp(e,e?.value):new Sp(e.key,e.value);let r=Dp(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);Z(r.value)&&Bf(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=Dp(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Dp(this.items,e)?.value;return(!t&&Z(n)?n.value:n)??void 0}has(e){return!!Dp(this.items,e)}set(e,t){this.add(new Sp(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)yp(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!X(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Cp(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};const kp={collection:`map`,default:!0,nodeClass:Op,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Sf(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Op.from(e,t,n)};var Ap=class extends Gf{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(vf,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=jp(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=jp(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Z(r)?r.value:r}has(e){let t=jp(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=jp(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Z(r)&&Bf(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(If(e,String(r++),t));return n}toString(e,t,n){return e?Cp(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(Hf(a,void 0,n))}}return i}};function jp(e){let t=Z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}const Mp={collection:`seq`,default:!0,nodeClass:Ap,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Cf(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>Ap.from(e,t,n)};function Np(e){return typeof e==`bigint`||Number.isInteger(e)}const Pp=({value:e})=>JSON.stringify(e),Fp=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Pp},{identify:e=>e==null,createNode:()=>new $(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Pp},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Pp},{identify:Np,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Np(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Pp}];[kp,Mp].concat(Fp,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function Ip(e,t,n){let{replacer:r}=n,i=new Ap(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(xp(o,s,n))}return i}var Lp=class e extends Ap{constructor(){super(),this.add=Op.prototype.add.bind(this),this.delete=Op.prototype.delete.bind(this),this.get=Op.prototype.get.bind(this),this.has=Op.prototype.has.bind(this),this.set=Op.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(X(e)?(r=If(e.key,``,t),i=If(e.value,r,t)):r=If(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Ip(e,t,n),i=new this;return i.items=r.items,i}};Lp.tag=`tag:yaml.org,2002:omap`;var Rp=class e extends Op{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=X(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new Sp(e.key,null):new Sp(e,null),Dp(this.items,t.key)||this.items.push(t)}get(e,t){let n=Dp(this.items,e);return!t&&X(n)?Z(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Dp(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Sp(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(xp(e,null,n));return i}};Rp.tag=`tag:yaml.org,2002:set`;const zp=Symbol(`break visit`),Bp=Symbol(`skip children`),Vp=Symbol(`remove item`);function Hp(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Up(Object.freeze([]),e,t)}Hp.BREAK=zp,Hp.SKIP=Bp,Hp.REMOVE=Vp,Hp.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},Hp.parentCollection=(e,t)=>{let n=Hp.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function Up(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=Up(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===zp)return zp;else r===Vp&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}let r=/^\s+$/,i=/(?:[^\\]|^)\\$/,a=/^\\!/,o=/^\\#/,s=/\r?\n/g,c=/^\.{0,2}\/|^\.{1,2}$/,l=/\/$/,u=`node-ignore`;typeof Symbol<`u`&&(u=Symbol.for(`node-ignore`));let d=u,f=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),p=/([0-z])-([0-z])/g,m=()=>!1,h=e=>e.replace(p,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:``),g=e=>{let{length:t}=e;return e.slice(0,t-t%2)},ee=[[/^\uFEFF/,()=>``],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?` `:``)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+` `}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>`\\`],[/\\\\/g,()=>`\\`],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===`\\`?`\\[${n}${g(r)}${i}`:i===`]`&&r.length%2==0?`[${h(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],_=/(^|\\\/)?\\\*$/,v=`regex`,te=`checkRegex`,ne={[v](e,t){return`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`},[te](e,t){return`${t?`${t}[^/]*`:`[^/]*`}(?=$|\\/$)`}},re=e=>ee.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),ie=e=>typeof e==`string`,ae=e=>e&&ie(e)&&!r.test(e)&&!i.test(e)&&e.indexOf(`#`)!==0,oe=e=>e.split(s).filter(Boolean);var se=class{constructor(e,t,n,r,i,a){this.pattern=e,this.mark=t,this.negative=i,f(this,`body`,n),f(this,`ignoreCase`,r),f(this,`regexPrefix`,a)}get regex(){let e=`_regex`;return this[e]?this[e]:this._make(v,e)}get checkRegex(){let e=`_checkRegex`;return this[e]?this[e]:this._make(te,e)}_make(e,t){let n=this.regexPrefix.replace(_,ne[e]),r=this.ignoreCase?new RegExp(n,`i`):new RegExp(n);return f(this,t,r)}};let ce=({pattern:e,mark:t},n)=>{let r=!1,i=e;i.indexOf(`!`)===0&&(r=!0,i=i.substr(1)),i=i.replace(a,`!`).replace(o,`#`);let s=re(i);return new se(e,t,i,n,r,s)};var le=class{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[d]){this._rules=this._rules.concat(e._rules._rules),this._added=!0;return}if(ie(e)&&(e={pattern:e}),ae(e.pattern)){let t=ce(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(ie(e)?oe(e):e).forEach(this._add,this),this._added}test(e,t,n){let r=!1,i=!1,a;this._rules.forEach(o=>{let{negative:s}=o;i===s&&r!==i||s&&!r&&!i&&!t||o[n].test(e)&&(r=!s,i=s,a=s?void 0:o)});let o={ignored:r,unignored:i};return a&&(o.rule=a),o}};let ue=(e,t)=>{throw new t(e)},y=(e,t,n)=>ie(e)?e?!y.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),de=e=>c.test(e);y.isNotRelative=de,y.convert=e=>e;var fe=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){f(this,d,!0),this._rules=new le(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){let i=e&&y.convert(e);return y(i,e,this._strictPathCheck?ue:m),this._t(i,t,n,r)}checkIgnore(e){if(!l.test(e))return this.test(e);let t=e.split(`/`).filter(Boolean);if(t.pop(),t.length){let e=this._t(t.join(`/`)+`/`,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,te)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(`/`).filter(Boolean),r.pop(),!r.length)return t[e]=this._rules.test(e,n,v);let i=this._t(r.join(`/`)+`/`,t,n,r);return t[e]=i.ignored?i:this._rules.test(e,n,v)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}};let pe=e=>new fe(e),me=e=>y(e&&y.convert(e),e,m),he=()=>{y.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;y.isNotRelative=t=>e.test(t)||de(t)};typeof process<`u`&&process.platform===`win32`&&he(),t.exports=pe,pe.default=pe,t.exports.isPathValid=me,f(t.exports,Symbol.for(`setupWindows`),he)}))();const Wp={"pi.session.id":{type:`string`,required:!0,cardinality:`high`,description:`Session id`},"pi.lane.name":{type:`string`,required:!0,cardinality:`high`,description:`Lane name`},"pi.operation.id":{type:`string`,required:!0,cardinality:`high`,description:`Durable operation id`},"pi.operation.recovery":{type:`boolean`,required:!0,description:`Whether this invocation resumes durable work`}},Gp={"pi.error.code":{type:`string`,cardinality:`low`,description:`Stable operation error code`},"pi.error.type":{type:`string`,cardinality:`low`,description:`Low-cardinality operation error class`}};({...Wp}),{...Gp},{...Wp},{...Gp},{...Wp},{...Gp},globalThis.Buffer,j({command:R({description:`Bash command to execute`}),timeout:Lt(Zn({description:`Timeout in seconds (optional, no default timeout)`}))});const Kp=j({oldText:R({description:`Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call.`}),newText:R({description:`Replacement text for this targeted edit.`})},{});j({path:R({description:`Path to the file to edit (relative or absolute)`}),edits:xt(Kp,{description:`One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead.`})},{}),j({path:R({description:`Path to the file to read (relative or absolute)`}),offset:Lt(Zn({description:`Line number to start reading from (1-indexed)`})),limit:Lt(Zn({description:`Maximum number of lines to read`}))}),j({path:R({description:`Path to the file to write (relative or absolute)`}),content:R({description:`Content to write to the file`})});function qp(){return a()?`extension-direct`:s()?`extension-delegate`:globalThis.__slicc_connect_mode?`connect`:`node-rest`}function Jp(){return qp()===`node-rest`}const Yp=n(`secret-scrub`),Xp=`[tool output withheld: secret scrub unavailable]`,Zp=async e=>e;function Qp(){let e=qp();return e===`extension-direct`?async e=>{if(!e)return e;try{let t=await new Promise(t=>{chrome.runtime.sendMessage({type:`secrets.scrub-tool-result`,text:e},e=>t(e??{}))});return t.error?(Yp.debug(`SW scrub-tool-result returned error`),Xp):typeof t.text==`string`?t.text:Xp}catch{return Yp.debug(`SW scrub-tool-result failed`),Xp}}:e===`extension-delegate`?async e=>{if(!e)return e;try{let t=await l(`secrets.scrub-tool-result`,{text:e});return t?.error?(Yp.debug(`Bridge scrub-tool-result returned error`),Xp):typeof t?.text==`string`?t.text:Xp}catch{return Yp.debug(`Bridge scrub-tool-result failed`),Xp}}:e===`connect`?Zp:async e=>{if(!e)return e;try{let t=await fetch(o(`/api/secrets/scrub`),{method:`POST`,headers:c({"content-type":`application/json`}),body:JSON.stringify({text:e})});if(!t.ok)return Yp.debug(`Server scrub-tool-result returned non-ok`,{status:t.status}),e;let n=await t.json();return typeof n.text==`string`?n.text:e}catch(t){return Yp.debug(`Server scrub-tool-result failed`,{error:t instanceof Error?t.message:String(t)}),e}}}const $p=[];function em(e){return $p.push(e),e}function tm(e){let t=$p.lastIndexOf(e);t!==-1&&$p.splice(t,1)}function nm(){return $p.length>0?$p[$p.length-1]:null}const rm=n(`tool-ui`),im=`__mounted`,am=new class{pending=new Map;idCounter=0;mounted=new Set;mountWaiters=new Map;generateId(){return`tool-ui-${++this.idCounter}-${Date.now().toString(36)}`}register(e,t,n,r){this.mounted.delete(e),this.pending.set(e,{request:t,resolve:n,reject:r}),rm.info(`Tool UI registered`,{id:e})}async handleAction(e,t){let n=this.pending.get(e);if(!n){rm.warn(`Action for unknown tool UI`,{id:e,action:t.action});return}rm.info(`Tool UI action`,{id:e,action:t.action});try{let e;e=n.request.onAction?await n.request.onAction(t.action,t.data):t,n.resolve(e)}catch(e){n.reject(e instanceof Error?e:Error(String(e)))}finally{this.pending.delete(e),this.clearMountWaiter(e,`tool ui completed`)}}cancel(e,t=`cancelled`){let n=this.pending.get(e);n&&(n.reject(Error(t)),this.pending.delete(e),rm.info(`Tool UI cancelled`,{id:e,reason:t})),this.clearMountWaiter(e,t),this.mounted.delete(e)}cancelAll(e=`cancelled`){let t=this.pending.size;for(let[t,n]of this.pending)n.reject(Error(e));this.pending.clear();for(let t of[...this.mountWaiters.keys()])this.clearMountWaiter(t,e);this.mounted.clear(),t>0&&rm.info(`All tool UIs cancelled`,{reason:e,count:t})}isPending(e){return this.pending.has(e)}getPendingIds(){return[...this.pending.keys()]}markMounted(e){this.mounted.add(e);let t=this.mountWaiters.get(e);t&&(clearTimeout(t.timeoutHandle),this.mountWaiters.delete(e),t.resolve())}waitForMount(e,t){return this.mounted.has(e)?Promise.resolve():new Promise((n,r)=>{let i=setTimeout(()=>{this.mountWaiters.delete(e),r(Error(`tool UI ${e} was not mounted by any panel within ${t}ms — check the chat panel`))},t);this.mountWaiters.set(e,{resolve:n,reject:r,timeoutHandle:i})})}clearMountWaiter(e,t){let n=this.mountWaiters.get(e);n&&(clearTimeout(n.timeoutHandle),this.mountWaiters.delete(e),n.reject(Error(t)))}};async function om(e,t){let n=e.id??am.generateId(),r,i,a=new Promise((e,t)=>{r=e,i=t});return am.register(n,e,r,i),t?t({content:[{type:`tool_ui`,requestId:n,html:e.html}]}):rm.warn(`showToolUI called without onUpdate callback — UI may not render`),a.finally(()=>{t&&t({content:[{type:`tool_ui_done`,requestId:n}]})})}async function sm(e){let t=nm();return t?om(e,t.onUpdate):(rm.warn(`showToolUIFromContext called without execution context`),null)}const cm=n(`image-processor`),lm=3932160;function um(e){let t=e.replace(/[\t\n\f\r ]/g,``),n=t.length%4;return n===2?`${t}==`:n===3?`${t}=`:t}function dm(e,t){let n=i(um(e.slice(0,t)));return new DataView(n.buffer,n.byteOffset,n.byteLength)}function fm(e,t){return e>0&&t>0?{width:e,height:t}:null}function pm(e){if(e.length<32)return null;let t=dm(e,32);return fm(t.getUint32(16,!1),t.getUint32(20,!1))}function mm(e){if(e.length<16)return null;let t=dm(e,16);return fm(t.getUint16(6,!0),t.getUint16(8,!0))}function hm(e){let t=dm(e,Math.min(87384,e.length));for(let e=0;e<t.byteLength-8;e++){if(t.getUint8(e)!==255)continue;let n=t.getUint8(e+1);if(n===192||n===194)return fm(t.getUint16(e+7,!1),t.getUint16(e+5,!1))}return null}function gm(e,t){try{let n=um(e);if(t===`image/png`)return pm(n);if(t===`image/gif`)return mm(n);if(t===`image/jpeg`)return hm(n)}catch{}return null}async function _m(e){if(!u(e.mimeType))return cm.warn(`Unsupported image format`,{mimeType:e.mimeType}),{type:`text`,text:`[Image removed: unsupported format "${e.mimeType}". Supported: JPEG, PNG, GIF, WebP]`};let t=e.data.length,n=gm(e.data,e.mimeType);if(!(t>5242880||n!==null&&(n.width>8e3||n.height>8e3)||n!==null&&Math.max(n.width,n.height)>1568))return e;cm.info(`Image needs processing`,{base64Size:t,dimensions:n?`${n.width}x${n.height}`:`unknown`,reason:t>5242880?`size`:`dimensions`});let a,o;try{let e=await import(`./magick-wasm-DCNZhAyd.js`).then(e=>e.r);a=e.getMagick,o=e.MIME_TO_MAGICK_FORMAT}catch(e){return cm.error(`ImageMagick WASM module unavailable`,{error:e instanceof Error?e.message:String(e)}),{type:`text`,text:`[Image removed: resize service unavailable (ImageMagick WASM could not be loaded)]`}}let s;try{s=await a()}catch(e){return cm.error(`ImageMagick WASM initialization failed`,{error:e instanceof Error?e.message:String(e)}),{type:`text`,text:`[Image removed: resize service unavailable (WASM init failed)]`}}try{let n=i(um(e.data)),a={data:null,mime:e.mimeType};if(await s.ImageMagick.read(n,async t=>{let n=t.width,r=t.height,i=Math.max(n,r);if(i>1568){let e=1568/i,a=Math.round(n*e),o=Math.round(r*e);t.resize(a,o),cm.info(`Resized image`,{from:`${n}x${r}`,to:`${a}x${o}`})}let s=o[e.mimeType]||`JPEG`;t.write(s,e=>{a.data=new Uint8Array(e)}),a.data&&a.data.length>lm&&s!==`JPEG`?(cm.info(`Still over 5MB, compressing to JPEG q80`),t.quality=80,t.write(`JPEG`,e=>{a.data=new Uint8Array(e)}),a.mime=`image/jpeg`):a.data&&a.data.length>lm&&(cm.info(`Still over 5MB as JPEG, reducing quality to 60`),t.quality=60,t.write(`JPEG`,e=>{a.data=new Uint8Array(e)}))}),!a.data)return cm.warn(`ImageMagick produced no output`),{type:`text`,text:`[Image removed: could not be processed (empty output from resize)]`};if(a.data.length>lm)return cm.warn(`Image still over 5MB after resize+compress`,{size:a.data.length}),{type:`text`,text:`[Image removed: still ${Math.round(a.data.length/1024/1024*10)/10}MB after resize and compression, exceeds 5MB API limit]`};let c=r(a.data);return cm.info(`Image processed successfully`,{originalBase64:t,newBase64:c.length,mimeType:a.mime}),{type:`image`,data:c,mimeType:a.mime}}catch(n){return cm.error(`Image data processing failed (corrupt or unreadable)`,{mimeType:e.mimeType,estimatedBytes:t,error:n instanceof Error?n.message:String(n)}),{type:`text`,text:`[Image removed: image data could not be processed (${n instanceof Error?n.message:`corrupt or unreadable`})]`}}}const vm=n(`tool-adapter`);function ym(e){let t=[],n=0;for(let r of d(e)){if(r.kind===`inert`||!r.parsed)continue;let i=e.slice(n,r.index);i.trim()&&t.push({type:`text`,text:i.trimEnd()}),t.push({type:`image`,mimeType:r.parsed.mimeType,data:r.parsed.data}),n=r.index+r.marker.length}let r=e.slice(n);return(r.trim()||t.length===0)&&t.push({type:`text`,text:r||e}),t}async function bm(e){let t=ym(e),n=[];for(let e of t)e.type===`image`?n.push(await _m(e)):n.push(e);return n}function xm(e,t,n,r){if(!r)return{tracked:null,effectiveSignal:n};let i=r.processManager.spawn({kind:`tool`,argv:[e.name,...Om(t)],owner:r.owner,ppid:r.getParentPid?.()});n?.aborted?r.processManager.signal(i.pid,`SIGINT`):n&&n.addEventListener(`abort`,()=>r.processManager.signal(i.pid,`SIGINT`),{once:!0});let a=r.processManager.onSignal((e,t)=>{e.pid===i.pid&&t===`SIGKILL`&&r.processManager.exit(i.pid,null)});return{tracked:{record:i,manager:r.processManager,unsubscribeKill:a},effectiveSignal:i.abort.signal}}function Sm(e,t){e&&e.manager.exit(e.record.pid,t)}async function Cm(e,t,n){if(!n||typeof e!=`string`||e.length===0)return e;try{return await n.scrubToolResult(e)}catch(n){return vm.warn(`Tool-result scrub failed, falling back to unscrubbed content`,{tool:t,error:n instanceof Error?n.message:String(n)}),e}}async function wm(e,t){try{return await bm(e)}catch(n){return vm.warn(`Image processing failed, falling back to raw content`,{tool:t,error:n instanceof Error?n.message:String(n)}),ym(e)}}async function Tm(e,t,n,r){let i=n?.currentGate();if(!i)return!0;if(r?.aborted)return!1;try{return await i.approve(e.name,t)&&r?.aborted!==!0}catch(t){return vm.warn(`Tool-call gate threw — refusing the call`,{tool:e.name,error:t instanceof Error?t.message:String(t)}),!1}}function Em(e,t,n,r){return{name:e.name,label:e.name,description:e.description,parameters:e.inputSchema,async execute(i,a,o,s){let c;if(s&&(c=em({onUpdate:s,toolName:e.name,toolCallId:i})),!await Tm(e,a,r,o))return c&&tm(c),{content:[{type:`text`,text:`${e.name}: not approved (guest-caused turn).`}],details:{isError:!0}};let l=xm(e,a,o,t);try{let t=await e.execute(a??{},l.effectiveSignal),r=await wm(await Cm(t.content,e.name,n),e.name);return Sm(l.tracked,+!!t.isError),{content:r,details:{isError:t.isError}}}catch(e){throw Sm(l.tracked,l.tracked?.record.abort.signal.aborted?null:1),e}finally{c&&tm(c),l.tracked?.unsubscribeKill()}}}}function Dm(e,t,n,r){return e.map(e=>Em(e,t,n,r))}function Om(e){if(typeof e!=`object`||!e)return[];let t=e;for(let e of[`command`,`file_path`,`path`,`pattern`,`url`,`key`,`name`,`query`,`message`]){let n=t[e];if(typeof n==`string`&&n.length>0)return[n]}for(let e of Object.values(t))if(typeof e==`string`&&e.length>0)return[e];return[]}export{Rt as $,er as A,Ee as At,Ln as B,w as Bt,V as C,Te as Ct,z as D,Ce as Dt,B as E,we as Et,Gn as F,ye as Ft,tn as G,jn as H,Kn as I,be as It,Qt as J,$t as K,qn as L,xe as Lt,Yn as M,_e as Mt,L as N,b as Nt,tr as O,Ae as Ot,Wn as P,ve as Pt,j as Q,I as R,Pe as Rt,ji as S,me as St,yr as T,he as Tt,An as U,In as V,ue as Vt,nn as W,Ut as X,Kt as Y,M as Z,Li as _,de as _t,sm as a,St as at,Ai as b,Ve as bt,Qp as c,pt as ct,uf as d,Ie as dt,Ft as et,of as f,Fe as ft,Ri as g,y as gt,qa as h,C as ht,om as i,wt as it,Qn as j,ge as jt,R as k,je as kt,Jp as l,lt,Hd as m,Ne as mt,Om as n,kt as nt,am as o,k as ot,ef as p,Me as pt,N as q,im as r,Dt as rt,nm as s,xt as st,Dm as t,At as tt,qp as u,st as ut,Mi as v,fe as vt,Cr as w,Se as wt,ki as x,x as xt,Ei as y,pe as yt,Bn as z,Oe as zt};
|
|
38
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function Ep({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=qf(t(r),e);n.push(i.trimStart())}}function Dp(e,t){let n=Z(t)?t.value:t;for(let r of e)if(X(r)&&(r.key===t||r.key===n||Z(r.key)&&r.key.value===n))return r}var Op=class extends Gf{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(hf,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(xp(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=X(e)?e:!e||typeof e!=`object`||!(`key`in e)?new Sp(e,e?.value):new Sp(e.key,e.value);let r=Dp(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);Z(r.value)&&Bf(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=Dp(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Dp(this.items,e)?.value;return(!t&&Z(n)?n.value:n)??void 0}has(e){return!!Dp(this.items,e)}set(e,t){this.add(new Sp(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)yp(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!X(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Cp(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};const kp={collection:`map`,default:!0,nodeClass:Op,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Sf(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Op.from(e,t,n)};var Ap=class extends Gf{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(vf,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=jp(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=jp(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Z(r)?r.value:r}has(e){let t=jp(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=jp(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Z(r)&&Bf(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(If(e,String(r++),t));return n}toString(e,t,n){return e?Cp(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(Hf(a,void 0,n))}}return i}};function jp(e){let t=Z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}const Mp={collection:`seq`,default:!0,nodeClass:Ap,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Cf(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>Ap.from(e,t,n)};function Np(e){return typeof e==`bigint`||Number.isInteger(e)}const Pp=({value:e})=>JSON.stringify(e),Fp=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Pp},{identify:e=>e==null,createNode:()=>new $(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Pp},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Pp},{identify:Np,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Np(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Pp}];[kp,Mp].concat(Fp,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function Ip(e,t,n){let{replacer:r}=n,i=new Ap(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(xp(o,s,n))}return i}var Lp=class e extends Ap{constructor(){super(),this.add=Op.prototype.add.bind(this),this.delete=Op.prototype.delete.bind(this),this.get=Op.prototype.get.bind(this),this.has=Op.prototype.has.bind(this),this.set=Op.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(X(e)?(r=If(e.key,``,t),i=If(e.value,r,t)):r=If(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Ip(e,t,n),i=new this;return i.items=r.items,i}};Lp.tag=`tag:yaml.org,2002:omap`;var Rp=class e extends Op{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=X(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new Sp(e.key,null):new Sp(e,null),Dp(this.items,t.key)||this.items.push(t)}get(e,t){let n=Dp(this.items,e);return!t&&X(n)?Z(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Dp(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Sp(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(xp(e,null,n));return i}};Rp.tag=`tag:yaml.org,2002:set`;const zp=Symbol(`break visit`),Bp=Symbol(`skip children`),Vp=Symbol(`remove item`);function Hp(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Up(Object.freeze([]),e,t)}Hp.BREAK=zp,Hp.SKIP=Bp,Hp.REMOVE=Vp,Hp.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},Hp.parentCollection=(e,t)=>{let n=Hp.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function Up(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=Up(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===zp)return zp;else r===Vp&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}let r=/^\s+$/,i=/(?:[^\\]|^)\\$/,a=/^\\!/,o=/^\\#/,s=/\r?\n/g,c=/^\.{0,2}\/|^\.{1,2}$/,l=/\/$/,u=`node-ignore`;typeof Symbol<`u`&&(u=Symbol.for(`node-ignore`));let d=u,f=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),p=/([0-z])-([0-z])/g,m=()=>!1,h=e=>e.replace(p,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:``),g=e=>{let{length:t}=e;return e.slice(0,t-t%2)},ee=[[/^\uFEFF/,()=>``],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?` `:``)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+` `}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>`\\`],[/\\\\/g,()=>`\\`],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===`\\`?`\\[${n}${g(r)}${i}`:i===`]`&&r.length%2==0?`[${h(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],_=/(^|\\\/)?\\\*$/,v=`regex`,te=`checkRegex`,ne={[v](e,t){return`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`},[te](e,t){return`${t?`${t}[^/]*`:`[^/]*`}(?=$|\\/$)`}},re=e=>ee.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),ie=e=>typeof e==`string`,ae=e=>e&&ie(e)&&!r.test(e)&&!i.test(e)&&e.indexOf(`#`)!==0,oe=e=>e.split(s).filter(Boolean);var se=class{constructor(e,t,n,r,i,a){this.pattern=e,this.mark=t,this.negative=i,f(this,`body`,n),f(this,`ignoreCase`,r),f(this,`regexPrefix`,a)}get regex(){let e=`_regex`;return this[e]?this[e]:this._make(v,e)}get checkRegex(){let e=`_checkRegex`;return this[e]?this[e]:this._make(te,e)}_make(e,t){let n=this.regexPrefix.replace(_,ne[e]),r=this.ignoreCase?new RegExp(n,`i`):new RegExp(n);return f(this,t,r)}};let ce=({pattern:e,mark:t},n)=>{let r=!1,i=e;i.indexOf(`!`)===0&&(r=!0,i=i.substr(1)),i=i.replace(a,`!`).replace(o,`#`);let s=re(i);return new se(e,t,i,n,r,s)};var le=class{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[d]){this._rules=this._rules.concat(e._rules._rules),this._added=!0;return}if(ie(e)&&(e={pattern:e}),ae(e.pattern)){let t=ce(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(ie(e)?oe(e):e).forEach(this._add,this),this._added}test(e,t,n){let r=!1,i=!1,a;this._rules.forEach(o=>{let{negative:s}=o;i===s&&r!==i||s&&!r&&!i&&!t||o[n].test(e)&&(r=!s,i=s,a=s?void 0:o)});let o={ignored:r,unignored:i};return a&&(o.rule=a),o}};let ue=(e,t)=>{throw new t(e)},y=(e,t,n)=>ie(e)?e?!y.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),de=e=>c.test(e);y.isNotRelative=de,y.convert=e=>e;var fe=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){f(this,d,!0),this._rules=new le(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){let i=e&&y.convert(e);return y(i,e,this._strictPathCheck?ue:m),this._t(i,t,n,r)}checkIgnore(e){if(!l.test(e))return this.test(e);let t=e.split(`/`).filter(Boolean);if(t.pop(),t.length){let e=this._t(t.join(`/`)+`/`,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,te)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(`/`).filter(Boolean),r.pop(),!r.length)return t[e]=this._rules.test(e,n,v);let i=this._t(r.join(`/`)+`/`,t,n,r);return t[e]=i.ignored?i:this._rules.test(e,n,v)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}};let pe=e=>new fe(e),me=e=>y(e&&y.convert(e),e,m),he=()=>{y.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;y.isNotRelative=t=>e.test(t)||de(t)};typeof process<`u`&&process.platform===`win32`&&he(),t.exports=pe,pe.default=pe,t.exports.isPathValid=me,f(t.exports,Symbol.for(`setupWindows`),he)}))();const Wp={"pi.session.id":{type:`string`,required:!0,cardinality:`high`,description:`Session id`},"pi.lane.name":{type:`string`,required:!0,cardinality:`high`,description:`Lane name`},"pi.operation.id":{type:`string`,required:!0,cardinality:`high`,description:`Durable operation id`},"pi.operation.recovery":{type:`boolean`,required:!0,description:`Whether this invocation resumes durable work`}},Gp={"pi.error.code":{type:`string`,cardinality:`low`,description:`Stable operation error code`},"pi.error.type":{type:`string`,cardinality:`low`,description:`Low-cardinality operation error class`}};({...Wp}),{...Gp},{...Wp},{...Gp},{...Wp},{...Gp},globalThis.Buffer,j({command:R({description:`Bash command to execute`}),timeout:Lt(Zn({description:`Timeout in seconds (optional, no default timeout)`}))});const Kp=j({oldText:R({description:`Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call.`}),newText:R({description:`Replacement text for this targeted edit.`})},{});j({path:R({description:`Path to the file to edit (relative or absolute)`}),edits:xt(Kp,{description:`One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead.`})},{}),j({path:R({description:`Path to the file to read (relative or absolute)`}),offset:Lt(Zn({description:`Line number to start reading from (1-indexed)`})),limit:Lt(Zn({description:`Maximum number of lines to read`}))}),j({path:R({description:`Path to the file to write (relative or absolute)`}),content:R({description:`Content to write to the file`})});function qp(){return a()?`extension-direct`:o()?`extension-delegate`:globalThis.__slicc_connect_mode?`connect`:`node-rest`}function Jp(){return qp()===`node-rest`}const Yp=n(`secret-scrub`),Xp=`[tool output withheld: secret scrub unavailable]`,Zp=async e=>e;function Qp(){let e=qp();return e===`extension-direct`?async e=>{if(!e)return e;try{let t=await new Promise(t=>{chrome.runtime.sendMessage({type:`secrets.scrub-tool-result`,text:e},e=>t(e??{}))});return t.error?(Yp.debug(`SW scrub-tool-result returned error`),Xp):typeof t.text==`string`?t.text:Xp}catch{return Yp.debug(`SW scrub-tool-result failed`),Xp}}:e===`extension-delegate`?async e=>{if(!e)return e;try{let t=await l(`secrets.scrub-tool-result`,{text:e});return t?.error?(Yp.debug(`Bridge scrub-tool-result returned error`),Xp):typeof t?.text==`string`?t.text:Xp}catch{return Yp.debug(`Bridge scrub-tool-result failed`),Xp}}:e===`connect`?Zp:async e=>{if(!e)return e;try{let t=await fetch(s(`/api/secrets/scrub`),{method:`POST`,headers:c({"content-type":`application/json`}),body:JSON.stringify({text:e})});if(!t.ok)return Yp.debug(`Server scrub-tool-result returned non-ok`,{status:t.status}),e;let n=await t.json();return typeof n.text==`string`?n.text:e}catch(t){return Yp.debug(`Server scrub-tool-result failed`,{error:t instanceof Error?t.message:String(t)}),e}}}const $p=[];function em(e){return $p.push(e),e}function tm(e){let t=$p.lastIndexOf(e);t!==-1&&$p.splice(t,1)}function nm(){return $p.length>0?$p[$p.length-1]:null}const rm=n(`tool-ui`),im=`__mounted`,am=new class{pending=new Map;idCounter=0;mounted=new Set;mountWaiters=new Map;generateId(){return`tool-ui-${++this.idCounter}-${Date.now().toString(36)}`}register(e,t,n,r){this.mounted.delete(e),this.pending.set(e,{request:t,resolve:n,reject:r}),rm.info(`Tool UI registered`,{id:e})}async handleAction(e,t){let n=this.pending.get(e);if(!n){rm.warn(`Action for unknown tool UI`,{id:e,action:t.action});return}rm.info(`Tool UI action`,{id:e,action:t.action});try{let e;e=n.request.onAction?await n.request.onAction(t.action,t.data):t,n.resolve(e)}catch(e){n.reject(e instanceof Error?e:Error(String(e)))}finally{this.pending.delete(e),this.clearMountWaiter(e,`tool ui completed`)}}cancel(e,t=`cancelled`){let n=this.pending.get(e);n&&(n.reject(Error(t)),this.pending.delete(e),rm.info(`Tool UI cancelled`,{id:e,reason:t})),this.clearMountWaiter(e,t),this.mounted.delete(e)}cancelAll(e=`cancelled`){let t=this.pending.size;for(let[t,n]of this.pending)n.reject(Error(e));this.pending.clear();for(let t of[...this.mountWaiters.keys()])this.clearMountWaiter(t,e);this.mounted.clear(),t>0&&rm.info(`All tool UIs cancelled`,{reason:e,count:t})}isPending(e){return this.pending.has(e)}getPendingIds(){return[...this.pending.keys()]}markMounted(e){this.mounted.add(e);let t=this.mountWaiters.get(e);t&&(clearTimeout(t.timeoutHandle),this.mountWaiters.delete(e),t.resolve())}waitForMount(e,t){return this.mounted.has(e)?Promise.resolve():new Promise((n,r)=>{let i=setTimeout(()=>{this.mountWaiters.delete(e),r(Error(`tool UI ${e} was not mounted by any panel within ${t}ms — check the chat panel`))},t);this.mountWaiters.set(e,{resolve:n,reject:r,timeoutHandle:i})})}clearMountWaiter(e,t){let n=this.mountWaiters.get(e);n&&(clearTimeout(n.timeoutHandle),this.mountWaiters.delete(e),n.reject(Error(t)))}};async function om(e,t){let n=e.id??am.generateId(),r,i,a=new Promise((e,t)=>{r=e,i=t});return am.register(n,e,r,i),t?t({content:[{type:`tool_ui`,requestId:n,html:e.html}]}):rm.warn(`showToolUI called without onUpdate callback — UI may not render`),a.finally(()=>{t&&t({content:[{type:`tool_ui_done`,requestId:n}]})})}async function sm(e){let t=nm();return t?om(e,t.onUpdate):(rm.warn(`showToolUIFromContext called without execution context`),null)}const cm=n(`image-processor`),lm=3932160;function um(e){let t=e.replace(/[\t\n\f\r ]/g,``),n=t.length%4;return n===2?`${t}==`:n===3?`${t}=`:t}function dm(e,t){let n=i(um(e.slice(0,t)));return new DataView(n.buffer,n.byteOffset,n.byteLength)}function fm(e,t){return e>0&&t>0?{width:e,height:t}:null}function pm(e){if(e.length<32)return null;let t=dm(e,32);return fm(t.getUint32(16,!1),t.getUint32(20,!1))}function mm(e){if(e.length<16)return null;let t=dm(e,16);return fm(t.getUint16(6,!0),t.getUint16(8,!0))}function hm(e){let t=dm(e,Math.min(87384,e.length));for(let e=0;e<t.byteLength-8;e++){if(t.getUint8(e)!==255)continue;let n=t.getUint8(e+1);if(n===192||n===194)return fm(t.getUint16(e+7,!1),t.getUint16(e+5,!1))}return null}function gm(e,t){try{let n=um(e);if(t===`image/png`)return pm(n);if(t===`image/gif`)return mm(n);if(t===`image/jpeg`)return hm(n)}catch{}return null}async function _m(e){if(!u(e.mimeType))return cm.warn(`Unsupported image format`,{mimeType:e.mimeType}),{type:`text`,text:`[Image removed: unsupported format "${e.mimeType}". Supported: JPEG, PNG, GIF, WebP]`};let t=e.data.length,n=gm(e.data,e.mimeType);if(!(t>5242880||n!==null&&(n.width>8e3||n.height>8e3)||n!==null&&Math.max(n.width,n.height)>1568))return e;cm.info(`Image needs processing`,{base64Size:t,dimensions:n?`${n.width}x${n.height}`:`unknown`,reason:t>5242880?`size`:`dimensions`});let a,o;try{let e=await import(`./magick-wasm-DCNZhAyd.js`).then(e=>e.r);a=e.getMagick,o=e.MIME_TO_MAGICK_FORMAT}catch(e){return cm.error(`ImageMagick WASM module unavailable`,{error:e instanceof Error?e.message:String(e)}),{type:`text`,text:`[Image removed: resize service unavailable (ImageMagick WASM could not be loaded)]`}}let s;try{s=await a()}catch(e){return cm.error(`ImageMagick WASM initialization failed`,{error:e instanceof Error?e.message:String(e)}),{type:`text`,text:`[Image removed: resize service unavailable (WASM init failed)]`}}try{let n=i(um(e.data)),a={data:null,mime:e.mimeType};if(await s.ImageMagick.read(n,async t=>{let n=t.width,r=t.height,i=Math.max(n,r);if(i>1568){let e=1568/i,a=Math.round(n*e),o=Math.round(r*e);t.resize(a,o),cm.info(`Resized image`,{from:`${n}x${r}`,to:`${a}x${o}`})}let s=o[e.mimeType]||`JPEG`;t.write(s,e=>{a.data=new Uint8Array(e)}),a.data&&a.data.length>lm&&s!==`JPEG`?(cm.info(`Still over 5MB, compressing to JPEG q80`),t.quality=80,t.write(`JPEG`,e=>{a.data=new Uint8Array(e)}),a.mime=`image/jpeg`):a.data&&a.data.length>lm&&(cm.info(`Still over 5MB as JPEG, reducing quality to 60`),t.quality=60,t.write(`JPEG`,e=>{a.data=new Uint8Array(e)}))}),!a.data)return cm.warn(`ImageMagick produced no output`),{type:`text`,text:`[Image removed: could not be processed (empty output from resize)]`};if(a.data.length>lm)return cm.warn(`Image still over 5MB after resize+compress`,{size:a.data.length}),{type:`text`,text:`[Image removed: still ${Math.round(a.data.length/1024/1024*10)/10}MB after resize and compression, exceeds 5MB API limit]`};let c=r(a.data);return cm.info(`Image processed successfully`,{originalBase64:t,newBase64:c.length,mimeType:a.mime}),{type:`image`,data:c,mimeType:a.mime}}catch(n){return cm.error(`Image data processing failed (corrupt or unreadable)`,{mimeType:e.mimeType,estimatedBytes:t,error:n instanceof Error?n.message:String(n)}),{type:`text`,text:`[Image removed: image data could not be processed (${n instanceof Error?n.message:`corrupt or unreadable`})]`}}}const vm=n(`tool-adapter`);function ym(e){let t=[],n=0;for(let r of d(e)){if(r.kind===`inert`||!r.parsed)continue;let i=e.slice(n,r.index);i.trim()&&t.push({type:`text`,text:i.trimEnd()}),t.push({type:`image`,mimeType:r.parsed.mimeType,data:r.parsed.data}),n=r.index+r.marker.length}let r=e.slice(n);return(r.trim()||t.length===0)&&t.push({type:`text`,text:r||e}),t}async function bm(e){let t=ym(e),n=[];for(let e of t)e.type===`image`?n.push(await _m(e)):n.push(e);return n}function xm(e,t,n,r){if(!r)return{tracked:null,effectiveSignal:n};let i=r.processManager.spawn({kind:`tool`,argv:[e.name,...Om(t)],owner:r.owner,ppid:r.getParentPid?.()});n?.aborted?r.processManager.signal(i.pid,`SIGINT`):n&&n.addEventListener(`abort`,()=>r.processManager.signal(i.pid,`SIGINT`),{once:!0});let a=r.processManager.onSignal((e,t)=>{e.pid===i.pid&&t===`SIGKILL`&&r.processManager.exit(i.pid,null)});return{tracked:{record:i,manager:r.processManager,unsubscribeKill:a},effectiveSignal:i.abort.signal}}function Sm(e,t){e&&e.manager.exit(e.record.pid,t)}async function Cm(e,t,n){if(!n||typeof e!=`string`||e.length===0)return e;try{return await n.scrubToolResult(e)}catch(n){return vm.warn(`Tool-result scrub failed, falling back to unscrubbed content`,{tool:t,error:n instanceof Error?n.message:String(n)}),e}}async function wm(e,t){try{return await bm(e)}catch(n){return vm.warn(`Image processing failed, falling back to raw content`,{tool:t,error:n instanceof Error?n.message:String(n)}),ym(e)}}async function Tm(e,t,n,r){let i=n?.currentGate();if(!i)return!0;if(r?.aborted)return!1;try{return await i.approve(e.name,t)&&r?.aborted!==!0}catch(t){return vm.warn(`Tool-call gate threw — refusing the call`,{tool:e.name,error:t instanceof Error?t.message:String(t)}),!1}}function Em(e,t,n,r){return{name:e.name,label:e.name,description:e.description,parameters:e.inputSchema,async execute(i,a,o,s){let c;if(s&&(c=em({onUpdate:s,toolName:e.name,toolCallId:i})),!await Tm(e,a,r,o))return c&&tm(c),{content:[{type:`text`,text:`${e.name}: not approved (guest-caused turn).`}],details:{isError:!0}};let l=xm(e,a,o,t);try{let t=await e.execute(a??{},l.effectiveSignal),r=await wm(await Cm(t.content,e.name,n),e.name);return Sm(l.tracked,+!!t.isError),{content:r,details:{isError:t.isError}}}catch(e){throw Sm(l.tracked,l.tracked?.record.abort.signal.aborted?null:1),e}finally{c&&tm(c),l.tracked?.unsubscribeKill()}}}}function Dm(e,t,n,r){return e.map(e=>Em(e,t,n,r))}function Om(e){if(typeof e!=`object`||!e)return[];let t=e;for(let e of[`command`,`file_path`,`path`,`pattern`,`url`,`key`,`name`,`query`,`message`]){let n=t[e];if(typeof n==`string`&&n.length>0)return[n]}for(let e of Object.values(t))if(typeof e==`string`&&e.length>0)return[e];return[]}export{Rt as $,er as A,Ee as At,Ln as B,w as Bt,V as C,Te as Ct,z as D,Ce as Dt,B as E,we as Et,Gn as F,ye as Ft,tn as G,jn as H,Kn as I,be as It,Qt as J,$t as K,qn as L,xe as Lt,Yn as M,_e as Mt,L as N,b as Nt,tr as O,Ae as Ot,Wn as P,ve as Pt,j as Q,I as R,Pe as Rt,ji as S,me as St,yr as T,he as Tt,An as U,In as V,ue as Vt,nn as W,Ut as X,Kt as Y,M as Z,Li as _,de as _t,sm as a,St as at,Ai as b,Ve as bt,Qp as c,pt as ct,uf as d,Ie as dt,Ft as et,of as f,Fe as ft,Ri as g,y as gt,qa as h,C as ht,om as i,wt as it,Qn as j,ge as jt,R as k,je as kt,Jp as l,lt,Hd as m,Ne as mt,Om as n,kt as nt,am as o,k as ot,ef as p,Me as pt,N as q,im as r,Dt as rt,nm as s,xt as st,Dm as t,At as tt,qp as u,st as ut,Mi as v,fe as vt,Cr as w,Se as wt,ki as x,x as xt,Ei as y,pe as yt,Bn as z,Oe as zt};
|